Open tofumatt opened 7 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.
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
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?
Indeed, @muffinresearch nailed it 😄
Mapping added in https://github.com/mozilla/addons/issues/12530
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDFRNT-114
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:
bn
so we could map this.x-pseudo
x-pseudo
fy
so this could be mappednb
.nn
.pt
needs to be mapped.sv
needs to be mapped.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