Re-enable localizable strings
This commit is contained in:
parent
18a2b95dec
commit
e1568bbc1e
11 changed files with 38 additions and 103 deletions
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System.Linq;
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using LocalizableStrings = Microsoft.DotNet.Tools.Build.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
|
@ -11,14 +12,14 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Build() =>
|
||||
Create.Command(
|
||||
"build",
|
||||
".NET Builder",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments,
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option(
|
||||
"-o|--output",
|
||||
"Output directory in which to place built artifacts.",
|
||||
LocalizableStrings.OutputOptionDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "OUTPUT_DIR")
|
||||
.With(name: LocalizableStrings.OutputOptionName)
|
||||
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
||||
CommonOptions.FrameworkOption(),
|
||||
CommonOptions.RuntimeOption(),
|
||||
|
@ -26,10 +27,10 @@ namespace Microsoft.DotNet.Cli
|
|||
CommonOptions.VersionSuffixOption(),
|
||||
Create.Option(
|
||||
"--no-incremental",
|
||||
"Disables incremental build."),
|
||||
LocalizableStrings.NoIncrementialOptionDescription),
|
||||
Create.Option(
|
||||
"--no-dependencies",
|
||||
"Set this flag to ignore project-to-project references and only build the root project",
|
||||
LocalizableStrings.NoDependenciesOptionDescription,
|
||||
Accept.NoArguments
|
||||
.ForwardAs("/p:BuildProjectReferences=false")),
|
||||
CommonOptions.VerbosityOption());
|
||||
|
|
|
@ -9,14 +9,6 @@ namespace Microsoft.DotNet.Tools.Build
|
|||
|
||||
public const string AppFullName = ".NET Builder";
|
||||
|
||||
public const string ConfigurationOptionDescription = "Configuration to use for building the project. Default for most projects is \"Debug\".";
|
||||
|
||||
public const string ConfigurationOptionName = "CONFIGURATION";
|
||||
|
||||
public const string FrameworkOptionDescription = "Target framework to build for. The target framework has to be specified in the project file.";
|
||||
|
||||
public const string FrameworkOptionName = "FRAMEWORK";
|
||||
|
||||
public const string NoDependenciesOptionDescription = "Set this flag to ignore project-to-project references and only build the root project";
|
||||
|
||||
public const string NoIncrementialOptionDescription = "Disables incremental build.";
|
||||
|
@ -24,18 +16,5 @@ namespace Microsoft.DotNet.Tools.Build
|
|||
public const string OutputOptionDescription = "Output directory in which to place built artifacts.";
|
||||
|
||||
public const string OutputOptionName = "OUTPUT_DIR";
|
||||
|
||||
public const string ProjectArgumentDescription = "The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file.";
|
||||
|
||||
public const string ProjectArgumentValueName = "PROJECT";
|
||||
|
||||
public const string RuntimeOptionDescription = "Target runtime to build for. The default is to build a portable application.";
|
||||
|
||||
public const string RuntimeOptionName = "RUNTIME_IDENTIFIER";
|
||||
|
||||
public const string VersionSuffixOptionDescription = "Defines the value for the $(VersionSuffix) property in the project";
|
||||
|
||||
public const string VersionSuffixOptionName = "VERSION_SUFFIX";
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,14 +13,6 @@ namespace Microsoft.DotNet.Tools.Cache
|
|||
|
||||
public const string ProjectEntryDescription = "The XML file that contains the list of packages to be cached.";
|
||||
|
||||
public const string FrameworkOption = "FRAMEWORK";
|
||||
|
||||
public const string FrameworkOptionDescription = "Target framework for which to cache for.";
|
||||
|
||||
public const string RuntimeOption = "RUNTIME_IDENTIFIER";
|
||||
|
||||
public const string RuntimeOptionDescription = "Target runtime to cache for.";
|
||||
|
||||
public const string OutputOption = "OUTPUT_DIR";
|
||||
|
||||
public const string OutputOptionDescription = "Output directory in which to cache the given assemblies.";
|
||||
|
|
|
@ -12,13 +12,13 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Clean() =>
|
||||
Create.Command(
|
||||
"clean",
|
||||
".NET Clean Command",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments,
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option("-o|--output",
|
||||
"Directory in which the build outputs have been placed.",
|
||||
LocalizableStrings.CmdOutputDirDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "OUTPUT_DIR")
|
||||
.With(name: LocalizableStrings.CmdOutputDir)
|
||||
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
||||
CommonOptions.FrameworkOption(),
|
||||
CommonOptions.ConfigurationOption(),
|
||||
|
|
|
@ -9,20 +9,8 @@ namespace Microsoft.DotNet.Tools.Clean
|
|||
|
||||
public const string AppDescription = "Command to clean previously generated build outputs.";
|
||||
|
||||
public const string CmdArgProject = "PROJECT";
|
||||
|
||||
public const string CmdArgProjDescription= "The MSBuild project file to build. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file.";
|
||||
|
||||
public const string CmdOutputDir = "OUTPUT_DIR";
|
||||
|
||||
public const string CmdOutputDirDescription = "Directory in which the build outputs have been placed.";
|
||||
|
||||
public const string CmdFramework = "FRAMEWORK";
|
||||
|
||||
public const string CmdFrameworkDescription = "Clean a specific framework.";
|
||||
|
||||
public const string CmdConfiguration = "CONFIGURATION";
|
||||
|
||||
public const string CmdConfigurationDescription = "Clean a specific configuration.";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,14 +19,6 @@ namespace Microsoft.DotNet.Tools.Pack
|
|||
|
||||
public const string CmdIncludeSourceDescription = "Include PDBs and source files. Source files go into the src folder in the resulting nuget package";
|
||||
|
||||
public const string CmdConfig = "CONFIGURATION";
|
||||
|
||||
public const string CmdConfigDescription = "Configuration to use for building the project. Default for most projects is \"Debug\".";
|
||||
|
||||
public const string CmdVersionSuffix = "VERSION_SUFFIX";
|
||||
|
||||
public const string CmdVersionSuffixDescription = "Defines the value for the $(VersionSuffix) property in the project.";
|
||||
|
||||
public const string CmdServiceableDescription = "Set the serviceable flag in the package. For more information, please see https://aka.ms/nupkgservicing.";
|
||||
|
||||
public const string CmdArgumentProject = "PROJECT";
|
||||
|
|
|
@ -9,30 +9,14 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
|
||||
public const string AppDescription = "Publisher for the .NET Platform";
|
||||
|
||||
public const string ProjectArgument = "PROJECT";
|
||||
|
||||
public const string ProjectArgDescription = "The MSBuild project file to publish. If a project file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in `proj` and uses that file.";
|
||||
|
||||
public const string FrameworkOption = "FRAMEWORK";
|
||||
|
||||
public const string FrameworkOptionDescription = "Target framework to publish for. The target framework has to be specified in the project file.";
|
||||
|
||||
public const string RuntimeOption = "RUNTIME_IDENTIFIER";
|
||||
|
||||
public const string RuntimeOptionDescription = "Publish the project for a given runtime. This is used when creating self-contained deployment. Default is to publish a framework-dependent app.";
|
||||
|
||||
public const string OutputOption = "OUTPUT_DIR";
|
||||
|
||||
public const string OutputOptionDescription = "Output directory in which to place the published artifacts.";
|
||||
|
||||
public const string ConfigurationOption = "CONFIGURATION";
|
||||
|
||||
public const string ConfigurationOptionDescription = "Configuration to use for building the project. Default for most projects is \"Debug\".";
|
||||
|
||||
public const string VersionSuffixOption = "VERSION_SUFFIX";
|
||||
|
||||
public const string VersionSuffixOptionDescription = "Defines the value for the $(VersionSuffix) property in the project.";
|
||||
|
||||
public const string FilterProjOption = "profile.xml";
|
||||
|
||||
public const string FilterProjOptionDescription = "The XML file that contains the list of packages to be excluded from publish step.";
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System.Linq;
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using LocalizableStrings = Microsoft.DotNet.Tools.Publish.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
|
@ -11,22 +12,25 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Publish() =>
|
||||
Create.Command(
|
||||
"publish",
|
||||
".NET Publisher",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments,
|
||||
CommonOptions.HelpOption(),
|
||||
CommonOptions.FrameworkOption(),
|
||||
CommonOptions.RuntimeOption(),
|
||||
Create.Option("-o|--output",
|
||||
"Output directory in which to place the published artifacts.",
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "OUTPUT_DIR")
|
||||
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
|
||||
Create.Option(
|
||||
"-o|--output",
|
||||
LocalizableStrings.OutputOptionDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: LocalizableStrings.OutputOption)
|
||||
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
|
||||
CommonOptions.ConfigurationOption(),
|
||||
CommonOptions.VersionSuffixOption(),
|
||||
Create.Option("--filter", "The XML file that contains the list of packages to be excluded from publish step.",
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "PROFILE_XML")
|
||||
.ForwardAs(o => $"/p:FilterProjectFiles={o.Arguments.Single()}")),
|
||||
Create.Option(
|
||||
"--filter",
|
||||
LocalizableStrings.FilterProjOptionDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: LocalizableStrings.FilterProjOption)
|
||||
.ForwardAs(o => $"/p:FilterProjectFiles={o.Arguments.Single()}")),
|
||||
CommonOptions.VerbosityOption());
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System.Linq;
|
||||
using Microsoft.DotNet.Cli.CommandLine;
|
||||
using LocalizableStrings = Microsoft.DotNet.Tools.Restore.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
|
@ -11,52 +12,52 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Restore() =>
|
||||
Create.Command(
|
||||
"restore",
|
||||
".NET dependency restorer",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments,
|
||||
CommonOptions.HelpOption(),
|
||||
Create.Option(
|
||||
"-s|--source",
|
||||
"Specifies a NuGet package source to use during the restore.",
|
||||
LocalizableStrings.CmdSourceOptionDescription,
|
||||
Accept.OneOrMoreArguments
|
||||
.With(name: "SOURCE")
|
||||
.With(name: LocalizableStrings.CmdSourceOption)
|
||||
.ForwardAs(o => $"/p:RestoreSources={string.Join("%3B", o.Arguments)}")),
|
||||
Create.Option(
|
||||
"-r|--runtime",
|
||||
"Target runtime to restore packages for.",
|
||||
LocalizableStrings.CmdRuntimeOptionDescription,
|
||||
Accept.OneOrMoreArguments
|
||||
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
|
||||
.With(name: "RUNTIME_IDENTIFIER")
|
||||
.With(name: LocalizableStrings.CmdRuntimeOption)
|
||||
.ForwardAs(o => $"/p:RuntimeIdentifiers={string.Join("%3B", o.Arguments)}")),
|
||||
Create.Option(
|
||||
"--packages",
|
||||
"Directory to install packages in.",
|
||||
LocalizableStrings.CmdPackagesOptionDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "PACKAGES_DIRECTORY")
|
||||
.With(name: LocalizableStrings.CmdPackagesOption)
|
||||
.ForwardAs(o => $"/p:RestorePackagesPath={o.Arguments.Single()}")),
|
||||
Create.Option(
|
||||
"--disable-parallel",
|
||||
"Disables restoring multiple projects in parallel.",
|
||||
LocalizableStrings.CmdDisableParallelOptionDescription,
|
||||
Accept.NoArguments
|
||||
.ForwardAs("/p:RestoreDisableParallel=true")),
|
||||
Create.Option(
|
||||
"--configfile",
|
||||
"The NuGet configuration file to use.",
|
||||
LocalizableStrings.CmdConfigFileOptionDescription,
|
||||
Accept.ExactlyOneArgument
|
||||
.With(name: "FILE")
|
||||
.With(name: LocalizableStrings.CmdConfigFileOption)
|
||||
.ForwardAs(o => $"/p:RestoreConfigFile={o.Arguments.Single()}")),
|
||||
Create.Option(
|
||||
"--no-cache",
|
||||
"Do not cache packages and http requests.",
|
||||
LocalizableStrings.CmdNoCacheOptionDescription,
|
||||
Accept.NoArguments
|
||||
.ForwardAs("/p:RestoreNoCache=true")),
|
||||
Create.Option(
|
||||
"--ignore-failed-sources",
|
||||
"Treat package source failures as warnings.",
|
||||
LocalizableStrings.CmdIgnoreFailedSourcesOptionDescription,
|
||||
Accept.NoArguments
|
||||
.ForwardAs("/p:RestoreIgnoreFailedSources=true")),
|
||||
Create.Option(
|
||||
"--no-dependencies",
|
||||
"Set this flag to ignore project to project references and only restore the root project",
|
||||
LocalizableStrings.CmdNoDependenciesOptionDescription,
|
||||
Accept.NoArguments
|
||||
.ForwardAs("/p:RestoreRecursive=false")),
|
||||
CommonOptions.VerbosityOption());
|
||||
|
|
|
@ -9,12 +9,6 @@ namespace Microsoft.DotNet.Tools.Run
|
|||
|
||||
public const string AppDescription = "Command used to run .NET apps";
|
||||
|
||||
public const string CommandOptionConfigurationDescription = "Configuration to use for building the project. Default for most projects is \"Debug\".";
|
||||
|
||||
public const string CommandOptionFramework = "FRAMEWORK";
|
||||
|
||||
public const string CommandOptionFrameworkDescription = "Build and run the app using the specified framework. The framework has to be specified in the project file. ";
|
||||
|
||||
public const string CommandOptionProjectDescription = "The path to the project file to run (defaults to the current directory if there is only one project).";
|
||||
|
||||
public const string RunCommandException = "The build failed. Please fix the build errors and run again.";
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace Microsoft.DotNet.Cli
|
|||
public static Command Run() =>
|
||||
Create.Command(
|
||||
"run",
|
||||
".NET Run Command",
|
||||
LocalizableStrings.AppFullName,
|
||||
Accept.ZeroOrMoreArguments
|
||||
.MaterializeAs(o =>
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue