ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacques Le Roux" <jacques.le.r...@les7arts.com>
Subject Re: Multiple UiLabels definitions
Date Mon, 03 Mar 2008 08:10:34 GMT
From: "Bruno Busco" <bruno.busco@gmail.com>
> Hi,
> while testing ecommerce application i have found that selecting the ITalian
> language, some labels are displayed still in english.
> I was convinced that this was because of a missing translation but the
> reason was a little different:
>
> Some labels are defined in more than one resource file. For example
> "CommonQuickAdd" is both in EcommerceUiLabels.xml and in
> CommonUiLabels.xmlfiles.
> But while the CommonUiLabels.xml is complete, in the
> EcommerceUiLabels.xmlfile there is no italian label.
>
> So what I think that could happen is that OFBiz tries to have an IT string
> from the EcommerceUiLabels.xml file (the first one), this is not found and
> so it falls back to what is specified in (locale.properties.fallback=en)
> BEFORE checking if the IT string is present in other resource files.
>
> I tryed to delete the incomplete <property key="CommonQuickAdd"> from the
> EcommerceUiLabels.xml and now the italian string is correctly displayed
> (because no fallback).

It seems to be that it's an opportunity to remove duplicates from higher files (EcommerceUiLabels
is higher in in the stack than 
CommonUiLabels). Of course this is more work (than 3. for instance) but it will ends with
a cleaner OFBiz. An algo could certainly 
be used
So generalisation of your point 2 has my preferences, I can see no drawbacks

Jacques

> Also defining (locale.properties.fallback=it) it works because now, even the
> CommonUiLabels.xml is looked for an italian string.
>
> I see four options for me to solve the problem:
> 1) Add all italian strings to EcommerceUiLabels.xml even if they are already
> present in CommonUiLabels.xml (I don't like because of redundancy)
> 2) Remove all the Common*** labels from EcommerceUiLabels.xml (any
> drawbacks?)
> 3) Change to (locale.properties.fallback=it)
> 4) Change the way OFBiz scans for the locale strings in such a way that it
> first merges all the files and THEN looks for the desired localization and
> THEN if not found falls to the fallback (unluckly i am not able)
>
> Any idea about this?
> 


Mime
View raw message