You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Piroumian, Konstantin" <KP...@flagship.ru> on 2002/03/20 09:37:41 UTC
RE: DO NOT REPLY [Bug 7253] New: - [PATCH] I18nTransformer, add
s support for setting translations to upper/lower case
Hi, Marcus!
How are you, mate?
So, why not to use String.toUpperCase(Locale)/String.toLowerCase(Locale)
versions? According to JDK 1.3:
public String toUpperCase(Locale locale)
Converts all of the characters in this String to upper case using the rules
of the given locale. Usually, the characters are converted by calling
Character.toUpperCase. Exceptions to this rule are listed in the following
table...
The same with toLowerCase().
--
Konstantin Piroumian
kpiroumian@flagship.ru
> -----Original Message-----
> From: bugzilla@apache.org [mailto:bugzilla@apache.org]
> Sent: Tuesday, March 19, 2002 9:19 PM
> To: cocoon-dev@xml.apache.org
> Subject: DO NOT REPLY [Bug 7253] New: - [PATCH]
> I18nTransformer, adds support for setting translations to
> upper/lower case
>
>
> DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
> RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
> <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7253>.
> ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
> INSERTED IN THE BUG DATABASE.
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7253
[PATCH] I18nTransformer, adds support for setting translations to
upper/lower case
Summary: [PATCH] I18nTransformer, adds support for setting
translations to upper/lower case
Product: Cocoon 2
Version: Current CVS
Platform: All
OS/Version: All
Status: NEW
Severity: Enhancement
Priority: Other
Component: sitemap components
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: crafterm@fztig938.bank.dresdner.net
Attached is a patch which allows one to add an attribute to i18n:text that
will
modify the case of the translated text. Currently upper and lower case are
supported. ie:
<i18n:text format="upper">key</i18n:text>
and
<i18n:text format="lower">key</i18n:text>
This saves the need to store multiple keys of the same string with different
cases.
Note, conversion is done using String.toUpperCase() and String.toLowerCase()
which doesn't take into account language peculiarities. Conversions should
be
tested (any ideas about how solve this would be appreciated).
---------------------------------------------------------------------
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
i18n upper/lower case (was Re: New: [PATCH] I18nTransformer...)
Posted by "'crafterm@fztig938.bank.dresdner.net'" <cr...@fztig938.bank.dresdner.net>.
Hi Konstantin!
Great to hear from you.
On Wed, Mar 20, 2002 at 11:37:41AM +0300, Piroumian, Konstantin wrote:
> Hi, Marcus!
>
> How are you, mate?
I'm fine mate. And yourself ?
> So, why not to use String.toUpperCase(Locale)/String.toLowerCase(Locale)
> versions? According to JDK 1.3:
>
> public String toUpperCase(Locale locale)
> Converts all of the characters in this String to upper case using the rules
> of the given locale. Usually, the characters are converted by calling
> Character.toUpperCase. Exceptions to this rule are listed in the following
> table...
>
> The same with toLowerCase().
Good idea. I'll change the code and submit a new patch.
BTW - while we're talking about it, the original syntax I wanted
to implement was something like this:
<i18n:format type="upper">text</i18n:format>
<i18n:format type="lower">text</i18n:format>
or
<i18n:toupper>text</i18n:toupper>
<i18n:tolower>text</i18n:tolower>
Basically using surrounding tags rather than an attribute.
That way we wouldn't be restricted to converting case of just
translated text, but could upper/lower case any text given as
input.
The state model of I18nTransformer proved to be a bit difficult
to change though to add this new tag, hence the format="upper"
attribute.
Your knowledge about I18nTransformer is definitely better than
mine - What do you think ? Is it easier to implement than I
originally thought ?
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: ManageSoft GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&'
&&&&.
&&&&&&&:
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org