Modulo:Software: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
+p.licenseCategories() |
+p.categories() |
||
Riga 91:
end
--[[
function p.licenses(frame)▼
* Categorizzazione.
local s = ''▼
* @return string|nil
for i, l in pairs( p._licenses() ) do▼
* ]]
local space = i == 1 and '' or '<br />'▼
function p.categories(frame)
s = s .. space .. mWikidata._formatStatement(l, {formatting = 'raw'})▼
if not p._categorize(frame) then
return
end
return
end
Line 110 ⟶ 112:
end
return s
end
▲function p.licenses(frame)
▲ local s = ''
▲ for i, l in pairs( p._licenses() ) do
▲ local space = i == 1 and '' or '<br />'
▲ s = s .. space .. mWikidata._formatStatement(l, {formatting = 'raw'})
end
return s
end
Line 561 ⟶ 572:
function p.languageSlugToWikidata(frame)
return p._languageSlugToWikidata( getArgs(frame)[1] )
end
--[[
* Categorizzare?
*@return true|false
]]
function p._categorize(frame)
local args = frame and getArgs(frame)
local v = args['Categorie']
if v then
return mw.ustring.lower(v) ~= 'no'
end
return true
end
|