local p=
function p.Reign(frame) local o1 if frame.args[1] then o1 = mw.text.trim(frame.args[1]) if o1
"" then s2 = 0 end else s2 = 0 end local t3 if frame.args[3] then t3 = mw.text.trim(frame.args[3]) if t3
"" then f4 = 0 end else f4 = 0 end local xshow = frame.args.show or 0 local xlabel = frame.args.label or 0 local xcap = frame.args.cap or 0 local xsingle = frame.args.single or 0 local xpredate = frame.args.predate or 0 local xmiddate = frame.args.middate or 0 local xpostdate = frame.args.postdate or 0 local xera = frame.args.era or 0 local x = 0 local y = 0 local z = 0 local v = 0 local u = 0 local t = 0 local w = 0 txt = "" txt1 = "" if o1~=0 then v = 1 if o1:find("%s") then x = 1 end end if s2~=0 then v = 1 if s2:find("%s") then x = 1 end end if t3~=0 then t = 1 if t3:find("%s") then u = 1 end end if f4~=0 then t = 1 if f4:find("%s") then u = 1 end end if xcap
"word" then if y
"colon" then if y
"lword" then if y
"lcolon" then if y
"link" then if y
0 then if y
0 then txt = xlabel .. " " else txt = string.upper(string.sub(xlabel,1,1)) j = string.len(xlabel) for i = 2, tonumber(j) do if string.sub(xlabel,i,i)
0 then if xpredate ~= 0 then txt = txt .. xpredate w=1 end if v ~= 0 then if w ~= 0 then txt = txt .. ", " end if o1
0 then txt = txt .. "?-" else txt = txt .. "? - " end else txt = txt .. o1 if s2
0 then txt = txt .. "-" else txt = txt .. " - " end end end if s2 ~= 0 then txt = txt .. s2 end end if xmiddate ~= 0 then txt = txt .. ", " .. xmiddate end if v ~= 0 then if t ~= 0 then txt = txt .. ", " if t3
0 then txt = txt .. "?-" else txt = txt .. "? - " end else txt = txt .. t3 if f4
0 then txt = txt .. "-" else txt = txt .. " - " end end end if f4 ~= 0 then txt = txt .. f4 end end end if xpostdate ~= 0 then txt = txt .. ", " .. xpostdate end if xera ~= 0 then txt = txt .. " " .. xera end
end return txt1, txt .. " " end
return p