Module:Infobox ET: Difference between revisions

Try automating the category of the main article and the equal division
"zeta" -> "zeta_override". Try automating the category of zeta
Line 62: Line 62:
end
end
-- prime test
local prime = ""
local prime = ""
if u.is_prime(et.size) then
if u.is_prime(et.size) then
Line 70: Line 71:
end
end
local zeta = frame.args['Zeta']
-- zeta test
local zeta_override = frame.args['Zeta']
local is_zeta = nil
local is_zeta = nil
if type(zeta) == 'string' and #zeta > 0 then
if type(zeta_override) == 'string' and #zeta_override > 0 then
is_zeta = not zeta:match('^[Nn][Oo]$')
is_zeta = not zeta_override:match('^[Nn][Oo]$')
end
end
if not rat.eq(et.equave, 2) then
if not rat.eq(et.equave, 2) then
Line 118: Line 120:
if is_zeta ~= false and ET.is_zeta(et) then
if is_zeta ~= false and ET.is_zeta(et) then
if #text > 0 then text = text .. '<br>' end
if #text > 0 then text = text .. '<br>' end
if type(zeta) ~= 'string' or #zeta == 0 then
if type(zeta_override) ~= 'string' or #zeta == 0 then
text = text .. ET.why_zeta(et)
text = text .. ET.why_zeta(et)
else
else
text = text .. zeta
text = text .. zeta_override
end
end
categories = categories .. '[[Category:Zeta]]'
end
end
table.insert(infobox_data, {
table.insert(infobox_data, {