Page MenuHomePhabricator

LanguageNames not falling back properly
Closed, ResolvedPublic

Description

Event Timeline

Krenair created this task.Sep 6 2015, 4:32 PM
Krenair updated the task description. (Show Details)
Krenair raised the priority of this task from to Needs Triage.
Krenair added a subscriber: Krenair.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 6 2015, 4:32 PM

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 project: Multimedia. · View Herald TranscriptSep 6 2015, 4:57 PM
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 );
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 6 2015, 4:57 PM

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 moved this task from Untriaged to Doing on the Multimedia board.Sep 8 2015, 12:53 AM
Jdforrester-WMF assigned this task to Krenair.
Jdforrester-WMF triaged this task as Normal priority.

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

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

Jdforrester-WMF moved this task from Doing to Done on the Multimedia board.Sep 8 2015, 3:37 PM

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

Krenair added a subscriber: KartikMistry.EditedSep 8 2015, 5:55 PM

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.

Krenair moved this task from Done to Untriaged on the Multimedia board.

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

Krenair moved this task from Untriaged to Done on the Multimedia board.Sep 8 2015, 7:46 PM

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

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

Krenair updated the task description. (Show Details)
Krenair closed this task as Resolved.
Krenair removed a project: Patch-For-Review.