moment / moment

Parse, validate, manipulate, and display dates in javascript.
momentjs.com
MIT License
47.96k stars 7.05k forks source link

Rename locale (me) to (cnr) #5325

Closed AlsoScratch closed 4 years ago

AlsoScratch commented 4 years ago

I noticed that you have a file named me.js. But according to Wikipedia, me is not a valid 2-letter ISO 639-1 code. Did you mean to use a 3-letter code for this language?

ashsearle commented 4 years ago

Looks like montenegrin.

It also looks like 'me' was the right code to use when the file was created (see comments)

I could see an argument for calling the locale 'cnr' if it didn't already exist; but feels like it'd be a breaking change to rename the locale now.

AlsoScratch commented 4 years ago

Although me is currently not an ISO 639-1 code that's in use, that means it's possible for me to become allocated for another language in the future that may or may not be Montenegrin. Not saying that it's likely though.

AlsoScratch commented 4 years ago

It also looks like 'me' was the right code to use when the file was created (see comments)

Okay, I just checked the comment and it mentions ISO 3166-1 but that is for countries and territories but not languages. For languages, it's ISO 639-1 that you may need and what I believe is the intended naming for the locale files.

ashsearle commented 4 years ago

@AlsoScratch You're probably right: locale files are named after ISO 639-1 where a 2-character code is available, and ISO 639-2 or ISO 639-3 if not.

In this case, the 'cnr' ISO 639-3 wasn't registered at the time the locale was contributed to moment, so couldn't follow ISO 639 naming convention. And now... it's a breaking change to rename it.

https://iso639-3.sil.org/code/cnr

marwahaha commented 4 years ago

See https://momentjs.com/docs/#/-project-status/