Page MenuHomePhabricator

[REPO][CLIENT][SW] Overhaul LanguageFallbackChainFactory, use appropriate fallback depending on context.
Open, Needs TriagePublic

Description

LanguageFallbackChainFactory currently contains a lot of methods with an unclear purpose. It should be overhauled to cover the following use cases:

  • getFallbackChainForSiteContent() // based on site content language, and an optionally extra fallbacks from site config. Ok for cached content.
  • getFallbackChainForLanguage( $language ) // based on the given language only; can be used for cached content, if the cache is split by the given language.
  • getFallbackChainForUser( $user ) // based on user language and optionally additional user settings (like babel boxes). For non-cacheable output (skin).

On the repo, we can use getFallbackChainForLanguage( $userLanguage ) when generating cacheable page content. For anon users, $userLanguage must be the site language, since the web cache isn't split by language.

On the client, we should use getFallbackChainForSiteContent() when generating output from parser functions or Lua.

Event Timeline

daniel raised the priority of this task from to Needs Triage.
daniel updated the task description. (Show Details)
daniel changed Security from none to None.
daniel subscribed.
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Jonas renamed this task from Overhaul LanguageFallbackChainFactory, use appropriate fallback depending on context. to [Task] Overhaul LanguageFallbackChainFactory, use appropriate fallback depending on context..Sep 10 2015, 3:49 PM
ArthurTaylor renamed this task from [Task] Overhaul LanguageFallbackChainFactory, use appropriate fallback depending on context. to [REPO][CLIENT][SW] Overhaul LanguageFallbackChainFactory, use appropriate fallback depending on context..Apr 2 2024, 3:00 PM
ArthurTaylor moved this task from Incoming to [DOT] By Project on the wmde-wikidata-tech board.

From today's task triage: We should verify if we actually still want to do anything here

ItamarWMDE raised the priority of this task from Medium to Needs Triage.Dec 10 2024, 1:30 PM