[OE-core] [CONSOLIDATED PULL 10/20] package.bbclass: add support to split Qt translation files

Otavio Salvador otavio at ossystems.com.br
Mon Jun 6 17:27:07 UTC 2011


On Mon, Jun 6, 2011 at 17:14, Richard Purdie
<richard.purdie at linuxfoundation.org> wrote:
> On Sun, 2011-06-05 at 23:44 -0700, Saul Wold wrote:
>> From: Otavio Salvador <otavio at ossystems.com.br>
>>
>> There're many Qt applications that provide translation files in '.qm'
>> format however those weren't being splitted as GetText based
>> ones.
>>
>> Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
>
> Am I right in assuming all these qt applications use one of the qt
> classes?

I'd expect it.

> I do wonder if this shouldn't be part of one of the qt classes as part
> of a package_do_split_locales_append() or prepend() style function from
> a code separation point of view.

I believe there's going to have a lot of code duplication between the
two to do that.

> I do appreciate the need to influence
> the list of locales although you could do that through directory
> creation or an extra variable but we could enhance package.bbclass to
> support that.

I don't understand what you meant by this. Mind to elaborate it a bit more?

...
>> +             if qm_files.has_key(l):
>> +                     locale_re = re.compile("^.*([a-z]{2}(_[A-Z]{2})?)$")
>> +                     ln = legitimize_package_name(locale_re.match(l).group(1))
>> +                     files += qm_files[l]
>
> Regardless, this is changing ln under some weird circumstances.
> Shouldn't the code adding this to the locales list be handling this
> translation? I can see potential duplication between the arrays and a
> host of other nasty bugs with this code as it stands :/. Please take
> that regexp out of this loop at the very least.

Where do you suggest me to move the regexp to?

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio at ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br




More information about the Openembedded-core mailing list