Page MenuHomePhabricator

Recent additions to term languages have not been added to InitialiseSettings.php
Closed, ResolvedPublic

Description

There are 38 41 44 languages in getDefaultTermsLanguages() in WikibaseContentLanguages.php (recently added by @Mbch331) which were not also added to wmgExtraLanguageNames in InitialiseSettings.php.

This is needed to make them available for lexemes (see @Lucas_Werkmeister_WMDE's comment at T260118#6474757) and to make them sort correctly on Special:NewItem (see T272346).

See also: T273627: Remove wmgExtraLanguageNames from Wikimedia production

Event Timeline

If T273627 isn't done shortly, I suppose we'd have to patch this on every update as well. @Mbch331 what do you think?

Change 734722 had a related patch set uploaded (by Mbch331; author: Mbch331):

[operations/mediawiki-config@master] Add missing termbox codes from Wikibase

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

noarave changed the task status from Open to Stalled.Dec 9 2021, 10:27 AM
Lydia_Pintscher changed the task status from Stalled to Open.Apr 8 2022, 1:37 PM
Lydia_Pintscher subscribed.

Unstalling this as it seems we need to take this over. I've been poked to get this moving again.

Hi @hoo, this task came up in the Bug Triage Hour as it seems stuck. Could you please have a look at this?

Change 734722 merged by jenkins-bot:

[operations/mediawiki-config@master] Add missing termbox codes from Wikibase

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

Mentioned in SAL (#wikimedia-operations) [2022-05-05T21:58:20Z] <hoo@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:734722|Add missing termbox codes from Wikibase (T277836)]] (duration: 00m 48s)

Done (rebased and deployed the above change by @Mbch331)! Now the lists match up:

hoo@deploy1002:/srv/mediawiki-staging$ mwscript eval.php --wiki wikidatawiki> $langs = \Wikibase\Lib\WikibaseContentLanguages::getDefaultTermsLanguages()->getLanguages();
> sort( $langs );
> echo md5(implode(':', $langs));
21b09a49bab76999c274d42a76c96d44

> $lnu = \MediaWiki\MediaWikiServices::getInstance()->getLanguageNameUtils( MediaWiki\Languages\LanguageNameUtils::AUTONYMS, MediaWiki\Languages\LanguageNameUtils::ALL );
> $langs = $lnu->getLanguageNames();
> $langs = array_keys( $langs );
> sort( $langs );
> echo md5(implode(':', $langs));
21b09a49bab76999c274d42a76c96d44

Yay, that was quick, thank you @hoo! I wonder what we could do to not get out of sync again in the future? Can we reduce the redundancy or do we need it and this is ultimately a process thing?

Yay, that was quick, thank you @hoo! I wonder what we could do to not get out of sync again in the future? Can we reduce the redundancy or do we need it and this is ultimately a process thing?

Well, ideally this would not be needed (see T273627). For now, I can add a comment to Wikibase so that we manually keep the lists in sync.

Change 799385 had a related patch set uploaded (by Hoo man; author: Hoo man):

[mediawiki/extensions/Wikibase@master] WikibaseContentLanguages: Add comment about wmgExtraLanguageNames

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

Change 799385 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] WikibaseContentLanguages: Add comment about wmgExtraLanguageNames

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