67f07b7
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
67f07b7
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
67f07b7
Date: Tue, 29 Jun 2021 13:17:42 +0200
67f07b7
Subject: [PATCH] Suppress gettext error message
67f07b7
67f07b7
Colin Watson's patch from comment #11 on the upstream bug:
67f07b7
https://savannah.gnu.org/bugs/?35880#comment11
67f07b7
67f07b7
Resolves: rhbz#1592124
67f07b7
67f07b7
Signed-off-by: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
67f07b7
---
67f07b7
 grub-core/gettext/gettext.c | 7 +++++++
67f07b7
 1 file changed, 7 insertions(+)
67f07b7
67f07b7
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
e622855
index 4d02e62c10..7ec81ca0b4 100644
67f07b7
--- a/grub-core/gettext/gettext.c
67f07b7
+++ b/grub-core/gettext/gettext.c
67f07b7
@@ -424,6 +424,13 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
67f07b7
       grub_free (lang);
67f07b7
     }
67f07b7
 
67f07b7
+  /* If no translations are available, fall back to untranslated text. */
67f07b7
+  if (err == GRUB_ERR_FILE_NOT_FOUND)
67f07b7
+    {
67f07b7
+      grub_errno = GRUB_ERR_NONE;
67f07b7
+      return 0;
67f07b7
+    }
67f07b7
+
67f07b7
   if (locale[0] == 'e' && locale[1] == 'n'
67f07b7
       && (locale[2] == '\0' || locale[2] == '_'))
67f07b7
     grub_errno = err = GRUB_ERR_NONE;