cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piroumian, Konstantin" <KPiroum...@flagship.ru>
Subject Re: [Patch] Character handling in i18n transformer fix
Date Thu, 07 Feb 2002 18:09:21 GMT
The best spec is the source code - welcome to the Open Source ;)
A little less you can learn from docs:
http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/transformation/I18nTr
ansformer.html
and from the i18n samples that show most of the possible usage patterns.

Although, there is a lot of things that can be improved in the transformer,
e.g. in date and number formatting. See:
http://jakarta.apache.org/taglibs/doc/datetime-doc/index.html to get the
idea.

Best regards,
    Konstantin Piroumian

----- Original Message -----
From: "Santoso, Tommy" <Tommy.Santoso@Dresdner-Bank.com>
To: <cocoon-dev@xml.apache.org>
Sent: Thursday, February 07, 2002 9:03 PM
Subject: AW: [Patch] Character handling in i18n transformer fix


Hi Konstantin,

I always uses the <i18n:text> to translate 'Some text',
eg. like these:
<i18n:translate>
<i18n:text>Some text to be translated</i18n:text>
<i18n:param><i18n:text>myparam1</i18n:text></i18n:param>
<i18n:param><i18n:text>myparam2</i18n:text></i18n:param>
</i18n:translate>
should be fine, since they used new i18n tags.

But you'r right in case of your eg. the buffer is overwritten and
will ignore 'normal text'
Could you reference me to i18nTransformer spec., which will help
me better to get involved :o)

Great Stuff !

Thanks,
Tommy


-----Urspr√ľngliche Nachricht-----
Von: Piroumian, Konstantin [mailto:KPiroumian@flagship.ru]
Gesendet am: Donnerstag, 7. Februar 2002 18:49
An: cocoon-dev@xml.apache.org
Betreff: Re: [Patch] Character handling in i18n transformer fix

Good time of day again!

I've fixed i18n transformer - now i18n samples work, also it'd be fine if
anybody could test pages where chunked character data happens. Now, I hope,
everything should be fine.

I've change the implementation like as if a character filter is used - all
the chunked data is buffered until startElement or endElement event is
received.

Bugzilla is still unaccessible from here, could anybody please apply this
final (until next bug is found) patch.

Next step in i18n transformer improvement should be reducing the number of
debug messages.

Regards,
    Konstantin Piroumian


> It seems that I've made an hasty conclusion that everything's work - the
> cause was another Tomcat instance with the old C2 deployed ;((
>
> Current version of i18n transformer does not handle i18n samples
correctly.
> The quick glance to the source showed that the problem is that the
> startI18NElement() does not handle previously buffered characters, e.g.:
>
> <i18n:translate>
>     Some text            <!-- we buffer the character data here
>     <i18n:param ...> <!-- we get startElement() and the old buffer is
> replaced with a brand new one
> </i18n:translate>
>
> I'll try to fix it asap and hope will send a patch in an hour.
>
> Regards,
>     Konstantin Piroumian
>
> > > Applied, please check.
> >
> > Thanks
> >
> > >
> > > I'm not sure about this trim() though: the result may be the words
> > > concatenated with each other without single space...
> >
> > Yes, that's true, I think that trim() should be used at the end only -
> when
> > looking for the translation. I'll fix it now.
> >
> > Konstantin
> >
> > >
> > > Vadim
> > >
> > > > -----Original Message-----
> > > > From: Piroumian, Konstantin [mailto:KPiroumian@flagship.ru]
> > > > Sent: Thursday, February 07, 2002 8:02 AM
> > > > To: cocoon-dev@xml.apache.org
> > > > Subject: [Patch] Character handling in i18n transformer fix
> > > >
> > > > Hi!
> > > >
> > > > I can't access the Bugzilla to submit this patch, seems that the
site
> > > is
> > > > down.
> > > > Can anybody please apply this patch to i18n transformer that fixes
> > > chunked
> > > > character SAX event handling.
> > > >
> > > > Thanks to Tommy Santoso for this patch.
> > > >
> > > > Best regards,
> > > >     Konstantin Piroumian
> > > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>


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


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


Mime
View raw message