1 |
On Mon, 06 Jun 2016 03:22:34 +0300 |
2 |
Mart Raudsepp <leio@g.o> wrote: |
3 |
|
4 |
> First draft of news item for proceeding with LINGUAS USE_EXPAND rename |
5 |
> to L10N independently of the INSTALL_MASK feature additions. |
6 |
> |
7 |
> I hope English natives will improve the sentence flow and grammar here |
8 |
> :) |
9 |
> Perhaps there's also a better title than with the technical USE_EXPAND |
10 |
> mention. |
11 |
> |
12 |
> |
13 |
> Title: LINGUAS USE_EXPAND renamed to L10N |
14 |
> Author: Mart Raudsepp <leio@g.o> |
15 |
> Content-Type: text/plain |
16 |
> Posted: 2016-06-06 |
17 |
> Revision: 1 |
18 |
> News-Item-Format: 1.0 |
19 |
> |
20 |
> The LINGUAS USE_EXPAND has been renamed to L10N, to avoid a conceptual |
21 |
> clash with the standard gettext LINGUAS behaviour. |
22 |
> L10N controls which extra localization support will be installed. |
23 |
> This is usually used in case of extra downloads of language packs. |
24 |
> |
25 |
> If you have set LINGUAS in your make.conf, you should either copy or |
26 |
> rename it to L10N, depending on if you want to filter the supported |
27 |
> languages at build time or not via the gettext LINGUAS environment |
28 |
> variable behaviour as described below. Note that this filtering does not |
29 |
> affect only installed gettext catalog files (*.mo), but also lines of |
30 |
> translations in an always shipped file (e.g *.desktop). |
31 |
> |
32 |
> LINGUAS maintains the standard gettext behaviour and will now work as |
33 |
> expected with all package managers. It controls which language |
34 |
> translations are built and installed. An unset value means all |
35 |
> available, an empty value means none, and a value can be an unordered |
36 |
> list of gettext language codes, with or without country codes. |
37 |
> Usually only two letter language codes suffice, but can be limited with |
38 |
> country codes with a 'll_CC' formatting, where 'll' is the language code |
39 |
> and 'CC' is the country code, e.g en_GB. Some rare languages also have |
40 |
> three letter language codes. |
41 |
> If you want English with a set LINGUAS, it is suggested to list it with |
42 |
> the desired country code, in case the default is not the usual en_US. |
43 |
> It is also common to list "en" then, in case a package is natively |
44 |
> written in a different language, but does provide an English translation |
45 |
> for whichever country. |
46 |
> A list of LINGUAS language codes is available at |
47 |
> http://www.gnu.org/software/gettext/manual/gettext.html#Language-Codes |
48 |
> |
49 |
> Note that LINGUAS affects build time, and thus filters what ends up |
50 |
> in binary packages. If you are building generic binary packages that |
51 |
> should support all available language, you should not set LINGUAS. |
52 |
> |
53 |
> If you have per-package customizations of LINGUAS USE_EXPAND, you |
54 |
> should also rename those from LINGUAS to L10N. This typically means |
55 |
> renaming linguas_* to l10n_*. |
56 |
> |
57 |
> https://wiki.gentoo.org/wiki/Localization/Guide has also been updated |
58 |
> to reflect this change. |
59 |
|
60 |
So here's how I would word it. I think if we combine a few different |
61 |
texts, we may end up with something good ;-). |
62 |
|
63 |
--- |
64 |
The LINGUAS USE flag group has been renamed to L10N, in order to avoid |
65 |
a conceptual clash between the Gentoo use of the name, and a standard |
66 |
environment variable used by multiple gettext-based packages. Therefore, |
67 |
from now on filtering localizations is supported on three independent |
68 |
levels: L10N, LINGUAS and INSTALL_MASK. |
69 |
|
70 |
The L10N flags affect built and installed localizations of the packages |
71 |
listing those flags explicitly. They are fully controlled by |
72 |
the package manager, and their values are defined globally. They do not |
73 |
affect the packages not listing them explicitly. |
74 |
|
75 |
The LINGUAS variable is now verbosely passed through to the build |
76 |
system. It controls the localizations built and installed by packages |
77 |
that use it, and that do not override it using L10N flags. Note that |
78 |
due to the design, the localization stripping is done implicitly |
79 |
and the package manager can not determine which localizations were |
80 |
actually provided. |
81 |
|
82 |
Additionally, the INSTALL_MASK improvements available in Portage 2.3.0 |
83 |
make it possible to filter localizations at package merge stage. In this |
84 |
case, the filtering is done on installed directories transparently, |
85 |
and the build process and binary packages are not affected. |
86 |
|
87 |
If you were using LINGUAS before, you most likely want to replace it |
88 |
with L10N. If you need to strip localizations more (e.g. for embedded |
89 |
systems), you may also want to set LINGUAS and/or INSTALL_MASK. |
90 |
However, if you intend to provide or use binary package, you will most |
91 |
likely want to leave L10N and LINGUAS unset in order to build most |
92 |
portable binary packages, and use INSTALL_MASK to transparently strip |
93 |
installed localizations on the hosts using them. |
94 |
|
95 |
For more information, please see: |
96 |
https://wiki.gentoo.org/wiki/Localization/Guide |
97 |
--- |
98 |
|
99 |
Of course, we'd need to update the guide to explain all three layers |
100 |
in detail. |
101 |
|
102 |
-- |
103 |
Best regards, |
104 |
Michał Górny |
105 |
<http://dev.gentoo.org/~mgorny/> |