Steps to replicate the issue (include links if applicable):
Go to https://commons.wikimedia.org/wiki/File%3ASVG_Test_Russian_Default_Language.svg
It is a multilingual SVG file that uses Russian as the default language:
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 100" version="1.1"> <title>SVG Test Russian Default Language</title> <rect width="100%" height="100%" fill="pink"/> <switch transform="translate(20,80)" font-family="sans-serif" font-size="80"> <text systemLanguage="en">Moscow</text> <text systemLanguage="ru">Москва</text> <text>Москва</text> </switch> </svg>
The Commons File: page displays Russian instead of English.
The File: page uses this thumbnail which should display English but it does not:
This synthetic thumbnail forces English
Original (more complicated) test case:
- The file https://commons.wikimedia.org/wiki/File:Moscow_metro_map_multilingual_future_draft.svg uses Russian as its default langauge.
- When displaying English (such as on the File: page), MW uses this URL:
- Here's a URL that forces $lang to en
What happens?:
The first URL displays Russian.
The second URL displays English.
The file is detailed (I will make a simpler one). The key for determining which language is to look at the southwest corner of the map for the blue Moscow River. It will be either
- Москва-река en
- Москва-река ru
The first line is the explicit systemLanguage="en" clause, and the second is the default clause.
What should have happened instead?:
Both URLs should display English.
Software version (skip for WMF-hosted wikis like Wikipedia):
Thumbor/7.3.2
librsvg 2.44.10
Other information (browser name/version, screenshots, etc.):
When Thumbor/7.3.2 generates a thumbnail, it does not explicitly force English. Instead, Thumbor relies on librsvg's Unix environment to set the language to English. If that environment does not set librsvg's language to en, then the SVG's default clause would be chosen. For example, if the system Language is en-US, then the default language would be selected rather than the systemLanguage="en" clause.
Perhaps the librsvg Unix environment does not set LC_ALL to something reasonable.
Given that MW parochial semantics assumes an English default, Thumbor should force an unspecified language to always be en.