OpenParable
Skip to content
← Back to skills

Translations

Development
translations

Translations is an Agent Skill for development published in the HiEventsDev/Hi.Events repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Frontend translation workflow using Lingui - extracting, adding, and compiling translations for all supported languages

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/HiEventsDev/Hi.Events/blob/HEAD/.claude/skills/translations/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/translations, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Frontend Translation Workflow (Lingui)

IMPORTANT: Always update translations as you develop features. When adding new translatable strings, immediately add translations for all supported languages.

Core Commands

cd frontend

# Extract translatable strings (use --clean for accurate counts)
yarn messages:extract --clean

# Compile translations for production
yarn messages:compile

# Check for untranslated strings
cd scripts && ./list_untranslated_strings.sh

Process

  1. Extract: yarn messages:extract --clean
  2. Check: Look at the output table for missing translation counts
  3. Add translations: Update the .po files for each language
  4. Verify: Run extract again to confirm 0 missing
  5. Compile: yarn messages:compile

Adding Translations

Add entries to each locale's .po file in frontend/src/locales/:

#: src/path/to/component.tsx:123
msgid "Your English String"
msgstr "Translated String"

Supported Languages

CodeLanguage
enEnglish (source - no translation needed)
deDeutsch
esEspanol
frFrancais
ptPortugues
pt-brPortugues do Brasil
itItaliano
nlNederlands
zh-cnSimplified Chinese
zh-hkTraditional Chinese (HK)
viTieng Viet
ruRussian (currently untranslated)

Troubleshooting

  • Counts seem wrong: Use --clean flag to remove obsolete entries
  • Translation not appearing: Run yarn messages:compile after adding
  • Syntax errors: Check for proper escaping of quotes in .po files