callumalpass_tasknotes/i18n-state.config.json
callumalpass a65a4c9138 feat: Migrate to i18n-state-manager CLI tool
Replace custom scripts/i18n-manager.mjs with the new i18n-state-manager
package, which provides a more robust and feature-rich translation
management system.

Changes:
- Add i18n-state.config.json with project-specific patterns
- Update package.json scripts to use i18n-state CLI
- Update I18N_GUIDE.md with new tool documentation

Configuration:
- Configured patterns for this.t(), this.translate(), i18n.translate()
- Source locale: en
- 7 supported locales: de, es, fr, ja, ru, zh
- Scan directories: src/

New features available:
- find-unused: Identify potentially unused translation keys
- check-duplicates: Detect duplicate keys in translation files
- Improved stale detection with hash-based state tracking
- Better error messages and validation
- Ripgrep-based code scanning for performance

Documentation updates:
- Remove emoji formatting for professional tone
- Add ripgrep installation instructions
- Document new configuration file format
- Add examples for new commands
- Update all command outputs to reflect actual CLI behavior
- Add troubleshooting for common issues

The old scripts/i18n-manager.mjs can be removed in a future commit.
2025-11-04 13:50:02 +11:00

26 lines
654 B
JSON

{
"sourceLocale": "en",
"resourcesDir": "src/i18n/resources",
"manifestPath": "i18n.manifest.json",
"statePath": "i18n.state.json",
"scanDirs": ["src"],
"scanExtensions": ["ts", "tsx", "js", "jsx"],
"patterns": [
{
"name": "this.t()",
"regex": "this\\.t\\([\"']([^\"']+)[\"']\\)"
},
{
"name": "this.translate()",
"regex": "this\\.translate\\([\"']([^\"']+)[\"']\\)"
},
{
"name": "i18n.translate()",
"regex": "i18n\\.translate\\([\"']([^\"']+)[\"']\\)"
},
{
"name": "i18nService.translate()",
"regex": "i18nService\\.translate\\([\"']([^\"']+)[\"']\\)"
}
]
}