Skip to content

consume ui-core loc tooling#153

Merged
humanapp merged 3 commits into
mainfrom
humanapp/text-entry-loc
Jul 23, 2026
Merged

consume ui-core loc tooling#153
humanapp merged 3 commits into
mainfrom
humanapp/text-entry-loc

Conversation

@humanapp

Copy link
Copy Markdown
Contributor

consume the shared loc tooling

Replaces locgen.mjs with a small wrapper over
@microbit-apps/ui-core/loc, keeping only app-specific config (tooltip
inventory, 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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.mjs implementation and switches loc:strings / loc:verify to a loc-strings CLI.
  • Rewrites scripts/locgen.mjs to delegate localization hex generation/coverage to runLocGen from @microbit-apps/ui-core/loc, supplying app-specific hooks (tooltip-derived inventory, sample-only exclusions, web snapshot output).
  • Adds @microbit-apps/ui-core as a devDependency (GitHub tag v0.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-strings executable, but the newly-added @microbit-apps/ui-core dependency (at least at v0.0.5) does not declare any bin entries and its repo does not reference a loc-strings CLI. As written, npm run loc:strings / loc:verify will 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"

Comment thread scripts/locgen.mjs
Comment thread package.json
@humanapp
humanapp marked this pull request as ready for review July 23, 2026 06:45
@humanapp
humanapp merged commit 4c4682e into main Jul 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants