- Home
- Skills
- Translation & Localization
- Bilingual EN/ES Retrofit Kit
Bilingual EN/ES Retrofit Kit
This kit takes the retrofit route and makes it safe.
$39
Works with the AI Agents you already use
Bilingual EN/ES Retrofit Kit
Example session with this skill installed
Our Express + vanilla JS customer portal needs Spanish by the end of the month. We can't rewrite the templates. Set it up and tell me what's still untranslated.
- Read your context and instructions
- Compiled the bilingual en es
Summary
Spanish is live behind the language switch with 312 of 348 user-visible strings covered by the dictionary and 9 pattern rules. The coverage gate is in CI and currently lists 36 strings for translation, 11 of which are legal, billing or safety copy that need your reviewer. Emails and SMS follow the saved preference. Public pages have /es/ twins with reciprocal hreflang.
What changed
| Area | Change |
|---|---|
| Engine | public/assets/i18n-engine.js loaded before app.js; data-no-i18n on the rich-text editor and on <pre> blocks; data-i18n-toggle on the footer language link |
| Dictionary | public/locales/es.json: 312 entries + 9 @patterns (counts, "Page N of M", "Saved <time>", "Could not save: <reason>", invoice totals); @ignore: Acme, PDF, CSV, IBAN |
| Server | users.preferred_language column (migration 0042); resolution middleware (path, query, user, cookie, Accept-Language); t() on 27 API error messages; /api/me/language endpoint |
6 transactional templates duplicated under emails/es/; subject lines and footer included | |
| SMS | Spanish bodies for the 3 notifications; STOP/HELP kept literal with "Responda STOP para cancelar" appended |
| SEO | 14 public pages twinned under /es/, own titles and descriptions, canonical, hreflang en/es/x-default, both in sitemap.xml; noindex on /app/ |
| CI | check-locales.mjs and i18n-coverage.mjs added to the test job |
Coverage gate output
$ node scripts/i18n-coverage.mjs --dict public/locales/es.json --src public --src views --src src/api
i18n coverage: scanned 61 file(s), 348 string occurrence(s), dictionary (312 entries, 9 patterns)
FAIL: 36 user-visible string(s) have no dictionary entry and match no pattern.
views/billing/invoice.ejs:44 "Your card will be charged on the due date." [billing: human review]
views/legal/terms.ejs:12-88 31 strings [legal: human review]
public/js/alerts.js:9 "If you are in danger, call 911." [safety: human review]
views/account/profile.ejs:27 "Two-factor authentication is on"
views/account/profile.ejs:31 "Recovery codes"
public/js/upload.js:52 "{count} files ready" -> suggested pattern: ^(\d+) files? ready$
Still open
- 11 legal/billing/safety strings: sent to your reviewer with the dictionary keys; do not machine-translate these.
- 25 remaining UI strings: translations proposed in
locales/es.pending.json; merge after a skim. - Android app: out of scope this month (
reference/adding-a-language.mdsection 9).
check-locales.mjs passes: no placeholder mismatches, no untranslated values, all 9 patterns compile.
Connects securely to your tools. The creator never sees your data.
About this skill
The standard route to a second language is wrapping every string in t() and extracting keys, which on an existing app means touching every template and shipping nothing for weeks. This kit takes the retrofit route and makes it safe.
How it works: English rendered text is the dictionary key. A 200-line runtime engine (scripts/i18n-engine.js, one script tag) translates text nodes and the alt, aria-label, placeholder and title attributes, watches the DOM for anything rendered later, and applies ordered @patterns rules for counts, plurals and appended details. Anything not in the dictionary stays in English on purpose, which is how user data, names and codes are protected.
What keeps it honest:
scripts/i18n-coverage.mjs: scans HTML, JS, templates and optionally server files for user-visible strings and fails CI on any that has no entry, no pattern and is not pure data. It also fails if it finds suspiciously few strings, so a broken scan cannot pass as clean.scripts/check-locales.mjs: validates locale files (placeholder parity, patterns compile, no shadowed keys, no untranslated values, key parity across languages).- A sample dictionary with 30 generic UI strings and 7 pattern rules.
References: server-side resolution order and a preferred_language column, Express middleware, server t() for API error messages, per-language email templates, SMS rules (STOP/HELP literal), a React provider for apps that are not server-rendered, the twelve-surface add-a-language checklist (manifest through store listings), and a bilingual SEO checklist with reciprocal hreflang, x-default, sitemap twins and the tests to keep green.
Node 20+, no packages, no network. Spanish is the worked example; the mechanism is language-agnostic.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Translation & Localization.
Requires Node 20+. Does not support RTL layouts. Identical English strings require pattern rules for different contextual translations. DOM observation adds slight overhead to heavy updates.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 19 days ago
- Software
Node.js 20 or later