Modul:Attribut: Unterschied zwischen den Versionen

fix attrText() nil-handling
(mw.logObject)
(fix attrText() nil-handling)
Zeile 51: Zeile 51:


function p.attrText(attr, klasse, mehrzahl)
function p.attrText(attr, klasse, mehrzahl)
mw.log("attrText(attr, klasse, mehrzahl)")
mw.logObject(attr, "attr")
mw.logObject(klasse, "klasse")
mw.logObject(mehrzahl, "mehrzahl")
local query, text = p.getAttrAttributes(attr, klasse)
local query, text = p.getAttrAttributes(attr, klasse)
if mehrzahl then
if mehrzahl then
text = query["Mehrzahl"]
text = query["Mehrzahl"] or attr
else
else
text = query["Einzahl"]
text = query["Einzahl"] or attr
end
end
return text
return text