cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enke Michael <Michael.E...@wincor-nixdorf.com>
Subject Re: [RTl] i18n transformer
Date Thu, 01 Nov 2001 08:04:25 GMT
"Piroumian, Konstantin" wrote:
> ...
> >
> > 1) I'd like to have in the catalogue an attribute called "alias", e.g.
> >    <message key="abc">ABC</message>
> >    <message key="xyz" alias="abc"/>
> >    If called <i18n:text>xyz</i18n:text> it will be transformed to "ABC".
> 
> Where this can be used?


I generate tables from DB. And the column description comes from the
DB-column name. Some tables have different column names for the same
real expression. And why we should have the same translation
more than one time?

 
> >
> > 2) It would be nice to have an "adding feature", e.g.
> >    <message key="hello">Hello</message>
> >    <message key="world">World</message>
> >    <message key="hi all" result="'hello' 'world'"/>
> >    So "<i18n:text>hi all</i18n:text>" will result in "Hello World".
> 
> You can use:
> <i18n:translate>
>     <i18n:text>{0} {1}</i18n:text>
>     <i18n:param>hi</i18n:param>
>     <i18n:param>all</i18n:param>
> </i18n:translate>
> 
> I think, that this is the task of the transformer to perform such operations
> and not the dictionary's.


I have for column description very often the same words. E.g.:
employee
employee number
employee group
employee name
employee address
If somebody has the task to generate translations for other languages
it would be very useful to only translate a word one time.


> >
> > 3) It would be good to have an "empty" translation.
> >    Actually if we define <message key="rst"></message> this will result
> > in
> >    "untranslated text" or whatever is configured. Even if we put space
> >    between the tags the behaviour is like that.
> 
> Hm... It's not correct. If there is a key in the dictionary then the result
> must be whatever is its value.

It is not so. Look at line 352 in XMLResourceBundle.java:
            itemValue = itemValue.trim();
            if(itemValue.length() == 0)
                return null;

But I wouldn't change this because it can be a hint that this item
was forgotten to translate. I would prefer an extra attribute for
real empty items.


> Btw, have seen the recent changes in Avalon's i18n support?

No, I will have a look.

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message