Modulo:Software: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
+languageCategories
disattivo categorie al di fuori del NS0
 
(2 versioni intermedie di 2 utenti non mostrate)
Riga 386:
]]
function p._categorize(args)
local ns = mw.title.getCurrentTitle().namespace
local v = args['Categorie']
return ns == 0 and (v == nil or mw.ustring.lower(v) ~= 'no')
if v then
return mw.ustring.lower(v) ~= 'no'
end
return true
end
 
Line 549 ⟶ 547:
--[[
* Questa licenza è direttamente identificabile?
*
* @TODO: Rewrite in qualche modo più umano.
*
* @param license string Wikidata item
Riga 554:
]]
function p._singleLicenseType(license)
-- Q1156659 OSI-approved license
-- Q5975031 free software copyleft license
-- Q3943414 free software license
-- Q31202214 proprietary software license
Line 563 ⟶ 565:
* le prossime tre righe riassumino l'*unica* parte piacevole del Lua.
]]
return (license == 'Q3943414' or license == 'Q5975031' or license == 'Q1156659') and FREE
or (license == 'Q31202214' or license == 'Q218616' or license == 'Q3238057') and PROPRIETARY
or UNKNOWN
end
 
Line 763 ⟶ 765:
end
end
elseif is_freefree then
s = FREE_WITHOUT_LANGUAGE
end