Skip to content

Commit b76fd91

Browse files
committed
Localize exception message
1 parent b6b1c58 commit b76fd91

15 files changed

+70
-2
lines changed

src/Cli/dotnet/CliStrings.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,9 @@
319319
<data name="ToolSettingsUnsupportedRunner" xml:space="preserve">
320320
<value>Command '{0}' uses unsupported runner '{1}'."</value>
321321
</data>
322+
<data name="ToolUnsupportedRuntimeIdentifier" xml:space="preserve">
323+
<value>The tool does not support the current architecture or operating system ({0}). Supported runtimes: {1}</value>
324+
</data>
322325
<data name="ShellShimConflict" xml:space="preserve">
323326
<value>Command '{0}' conflicts with an existing command from another tool.</value>
324327
</data>

src/Cli/dotnet/ToolPackage/ToolPackageDownloaderBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,8 @@ protected virtual void DownloadTool(
288288
var bestRuntimeIdentifier = Microsoft.NET.Build.Tasks.NuGetUtils.GetBestMatchingRid(runtimeGraph, RuntimeInformation.RuntimeIdentifier, toolConfiguration.RidSpecificPackages.Keys, out bool wasInGraph);
289289
if (bestRuntimeIdentifier == null)
290290
{
291-
// TODO: Localize
292-
throw new ToolPackageException($"The tool does not support the current architecture or operating system (Runtime Identifier {RuntimeInformation.RuntimeIdentifier}");
291+
throw new ToolPackageException(string.Format(CliStrings.ToolUnsupportedRuntimeIdentifier, RuntimeInformation.RuntimeIdentifier,
292+
string.Join(" ", toolConfiguration.RidSpecificPackages.Keys)));
293293
}
294294

295295
var resolvedPackage = toolConfiguration.RidSpecificPackages[bestRuntimeIdentifier];

src/Cli/dotnet/xlf/CliStrings.cs.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.de.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.es.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.fr.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.it.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.ja.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.ko.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/dotnet/xlf/CliStrings.pl.xlf

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)