Page MenuHomePhabricator

LanguageNames not falling back properly
Closed, ResolvedPublic

Description

Event Timeline

Krenair raised the priority of this task from to Needs Triage.
Krenair updated the task description. (Show Details)
Krenair added a subscriber: Krenair.

Oh, looks like there's a LanguageNames::FALLBACK_NORMAL you give to make it go through the fallback chain properly. Why is that not default?

Krenair renamed this task from LanguageNames broken in en-gb (and probably others) to LanguageNames not falling back properly.Sep 6 2015, 4:57 PM
Krenair set Security to None.
Restricted Application added a subscriber: Steinsplitter. · View Herald Transcript

Also these extensions in WMF production:

extensions/EducationProgram/includes/Utils.php:			self::getValuesAppendedKeys( \LanguageNames::getNames( $langCode ) )
extensions/EducationProgram/includes/pagers/CoursePager.php:				$langs = \LanguageNames::getNames( $this->getLanguage()->getCode() );
extensions/UniversalLanguageSelector/data/LanguageNameIndexer.php:			$langnames = LanguageNames::getNames( $code, 0, 2 );
extensions/UploadWizard/UploadWizard.config.php:		$baseLangs = LanguageNames::getNames( $userLangCode );

Change 236427 had a related patch set uploaded (by Alex Monk):
Make language names go through proper fallback chain

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

Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF moved this task from Untriaged to Doing on the Multimedia board.

Change 236427 merged by jenkins-bot:
Get language names via core functions

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

Only for SiteMatrix. Haven't looked into the code in other extensions mentioned.

extensions/EducationProgram/includes/Utils.php: self::getValuesAppendedKeys( \LanguageNames::getNames( $langCode ) )

Only visible to sysops: compare dropdown on https://test2.wikipedia.org/w/index.php?title=Education_Program:University_of_Mediawiki/Wikifying_(3_months)&action=edit&uselang=en and https://test2.wikipedia.org/w/index.php?title=Education_Program:University_of_Mediawiki/Wikifying_(3_months)&action=edit&uselang=en-gb

extensions/EducationProgram/includes/pagers/CoursePager.php: $langs = \LanguageNames::getNames( $this->getLanguage()->getCode() );

Compare https://es.wikipedia.org/w/index.php?title=Especial:Cursos&uselang=en with https://es.wikipedia.org/w/index.php?title=Especial:Cursos&uselang=en-gb

extensions/UniversalLanguageSelector/data/LanguageNameIndexer.php: $langnames = LanguageNames::getNames( $code, 0, 2 );

Not quite sure about this one... @KartikMistry?

extensions/UploadWizard/UploadWizard.config.php: $baseLangs = LanguageNames::getNames( $userLangCode );

This is a bit more of a pain to get to, but if you go through Special:UploadWizard on testwiki with a random image, after filling in source/author/license etc. you eventually get to a form about describing it - including a language dropdown. In en, the options are translated, but en-gb shows native names.

Change 236854 had a related patch set uploaded (by Alex Monk):
Get language names via core functions

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

Change 236856 had a related patch set uploaded (by Alex Monk):
Get language names via core functions

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

Change 236854 merged by jenkins-bot:
Get language names via core functions

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

Change 236856 merged by jenkins-bot:
Get language names via core functions

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