66 606
contributi
(Properties on tree) |
mNessun oggetto della modifica |
||
Riga 101: | Riga 101: | ||
POnTree = {{"P40", 3, false}, {"P41", 3, false}, {"P88", 3, false}} | POnTree = {{"P40", 3, false}, {"P41", 3, false}, {"P88", 3, false}} | ||
for _, Prop in pairs(POnTree) do | for _, Prop in pairs(POnTree) do | ||
if mw.wikibase.getLabel(Prop[1]) ~= nil then | |||
local PropValue = table.concat(PropertiesOnTree(Prop[1], Prop[2], Prop[3])) | local PropValue = table.concat(PropertiesOnTree(Prop[1], Prop[2], Prop[3])) | ||
local PropName = mw.wikibase.getLabelByLang(Prop[1], 'it') or mw.wikibase.getLabel(Prop[1]) | local PropName = mw.wikibase.getLabelByLang(Prop[1], 'it') or mw.wikibase.getLabel(Prop[1]) | ||
Riga 106: | Riga 107: | ||
if AddSemantic then | if AddSemantic then | ||
mw.smw.set(PropName .. "=" .. PropValue) | mw.smw.set(PropName .. "=" .. PropValue) | ||
end | |||
end | end | ||
end | end |