Page MenuHomePhabricator

Convert Template:Authority_control to Lua and use Wikidata
Closed, ResolvedPublic

Description

https://commons.wikimedia.org/wiki/Template:Authority_control is currently a classic template, this should be converted to Lua at https://commons.wikimedia.org/wiki/Module:Authority_control. We don't have to start from scratch, https://en.wikipedia.org/wiki/Module:Authority_control could probably be used as a basis.

The point of doing this would be to add support for pulling information not given in the template call from the item given in the wikidata parameter; the only impact this should have on a fully filled-in invocation of the template is to (potentially) add it to some hidden tracking categories.
(Though it could be tricky to work out precisely when tracking categories are appropriate; perhaps just in the main, Category, Institution, and Creator namespaces?)

While the enwp module hard-codes the URL format for each type of identifier, the Commons template should probably use the formatter URL (P1630) property found on the wikidata property for each identifier; see VIAF identifier (P214) for an example.

Related Objects

StatusAssignedTask
ResolvedLydia_Pintscher
ResolvedJarekt
ResolvedNone
ResolvedLydia_Pintscher
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
ResolvedNone
Invaliddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolveddaniel
Resolvedhoo
DuplicateNone
Resolvedhoo

Event Timeline

Multichill raised the priority of this task from to Normal.
Multichill updated the task description. (Show Details)
Multichill added subscribers: Aklapper, Multichill.
Jheald added a subscriber: Jheald.Feb 19 2015, 9:30 PM

It's not in Lua, but there's some work to push data from arbitrary-access wikidata through the existing Authority Control template at
https://www.wikidata.org/wiki/Template:Authority_control/wrapper

Despite all the red ink when called without an argument, it does pretty much work -- see eg
https://www.wikidata.org/wiki/Template:Creator/wrapper/test
https://www.wikidata.org/wiki/Template:Institution/wrapper/test
for a couple of test-pages.

Tpt added a subscriber: Tpt.Feb 20 2015, 11:14 AM

Some Wikipedias and Wikisources already use a Lua module for Authority Control template. Using it also in Commons may be interesting: https://en.wikipedia.org/wiki/Module:Authority_control

SamB awarded a token.Apr 20 2015, 4:48 AM
SamB added a subscriber: SamB.Apr 20 2015, 4:51 AM

It would preferably be possible for this to just magically work on Institution and Creator pages that already supply the wikidata parameter to the respective template, whether they explicitly invoke {{authority control}} or not. Is that a thing that can be done?

It would preferably be possible for this to just magically work on Institution and Creator pages that already supply the wikidata parameter to the respective template, whether they explicitly invoke {{authority control}} or not. Is that a thing that can be done?

That would need T49930.

Ricordisamoa renamed this task from Convert Template:Authority_control to LUA and use Wikidata to Convert Template:Authority_control to Lua and use Wikidata.Apr 20 2015, 6:55 AM
Ricordisamoa updated the task description. (Show Details)
Ricordisamoa set Security to None.
Rical added a subscriber: Rical.Apr 28 2015, 10:05 AM
Rical added a comment.EditedApr 28 2015, 10:52 AM

Another way could be to use a module made to work in any wiki, even central, in several or all languages.
We could use, or extract, only the function p.notice(frame) of https://fr.wikisource.org/wiki/Module:Author3
Living example:
https://fr.wikisource.org/wiki/Auteur:Nelson_Mandela

He7d3r added a subscriber: He7d3r.Apr 28 2015, 11:23 AM
SamB updated the task description. (Show Details)May 7 2015, 6:29 PM
SamB added projects: Commons, Wikidata.
SamB updated the task description. (Show Details)May 7 2015, 6:40 PM
Steinsplitter moved this task from Incoming to Backlog on the Commons board.May 10 2015, 4:57 PM
Lydia_Pintscher moved this task from incoming to monitoring on the Wikidata board.May 15 2015, 2:00 PM
Restricted Application added subscribers: Steinsplitter, Matanya. · View Herald TranscriptJul 8 2015, 7:28 AM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:25 PM
Revent added a subscriber: Revent.Oct 24 2015, 5:43 PM
Jarekt added a subscriber: Jarekt.Nov 10 2015, 2:06 PM

This would be a good "Google-Code-In-2015" project and I can volunteer to mentor (as in https://www.mediawiki.org/wiki/Google_Code-in_2015#Mentors.27_corner) whoever might try it. I think ideally we would reuse as much of existing LUA code as possible , but we would have to add:

  1. Internationalization of a lot of text so it shows up in the language of the viewer
  2. "bare" option used by Creator and Institution templates
  3. Initially it would not rely on wikidata stored parameters but when at some point we get arbitrary access to wikidata on Commons than we should be able to switch to using wikidata values when present.
RP88 added a subscriber: RP88.Nov 10 2015, 11:40 PM
Yann added a subscriber: Yann.Mar 19 2016, 10:15 PM

Waiting for update. Thanks.

Waiting for update. Thanks.

@Yann: From who? About what? If you have specific questions, please ask them. Thanks!

Waiting for update. Thanks.

You can already start working on this. Only when arbitrary access is enabled the full functionality becomes available.

Restricted Application added a subscriber: Poyekhali. · View Herald TranscriptApr 26 2016, 11:27 PM
Rical removed a subscriber: Rical.Jul 21 2017, 9:44 AM