add-language
Skill101 starsChanged 10 months agoApache-2.0View on GitHub
Use when adding a new interface language (locale) to the app, or when asked to translate the UI into another language. Covers the translation file, the i18n resources, the plural forms the language needs, and the user doc that names the available languages.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Phygital-Brain/phygital-braintheir own version, first seen Nov 15, 2026
- GeoffMillerAZ/fathomtheir own version, first seen Nov 8, 2026
- Locker-Room-Tools/synapsetheir own version, first seen Oct 11, 2026
- DailybotHQ/deepworkplan-websitetheir own version, first seen Oct 9, 2026
- madeinoz67/madeinoz-knowledge-systemtheir own version, first seen Jan 18, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- DailybotHQ/deepworkplan-website★ 15same name
- madeinoz67/madeinoz-knowledge-system★ 3same name
- Locker-Room-Tools/synapse★ 2same name
- GeoffMillerAZ/fathom★ 1same name
- Phygital-Brain/phygital-brain★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository4 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- fable-reviewSkill
- mine-historySkill
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run all npm commands from app/.
- Very specific: line 45
Use the same string {Name} in all of them.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Adding a new interface language
The app bundles translations at build time. Adding a locale means touching three code locations plus two prose locations. Miss any one and the failure is silent: i18next falls back to English mid-screen, or the new locale ships with no key-parity coverage.
Run all npm commands from app/.
Below, {code} is the ISO code (it) and {Name} is the language's own name
for itself (Italiano).
1. Create the translation file
mkdir -p app/src/locales/{code}
cp app/src/locales/en/translation.json app/src/locales/{code}/translation.json2. Translate the values
Translate every value in app/src/locales/{code}/translation.json. Do not
change, add, or drop keys. The key-parity test in step 5 fails if the shape
drifts from en.
Labels must fit 320px (project rule in AGENTS.project.md), so prefer the
concise translation where two options exist.
3. Add the language name to every translation file
The languages section of each locale lists all languages, so the picker reads
correctly whatever language the UI is currently in. Add "{code}": "{Name}" to
the languages section of every translation.json under app/src/locales/,
the new one included. List them first rather than working from memory:
ls app/src/localesUse the same string {Name} in all of them. Language names are not translated.
4. Register the locale
In app/src/locales/resources.ts, add the import alongside the others and the
entry in LANGUAGE_RESOURCES:
import {code}Translation from './{code}/translation.json';export const LANGUAGE_RESOURCES = {
// ...
{code}: { translation: {code}Translation },
};Both pickers and i18next read this map, so nothing else registers a locale.
5. Nothing to do for the pickers
Both of them, Settings → Appearance and the sidebar globe dropdown, render
useLanguageOptions (app/src/hooks/useLanguageOptions.ts), which reads the
codes registered in step 4 and orders them English first, then by label. The
order is covered by app/src/components/layout/__tests__/LanguageSwitcher.test.tsx,
which pins the expected sequence, so add the new code there.
6. Update the user doc
docs/user-guide/settings.md, Appearance table, Language row, names the
available languages in English. Add the new one.
Also add the code to the Localization contract's list in AGENTS.project.md.
app/src/tests/agents-contracts.test.ts fails until the list matches
LANGUAGE_CODES.
7. Add the plural forms the language needs
English declares _one and _other. A language with more plural categories
needs the rest, or i18next finds no key for those counts and silently renders
English: Russian showed "2 monitors" until _few and _many were added. The
parity test checks every category Intl.PluralRules reports for counts up to
100, so it tells you which keys are missing.
node -e "console.log(new Intl.PluralRules('{code}').resolvedOptions().pluralCategories)"Nothing to do for dates, the assistant, or the parity test
These already take the active locale as data, so none of them needs a per-locale entry:
app/src/lib/relative-time.tspasses the code straight toIntl.RelativeTimeFormat.app/src/lib/assistant/system-prompt.tsinterpolates the locale into the prompt and asks the model to answer in the user's language.app/src/locales/__tests__/translation-keys.test.tsdiscovers locale directories on disk, so the new one is key-checked againstenwith no edit.
Verify
npm test
npx tsc -b
npm run build
npm run test:e2e -- settings.featuresettings.feature has a language-change scenario, so it is the relevant e2e
run for this change.
Then check the UI by hand: Settings → Appearance → Language, and the sidebar globe dropdown. Both should list the new language, and selecting it should change the visible text.
Checklist
app/src/locales/{code}/translation.jsoncreated and fully translatedlanguages.{code}added to every translation file underapp/src/locales/app/src/i18n.tsimport andresourcesentry- expected order updated in
LanguageSwitcher.test.tsx - plural forms for every category the language needs
docs/user-guide/settings.mdLanguage row- code added to the Localization contract in
AGENTS.project.md npm test,npx tsc -b,npm run build,npm run test:e2e -- settings.feature
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

