public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ben de Groot <yngwin@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: l10n.eclass
Date: Mon, 23 Jul 2012 20:29:44 +0800	[thread overview]
Message-ID: <CAB9SyzSB1_HqaM_hBDiM=2HCdZ51aKcHN+xM_R0Ww5nZGNai8g@mail.gmail.com> (raw)
In-Reply-To: <20120720093332.02446725@sera-17.lan>

On 20 July 2012 15:33, Ralph Sennhauser <sera@gentoo.org> wrote:
> On Thu, 19 Jul 2012 23:37:32 +0800
> Ben de Groot <yngwin@gentoo.org> wrote:
>
>> I got a few more suggestions on IRC, and I have updated the eclass
>> accordingly. Please check the attached new version, also available at
>> https://gitorious.org/gentoo-qt/qt/blobs/master/eclass/l10n.eclass
>
> Pseudo inlining
>
>> # Add linguas useflags
>> if [[ -n "${PLOCALES}" ]]; then
>>       for u in ${PLOCALES}; do
>>               IUSE+=" linguas_${u}"
>>       done
>> fi
>
> no need to guard the loop against empty $PLOCALES.
>
>> l10n_for_each_locale_do() {
>>       local locs x
>>       locs=$(l10n_get_locales)
>>       if [[ -n "${locs}" ]]; then
>>               for x in ${locs}; do
>>                       ${@} ${x} || die "failed to process enabled
>> ${x} locale" done
>>       fi
>> }
>
> same here, no guarding required and "${@}" should be quoted as it may
> contain args with spaces. Also in l10n_for_each_disabled_locale_do.

Okay, I will make those changes.

>> # ones. This function is normally used internally in this eclass, not
>> by # l10n.eclass consumers.
>> l10n_get_locales() {
>
> I'd mark this function @INTERNAL then, at least until someone can
> presents a use case.
> If you are sufficiently sure this function shouldn't be used by
> consumers you could remove the function

There are use cases, e.g. net-im/qtwitter-0.10.0-r1 for which I have
an editted -r10 revision in my dev overlay. I'm sure it could be handled
with l10n_for_each_locale_do, but the migration is more straight-forward
by simply using l10n_get_locales in this case.

This is why I worded it "normally" instead of "only". Maybe the wording
could be improved?

-- 
Cheers,

Ben | yngwin
Gentoo developer
Gentoo Qt project lead, Gentoo Wiki admin


  reply	other threads:[~2012-07-23 12:31 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-19  6:45 [gentoo-dev] RFC: l10n.eclass Ben de Groot
2012-07-19 13:14 ` Ralph Sennhauser
2012-07-19 15:37   ` Ben de Groot
2012-07-20  7:33     ` Ralph Sennhauser
2012-07-23 12:29       ` Ben de Groot [this message]
2012-07-23 15:22         ` Ralph Sennhauser
2012-07-19 16:15   ` Ciaran McCreesh
2012-07-19 21:13   ` Zac Medico
2012-07-19 22:34     ` Mike Gilbert
2012-07-20  6:54       ` Ciaran McCreesh
2012-07-20 16:39         ` Mike Gilbert
2012-07-20 17:09           ` Ciaran McCreesh
2012-07-20 17:29             ` Mike Gilbert
2012-07-20 17:35               ` Ciaran McCreesh
2012-07-20 17:43             ` Alexandre Rostovtsev
2012-07-20 17:46               ` Alexandre Rostovtsev
2012-07-20 17:54               ` Ciaran McCreesh
2012-07-20 18:37                 ` Alexandre Rostovtsev
2012-07-20 18:41                   ` Ciaran McCreesh
2012-07-20 19:15                     ` Alexandre Rostovtsev
2012-07-20 19:17                       ` Ciaran McCreesh
2012-07-20 19:48                         ` Alexandre Rostovtsev
2012-07-20 20:02                           ` Ciaran McCreesh
2012-07-20 20:10                             ` Alexandre Rostovtsev
2012-07-20 20:15                               ` Ciaran McCreesh
2012-07-20 20:11                           ` Ian Stakenvicius
2012-07-20 19:05                 ` Ian Stakenvicius
2012-07-20 19:13                   ` Ciaran McCreesh
2012-07-20 20:08                     ` Ian Stakenvicius
2012-07-20 17:44           ` Michał Górny
2012-07-20 18:03             ` Alexandre Rostovtsev
2012-07-20 17:55         ` Mike Gilbert
2012-07-20 18:03           ` Ciaran McCreesh
2012-07-20 18:09             ` Mike Gilbert
2012-07-20 18:15               ` Ciaran McCreesh
2012-07-19 22:44 ` Mike Gilbert

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='CAB9SyzSB1_HqaM_hBDiM=2HCdZ51aKcHN+xM_R0Ww5nZGNai8g@mail.gmail.com' \
    --to=yngwin@gentoo.org \
    --cc=gentoo-dev@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