1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

updatepo: Drop strings that are obsolete for >1 script run

This automatically removes old (and unused) translation strings such
that the amount of garbage is kept in bounds.
This commit is contained in:
SmallJoker 2025-07-11 20:02:59 +02:00
parent 15f41eb82e
commit 3dd99e1492

View file

@ -82,7 +82,10 @@ for lang in $langs ; do # note the missing quotes around $langs
pofile=po/$lang/luanti.po pofile=po/$lang/luanti.po
if test -e $pofile; then if test -e $pofile; then
echo "[$lang]: updating strings" echo "[$lang]: updating strings"
msgmerge --update --sort-by-file $pofile $potfile # Drop old strings *before* updating such that they can be re-used
# until this script is run again.
msgattrib --output-file=$pofile --no-obsolete $pofile
msgmerge --update --backup=none --sort-by-file $pofile $potfile
else else
# This will ask for the translator identity # This will ask for the translator identity
echo "[$lang]: NEW strings" echo "[$lang]: NEW strings"