Modulo:Categoria per anno: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
mw.ustring.match! Dannato Modulo:String
m aggiornato Modulo:Controllo Wikidata, -everyNS +ns
 
(10 versioni intermedie di un altro utente non mostrate)
Riga 1:
local p = {}
 
local DEFAULT_PROP = 'P571'
function err(msg)
args.controlloWikidataCatlocal orDEFAULT_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
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 27 ⟶ 31:
if year then
s = s .. string.format(
args.raw and '%s' or '[[Categoria:%s]]',
string.format(args.catPartcat, year)
)
end
end
 
if checknot args.raw then
local check = require('Modulo:Controllo Wikidata')._main( {
if DEFAULT_PROP == args.prop and not args.checkCat then
args.wikidataProp,
args.checkCat = DEFAULT_CHECK_CAT
args.localValue,
args.checkGenre = DEFAULT_CHECK_GENRE
args.controlloWikidataCat or 'Data di fondazione o creazione',
end
genere = args.controlloWikidataGenere or 'fs',
local check = require('Modulo:Controllo Wikidata')._main( {
everyNS = args.everyNS == nil and true or args.everyNS
args.localValueprop,
} )
args.value,
if check then
args.checkCat,
s = s .. check
genere = args.checkGenre,
ns = args.ns
} )
if check then
s = s .. check
end
end