# Localize Strings

> Run the build-add-in localization workflow when UI strings are added or changed, including extracting strings, generating translation prompts, updating TSV language files, embedding localized output, and validating results. Use when this capability is needed.

- Skill: `tomevault-io/localize-strings` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/localize-strings`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/localize-strings/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/localize-strings

---


# 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

1. Run string extraction:
   - `npm run extract-loc`
2. Perform translation directly:
   - Use `localize/translate-prompt.txt` as the translation prompt.
   - Generate translated TSV output.
   - Apply results to `localize/strings.tsv`.
3. Embed localized language resources:
   - `npm run embed-loc`
4. Validate output quality:
   - Spot-check changed strings in `src/core/localize/strings.json` and generated artifacts.
   - Confirm no obvious formatting or placeholder regressions.
5. 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"` and `cmd /c "npm run embed-loc"`).
   - macOS: run in `zsh` (`zsh -lc "npm run extract-loc"` and `zsh -lc "npm run embed-loc"`).
- 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](https://tomevault.io/claim/wandyezj) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

