Localize Strings Workflow Skill
Use this skill when the user asks to localize new or changed UI strings in this repository.
Purpose
Apply the documented localization process in docs/localize.md and related localize/ files.
Repository Rules
- Only localize UI strings.
- Ensure UI strings are wrapped in
loc("...")before running localization tooling. - If a language translation is missing, English is the fallback.
- Keep changes minimal and aligned with the existing project style.
Required Workflow
- Run string extraction:
npm run extract-loc
- Perform translation directly:
- Use
localize/translate-prompt.txtas the translation prompt. - Generate translated TSV output.
- Apply results to
localize/strings.tsv.
- Use
- Embed localized language resources:
npm run embed-loc
- Validate output quality:
- Spot-check changed strings in
src/core/localize/strings.jsonand generated artifacts. - Confirm no obvious formatting or placeholder regressions.
- Spot-check changed strings in
- Report exactly what changed and any errors or issues encountered.
Operating Behavior
- Execute translation directly as part of the workflow; only ask the user for input if translation fails or output is ambiguous.
- Automatically run localization commands using the platform shell:
- Windows: run in
cmd(cmd /c "npm run extract-loc"andcmd /c "npm run embed-loc"). - macOS: run in
zsh(zsh -lc "npm run extract-loc"andzsh -lc "npm run embed-loc").
- Windows: run in
- Preserve TSV formatting exactly (tabs, column order, escaping).
- Do not introduce new dependencies.
- Prefer targeted edits; avoid unrelated refactors.
Expected Deliverables
- Updated localization source files (typically
localize/strings.tsv, plus embedded outputs). - Short summary including:
- Commands run.
- Files changed.
- Any manual follow-up required.
- Any strings that remain intentionally untranslated (for example, approved brand/product names).
Quick References
- Process guide:
docs/localize.md - Prompt template:
localize/translate-prompt.txt - Localization table:
localize/strings.tsv - Embed command source flow:
npm run embed-loc
Converted and distributed by TomeVault — claim your Tome and manage your conversions.