From 7c6dd4977bb44ec7423b896c1159e3a4a2b9baff Mon Sep 17 00:00:00 2001 From: Piotr Puszkiewicz Date: Fri, 16 Dec 2016 18:55:35 -0800 Subject: [PATCH] Fix build --- src/dotnet/CommandLine/CommandOption.cs | 4 ++-- src/dotnet/CommandLine/HelpMessageStrings.cs | 2 +- src/dotnet/CommandLine/LocalizableStrings.cs | 10 ++++++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/dotnet/CommandLine/CommandOption.cs b/src/dotnet/CommandLine/CommandOption.cs index 793ea8da0..f7de40e48 100644 --- a/src/dotnet/CommandLine/CommandOption.cs +++ b/src/dotnet/CommandLine/CommandOption.cs @@ -45,13 +45,13 @@ namespace Microsoft.DotNet.Cli.CommandLine } else { - throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); + throw new ArgumentException(String.Format(LocalizableStrings.InvalidTemplateError, nameof(template))); } } if (string.IsNullOrEmpty(LongName) && string.IsNullOrEmpty(ShortName) && string.IsNullOrEmpty(SymbolName)) { - throw new ArgumentException($"Invalid template pattern '{template}'", nameof(template)); + throw new ArgumentException(LocalizableStrings.InvalidTemplateError, nameof(template)); } } diff --git a/src/dotnet/CommandLine/HelpMessageStrings.cs b/src/dotnet/CommandLine/HelpMessageStrings.cs index f9f48def8..09551d2e6 100644 --- a/src/dotnet/CommandLine/HelpMessageStrings.cs +++ b/src/dotnet/CommandLine/HelpMessageStrings.cs @@ -5,6 +5,6 @@ namespace Microsoft.DotNet.Cli.CommandLine { internal class HelpMessageStrings { - internal const string MSBuildAdditionalArgsHelpText = "Any extra options that should be passed to MSBuild. See 'dotnet msbuild -h' for available options."; + internal const string MSBuildAdditionalArgsHelpText = LocalizableStrings.MSBuildAdditionalArgsHelpText; } } diff --git a/src/dotnet/CommandLine/LocalizableStrings.cs b/src/dotnet/CommandLine/LocalizableStrings.cs index 2ccd6f6d7..117be72fc 100644 --- a/src/dotnet/CommandLine/LocalizableStrings.cs +++ b/src/dotnet/CommandLine/LocalizableStrings.cs @@ -18,6 +18,8 @@ namespace Microsoft.DotNet.Cli.CommandLine public const string UsageHeader = "Usage:"; + public const string UsageItemWithoutArgs = " {0}"; + public const string UsageItemWithArgs = " {0} {1}"; public const string UsageArgumentsToken = " [arguments]"; @@ -42,14 +44,18 @@ namespace Microsoft.DotNet.Cli.CommandLine public const string UsageCommandArgs = " [args]"; - public const string UsageCommandAdditionalArgs = " [[--] ...]]"; + public const string UsageCommandAdditionalArgs = " [[--] ...]]"; - public const string UsageCommandsAdditionalArgsHeader = "Args:"; + public const string UsageCommandsAdditionalArgsHeader = "Additional Arguments:"; public const string UsageCommandsAdditionalArgsItem = " {0}"; public const string CommandItem = " {0}"; public const string ShortVersionTemplate = "{0} {1}"; + + public const string InvalidTemplateError = "Invalid template pattern '{0}'"; + + public const string MSBuildAdditionalArgsHelpText = "Any extra options that should be passed to MSBuild. See 'dotnet msbuild -h' for available options."; } } \ No newline at end of file