提交 7de98972 编写于 作者: C CyrusNajmabadi

Don't manually construct strings. It doesn't work for localization.

上级 83e4ad3f
......@@ -81,9 +81,11 @@ private static Uri GetHelpLink(DiagnosticData diagnostic, string language, strin
// We make sure not to use Uri.AbsoluteUri for the url displayed in the tooltip so that the url displayed in the tooltip stays human readable.
if (helpLink != null)
{
helpLinkToolTipText =
string.Format(ServicesVSResources.Get_help_for_0_1_2_3, diagnostic.Id,
isBing ? ServicesVSResources.from_Bing : null, Environment.NewLine, helpLink);
var prefix = isBing
? string.Format(ServicesVSResources.Get_help_for_0_from_Bing, diagnostic.Id)
: string.Format(ServicesVSResources.Get_help_for_0, diagnostic.Id);
helpLinkToolTipText = $"{prefix}\r\n{helpLink}";
}
return helpLink;
......
......@@ -860,15 +860,6 @@ internal class ServicesVSResources {
}
}
/// <summary>
/// Looks up a localized string similar to from Bing.
/// </summary>
internal static string from_Bing {
get {
return ResourceManager.GetString("from_Bing", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Generate Type.
/// </summary>
......@@ -888,11 +879,20 @@ internal class ServicesVSResources {
}
/// <summary>
/// Looks up a localized string similar to Get help for &apos;{0}&apos;{1}{2}{3}.
/// Looks up a localized string similar to Get help for &apos;{0}&apos;.
/// </summary>
internal static string Get_help_for_0 {
get {
return ResourceManager.GetString("Get_help_for_0", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Get help for &apos;{0}&apos; from Bing.
/// </summary>
internal static string Get_help_for_0_1_2_3 {
internal static string Get_help_for_0_from_Bing {
get {
return ResourceManager.GetString("Get_help_for_0_1_2_3", resourceCulture);
return ResourceManager.GetString("Get_help_for_0_from_Bing", resourceCulture);
}
}
......
......@@ -447,12 +447,6 @@ Use the dropdown to view and switch to other projects this file may belong to.</
<data name="No_Changes" xml:space="preserve">
<value>No Changes</value>
</data>
<data name="Get_help_for_0_1_2_3" xml:space="preserve">
<value>Get help for '{0}'{1}{2}{3}</value>
</data>
<data name="from_Bing" xml:space="preserve">
<value> from Bing</value>
</data>
<data name="Current_block" xml:space="preserve">
<value>Current block</value>
</data>
......@@ -858,4 +852,10 @@ Additional information: {1}</value>
<data name="type_is_apparent_from_assignment_expression" xml:space="preserve">
<value>type is apparent from assignment expression</value>
</data>
<data name="Get_help_for_0" xml:space="preserve">
<value>Get help for '{0}'</value>
</data>
<data name="Get_help_for_0_from_Bing" xml:space="preserve">
<value>Get help for '{0}' from Bing</value>
</data>
</root>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册