From: Bruno Haible Date: Sun, 6 Sep 2020 19:28:50 +0000 (+0200) Subject: Fix matching of languages in the LINGUAS environment variable. X-Git-Tag: v0.21.1~55 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0cacac3ccf8a413c8419bee28263ac604aec1b2;p=thirdparty%2Fgettext.git 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 in . * 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. --- 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