Skip to content

Commit b8a9761

Browse files
committed
address code review feedback: remove unused LocalizationResources methods and resources
1 parent 69fb412 commit b8a9761

16 files changed

+1
-405
lines changed

src/System.CommandLine/LocalizationResources.cs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,6 @@ internal static class LocalizationResources
1919
internal static string ExpectsOneArgument(OptionResult optionResult)
2020
=> GetResourceString(Properties.Resources.OptionExpectsOneArgument, GetOptionName(optionResult), optionResult.Tokens.Count);
2121

22-
/// <summary>
23-
/// Interpolates values into a localized string similar to No argument was provided for Command &apos;{0}&apos;..
24-
/// </summary>
25-
internal static string NoArgumentProvided(SymbolResult symbolResult) =>
26-
symbolResult is CommandResult commandResult
27-
? GetResourceString(Properties.Resources.CommandNoArgumentProvided, commandResult.Token.Value)
28-
: GetResourceString(Properties.Resources.OptionNoArgumentProvided, GetOptionName((OptionResult)symbolResult));
29-
30-
/// <summary>
31-
/// Interpolates values into a localized string similar to Command &apos;{0}&apos; expects no more than {1} arguments, but {2} were provided.
32-
/// </summary>
33-
internal static string ExpectsFewerArguments(
34-
Token token,
35-
int providedNumberOfValues,
36-
int maximumNumberOfValues) =>
37-
token.Type == TokenType.Command
38-
? GetResourceString(Properties.Resources.CommandExpectsFewerArguments, token, maximumNumberOfValues, providedNumberOfValues)
39-
: GetResourceString(Properties.Resources.OptionExpectsFewerArguments, token, maximumNumberOfValues, providedNumberOfValues);
40-
4122
/// <summary>
4223
/// Interpolates values into a localized string similar to Directory does not exist: {0}.
4324
/// </summary>

src/System.CommandLine/Properties/Resources.Designer.cs

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

src/System.CommandLine/Properties/Resources.resx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,27 +117,12 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<data name="CommandExpectsFewerArguments" xml:space="preserve">
121-
<value>Command '{0}' expects no more than {1} arguments, but {2} were provided.</value>
122-
</data>
123-
<data name="CommandExpectsOneArgument" xml:space="preserve">
124-
<value>Command '{0}' expects a single argument but {1} were provided.</value>
125-
</data>
126-
<data name="CommandNoArgumentProvided" xml:space="preserve">
127-
<value>No argument was provided for Command '{0}'.</value>
128-
</data>
129120
<data name="DirectoryDoesNotExist" xml:space="preserve">
130121
<value>Directory does not exist: '{0}'.</value>
131122
</data>
132-
<data name="OptionExpectsFewerArguments" xml:space="preserve">
133-
<value>Option '{0}' expects no more than {1} arguments, but {2} were provided.</value>
134-
</data>
135123
<data name="OptionExpectsOneArgument" xml:space="preserve">
136124
<value>Option '{0}' expects a single argument but {1} were provided.</value>
137125
</data>
138-
<data name="OptionNoArgumentProvided" xml:space="preserve">
139-
<value>No argument was provided for Option '{0}'.</value>
140-
</data>
141126
<data name="FileDoesNotExist" xml:space="preserve">
142127
<value>File does not exist: '{0}'.</value>
143128
</data>

