Merge pull request #8736 from livarcocc/improve_info

Updating the dotnet --info message.
This commit is contained in:
Livar 2018-03-07 21:27:58 -08:00 committed by GitHub
commit a71450a305
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 142 additions and 8 deletions

View file

@ -241,6 +241,12 @@
<data name="DotNetCommandLineTools" xml:space="preserve">
<value>.NET Command Line Tools</value>
</data>
<data name="DotNetSdkInfoLabel" xml:space="preserve">
<value>.NET Core SDK (reflecting any global.json):</value>
</data>
<data name="DotNetRuntimeInfoLabel" xml:space="preserve">
<value>Runtime Environment:</value>
</data>
<data name="WriteLineForwarderSetPreviously" xml:space="preserve">
<value>WriteLine forwarder set previously</value>
</data>

View file

@ -234,6 +234,16 @@
<target state="translated">Spustitelný soubor příkazu {0} se nenašel. Projekt se nepodařilo obnovit nebo jeho obnovení nebylo úspěšné. Spusťte příkaz dotnet restore.</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">Der für "{0}" auszuführende Befehl wurde nicht gefunden. Das Projekt wurde möglicherweise nicht wiederhergestellt, oder bei der Wiederherstellung ist ein Fehler aufgetreten. Führen Sie "dotnet restore" aus.</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">No se encontró el comando ejecutable para "{0}". Puede que el proyecto no se haya restaurado o que la restauración no haya tenido éxito. Ejecute "dotnet restore"</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">La commande exécutable pour "{0}" est introuvable. Le projet n'a peut-être pas été restauré, ou la restauration n'a pas fonctionné - exécutez 'dotnet restore'</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">L'eseguibile del comando per "{0}" non è stato trovato. È possibile che il progetto non sia stato ripristinato o che il ripristino non sia riuscito. Eseguire `dotnet restore`</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">"{0}" で実行可能なコマンドが見つかりませんでした。プロジェクトが復元されていない可能性があるか、または復元に失敗しました。`dotnet restore` を実行します。</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">"{0}"에 대해 실행 가능한 명령을 찾지 못했습니다. 프로젝트가 복원되지 않았거나 복원이 실패했을 수 있습니다. 'dotnet restore'를 실행하세요.</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">Nie znaleziono pliku wykonywalnego polecenia dla elementu „{0}”. Projekt mógł nie zostać przywrócony lub przywracanie zakończyło się niepowodzeniem — uruchom polecenie „dotnet restore”</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">O comando executável para "{0}" não foi encontrado. O projeto pode não ter sido restaurado ou a restauração falhou execute `dotnet restore`</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">Исполняемый файл команды для "{0}" не найден. Возможно, проект не был восстановлен или его восстановление завершилось сбоем. Запустите команду "dotnet restore".</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">"{0}" için komut yürütülebilir dosyası bulunamadı. Proje geri yüklenmemiş veya geri yükleme başarısız olmuş olabilir - `dotnet restore` çalıştırın</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">找不到可为“{0}”执行的命令。可能未还原项目或还原失败 - 运行 `dotnet restore`</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -234,6 +234,16 @@
<target state="translated">找不到 "{0}" 的命令可執行檔。該專案可能尚未還原或還原失敗 - 請執行 `dotnet restore`</target>
<note />
</trans-unit>
<trans-unit id="DotNetSdkInfoLabel">
<source>.NET Core SDK (reflecting any global.json):</source>
<target state="new">.NET Core SDK (reflecting any global.json):</target>
<note />
</trans-unit>
<trans-unit id="DotNetRuntimeInfoLabel">
<source>Runtime Environment:</source>
<target state="new">Runtime Environment:</target>
<note />
</trans-unit>
</body>
</file>
</xliff>

View file

@ -17,6 +17,7 @@ using Microsoft.Extensions.EnvironmentAbstractions;
using NuGet.Frameworks;
using Command = Microsoft.DotNet.Cli.Utils.Command;
using RuntimeEnvironment = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment;
using LocalizableStrings = Microsoft.DotNet.Cli.Utils.LocalizableStrings;
namespace Microsoft.DotNet.Cli
{
@ -260,16 +261,13 @@ namespace Microsoft.DotNet.Cli
private static void PrintInfo()
{
HelpCommand.PrintVersionHeader();
DotnetVersionFile versionFile = DotnetFiles.VersionFileObject;
var commitSha = versionFile.CommitSha ?? "N/A";
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetSdkInfoLabel}");
Reporter.Output.WriteLine($" Version: {Product.Version}");
Reporter.Output.WriteLine($" Commit: {commitSha}");
Reporter.Output.WriteLine();
Reporter.Output.WriteLine("Product Information:");
Reporter.Output.WriteLine($" Version: {Product.Version}");
Reporter.Output.WriteLine($" Commit SHA-1 hash: {commitSha}");
Reporter.Output.WriteLine();
Reporter.Output.WriteLine("Runtime Environment:");
Reporter.Output.WriteLine($"{LocalizableStrings.DotNetRuntimeInfoLabel}");
Reporter.Output.WriteLine($" OS Name: {RuntimeEnvironment.OperatingSystem}");
Reporter.Output.WriteLine($" OS Version: {RuntimeEnvironment.OperatingSystemVersion}");
Reporter.Output.WriteLine($" OS Platform: {RuntimeEnvironment.OperatingSystemPlatform}");

View file

@ -60,7 +60,7 @@ namespace Microsoft.DotNet.Tests
[Fact]
public void UsingDotnetForTheFirstTimeWithNonVerbsDoesNotPrintEula()
{
string firstTimeNonVerbUseMessage = Cli.Utils.LocalizableStrings.DotNetCommandLineTools;
string firstTimeNonVerbUseMessage = Cli.Utils.LocalizableStrings.DotNetSdkInfoLabel;
_firstDotnetNonVerbUseCommandResult.StdOut
.Should()