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 raised the priority of this task from to Needs Triage.
jeblad updated the task description. (Show Details)
jeblad subscribed.
Restricted Application added subscribers: Steinsplitter, Aklapper. · View Herald Transcript
jeblad set Security to None.

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

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?

jeblad updated the task description. (Show Details)