src/System.CommandLine/Properties/xlf/Resources.cs.xlf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
<target state="new">Cannot parse argument '{0}' for option '{1}' as expected type '{2}'. Did you mean one of the following?{3}</target>
2828
<note />
2929
</trans-unit>
30-
<trans-unit id="CommandExpectsFewerArguments">
31-
<source>Command '{0}' expects no more than {1} arguments, but {2} were provided.</source>
32-
<target state="translated">Příkaz '{0}' očekává maximálně tento počet argumentů: {1}. Zadal se jich ale tento počet: {2}.</target>
33-
<note />
34-
</trans-unit>
35-
<trans-unit id="CommandExpectsOneArgument">
36-
<source>Command '{0}' expects a single argument but {1} were provided.</source>
37-
<target state="new">Command '{0}' expects a single argument but {1} were provided.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandNoArgumentProvided">
41-
<source>No argument was provided for Command '{0}'.</source>
42-
<target state="new">No argument was provided for Command '{0}'.</target>
43-
<note />
44-
</trans-unit>
4530
<trans-unit id="CommandRequiredArgumentMissing">
4631
<source>Required argument missing for command: '{0}'.</source>
4732
<target state="translated">Chybí povinný argument pro příkaz: '{0}'.</target>
@@ -147,21 +132,11 @@
147132
<target state="translated">Znak se v cestě nepovoluje: '{0}'.</target>
148133
<note />
149134
</trans-unit>
150-
<trans-unit id="OptionExpectsFewerArguments">
151-
<source>Option '{0}' expects no more than {1} arguments, but {2} were provided.</source>
152-
<target state="translated">Možnost '{0}' očekává maximálně tento počet argumentů: {1}. Zadal se jich ale tento počet: {2}.</target>
153-
<note />
154-
</trans-unit>
155135
<trans-unit id="OptionExpectsOneArgument">
156136
<source>Option '{0}' expects a single argument but {1} were provided.</source>
157137
<target state="new">Option '{0}' expects a single argument but {1} were provided.</target>
158138
<note />
159139
</trans-unit>
160-
<trans-unit id="OptionNoArgumentProvided">
161-
<source>No argument was provided for Option '{0}'.</source>
162-
<target state="new">No argument was provided for Option '{0}'.</target>
163-
<note />
164-
</trans-unit>
165140
<trans-unit id="OptionRequiredArgumentMissing">
166141
<source>Required argument missing for option: '{0}'.</source>
167142
<target state="translated">Chybí povinný argument pro možnost: '{0}'.</target>

src/System.CommandLine/Properties/xlf/Resources.de.xlf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
<target state="new">Cannot parse argument '{0}' for option '{1}' as expected type '{2}'. Did you mean one of the following?{3}</target>
2828
<note />
2929
</trans-unit>
30-
<trans-unit id="CommandExpectsFewerArguments">
31-
<source>Command '{0}' expects no more than {1} arguments, but {2} were provided.</source>
32-
<target state="translated">Der Befehl '{0}' erwartet maximal {1} Argumente, es wurden jedoch {2} angegeben.</target>
33-
<note />
34-
</trans-unit>
35-
<trans-unit id="CommandExpectsOneArgument">
36-
<source>Command '{0}' expects a single argument but {1} were provided.</source>
37-
<target state="new">Command '{0}' expects a single argument but {1} were provided.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandNoArgumentProvided">
41-
<source>No argument was provided for Command '{0}'.</source>
42-
<target state="new">No argument was provided for Command '{0}'.</target>
43-
<note />
44-
</trans-unit>
4530
<trans-unit id="CommandRequiredArgumentMissing">
4631
<source>Required argument missing for command: '{0}'.</source>
4732
<target state="translated">Ein erforderliches Argument fehlt für den Befehl: '{0}'.</target>
@@ -147,21 +132,11 @@
147132
<target state="translated">Zeichen in Pfad nicht zulässig: '{0}'.</target>
148133
<note />
149134
</trans-unit>
150-
<trans-unit id="OptionExpectsFewerArguments">
151-
<source>Option '{0}' expects no more than {1} arguments, but {2} were provided.</source>
152-
<target state="translated">Die Option '{0}' erwartet maximal {1} Argumente, es wurden jedoch {2} angegeben.</target>
153-
<note />
154-
</trans-unit>
155135
<trans-unit id="OptionExpectsOneArgument">
156136
<source>Option '{0}' expects a single argument but {1} were provided.</source>
157137
<target state="new">Option '{0}' expects a single argument but {1} were provided.</target>
158138
<note />
159139
</trans-unit>
160-
<trans-unit id="OptionNoArgumentProvided">
161-
<source>No argument was provided for Option '{0}'.</source>
162-
<target state="new">No argument was provided for Option '{0}'.</target>
163-
<note />
164-
</trans-unit>
165140
<trans-unit id="OptionRequiredArgumentMissing">
166141
<source>Required argument missing for option: '{0}'.</source>
167142
<target state="translated">Ein erforderliches Argument fehlt für die Option: '{0}'.</target>

