Lucas_Werkmeister_WMDE added a comment.

That’s because moment.js doesn’t know about the simple language code, so moment.locale( 'simple' ) doesn’t have any effect and leaves it at the previous locale.

The simple solution for this particular case is to define the locale:

moment.defineLocale( 'simple', { parentLocale: 'en' } );

However, there are probably more language codes known to ULS that aren’t supported by moment.js… I guess the more general solution would be to pass all the fallback locales along, i. e. moment.locale( [ 'simple', 'en' ] ) in this case.


TASK DETAIL
https://phabricator.wikimedia.org/T188046

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Lucas_Werkmeister_WMDE
Cc: Jonas, Lucas_Werkmeister_WMDE, Aklapper, Smalyshev, Gq86, EBjune, merbst, Xmlizer, jkroll, Wikidata-bugs, Jdouglas, aude, Tobias1984, Manybubbles, Lydia_Pintscher
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to