halo/ui/scripts
Ryan Wang 62f479253e
feat: add i18n tooling scripts and refine translations (#7269)
#### 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
```
2025-03-06 10:16:59 +00:00
..
apply_missing_translations.mjs feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00
find_missing_translations.mjs feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00
fix_translations.mjs feat: add i18n tooling scripts and refine translations (#7269) 2025-03-06 10:16:59 +00:00