Agent Templates
Localization Steward Agent
i18n/l10n management and translation sync
Localization Steward Agent
The Localization Steward Agent manages internationalization workflows, detects hardcoded strings, and keeps translation files in sync.
What It Does
- Detects hardcoded strings - Finds user-visible text not wrapped in i18n functions
- Validates translation keys - Ensures consistency across language files
- Pseudo-localization tests - Catches layout issues before translation
- Syncs translations - Keeps all locale files updated
- Suggests translations - Uses AI to suggest missing translations
Supported Frameworks
| Framework | i18n Library | Support | |-----------|--------------|---------| | React | react-i18next | Full | | Next.js | next-intl | Full | | Vue | vue-i18n | Full | | Angular | ngx-translate | Full | | Node.js | i18n | Full |
Configuration
agents:
- name: localization-steward
template: localization-steward
triggers:
pull_request:
- opened
- synchronize
config:
# Base language for translations
base_language: en
# Supported locales
locales:
- en
- es
- fr
- de
- ja
# Path to translation files
translation_path: "src/locales"
# Check for text expansion issues
check_text_expansion: true
# RTL language support
check_rtl_support: true
Detection Examples
The agent flags issues like:
⚠️ Hardcoded String Detected
**Location:** src/components/Button.tsx:15
**String:** "Submit Form"
Wrap in translation function:
{t('button.submit')}
Add to en.json:
"button.submit": "Submit Form"
Translation Sync
When new keys are added to the base language:
- Agent detects missing keys in other locales
- Creates PR with placeholder translations
- Optionally uses AI to suggest translations
- Marks translations for human review