Lucas_Werkmeister_WMDE created this task. Lucas_Werkmeister_WMDE added projects: Wikidata, Language codes. Restricted Application added a subscriber: Aklapper.
TASK DESCRIPTION As a Wikidata editor, I want to see labels in languages that are relevant to me, according to my Babel information. **Problem:** I noticed this while working on T297393 <https://phabricator.wikimedia.org/T297393>: `LanguageFallbackChainFactory::buildFromBabel()` first adds the babel languages, then their variants, and then for each language all of the fallbacks. This means that the implicit fallback to `en` is added after all the explicit fallbacks of the first Babel language, but before the explicit fallbacks of any other Babel languages. **Example:** Consider a user with the following Babel. **arz-5, frc-4**. (`arz` Egyptian Arabic falls back to `ar` Arabic; `frc` Cajun French falls back to `fr` French.) I posit that they should get the following language fallback chain: arz, frc, ar, fr, en. However, they currently get the following fallback chain: arz, frc, ar, //en, fr//. **Screenshots/mockups:** name=maintenance/shell.php >>> array_map( function ( $lwc ) { return $lwc->getLanguageCode(); }, \Wikibase\Repo\WikibaseRepo::getLanguageFallbackChainFactory()->buildFromBabel( [ '5' => [ 'arz' ], '4' => [ 'frc' ] ] ) ) => [ "arz", "frc", "ar", "en", "fr", ] **BDD** GIVEN AND WHEN AND THEN AND **Acceptance criteria:** - The Babel fallback chain lists the explicit language fallbacks of all Babel languages before any implicit fallbacks (`en` and, with T297393 <https://phabricator.wikimedia.org/T297393>, `mul`) – unless the implicit fallbacks are also explicit fallbacks, of course (e.g. if the Babel includes `sco` Scots, which explicitly falls back to `en`). **Open questions:** TASK DETAIL https://phabricator.wikimedia.org/T299904 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Lucas_Werkmeister_WMDE, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, Mahir256, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Nikki, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org