New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620285 link

Starred by 5 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

Date.prototype.toLocaleString doesn't work correctly with Norwegian Nynorsk

Reported by oliverk...@gmail.com, Jun 15 2016

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36

Steps to reproduce the problem:
Enter `new Date().toLocaleString('nn-NO', {day: 'numeric', month: 'long'})` into the Chrome console

What is the expected behavior?
toLocaleString should return "15. juni"

What went wrong?
toLocaleString returned "M06 15"

Did this work before? N/A 

Chrome version: 51.0.2704.79  Channel: n/a
OS Version: Ubuntu 15.04
Flash Version: Shockwave Flash 21.0 r0

This works correctly with Bokmal ('nb-NO'), also on Firefox on my system both Nynorsk and Bokmal work correctly ('15. juni')
 
Components: -Blink Blink>JavaScript>Internationalization
Cc: dehrenberg@chromium.org
Status: Available (was: Unconfirmed)
Cc: -dehrenberg@chromium.org js...@chromium.org littledan@chromium.org
Not sure if we ship the Nynorsk locale, but it's really strange that we write it out as "M06 17" rather than "June 17" as a nonexistent or unshipped locales are otherwise. I think an underlying concern is limiting binary size--there are certainly locales with a larger speaking population that are not shipped (e.g., Assamese, which has 3x as many speakers as the whole population of Norway). Would it be culturally appropriate to fall back to Bokmal in this case? Or should we fall back to English, as we do with Assamese?
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 19 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by jochen@chromium.org, Jun 20 2017

Owner: adamk@chromium.org
Status: Assigned (was: Untriaged)

Comment 6 by adamk@chromium.org, Jun 20 2017

Cc: adamk@chromium.org
Owner: js...@chromium.org
jshin, can you take a look?

Comment 7 by js...@chromium.org, Jan 24 2018

Sorry for missing this issue.   "M01" comes from the root locale. I'll add nn locale data (it should be small). 

We have the same problem with other locales for which we don't include ICU locale data. 

new Date().toLocaleString('lo', {day: 'numeric', month: 'long'})
"M01 24"

new Date().toLocaleString('km', {day: 'numeric', month: 'long'})
"M01 24"

And, we also have to implement a smarter locale fallback (e.g. nn to nb). 

Comment 8 by js...@chromium.org, Feb 1 2018

> I'll add nn locale data (it should be small). 

It's 6kB more data. So, it's not a big deal (nonetheless, Android may care), but the question is whether adding it makes us deviate from the current policy. The full locale data is included for locales Chrome is localized to (and regional variants of those locales) while the barebone minimal data is added for other locales (basically, writing direction and its own display name). 

> we also have to implement a smarter locale fallback (e.g. nn to nb). 

In the meantime, I'll add a hack to make nn fall back to nb until ICU implements a real locale/language matcher based on inter-language distance. 
This is strange, is there any plan to download the dictionary of the language select when you do so then? Like Linux distros has done for a long time?

This works in Opera, though they might just ship nynorsk by default - since even if it has fewer users than Assamese, they're probably more important money makers :)
There seems to be other issues around the Norwegian Nynorsk locale on chrome.

The code below outputs "123,456.789" instead of "123 456,789"

console.log(new Intl.NumberFormat('nn-no', {}).format(123456.789));

JSBin: https://jsbin.com/nuqawuw/edit?js,console

There are chances that fixing the current bug would resolve the Intl.NumberFormat issue. 

Question: should a new bug be created for this ?

Sign in to add a comment