From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id C059713800E for ; Mon, 23 Jul 2012 12:31:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C386CE083D; Mon, 23 Jul 2012 12:31:38 +0000 (UTC) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by pigeon.gentoo.org (Postfix) with ESMTP id 40218E07EC for ; Mon, 23 Jul 2012 12:29:45 +0000 (UTC) Received: by vcbfl17 with SMTP id fl17so5139648vcb.40 for ; Mon, 23 Jul 2012 05:29:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=z0wYPEipoOi7eelZhShO3hQo4dH8h3wg+j+OM602lTg=; b=Vf9VjxeT4HkgkNFq988tXoPasIH1ar7IFFyKp21HrZIF5t7d9zGlbAaxfTU+LPVhNs 8/4uosQQU2E5ILednLfOqCu9EleXto2oDNlsh7YjXrmVeVaR6VzClcfWkrq7k+rRN6Bk 32HN4TP2aOwlckX1lAuuZaK/IaNjZAQ62Nor9qZ4xn/okSFW4BQ1dnypX5tyBZENyHei 4HL9UHut5hemk5C0cdlkIKRE1ibS7bVNeoXB5YSWYK4Rm8G06yKnY5txWvG16Cismzna jjQ/5LOTky+EjGI34bu04mVX+6k0E5RrZvkZIh0D4sj94wpNm3bpwQqBByz8Y0XUNpxn Oqgw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Received: by 10.52.72.73 with SMTP id b9mr10607290vdv.34.1343046584609; Mon, 23 Jul 2012 05:29:44 -0700 (PDT) Sender: yngwin@gmail.com Received: by 10.59.10.133 with HTTP; Mon, 23 Jul 2012 05:29:44 -0700 (PDT) In-Reply-To: <20120720093332.02446725@sera-17.lan> References: <20120719151422.1fb9883b@sera-17.lan> <20120720093332.02446725@sera-17.lan> Date: Mon, 23 Jul 2012 20:29:44 +0800 X-Google-Sender-Auth: L7AgmLaIbuiI8g1MXeDvJfqKa_s Message-ID: Subject: Re: [gentoo-dev] RFC: l10n.eclass From: Ben de Groot To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 X-Archives-Salt: 50b5cd39-f70a-4a95-bd12-8ea3ac2d9797 X-Archives-Hash: 33a510fb5ba7aa1f6f02464042e8f225 On 20 July 2012 15:33, Ralph Sennhauser wrote: > On Thu, 19 Jul 2012 23:37:32 +0800 > Ben de Groot 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