i18n-strings
Skill2 starsChanged 59 days agoMITView on GitHub
Use when adding, changing or removing any user-facing string in todox, or when a component needs a label. Covers the two-dictionary rule, placeholder parity, and why the translator cannot cross into a client component.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- epam/ai-dial-chattheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- epam/ai-dial-chat★ 501same 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 repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- add-rpc-methodSkill
- db-changeSkill
- ui-conventionsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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 8
Every visible string comes from lib/i18n/.
- Very specific: line 22
Keep a new key next to the ones it belongs with.
- Distinctive: line 66
Colour never carries meaning alone: every badge and status needs a text equivalent.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Strings
Every visible string comes from lib/i18n/. There is no library and no
next-intl: a cookie, a lookup table, and a function.
The two dictionaries
lib/i18n/en.tsis the source. Its keys are the typeKey.lib/i18n/tr.tsisRecord<Key, string>, so a missing translation fails the build. Add to both, in the same commit.- English is the default (
DEFAULT_LANGinlib/i18n/index.ts), and only because a caller that states no preference is usually not a person — Googlebot and every link-preview fetcher send noAccept-Language. A Turkish browser sendstrand is negotiated to Turkish. Write the Turkish properly — full orthography, real diacritics. Do not machine-translate it: it is a first-class language here, not a translation of the English. - Keep a new key next to the ones it belongs with; both files are grouped by
area (
/* chrome */,/* auth */, …) and in the same order.
Placeholders
translator() substitutes {name} from a vars object:
t("minutesAgo", { n: 5 }) // "5m ago" / "5dk önce"The type system guarantees the key exists in both languages. It says nothing
about what is inside it, so a translation that drops {n} loses the number
silently. lib/i18n/index.test.ts asserts placeholder parity — if you add a key
with a placeholder, that test already covers it.
t cannot enter a client component
getT() (lib/lang.ts) reads the cookie through next/headers, so it is
server-only, and t is a function — functions are not serialisable across the
boundary. Passing it to a "use client" component is a runtime error, not a
compile error.
Translate on the server, pass strings as props. The pattern is everywhere:
app/features/auth-form.tsx— takessubmitLabel,successLabel, a pre-translatedmessagesrecord.app/features/token-form.tsx,app/features/lang-button.tsx— same.
Server components call const { t } = await getT() directly.
Where the language comes from
Cookie todox_lang → getLang() → translator(lang). It is set by
setLangAction in app/actions.ts, which writes the cookie and calls
revalidatePath("/", "layout"). The cookie is httpOnly; nothing on the client
reads it, and nothing should start.
Related
- Status, kind and priority labels:
app/kinds.ts. - Relative time and durations:
ago()/duration()inlib/i18n/index.ts. - Report markdown is rendered with a translator too —
mcp/server.tspasseslangthrough foractivity_report. - Colour never carries meaning alone: every badge and status needs a text equivalent. See CONTRIBUTING.md.
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.

