On Thu, 19 Jul 2012 14:45:39 +0800 Ben de Groot <yng...@gentoo.org> 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. > > 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="de en" -> LINGUAS="de de_DE en en_US") to > cover the different variants used in packages. > > 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. > > 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+=" ${locale}" else disabled_locales+=" ${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.
signature.asc
Description: PGP signature