Modulo:DTGenerico: differenze tra le versioni

Vai alla navigazione Vai alla ricerca
Nessun oggetto della modifica
Nessun oggetto della modifica
Riga 4: Riga 4:
local GenericValue = require('Modulo:DTBase').GenericValue
local GenericValue = require('Modulo:DTBase').GenericValue
local MakeNavTable = require('Modulo:DTBase').MakeNavTable
local MakeNavTable = require('Modulo:DTBase').MakeNavTable
local AffiliationTree = require('Modulo:DTFunzioniComuni').AffiliationTree
--local AffiliationTree = require('Modulo:DTFunzioniComuni').AffiliationTree
local OperatorTree = require('Modulo:DTFunzioniComuni').OperatorTree
--local OperatorTree = require('Modulo:DTFunzioniComuni').OperatorTree
local PropertiesOnTree = require('Modulo:DTFunzioniComuni').PropertiesOnTree
local PropertiesOnTree = require('Modulo:DTFunzioniComuni').PropertiesOnTree


Riga 99: Riga 99:
elseif Property == "P14" then
elseif Property == "P14" then
--Instance
--Instance
POnTree = {{"P88", 3, false}}
POnTree = {{"P40", 3, false}, {"P41", 3, false}}
for _, Prop in pairs(POnTree) do
for _, Prop in pairs(POnTree) do
local PropValue = table.concat(PropertiesOnTree(Prop[1], Prop[2], Prop[3]))
local PropValue = table.concat(PropertiesOnTree(Prop[1], Prop[2], Prop[3]))
AllRows[#AllRows + 1] = {{Prop[1], "Classe navale:"}, {PropValue}}
local PropName = mw.wikibase.getLabelByLang(Property, 'it') or mw.wikibase.getLabel(Property)
AllRows[#AllRows + 1] = {{Prop[1], PropName .. "PropName:"}, {PropValue}}
if AddSemantic then
if AddSemantic then
mw.smw.set("Classe navale=" .. PropValue)
mw.smw.set(PropName .. "PropNameSMW=" .. PropValue)
end
end
end
end