Commit 328644a
authored
[OneLoc] Localize Microsoft.Android.Templates (#7248)
Context: https://github.com/dotnet/templating/blob/6ecea73aad1ce3444dbf28fc340e5f464f6278df/docs/Localization.md
The `dotnet new` template engine supports localization as of .NET 6.
Update the `Microsoft.Android.Templates` project to use the new
localization system. Local template builds now use
`Microsoft.TemplateEngine.Tasks` to generate the
`templatestrings.*.json` files used for localization.
The new `update-locproject.ps1` script runs as part of the
`OneLocBuild` job in CI (fa9629d). This script will copy each
english `templatestrings.en.json` file to `templatestrings.json`, and
add it as a new translation source file entry to `LocProject.json`.
This update to `LocProject.json` will tell the `OneLocBuild` task to
process our templates.
This script borrows heavily from the [generate-locproject.ps1][0]
script found in dotnet/arcade.
Every time there is a change to one of the templates:
1. The dev making the change should build the modified template
project. This will update the loc files on the local working copy,
dotnet build src/Microsoft.Android.Templates/Microsoft.Android.Templates.csproj
# -or-
dotnet build Xamarin.Android.sln
2. Push the loc files together with the template modifications.
Review & merge.
3. OneLocBuild integration will automatically pick up the changes
and will send them for translation.
4. You will receive a PR containing the translated template loc
files when they are ready. Review & merge.
[0]: https://github.com/dotnet/arcade/blob/e771d68edea1cfcd4a49e160093a4f32df8a6288/eng/common/generate-locproject.ps11 parent 8ce34b0 commit 328644a
File tree
92 files changed
+573
-2
lines changed- Documentation/workflow
- Localize
- build-tools/automation
- eng
- src/Microsoft.Android.Templates
- android-activity/.template.config/localize
- android-bindinglib/.template.config/localize
- android-layout/.template.config/localize
- android-wear/.template.config/localize
- androidlib/.template.config/localize
- android/.template.config/localize
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
92 files changed
+573
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1880 | 1880 | | |
1881 | 1881 | | |
1882 | 1882 | | |
1883 | | - | |
| 1883 | + | |
1884 | 1884 | | |
1885 | 1885 | | |
1886 | 1886 | | |
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
1894 | 1901 | | |
1895 | 1902 | | |
1896 | 1903 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
29 | 33 | | |
30 | 34 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
src/Microsoft.Android.Templates/android-activity/.template.config/localize/templatestrings.cs.json
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
src/Microsoft.Android.Templates/android-activity/.template.config/localize/templatestrings.de.json
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments