Modulo:Categoria per anno: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m +local
m aggiornato Modulo:Controllo Wikidata, -everyNS +ns
 
(6 versioni intermedie di un altro utente non mostrate)
Riga 1:
local p = {}
 
local DEFAULT_PROP = 'P571'
args.controlloWikidataCatlocal orDEFAULT_CHECK_CAT = 'Data di fondazione o creazione',
local DEFAULT_CHECK_GENRE = 'fs'
 
local function err(msg)
Riga 8 ⟶ 12:
local s = ''
 
args.catPartcat = args[1] or args.catPartcat
 
if not args.catPartcat then
return err('richiesto parametro catPartcat')
end
 
if not args.wikidataPropprop then
args.wikidataPropprop = 'P571'DEFAULT_PROP
end
 
local value = require('Modulo:Wikidata')._getProperty( {
args.wikidataPropprop,
args.localValuevalue,
from = args.from
} )
Riga 28 ⟶ 32:
s = s .. string.format(
args.raw and '%s' or '[[Categoria:%s]]',
string.format(args.catPartcat, year)
)
end
Riga 34 ⟶ 38:
 
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
local check = require('Modulo:Controllo Wikidata')._main( {
args.wikidataPropprop,
args.localValuevalue,
args.checkCat,
args.controlloWikidataCat or 'Data di fondazione o creazione',
genere = args.controlloWikidataGenere or 'fs'checkGenre,
ns = args.ns
everyNS = args.everyNS == nil and true or args.everyNS
} )
if check then