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:

Screenshot_2020-04-05 עריכת הדף התפרצות נגיף הקורונה בישראל – ויקיפדיה.png (1×1 px, 1 MB)

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

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.

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.

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