From: Steven J Long <slong@rathaus.eclipse.co.uk>
To: gentoo-devhelp@lists.gentoo.org
Subject: [gentoo-devhelp] Re: LINGUAS vs LANGUAGES
Date: Tue, 21 Jul 2009 11:13:25 +0100 [thread overview]
Message-ID: <23125183.lyQsYuCQA3@news.friendly-coders.info> (raw)
In-Reply-To: gukf25$h9f$1@ger.gmane.org
Nikos Chantziaras wrote:
> Thanks. I ended up doing it this way, though with only one loop in
> src_install(), which seems to be a bit more efficient and shorter:
>
>
> LANGUAGES="de"
> for i in ${LANGUAGES}; do
> IUSE="${IUSE} linguas_${i}"
> done
>
Just on a side-note (not saying it's how you want to do this one), this is
something that BASH arrays are nice for (saving another loop):
$ foo=(bar baz quux)
$ echo "prefixed: '${foo[*]/#/pfx_}'"
prefixed: 'pfx_bar pfx_baz pfx_quux'
Parameter Expansion (incl on arrays) is discussed more at:
http://mywiki.wooledge.org/BashFAQ/073
> src_install()
> #...
> insinto "${GAMES_DATADIR}/${PN}/i18n"
> for i in ${LANGUAGES}; do
> if has ${i} ${LINGUAS}; then
> doins "${PN}_${i}.qm" || die #...
> fi
> done
>
>
> In this case, LANGUAGES must not include "en" though, since there's no
> ${PN}_en.qm file (English is built-in). I'm not sure if the following
> would be better though, in case a user puts linguas_<language> in USE
> instead of <language> in LINGUAS:
>
> if has linguas_${i} ${USE}; then
>
> But I suppose it would be the user's fault if he/she does that? :P
Well yeah it's not the right way to set USE_EXPAND vars; LINGUAS is, and
will be handled specially since it's one of that set.
--
#friendly-coders -- We're friendly but we're not /that/ friendly ;-)
next prev parent reply other threads:[~2009-07-21 10:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-15 13:39 [gentoo-devhelp] LINGUAS vs LANGUAGES Nikos Chantziaras
[not found] ` <6142e6140905150705n3db6e281g43439abe11eb1fb7@mail.gmail.com>
2009-05-15 14:47 ` Nikos Chantziaras
2009-05-15 15:01 ` Daniel Pielmeier
2009-05-15 16:35 ` Daniel Pielmeier
2009-05-15 19:16 ` [gentoo-devhelp] " Nikos Chantziaras
2009-07-21 10:13 ` Steven J Long [this message]
2009-07-26 20:51 ` Mike Frysinger
2009-08-01 15:22 ` [gentoo-devhelp] " Steven J Long
2009-08-06 19:40 ` Steven J Long
2009-08-13 19:28 ` Mike Frysinger
2009-08-15 23:16 ` [gentoo-devhelp] " Steven J Long
2009-07-31 15:26 ` [gentoo-devhelp] " Nikos Chantziaras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=23125183.lyQsYuCQA3@news.friendly-coders.info \
--to=slong@rathaus.eclipse.co.uk \
--cc=gentoo-devhelp@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox