Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Using LINGUAS
Date: Tue, 22 Jul 2014 20:30:26
Message-Id: 1406061000.6749.17.camel@orion
In Reply to: [gentoo-dev] Using LINGUAS by Thomas Kahle
1 Hello,
2
3 LINGUAS is a concept in gettext tooling. I do not understand why we
4 overload it in package management in the first place.
5 It is an environment variable that we set up in make.conf, because
6 that's an easy way to get it into the build environment to have the
7 standard way of limiting translations work.
8
9 By overloading it for IUSE_EXPAND we effectively make it pretty much
10 impossible to have the choice of ALL translation files, except when it
11 means extra packages; without conditional LINGUAS setting, that is.
12
13
14 The standard LINGUAS variable acts as follows:
15
16 If unset: Build all translations
17 If set to an UNORDERED listing of language codes: Include translations
18 for listed languages (or dialects)
19 If set to an empty string or similar: Don't include any translations
20
21
22 We currently have wrong behaviour for when it's unset, as as far as
23 IUSE_EXPAND is concerned - we don't have a default that includes all
24 available linguas as far as I know.
25
26
27 Though in the real world, I don't think it matters much, and it's
28 convenient for those that just build a gentoo machine for use within the
29 family, with known language capabilities within.
30
31
32 As a side note: LINGUAS does not only control which .mo files happen to
33 be installed (which you could get rid of later easily with localepurge)
34 - it also is used to filter out unwanted translations in files which
35 have all the translations in the same file; this includes, but is not
36 limited to .desktop files.
37 This used to be a intltool thing, but nowadays gettext has derived such
38 support directly as well.
39
40
41 Mart