Modulo:Criteri cancellazione immediata/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
nome parametro in italiano |
possibilità di configurare i link |
||
Riga 22:
self.abbreviation = abbreviation
self.order = { default = 0 }
self.text = { singolare = { default = '' }, plurale = { default = '' } }
self.validity = { default = true }
Riga 30 ⟶ 31:
function Criterion:getAbbreviation()
return self.abbreviation
function Criterion:getLink(ns)
return self.link[ns] or self.link.default
end
Riga 40 ⟶ 45:
if add_link then
▲ text = string.format('([[WP:%s|%s]]) %s',
▲ text = string.format('([[WP:IMMEDIATA|%s]]) %s', self:getAbbreviation(), text)
▲ end
end
Riga 65:
return self.validity.default
end
end
function Criterion:setLink(link, ns)
self.link[ns] = link
end
Riga 102 ⟶ 106:
if type(props.ordine) == 'number' then
criterion:setOrder(props.ordine, ns)
end
if type(props.link) == 'string' then
criterion:setLink(props.link, ns)
end
|