(Go: >> BACK << -|- >> HOME <<)

Page MenuHomePhabricator

Multilingual SVG always unexpectedly use the first 2-letter-match, even the specified language exists
Closed, DuplicatePublicBUG REPORT

Description

Multilingual SVG always unexpectedly use the first 2-letter-match, even the specified language exists

List of steps to reproduce (step by step, including full links if applicable):

What happens?:

  • Selecting "ku-Latn" return "ku-Arab" as the result of the thumbnail.
    • Same issue appeared on "ku", which returned "ku-Arab".
    • Same issue appeared on "zh", which returned "ku-Arab".
    • Also for other language codes.
  • Selecting "gan" return "ga" as the result of the thumbnail, even when they're not identical language code fragments.
    • Same issue appeared on "azb", which returned "az".
    • Same issue appeared on "ceb", which returned "ce".
    • Also for other language codes.

What should have happened instead?:

  • Selecting "ku-Latn" return "ku-Latn" as the result of the thumbnail.
  • Selecting "gan" return "gan" as the result of the thumbnail.

Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc.:

Event Timeline

Winston_Sung renamed this task from Multilingual SVG always unexpectedly use the first match, even the specified language exists to Multilingual SVG always unexpectedly use the first 2-letter-match, even the specified language exists.Jun 12 2022, 5:49 PM
Winston_Sung updated the task description. (Show Details)
Winston_Sung updated the task description. (Show Details)

This is a duplicate of other issues. T310230 (tlh matches 'tl') T154237

The old version of librsvg that WMF still uses mishandles hyphenated languages such as zh-Hans. It only matches to the first hyphen.

The new version of librsvg also cannot reliably pass the language preference in the $LANG environment variable. Many issues. T40010.