From f710b42a53d7b4ac5dbe95efcabe41fb4682978c Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Wed, 3 Apr 2024 12:48:03 +0300 Subject: [PATCH] kdeqt.sh: new script for updating the kdeqt translations Signed-off-by: Ivailo Monev --- kdeqt.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 kdeqt.sh diff --git a/kdeqt.sh b/kdeqt.sh new file mode 100755 index 0000000..61d9143 --- /dev/null +++ b/kdeqt.sh @@ -0,0 +1,22 @@ +#! /usr/bin/env bash + +pot="$HOME/Katie/translations/qt.pot" + +if [ ! -e "$pot" ]; then + echo "Could not find the Katie pot" + exit 1 +elif ! type -p msgmerge ;then + echo "msgmerge is not in your PATH" + exit 1 +elif ! type -p msgattrib ;then + echo "msgattrib is not in your PATH" + exit 1 +fi + +name="kdeqt.po" +for p in $(find kde-l10n/ -name "$name");do + echo "Updating $p..." + msgmerge --update --no-fuzzy-matching "$p" "$pot" + echo "Cleaning up $p..." + msgattrib --no-obsolete "$p" -o "$p" +done