From dfda5750a13cbcede51fcf7632e040d80e2c7760 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 2 Jul 2020 09:53:57 +1000 Subject: [PATCH] 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 --- qt/po/scripts/update-po-template | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/qt/po/scripts/update-po-template b/qt/po/scripts/update-po-template index d36abc917..6a734d07b 100755 --- a/qt/po/scripts/update-po-template +++ b/qt/po/scripts/update-po-template @@ -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