Script to update translations automatically

This commit is contained in:
fonskip 2024-06-14 09:11:53 +02:00
parent 7163977f09
commit 2bcd3dcafa
2 changed files with 20 additions and 0 deletions

View file

@ -36,5 +36,8 @@ version-check:
translate:
bash scripts/compile-translations.sh
update-translations:
bash scripts/update-translations.sh
f40:
GETTEXT_SYSTEM=true cargo build --release

View file

@ -0,0 +1,17 @@
#!/bin/bash
for dir in $(find po -type d)
do
if [ -d "$dir/LC_MESSAGES" ]; then
fname="$(basename "$dir")";
(
set -x
msgmerge \
--verbose \
--no-fuzzy-matching \
--backup=none \
--update \
"$dir/LC_MESSAGES/$fname.po" "po/boxbuddy.pot"
)
fi
done