Modulo:Software: differenze tra le versioni
Contenuto cancellato Contenuto aggiunto
+p._toolkitCategories() d:Property:P1414 |
|||
Riga 14:
local UNKNOWN_WD_LANGUAGE = "[[Categoria:Linguaggio di programmazione da Wikidata non previsto]]"
local UNKNOWN_WD_LICENSE = ""
local UNKNOWN_WD_TOOLKIT = "[[Categoria:Toolkit o framework dell'interfaccia grafica non previsto]]"
local TEMPLATE_UNKNOWN_ARG_WARN = " <span style=\"font-size:75%\">(non in [[Template:Software#Linguaggi|lista]])</span>"
Line 155 ⟶ 156:
function p.specifiesALanguage(frame)
return yesNo( p._specifiesALanguage( onlySoftwareArguments(frame) ) )
end
function p.specifiesAToolkit(frame)
return yesNo( p._specifiesAToolkit( fromItem(frame) ) )
end
Line 174 ⟶ 179:
]]
function p.categories(frame)
return p.licenseCategories(frame) end
return nil
end
Line 199 ⟶ 207:
]]
function p._wikidataCategories(from)
return p._licenseCategories(from) .. p._languageCategories(from) .. p._toolkitCategories(from)
end
Line 208 ⟶ 216:
function p.licenseCategories(frame)
return p._licenseCategories( fromItem(frame) )
end
--[[
* Categorie legate al toolkit.
* @return string
]]
function p.toolkitCategories(frame)
return p._toolkitCategories( fromItem(frame) )
end
Line 746 ⟶ 762:
if missing then
s = s .. UNKNOWN_WD_LANGUAGE
end
return s
end
--[[
* Categorie legate ai toolkit o framework dell'interfaccia grafica da Wikidata.
*
* @param from string|nil Wikidata Item
* @return string
]]
function p._toolkitCategories(from)
local s = ''
local toolkits = mWikidata._getClaims('P1414', {from = from} ) -- Property:GUI toolkit or framework
local free = p._isFreeSoftwareByWikidata(from)
local missing = false
if toolkits then
for _, t in pairs( toolkits ) do
t = conf.language[ rawProperty(t) ]
if t then
s = s .. p._languageCategory(t, free)
else
missing = true
end
end
end
if missing then
s = s .. UNKNOWN_WD_TOOLKIT
end
return s
Line 752 ⟶ 795:
--[[
* La categoria di uno specifico linguaggio di programmazione.
* In realtà questa categorizzazione è analoga anche per i toolkit.
*
* @param language table
|