When inserting an image, set its caption by default to be the Commons image description
OpenPublic

Description

Author: intracer

Description:
When you insert image from commons it is with blank description. It is good to start with description from commons.


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=49662

bzimport set Reference to bz51032.
bzimport created this task.Via LegacyJul 9 2013, 12:16 PM
Thryduulf added a comment.Via ConduitJul 18 2013, 2:39 PM

If the description there uses language templates, then it should only use the one corresponding to the language code of the wiki it is on. For example, [[File:Aglais urticae qtl1.jpg]] has descriptions in English, French, German and Lithuanian. When inserted in the English Wikipedia it should only copy the description from the {{en}} template, likewise on the German Wikipedia it should only take from the {{de}} template.

gerritbot added a comment.Via ConduitJun 3 2014, 11:13 PM

Change 137222 had a related patch set uploaded by Mooeypoo:
[wip] Use the image description as the caption

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

gerritbot added a comment.Via ConduitJun 3 2014, 11:53 PM

Change 137222 abandoned by Mooeypoo:
[wip] Use the image description as the caption

Reason:
Blocked on having structured image descriptions.

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

Tgr added a comment.Via ConduitJun 4 2014, 1:48 AM

For the time being, you could use the extmetadata API:

https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Aglais_urticae_qtl1.jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=en

https://en.wikipedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Aglais_urticae_qtl1.jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=de

Note that the current caching behavior is not too clever (API response for remote images is cached for 30 days, without any invalidation) and there is no sanitization (other than the one done by MediaWiki on saving) - the description can contain tables, images or any other weird HTML.

Jdforrester-WMF added a comment.Via ConduitJun 4 2014, 2:39 AM

(In reply to Tisza Gergő from comment #4)

For the time being, you could use the extmetadata API:

https://en.wikipedia.org/w/api.
php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:
Aglais_urticae_qtl1.
jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=en

https://en.wikipedia.org/w/api.
php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:
Aglais_urticae_qtl1.
jpg&iiextmetadatafilter=ImageDescription&iiextmetadatalanguage=de

Note that the current caching behavior is not too clever (API response for
remote images is cached for 30 days, without any invalidation) and there is
no sanitization (other than the one done by MediaWiki on saving) - the
description can contain tables, images or any other weird HTML.

I think we're better off waiting than coming up with a hack to drop "unwanted" tables but strip out the bits we do want, but thank you. :-)

Jdforrester-WMF moved this task to Backlog on the VisualEditor workboard.Via WebNov 24 2014, 1:23 AM
Jdforrester-WMF assigned this task to Mooeypoo.Via WebJan 8 2015, 1:24 AM
Jdforrester-WMF set Security to None.
Jdforrester-WMF moved this task to Doing on the VisualEditor workboard.
gerritbot added a project: Patch-For-Review.Via ConduitJan 8 2015, 11:41 PM

Change 161342 had a related patch set uploaded (by Mooeypoo):
Transform the search widget to show image details

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

Patch-For-Review

gerritbot added a subscriber: gerritbot.Via ConduitJan 15 2015, 7:04 PM

Change 185220 had a related patch set uploaded (by Mooeypoo):
Add image description as an initial caption

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

Patch-For-Review

Ricordisamoa added a subscriber: Ricordisamoa.Via WebJan 16 2015, 9:06 AM
Ricordisamoa awarded a token.Via WebJan 16 2015, 9:11 AM
Jdforrester-WMF changed the title from "VisualEditor: When inserting an image, set its caption by default to be the Commons image description" to "When inserting an image, set its caption by default to be the Commons image description".Via WebJan 23 2015, 10:05 PM
Jdforrester-WMF moved this task to Next up: Features and UX on the VisualEditor workboard.Via WebFeb 10 2015, 8:41 PM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.