Skip to content

Commit caf6f3c

Browse files
[Localization] Import translated resx files (#7190)
The xamarin-android repo has been fully onboarded into the OneLoc system, and the translations for Microsoft.Android.Sdk.ILLink and Xamarin.Android.Build.Tasks 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 <pecolli@microsoft.com>
1 parent b6c22f3 commit caf6f3c

Some content is hidden

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

60 files changed

+14630
-12399
lines changed

Configuration.props

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,6 @@
237237
<RemapAssemblyRefTool>$(ManagedRuntime) $(ManagedRuntimeArgs) &quot;$(RemapAssemblyRefToolExecutable)&quot;</RemapAssemblyRefTool>
238238
</PropertyGroup>
239239

240-
<PropertyGroup>
241-
<XlfLanguages>cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant</XlfLanguages>
242-
<UpdateXlfOnBuild Condition="'$(RunningOnCI)' != 'true'">true</UpdateXlfOnBuild>
243-
</PropertyGroup>
244-
245240
<!-- Unit Test Properties -->
246241
<PropertyGroup>
247242
<!-- When changing the version below, please also update the 'build-tools/scripts/nunit3-console*' scripts -->

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
<LZ4PackageVersion>1.1.11</LZ4PackageVersion>
5151
<MonoOptionsVersion>6.12.0.148</MonoOptionsVersion>
5252
<SystemCollectionsImmutableVersion>1.7.1</SystemCollectionsImmutableVersion>
53-
<XliffTasksVersion>1.0.0-beta.20420.1</XliffTasksVersion>
5453
<ELFSharpVersion>2.13.1</ELFSharpVersion>
5554
<MdocPackageVersion Condition=" '$(MdocPackageVersion)' == '' ">5.8.9.2</MdocPackageVersion>
5655
</PropertyGroup>

Documentation/workflow/Localization.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,11 @@ so when adding a new message, follow these steps:
3333
```
3434

3535
4. After adding the new message, build `Xamarin.Android.Build.Tasks.csproj`
36-
locally. This will run the targets from [dotnet/xliff-tasks][xliff-tasks]
37-
to update the `.xlf` [XLIFF][xliff] localization files with the latest
38-
changes from the `.resx` file.
36+
locally.
3937

40-
5. Include the changes to the`.resx` file as well as the generated changes to
41-
the `.xlf` files in the commit.
38+
5. Include the changes to the`.resx` file in the commit.
39+
40+
6. The [OneLocBuild][oneloc] task will manage handoff and handback for string translations.
4241

4342
## Guidelines
4443

@@ -79,5 +78,4 @@ so when adding a new message, follow these steps:
7978
https://github.com/dotnet/sdk/blob/master/src/Tasks/Common/Resources/Strings.resx
8079
8180
[resources-editor]: ../images/resources-editor-xa0000.png
82-
[xliff-tasks]: https://github.com/dotnet/xliff-tasks
83-
[xliff]: http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html
81+
[oneloc]: https://aka.ms/onelocbuild
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<ItemGroup>
3-
<_LocalizationLanguages Include="$(XlfLanguages)" />
3+
<_LocalizationLanguages Include="cs;de;es;fr;it;ja;ko;pl;pt-BR;ru;tr;zh-Hans;zh-Hant" />
44
</ItemGroup>
55
</Project>

src/Microsoft.Android.Sdk.ILLink/Microsoft.Android.Sdk.ILLink.csproj

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\Configuration.props" />
3-
<Import Project="..\tools\BuildTasks.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
43
<PropertyGroup>
54
<TargetFramework>$(DotNetTargetFramework)</TargetFramework>
65
<DefineConstants>ILLINK</DefineConstants>
76
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
87
<OutputPath>$(MicrosoftAndroidSdkOutDir)</OutputPath>
9-
<GenerateResxSource>true</GenerateResxSource>
108
</PropertyGroup>
119
<ItemGroup>
1210
<PackageReference Include="Microsoft.NET.ILLink" Version="$(MicrosoftNETILLinkTasksPackageVersion)" />
13-
<PackageReference Include="XliffTasks" Version="$(XliffTasksVersion)" PrivateAssets="all" />
1411
<ProjectReference Include="..\..\external\Java.Interop\src\Java.Interop.Export\Java.Interop.Export.csproj" />
1512
<ProjectReference Include="..\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj" ReferenceOutputAssembly="False" />
1613

@@ -60,5 +57,19 @@
6057
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
6158
</None>
6259
</ItemGroup>
63-
<Import Project="..\tools\GenerateResxSource.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
60+
61+
<ItemGroup>
62+
<Compile Update="Properties\Resources.Designer.cs">
63+
<DesignTime>True</DesignTime>
64+
<AutoGen>True</AutoGen>
65+
<DependentUpon>Resources.resx</DependentUpon>
66+
</Compile>
67+
</ItemGroup>
68+
69+
<ItemGroup>
70+
<EmbeddedResource Update="Properties\Resources.resx">
71+
<Generator>PublicResXFileCodeGenerator</Generator>
72+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
73+
</EmbeddedResource>
74+
</ItemGroup>
6475
</Project>

src/Microsoft.Android.Sdk.ILLink/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: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<root>
3+
<!--
4+
Microsoft ResX Schema
5+
6+
Version 2.0
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">2.0</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"><value>this is my long string</value><comment>this is a comment</comment></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+
<value>[base64 mime encoded serialized .NET Framework object]</value>
24+
</data>
25+
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26+
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27+
<comment>This is a comment</comment>
28+
</data>
29+
30+
There are any number of "resheader" rows that contain simple
31+
name/value pairs.
32+
33+
Each data row contains a name, and value. The row also contains a
34+
type or mimetype. Type corresponds to a .NET class that support
35+
text/value conversion through the TypeConverter architecture.
36+
Classes that don't support this are serialized and stored with the
37+
mimetype set.
38+
39+
The mimetype is used for serialized objects, and tells the
40+
ResXResourceReader how to depersist the object. This is currently not
41+
extensible. For a given mimetype the value must be set accordingly:
42+
43+
Note - application/x-microsoft.net.object.binary.base64 is the format
44+
that the ResXResourceWriter will generate, however the reader can
45+
read any of the formats listed below.
46+
47+
mimetype: application/x-microsoft.net.object.binary.base64
48+
value : The object must be serialized with
49+
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50+
: and then encoded with base64 encoding.
51+
52+
mimetype: application/x-microsoft.net.object.soap.base64
53+
value : The object must be serialized with
54+
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55+
: and then encoded with base64 encoding.
56+
57+
mimetype: application/x-microsoft.net.object.bytearray.base64
58+
value : The object must be serialized into a byte array
59+
: using a System.ComponentModel.TypeConverter
60+
: and then encoded with base64 encoding.
61+
-->
62+
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63+
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64+
<xsd:element name="root" msdata:IsDataSet="true">
65+
<xsd:complexType>
66+
<xsd:choice maxOccurs="unbounded">
67+
<xsd:element name="metadata">
68+
<xsd:complexType>
69+
<xsd:sequence>
70+
<xsd:element name="value" type="xsd:string" minOccurs="0" />
71+
</xsd:sequence>
72+
<xsd:attribute name="name" use="required" type="xsd:string" />
73+
<xsd:attribute name="type" type="xsd:string" />
74+
<xsd:attribute name="mimetype" type="xsd:string" />
75+
<xsd:attribute ref="xml:space" />
76+
</xsd:complexType>
77+
</xsd:element>
78+
<xsd:element name="assembly">
79+
<xsd:complexType>
80+
<xsd:attribute name="alias" type="xsd:string" />
81+
<xsd:attribute name="name" type="xsd:string" />
82+
</xsd:complexType>
83+
</xsd:element>
84+
<xsd:element name="data">
85+
<xsd:complexType>
86+
<xsd:sequence>
87+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88+
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89+
</xsd:sequence>
90+
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91+
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92+
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93+
<xsd:attribute ref="xml:space" />
94+
</xsd:complexType>
95+
</xsd:element>
96+
<xsd:element name="resheader">
97+
<xsd:complexType>
98+
<xsd:sequence>
99+
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100+
</xsd:sequence>
101+
<xsd:attribute name="name" type="xsd:string" use="required" />
102+
</xsd:complexType>
103+
</xsd:element>
104+
</xsd:choice>
105+
</xsd:complexType>
106+
</xsd:element>
107+
</xsd:schema>
108+
<resheader name="resmimetype">
109+
<value>text/microsoft-resx</value>
110+
</resheader>
111+
<resheader name="version">
112+
<value>2.0</value>
113+
</resheader>
114+
<resheader name="reader">
115+
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116+
</resheader>
117+
<resheader name="writer">
118+
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119+
</resheader>
120+
<data name="XA2000" xml:space="preserve">
121+
<value>Použití funkce AppDomain.CreateDomain() zjištěné v sestavení: {0}. .NET 6 a vyšší bude podporovat jenom jednu doménu AppDomain, takže toto rozhraní API už nebude dostupné v Xamarin.Android po vydání .NET 6.</value>
122+
<comment>The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain
123+
{0} - The name of the assembly</comment>
124+
</data>
125+
</root>

0 commit comments

Comments
 (0)