Gentoo Archives: gentoo-devhelp

From: Nikos Chantziaras <realnc@×××××.de>
To: gentoo-devhelp@l.g.o
Subject: [gentoo-devhelp] Re: LINGUAS vs LANGUAGES
Date: Fri, 31 Jul 2009 15:27:13
Message-Id: h4v2fl$74f$1@ger.gmane.org
In Reply to: [gentoo-devhelp] Re: LINGUAS vs LANGUAGES by Steven J Long
1 On 07/21/2009 01:13 PM, Steven J Long wrote:
2 > Nikos Chantziaras wrote:
3 >
4 >> Thanks. I ended up doing it this way, though with only one loop in
5 >> src_install(), which seems to be a bit more efficient and shorter:
6 >>
7 >>
8 >> LANGUAGES="de"
9 >> for i in ${LANGUAGES}; do
10 >> IUSE="${IUSE} linguas_${i}"
11 >> done
12 >>
13 > Just on a side-note (not saying it's how you want to do this one), this is
14 > something that BASH arrays are nice for (saving another loop):
15 > $ foo=(bar baz quux)
16 > $ echo "prefixed: '${foo[*]/#/pfx_}'"
17 > prefixed: 'pfx_bar pfx_baz pfx_quux'
18 >
19 > Parameter Expansion (incl on arrays) is discussed more at:
20 > http://mywiki.wooledge.org/BashFAQ/073
21
22 (Late reply because I was away on vacation.)
23
24 I ended up removing LINGUAS support altogether and installing the extra
25 language file regardless of the user's LINGUAS. The Gentoo developer
26 maintaining the ebuild said that's how it should be done when the
27 package only supports two languages.