src/System.CommandLine/Properties/xlf/Resources.es.xlf

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
<target state="new">Cannot parse argument '{0}' for option '{1}' as expected type '{2}'. Did you mean one of the following?{3}</target>
2828
<note />
2929
</trans-unit>
30-
<trans-unit id="CommandExpectsFewerArguments">
31-
<source>Command '{0}' expects no more than {1} arguments, but {2} were provided.</source>
32-
<target state="translated">El comando '{0}' no espera más de {1} argumentos, pero se proporcionaron {2}.</target>
33-
<note></note>
34-
</trans-unit>
35-
<trans-unit id="CommandExpectsOneArgument">
36-
<source>Command '{0}' expects a single argument but {1} were provided.</source>
37-
<target state="translated">El comando '{0}' espera un solo argumento, pero se proporcionaron {1}.</target>
38-
<note></note>
39-
</trans-unit>
40-
<trans-unit id="CommandNoArgumentProvided">
41-
<source>No argument was provided for Command '{0}'.</source>
42-
<target state="translated">No se proporcionó ningún argumento para el comando '{0}'.</target>
43-
<note></note>
44-
</trans-unit>
4530
<trans-unit id="CommandRequiredArgumentMissing">
4631
<source>Required argument missing for command: '{0}'.</source>
4732
<target state="translated">Falta el argumento requerido para el comando: '{0}'.</target>
@@ -147,21 +132,11 @@
147132
<target state="translated">Carácter no permitido en una ruta: '{0}'.</target>
148133
<note></note>
149134
</trans-unit>
150-
<trans-unit id="OptionExpectsFewerArguments">
151-
<source>Option '{0}' expects no more than {1} arguments, but {2} were provided.</source>
152-
<target state="translated">La opción '{0}' no espera más de {1} argumentos, pero se proporcionaron {2}.</target>
153-
<note></note>
154-
</trans-unit>
155135
<trans-unit id="OptionExpectsOneArgument">
156136
<source>Option '{0}' expects a single argument but {1} were provided.</source>
157137
<target state="translated">La opción '{0}' espera un solo argumento, pero se proporcionaron {1}.</target>
158138
<note></note>
159139
</trans-unit>
160-
<trans-unit id="OptionNoArgumentProvided">
161-
<source>No argument was provided for Option '{0}'.</source>
162-
<target state="translated">No se proporcionó ningún argumento para la opción '{0}'.</target>
163-
<note></note>
164-
</trans-unit>
165140
<trans-unit id="OptionRequiredArgumentMissing">
166141
<source>Required argument missing for option: '{0}'.</source>
167142
<target state="translated">Falta el argumento requerido para la opción: '{0}'.</target>
@@ -209,4 +184,4 @@
209184
</trans-unit>
210185
</body>
211186
</file>
212-
</xliff>
187+
</xliff>

