Page MenuHomePhabricator

Caption language selector shows interface language version of the language name on selection, but otherwise the native one
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to the File page for an image, e.g. https://commons.wikimedia.beta.wmflabs.org/wiki/File:Martti_Jukola_reporting_from_a_sports_event,_1930s..jpg
  2. Click to add a new caption, and chose the first ᐃᓄᒃᑎᑐᑦ option as language
  3. Note that when the option is chosen, Inukituk is displayed instead of ᐃᓄᒃᑎᑐᑦ
  4. Enter some caption text, click publish
  5. Note that now ᐃᓄᒃᑎᑐᑦ/inuktitut is displayed as the language for the caption
  6. Reload the page
  7. Now 'Inikituk' is displayed as the language

It's even more complicated if you stick ?uselang=fr onto the end of the File page url. Sometimes a language will get displayed in French, sometimes in English, sometimes the autonym.

Event Timeline

Confirmed. I've seen this bug earlier, but hadn't had time to record it happening. It happens on languages like Japanese too, where you can alternatively see the Japanese name of the language "日本語" and "Japanese" in English.

Jdforrester-WMF renamed this task from Language name display inconsistencies in multi-lingual file captions to Caption language selector shows interface language version of the language name on selection, but otherwise the native one.Dec 18 2018, 12:23 PM

Change 480476 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikibaseMediaInfo@master] Use autonym for the display value on language change

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

Jdforrester-WMF moved this task from To Do to Doing on the Structured Data Engineering board.
Jdforrester-WMF subscribed.

OK, I've made a patch to make this use the autonym when setting the display value of the button on selection.

Note that there are some fun edge cases in the MediaWiki-verse, where the autonym isn't always used faithfully – you've found that Inuktitut is one of these, where cldr/ULS set the autonym (correctly) to "ᐃᓄᒃᑎᑐᑦ" but MediaWiki calls it "ᐃᓄᒃᑎᑐᑦ/inuktitut" (for some reason). Resolving that inconsistency that would be the language team's field, and I'm not sure it's worth it.

Change 480476 merged by jenkins-bot:
[mediawiki/extensions/WikibaseMediaInfo@master] Use autonym for the display value on language change

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

Will be deployed next week (Test Commons on 2019-01-15, Real Commons on 2019-01-16).

Confirmed working on production.