Skip to content

Commit 1b6d28d

Browse files
authored
Clean up the dotnet --info workloads messaging to be more consistent and localizable (#50068)
2 parents 2a4195b + bbd5524 commit 1b6d28d

15 files changed

+141
-70
lines changed

src/Cli/dotnet/Commands/CliCommandStrings.resx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1865,7 +1865,7 @@ Your project targets multiple frameworks. Specify which framework to run using '
18651865
<comment>{Locked="--sdk-version"}</comment>
18661866
</data>
18671867
<data name="ShouldInstallAWorkloadSet" xml:space="preserve">
1868-
<value>Workloads are configured to install and update using workload versions, but none were found. Run "dotnet workload restore" to install a workload version.</value>
1868+
<value>No workload sets are installed. Run "dotnet workload restore" to install a workload set.</value>
18691869
<comment>{Locked="dotnet workload restore"}</comment>
18701870
</data>
18711871
<data name="ShutDownFailed" xml:space="preserve">
@@ -2481,8 +2481,12 @@ To display a value, specify the corresponding command-line option without provid
24812481
<data name="WorkloadManifestIdColumn" xml:space="preserve">
24822482
<value>Workload manifest ID</value>
24832483
</data>
2484-
<data name="WorkloadManifestInstallationConfiguration" xml:space="preserve">
2485-
<value>Configured to use {0} when installing new manifests.</value>
2484+
<data name="WorkloadManifestInstallationConfigurationWorkloadSets" xml:space="preserve">
2485+
<value>Configured to use workload sets when installing new manifests.</value>
2486+
<comment>{Locked="workload sets"}</comment>
2487+
</data>
2488+
<data name="WorkloadManifestInstallationConfigurationLooseManifests" xml:space="preserve">
2489+
<value>Configured to use loose manifests when installing new manifests.</value>
24862490
</data>
24872491
<data name="WorkloadManifestPathColumn" xml:space="preserve">
24882492
<value>Manifest Path</value>

src/Cli/dotnet/Commands/Workload/WorkloadCommandParser.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ internal static void ShowWorkloadsInfo(ParseResult parseResult = null, WorkloadI
6868
void WriteUpdateModeAndAnyError(string indent = "")
6969
{
7070
var useWorkloadSets = InstallStateContents.FromPath(Path.Combine(WorkloadInstallType.GetInstallStateFolder(workloadInfoHelper._currentSdkFeatureBand, workloadInfoHelper.UserLocalPath), "default.json")).ShouldUseWorkloadSets();
71-
var workloadSetsString = useWorkloadSets ? "workload sets" : "loose manifests";
72-
reporter.WriteLine(indent + string.Format(CliCommandStrings.WorkloadManifestInstallationConfiguration, workloadSetsString));
71+
var configurationMessage = useWorkloadSets
72+
? CliCommandStrings.WorkloadManifestInstallationConfigurationWorkloadSets
73+
: CliCommandStrings.WorkloadManifestInstallationConfigurationLooseManifests;
74+
reporter.WriteLine(indent + configurationMessage);
7375

7476
if (!versionInfo.IsInstalled)
7577
{

src/Cli/dotnet/Commands/xlf/CliCommandStrings.cs.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.de.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.es.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.fr.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.it.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.ja.xlf

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

src/Cli/dotnet/Commands/xlf/CliCommandStrings.ko.xlf

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

0 commit comments

Comments
 (0)