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 System.Linq;
|
||||||
using Microsoft.DotNet.Cli.CommandLine;
|
using Microsoft.DotNet.Cli.CommandLine;
|
||||||
|
using LocalizableStrings = Microsoft.DotNet.Tools.Build.LocalizableStrings;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
@ -11,14 +12,14 @@ namespace Microsoft.DotNet.Cli
|
||||||
public static Command Build() =>
|
public static Command Build() =>
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"build",
|
"build",
|
||||||
".NET Builder",
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments,
|
Accept.ZeroOrMoreArguments,
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"-o|--output",
|
"-o|--output",
|
||||||
"Output directory in which to place built artifacts.",
|
LocalizableStrings.OutputOptionDescription,
|
||||||
Accept.ExactlyOneArgument
|
Accept.ExactlyOneArgument
|
||||||
.With(name: "OUTPUT_DIR")
|
.With(name: LocalizableStrings.OutputOptionName)
|
||||||
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
||||||
CommonOptions.FrameworkOption(),
|
CommonOptions.FrameworkOption(),
|
||||||
CommonOptions.RuntimeOption(),
|
CommonOptions.RuntimeOption(),
|
||||||
|
@ -26,10 +27,10 @@ namespace Microsoft.DotNet.Cli
|
||||||
CommonOptions.VersionSuffixOption(),
|
CommonOptions.VersionSuffixOption(),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--no-incremental",
|
"--no-incremental",
|
||||||
"Disables incremental build."),
|
LocalizableStrings.NoIncrementialOptionDescription),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--no-dependencies",
|
"--no-dependencies",
|
||||||
"Set this flag to ignore project-to-project references and only build the root project",
|
LocalizableStrings.NoDependenciesOptionDescription,
|
||||||
Accept.NoArguments
|
Accept.NoArguments
|
||||||
.ForwardAs("/p:BuildProjectReferences=false")),
|
.ForwardAs("/p:BuildProjectReferences=false")),
|
||||||
CommonOptions.VerbosityOption());
|
CommonOptions.VerbosityOption());
|
||||||
|
|
|
@ -9,14 +9,6 @@ namespace Microsoft.DotNet.Tools.Build
|
||||||
|
|
||||||
public const string AppFullName = ".NET Builder";
|
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 NoDependenciesOptionDescription = "Set this flag to ignore project-to-project references and only build the root project";
|
||||||
|
|
||||||
public const string NoIncrementialOptionDescription = "Disables incremental build.";
|
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 OutputOptionDescription = "Output directory in which to place built artifacts.";
|
||||||
|
|
||||||
public const string OutputOptionName = "OUTPUT_DIR";
|
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 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 OutputOption = "OUTPUT_DIR";
|
||||||
|
|
||||||
public const string OutputOptionDescription = "Output directory in which to cache the given assemblies.";
|
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() =>
|
public static Command Clean() =>
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"clean",
|
"clean",
|
||||||
".NET Clean Command",
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments,
|
Accept.ZeroOrMoreArguments,
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
Create.Option("-o|--output",
|
Create.Option("-o|--output",
|
||||||
"Directory in which the build outputs have been placed.",
|
LocalizableStrings.CmdOutputDirDescription,
|
||||||
Accept.ExactlyOneArgument
|
Accept.ExactlyOneArgument
|
||||||
.With(name: "OUTPUT_DIR")
|
.With(name: LocalizableStrings.CmdOutputDir)
|
||||||
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
.ForwardAs(o => $"/p:OutputPath={o.Arguments.Single()}")),
|
||||||
CommonOptions.FrameworkOption(),
|
CommonOptions.FrameworkOption(),
|
||||||
CommonOptions.ConfigurationOption(),
|
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 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 CmdOutputDir = "OUTPUT_DIR";
|
||||||
|
|
||||||
public const string CmdOutputDirDescription = "Directory in which the build outputs have been placed.";
|
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 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 CmdServiceableDescription = "Set the serviceable flag in the package. For more information, please see https://aka.ms/nupkgservicing.";
|
||||||
|
|
||||||
public const string CmdArgumentProject = "PROJECT";
|
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 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 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 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 OutputOption = "OUTPUT_DIR";
|
||||||
|
|
||||||
public const string OutputOptionDescription = "Output directory in which to place the published artifacts.";
|
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 FilterProjOption = "profile.xml";
|
||||||
|
|
||||||
public const string FilterProjOptionDescription = "The XML file that contains the list of packages to be excluded from publish step.";
|
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 System.Linq;
|
||||||
using Microsoft.DotNet.Cli.CommandLine;
|
using Microsoft.DotNet.Cli.CommandLine;
|
||||||
|
using LocalizableStrings = Microsoft.DotNet.Tools.Publish.LocalizableStrings;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
@ -11,22 +12,25 @@ namespace Microsoft.DotNet.Cli
|
||||||
public static Command Publish() =>
|
public static Command Publish() =>
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"publish",
|
"publish",
|
||||||
".NET Publisher",
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments,
|
Accept.ZeroOrMoreArguments,
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
CommonOptions.FrameworkOption(),
|
CommonOptions.FrameworkOption(),
|
||||||
CommonOptions.RuntimeOption(),
|
CommonOptions.RuntimeOption(),
|
||||||
Create.Option("-o|--output",
|
Create.Option(
|
||||||
"Output directory in which to place the published artifacts.",
|
"-o|--output",
|
||||||
Accept.ExactlyOneArgument
|
LocalizableStrings.OutputOptionDescription,
|
||||||
.With(name: "OUTPUT_DIR")
|
Accept.ExactlyOneArgument
|
||||||
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
|
.With(name: LocalizableStrings.OutputOption)
|
||||||
|
.ForwardAs(o => $"/p:PublishDir={o.Arguments.Single()}")),
|
||||||
CommonOptions.ConfigurationOption(),
|
CommonOptions.ConfigurationOption(),
|
||||||
CommonOptions.VersionSuffixOption(),
|
CommonOptions.VersionSuffixOption(),
|
||||||
Create.Option("--filter", "The XML file that contains the list of packages to be excluded from publish step.",
|
Create.Option(
|
||||||
Accept.ExactlyOneArgument
|
"--filter",
|
||||||
.With(name: "PROFILE_XML")
|
LocalizableStrings.FilterProjOptionDescription,
|
||||||
.ForwardAs(o => $"/p:FilterProjectFiles={o.Arguments.Single()}")),
|
Accept.ExactlyOneArgument
|
||||||
|
.With(name: LocalizableStrings.FilterProjOption)
|
||||||
|
.ForwardAs(o => $"/p:FilterProjectFiles={o.Arguments.Single()}")),
|
||||||
CommonOptions.VerbosityOption());
|
CommonOptions.VerbosityOption());
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.DotNet.Cli.CommandLine;
|
using Microsoft.DotNet.Cli.CommandLine;
|
||||||
|
using LocalizableStrings = Microsoft.DotNet.Tools.Restore.LocalizableStrings;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli
|
namespace Microsoft.DotNet.Cli
|
||||||
{
|
{
|
||||||
|
@ -11,52 +12,52 @@ namespace Microsoft.DotNet.Cli
|
||||||
public static Command Restore() =>
|
public static Command Restore() =>
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"restore",
|
"restore",
|
||||||
".NET dependency restorer",
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments,
|
Accept.ZeroOrMoreArguments,
|
||||||
CommonOptions.HelpOption(),
|
CommonOptions.HelpOption(),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"-s|--source",
|
"-s|--source",
|
||||||
"Specifies a NuGet package source to use during the restore.",
|
LocalizableStrings.CmdSourceOptionDescription,
|
||||||
Accept.OneOrMoreArguments
|
Accept.OneOrMoreArguments
|
||||||
.With(name: "SOURCE")
|
.With(name: LocalizableStrings.CmdSourceOption)
|
||||||
.ForwardAs(o => $"/p:RestoreSources={string.Join("%3B", o.Arguments)}")),
|
.ForwardAs(o => $"/p:RestoreSources={string.Join("%3B", o.Arguments)}")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"-r|--runtime",
|
"-r|--runtime",
|
||||||
"Target runtime to restore packages for.",
|
LocalizableStrings.CmdRuntimeOptionDescription,
|
||||||
Accept.OneOrMoreArguments
|
Accept.OneOrMoreArguments
|
||||||
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
|
.WithSuggestionsFrom(_ => Suggest.RunTimesFromProjectFile())
|
||||||
.With(name: "RUNTIME_IDENTIFIER")
|
.With(name: LocalizableStrings.CmdRuntimeOption)
|
||||||
.ForwardAs(o => $"/p:RuntimeIdentifiers={string.Join("%3B", o.Arguments)}")),
|
.ForwardAs(o => $"/p:RuntimeIdentifiers={string.Join("%3B", o.Arguments)}")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--packages",
|
"--packages",
|
||||||
"Directory to install packages in.",
|
LocalizableStrings.CmdPackagesOptionDescription,
|
||||||
Accept.ExactlyOneArgument
|
Accept.ExactlyOneArgument
|
||||||
.With(name: "PACKAGES_DIRECTORY")
|
.With(name: LocalizableStrings.CmdPackagesOption)
|
||||||
.ForwardAs(o => $"/p:RestorePackagesPath={o.Arguments.Single()}")),
|
.ForwardAs(o => $"/p:RestorePackagesPath={o.Arguments.Single()}")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--disable-parallel",
|
"--disable-parallel",
|
||||||
"Disables restoring multiple projects in parallel.",
|
LocalizableStrings.CmdDisableParallelOptionDescription,
|
||||||
Accept.NoArguments
|
Accept.NoArguments
|
||||||
.ForwardAs("/p:RestoreDisableParallel=true")),
|
.ForwardAs("/p:RestoreDisableParallel=true")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--configfile",
|
"--configfile",
|
||||||
"The NuGet configuration file to use.",
|
LocalizableStrings.CmdConfigFileOptionDescription,
|
||||||
Accept.ExactlyOneArgument
|
Accept.ExactlyOneArgument
|
||||||
.With(name: "FILE")
|
.With(name: LocalizableStrings.CmdConfigFileOption)
|
||||||
.ForwardAs(o => $"/p:RestoreConfigFile={o.Arguments.Single()}")),
|
.ForwardAs(o => $"/p:RestoreConfigFile={o.Arguments.Single()}")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--no-cache",
|
"--no-cache",
|
||||||
"Do not cache packages and http requests.",
|
LocalizableStrings.CmdNoCacheOptionDescription,
|
||||||
Accept.NoArguments
|
Accept.NoArguments
|
||||||
.ForwardAs("/p:RestoreNoCache=true")),
|
.ForwardAs("/p:RestoreNoCache=true")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--ignore-failed-sources",
|
"--ignore-failed-sources",
|
||||||
"Treat package source failures as warnings.",
|
LocalizableStrings.CmdIgnoreFailedSourcesOptionDescription,
|
||||||
Accept.NoArguments
|
Accept.NoArguments
|
||||||
.ForwardAs("/p:RestoreIgnoreFailedSources=true")),
|
.ForwardAs("/p:RestoreIgnoreFailedSources=true")),
|
||||||
Create.Option(
|
Create.Option(
|
||||||
"--no-dependencies",
|
"--no-dependencies",
|
||||||
"Set this flag to ignore project to project references and only restore the root project",
|
LocalizableStrings.CmdNoDependenciesOptionDescription,
|
||||||
Accept.NoArguments
|
Accept.NoArguments
|
||||||
.ForwardAs("/p:RestoreRecursive=false")),
|
.ForwardAs("/p:RestoreRecursive=false")),
|
||||||
CommonOptions.VerbosityOption());
|
CommonOptions.VerbosityOption());
|
||||||
|
|
|
@ -9,12 +9,6 @@ namespace Microsoft.DotNet.Tools.Run
|
||||||
|
|
||||||
public const string AppDescription = "Command used to run .NET apps";
|
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 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.";
|
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() =>
|
public static Command Run() =>
|
||||||
Create.Command(
|
Create.Command(
|
||||||
"run",
|
"run",
|
||||||
".NET Run Command",
|
LocalizableStrings.AppFullName,
|
||||||
Accept.ZeroOrMoreArguments
|
Accept.ZeroOrMoreArguments
|
||||||
.MaterializeAs(o =>
|
.MaterializeAs(o =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue