Gentoo Archives: gentoo-dev

From: Mart Raudsepp <leio@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N
Date: Mon, 13 Jun 2016 18:26:19
Message-Id: 1465842359.350.15.camel@gentoo.org
In Reply to: Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N by "Michał Górny"
1 Ühel kenal päeval, T, 07.06.2016 kell 20:28, kirjutas Michał Górny:
2
3 > So here's how I would word it. I think if we combine a few different
4 > texts, we may end up with something good ;-).
5 >
6 > ---
7 > The LINGUAS USE flag group has been renamed to L10N, in order to
8 > avoid
9 > a conceptual clash between the Gentoo use of the name, and a standard
10 > environment variable used by multiple gettext-based packages.
11
12 Where "multiple" is pretty much the whole tree of autoconf based
13 packages (and probably cmake too?). Pretty much anything that has a
14 translation :)
15
16 > Therefore,
17 > from now on filtering localizations is supported on three independent
18 > levels: L10N, LINGUAS and INSTALL_MASK.
19 >
20 > The L10N flags affect built and installed localizations of the
21 > packages
22 > listing those flags explicitly. They are fully controlled by
23 > the package manager, and their values are defined globally. They do
24 > not
25 > affect the packages not listing them explicitly.
26 >
27 > The LINGUAS variable is now verbosely passed through to the build
28 > system.
29
30 If we have a transition phase for the USE_EXPAND, where we'll have both
31 for a while, then this is not strictly true immediately. It also means
32 we can't roll out your portage changes to stop the special casing
33 before we are finished with the transition and LINGUAS is removed from
34 the USE_EXPAND set.
35
36
37 > It controls the localizations built and installed by packages
38 > that use it, and that do not override it using L10N flags.
39
40 Packages should not be exporting some LINGUAS values based on L10N
41 USE_EXPAND anyways in my opinion; I'd make such approach a QA violation
42 maybe even, though we have some odd cases in a very limited set of
43 packages, iirc.
44
45 > Note that
46 > due to the design, the localization stripping is done implicitly
47 > and the package manager can not determine which localizations were
48 > actually provided.
49
50
51 > Additionally, the INSTALL_MASK improvements available in Portage
52 > 2.3.0
53 > make it possible to filter localizations at package merge stage. In
54 > this
55 > case, the filtering is done on installed directories transparently,
56 > and the build process and binary packages are not affected.
57
58 So I take it that these install_mask groups are in for upcoming 2.3.0.
59 Before that, you can still do it though, just need to list paths
60 manually yourself.
61 Info on what groups are pre-shipped or whatnot would have to be on the
62 wiki page then, I suppose.
63
64 > If you were using LINGUAS before, you most likely want to replace it
65 > with L10N. If you need to strip localizations more (e.g. for embedded
66 > systems), you may also want to set LINGUAS and/or INSTALL_MASK.
67 > However, if you intend to provide or use binary package, you will
68 > most
69
70 I don't like this shunning of LINGUAS feature and shunning to some sort
71 of embedded systems use case still.
72 Most of us build systems used by only ourselves, I believe, and there
73 is nothing wrong in getting a gettext feature applied for free, which
74 reduces translation lines in .desktop, .schema and other files, and
75 reduces the runtime mmap caches of those with it for free.
76 It being clear in the appropriate place that this is a build time thing
77 and whatnot is of course quite fine.
78
79 If we go with BCP47, then users will want to revise their values based
80 on the available options in the new l10n.desc I suppose.
81
82 > likely want to leave L10N and LINGUAS unset in order to build most
83 > portable binary packages, and use INSTALL_MASK to transparently strip
84 > installed localizations on the hosts using them.
85
86 L10N unset would mean no language packs at all, unless we have a wide
87 default set in base profile. So unless we set a default set of all of
88 them in profile, this would mean opposite behavior for L10N and LINGUAS
89 when unset.
90
91 > For more information, please see:
92 > https://wiki.gentoo.org/wiki/Localization/Guide
93 > ---
94 >
95 > Of course, we'd need to update the guide to explain all three layers
96 > in detail.
97
98
99 This was just my random set of thoughts, so Ulrich knows them while
100 writing a new version of the news item tomorrow ;)
101
102
103 Mart

Replies

Subject Author
Re: [gentoo-dev] News item: LINGUAS USE_EXPAND renamed to L10N Ulrich Mueller <ulm@g.o>