Add generate-template command that creates translation files with
state-based detection of missing and stale translations. Uses the
same hash verification logic as the verify command to properly
identify outdated translations when source text changes.
- Add i18n:generate-template npm script
- Mark missing translations as "TODO: English text"
- Mark stale translations as "STALE: old translation"
- Preserve up-to-date translations
- Show statistics for missing/stale/up-to-date keys
- Update I18N_GUIDE.md with template generation workflow
- Add new i18n commands:
- npm run i18n:find-unused - Find keys in en.ts not used in source code
- npm run i18n:check-duplicates - Check for duplicate keys in translation files
- npm run i18n:check-usage - Verify all keys used in code exist in en.ts
- Update all i18n commands to show complete lists instead of truncated summaries
- i18n:verify now shows all missing/stale keys (not just first 10)
- i18n:find-unused shows all potentially unused keys
- Enables piping to files, filtering, and scripting
- Add refactoring script scripts/refactor-i18n-calls.mjs
- Standardizes translation function calls to this.translate()
- Includes dry-run mode for safe preview
- Ready to run when needed to improve consistency
- Enhance I18N_GUIDE.md with:
- Documentation for all new commands
- Best practices for translation usage patterns
- Claude Code integration documentation
- Comprehensive troubleshooting section
- Usage verification workflow examples
- Update /translate-missing slash command to read I18N_GUIDE.md
- Ensures AI translations follow documented guidelines
All i18n commands now detect 5 translation patterns:
- t("key")
- translate("key")
- this.t("key")
- this.translate("key")
- plugin.i18n.translate("key")
Achieves 76% static analysis coverage (1172/1540 keys detected)
- Add i18n management script with sync, verify, and status commands
- Integrate GitHub Actions workflow to enforce translation consistency
- Generate initial manifest (1209 keys) and state files for English/French
- Add package.json scripts for easy i18n workflow management
- Create comprehensive I18N_GUIDE.md with usage examples and best practices
Features:
- Automatic detection of missing/stale translations
- CI/CD enforcement preventing deployment of untranslated strings
- Hash-based tracking system for source string changes
- Support for multiple locales with individual progress tracking
- TypeScript file parsing with automatic cleanup
This ensures translation quality and prevents regressions while providing
clear workflows for both developers and translators.