Page MenuHomePhabricator

SVG files with a fallback language and a specific english translation, should have both options choosable
Closed, ResolvedPublic

Description

Originally reported by Patrick at https://commons.wikimedia.org/w/index.php?title=Template_talk:Translate&oldid=111841370

We use English as the default language for SVGs. If an SVG file has a language <switch>, and a fallback language, we currently do not allow the fallback to be selected from the drop-down menu. We should probably detect this situation and handle it somehow. Not exactly sure what the best thing to do in this situation would be.

Example file: https://commons.wikimedia.org/wiki/File:SystemLanguage.svg - There's no option in the language drop down menu that would trigger the output of https://commons.wikimedia.org/wiki/File:SystemLanguage.svg?lang=x-none even though the output is different from all the choices.

See also:
T63649: Multilanguage SVG images should be rendered in the wiki's content language


Version: 1.23.0
Severity: normal

Details

Reference
bz58666

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:34 AM
bzimport set Reference to bz58666.
bzimport added a subscriber: Unknown Object (MLST).

I believe this issue has been fixed, but separate issues remain.

If I go to

The language dropdown offers both "English" and "(default language)". Selecting "(default language)" and clicking GO takes me to:

The ?lang=und says use the IETF langtag und, the undefined IETF langtag, which MW is using for default.

That URL suggests this issue has been resolved. The dropdown box displays both English and default, and the File page is being told to display the default language.

However, the File page does not display the default language; instead English is displayed.

Separate Issue #1: File page does not display the requested language
T310235

Ask for the default language version of a File with

The English version is displayed instead.

The und File page img element has src=

instead of

That suggests MW has rejected the request to display the und langtag. Instead, it uses a default en rendering.

Explicitly demanding tlh also displays en rather than the default:

I believe the failure to show the demanded und is a separate issue. I suspect that MW is intersecting the lang URL param with the set of languages the File supports.

Separate Issue #2
T310230
Another strange twist. I ask the rasterizer for Klingon (tlh), and I get Tagalog (tl)!

I also get Tagalog when I use the wiki text

  • [[File:systemLanguage.svg|lang=tlh|thumb|Asking for tlh but get tl]]

The img element emits the correct URL (langtlh).

TheDJ claimed this task.
TheDJ subscribed.

This has been fixed, so i'm closing this. Separate issues should be filed as separate tickets

  • Issue with und: T310235
  • Explicitly demanding tlh also displays en rather than the default. Thats probably intentional, it doens't recognize Klingon as a known language and thus falls back to the default which is the content language which on Commons is English.
  • rsvg turning tlh into tl... T310230