Skip to content

[localization] Include template JSON files in OneLocBuild configuration. Fixes #20717#25717

Open
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/fix-template-loc-config
Open

[localization] Include template JSON files in OneLocBuild configuration. Fixes #20717#25717
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/fix-template-loc-config

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Jun 17, 2026

Copy link
Copy Markdown
Member

The templatestrings.en.json files in dotnet/Templates/ were not included in the LocProject.json configuration, which meant OneLocBuild never picked them up for translation.

This PR replaces the static LocProject.json.in template with a generate-loc-project.sh script that dynamically discovers all templatestrings.en.json files and includes them in the generated LocProject.json.

This also fixes a duplicate entry for Microsoft.Macios.Generator/Resources.resx that was in the original .in file.

Hopefully fixes #20717

🤖 Pull request created by Copilot

The templatestrings.en.json files in dotnet/Templates were not included in
the LocProject.json configuration, which meant OneLocBuild never translated
them. This caused Polish and Chinese Traditional translations to remain
outdated (still referencing '.NET 6').

Replace the static LocProject.json.in template with a generate-loc-project.sh
script that dynamically discovers all templatestrings.en.json files and
includes them in the generated LocProject.json.

This also fixes a duplicate entry for Microsoft.Macios.Generator/Resources.resx
that was in the original .in file.

Fixes #20717

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@rolfbjarne rolfbjarne marked this pull request as ready for review June 18, 2026 16:57
Copilot AI review requested due to automatic review settings June 18, 2026 16:57

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.

Pull request overview

Updates the localization configuration used by OneLocBuild so that template localization source files (templatestrings.en.json under dotnet/Templates/) are included, fixing missed translations for template strings (issue #20717). It also removes a previously duplicated .resx entry by moving from a static JSON template to a generated file.

Changes:

  • Replace the static LocProject.json.in template with a bash generator that discovers all templatestrings.en.json files under dotnet/Templates/.
  • Update the devops Makefile target to generate Localize/LocProject.json via the new script.
  • Remove the duplicate Microsoft.Macios.Generator/Resources.resx entry by regenerating the list from a single authoritative script.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
tools/devops/Makefile Switches LocProject generation to run the new discovery script.
tools/devops/LocProject.json.in Removes the static template configuration (including a duplicate entry).
tools/devops/generate-loc-project.sh New generator that emits LocProject.json with static .resx items plus discovered template JSON files.

Comment thread tools/devops/Makefile
Comment on lines +10 to +11
LocProject.json: generate-loc-project.sh Makefile $(TOP)/Make.config
$(Q_GEN) $(TOP)/tools/devops/generate-loc-project.sh "$(PWD)" "$(TOP)" > $(TOP)/Localize/$@;
Comment on lines +1 to +13
#!/bin/bash

# This script generates the LocProject.json file for OneLocBuild.
# It includes both the static .resx entries and dynamically discovered
# template JSON files (templatestrings.en.json).

WORKING_DIRECTORY="$1"
TOP="$2"

if [ -z "$WORKING_DIRECTORY" ] || [ -z "$TOP" ]; then
echo "Usage: $0 <working-directory> <top-directory>" >&2
exit 1
fi
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #a94069b] Build passed (Detect API changes) ✅

Pipeline on Agent
Hash: a94069b30d4e69b144aea6b70189e904967dc2cd [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #a94069b] Build passed (Build packages) ✅

Pipeline on Agent
Hash: a94069b30d4e69b144aea6b70189e904967dc2cd [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: a94069b30d4e69b144aea6b70189e904967dc2cd [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ [PR Build #a94069b] Build passed (Build macOS tests) ✅

Pipeline on Agent
Hash: a94069b30d4e69b144aea6b70189e904967dc2cd [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #a94069b] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

1 tests crashed, 11 tests failed, 182 tests passed.

Failures

❌ assembly-processing tests [attempt 2]

🔥 Failed catastrophically on VSTS: test results - assembly-processing (no summary found).

Html Report (VSDrops) Download

❌ linker tests (tvOS) [attempt 2]

11 tests failed, 0 tests passed.

Failed tests

  • dont link/tvOS - simulator/Debug: LaunchTimedOut
  • dont link/tvOS - simulator/Release: LaunchTimedOut
  • link sdk/tvOS - simulator/Debug: LaunchTimedOut
  • link sdk/tvOS - simulator/Release: LaunchTimedOut
  • link all/tvOS - simulator/Debug: LaunchTimedOut
  • link all/tvOS - simulator/Release: LaunchTimedOut
  • link all/tvOS - simulator/Debug (don't bundle original resources): LaunchTimedOut
  • trimmode copy/tvOS - simulator/Debug: LaunchTimedOut
  • trimmode copy/tvOS - simulator/Release: LaunchTimedOut
  • trimmode link/tvOS - simulator/Debug: LaunchTimedOut
  • trimmode link/tvOS - simulator/Release: LaunchTimedOut

Html Report (VSDrops) Download

Successes

✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 6 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 11 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 11 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 20 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 23 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 20 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: a94069b30d4e69b144aea6b70189e904967dc2cd [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chinese and Polish translations for templates haven't been updated in a long time

3 participants