Page MenuHomePhabricator

Language variants not considered for language fallback in all relevant places
Open, Needs TriagePublic

Assigned To
None
Authored By
Manuel
Aug 30 2023, 4:02 PM
Referenced Files
F41793034: image.png
Feb 6 2024, 1:32 PM
F41731914: image.png
Jan 30 2024, 5:51 PM
F41731905: image.png
Jan 30 2024, 5:51 PM
F37643065: image.png
Aug 30 2023, 4:02 PM

Description

On Test Wikidata language language variant fallbacks seem not be utilized in all places. I have seen it for my account in multiple occasions and multiple places (Special:RecentChanges and Special:Contributions).

Example

Expected behavior:

  • It shows "soup" from en.

Actual behavior:

  • It shows the de Label "Suppe":

image.png (113×413 px, 35 KB)

Variation:

  • If my UI language is set to en it works and shows "soup", the en Label:

image.png (125×409 px, 34 KB)

Acceptance Criteria

  • We understand the problem that leads to this issue.
  • We understand if there are more pages affected by this issue (e.g. Special:RecentChanges, Special:Contributions).
  • The problem is solved for all cases (or if solving the problem is out of scope, then please create a follow-up task, so we can discuss it).

Event Timeline

Manuel renamed this task from MUL - Mul fallback not utilized in all relevant places to MUL - Mul fallback not utilized in all relevant places .Jan 30 2024, 5:51 PM
Manuel updated the task description. (Show Details)
Manuel renamed this task from MUL - Mul fallback not utilized in all relevant places to Language variants don't fall back in all relevant places on Test Wikidata .Jan 30 2024, 5:53 PM
Manuel renamed this task from Language variants don't fall back in all relevant places on Test Wikidata to MUL - Fix language fallback in all relevant places .Feb 6 2024, 1:35 PM
Manuel updated the task description. (Show Details)
Manuel renamed this task from MUL - Fix language fallback in all relevant places to Language variants not considered for language fallback in all relevant places .Feb 6 2024, 1:45 PM
Manuel updated the task description. (Show Details)

It does do fallback, but normal MediaWiki pages (i.e. not the Wikibase interface on entity pages) use the user's language fallback chain (which is affected by the languages in their Babel box), unlike entity pages which only use the default fallback chain for the interface language.

You can see which languages it will try and in which order by going to Special:MyLanguageFallbackChain (wikidata.org, test.wikidata.org).

With {{#babel:en|de-3|mul}} and the interface set to en-gb I get:

  • en-GB - British English
  • en - English
  • mul - multiple languages
  • de - German

With {{#babel:de|en-3|mul}} and the interface set to en-gb I get:

  • en-GB - British English
  • de - German
  • mul - multiple languages
  • en - English

With {{#babel:frc-0|fit-0|mdf-1|an-1|de-3|mul|en|arz}} and the interface set to io I get:

  • io - Ido (interface language)
  • arz - Egyptian Arabic (native level Babel language)
  • en - angla (native level Babel language)
  • mul - pluraj lingvoj (native level Babel language)
  • de - germana (level 3 Babel language)
  • an - aragona (level 1 Babel language)
  • mdf - mokŝa (level 1 Babel language)
  • fit - Tornedalen Finnish (level 0 Babel language)
  • frc - kaĵun-franca (level 0 Babel language)
  • eo - Esperanto (fallback for interface language io)
  • ar - araba (fallback for Babel language arz)
  • es - hispana (fallback for Babel language an)
  • myv - erzja (first fallback for Babel language mdf)
  • ru - rusa (second fallback for Babel language mdf)
  • fi - finna (fallback for Babel language fit)
  • fr - franca (fallback for Babel language frc)

It seems the order it uses is:

  • interface language
  • Babel languages by proficiency (with equal proficiencies sorted alphabetically by code)
  • fallbacks for the interface language
  • fallbacks for each Babel language

It would make sense for country variants like en-gb to fall back to en first, but fallbacks are mostly used to fall back to other languages and the current behaviour allows people to override the default fallbacks, so it's probably better to leave it as it is.