Opened 5 years ago

Closed 3 years ago

#18351 closed defect (fixed)

Date Picker error appears in Catalan language when using IE

Reported by: cstephe Owned by: cjolif
Priority: undecided Milestone: 1.10
Component: Date Version: 1.9.2
Keywords: Cc:
Blocked By: Blocking:

Description

There is a Date Picker error when using the Catalan language in Internet Explorer(9). Although the date is entered in the correct format it still shows errors when selecting certain months. Among the working are: Abril(April), Agost(August), and Octubre(October). Which all have a single quote in the translated string(ex: "d’octubre"). We have tracked the problem to this line of code:

return str.length == 1 ? str[0] : _1e+ _1d?.replace(/\'/g, "").replace(/\{(\d+)\}/g,

Attachments (2)

weely_catalan_error.png (16.1 KB) - added by cstephe 5 years ago.
problemCode.jpg (76.2 KB) - added by cstephe 5 years ago.

Download all attachments as: .zip

Change History (11)

Changed 5 years ago by cstephe

Attachment: weely_catalan_error.png added

Changed 5 years ago by cstephe

Attachment: problemCode.jpg added

comment:1 Changed 5 years ago by bill

it still shows errors when selecting certain months. Among the working are: Abril(April), Agost(August), and Octubre(October). Which all have a single quote in the translated string(ex: "d’octubre").

Did you really mean "working", or did you mean to say "broken"?

Presumably you mean this line of code, from dojo/date/locale.js:

return str.length == 1 ? str[0] : bundle["dateTimeFormat-"+formatLength].replace(/\'/g,'').replace(/\{(\d+)\}/g,

I don't know why it's doing that replace().

Last edited 5 years ago by bill (previous) (diff)

comment:2 Changed 5 years ago by cstephe

Hi, sorry for the late response. The months listed (August, October, and April) are the only ones that works without error. That is the correct code snippet in dojo/date/locale.js. Sorry for the decomplied version.

comment:3 Changed 5 years ago by bill

OK, I don't get it. Why do the *other* months fail? The English month names all work and they don't have any single quotes.

comment:4 Changed 4 years ago by cstephe

I was doing some debugging and found the root of the problem. In exports.format:

if(options.selector != "time"){
    pattern = options.datePattern || bundle["dateFormat-"+formatLength];
    if(pattern){str.push(_processPattern(pattern, sauce));}
}

bundle["dateFormat-"+formatLength] Returns: d MMMM 'de' y

The problem is MMMM. A month with a ' will fit the MMMM formatting(ex: d’octubre), while a month without it fails to meet the formatting of MMMM because of the de in front of the month(ex: de maig).

comment:5 Changed 4 years ago by cjolif

The problem actually is probably not in this code but in our CLDR that returns "de maig" instead of "maig" and "d'octubre" instead of "octubre".

comment:6 Changed 4 years ago by cjolif

"de maig" instead of "maig" is indeed an issue with our CLDR which happens to be fixed by #17770 where we updated to CLDR 25.

Last edited 4 years ago by cjolif (previous) (diff)

comment:7 Changed 3 years ago by dylan

Milestone: tbd1.11
Owner: set to cjolif
Status: newassigned

So does this work with the fix from #17770 then?

comment:8 Changed 3 years ago by dylan

Milestone: 1.111.12

Ok, after massive triage, ended up with about 80 tickets for 1.11 and 400 or so for 1.12. That's a bit unrealistic, so first I changed all 1.12 to 1.13 (with the plan to move some forward to the new 1.12. Now, I'm moving some of the 1.11 tickets that are less likely to get done this month without help to 1.11. Feel free to help out in January if you want to see this ticket land in 1.11.

comment:9 Changed 3 years ago by cjolif

Milestone: 1.121.10
Resolution: fixed
Status: assignedclosed

yes looks like #1770 fixed this, at least as far as I can understand the report.

Note: See TracTickets for help on using tickets.