Page MenuHomePhabricator

Mediaviewer should strip 'English:' prefix from {{mld}} descriptions from Wikimedia Commons
Open, MediumPublic

Description

Steps to reproduce

  • Open this image on the English Wikipedia.
  • Open its metadata panel
  • The 'English' label appears before the description, even though my language is English.
  • Here is this file's wikitext template, which may be causing this issue.

Expected behavior

Do not show 'English' in front of the description if my language is English. A language label should only appear if there is no description in my language, but a description is available in another language.

Actual behavior

The 'English' label appears before the description, even though my language is English. I have seen a number of files with that problem in recent weeks.

Event Timeline

Gilles raised the priority of this task from to Medium.
Gilles updated the task description. (Show Details)
Gilles changed Security from none to None.
Gilles subscribed.

Gergo said:

This is due to https://commons.wikimedia.org/wiki/Template:Description and https://commons.wikimedia.org/wiki/Template:Ls generating different markup (TemplateParser::parseContents in CommonsMetadata was written with Template:Description in mind).

I think the community should come up with a standard way of marking up languages first, otherwise this will have to be fixed every time someone comes up with a new way of internationalizing template contents. I have started a discussion at
https://commons.wikimedia.org/wiki/Commons_talk:Machine-readable_data#Machine-readable_markup_for_languages.2Flanguage_names

Tgr changed the task status from Open to Stalled.Apr 3 2015, 6:23 AM

Blocked on lack of community consensus/discussion.

Tgr removed Tgr as the assignee of this task.Apr 3 2015, 6:23 AM
Tgr subscribed.
Krinkle subscribed.

From what I can see, the CommonsMetadata API and the Mediaviewer interface that uses it already strip this prefix.

The only place where the language indication is visible is on the full file description page where the text originates from, which is indeed the way it is based on how the templates are made by the Commons community.

This is out of scope for software issues, and to the extent possible, it has in fact already been explicitly removed/skipped-over by our software, making it already invisible in most cases.

I'm closing this as such as immediate request seems to have either been worked around by Mediaviewer (or already was), and the secondary question of changing the way the source pages work is something to discuss at https://commons.wikimedia.org/wiki/Template:En and https://commons.wikimedia.org/wiki/Template:En and https://commons.wikimedia.org/wiki/Template:Description.

If and when that changes, the software does not have an action item after that either as we already strip it from the more prominent interfaces. Hence closing as such since there is no action to be done from the software perspective that is blocked.

It might or might not strip it, depending on what templates are used, as said in the comment above. It does not work with this image for example.

Krinkle renamed this task from Do not show 'English' in front of the description if my language is English to Mediaviewer should strip 'English:' prefix from {{mld}} descriptions from Wikimedia Commons.Jan 7 2020, 5:04 PM

Thanks, looks like the distinguishing factor there is use of {{mld|en=}} instead of {{en}}. That's presumably just another HTML pattern that could be fed into CommonsMetadata and/or Mediaviewer at some point, the same way it does for {{en}} already. Alternatively, when this is worked on, we could also consider changing those templates themselves to be aligned and/or easier to work with.

Long-term we could also collaborate with the community to see if there is interest in unifying the two as there doesn't appear to be any notable difference or benefit to one over the other.

There wasn't much interest, see the Commons talk page link in the first comment. Granted we did not put much effort into prodding people.

This is easy to fix in CommonsMetadata, but it would be much nicer if it worked on the bases if a formally documented standard, instead of just reverse engineering templates as they exist right now. Most of the scraping it does is based on COM:MRD so if other communities (or other wikifatrms, possibly) want to create compatible templates, or others want to create compatible clients, they know where to look.