summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-09-06 21:28:50 +0200
committerBruno Haible <bruno@clisp.org>2022-10-09 09:30:42 +0200
commita0cacac3ccf8a413c8419bee28263ac604aec1b2 (patch)
tree3e8db276bcd30624939cc594894b861d4a155ea6
parentbc6f97b9accbdc935185dc3579d78075b029a090 (diff)
downloadgettext-a0cacac3ccf8a413c8419bee28263ac604aec1b2.tar.gz
Fix matching of languages in the LINGUAS environment variable.
Setting LINGUAS e.g. to "frs" should not cause fr.mo to get installed, because Frisian is not a variant of French. Reported by <arfrever.fta@gmail.com> in <https://savannah.gnu.org/bugs/?59062>. * gettext-runtime/m4/po.m4 (AM_PO_SUBDIRS, AM_POSTPROCESS_PO_MAKEFILE): Don't consider $desiredlang a variant of $presentlang unless it has the syntax of a variant.
-rw-r--r--gettext-runtime/m4/po.m410
1 files changed, 7 insertions, 3 deletions
diff --git a/gettext-runtime/m4/po.m4 b/gettext-runtime/m4/po.m4
index ace6f960a..2f14f8e2b 100644
--- a/gettext-runtime/m4/po.m4
+++ b/gettext-runtime/m4/po.m4
@@ -1,4 +1,4 @@
-# po.m4 serial 31 (gettext-0.20.2)
+# po.m4 serial 32 (gettext-0.21.1)
dnl Copyright (C) 1995-2014, 2016, 2018-2022 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -179,7 +179,9 @@ changequote([,])dnl
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
- "$presentlang"*) useit=yes;;
+ "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
+ useit=yes
+ ;;
esac
done
if test $useit = yes; then
@@ -379,7 +381,9 @@ changequote([,])dnl
# presentlang can be used as a fallback for messages
# which are not translated in the desiredlang catalog).
case "$desiredlang" in
- "$presentlang"*) useit=yes;;
+ "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*)
+ useit=yes
+ ;;
esac
done
if test $useit = yes; then