grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] reset LC_MESSAGES to C too
Date: Sat, 30 Mar 2013 12:45:04 +0400	[thread overview]
Message-ID: <1364633104-20097-1-git-send-email-arvidjaar@gmail.com> (raw)

If user locale has non-ASCII translation strings, running grub make
outputs only question marks:

bor@opensuse:~/build/grub> locale
LANG=ru_RU.utf8
LC_CTYPE="ru_RU.utf8"
LC_NUMERIC="ru_RU.utf8"
LC_TIME="ru_RU.utf8"
LC_COLLATE="ru_RU.utf8"
LC_MONETARY="ru_RU.utf8"
LC_MESSAGES="ru_RU.utf8"
LC_PAPER="ru_RU.utf8"
LC_NAME="ru_RU.utf8"
LC_ADDRESS="ru_RU.utf8"
LC_TELEPHONE="ru_RU.utf8"
LC_MEASUREMENT="ru_RU.utf8"
LC_IDENTIFICATION="ru_RU.utf8"
LC_ALL=

make[2]: ????? ?? ???????? `/home/bor/build/grub/docs'
Making all in util/bash-completion.d
make[2]: ???? ? ??????? `/home/bor/build/grub/util/bash-completion.d'
make[2]: ???? `all' ?? ??????? ?????????? ??????.
make[2]: ????? ?? ???????? `/home/bor/build/grub/util/bash-completion.d'
make[1]: ????? ?? ???????? `/home/bor/build/grub'

The reason is, grub Makefile resets LC_CTYPE to C. This makes it
impossible to translate messages into current locale (C at the time
tools are running). Reset LC_MESSAGES to C as well, it is better to
have them in English than do not have them at all.

Problem observed on Linux with glibc 2.17 and 2.15.

Signed-off-by: Andrey Borzenkov <arvidjaar@gmail.com>

---
 ChangeLog            | 5 +++++
 conf/Makefile.common | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 58c2242..cd1f762 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-03-30  Andrey Borzenkov <arvidjaar@gmail.com>
+
+	* conf/Makefile.common: Reset LC_MESSAGES to C too to avoid
+	question marks in messages during build on non-ASCII locale.
+
 2013-03-26  Vladimir Serbinenko  <phcoder@gmail.com>
 
 	* grub-core/kern/efi/mm.c (grub_efi_finish_boot_services):
diff --git a/conf/Makefile.common b/conf/Makefile.common
index c185a55..f49581d 100644
--- a/conf/Makefile.common
+++ b/conf/Makefile.common
@@ -4,6 +4,7 @@ CFLAGS_PLATFORM=
 
 export LC_COLLATE := C
 export LC_CTYPE := C
+export LC_MESSAGES := C
 unexport LC_ALL
 
 # Platform specific options
-- 
tg: (c643afe..) u/lc_messages (depends on: master)


             reply	other threads:[~2013-03-30  8:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30  8:45 Andrey Borzenkov [this message]
2013-03-31 23:59 ` [PATCH] reset LC_MESSAGES to C too Vladimir 'φ-coder/phcoder' Serbinenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1364633104-20097-1-git-send-email-arvidjaar@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).