Simplify the translation workflow to make it work more smoothly with Weblate
-
Remove all old translation files
-
Now the string extraction tools will generate only files for English. That happens because all the other languages should be managed by Weblate.
-
rename target makemessages to messages only and include the extraction of strings from Go files part of it.
How to test:
This is a two steps process:
First, extract the translatable strings from the source code with:
- make messages
The two resulting files are po/backend.pot and po/webui.pot
Then you can make the translatable strings available:
Until we generate the files for other languages via weblate, one can
locally just copy the reference /po/en
directory to something else,
like:
$ cp -r po/en po/de
Then change the file po/de/LC_MESSAGES/webui.po, line 9 to "Language: de". Also change some translations so you can see the difference visually in the application later.
Finally, build the application with "make release" and you'll be able to see the new strings there.
An example on a quick test with pt_BR
, using such procedure: