Simple script to extract translatable texts from .qml and .js files, manage JSON translation files, and update/create language files.
- Python 3
- No extra libraries required
./trman.sh -s <source-folder> -t <translations-folder>./trman.sh -s . -t eqsh/translations
languages: de_DE,en_US,es_ES,it_IT,ja_JA-
The script extracts texts from
.qmland.jsfiles in the source folder. -
Creates a temporary JSON file with all extracted texts.
-
Prompts for which language files to create/update (comma-separated, e.g.,
en_EN,de_DE,it_IT). -
Updates the translation files:
- Keeps existing translations for keys that still exist.
- Removes keys that no longer exist.
- Adds missing keys with default value = key.
-
Creates backups of existing translation files in
backups/.