Merge pull request #7201 from dotnet/merges/release/2.0.0-to-master-20170720-070024
Merge release/2.0.0 to master
This commit is contained in:
commit
58c580dbcc
26 changed files with 470 additions and 18 deletions
|
@ -22,15 +22,15 @@
|
|||
<SharedFrameworkVersion>$(CLI_SharedFrameworkVersion)</SharedFrameworkVersion>
|
||||
<SharedHostVersion>$(CLI_SharedFrameworkVersion)</SharedHostVersion>
|
||||
<HostFxrVersion>$(CLI_SharedFrameworkVersion)</HostFxrVersion>
|
||||
<TemplateEngineVersion>1.0.0-beta2-20170714-287</TemplateEngineVersion>
|
||||
<TemplateEngineTemplateVersion>1.0.0-beta2-20170717-288</TemplateEngineTemplateVersion>
|
||||
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170717-288</TemplateEngineTemplate2_0Version>
|
||||
<TemplateEngineVersion>1.0.0-beta2-20170719-291</TemplateEngineVersion>
|
||||
<TemplateEngineTemplateVersion>1.0.0-beta2-20170719-291</TemplateEngineTemplateVersion>
|
||||
<TemplateEngineTemplate2_0Version>1.0.0-beta2-20170719-291</TemplateEngineTemplate2_0Version>
|
||||
<PlatformAbstractionsVersion>2.0.0-preview3-25518-01</PlatformAbstractionsVersion>
|
||||
<DependencyModelVersion>2.0.0-preview3-25518-01</DependencyModelVersion>
|
||||
<CliCommandLineParserVersion>0.1.1-alpha-167</CliCommandLineParserVersion>
|
||||
<CliMigrateVersion>1.2.1-alpha-002133</CliMigrateVersion>
|
||||
<MicroBuildVersion>0.2.0</MicroBuildVersion>
|
||||
<SpaTemplateVersion>1.0.0-preview-000403</SpaTemplateVersion>
|
||||
<SpaTemplateVersion>1.0.0-preview-000409</SpaTemplateVersion>
|
||||
<XliffTasksVersion>0.2.0-beta-000042</XliffTasksVersion>
|
||||
|
||||
<!-- This should either be timestamped or notimestamp as appropriate -->
|
||||
|
@ -39,7 +39,7 @@
|
|||
<AspNetCoreBranchName>2.0.0</AspNetCoreBranchName>
|
||||
<AspNetCoreRelease>rtm</AspNetCoreRelease>
|
||||
<AspNetCoreVersion>2.0.0</AspNetCoreVersion>
|
||||
<AspNetCoreRuntimePackageTimestamp>26343</AspNetCoreRuntimePackageTimestamp>
|
||||
<AspNetCoreRuntimePackageTimestamp>26380</AspNetCoreRuntimePackageTimestamp>
|
||||
|
||||
<AspNetCoreRuntimePackageBrandName>aspnetcore-store</AspNetCoreRuntimePackageBrandName>
|
||||
<AspNetCoreVersionAndRelease>$(AspNetCoreVersion)-$(AspNetCoreRelease)</AspNetCoreVersionAndRelease>
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
private IEnumerable<string> _environmentVariablesToKeep = new string []
|
||||
{
|
||||
"DOTNET_CLI_TELEMETRY_SESSIONID",
|
||||
"DOTNET_CLI_UI_LANGUAGE",
|
||||
"DOTNET_MULTILEVEL_LOOKUP",
|
||||
"DOTNET_RUNTIME_ID",
|
||||
"DOTNET_SKIP_FIRST_TIME_EXPERIENCE",
|
||||
|
|
|
@ -98,7 +98,7 @@ namespace Microsoft.DotNet.Archive
|
|||
}
|
||||
|
||||
long compressedSize = inStream.Length - inStream.Position;
|
||||
var lzmaProgress = new LzmaProgress(progress, "Decompressing", outSize, MeasureBy.Output);
|
||||
var lzmaProgress = new LzmaProgress(progress, LocalizableStrings.Decompressing, outSize, MeasureBy.Output);
|
||||
lzmaProgress.SetProgress(0, 0);
|
||||
decoder.Code(inStream, outStream, compressedSize, outSize, lzmaProgress);
|
||||
lzmaProgress.SetProgress(inStream.Length, outSize);
|
||||
|
|
|
@ -380,7 +380,7 @@ namespace Microsoft.DotNet.Archive
|
|||
extractOperations.AsParallel().ForAll(extractOperation =>
|
||||
{
|
||||
extractOperation.DoOperation();
|
||||
progress.Report("Expanding", Interlocked.Increment(ref opsExecuted), extractOperations.Count);
|
||||
progress.Report(LocalizableStrings.Expanding, Interlocked.Increment(ref opsExecuted), extractOperations.Count);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
126
src/Microsoft.DotNet.Archive/LocalizableStrings.resx
Normal file
126
src/Microsoft.DotNet.Archive/LocalizableStrings.resx
Normal file
|
@ -0,0 +1,126 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="Expanding" xml:space="preserve">
|
||||
<value>Expanding</value>
|
||||
</data>
|
||||
<data name="Decompressing" xml:space="preserve">
|
||||
<value>Decompressing</value>
|
||||
</data>
|
||||
</root>
|
|
@ -10,8 +10,13 @@
|
|||
<PublicSign Condition=" '$(OS)' != 'Windows_NT' ">true</PublicSign>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="**\*.resx" GenerateSource="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<PackageReference Include="System.Linq.Parallel" Version="4.0.1" />
|
||||
<PackageReference Include="XliffTasks" Version="$(XliffTasksVersion)" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</Project>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.cs.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="cs" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.de.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.es.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="es" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.fr.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="fr" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.it.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="it" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ja.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ja" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ko.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ko" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.pl.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="pl" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.ru.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="ru" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf
Normal file
17
src/Microsoft.DotNet.Archive/xlf/LocalizableStrings.tr.xlf
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="zh-Hans" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
|
||||
<file datatype="xml" source-language="en" target-language="zh-Hant" original="../LocalizableStrings.resx">
|
||||
<body>
|
||||
<trans-unit id="Expanding">
|
||||
<source>Expanding</source>
|
||||
<target state="new">Expanding</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
<trans-unit id="Decompressing">
|
||||
<source>Decompressing</source>
|
||||
<target state="new">Decompressing</target>
|
||||
<note />
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
|
@ -7,7 +7,7 @@ namespace Microsoft.DotNet.Cli.Utils
|
|||
{
|
||||
public class Product
|
||||
{
|
||||
public static readonly string LongName = LocalizableStrings.DotNetCommandLineTools;
|
||||
public static string LongName => LocalizableStrings.DotNetCommandLineTools;
|
||||
public static readonly string Version = GetProductVersion();
|
||||
|
||||
private static string GetProductVersion()
|
||||
|
|
|
@ -198,6 +198,8 @@ namespace Microsoft.DotNet.Cli
|
|||
// by default, .NET Core doesn't have all code pages needed for Console apps.
|
||||
// see the .NET Core Notes in https://msdn.microsoft.com/en-us/library/system.diagnostics.process(v=vs.110).aspx
|
||||
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||
|
||||
UILanguageOverride.Setup();
|
||||
}
|
||||
|
||||
internal static bool TryGetBuiltInCommand(string commandName, out BuiltInCommandMetadata builtInCommand)
|
||||
|
|
81
src/dotnet/UILanguageOverride.cs
Normal file
81
src/dotnet/UILanguageOverride.cs
Normal file
|
@ -0,0 +1,81 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Microsoft.DotNet.Cli
|
||||
{
|
||||
internal static class UILanguageOverride
|
||||
{
|
||||
private const string DOTNET_CLI_UI_LANGUAGE = nameof(DOTNET_CLI_UI_LANGUAGE);
|
||||
private const string VSLANG = nameof(VSLANG);
|
||||
private const string PreferredUILang = nameof(PreferredUILang);
|
||||
|
||||
public static void Setup()
|
||||
{
|
||||
CultureInfo language = GetOverriddenUILanguage();
|
||||
if (language != null)
|
||||
{
|
||||
ApplyOverrideToCurrentProcess(language);
|
||||
FlowOverrideToChildProcesses(language);
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplyOverrideToCurrentProcess(CultureInfo language)
|
||||
{
|
||||
CultureInfo.DefaultThreadCurrentUICulture = language;
|
||||
}
|
||||
|
||||
private static void FlowOverrideToChildProcesses(CultureInfo language)
|
||||
{
|
||||
// Do not override any environment variables that are already set as we do not want to clobber a more granular setting with our global setting.
|
||||
SetIfNotAlreadySet(DOTNET_CLI_UI_LANGUAGE, language.Name);
|
||||
SetIfNotAlreadySet(VSLANG, language.LCID); // for tools following VS guidelines to just work in CLI
|
||||
SetIfNotAlreadySet(PreferredUILang, language.Name); // for C#/VB targets that pass $(PreferredUILang) to compiler
|
||||
}
|
||||
|
||||
private static CultureInfo GetOverriddenUILanguage()
|
||||
{
|
||||
// DOTNET_CLI_UI_LANGUAGE=<culture name> is the main way for users to customize the CLI's UI language.
|
||||
string dotnetCliLanguage = Environment.GetEnvironmentVariable(DOTNET_CLI_UI_LANGUAGE);
|
||||
if (dotnetCliLanguage != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
return new CultureInfo(dotnetCliLanguage);
|
||||
}
|
||||
catch (CultureNotFoundException) { }
|
||||
}
|
||||
|
||||
// VSLANG=<lcid> is set by VS and we respect that as well so that we will respect the VS
|
||||
// language preference if we're invoked by VS.
|
||||
string vsLang = Environment.GetEnvironmentVariable(VSLANG);
|
||||
if (vsLang != null && int.TryParse(vsLang, out int vsLcid))
|
||||
{
|
||||
try
|
||||
{
|
||||
return new CultureInfo(vsLcid);
|
||||
}
|
||||
catch (ArgumentOutOfRangeException) { }
|
||||
catch (CultureNotFoundException) { }
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static void SetIfNotAlreadySet(string environmentVariableName, string value)
|
||||
{
|
||||
string currentValue = Environment.GetEnvironmentVariable(environmentVariableName);
|
||||
if (currentValue == null)
|
||||
{
|
||||
Environment.SetEnvironmentVariable(environmentVariableName, value);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetIfNotAlreadySet(string environmentVariableName, int value)
|
||||
{
|
||||
SetIfNotAlreadySet(environmentVariableName, value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
@ -23,6 +24,15 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
private TempRoot _temp;
|
||||
private static TestAssets s_testAssets;
|
||||
|
||||
static TestBase()
|
||||
{
|
||||
// set culture of test process to match CLI sub-processes when the UI language is overriden.
|
||||
string overriddenUILanguage = Environment.GetEnvironmentVariable("DOTNET_CLI_UI_LANGUAGE");
|
||||
if (overriddenUILanguage != null)
|
||||
{
|
||||
CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(overriddenUILanguage);
|
||||
}
|
||||
}
|
||||
|
||||
protected static string RepoRoot
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@ using Xunit;
|
|||
|
||||
namespace Microsoft.DotNet.New.Tests
|
||||
{
|
||||
public class NewCommandTests
|
||||
public class NewCommandTests : TestBase
|
||||
{
|
||||
[Fact]
|
||||
public void WhenSwitchIsSkippedThenItPrintsError()
|
||||
|
@ -16,7 +16,10 @@ namespace Microsoft.DotNet.New.Tests
|
|||
|
||||
cmd.ExitCode.Should().NotBe(0);
|
||||
|
||||
cmd.StdErr.Should().StartWith("No templates matched the input template name: Web1.1.");
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
cmd.StdErr.Should().StartWith("No templates matched the input template name: Web1.1.");
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -26,7 +29,10 @@ namespace Microsoft.DotNet.New.Tests
|
|||
|
||||
cmd.ExitCode.Should().NotBe(0);
|
||||
|
||||
cmd.StdErr.Should().StartWith("Unable to determine the desired template from the input template name: c.");
|
||||
if (!DotnetUnderTest.IsLocalized())
|
||||
{
|
||||
cmd.StdErr.Should().StartWith("Unable to determine the desired template from the input template name: c.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ using Microsoft.DotNet.TestFramework;
|
|||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using Xunit;
|
||||
|
||||
using LocalizableStrings = Microsoft.DotNet.Tools.Run.LocalizableStrings;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Run.Tests
|
||||
{
|
||||
public class GivenDotnetRunBuildsCsproj : TestBase
|
||||
|
@ -280,7 +282,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
.ExecuteWithCapturedOutput("--launch-profile test")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("Hello World!")
|
||||
.And.HaveStdErrContaining("The specified launch profile could not be located.");
|
||||
.And.HaveStdErrContaining(LocalizableStrings.RunCommandExceptionCouldNotLocateALaunchSettingsFile);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -368,7 +370,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
.ExecuteWithCapturedOutput("--launch-profile Third")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("(NO MESSAGE)")
|
||||
.And.HaveStdErrContaining("The launch profile \"Third\" could not be applied.");
|
||||
.And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, "Third", "").Trim());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -396,7 +398,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
.ExecuteWithCapturedOutput("--launch-profile \"IIS Express\"")
|
||||
.Should().Pass()
|
||||
.And.HaveStdOutContaining("(NO MESSAGE)")
|
||||
.And.HaveStdErrContaining("The launch profile \"IIS Express\" could not be applied.");
|
||||
.And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, "IIS Express", "").Trim());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -485,7 +487,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
cmd.Should().Pass()
|
||||
.And.HaveStdOutContaining("(NO MESSAGE)")
|
||||
.And.HaveStdErrContaining("The launch profile \"(Default)\" could not be applied.");
|
||||
.And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, LocalizableStrings.DefaultLaunchProfileDisplayName, "").Trim());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
@ -514,7 +516,7 @@ namespace Microsoft.DotNet.Cli.Run.Tests
|
|||
|
||||
cmd.Should().Pass()
|
||||
.And.HaveStdOutContaining("(NO MESSAGE)")
|
||||
.And.HaveStdErrContaining("The launch profile \"(Default)\" could not be applied.");
|
||||
.And.HaveStdErrContaining(string.Format(LocalizableStrings.RunCommandExceptionCouldNotApplyLaunchSettings, LocalizableStrings.DefaultLaunchProfileDisplayName, "").Trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,6 @@ namespace Microsoft.DotNet.Tests.ParserTests
|
|||
{
|
||||
public class ValidationMessageTests
|
||||
{
|
||||
private readonly ITestOutputHelper output;
|
||||
|
||||
[Fact]
|
||||
public void ValidationMessagesFormatCorrectly()
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue