Opened 10 years ago

Last modified 3 years ago

#10490 new defect

Month names are not localized properly in dojox.Calendar widget for Japanese locale

Reported by: venugopalkathavate Owned by: Shane O'Sullivan
Priority: high Milestone: 1.15
Component: DojoX Widgets Version: 1.4.0
Keywords: CalendarFX Cc:
Blocked By: Blocking:

Description

The CalendarFX control from dojox does not display the month names and Japanese locale. It just shows the number in place of months like 12 for December and 1 for January.

I investigated and found out that cldr/nls/jp/Georgian.js file contains numbers in place of month names. I replaced the numbers with proper month names and the issue got solved.

Is the file not properly localized?

Attachments (2)

test_calendar_fx.html (1.5 KB) - added by venugopalkathavate 10 years ago.
HTML test file using Calendar control from dojox.
calFX_in_ja_locale.JPG (21.0 KB) - added by venugopalkathavate 10 years ago.
Screen shot showing the problem.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 10 years ago by Adam Peller

Resolution: invalid
Status: newclosed
Summary: IBM Dojo 1.3.2: Mnames are not localized properly in dojox.Calendar widget for Japanese localeMonth names are not localized properly in dojox.Calendar widget for Japanese locale

The Japanese locale is 'ja' not 'jp'. jp is a country code for Japan, so ja and ja-jp are valid locales.

comment:2 Changed 10 years ago by venugopalkathavate

Resolution: invalid
Status: closedreopened

sfdfsdfsdfdfsd sdfsd

comment:3 Changed 10 years ago by venugopalkathavate

It was a typo. I used 'ja' locale only. Is it okay to change the core locale files or is there a workaround to fix the issue?

comment:4 Changed 10 years ago by Adam Peller

Resolution: invalid
Status: reopenedclosed

And using 'ja' should work; if it does not, please attach a complete html file showing the problem and reopen the ticket. 'jp' is not the proper Japanese locale and that code should not be used for Japanese.

comment:5 Changed 10 years ago by venugopalkathavate

Resolution: invalid
Status: closedreopened

Changed 10 years ago by venugopalkathavate

Attachment: test_calendar_fx.html added

HTML test file using Calendar control from dojox.

Changed 10 years ago by venugopalkathavate

Attachment: calFX_in_ja_locale.JPG added

Screen shot showing the problem.

comment:6 Changed 10 years ago by venugopalkathavate

PFA the HTML file and screen shot showing the problem. The month names are displayed as month numbers and then some Japanese character. I am using 'ja' for Japaneses locale.

comment:7 Changed 10 years ago by Adam Peller

Owner: changed from dante to Shane O'Sullivan
Status: reopenednew

As far as I know, that's the proper behavior. The comma probably should not be there, however, and years should also have a Japanese character after them.

comment:8 Changed 10 years ago by Adam Peller

Shane,

I'm not sure how complete the support is for this (and it involves a private API) but you can try using this to generate a localized string for Month + Year (note that the order and punctuation are both determined by locale)

dojo.date.locale.format(new Date(), {selector:'date', datePattern:dojo.date.locale._getGregorianBundle()["dateFormatItem-yMMM"] || "MMM yyyy"});

Similarly, you can use either of these to generate just the year which isn't always just the digits:

dojo.date.locale.format(new Date(), {selector:'date', datePattern:dojo.date.locale._getGregorianBundle()["dateFormatItem-yyyy"] || "yyyy"});
dojo.date.locale.format(new Date(), {selector:'year'});

comment:9 Changed 4 years ago by dylan

Milestone: tbd1.12

comment:10 Changed 3 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.