consume ui-core loc tooling#153
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors MicroCode’s localization build tooling to consume a shared localization pipeline, replacing the existing bespoke scripts with a thin wrapper intended to keep only microcode-v2–specific configuration (tooltip inventory handling, sample-only exclusions, font5 tagline handling, web snapshots, and hex naming).
Changes:
- Removes the in-repo
scripts/locstrings.mjsimplementation and switchesloc:strings/loc:verifyto aloc-stringsCLI. - Rewrites
scripts/locgen.mjsto delegate localization hex generation/coverage torunLocGenfrom@microbit-apps/ui-core/loc, supplying app-specific hooks (tooltip-derived inventory, sample-only exclusions, web snapshot output). - Adds
@microbit-apps/ui-coreas a devDependency (GitHub tagv0.0.5).
Reviewed changes
Copilot reviewed 3 out of 23 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| scripts/locstrings.mjs | Removed the local string-extraction implementation in favor of shared tooling. |
| scripts/locgen.mjs | Converted to a wrapper that delegates to shared loc generation while providing microcode-v2-specific configuration and outputs. |
| package.json | Adds the shared tooling dependency and updates npm scripts to use new loc commands. |
Comments suppressed due to low confidence (1)
package.json:20
- The npm scripts now invoke a
loc-stringsexecutable, but the newly-added@microbit-apps/ui-coredependency (at least at v0.0.5) does not declare anybinentries and its repo does not reference aloc-stringsCLI. As written,npm run loc:strings/loc:verifywill likely fail with "command not found".
"loc:strings": "loc-strings",
"loc:tooltips": "node scripts/tooltipgen.mjs",
"loc:regen": "npm run loc:strings && npm run loc:tooltips",
"loc:coverage": "node scripts/locgen.mjs --coverage",
"loc:hex": "node scripts/locgen.mjs",
"loc:verify": "loc-strings && node scripts/tooltipgen.mjs && git diff --exit-code locales/en.json tooltips.ts"
humanapp
marked this pull request as ready for review
July 23, 2026 06:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
consume the shared loc tooling
Replaces
locgen.mjswith a small wrapper over@microbit-apps/ui-core/loc, keeping only app-specific config (tooltipinventory, sample-only exclusion, tagline font5 rule, web snapshots, hex
naming).
Regenerated per-loc hex files.
Parked as draft until ui-controls bump, pending microbit-apps/ui-controls#2