Dev - Proposal: misc enhancements to the OFBiz i18n framework

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Dev - Proposal: misc enhancements to the OFBiz i18n framework

Jacopo Cappellato
Hi all,

I'd like to discuss with you some topics about internationalization
framework in OFBiz.

a) the way a form widget is internationalized:********************

currently, a field NOT internationalized looks like this:

<field name="quoteId"></field>

or like this:

<field name="quoteId" title="Quote ID"></field>

A field that is internationalized looks like this:

<field name="quoteId" title="${uiLabelMap.OrderOrderQuoteId}"></field>

The problem here is that you have to add the title attribute if you want
to internationalize a field. Without the title element, the column name
is derived from the field name, e.g. "quoteId" --> "Quote Id"

Proposal:
* create a new labels file, e.g. EntityFieldUiLabels, to store all the
labels for the db fields (e.g. quoteId=Quote ID)
* when a form's field, without the title attribute, is rendered, the
EntityFieldUiLabels is used to get the field's label; if not found, the
current algorithm is used
* the idea is to have just one EntityFieldUiLabels file containing all
the fields' labels (sorted) by name and not by entity/field name; so for
example, "productId" and "description" will be just two entries (even if
they are used in many entities); EntityFieldUiLabels should be a sort of
dictionary for all the fields' names; it would be easier to have a sigle
file for all the components

b) what about unifying all the component's *UiLabels files in one
file?********************

I know that many of you will disagree with me with this proposal but
the labels files are a mess right now (a lot of duplicated labels) and
having just one file will definitely reduce the amount of duplicated labels.

Jacopo
 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Proposal: misc enhancements to the OFBiz i18n framework

cjhowe
a) sounds reasonable
b) there's an issue of context when combining all
uiLabel files.  One word in english in the context of
products yields one Italian translation, but then that
same english word in the context of content yields a
different translation.  Additionally, the uiLabels are
sometimes used as aliases in between applications
(especially when using the model of copying code from
previous work) and therefore act as a variable as
opposed to an actual translation mechanism.

--- Jacopo Cappellato <[hidden email]> wrote:

> Hi all,
>
> I'd like to discuss with you some topics about
> internationalization
> framework in OFBiz.
>
> a) the way a form widget is
> internationalized:********************
>
> currently, a field NOT internationalized looks like
> this:
>
> <field name="quoteId"></field>
>
> or like this:
>
> <field name="quoteId" title="Quote ID"></field>
>
> A field that is internationalized looks like this:
>
> <field name="quoteId"
> title="${uiLabelMap.OrderOrderQuoteId}"></field>
>
> The problem here is that you have to add the title
> attribute if you want
> to internationalize a field. Without the title
> element, the column name
> is derived from the field name, e.g. "quoteId" -->
> "Quote Id"
>
> Proposal:
> * create a new labels file, e.g.
> EntityFieldUiLabels, to store all the
> labels for the db fields (e.g. quoteId=Quote ID)
> * when a form's field, without the title attribute,
> is rendered, the
> EntityFieldUiLabels is used to get the field's
> label; if not found, the
> current algorithm is used
> * the idea is to have just one EntityFieldUiLabels
> file containing all
> the fields' labels (sorted) by name and not by
> entity/field name; so for
> example, "productId" and "description" will be just
> two entries (even if
> they are used in many entities); EntityFieldUiLabels
> should be a sort of
> dictionary for all the fields' names; it would be
> easier to have a sigle
> file for all the components
>
> b) what about unifying all the component's *UiLabels
> files in one
> file?********************
>
> I know that many of you will disagree with me with
> this proposal but
> the labels files are a mess right now (a lot of
> duplicated labels) and
> having just one file will definitely reduce the
> amount of duplicated labels.
>
> Jacopo
>  
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev
>

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: Dev - Proposal: misc enhancements to the OFBiz i18nframework

Jacques Le Roux
Administrator

----- Original Message -----
From: "Chris Howe" <[hidden email]>
To: "OFBiz Project Development Discussion" <[hidden email]>
Sent: Friday, February 10, 2006 3:19 PM
Subject: Re: [OFBiz] Dev - Proposal: misc enhancements to the OFBiz
i18nframework


> a) sounds reasonable

I like it too

> b) there's an issue of context when combining all
> uiLabel files.  One word in english in the context of
> products yields one Italian translation, but then that
> same english word in the context of content yields a
> different translation.

Too bad, basic work needed...

>Additionally, the uiLabels are
> sometimes used as aliases in between applications
> (especially when using the model of copying code from
> previous work) and therefore act as a variable as
> opposed to an actual translation mechanism.

Huuh ?

Jacques

> --- Jacopo Cappellato <[hidden email]> wrote:
>
> > Hi all,
> >
> > I'd like to discuss with you some topics about
> > internationalization
> > framework in OFBiz.
> >
> > a) the way a form widget is
> > internationalized:********************
> >
> > currently, a field NOT internationalized looks like
> > this:
> >
> > <field name="quoteId"></field>
> >
> > or like this:
> >
> > <field name="quoteId" title="Quote ID"></field>
> >
> > A field that is internationalized looks like this:
> >
> > <field name="quoteId"
> > title="${uiLabelMap.OrderOrderQuoteId}"></field>
> >
> > The problem here is that you have to add the title
> > attribute if you want
> > to internationalize a field. Without the title
> > element, the column name
> > is derived from the field name, e.g. "quoteId" -->
> > "Quote Id"
> >
> > Proposal:
> > * create a new labels file, e.g.
> > EntityFieldUiLabels, to store all the
> > labels for the db fields (e.g. quoteId=Quote ID)
> > * when a form's field, without the title attribute,
> > is rendered, the
> > EntityFieldUiLabels is used to get the field's
> > label; if not found, the
> > current algorithm is used
> > * the idea is to have just one EntityFieldUiLabels
> > file containing all
> > the fields' labels (sorted) by name and not by
> > entity/field name; so for
> > example, "productId" and "description" will be just
> > two entries (even if
> > they are used in many entities); EntityFieldUiLabels
> > should be a sort of
> > dictionary for all the fields' names; it would be
> > easier to have a sigle
> > file for all the components
> >
> > b) what about unifying all the component's *UiLabels
> > files in one
> > file?********************
> >
> > I know that many of you will disagree with me with
> > this proposal but
> > the labels files are a mess right now (a lot of
> > duplicated labels) and
> > having just one file will definitely reduce the
> > amount of duplicated labels.
> >
> > Jacopo
> >
> > _______________________________________________
> > Dev mailing list
> > [hidden email]
> > http://lists.ofbiz.org/mailman/listinfo/dev
> >
>
>
> _______________________________________________
> Dev mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/dev

 
_______________________________________________
Dev mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/dev