From 145bb6e01a0da5195d2b722db38122094761c45a Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 14 Apr 2019 10:42:22 +0200 Subject: [PATCH] build: don't do fuzzy matching when merging PO files against the POT file Fuzzy strings don't contribute anything to the translations that the users get to see. They are useful only for translators, but translators fetch or receive their PO files from the TP. For nano, fuzzy strings just bloat the distribution tarball. --- po/Makevars | 3 +++ po/update_linguas.sh | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/po/Makevars b/po/Makevars index 67434a5f..4e2ea72a 100644 --- a/po/Makevars +++ b/po/Makevars @@ -17,3 +17,6 @@ COPYRIGHT_HOLDER = Free Software Foundation, Inc. # This is the list of locale categories, beyond LC_MESSAGES, for which the # message catalogs shall be used. It is usually empty. EXTRA_LOCALE_CATEGORIES = + +# Don't do fuzzy matching when merging the PO files against the POT file. +MSGMERGE_OPTIONS = --no-fuzzy-matching diff --git a/po/update_linguas.sh b/po/update_linguas.sh index c52f5b9c..17a90d21 100755 --- a/po/update_linguas.sh +++ b/po/update_linguas.sh @@ -21,9 +21,9 @@ fi echo "Regenerating POT file and remerging and recompiling PO files..." make update-po -echo "Removing the dead weight of obsolete translations..." +echo "Removing the dead weight of obsolete and fuzzy translations..." for pofile in *.po; do - msgattrib --no-obsolete $pofile >trimmed.po || exit 4 + msgattrib --no-obsolete --no-fuzzy $pofile >trimmed.po || exit 4 mv trimmed.po $pofile || exit 4 done