$ recombobulate _
home / tips / generate-i18n-translation-files-from-your-codebase
0

Generate i18n Translation Files from Your Codebase

bagwaa @bagwaa · Mar 25, 2026 · Workflows
generate-i18n-translation-files-from-your-codebase

Managing translation files by hand is a recipe for missing keys and stale strings — let Claude scan your codebase and generate them for you.

cat src/**/*.tsx | claude -p "Find all hardcoded user-facing strings in this code and generate a complete en.json i18n file with appropriate translation keys. Group related keys by feature."

Once you have the base locale file, ask Claude to generate translations for additional languages:

cat locales/en.json | claude -p "Translate all values in this JSON to Spanish (es) and French (fr). Return two separate JSON objects, keeping the same key structure and respecting any {placeholder} variables."

Claude handles nested key structures, placeholder variables like {name}, and pluralization rules correctly. You can also ask it to audit an existing locale file against your source code to surface orphaned keys or missing translations:

# Find keys in your source that have no translation entry
claude -p "Compare these two files: my source code and my en.json. List any user-facing strings in the source that are missing from the locale file."

The result is a consistent, well-structured i18n setup you'd normally spend hours maintaining by hand.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 1 hour ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 1 hour ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago