build: remove obsolete translations from the PO files after merging
These obsolete strings contribute nothing to the translations that the users get to see. They are somewhat useful only for translators. But as nano is registered at the Translation Project, translators fetch or receive their PO file from there (or they keep their own archive), so these obsolete strings are not getting lost. But for nano, they just burden the distribution tarball.master
parent
1fe3e2ed69
commit
3604ad2950
|
@ -21,8 +21,11 @@ fi
|
||||||
echo "Regenerating POT file and remerging and recompiling PO files..."
|
echo "Regenerating POT file and remerging and recompiling PO files..."
|
||||||
make update-po
|
make update-po
|
||||||
|
|
||||||
# Ensure that the PO files are newer than the POT.
|
echo "Removing the dead weight of obsolete translations..."
|
||||||
touch *.po
|
for pofile in *.po; do
|
||||||
|
msgattrib --no-obsolete $pofile >trimmed.po || exit 4
|
||||||
|
mv trimmed.po $pofile || exit 4
|
||||||
|
done
|
||||||
|
|
||||||
# If needed, fix a problem in the Makefile template.
|
# If needed, fix a problem in the Makefile template.
|
||||||
grep -q '^datarootdir' Makefile.in.in || \
|
grep -q '^datarootdir' Makefile.in.in || \
|
||||||
|
|
Loading…
Reference in New Issue