Modulo:Categoria per anno: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
m Lua rocks
+Controllo Wikidata
Riga 6:
 
function p._main(args)
local s = ''
 
local mWikidata, mString, mControlloWd = require('Modulo:Wikidata'), require('Modulo:String'), require('Modulo:Controllo Wikidata')
local from, localValue, catPart, wikidataLabel = args.from, args.localValue, args.catPart, args.wikidataLabel
 
local wikidataProp = args.wikidataProp or 'P571'
local wikidataLabelGenere = args.wikidataLabelGenere or 'fs'
 
local wikidataProp = args.wikidataProp or 'P571'
local wikidataValue = mWikidata._getProperty( { wikidataProp, localValue, from = from } )
 
Riga 27 ⟶ 29:
 
if year and year ~= '' then
s = s .. string.format(
'[[Categoria:%s]]',
string.format(catPart, year)
Riga 33 ⟶ 35:
end
end
 
s = s .. mControlloWd._main( {wikidataProp, localValue, wikidataLabel, genere = wikidataLabelGenere} )
 
return s