From: Michael Chang Date: Tue, 26 Oct 2021 07:11:00 +0000 (+0800) Subject: templates: Filter out POSIX locale for translation X-Git-Tag: grub-2.12-rc1~528 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5983c2c6adf1c1bbb3ecd751253d1e898bdfd8a3;p=thirdparty%2Fgrub.git templates: Filter out POSIX locale for translation 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 Reviewed-by: Daniel Kiper --- diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in index 93a90233e..f74c2a4c6 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -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}