File: gettext_quiet.patch

package info (click to toggle)
grub2 2.02~beta3-5%2Bdeb9u2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 56,628 kB
  • sloc: ansic: 378,677; asm: 16,270; sh: 13,174; cpp: 1,991; python: 1,458; makefile: 1,407; sed: 423; lex: 393; yacc: 267; awk: 75; lisp: 50; perl: 31
file content (30 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 1a8f7cf35457d07bc254407cdd1c55db6bd74e7e Mon Sep 17 00:00:00 2001
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 4880cefe3..3098e8918 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;
 }