i18n
Skill9 starsChanged 8 months agoApache-2.0View on GitHub
Internationalization (i18n) workflow and standards for managing translations. Use when: (1) Adding new user-facing text, (2) Creating new components with user-facing text, (3) Reviewing code for i18n compliance, (4) Adding a new translation module.
47 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- oivanfelipe/claude-skillstheir own version, first seen Nov 8, 2026
- DnsQueen/orcinus-skillstheir own version, first seen Nov 8, 2026
- lobehub/lobehubtheir own version, first seen Nov 5, 2026
- Cure-Consulting-Group/ProductEngineeringSkillstheir own version, first seen Nov 4, 2026
- sorawit-w/agent-skillstheir own version, first seen Nov 1, 2026
- darknecrocities/SkillBuildertheir own version, first seen Nov 1, 2026
Used with
Projects with it also use state-management, graphql and 3 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
GitHubSkillstate-management
CoreAI Sandbox's TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.
Also in 4 projects that use this
xfstudioSkillgraphql
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.
Also in 3 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 4 projects that use this
JohnJBorenSkillci-cd
CI/CD pipeline design, GitHub Actions, testing automation, and deployment strategies
Also in 3 projects that use this
etewiahSkille2e-testing
Playwright E2E testing and Lighthouse performance auditing. Use when setting up E2E tests, running Playwright tests, performing Lighthouse audits, or debugging E2E test failures.
Also in 5 projects that use this
Other versions47 projects use a version of this.
Word for word · 1
- CES-Ltd/TitanX★ 47100% same
Edited · 2
- iOfficeAI/AionUi★ 34k96% same
- FerroxLabs/wayland★ 606100% same
Wrote their own version · 44
- lobehub/lobe-chat★ 84ksame name
- lobehub/lobehub★ 84ksame name
- massCodeIO/massCode★ 7.1ksame name
- leookun/cursor-byok★ 3.2ksame name
- Pixeval/Pixeval★ 3.2ksame name
- akiver/cs-demo-manager★ 2ksame name
- d-kimuson/claude-code-viewer★ 1.3ksame name
- huoshen80/ReinaManager★ 737same name
- OpenClaudia/openclaudia-skills★ 731same name
- Mr-Quin/danmaku-anywhere★ 550same name
34 more not listed
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 repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- architectureSkill
- bump-versionSkill
- fix-issuesSkill
- fix-sentrySkill
- oss-prSkill
- pr-automationSkill
- pr-fixSkill
- pr-reviewSkill
- pr-shipSkill
- pr-verifySkill
- testingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 5 are distinctive, and 10 are very specific to this project.
0
Common
Most of the 37 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
Before doing any i18n work, always read src/common/config/i18n-config.json to get the current list of supported languages and modules.
- Very specific: line 80
Use camelCase for key names: copySuccess, scheduledTasks
- Distinctive: line 105
Before adding a new key, search for similar existing keys:
- Very specific: line 119
CRITICAL: Every new key must be added to every locale in supportedLanguages.
- Distinctive: line 141
Run these two commands in order — both must pass before committing:
- Very specific: line 149
If check-i18n.js exits with errors (❌), fix them before proceeding
- Very specific: line 150
If check-i18n.js exits with warnings only (⚠️), review but may proceed
- Very specific: line 155
Add module name to src/common/config/i18n-config.json → modules array
- Very specific: line 156
Create <module>.json in every locale directory (read supportedLanguages to know which)
- Very specific: line 157
Add import + export in each locale's index.ts
- Very specific: line 158
Run bun run i18n:types to regenerate type definitions
- Very specific: line 159
Run node scripts/check-i18n.js to validate
- Distinctive: line 165
Never use hardcoded Chinese/English text in JSX:
- Distinctive: line 202
Use Trans component for complex markup:
- Distinctive: line 225
Before submitting code with new text:
“Common” is measured: kept by at least 6 in 10 of the 37 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
i18n Skill
Standards and workflow for internationalization. All user-visible text must use i18n.
Announce at start: "I'm using i18n skill to ensure proper internationalization."
IMPORTANT: Read Config First
Before doing any i18n work, always read src/common/config/i18n-config.json to get the current list of supported languages and modules. Never assume a fixed number — languages and modules may have been added or removed since this skill was written.
cat src/common/config/i18n-config.jsonThis file is the single source of truth. All scripts, runtime code, and this workflow depend on it.
File Structure
src/common/config/i18n-config.json # Single source of truth: languages, modules
src/renderer/i18n/
├── index.ts # i18next configuration
├── i18n-keys.d.ts # AUTO-GENERATED — do not edit manually
└── locales/
├── <lang>/ # One directory per language in i18n-config.json
│ ├── index.ts # Barrel import for all modules
│ ├── common.json # One JSON per module in i18n-config.json
│ ├── conversation.json
│ └── ...
└── ...Key Facts
- Reference language: defined by
referenceLanguageini18n-config.json(currentlyen-US) - Supported languages: defined by
supportedLanguagesarray — read the file to get the current list - Modules: defined by
modulesarray — read the file to get the current list
Key Structure
Keys use namespaced dot notation in code: t('module.key') or t('module.nested.key').
Inside each module JSON file, keys can be flat or nested:
// common.json — flat keys
{
"send": "Send",
"cancel": "Cancel",
"copySuccess": "Copied"
}
// cron.json — nested keys
{
"scheduledTasks": "Scheduled Tasks",
"status": {
"active": "Active",
"paused": "Paused"
}
}In code:
t('common.send'); // flat key in common.json
t('cron.status.active'); // nested key in cron.jsonKey Naming Rules
- Use camelCase for key names:
copySuccess,scheduledTasks - Group related keys with nesting:
status.active,actions.pause - Reusable text goes in
common.json: save, cancel, delete, confirm, etc. - Feature-specific text goes in the corresponding module
Common Suffixes
| Suffix | Usage |
title | Section/page titles |
placeholder | Input placeholders |
label | Form labels |
success / error | Status messages |
confirm | Confirmation dialogs |
empty | Empty state messages |
tooltip | Tooltip text |
Adding New Text — Workflow
Step 1: Read src/common/config/i18n-config.json
Get the current language list and module list. Do not skip this step.
Step 2: Check Existing Keys
Before adding a new key, search for similar existing keys:
grep -r "keyword" src/renderer/i18n/locales/en-US/Reuse common.* keys when possible.
Step 3: Choose the Right Module
Match the module to the feature area. If no module fits, consider whether a new module is needed (see "Adding a New Module" below).
Step 4: Add to ALL Locale Directories
CRITICAL: Every new key must be added to every locale in supportedLanguages. Use this checklist for each key:
en-US/<module>.json— reference language (added in Step 3)zh-CN/<module>.json— addedzh-TW/<module>.json— added- Any other language listed in
src/common/config/i18n-config.json→supportedLanguages— added
A key missing from even one locale will cause node scripts/check-i18n.js to fail in CI.
Step 5: Use in Component
import { useTranslation } from 'react-i18next';
function MyComponent() {
const { t } = useTranslation();
return <button>{t('common.save')}</button>;
}Step 6: Regenerate Types and Validate
Run these two commands in order — both must pass before committing:
bun run i18n:types # Step A: regenerate i18n-keys.d.ts from reference locale
node scripts/check-i18n.js # Step B: validate structure, keys, and type synci18n:typesmust be run beforecheck-i18n.js— the check validates the generated file- If
check-i18n.jsexits with errors (❌), fix them before proceeding - If
check-i18n.jsexits with warnings only (⚠️), review but may proceed - Never commit with a stale
i18n-keys.d.ts
Adding a New Module
- Add module name to
src/common/config/i18n-config.json→modulesarray - Create
<module>.jsonin every locale directory (readsupportedLanguagesto know which) - Add import + export in each locale's
index.ts - Run
bun run i18n:typesto regenerate type definitions - Run
node scripts/check-i18n.jsto validate
Hardcoded String Detection
Prohibited Patterns
Never use hardcoded Chinese/English text in JSX:
// Bad
<span>重命名</span>
<span>Delete</span>
{name || '新对话'}
// Good
<span>{t('common.rename')}</span>
<span>{t('common.delete')}</span>
{name || t('conversation.newConversation')}Exceptions
- Code comments (any language OK)
console.log()/ debug output- Internal string constants not shown to users
Interpolation
Variables
{
"taskCount": "{{count}} task(s)",
"greeting": "Hello, {{name}}!"
}t('cron.taskCount', { count: 5 });HTML in Translations
Use Trans component for complex markup:
import { Trans } from 'react-i18next';
<Trans i18nKey='cron.countdown'>
Task <strong>{{ taskName }}</strong> in <span>{{ countdown }}</span>
</Trans>;zh-TW Maintenance
Most terms can be auto-converted from zh-CN, but some need manual review:
| zh-CN | zh-TW | Notes |
| 视频 | 影片 | Different term |
| 软件 | 軟體 | Different term |
| 信息 | 訊息 | Different term |
| 默认 | 預設 | Different term |
Quick Checklist
Before submitting code with new text:
- Read
src/common/config/i18n-config.jsonto get current languages and modules - All user-visible text uses
t()function - New keys added to every locale directory in
supportedLanguages - No hardcoded Chinese/English in JSX
- zh-TW reviewed for term differences
bun run i18n:typesran first (regeneratesi18n-keys.d.ts)node scripts/check-i18n.jspassed after types regenerated (no errors)
Common Mistakes
| Mistake | Correct |
| Assuming a fixed number of languages | Always read i18n-config.json first |
| Adding key to only some locales | Add to every locale in supportedLanguages |
Editing i18n-keys.d.ts manually | Run bun run i18n:types to generate |
Using t("New Chat") | Define key: t("conversation.newChat") |
Not updating i18n-config.json for new module | Update config first, then create files |
Adding module JSON but not updating index.ts | Must add import + export in each locale's index.ts |
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.

