cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enke Michael <>
Subject Re: i18n transformer update
Date Thu, 24 Jan 2002 13:35:13 GMT
"Piroumian, Konstantin" wrote:
>  ...
> > 1) I have a whish: Could we introduce a new cocoon.xconf parameter for i18n
> >   called empty-translation, e.g. empty-translation="."?
> Do you mean sitemap.xmap?

Doesn't matter. I'm not so deep in the internals to know what to
configure in cocoon.xconf or sitemap.xmap.

> >   At this time it is not possible to have an empty translation.
> >   I need this for generic formular creation and I only commented out
> >   line 357 in itemValue = itemValue.trim();
> >   and put a space in the dictionary.
> >   But I think a more common solution would be fine also for others.
> Ok, I'll take a look at it. As I can see, you can now use
> 'untranslated-text' param to provide custom text for not found messages.
> Maybe this can be the common solution for your case?

No, we must differentiate the cases that either a translation was really forgotten
or a <i18n:text>somethink</i18n:text> should result in silence.
For me the "somethink" comes out of a database. I have a formular.xsp
which creates textfields and descriptions for the textfields.
The textfields are correlated with tablecolumn names, e.g. "Employee Number".
Another column in formular table is called "relation", this can be
"<=", "=" or ">=". So both columns together are responsible to create
textfields "From Employee Number" or "To Employee Number".
In the case of equality ("Employee name") I want to have an empty translation for "=".

> > 2) I prepared 2 new attributes: currency-no-unit and int-currency-no-unit
> >   This prevents the "$" or "DM" (now "Euro") from printing.
> >   I append the diff -u
> Are you sure? As I could get from the diff you just set the number of
> fraction digits and nothing else. Anyway, this can be useful.

No. Look closely, there is a NumberFormat.getInstance(),
not a NumberFormat.getCurrencyInstance().
And than the fractions of that NumberFormat-Instance are set as from

> Btw, do we need separate 'type' and 'sub-type' attributes? It's absolutely
> enough to have 'type' = [number, date, date-time, time, currency, percent].

I agree!

> We can introduce new attributes: 'max-fraction' and 'min-fraction'.

No, that is not the way.
Java knows how many fractions are necessary for money values of the used locale.
This is not always 2. So Italy or Spain had (before the Euro) no fraction digits.

> ...


To unsubscribe, e-mail:
For additional commands, email:

View raw message