src/System.CommandLine/Properties/xlf/Resources.fr.xlf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
<target state="new">Cannot parse argument '{0}' for option '{1}' as expected type '{2}'. Did you mean one of the following?{3}</target>
2828
<note />
2929
</trans-unit>
30-
<trans-unit id="CommandExpectsFewerArguments">
31-
<source>Command '{0}' expects no more than {1} arguments, but {2} were provided.</source>
32-
<target state="translated">La commande '{0}' n'attend pas plus de {1} arguments, mais {2} ont été fournis.</target>
33-
<note />
34-
</trans-unit>
35-
<trans-unit id="CommandExpectsOneArgument">
36-
<source>Command '{0}' expects a single argument but {1} were provided.</source>
37-
<target state="new">Command '{0}' expects a single argument but {1} were provided.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandNoArgumentProvided">
41-
<source>No argument was provided for Command '{0}'.</source>
42-
<target state="new">No argument was provided for Command '{0}'.</target>
43-
<note />
44-
</trans-unit>
4530
<trans-unit id="CommandRequiredArgumentMissing">
4631
<source>Required argument missing for command: '{0}'.</source>
4732
<target state="translated">Argument obligatoire manquant pour la commande : '{0}'.</target>
@@ -147,21 +132,11 @@
147132
<target state="translated">Caractère non autorisé dans un chemin : '{0}'.</target>
148133
<note />
149134
</trans-unit>
150-
<trans-unit id="OptionExpectsFewerArguments">
151-
<source>Option '{0}' expects no more than {1} arguments, but {2} were provided.</source>
152-
<target state="translated">L'option '{0}' n'attend pas plus de {1} arguments, mais {2} ont été fournis.</target>
153-
<note />
154-
</trans-unit>
155135
<trans-unit id="OptionExpectsOneArgument">
156136
<source>Option '{0}' expects a single argument but {1} were provided.</source>
157137
<target state="new">Option '{0}' expects a single argument but {1} were provided.</target>
158138
<note />
159139
</trans-unit>
160-
<trans-unit id="OptionNoArgumentProvided">
161-
<source>No argument was provided for Option '{0}'.</source>
162-
<target state="new">No argument was provided for Option '{0}'.</target>
163-
<note />
164-
</trans-unit>
165140
<trans-unit id="OptionRequiredArgumentMissing">
166141
<source>Required argument missing for option: '{0}'.</source>
167142
<target state="translated">Argument obligatoire manquant pour l'option : '{0}'.</target>

src/System.CommandLine/Properties/xlf/Resources.it.xlf

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,6 @@
2727
<target state="new">Cannot parse argument '{0}' for option '{1}' as expected type '{2}'. Did you mean one of the following?{3}</target>
2828
<note />
2929
</trans-unit>
30-
<trans-unit id="CommandExpectsFewerArguments">
31-
<source>Command '{0}' expects no more than {1} arguments, but {2} were provided.</source>
32-
<target state="translated">Il comando '{0}' prevede non più di {1} argomenti, ma ne sono stati forniti {2}.</target>
33-
<note />
34-
</trans-unit>
35-
<trans-unit id="CommandExpectsOneArgument">
36-
<source>Command '{0}' expects a single argument but {1} were provided.</source>
37-
<target state="new">Command '{0}' expects a single argument but {1} were provided.</target>
38-
<note />
39-
</trans-unit>
40-
<trans-unit id="CommandNoArgumentProvided">
41-
<source>No argument was provided for Command '{0}'.</source>
42-
<target state="new">No argument was provided for Command '{0}'.</target>
43-
<note />
44-
</trans-unit>
4530
<trans-unit id="CommandRequiredArgumentMissing">
4631
<source>Required argument missing for command: '{0}'.</source>
4732
<target state="translated">Manca l'argomento obbligatorio per il comando: '{0}'.</target>
@@ -147,21 +132,11 @@
147132
<target state="translated">Il carattere non è consentito in un percorso: '{0}'.</target>
148133
<note />
149134
</trans-unit>
150-
<trans-unit id="OptionExpectsFewerArguments">
151-
<source>Option '{0}' expects no more than {1} arguments, but {2} were provided.</source>
152-
<target state="translated">L'opzione '{0}' prevede non più di {1} argomenti, ma ne sono stati forniti {2}.</target>
153-
<note />
154-
</trans-unit>
155135
<trans-unit id="OptionExpectsOneArgument">
156136
<source>Option '{0}' expects a single argument but {1} were provided.</source>
157137
<target state="new">Option '{0}' expects a single argument but {1} were provided.</target>
158138
<note />
159139
</trans-unit>
160-
<trans-unit id="OptionNoArgumentProvided">
161-
<source>No argument was provided for Option '{0}'.</source>
162-
<target state="new">No argument was provided for Option '{0}'.</target>
163-
<note />
164-
</trans-unit>
165140
<trans-unit id="OptionRequiredArgumentMissing">
166141
<source>Required argument missing for option: '{0}'.</source>
167142
<target state="translated">Manca l'argomento obbligatorio per l'opzione: '{0}'.</target>

0 commit comments

Comments
 (0)