Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 249273

Summary: localization guide: add gettext's $LANGUAGE
Product: [OLD] Docs on Reporter: Zhang Le (RETIRED) <r0bertz>
Component: Other documentsAssignee: Docs Team <docs-team>
Severity: normal    
Priority: Highest    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 247553    
Attachments: the patch

Description Zhang Le (RETIRED) gentoo-dev 2008-11-29 16:33:29 UTC

I myself has once analyzed the relevant code in glibc.!1pZICR9vxlDKAQZ1A4wqfIbw!824.entry

In addition to fixing the order, I have also added an introduction of LANGUAGE variable.

A patch will be posted soon.
Comment 1 Zhang Le (RETIRED) gentoo-dev 2008-11-29 16:34:22 UTC
Created attachment 173780 [details, diff]
the patch
Comment 2 Jan Kundrát (RETIRED) gentoo-dev 2008-11-29 21:12:58 UTC
Please describe what exactly is broken in our current guide and reopen. I'm missing reasons/details for the following:

a) Summary of required changes
b) Precedence of $LANGUAGE
c) Reasons for shuffling the definitions
Comment 3 Zhang Le (RETIRED) gentoo-dev 2008-11-30 06:23:02 UTC
1. required changes:
  1.1 added LANGUAGE for completeness
  1.2 correct the order of the variables
  1.3 shuffle the varibles definetion in /etc/env.d/02locale to reflect the correct order.

2. The LANGUAGE variable has the highest precedence. Please take a look at the following excerpt from

 In detail, for the category `LC_xxx' the following
 variables in this order are examined:
3. "shuffling the definition" is a minor issue. if you really think it is not necessary, just skip it. With the previous correction kept in mind, the original definition sequence won't hurt, either.
Comment 4 Jan Kundrát (RETIRED) gentoo-dev 2008-11-30 10:43:45 UTC
The environment is just a set of key-value pairs, the order in which they are defined is not relevant at all.
Comment 5 Jan Kundrát (RETIRED) gentoo-dev 2008-11-30 11:43:27 UTC
Doesn't seem to work with sys-devel/gettext-0.17  USE="acl nls openmp -doc -emacs -nocxx":

jkt@velbloud ~ $ LC_MESSAGES=de_DE.utf8 svn
Geben Sie »svn help« für weitere Hilfe ein.
jkt@velbloud ~ $ LANGUAGE=de_DE.utf8 svn
Type 'svn help' for usage.
Comment 6 Jan Kundrát (RETIRED) gentoo-dev 2008-11-30 11:54:51 UTC
Created attachment 173860 [details, diff]
Comment 7 Jan Kundrát (RETIRED) gentoo-dev 2008-11-30 11:55:31 UTC
12:52 < r0bertz> ok, i will read the code and find how it works now. when i read the relevent code in glibc, the version is still 2.3.6
12:52 < r0bertz> now it is 2.8

Please reopen when the glibc which supports this feature is keyworded stable.
Comment 8 Zhang Le (RETIRED) gentoo-dev 2008-11-30 15:43:27 UTC

haven't got reply yet, but i modified the description a little bit.