1
0
Fork 0
grub2/debian/patches/gettext-quiet.patch
Daniel Baumann 4cf387939d
Adding debian version 2.12-8.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 15:25:08 +02:00

29 lines
928 B
Diff

From: Colin Watson <cjwatson@ubuntu.com>
Date: Mon, 13 Jan 2014 12:13:02 +0000
Subject: Silence error messages when translations are unavailable
Bug: https://savannah.gnu.org/bugs/?35880
Forwarded: https://savannah.gnu.org/bugs/?35880
Last-Update: 2013-11-14
Patch-Name: gettext-quiet.patch
---
grub-core/gettext/gettext.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
index 7a1c14e..7422f89 100644
--- a/grub-core/gettext/gettext.c
+++ b/grub-core/gettext/gettext.c
@@ -427,6 +427,11 @@ grub_gettext_init_ext (struct grub_gettext_context *ctx,
if (locale[0] == 'e' && locale[1] == 'n'
&& (locale[2] == '\0' || locale[2] == '_'))
grub_errno = err = GRUB_ERR_NONE;
+
+ /* If no translations are available, fall back to untranslated text. */
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
+ grub_errno = err = GRUB_ERR_NONE;
+
return err;
}