This directory contains scripts for maintaining and checking translations across all language files.
A comprehensive status checker that:
- Verifies all language files have the same keys as the English reference file
- Identifies English text that may need translation
- Provides a summary report of translation completeness
Usage:
node scripts/translation-status.js
Output:
- Lists each language with missing keys (if any)
- Shows English text found in translations
- Provides summary statistics
- Gives recommendations for improvement
As of the last check:
- ✅ 29/29 languages (100%) have all required keys
⚠️ 1,843 English texts found across all languages (reduced from 2,112)- 📊 Average of 64 English texts per language (reduced from 73)
- 🎯 2 languages (AR, JA, ZH) have no English text remaining
The application supports 29 languages:
- Arabic (ar)
- Bengali (bn)
- Catalan (ca)
- Czech (cs)
- Danish (da)
- German (de)
- Greek (el)
- Estonian (et)
- Basque (eu)
- Finnish (fi)
- French (fr)
- Galician (gl)
- Hebrew (he)
- Hindi (hi)
- Hungarian (hu)
- Italian (it)
- Japanese (ja)
- Korean (ko)
- Malay (ms)
- Dutch (nl)
- Punjabi (pa)
- Polish (pl)
- Portuguese (pt)
- Romanian (ro)
- Russian (ru)
- Swedish (sv)
- Turkish (tr)
- Chinese (zh)
- Always add new keys to
src/locales/en.jsonfirst - Run
translation-status.jsto identify missing keys in other languages - Add appropriate translations for all languages
- Consider using a translation service for consistency
English text in translations may be intentional for:
- Technical terms that should remain in English (e.g., "Dashboard", "API")
- Brand names or proper nouns
- Placeholder text that needs translation
- UI elements that are commonly left in English
- Weekly action descriptions that are more complex to translate
- Financial terms that may be standardized across languages
- Consistency: Use consistent terminology across the application
- Context: Consider the context when translating (e.g., "Settings" vs "Configuration")
- Cultural Sensitivity: Be aware of cultural differences in expressions
- Length: Consider UI space constraints when translating
- Variables: Preserve interpolation variables like
{date},{count}, etc.
- Regular Checks: Run
translation-status.jsweekly to catch missing keys - New Features: Always check translations when adding new features
- Quality Review: Periodically review English text to identify translation opportunities
- User Feedback: Consider user feedback about translation quality
src/locales/
├── en.json # Reference file (English)
├── ar.json # Arabic
├── bn.json # Bengali
├── ca.json # Catalan
├── cs.json # Czech
├── da.json # Danish
├── de.json # German
├── el.json # Greek
├── et.json # Estonian
├── eu.json # Basque
├── fi.json # Finnish
├── fr.json # French
├── gl.json # Galician
├── he.json # Hebrew
├── hi.json # Hindi
├── hu.json # Hungarian
├── it.json # Italian
├── ja.json # Japanese
├── ko.json # Korean
├── ms.json # Malay
├── nl.json # Dutch
├── pa.json # Punjabi
├── pl.json # Polish
├── pt.json # Portuguese
├── ro.json # Romanian
├── ru.json # Russian
├── sv.json # Swedish
├── tr.json # Turkish
└── zh.json # Chinese
- Missing Keys: If a language is missing keys, they will be automatically added with English placeholders
- JSON Syntax Errors: Check for trailing commas or missing brackets
- Encoding Issues: Ensure files are saved in UTF-8 encoding
- Check the console output for specific error messages
- Verify JSON syntax with a JSON validator
- Compare with the English reference file for structure