Skip to content

Localize the Android workload description - #12740

Merged
jonathanpeppers merged 4 commits into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-localize-android-workloads
Sep 10, 2026
Merged

jonathanpeppers merged 4 commits into
dotnet:mainfrom
jonathanpeppers:jonathanpeppers-localize-android-workloads

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Description

dotnet workload search localizes its table headings, but the Android workload description remains in English because the Android manifest package does not contain workload localization catalogs.

This change follows the wasm-tools manifest pattern from dotnet/runtime: it adds the English catalog source, packages generated WorkloadManifest.<culture>.json files under data/localize, and preserves them when installing manifests into local SDK layouts. The existing OneLoc pipeline now discovers the English JSON source so localization bots can generate translated JSON and .lcl handbacks; no translated files are authored manually.

A CLI regression test forces the English UI culture, verifies the installed English catalog, and checks that dotnet workload search android displays the expected description.

Related to dotnet/sdk#27447.

Testing

  • Packed the manifest project and confirmed data/localize/WorkloadManifest.en.json is included.
  • Built Xamarin.Android.Build.Tests.csproj successfully with the installed JDK paths supplied explicitly.

Add the English workload localization catalog, wire OneLoc handoff generation, package and extract localized catalogs, and cover the English dotnet workload search output.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 9, 2026 13:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are coherent across packing, extraction, localization discovery, and tests, with only minor follow-up suggestions.

Pull request overview

Adds workload-manifest localization support for the Android workload so dotnet workload search can display translated (and at least English) workload descriptions, aligning with the wasm-tools manifest pattern and enabling OneLoc-driven translation handbacks.

Changes:

  • Introduces an English workload localization catalog (WorkloadManifest.en.json) and packages WorkloadManifest.<culture>.json under data/localize.
  • Updates local SDK manifest installation/extraction logic to preserve the localize payload.
  • Adds a CLI regression test and extends the test DotNetCLI helper to support env-var overrides and dotnet workload search.
File summaries
File Description
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/DotNetCLI.cs Adds per-invocation environment variable injection and a workload search helper for tests.
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/XASdkTests.cs Adds a regression test asserting English workload description presence and CLI output behavior.
src/Xamarin.Android.Build.Tasks/Microsoft.NET.Sdk.Android/localize/WorkloadManifest.en.json Adds the English source catalog entry for the Android workload description.
Localize/update-locproject.ps1 Broadens OneLoc discovery to include localize/*.en.json sources (not just templates).
build-tools/create-packs/Microsoft.NET.Sdk.Android.proj Copies and packs workload localization JSON files into the manifest pack under data/localize.
build-tools/create-packs/Directory.Build.targets Preserves data/localize contents when extracting manifest packs into local SDK layouts.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 2
  • Review effort level: Lite

Comment thread Localize/update-locproject.ps1 Resolved
jonathanpeppers and others added 3 commits September 9, 2026 09:02
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Place the test output beneath the shared temp directory so BaseTest.CleanupTest can find its cleanup root without walking past the filesystem root.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Sep 9, 2026
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) September 9, 2026 20:12
@jonathanpeppers
jonathanpeppers merged commit 26e3d80 into dotnet:main Sep 10, 2026
44 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants