Modulo:Software: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
non-free software license
+p._subclassOf da implementare Modulo:Software
Riga 4:
 
local p = {}
 
-- TODO Implementare in Modulo:Wikidata
function p._subclassOf(args)
local statements = mWikidata._getProperty({'P279', from = args.from, formatting = 'raw'}, true)
if statements then
for _, statement in ipairs(statements) do
for _, entityId in ipairs(args) do
if statement == entityId then
return true
end
end
end
end
return false
end
 
function p._isFreeSoftwareByTemplate(frame)
Riga 21 ⟶ 36:
 
function p._isProprietarySoftwareByWikidata()
return mWikidatap._instanceOf_subclassOf({'Q218616', 'Q178285'})
end
 
Riga 225 ⟶ 240:
if licenseIsProprietary_[license] == nil then
-- Q14624820 non-free software license
-- BUG TODO manca _subclassOf()
-- https://www.wikidata.org/wiki/Property:P279
licenseIsProprietary_[license] = mWikidata._instanceOf({'Q14624820', from = license}) or false
end