From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SrqaA-00022t-MB for garchives@archives.gentoo.org; Thu, 19 Jul 2012 13:15:55 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 428B0E0574; Thu, 19 Jul 2012 13:15:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2FFC2E0507 for ; Thu, 19 Jul 2012 13:14:52 +0000 (UTC) Received: from sera-17.lan (105-46.78-83.cust.bluewin.ch [83.78.46.105]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: sera) by smtp.gentoo.org (Postfix) with ESMTPSA id 708AD1B4003 for ; Thu, 19 Jul 2012 13:14:50 +0000 (UTC) Date: Thu, 19 Jul 2012 15:14:22 +0200 From: Ralph Sennhauser To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] RFC: l10n.eclass Message-ID: <20120719151422.1fb9883b@sera-17.lan> In-Reply-To: References: Organization: Gentoo Linux X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu) 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 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/MdIjSab83SU5c4U1JI8+rBf"; protocol="application/pgp-signature" X-Archives-Salt: 3fe29495-de66-4cf3-a312-bae90d014ec4 X-Archives-Hash: 884667f7eeef4fe626428b299d5964dc --Sig_/MdIjSab83SU5c4U1JI8+rBf Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 19 Jul 2012 14:45:39 +0800 Ben de Groot wrote: > Today I would like to present to you my proposal for a new eclass with > helper functions for treating localizations: l10n.eclass (see the > attached file or [1]). Its functionality can be used in other eclasses > (such as qt4-r2 and cmake-utils) as well as directly in ebuilds. >=20 > In order to keep the code simple, and prevent double loops and extra > variables (such as currently used in the media-video/smplayer ebuild), > I am proposing that we should add any missing long-form locales to > profiles/desc/linguas.desc (e.g. 'de_DE' in addition to short 'de'). > This also means that users may have to expand their LINGUAS setting in > make.conf (e.g. LINGUAS=3D"de en" -> LINGUAS=3D"de de_DE en en_US") to > cover the different variants used in packages. >=20 > If you have any comments, spot any mistakes, or have proposals for > improvement, I would love to hear it! I would especially love from > maintainers of complicated packages such as libreoffice-l10n, if there > is any additional functionality that we could include in this eclass > to make their job simpler. >=20 > 1: https://gitorious.org/gentoo-qt/qt/blobs/master/eclass/l10n.eclass I assume the P in PLOCALS stands for package. Not that obvious if you ask me. L10N_LOCALS would at least tell me which eclass this variable belongs to. Instead of using LINGUAS you should make use of the use function to get your cross sections. ie. for locale in ${PLOCALES}; do if use linguas_${locale}; then enabled_locales+=3D" ${locale}" else disabled_locales+=3D" ${locale}" fi done First, this is guaranteed by PMS and so independent of package manager and second, you do not have to care about locales in LINGUAS which are invalid for the package. Could be that Portage re-exports a sanitized LINGUAS tough, but I doubt it. --Sig_/MdIjSab83SU5c4U1JI8+rBf Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAEBAgAGBQJQCAg7AAoJEIUJ+svaV163NWcH/39BIB0KXDWNWSqSRVzTTtf+ aOh0wBdyIHUafa+82+zgjkdmw5T4hRDyUUxUt9totfegZxNhgqLg0huMxpQYAUkS pAoVyo9ZjzwrpejOfgCoSdG51qcojF3UWiyAh11wzd+nUaANPW9anVJG/ETBO/yb kauNaWAtBfUMWWP/jUNCWx4mWV6geqirPAOlssKyGuOIKil+hBV0tNZ4Vj6bEamo nJjZa6Is6RE39/V/DpTW3RMOLPPfZYBODVWE+iw4g70wx0vds9Qa7lk5FoOjwIN8 VPwJdDjZazy3jWqKIcqTCwyAgM6Hp0OAs7c7FnPud7/ludwZ59KEo+Q7/hWAN98= =omG8 -----END PGP SIGNATURE----- --Sig_/MdIjSab83SU5c4U1JI8+rBf--