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