agentleFS
kasimmjkasimmj/claude-skills-mega/skills/i18n-translate/SKILL.md

i18n-translate

Skill1 starsChanged 6 months agoMITView on GitHub

Extract user-facing strings from source code into locale files, then translate them across locales. Supports JSON, YAML, .po, and Flutter .arb formats.

8 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use vercel-react-best-practices.

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.
  • VercelSkill

    vercel-react-best-practices

    React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If nothing exists, propose a setup based on the framework.

    line 29
  2. Distinctive:

    If you're translating to Arabic specifically, also configure:

    line 58

“Common” is measured: kept by at least 6 in 10 of the 7 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

i18n Translate Skill

You are setting up or extending internationalization (i18n) for the project.

Step 1 — Detect the i18n framework

Look for:

  • i18next.config.*, react-i18next → JSON locale files
  • next-intl, next-i18next → JSON or messages/
  • vue-i18n → JSON or YAML
  • Flutter — .arb files
  • Django — .po files via gettext
  • Rails — config/locales/*.yml

If nothing exists, propose a setup based on the framework.

Step 2 — Extract strings

Scan the source for hardcoded user-facing strings:

  • JSX/TSX: text inside elements, button labels, placeholders, alt text
  • HTML templates: text content, attributes
  • Markdown content in code (rare but possible)

Skip:

  • Log messages (dev-facing)
  • Test fixtures
  • Strings already wrapped in t(), $t(), gettext(), tr(), etc.

For each extracted string, generate a stable key like <screen>.<element>.<action>:

LoginScreen.submitButton.label = "Sign In"
LoginScreen.emailField.placeholder = "Enter your email"

Step 3 — Translate

For each target locale, translate the values:

  • Arabic (ar) — RTL. Watch out for proper plurals (Arabic has 6).
  • Spanish (es) — formal vs. informal. Default to formal (usted).
  • French (fr) — match gender of nouns. Watch agreement.
  • Japanese (ja) — no plurals, but politeness levels matter.
  • Chinese (zh-CN / zh-TW) — Simplified vs. Traditional.

If you're translating to Arabic specifically, also configure:

  • RTL flag in the framework
  • Mirror padding/margins (e.g., padding-left → padding-inline-start)

Step 4 — Replace strings in source

Replace hardcoded strings with the i18n call:

// before
<button>Sign In</button>

// after
<button>{t('LoginScreen.submitButton.label')}</button>

Step 5 — Output

Generate:

  • One updated locale file per language
  • A patch/diff for the source files
  • A short summary: "X strings extracted, Y locales updated, Z files modified"

When NOT to use

  • The project has no UI (CLI tools, libraries)
  • Strings are already extracted but need re-translation (use i18n-retranslate if available)

Failure modes

  • ⚠️ Machine translations are a starting point. Recommend a human review for production.
  • ⚠️ Watch for context-dependent words ("post" — verb? noun? blog post? mail?). When ambiguous, ask the user.
  • ⚠️ Plural forms: don't fake them. Use the framework's plural API (t('items.count', { count: n })).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.