add new strings to .po files as part of template update

Pontoon appears to only update existing gettext translations; it
won't add new ones on its own. Fixes
https://forums.ankiweb.net/t/anki-2-1-28-beta/629/6
This commit is contained in:
Damien Elmes 2020-07-02 09:53:57 +10:00
parent 97869d0f57
commit dfda5750a1

View file

@ -1,6 +1,7 @@
#!/bin/bash
#
# update template .pot file from source code strings
# update template .pot file from source code strings,
# and merge new strings into translations
#
set -eu -o pipefail ${SHELLFLAGS}
@ -19,3 +20,8 @@ done
xgettext -cT: -s --no-wrap --files-from=$all --output=qt/po/repo/desktop/anki.pot
rm $all
cd qt/po/repo/desktop
for dir in $(ls | grep -v anki.pot); do
msgmerge --no-wrap -U --backup off $dir/anki.po anki.pot
done