Page MenuHomePhabricator

Update Wikimedia Commons' default markup for 'Use this image'
Closed, ResolvedPublic

Description

For an image - say: https://commons.wikimedia.org/wiki/File:Aris’s_Birmingham_Gazette_-_1771-11-11_-_p1.jpg - the default markup provided by the "Use this file" link on the toolbar is:

[[File:Aris’s Birmingham Gazette - 1771-11-11 - p1.jpg|thumb|Aris’s Birmingham Gazette - 1771-11-11 - p1]]

The right hand part of this ("|Aris’s Birmingham Gazette - 1771-11-11 - p1]]") repeats the filename. It should instead (where available) use the caption from the file's structured data, in the user's preferred language:

[[File:Aris’s Birmingham Gazette - 1771-11-11 - p1.jpg|thumb|front page masthead of Aris’s Birmingham Gazette, 11 November 1771 edition]]

This applies to all the applicable markup snippets under each of the "Use this file" links on a file page; for example the non-thumbnail wiki markup and the alt attribute under "Embed this file".

Event Timeline

Josve05a subscribed.

This seems to be related to the "Share or embed this file" in MediaViewer which suggests the same markup.

This is unrelated to the codebase (MediaWiki-extensions-Gadgets) that allows having gadgets in MediaWiki.

This is unrelated to the codebase (MediaWiki-extensions-Gadgets) that allows having gadgets in MediaWiki.

Earlier you wrote "This probably would require changes in https://commons.wikimedia.org/wiki/MediaWiki:Gadget-Stockphoto.js" So what project is "MediaWiki:Gadget-Stockphoto.js" under, if not "MediaWiki-extensions-Gadgets"?"

@Pigsonthewing: There is no project in Phabricator for random gadgets. User scripts, gadgets, templates, custom CSS are local on-wiki content. Local content is managed independently on each wiki, by each wiki community themselves. Phabricator is mostly used for MediaWiki, MediaWiki extensions, or server configuration, or by developers and teams to organize what they plan to work on. In this case that's the Commons project tag for folks interested in Commons related tech stuff.

Aklapper triaged this task as Low priority.Jul 14 2022, 9:51 AM

MultimediaViewer already obtains the caption when opened from a thumbnail with caption on an article such as https://en.wikipedia.org/wiki/Birmingham_Gazette#/media/File:Aris%E2%80%99s_Birmingham_Gazette_-_1771-11-11_-_p1.jpg

There's a separate ticket for taking the caption from SDC: T241914. This would yield a sensible caption when opening the MultimediaViewer on a file description page.

Ruthven claimed this task.

Done: see Diff.