Last modified: 2014-06-04 02:39:59 UTC
When you insert image from commons it is with blank description. It is good to start with description from commons.
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.
Change 137222 had a related patch set uploaded by Mooeypoo: [wip] Use the image description as the caption https://gerrit.wikimedia.org/r/137222
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
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.
(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. :-)