Gentoo Archives: gentoo-user

From: Sebastian Pipping <sping@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] 200MB waste from /usr/share/locale ?
Date: Sun, 27 Nov 2011 18:12:32
Message-Id: 4ED27D2F.7030602@gentoo.org
In Reply to: Re: [gentoo-user] 200MB waste from /usr/share/locale ? by Mike Edenfield
1 On 11/26/2011 07:32 AM, Mike Edenfield wrote:
2 >> Can anyone explain what is going on ?
3 >
4 > Different packages include different levels of support for filtering
5 > their installed localization messages, typically one of "install
6 > everything", "install what's requested", or "whats a locale?"
7 >
8 > The reason you mostly have files under LC_MESSAGES is because that's 99%
9 > of what is needed to localize a package. The files in there are string
10 > resource packages, translations of the strings used by the program,
11 > which are picked up by the localization library (gettext) automatically
12 > based on your locale settings. (coreutils installs file into LC_TIME for
13 > locales with date/time formatting requirements; I don't think I've ever
14 > seen any other locale files.)
15 >
16 > The standard way to inform a package which languages you want is to set
17 > your LINGUAS variable in /etc/make.conf to the locale name(s) you want
18 > installed (without the charset specifier). LINGUAS works like any other
19 > portage expansion variables: for those packages that support it, you get
20 > a set of USE-flag-like language keywords set on build. (LINGUAS is the
21 > well-known environment variable used by most autotools-based packages to
22 > select languages, but portage provides support above and beyond that.)
23 >
24 > Unfortunately, proper locale support is spotty -- mostly due to upstream
25 > maintainers being too lazy to properly add it to their builds. Instead,
26 > the package will install every message file it has available all the time.
27 >
28 > You can safely delete any folders from /usr/share/locale for locales
29 > that you don't have installed, since the normal locale support in glibc
30 > will never ask for them. But they'll just get put back next time you
31 > upgrade the package.
32 >
33 > --Mike
34
35 Excellent description -- thank you!
36
37 In case I find time to blog about this on Planet Gentoo:
38 would you allow using the above text under some Creative Commons
39 license, say CC-BY-SA/3.0? Do you have a personal website or blog that
40 I could add a link to?
41
42 Best,
43
44
45
46
47 Sebastian

Replies

Subject Author
Re: [gentoo-user] 200MB waste from /usr/share/locale ? Mike Edenfield <kutulu@××××××.org>