Last modified: 2014-11-14 20:28:07 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59460, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57460 - CommonsMetadata should retrieve custom Credit Line through licensetpl_attr
CommonsMetadata should retrieve custom Credit Line through licensetpl_attr
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
CommonsMetadata (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Tisza Gergő
:
Depends on:
Blocks: 65445
  Show dependency treegraph
 
Reported: 2013-11-22 23:54 UTC by Jean-Fred
Modified: 2014-11-14 20:28 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jean-Fred 2013-11-22 23:54:04 UTC
On Wikimedia Commons, users may indicate how they wish to be attributed through two specific mechanisms.

One is the {{Credit line}} template − see for example [1]

The other one is the attribution parameter of license templates − see for example [2]

As documented in [3], the attribution line in the second mechanism is marked with a <span class='licensetpl_attr'> − the first one is not but I just made a proposal for it to be.

This information should be retrieved by CommonsMetadata.

[1] <https://commons.wikimedia.org/wiki/File:Corse-du-Sud_Evisa.jpg>
[2] <https://commons.wikimedia.org/wiki/File:Car_Park_entrance_at_Ealing_Magistrates_Court_-_geograph.org.uk_-_1729971.jpg>
[3] <https://commons.wikimedia.org/wiki/Commons:Machine-readable_data>
Comment 1 Tisza Gergő 2013-11-24 10:51:48 UTC
The license template part will be covered by the pending patch in bug 57197.
{{Information}} fragments have their own mechanism, see the section about infobox templates on [[Commons:Machine-readable data]]. I think it would be better to follow that, and keep the licensetpl_* stuff for actual license templates.

{{Credit line}} already uses a fileinfotpl_credit attribute, except it is a class, not an id. I think the cleanest solution would be to change that to an id, and document it in [[Commons:Machine-readable data]].
Comment 2 Tisza Gergő 2013-11-24 18:21:33 UTC
Also, licensetpl_* fields will probably be handled in a more complex way due to the possibility of multilicensing - most clients will probably want to show a single license only, so we will try select the least restrictive one and ignore attributes not belonging to that. "Global", license-independent attributes should better not use that mechanism. (Although this is just speculation at this point, there is no proper handling of multiple licenses currently - that is bug 57259.)
Comment 3 Jean-Fred 2014-05-29 22:09:15 UTC
Huh, well, not sure what I was supposed to do but whatever. Attribution specified through {{Credit line}} is now wrapped in a class="licensetpl_attr".
Comment 4 Tisza Gergő 2014-05-29 22:15:48 UTC
The current implementation of CommonsMetadata ignores licensetpl_* fields not wrapped in a licensetpl class, so this won't have any effect. As I said, adding it to the information template metadata syntax seems like a more logical solution to me.
Comment 5 Jean-Fred 2014-05-29 22:20:41 UTC
(In reply to Tisza Gergő from comment #4)
> The current implementation of CommonsMetadata ignores licensetpl_* fields
> not wrapped in a licensetpl class, so this won't have any effect.

I know. I was merely trying to make a stab at harmonizing Commons various, « inconsistent » ways of specifying attribution. If that’s not useful, well, *shrug*.
Comment 6 Jean-Fred 2014-05-29 22:24:50 UTC
(In reply to Jean-Fred from comment #5)
> (In reply to Tisza Gergő from comment #4)
> > The current implementation of CommonsMetadata ignores licensetpl_* fields
> > not wrapped in a licensetpl class, so this won't have any effect.
> 
> I know. I was merely trying to make a stab at harmonizing Commons various, «
> inconsistent » ways of specifying attribution. If that’s not useful, well,
> *shrug*.

Scrap that, I misread your comment. Well, *shrug*² then.
Comment 7 Tisza Gergő 2014-05-29 22:44:46 UTC
Again, how about adding id="fileinfotpl_credit" (to the first column, not the second) instead of class="fileinfotpl_credit"? That would be at least consistent with how other {{Information}} fields are marked, and trivial to parse.
Comment 8 Jean-Fred 2014-05-30 08:55:14 UTC
(In reply to Tisza Gergő from comment #7)
> Again, how about adding id="fileinfotpl_credit" (to the first column, not
> the second) instead of class="fileinfotpl_credit"? That would be at least
> consistent with how other {{Information}} fields are marked, and trivial to
> parse.

{{done}}
Comment 9 Gerrit Notification Bot 2014-06-02 20:51:12 UTC
Change 136833 had a related patch set uploaded by Gergő Tisza:
Handle id="fileinfotpl_credit" and class="licensetpl_attr"

https://gerrit.wikimedia.org/r/136833
Comment 10 Gerrit Notification Bot 2014-06-03 07:32:35 UTC
Change 136833 merged by jenkins-bot:
Handle id="fileinfotpl_credit" and class="licensetpl_attr"

https://gerrit.wikimedia.org/r/136833
Comment 12 Tisza Gergő 2014-06-03 21:06:39 UTC
(In reply to Tisza Gergő from comment #11)
> can be tested after it is deployed on Commons (now-ish)

Uh, next Tuesday, I mean. Also, via a local API query - remote repo queries are cached more aggressively.

* http://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Corse-du-Sud_Evisa.jpg
* http://commons.wikimedia.org/w/api.php?action=query&prop=imageinfo&iiprop=extmetadata&titles=File:Car_Park_entrance_at_Ealing_Magistrates_Court_-_geograph.org.uk_-_1729971.jpg

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links