Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
name: update-translations
description: Bring the web app's interface translations up to date with its English text. Use for the periodic translation update, when bun run i18n:status reports missing or stale messages, or when asked to translate new UI text.
allowed-tools: Bash, Read, Edit, Write, Grep, Glob
Update interface translations
Changes add and edit English only; this update translates them into every
other interface language. Run everything from apps/web. Conventions are in
.agents/rules/web/i18n.md; wording is in src/lib/i18n/glossary.md.
1. Start from main
git fetch origin main && git checkout -B i18n/update-<yyyy-mm-dd> origin/main.
2. Find untranslated text
bun run i18n:status --jsonlists, per language, messages that aremissing(no translation),stale(the English changed since it was translated), or have aplaceholderMismatch.- English that never went through
t()doesn't show there. Literal labels on menu items fail CI (tsx-menu-label-translated), but other surfaces can slip through: labels in config objects (label: 'Foo'), sidebar and command definitions, tab names. Read theapps/web/srcdiff of changes merged since the last update (git log --since='8 days ago' --format='%h %s' origin/main -- apps/web/src) for user-visible text with a string literal in new UI, menus, or navigation. Move each intosrc/lib/i18n/locales/en/<namespace>.tsand render it witht(), following the rule. Leave surfaces that aren't translated yet (most page content; the slides, canvas, spreadsheet, and database editors) alone, so no page mixes languages.
Nothing missing, stale, or newly converted: stop, without a branch or PR.
3. Translate
For each key, write the translation in every src/lib/i18n/locales/<language>.ts
file, in the key's namespace, in the same order as English.
- Translate from the current English and the surface it appears on (find it
with
grep -rn "'<namespace>.<key>'" src), not from the old translation. - Use the glossary's form of address and its words for product terms. A new product term gets a row in every language's glossary table.
- Keep
{{placeholders}}exactly; use the language's quotation marks. - A plural English message (an object such as
{ one, other }) is an object in every language, with exactly the language's plural categories:new Intl.PluralRules('<language>').resolvedOptions().pluralCategories(Polish and Russianone,few,many,other; French, Spanish, Italian and Portuguese addmanyfor millions; Japanese, Korean, Chinese, Indonesian, Vietnamese and Thai onlyother). The tests check the forms. - Prefer the shorter of two equally clear wordings; menus cap at 22rem.
- Don't touch translations that aren't missing or stale, and never edit the English.
4. Record and check
bun run i18n:status --accept all, thenbun run i18n:status: every language reportsup to date.bun run test -- src/lib/i18npasses (stray keys, placeholders).just test-i18n-browserpasses in every language. A clipped label lists its text: shorten that translation rather than widening the menu. The check renders every key in the context-menu namespaces; a label in another namespace that renders in a narrow space gets added toMENUSinsrc/lib/i18n/browser-test/menus.tsx.- Converted any literals in step 2?
bunx --yes @ast-grep/[email protected] scanfrom the repository root, and the tests of the touched features.
5. Open the PR
Commit and open a ready-for-review PR per the git skill, titled like
chore(web): update interface translations. Say which messages changed and
why (new, changed English, converted literals), and list any glossary terms
added so a native speaker can check them.