From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TDt6F-00054V-Hv for mharc-grub-devel@gnu.org; Tue, 18 Sep 2012 04:24:07 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDt6C-00052G-W4 for grub-devel@gnu.org; Tue, 18 Sep 2012 04:24:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TDt66-0007lk-Un for grub-devel@gnu.org; Tue, 18 Sep 2012 04:24:04 -0400 Received: from mail-wg0-f49.google.com ([74.125.82.49]:50563) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TDt66-0007ld-OT for grub-devel@gnu.org; Tue, 18 Sep 2012 04:23:58 -0400 Received: by wgbdt14 with SMTP id dt14so1796373wgb.30 for ; Tue, 18 Sep 2012 01:23:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=cBcwAG0JSMW92khW1HP5SESPDeYLwdyBQIv/5ngcEJg=; b=hWjgR8MRGVkXoNRiGlY/VEXjI7bi//hPAHOEaHQJtFWB3vkaDRphAEcrndxAngmFw8 bLS3Ua5Vj4Tcn/5Op6YkzEvkcbTbGuXFLkuqLwjE/97om4cwtXc7PRVXgQV8EYGnvGVQ jIUCEe6/8zG+bVrGY6xU2ad6rl3pZVUKErgMYgY7yieVgeibZNr4DCSmnStFJSJbDHGS ZGvelu2CTXJYMdj5jFhEhjRHmk/TtFv7Cm5EvBx4gU0scCpj8zeWExBgbWQResEhgCYo WdnXjvQ9mY3s2kW2fLPtmvesefV4/6FMUqD3U+Vc+GmsoDJ2mnKi/gFgMiQUFsCfDvqM DSkA== Received: by 10.216.204.16 with SMTP id g16mr4640554weo.1.1347956637245; Tue, 18 Sep 2012 01:23:57 -0700 (PDT) Received: from debian.x201.phnet ([2001:0:53aa:64c:100e:f117:4d3a:15fa]) by mx.google.com with ESMTPS id bc2sm30672780wib.0.2012.09.18.01.23.55 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 01:23:56 -0700 (PDT) Message-ID: <50582F1A.3030606@gmail.com> Date: Tue, 18 Sep 2012 10:21:46 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: grub-mkconfig locale vs. boot-time grub locale References: <1347717791.11900.15.camel@opensuse.site> <5054A352.1070808@gmail.com> <1347730716.1660.7.camel@opensuse.site> In-Reply-To: <1347730716.1660.7.camel@opensuse.site> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig735011D8CD01C46E4B28DA8F" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.49 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: Tue, 18 Sep 2012 08:24:06 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig735011D8CD01C46E4B28DA8F Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 15.09.2012 19:38, Andrey Borzenkov wrote: > =D0=92 =D0=A1=D0=B1., 15/09/2012 =D0=B2 17:48 +0200, Vladimir '=CF=86-c= oder/phcoder' Serbinenko > =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> On 15.09.2012 16:03, Andrey Borzenkov wrote: >> >>> Currently grub-mkconfig is using current (at the time of invocation) >>> locale to >>> >>> 1. output status messages during invocation >>> 2. put translated messages (verbatim) into generated grub.cfg >>> 3. set language in grub.cfg (set lang) >>> >>> The problem is, user locale at the time of invocation does not >>> necessarily correspond to default system locale. This becomes even mo= re >>> extreme as SSH and su/sudo often pass through locale environment >>> variables by default; so user locale may be inherited from unpredicta= ble >>> value set on remote system. >>> >>> Now imagine Chinese customer support employee remotely invoking >>> grub-mkconfig for European customer ... >>> >>> It seems that case 1 and 2/3 should be treated differently. Suggestio= n >>> is >>> >>> - export GRUB_LANG in grub-mkconfig for use in /etc/grub.d scripts. >>> GRUB_LANG is supposed to be set to system wide default. This may be s= et >>> by distributions in /etc/default/grub when system locale is changed o= r >>> determined dynamically from existing configuration. >>> >>> - provide convenience wrapper for scripts in /etc/grub.d which basica= lly >>> does LC_MESSAGES=3D$GRUB_LANG gettext ... >>> >>> Does it sound sensible? >>> >> >> Just set LC_ALL/LC_MESSAGES in /etc/default/grub. I don't see a reason= >> to have a separate variable for this in etc/default/grub if you can ju= st >> set standard ones there. >> >=20 > The primary reason to separate them is to let grub-mkconfig to emit > messages in user's native locale. Which is not necessarily the one set > as default. >=20 Currently GRUB has no way of having separate locale for a part of it. It would need additional work since currently some parts of text are translated at grub-mkconfig time. I'm not sure how necessary it is to have more fine-grained model. > -andrey >=20 >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enig735011D8CD01C46E4B28DA8F Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlBYLxoACgkQNak7dOguQglAZwD/cke5LM1Oj6/m9rrR/tCIURqk 2GX7qXAGZVPljKifZVUBAJ+8PCzPTDz4H0JEjhzpmrwCEYq+1pk96SMeq2OJ0XiZ =R137 -----END PGP SIGNATURE----- --------------enig735011D8CD01C46E4B28DA8F--