[ 
https://issues.apache.org/jira/browse/TRINIDAD-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065578#comment-13065578
 ] 

Pavitra Subramaniam commented on TRINIDAD-2116:
-----------------------------------------------

A simple way to see the current behavior is to update one of the english locale 
messages in MessageBundle.xrts. For e.g., I changed the following resource key. 
This message gets used on the client side validation checks by the date time 
converter. 

  <resource 
key="org.apache.myfaces.trinidad.convert.DateTimeConverter.CONVERT_DATE_detail">l&apos;&apos;exemple
 : {2}</resource>

Similarly change a resource key string that gets formatted on the server side, 
such as 
  <resource 
key="org.apache.myfaces.trinidad.validator.DateTimeRangeValidator.NOT_IN_RANGE_detail">The
 d&apos;&apos;ate must be between {2} and {3}.</resource>

> ResourceBundles Strings containing doubled single quotes are not properly 
> formatted by FastMessageFormat on display... 
> -----------------------------------------------------------------------------------------------------------------------
>
>                 Key: TRINIDAD-2116
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-2116
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions:  1.2.12-core
>            Reporter: Pavitra Subramaniam
>         Attachments: jira-2116-1.2.12.6.0.patch
>
>
> The translations tool used by the WPTG team that provides translations for 
> the Strings in the ResourceBundle uses special processing for single 
> quotation marks, common in languages such as French. In ResourceBundle files, 
> if a message contains an argument placeholder, e.g. {0} or {1}, it is assumed 
> to be a format pattern for MessageFormat and the translation tool 
> automatically doubles all single quotes inside such a message. If the message 
> contains no arguments, it is expected to be used directly after loading from 
> the bundle, without processing with MessageFormat. Therefore, no quotes are 
> doubled automatically in such a message. This code change accounts for the 
> presence of doubled quotes.
> Now FastMessageFormat.java and its counterpart on the client 
> TrFastMessageFormatUtils object (Locale.js) assumes simple formatting rules 
> and does not account for the presence of doubled single quotes. So this means 
> that for some messages French users continue to see doubled quotes when 
> single quotes are more the norm, For e.g., instead of 
> Entrez une date avec le même format que l'exemple suivant : 01/02/2011
> they see something like 
> Entrez une date avec le même format que l''exemple suivant : 01/02/2011
> (Notice the doubled quotes in l''exemple)

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to