From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TG56X-0004Eo-Uk for mharc-grub-devel@gnu.org; Mon, 24 Sep 2012 05:37:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:52025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG56Q-0004As-RQ for grub-devel@gnu.org; Mon, 24 Sep 2012 05:37:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TG56K-0000m6-Te for grub-devel@gnu.org; Mon, 24 Sep 2012 05:37:22 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:35682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TG56K-0000m1-Lu for grub-devel@gnu.org; Mon, 24 Sep 2012 05:37:16 -0400 Received: by lbbgj10 with SMTP id gj10so6594967lbb.0 for ; Mon, 24 Sep 2012 02:37:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=28fzq/WnkDj60RzJaJiB0HW1X45qkb11h80zVwJBUMw=; b=drbn0SONB6XsHGd7uFZvp8NBJK4WZUcKLzA4GlJGhH4sxJrTxcuxpS/CbZuTnkUdPA /x1IgdapzTdnpFIbN8lfYEiSPOd1jU0mH6p/vaEG1YrgsQKElhAqGK2ofafEG5wtDLzy 27+qPPxiXWR5X06tvTyJoXPHeWJsJXzUIeHtMpUOH4PwUQLqRD3TJSz01WVDz94H250c oPf/GE8kHVMzdDRM80KDYRYQIhVR4Bv2c51bZjqUcx/53XlsT4mU27bSeObU8H4brw2k N5kil7bFLn7gs/V8q0dpzgZy5PAWps3N6H5KNbK3SovCaYccesBCKXX6Z/SCew9IzQY5 SLBA== Received: by 10.152.111.227 with SMTP id il3mr10003574lab.23.1348479435122; Mon, 24 Sep 2012 02:37:15 -0700 (PDT) Received: from [172.16.15.177] (mail.excitor.com. [62.243.244.130]) by mx.google.com with ESMTPS id c6sm4153053lbn.1.2012.09.24.02.37.13 (version=SSLv3 cipher=OTHER); Mon, 24 Sep 2012 02:37:14 -0700 (PDT) Message-ID: <506029C8.8000804@kiilerich.com> Date: Mon, 24 Sep 2012 11:37:12 +0200 From: Mads Kiilerich User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] suppress error message "/grub2/locale/en.mo.gz not found" References: <1348469509-21079-1-git-send-email-mchang@suse.com> In-Reply-To: <1348469509-21079-1-git-send-email-mchang@suse.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQnfgRcQQ0oDraj+WqcIyQTQhEdNeiuVZo0ynMGxuHJISx+m6h3p3F1P28AuWmq4mhh45Ofm X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.217.169 Cc: Michael Chang X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 09:37:28 -0000 On 09/24/2012 08:51 AM, Michael Chang wrote: > We don't insert gettext module if message catalog file missing to > prevent error message from being logged. > > Signed-off-by: Michael Chang > --- > util/grub.d/00_header.in | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in > index bb34ef2..d438d52 100644 > --- a/util/grub.d/00_header.in > +++ b/util/grub.d/00_header.in > @@ -182,10 +182,14 @@ EOF > > # Gettext variables and module > if [ "x${LANG}" != "xC" ] ; then Couldn't / sholdn't this check be replaced by the new check you introduce? > +# We don't insert gettext module if message catalog file missing > +# To prevent error message from being logged (bnc#771393) That seems like a reference to some (internal Suse?) bugtracker? To me it is https://bugzilla.redhat.com/show_bug.cgi?id=817187 , but I guess https://savannah.gnu.org/bugs/?35880 is the best reference. > cat << EOF > - set locale_dir=\$prefix/locale > - set lang=${grub_lang} > - insmod gettext > + if [ -f "\$prefix/locale/${grub_lang}.mo" ] ; then > + set locale_dir=\$prefix/locale > + set lang=${grub_lang} > + insmod gettext > + fi > EOF > fi I'm +1 for the principle, but does it really work for real world locales like de_DE which will use de.mo on runtime? I would guess that it also should handle all the logic in gettext.c grub_gettext_init_ext() and grub_mofile_open_lang() and how these functions are invoked: .gz extension, _CC stripping and primary/secondary locale_dir. (I would prefer if all this processing could be done in mkconfig instead of on runtime, but I guess the desire for backward compatibility prevents that.) (It also seems to me like the current system lacks support for fallback from ll_CC@unknownvariant to ll_CC and ll. I don't know if that is a real problem.) /Mads