Skip to content
This repository was archived by the owner on Apr 20, 2023. It is now read-only.

Commit f949fb8

Browse files
author
William Li
committed
Show version guide only when restore fails
1 parent 1043231 commit f949fb8

16 files changed

+136
-42
lines changed

src/dotnet/commands/dotnet-tool/install/LocalizableStrings.resx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ Tool '{1}' (version '{2}') was successfully installed.</value>
161161
<value>The settings file in the tool's NuGet package is invalid: {0}</value>
162162
</data>
163163
<data name="ToolInstallationFailed" xml:space="preserve">
164+
<value>Tool '{0}' failed to install.</value>
165+
</data>
166+
<data name="ToolInstallationFailedWithExplicitVersionGuide" xml:space="preserve">
164167
<value>Tool '{0}' failed to install. You may need to specify the version using
165168

166169
dotnet tool install -g {0} --version &lt;version&gt;</value>
@@ -189,4 +192,4 @@ Tool '{1}' (version '{2}') was successfully installed.</value>
189192
<data name="ToolPathDescription" xml:space="preserve">
190193
<value>Location where the tool will be installed.</value>
191194
</data>
192-
</root>
195+
</root>

src/dotnet/commands/dotnet-tool/install/ToolInstallCommandLowLevelErrorConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static IEnumerable<string> GetUserFacingMessages(Exception ex, PackageId
1818
userFacingMessages = new[]
1919
{
2020
ex.Message,
21-
string.Format(LocalizableStrings.ToolInstallationFailed, packageId),
21+
string.Format(LocalizableStrings.ToolInstallationFailedWithExplicitVersionGuide, packageId),
2222
};
2323
}
2424
else if (ex is ToolConfigurationException)

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.cs.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Nástroj {1} (verze {2}) byl úspěšně nainstalován.</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">Nástroj {0} se nepodařilo nainstalovat.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Nástroj {1} (verze {2}) byl úspěšně nainstalován.</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.de.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Das Tool "{1}" (Version "{2}") wurde erfolgreich installiert.</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">Fehler bei der Installation des Tools "{0}".</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Das Tool "{1}" (Version "{2}") wurde erfolgreich installiert.</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.es.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ La herramienta "{1}" (versión "{2}") se instaló correctamente.</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">No se pudo instalar la herramienta “{0}”.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ La herramienta "{1}" (versión "{2}") se instaló correctamente.</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.fr.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ L'outil '{1}' (version '{2}') a été installé.</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">Impossible d'installer l'outil '{0}'.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ L'outil '{1}' (version '{2}') a été installé.</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.it.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Lo strumento '{1}' (versione '{2}') è stato installato.</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">Non è stato possibile installare lo strumento '{0}'.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Lo strumento '{1}' (versione '{2}') è stato installato.</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ja.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Tool '{1}' (version '{2}') was successfully installed.</source>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">ツール '{0}' をインストールできませんでした。</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Tool '{1}' (version '{2}') was successfully installed.</source>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.ko.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Tool '{1}' (version '{2}') was successfully installed.</source>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">'{0}' 도구를 설치하지 못했습니다.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Tool '{1}' (version '{2}') was successfully installed.</source>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

src/dotnet/commands/dotnet-tool/install/xlf/LocalizableStrings.pl.xlf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,7 @@ Pomyślnie zainstalowano narzędzie „{1}” (wersja: „{2}”).</target>
6060
<note />
6161
</trans-unit>
6262
<trans-unit id="ToolInstallationFailed">
63-
<source>Tool '{0}' failed to install. You may need to specify the version using
64-
65-
dotnet tool install -g {0} --version &lt;version&gt;</source>
63+
<source>Tool '{0}' failed to install.</source>
6664
<target state="needs-review-translation">Zainstalowanie narzędzia „{0}” nie powiodło się.</target>
6765
<note />
6866
</trans-unit>
@@ -121,6 +119,15 @@ Pomyślnie zainstalowano narzędzie „{1}” (wersja: „{2}”).</target>
121119
<target state="new">SOURCE_FEED</target>
122120
<note />
123121
</trans-unit>
122+
<trans-unit id="ToolInstallationFailedWithExplicitVersionGuide">
123+
<source>Tool '{0}' failed to install. You may need to specify the version using
124+
125+
dotnet tool install -g {0} --version &lt;version&gt;</source>
126+
<target state="new">Tool '{0}' failed to install. You may need to specify the version using
127+
128+
dotnet tool install -g {0} --version &lt;version&gt;</target>
129+
<note />
130+
</trans-unit>
124131
</body>
125132
</file>
126133
</xliff>

0 commit comments

Comments
 (0)