2012-10-07 19:00:03 +02:00
|
|
|
From e7500166b343874447e6abf385a791998c77f4c4 Mon Sep 17 00:00:00 2001
|
2012-09-25 09:46:38 +02:00
|
|
|
From: Michael Chang <mchang@suse.com>
|
2012-10-07 19:00:03 +02:00
|
|
|
Date: Wed, 26 Sep 2012 15:55:44 +0800
|
|
|
|
Subject: [PATCH] Silence error messages when translations are unavailable
|
|
|
|
|
|
|
|
From: Colin Watson <cjwatson@ubuntu.com>
|
2012-09-25 09:46:38 +02:00
|
|
|
|
|
|
|
References: bnc#771393
|
2012-10-07 19:00:03 +02:00
|
|
|
https://savannah.gnu.org/bugs/?35880
|
2012-09-25 09:46:38 +02:00
|
|
|
Patch-Mainline: no
|
|
|
|
|
2012-10-07 19:00:03 +02:00
|
|
|
Signed-off-by: Michael Chang <mchang@suse.com>
|
2012-09-25 09:46:38 +02:00
|
|
|
---
|
2012-10-07 19:00:03 +02:00
|
|
|
grub-core/gettext/gettext.c | 8 ++++++++
|
|
|
|
1 files changed, 8 insertions(+), 0 deletions(-)
|
2012-09-25 09:46:38 +02:00
|
|
|
|
2014-01-06 04:50:43 +01:00
|
|
|
Index: grub-2.00/grub-core/gettext/gettext.c
|
|
|
|
===================================================================
|
|
|
|
--- grub-2.00.orig/grub-core/gettext/gettext.c
|
|
|
|
+++ grub-2.00/grub-core/gettext/gettext.c
|
|
|
|
@@ -424,9 +424,13 @@ grub_gettext_init_ext (struct grub_gette
|
2012-10-07 19:00:03 +02:00
|
|
|
grub_free (lang);
|
|
|
|
}
|
2014-01-06 04:50:43 +01:00
|
|
|
|
|
|
|
- if (locale[0] == 'e' && locale[1] == 'n'
|
|
|
|
- && (locale[2] == '\0' || locale[2] == '_'))
|
|
|
|
- grub_errno = err = GRUB_ERR_NONE;
|
2012-10-07 19:00:03 +02:00
|
|
|
+ /* If no translations are available, fall back to untranslated text. */
|
|
|
|
+ if (err == GRUB_ERR_FILE_NOT_FOUND)
|
|
|
|
+ {
|
|
|
|
+ grub_errno = GRUB_ERR_NONE;
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
return err;
|
|
|
|
}
|
2012-09-25 09:46:38 +02:00
|
|
|
|