ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bruno Busco" <bruno.bu...@gmail.com>
Subject Re: Multiple UiLabels definitions
Date Mon, 03 Mar 2008 22:13:58 GMT
2008/3/3, Adrian Crum <adrianc@hlmksw.com>:
>
> Bruno Busco wrote:
> > 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).
> > 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)
>
>
> #3 will generate "resource not found" errors. In effect you would be
> saying "If you can't find the IT label, then fall back to the IT label."
>
>
> -Adrian
>

OK. I have removed all Common* labels that are defined in
CommonUiLabels.xmlfile from all the other files and it seems to work
now.
But this is not enough because for instance EcommerceYourShoppingCartEmpty
label is present both in ECommerceUiLabels.xml AND in OrderUiLabels.xml.
Should I remove the occurrence of this label from OrderUiLabels.xml ?
In other words what is the naming convention to be observed?
Could I follow the rule that all the labels that starts with AppName must be
only defined in the AppNameUiLabels.xml file?

Bruno

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message