Modulo:Categoria per anno: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
m !→not |
m aggiornato Modulo:Controllo Wikidata, -everyNS +ns |
||
(24 versioni intermedie di un altro utente non mostrate) | |||
Riga 1:
local p = {}
local DEFAULT_PROP = 'P571'
function err(msg)▼
local DEFAULT_CHECK_CAT = 'Data di fondazione o creazione'
local DEFAULT_CHECK_GENRE = 'fs'
▲local function err(msg)
string.format('<span class="error">msg</span>', msg)
end
function p._main(args)
local s = ''
args.cat = args[1] or args.cat
local mWikidata = require('Modulo:Wikidata')▼
local mString = require('Modulo:String')▼
end
if not
args.prop = DEFAULT_PROP
▲ return err('richiesto parametro catPart')
end
if wikidataValue then▼
args.prop,
args.value,
local year = mw.ustring.match(value, '%d%d%d%d')
▲ } )
s = s .. string.format(▼
▲ if year and year ~= '' then
args.raw and '%s' or '[[Categoria:%s]]',▼
▲ s = string.format(
▲ '[[Categoria:%s]]',
▲ string.format(catPart, year)
)
end
end
if not args.raw then
if DEFAULT_PROP == args.prop and not args.checkCat then
args.checkCat = DEFAULT_CHECK_CAT
args.checkGenre = DEFAULT_CHECK_GENRE
end
args.prop,
args.value,
args.checkCat,
genere = args.checkGenre,
ns = args.ns
} )
if check then
s = s .. check
end
end
Riga 42 ⟶ 59:
function p.main(frame)
local getArgs = require('Modulo:Arguments').getArgs
return p.
end
|