mirror of https://github.com/halo-dev/halo
![]() #### What type of PR is this? /area ui /kind feature /milestone 2.20.x #### What this PR does / why we need it: Added three Node.js scripts to help manage YAML translation files: 1. `find_missing_translations.mjs`: Identifies missing translations by comparing language files with the English base file and generates _missing_translations_*.yaml files. 2. `apply_missing_translations.mjs`: Merges translated entries from missing translation files into the main language files, while preserving untranslated entries for future work. 3. `fix_translations.mjs`: Removes keys that exist in language files but not in the English base file. Usage Example: ``` # Find missing translations node scripts/find_missing_translations.mjs # Apply only the translated entries node scripts/apply_missing_translations.mjs # Remove extra keys node scripts/fix_translations.mjs ``` These scripts streamline the translation workflow and help maintain consistency across language files. #### Which issue(s) this PR fixes: None #### Special notes for your reviewer: #### Does this PR introduce a user-facing change? ```release-note None ``` |
||
---|---|---|
.. | ||
apply_missing_translations.mjs | ||
find_missing_translations.mjs | ||
fix_translations.mjs |