Module:Infobox interval: Difference between revisions

Plumtree (talk | contribs)
m Better FJS name parsing, more categories
Plumtree (talk | contribs)
m More categories
Line 17: Line 17:
local ket = nil
local ket = nil
local ratio_string = nil
local ratio_string = nil
local infobox_data = {}
local cats = ''
-- intervals with relatively small powers
-- intervals with relatively small powers
Line 41: Line 44:
ket = rat.as_ket(ratio, frame)
ket = rat.as_ket(ratio, frame)
end
end
elseif ratio ~= nil and frame.args['Ket'] and #(frame.args['Ket']) > 0 then
cats = cats .. '[[Category:Todo:remove explicit Ket]]'
end
end
Line 52: Line 57:
ratio_string = frame.args['Ratio'] or ''
ratio_string = frame.args['Ratio'] or ''
end
end
elseif ratio ~= nil and frame.args['Cents'] and #(frame.args['Cents']) > 0 then
cats = cats .. '[[Category:Todo:remove explicit Cents]]'
end
if not (regular or rational) then
cats = cats .. '[[Category:Todo:initialise Infobox Interval]]'
end
end
local infobox_data = {}
local cats = ''
if rational then
if rational then
Line 218: Line 227:
FJS_name = FJS_name:gsub('<sup>(.*)</sup>', '^{%1}')
FJS_name = FJS_name:gsub('<sup>(.*)</sup>', '^{%1}')
FJS_name = FJS_name:gsub('<sub>(.*)</sub>', '_{%1}')
FJS_name = FJS_name:gsub('<sub>(.*)</sub>', '_{%1}')
cats = cats .. '[[Category:Todo:remove manually set FJS name]]'
cats = cats .. '[[Category:Todo:remove explicit FJS name]]'
end
end
if FJS_name and #FJS_name > 0 then
if FJS_name and #FJS_name > 0 then