ሞድዩል:Wikidata/Movement format
Appearance
Documentation for this module may be created at ሞድዩል:Wikidata/Movement format/doc
local p = {}
local toLink = require('Module:Wikidata/Formats').toLink
local getData = require('Module:Wikidata/Formats').getData
function p.movementFormat(value, options, frame, qualifiers)
-- Function that returns for a movement, for example "Music of the Baroque" "Baroque".
if not value or not value.id then
return
end
local link, label, entityId
local movement = movements[value.id]
if movement then -- The movement is in the table of movements
link = movement.link
label = movement.label
entityId = value.id
else
-- Use the Wikidata link and tag
link, label, entityId = getData(value)
end
return toLink(link, label, entityId, options)
end
-- Aliases for ease of use from the template property
--
p['movement'] = p.movementFormat
return p