We have web application, which does use gettext (po and pot files) for translations. We have custom script which searches our codebase (java) for strings marked for translations and generates pot (and also po) files. We have a few separate branches, which does live longer (different customers) and occasionally they get merged into main branch. We have imported branches into weblate and we are doing translations on main branch, which propagate translated strings also to other branches (weblate components).
What is a proper way to introduce new translations? Is this approach going to work?
- introduce new code with new translatable string (branch customerA)
- generate pot files for given branch and commit them
- weblate will pull given changes and according new strings in pot it will show in customerA new strings for translations
- do msgmerge customerA pot files into main branch pot files manually?
- use “Update PO files to match POT (msgmerge)” addon to generate correct po files in customerA branch
Is this correct approach? Is there any better one?
I have tried to reason about possible combination of po and pot files commit, but all of them finished in conflict needing proper po files merging (which I would like to avoid).
Using msgmerge (as a weblate add-on) can be possible solution, but I wonder if there is a cleaner approach.