Modulo:Criteri cancellazione immediata/sandbox: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
creazione sandbox |
aggiorno |
||
Riga 21:
self.abbreviation = abbreviation
self.order = { default = 0 }
self.
self.validity = { default = true }
Riga 36 ⟶ 35:
end
function Criterion:
end▼
if add_link then
text = string.format('([[WP:IMMEDIATA|%s]]) %s', self:getAbbreviation(), text)
end
return text
if text_type == 'completo' then▼
end▼
end
Riga 72 ⟶ 65:
end
function Criterion:
self.
end▼
end
Riga 97 ⟶ 86:
end
if type(props.
if type(props.testo.singolare) == 'string' then
criterion:setText(props.testo.singolare, ns, 'singolare')
if type(props.
criterion:
▲ end
end
Riga 124 ⟶ 115:
end
local function get_criterion(criterion_abbreviation, ns, text_type, add_link)
for key, value in pairs(cfg) do
local criterion = to_criterion(key, value)
if criterion:getAbbreviation() == criterion_abbreviation then
return criterion:getText(ns, text_type, add_link)
end
end
Riga 144 ⟶ 135:
end
local function list_criteria(ns, list_type, text_type, add_link)
local list = ''
local valid_criteria = {}
Riga 168 ⟶ 159:
for _, criterion in ipairs(valid_criteria) do
list = string.format('%s\n%s %s',
list, get_list_prefix(list_type), criterion:getText(ns, text_type, add_link))
end
Riga 186 ⟶ 177:
function p.main(frame)
local args = getArgs(frame, { parentOnly = true })
local ns, list_type, text_type, add_link, criterion_abbreviation
if args.ns == 'Principale' then
Riga 202 ⟶ 193:
end
if args['tipo testo'] == '
text_type = args['tipo testo']
else
text_type = '
▲ end
add_link = false
else
add_link = true
end
if args
criterion_abbreviation = args
end
Riga 215 ⟶ 212:
return
elseif criterion_abbreviation then
return get_criterion(criterion_abbreviation, ns, text_type, add_link)
else
return list_criteria(ns, list_type, text_type, add_link)
end
end
|