Page MenuHomePhabricator

Accept-Language zh-TW would never got fallback to zh-Hant when zh-tw variant got disabled
Open, Needs TriagePublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Set "zh-Hant-TW" / "zh-TW" as the browser language
    • This will have "zh-TW,zh;q=0.9" as Accept-Language in browser
    • "zh;q=0.9" is the thing that usually got automatically added by the browser
  • Visit any MediaWiki wiki that have zh-tw variant disabled by $wgDisabledVariants

What happens?:

  • It detected "zh" in the Accept-Language and didn't fallback to zh-Hant

What should have happened instead?:

  • It should lower the priority of the unconverted-mix variant "zh".
  • It should have the detected "zh-TW" fallback to zh-Hant.

Software version (skip for WMF-hosted wikis like Wikipedia):

  • MediaWiki 1.40.0-wmf.24 ( ceec89e )

Other information (browser name/version, screenshots, etc.):

Event Timeline

Change 891296 had a related patch set uploaded (by Winston Sung; author: Winston Sung):

[mediawiki/core@master] LanguageConverter: Fix Accept-Language detection in getHeaderVariant

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

Winston_Sung changed the task status from Open to In Progress.Feb 23 2023, 4:16 AM
Winston_Sung claimed this task.
Winston_Sung renamed this task from Accept-Language zh-TW can never got fallback to zh-Hant when zh-tw variant got disabled to Accept-Language zh-TW would never got fallback to zh-Hant when zh-tw variant got disabled.Apr 8 2023, 6:57 PM
Winston_Sung changed the task status from In Progress to Open.May 20 2023, 4:36 PM