Page MenuHomePhabricator

moment.js shows Cyrillic Uzbek instead of Latin
Closed, ResolvedPublic

Description

moment.js is used in several places. One simple way to reproduce:

  1. Enable Content Translation in the Uzbek Wikipedia.
  2. Go to https://uz.wikipedia.org/wiki/Special:CX .
  3. If you don't have any translations in progress, start a translation, type something, don't publish, and go back to https://uz.wikipedia.org/wiki/Special:CX .

Observe: The time of a recently edited translation is shown as "Бир неча фурсат олдин" (or something else in Cyrillic, depending on the time).

Expected: The time is supposed to be in the Latin alphabet, e.g. "Bir necha fursat oldin".

The reason for this is that the moment.js library uses "uz" for Uzbek in the Cyrillic alphabet, and "uz-latn" for Uzbek in Latin.

As of May 2022, "uz" in MediaWiki refers to Latin. It has a script converter to Cyrillic, but no full-fledged "uz-cyrl" locale or translations under languages/i18n, so it's safe to simply map the "uz" locale to "uz-latn" in moment.js.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 791022 had a related patch set uploaded (by Amire80; author: Amire80):

[mediawiki/core@master] Map "uz" locale in moment.js to "uz-latn"

https://gerrit.wikimedia.org/r/791022

Change 791022 merged by jenkins-bot:

[mediawiki/core@master] resourceloader: Change "uz" locale of moment.js to "uz-latn"

https://gerrit.wikimedia.org/r/791022