mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

Missing moment locales for several of our own locales #2020

Open tofumatt opened 7 years ago

tofumatt commented 7 years ago

Once mozilla/addons-frontend#1514 is merged we're using [moment] for our dates but it's missing locales for the following locales we support:

We should add them to moment or help them get added.

List updated by muffinresearch on at 1st August 2018

┆Issue is synchronized with this Jira Task

willdurand commented 6 years ago

@muffinresearch it is written we can add a mapping for some locales, but I don't know how to do that.

I am not sure our code allows that. There is a mapping for short -> long locales, but pt -> pt_PT is there and moment still complains about pt-PT being missing for instance.

muffinresearch commented 6 years ago

I think we'd need a moment specific mapping and do that replacement here: https://github.com/mozilla/addons-frontend/blob/f8d1f2c7f4aaa6053330c9742a688469920384d4/bin/build-locales

tofumatt commented 6 years ago

Oops, I think I wasn't clear in the issue but if I recall correctly this was meant to track mapping our locales to moment's. Our mappings are in https://github.com/mozilla/addons-frontend/blob/master/config/default.js#L236 but yeah they don't do it for moment.

I'm guessing the issue is that moment doesn't like the dashes?

tofumatt commented 6 years ago

Indeed, @muffinresearch nailed it 😄

willdurand commented 6 years ago

Mapping added in https://github.com/mozilla/addons/issues/12530

KevinMind commented 6 months ago

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-114