Page MenuHomePhabricator

Localization template "no" at Wikimedia Commons does not work together with iiextmetadatalanguage
Closed, ResolvedPublic

Description

It seems like strings localized with the no template does not work as expected when data is requested by the API query for image props, like this call https://no.wikipedia.org/w/api.php?action=query&format=json&prop=imageinfo&titles=File:Hovedbygget%20ntnu.jpg&iiprop=timestamp|user|url|size|mime|mediatype|extmetadata&iiextmetadatafilter=DateTime|DateTimeOriginal|ObjectName|ImageDescription|License|LicenseShortName|UsageTerms|LicenseUrl|Credit|Artist|AuthorCount|GPSLatitude|GPSLongitude|Permission|Attribution|AttributionRequired|NonFree|Restrictions&iiextmetadatalanguage=no . Note that the "ImageDescription" is in English, yet there is a provided description in Norwegian. This image can be found at File:Hovedbygget ntnu.jpg.

A similar problem existed at File:Nasjonalparker Syd-Norge.JPG, and by changing it to use the nb template it starts working, like this call https://no.wikipedia.org/w/api.php?action=query&format=json&prop=imageinfo&titles=File:Nasjonalparker%20Syd-Norge.JPG&iiprop=timestamp|user|url|size|mime|mediatype|extmetadata&iiextmetadatafilter=DateTime|DateTimeOriginal|ObjectName|ImageDescription|License|LicenseShortName|UsageTerms|LicenseUrl|Credit|Artist|AuthorCount|GPSLatitude|GPSLongitude|Permission|Attribution|AttributionRequired|NonFree|Restrictions&iiextmetadatalanguage=no shows.

The URLs came originally from requests made by MediaViewer and is now used in a similar form in some gadget at nowiki. The same errors are clearly shown at nowiki, for example at Folgefonna nasjonalpark (with MV open, correct description) and at .. err, I used a previous version of Folgefonna nasjonalpark for checking this. The article at NTNU has a local text at nowiki. I try to find another example later on.

[Update: One example that shows how MediaViwer fails are Sarah Chang.]

It seems like both "no" and "nb" will get image descriptions marked with the "nb" template, but neither work against the "no" template.

A fix could be to simply run a bot and change all the "no" templates to "nb" templates, or perhaps even just make "no" a redirect to "nb". Before I do anything like that I would give you guys some time to figure out if this is a bug or a feature.

Event Timeline

jeblad created this task.Aug 19 2015, 6:25 PM
jeblad raised the priority of this task from to Needs Triage.
jeblad updated the task description. (Show Details)
jeblad added a subscriber: jeblad.
Restricted Application added a project: Multimedia. · View Herald TranscriptAug 19 2015, 6:25 PM
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
jeblad updated the task description. (Show Details)Aug 19 2015, 6:39 PM
jeblad set Security to None.
Restricted Application added a subscriber: Matanya. · View Herald TranscriptAug 19 2015, 6:39 PM
Tgr added a subscriber: Tgr.Aug 19 2015, 8:55 PM

A bug. Commons i18n templates are a mess but {{description}} should work.

Tgr triaged this task as High priority.Aug 19 2015, 9:09 PM

No idea what's going on there, I'll look into it in a few days.

Aklapper renamed this task from Localization template "no" at Wikimedia Commons does not work togeter with iiextmetadatalanguage to Localization template "no" at Wikimedia Commons does not work together with iiextmetadatalanguage.Aug 20 2015, 12:12 PM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:43 PM

No idea what's going on there, I'll look into it in a few days.

@Tgr: Did you find time?

No idea what's going on there, I'll look into it in a few days.

@Tgr: Did you find time?

Tgr added a comment.Oct 13 2015, 11:05 AM

Not yet, but I will!

jeblad updated the task description. (Show Details)Oct 26 2015, 1:52 PM
jeblad updated the task description. (Show Details)
jhsoby added a subscriber: jhsoby.Oct 16 2016, 5:34 PM