File 0001-templates-Filter-out-POSIX-locale-for-translation.patch of Package grub2.22357

From 8d2b8981cf897d9577ffcd016619a3751288d89f Mon Sep 17 00:00:00 2001
From: Michael Chang <mchang@suse.com>
Date: Tue, 26 Oct 2021 15:11:00 +0800
Subject: [PATCH] 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 <mchang@suse.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 util/grub.d/00_header.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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}
-- 
2.31.1

openSUSE Build Service is sponsored by