]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
templates: Filter out POSIX locale for translation
authorMichael Chang <mchang@suse.com>
Tue, 26 Oct 2021 07:11:00 +0000 (15:11 +0800)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 22 Nov 2021 14:55:06 +0000 (15:55 +0100)
The POSIX locale is default or native operating system's locale
identical to the C locale, so no translation to human speaking languages
are provided. For this reason we should filter out LANG=POSIX as well as
LANG=C upon generating grub.cfg to avoid looking up for it's gettext's
message catalogs that will consequently result in an unpleasant message:

  error: file `/boot/grub/locale/POSIX.gmo' not found

Signed-off-by: Michael Chang <mchang@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub.d/00_header.in

index 93a90233ead40bfbb9d0994ae41098aa884a36d7..f74c2a4c6df74779b9ed7ba7cce477afc03ec006 100644 (file)
@@ -191,7 +191,7 @@ EOF
 EOF
 
 # Gettext variables and module
-if [ "x${LANG}" != "xC" ] &&  [ "x${LANG}" != "x" ]; then
+if [ "x${LANG}" != "xC" ] && [ "x${LANG}" != "xPOSIX" ] && [ "x${LANG}" != "x" ]; then
   cat << EOF
   set locale_dir=\$prefix/locale
   set lang=${grub_lang}