Page MenuHomePhabricator

Replace deprecated language codes in user options
Closed, ResolvedPublic

Description

Deprecated language codes in the user options should be replaced by the new language codes. The mapping is in LanguageCode::getDeprecatedCodeMapping().

Event Timeline

Change 279927 had a related patch set uploaded (by Gerrit Patch Uploader):
Replace dummy language codes in user options

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

Maybe this task should be solved as a maintenance job because it has to be done only once.

Maybe this task should be solved as a maintenance job because it has to be done only once.

Yes, that seems like a better option. We'd also want to leave qqq/qqx alone.

qqq and qqx are not affected.

A maintenance job can be problematic. It has to be run after every deployment because maybe the mapping of deprecated language codes has changed. A maintenance job can be very heavy when the user database is large. Replacing the deprecated language codes on database read is a small check which has to be also done on other inputs like the uselang parameter.

Change 279927 merged by jenkins-bot:
[mediawiki/core@master] Replace deprecated language codes in user options

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

The user option variant also contains a language code which can be a deprecated language code after T117845: Rename the language codes sr-ec and sr-el to the BCP 47 conform codes sr-Cyrl and sr-Latn or other changes of language codes.

Change 828632 had a related patch set uploaded (by Fomafix; author: Fomafix):

[mediawiki/core@master] Replace deprecated language codes also in user option `variant`

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

Change 828632 merged by jenkins-bot:

[mediawiki/core@master] Replace deprecated language codes in user options variant and variant-*

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

All related patches in Gerrit have been merged. Assuming this task is resolved. If there is more to do in this task, please reopen.