Page MenuHomePhabricator

When inserting an image using Visual Editor, show CommonsMetadata content in the language of the wiki
Closed, ResolvedPublic

Description

I inserted a Commons image using VE into a Hebrew Wikipedia article.

The image has structured media descriptions in English and Hebrew. Despite this, the description in the media insertion dialog appeared in English. Screenshot:

I'd expect it to appear in Hebrew, given that it's the Hebrew Wikipedia. Even nicer would be to have it in Hebrew by default if it's available, and to show a language selector to select other languages, but that would be just a nice bonus.

The file, for reference: https://commons.wikimedia.org/wiki/File:Empty_egg_shelf_in_Jerusalem,_April_2020.jpg

Event Timeline

Amire80 created this task.Apr 5 2020, 8:49 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 5 2020, 8:49 AM
Amire80 reopened this task as Open.Apr 6 2020, 8:16 PM

I'm not sure how exactly is it a duplicate of T51662. The meta-data is shown, but in the wrong language.

I'm not sure how exactly is it a duplicate of T51662. The meta-data is shown, but in the wrong language.

Yes, that's part of it.

JTannerWMF moved this task from To Triage to Triaged on the VisualEditor board.
JTannerWMF moved this task from Backlog to FY 2019-20 on the Editing-team (Tracking) board.

Actually, we already have the code that is supposed to use it. Now to find out why it doesn't work…

Change 587342 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/core@master] MediaSearch: Use the specified language for search results

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

The image has structured media descriptions in English and Hebrew. Despite this, the description in the media insertion dialog appeared in English.

I don't think the description we show is actually fetched from the structured data; I'm pretty sure it comes from the templates in the wikitext description page like {{en|…}} and {{he|…}}. This is implemented by the CommonsMetadata extension and I actually don't know how it works.

I suppose using the structured data falls under T51662.

matmarex updated the task description. (Show Details)Apr 7 2020, 9:30 PM

The image has structured media descriptions in English and Hebrew. Despite this, the description in the media insertion dialog appeared in English.

I don't think the description we show is actually fetched from the structured data.

Correct.

[…]

I suppose using the structured data falls under T51662.

Indeed, hence why I duped it. :-)

Jdforrester-WMF renamed this task from When inserting an image using Visual Editor, show media description in the language of the wiki to When inserting an image using Visual Editor, show CommonsMetadata content in the language of the wiki.Apr 8 2020, 12:52 AM

Change 587342 merged by jenkins-bot:
[mediawiki/core@master] MediaSearch: Use the specified language for search results

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

ppelberg closed this task as Resolved.Fri, Jun 5, 1:24 AM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptFri, Jun 5, 1:24 AM