Module:Infobox interval region: Difference between revisions

Ganaram inukshuk (talk | contribs)
more bugfix
Tag: Reverted
Overthink (talk | contribs)
improve title
 
(One intermediate revision by one other user not shown)
Line 42: Line 42:
table.insert(data, {
table.insert(data, {
["Header"] = "Name",
"Name",
["Data"] = name
name
})
})
if centslower == nil or centslower == "" then
if centslower == nil or centslower == "" then
table.insert(data, {
table.insert(data, {
["Header"] = "Lower bound",
"Lower bound",
["Data"] = centslowerStrict .. "¢"
centslowerStrict .. "¢"
})
})
else
else
table.insert(data, {
table.insert(data, {
["Header"] = "Lower bound",
"Lower bound",
["Data"] = centslower .. "¢ – " .. centslowerStrict .. "¢"
centslower .. "¢ – " .. centslowerStrict .. "¢"
})
})
end
end
Line 60: Line 60:
if centsupper == nil or centsupper == "" then
if centsupper == nil or centsupper == "" then
table.insert(data, {
table.insert(data, {
["Header"] = "Upper bound",
"Upper bound",
["Data"] = centsupperStrict .. "¢"
centsupperStrict .. "¢"
})
})
else
else
table.insert(data, {
table.insert(data, {
["Header"] = "Upper bound",
"Upper bound",
["Data"] = centsupperStrict .. "¢ – " .. centsupper .. "¢"
centsupperStrict .. "¢ – " .. centsupper .. "¢"
})
})
end
end
if moses ~= nil and moses ~= "" then
if moses ~= nil and moses ~= "" then
table.insert(data, {
table.insert(data, {
["Header"] = "Generated [[MOS]]es",
"Generated [[MOS]]es",
["Data"] = moses
moses
})
})
end
end
table.insert(data, {
table.insert(data, {
["Header"] = string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Example [[JI]] intervals")
string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Example [[JI]] intervals")
})
})
local jidata = ""
local jidata = ""
Line 88: Line 88:
end
end
table.insert(data, {
table.insert(data, {
["Header"] = "Intervals",
"Intervals",
["Data"] = jidata
jidata
})
})
table.insert(data, {
table.insert(data, {
["Header"] = string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Related regions")
string.format("<div style=\"margin-top: 0.6em;\"><b>%s</b></div>", "Related regions")
})
})
if complement ~= nil and complement ~= "" then
if complement ~= nil and complement ~= "" then
table.insert(data, {
table.insert(data, {
["Header"] = "[[Complement]]",
"[[Complement]]",
["Data"] = complement
complement
})
})
end
end
if subregions ~= nil and subregions ~= "" then
if subregions ~= nil and subregions ~= "" then
table.insert(data, {
table.insert(data, {
["Header"] = "Subregions",
"Subregions",
["Data"] = subregions
subregions
})
})
end
end
if superregions ~= nil and superregions ~= "" then
if superregions ~= nil and superregions ~= "" then
table.insert(data, {
table.insert(data, {
["Header"] = "Superregion(s)",
"Superregion(s)",
["Data"] = superregions
superregions
})
})
end
end
local args = {
local args = {
["Adjacent Links"] = { "←&nbsp;"..(prevRegion or ""), (nextRegion or "").."&nbsp;→" },
["Adjacent Links"] = { "←&nbsp;" .. (prevRegion or ""), (nextRegion or "") .. "&nbsp;→" },
["Title"] = "Interval&nbsp;region",
["Title"] = "[[Interval region|" .. name .. "]]",
["Rows"] = data,
["Rows"] = data,
}
}