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

Aurelien Rouby commented on TAP5-1886:
--------------------------------------

There is a problem with the code added in commit 
b57f85559a380e393ba6478bcca542e7abdfd1.

The resulting js code is the following (note the indexOf() function) :
{code:title=datefield.js|javascript|borderStyle=solid}
if (locale.indexOf('zh' === 0)) {
  abbreviateWeekDay = function(name) {
    return name.substr(name.length - 1);
  };
}
{code}

It causes the new chinese abbreviation logic to be applied to all locales.
For example, the french week days are displayed as "i, i, i..." instead of 
"lundi, mardi, mercredi..."

> DateField is not localized correctly
> ------------------------------------
>
>                 Key: TAP5-1886
>                 URL: https://issues.apache.org/jira/browse/TAP5-1886
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3.2, 5.4
>            Reporter: Rural Hunter
>            Assignee: Jochen Kemnade
>              Labels: datefield
>             Fix For: 5.4
>
>
> My locale is Chinese. The DateField component displays badly with Chinese. 
> 1. The weekday is cut wrongly
> in Chinese, weekday has 3 characters, such as '星期一', '星期二', '星期三'. the 
> difference is on the 3rd character. But DateField just cut the first 
> character to display. it means all weekdays in Chinese are displayed as '星'.
> 2. The 'Today' and 'None' buttons are fix-labeled and not translated.
> I hope DateField will have a language properties file to localize those text.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to