cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject RE: i18n transformer empty message element ignored?
Date Mon, 02 Sep 2002 11:32:28 GMT
> From: Dr. Hans M. Rupp [mailto:hans-michael.rupp@danet.de] 
> 
> Hallo!
> 
> Sometimes we need the behavior, that the i18n transformer replaces
> something with nothing. Somehow this does not seem to work.

Yes, it doesn't work. A support for empty messages was requested a while ago
(from Michael Enke) and I remember about it, but unformtunately I am very
limited in time now to work on it. See possible workarounds below:

> E.g: pre i18n:
> <td align="right" class="Text">NO <i18n:text
> i18n:key="Unit.NO_UNIT">NO_UNIT</i18n:text> (08:00 h)</td>

Try to replace NO_UNIT by a space character, if it doesn't help then try the
&nbsp;. I know that this can result in layout problems, but don't know a
better solution yet. Sorry.

> catalogue entry:
> <message key="Unit.NO_UNIT"></message>
> output:
> NO NO_UNIT
> When I replace the zero length string in the catalogue with bla the
> output
> is
> NO bla
> so the catalogue entry can be found.
> A single space or more spaces as the element contents also seem to be
> ignored.

Did you try a space inside of the <i18n:text> element? 

> 
> Any ideas for a work-around or solution?

Another solution is to comment out the trim() function in source code where
the string is retrieved from a dictionary.

Konstantin

> 
> 
> Many thanks,
> Hans
> 
> --------------------------------------------
> Dr. Hans M. Rupp
> danet Internet Solutions GmbH
> Waldburgstr. 17-19
> 70563 Stuttgart
> Germany
> 
> Fon +49 711 133 53 50
> Fax +49 711 133 53 53
> 
> ------------------------------------------
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
> 

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message