Skip to content

Commit 01a0dde

Browse files
[Localization] Import translated resx files (#189)
The xamarin-android-tools repo has been fully onboarded into the OneLoc system, and the translations for Microsoft.Android.Build.BaseTasks and Xamarin.Android.Tools.AndroidSdk are now complete. XLF files and the XliffTasks NuGet will no longer be used. They have been replaced by the OneLocBuild translation process which produces translated RESX files. Future changes to the `Resources.resx` files in this repo will trigger a new OneLocBuild handoff for translation. Shortly after that, the LCL files in the Localize folder will be automatically updated with newly translated strings. This update will cause the OneLocBuild task to open another PR which updates the RESX files used to produce localized satellite assemblies. ----- This is the pull request automatically created by the OneLocBuild task in the build process to check-in localized files generated based upon translation source files (.lcl files) handed-back from the downstream localization pipeline. If there are issues in translations, visit https://aka.ms/ceLocBug and log bugs for fixes. The OneLocBuild wiki is https://aka.ms/onelocbuild and the localization process in general is documented at https://aka.ms/AllAboutLoc. Co-authored-by: Peter Collins <[email protected]>
1 parent cc715d9 commit 01a0dde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+3201
-519
lines changed
Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,26 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<Import Project="MSBuildReferences.projitems" />
4-
<Import Project="..\tools\BuildTasks.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
54

65
<PropertyGroup>
76
<TargetFrameworks>netstandard2.0;netcoreapp3.1</TargetFrameworks>
87
<RootNamespace>Microsoft.Android.Build.Tasks</RootNamespace>
98
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
10-
<GenerateResxSource>true</GenerateResxSource>
11-
<UpdateXlfOnBuild Condition=" '$(RunningOnCI)' != 'true' ">true</UpdateXlfOnBuild>
129
<SignAssembly>true</SignAssembly>
1310
<AssemblyOriginatorKeyFile>..\..\product.snk</AssemblyOriginatorKeyFile>
1411
<AssemblyName>$(VendorPrefix)Microsoft.Android.Build.BaseTasks$(VendorSuffix)</AssemblyName>
1512
</PropertyGroup>
1613

1714
<ItemGroup>
18-
<PackageReference Include="XliffTasks" Version="1.0.0-beta.20615.1" PrivateAssets="all" />
15+
<Compile Update="Properties\Resources.Designer.cs">
16+
<DesignTime>True</DesignTime>
17+
<AutoGen>True</AutoGen>
18+
<DependentUpon>Resources.resx</DependentUpon>
19+
</Compile>
20+
<EmbeddedResource Update="Properties\Resources.resx">
21+
<Generator>ResXFileCodeGenerator</Generator>
22+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
23+
</EmbeddedResource>
1924
</ItemGroup>
2025

21-
<Import Project="..\tools\GenerateResxSource.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
22-
2326
</Project>

src/Microsoft.Android.Build.BaseTasks/Properties/Resources.Designer.cs

Lines changed: 72 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 1.3
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">1.3</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1">this is my long string</data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
[base64 mime encoded serialized .NET Framework object]
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
[base64 mime encoded string representing a byte array form of the .NET Framework object]
27+
</data>
28+
29+
There are any number of "resheader" rows that contain simple
30+
name/value pairs.
31+
32+
Each data row contains a name, and value. The row also contains a
33+
type or mimetype. Type corresponds to a .NET class that support
34+
text/value conversion through the TypeConverter architecture.
35+
Classes that don't support this are serialized and stored with the
36+
mimetype set.
37+
38+
The mimetype is used for serialized objects, and tells the
39+
ResXResourceReader how to depersist the object. This is currently not
40+
extensible. For a given mimetype the value must be set accordingly:
41+
42+
Note - application/x-microsoft.net.object.binary.base64 is the format
43+
that the ResXResourceWriter will generate, however the reader can
44+
read any of the formats listed below.
45+
46+
mimetype: application/x-microsoft.net.object.binary.base64
47+
value : The object must be serialized with
48+
: System.Serialization.Formatters.Binary.BinaryFormatter
49+
: and then encoded with base64 encoding.
50+
51+
mimetype: application/x-microsoft.net.object.soap.base64
52+
value : The object must be serialized with
53+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
54+
: and then encoded with base64 encoding.
55+
56+
mimetype: application/x-microsoft.net.object.bytearray.base64
57+
value : The object must be serialized into a byte array
58+
: using a System.ComponentModel.TypeConverter
59+
: and then encoded with base64 encoding.
60+
-->
61+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:element name="root" msdata:IsDataSet="true">
63+
<xsd:complexType>
64+
<xsd:choice maxOccurs="unbounded">
65+
<xsd:element name="data">
66+
<xsd:complexType>
67+
<xsd:sequence>
68+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
69+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
70+
</xsd:sequence>
71+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
72+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
73+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
74+
</xsd:complexType>
75+
</xsd:element>
76+
<xsd:element name="resheader">
77+
<xsd:complexType>
78+
<xsd:sequence>
79+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
80+
</xsd:sequence>
81+
<xsd:attribute name="name" type="xsd:string" use="required" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
</xsd:choice>
85+
</xsd:complexType>
86+
</xsd:element>
87+
</xsd:schema>
88+
<resheader name="resmimetype">
89+
<value>text/microsoft-resx</value>
90+
</resheader>
91+
<resheader name="version">
92+
<value>1.3</value>
93+
</resheader>
94+
<resheader name="reader">
95+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
96+
</resheader>
97+
<resheader name="writer">
98+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
99+
</resheader>
100+
<data name="XA0000_Exception" xml:space="preserve">
101+
<value>Neošetřená výjimka: {0}</value>
102+
<comment>{0} - The exception message of the associated exception</comment>
103+
</data>
104+
</root>
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 1.3
7+
8+
The primary goals of this format is to allow a simple XML format
9+
that is mostly human readable. The generation and parsing of the
10+
various data types are done through the TypeConverter classes
11+
associated with the data types.
12+
13+
Example:
14+
15+
... ado.net/XML headers & schema ...
16+
<resheader name="resmimetype">text/microsoft-resx</resheader>
17+
<resheader name="version">1.3</resheader>
18+
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19+
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20+
<data name="Name1">this is my long string</data>
21+
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22+
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23+
[base64 mime encoded serialized .NET Framework object]
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
[base64 mime encoded string representing a byte array form of the .NET Framework object]
27+
</data>
28+
29+
There are any number of "resheader" rows that contain simple
30+
name/value pairs.
31+
32+
Each data row contains a name, and value. The row also contains a
33+
type or mimetype. Type corresponds to a .NET class that support
34+
text/value conversion through the TypeConverter architecture.
35+
Classes that don't support this are serialized and stored with the
36+
mimetype set.
37+
38+
The mimetype is used for serialized objects, and tells the
39+
ResXResourceReader how to depersist the object. This is currently not
40+
extensible. For a given mimetype the value must be set accordingly:
41+
42+
Note - application/x-microsoft.net.object.binary.base64 is the format
43+
that the ResXResourceWriter will generate, however the reader can
44+
read any of the formats listed below.
45+
46+
mimetype: application/x-microsoft.net.object.binary.base64
47+
value : The object must be serialized with
48+
: System.Serialization.Formatters.Binary.BinaryFormatter
49+
: and then encoded with base64 encoding.
50+
51+
mimetype: application/x-microsoft.net.object.soap.base64
52+
value : The object must be serialized with
53+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
54+
: and then encoded with base64 encoding.
55+
56+
mimetype: application/x-microsoft.net.object.bytearray.base64
57+
value : The object must be serialized into a byte array
58+
: using a System.ComponentModel.TypeConverter
59+
: and then encoded with base64 encoding.
60+
-->
61+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
62+
<xsd:element name="root" msdata:IsDataSet="true">
63+
<xsd:complexType>
64+
<xsd:choice maxOccurs="unbounded">
65+
<xsd:element name="data">
66+
<xsd:complexType>
67+
<xsd:sequence>
68+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
69+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
70+
</xsd:sequence>
71+
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
72+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
73+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
74+
</xsd:complexType>
75+
</xsd:element>
76+
<xsd:element name="resheader">
77+
<xsd:complexType>
78+
<xsd:sequence>
79+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
80+
</xsd:sequence>
81+
<xsd:attribute name="name" type="xsd:string" use="required" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
</xsd:choice>
85+
</xsd:complexType>
86+
</xsd:element>
87+
</xsd:schema>
88+
<resheader name="resmimetype">
89+
<value>text/microsoft-resx</value>
90+
</resheader>
91+
<resheader name="version">
92+
<value>1.3</value>
93+
</resheader>
94+
<resheader name="reader">
95+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
96+
</resheader>
97+
<resheader name="writer">
98+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
99+
</resheader>
100+
<data name="XA0000_Exception" xml:space="preserve">
101+
<value>Ausnahmefehler: {0}</value>
102+
<comment>{0} - The exception message of the associated exception</comment>
103+
</data>
104+
</root>

0 commit comments

Comments
 (0)