i18n-sync
Skill2 starsChanged 41 days agoMITView on GitHub
Keeps this project's en/ar translations in sync. Adds a translation key and mirrors it to the other locale, and scans for keys that exist in en but are missing or empty in ar (a silent English fallback) — and orphan ar-only keys. Use when adding translation strings, wiring t()/trans() calls, or when asked to check Arabic translation coverage, find missing translations, or verify locale parity. Web (Vue 3 vue-i18n JSON) and Laravel (PHP lang) both covered.
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 3 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 55
When adding a new string, write it to both en and ar in the same nested path:
- Very specific: line 57
Add to en/<module>.json with the English text.
- Very specific: line 58
Add to ar/<module>.json with the Arabic translation.
- Distinctive: line 62
Keep key ordering/structure consistent with the surrounding file.
- Distinctive: line 65
Never add an en key without its ar counterpart.
- Distinctive: line 69
Parity is mandatory: every add touches both locales.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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
<!-- Own skill (local, not tracked by `npx skills`). Built against one project's exact
i18n layout. Encodes real conventions verified against that codebase. -->i18n en/ar Sync
The project ships en + ar only (ar is RTL). A key present in en but absent/empty in
ar does not error — vue-i18n / Laravel silently fall back to English, so Arabic users
see English strings with no warning. This is the same silent-fallback class as the driver
locale bugs. Never leave a key in one locale but not the other.
Where translations live (verified layout)
| Surface | en path | ar path | Format |
| Vue i18n (primary) | resources/ts/plugins/i18n/locales/en/<module>.json | .../ar/<module>.json | JSON, nested keys, one file per module (~117 modules) |
| Vue i18n (secondary) | resources/ts/locales/en/*.json | resources/ts/locales/ar/*.json | JSON |
| Laravel (app) | resources/lang/en/*.php | resources/lang/ar/*.php | PHP arrays |
| Laravel (modules) | Modules/*/Resources/lang/en/*.php (also .../resources/lang and .../lang — casing varies) | .../ar/... | PHP arrays |
Conventions:
- Vue module filenames are
snake_caseand map to page paths by convention (admin/driverWallets/index→driver_wallets); overrides live inresources/ts/plugins/i18n/index.ts(pageModuleOverrides). When adding keys for a page, add them to that page's module file, notcommon.json, unless truly shared. - Vue keys are nested (
payment_links.json→pnl→heading); referenced ast('payment_links.pnl.heading'). Preserve nesting when adding. common.jsonanddatatable.jsonare eager-loaded (used everywhere); other modules lazy-load.
Operation A — SCAN for drift (run this to audit coverage)
The bundled scanner deep-flattens nested keys and reports three drift classes:
missing in ar (silent English fallback), empty in ar (blank render), orphan in ar (dead key).
python3 ~/.claude/skills/i18n-sync/scan_drift.py # scans the primary Vue locales
python3 ~/.claude/skills/i18n-sync/scan_drift.py <en_dir> <ar_dir> # any en/ar pairPoint it at other surfaces by passing dirs, e.g.:
python3 .../scan_drift.py resources/ts/locales/en resources/ts/locales/ar
For Laravel PHP lang, there is no safe generic flattener (arbitrary PHP); diff per file with
php -r or read both arrays and compare keys manually.
Report findings grouped by module, most-affected first. Do NOT auto-translate silently — list what's missing and either (a) add real Arabic if you're confident, or (b) flag for the user.
Operation B — ADD a key (mirror to both locales)
When adding a new string, write it to both en and ar in the same nested path:
- Add to
en/<module>.jsonwith the English text. - Add to
ar/<module>.jsonwith the Arabic translation. If you cannot produce accurate Arabic, insert the value as"⟦AR⟧ <english>"(a visible marker) and tell the user it needs translation — but still create the key so the scanner can catch it and it never silently falls back mid-render. - Keep key ordering/structure consistent with the surrounding file.
- Wire the call as
t('<module>.<dotted.path>')(Vue) ortrans('<file>.<key>')(Laravel).
Never add an en key without its ar counterpart. Never invent a third locale — the app is en/ar only.
Rules
- Parity is mandatory: every add touches both locales; every scan finding is drift to fix.
- Nested, not flat: descend into objects; a missing leaf deep in the tree still falls back.
- Right module file: page-specific keys go in the page's module, shared ones in
common.json. - Don't machine-translate blindly: mark uncertain Arabic with
⟦AR⟧rather than guessing wrong. - RTL: ar is RTL; if a string embeds markup/numbers/units, sanity-check direction.
Output checklist
- Every new key exists in BOTH en and ar (nested path identical)
- Uncertain Arabic marked
⟦AR⟧, surfaced to the user — never a silent omission - Key added to the correct module file (page module vs
common.json) t()/trans()call uses the correct dotted path- For an audit: drift grouped by module, counts for missing/empty/orphan
Other versions3 projects use a version of this.
Word for word · 1
- AhmedMerza/claude-skills★ 2100% same
Edited · 0
None found.
Wrote their own version · 2
- devlint/GitWand★ 190same name
- Khushbu-snapdevio/claude-skill-i18n-sync★ 0same 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 repository53 other files it gives its agents.
- animateSkill
- api-docs-completeSkill
- best-optionSkill
- browseSkill
- changelog-generateSkill
- checkpointSkill
- claimSkill
- commitSkill
- courtSkill
- design-driftSkill
- designSkill
- expandSkill
- explainSkill
- fix-reviewSkill
- grill-meSkill
- handover-listSkill
- handover-resumeSkill
- handover-saveSkill
- issueSkill
- leadSkill
- mr-approveSkill
- mr-assignSkill
- mr-createSkill
- mr-guideSkill
- mr-listSkill
- mr-mergeSkill
- mr-review-requestSkill
- mr-reviewSkill
- mr-statusSkill
- persona-walkthroughSkill
- ponytailSkill
- prove-the-testSkill
- qa-crawlSkill
- qa-sweepSkill
- reflectSkill
- reviewSkill
- root-causeSkill
- scoutSkill
- second-opinionSkill
- ship-checkSkill
- skill-auditSkill
- skill-compareSkill
- spinoffSkill
- story-siteSkill
- tool-compareSkill
- ui-auditSkill
- ui-polishSkill
- usage-weekSkill
- ux-auditSkill
- validate-planSkill
- video-teardownSkill
- wait-whatSkill
- where-were-weSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

