Module:Road data/strings/USA/IA and Module:Road data/strings/USA/IA/sandbox: Difference between pages
(Difference between pages)
imported>Fredddie add |
imported>Fredddie m fix dots (via WP:JWB) |
||
Line 17: | Line 17: | ||
local util = require("Module:Road data/util") | local util = require("Module:Road data/util") | ||
local format = mw.ustring.format | local format = mw.ustring.format | ||
util.addAll(IA, require("Module:Road data/strings/USA")) | util.addAll(IA, require("Module:Road data/strings/USA/sandbox")) | ||
local suffix = " ([dab||%dab%, |]Iowa)" | local suffix = " ([dab||%dab%, |]Iowa)" | ||
local maint = "[[Iowa Department of Transportation|Iowa DOT]]" | |||
IA.common = { | IA.common = { | ||
Line 26: | Line 27: | ||
["first-data"] = "[[Iowa]]", | ["first-data"] = "[[Iowa]]", | ||
["second-label"] = "Counties", | ["second-label"] = "Counties", | ||
}, | |||
browse = "[[Iowa Primary Highway System]]", | |||
browselinks = { | |||
[1] = "[[List of Interstate Highways in Iowa|Interstate]]", | |||
[2] = "[[List of U.S. Highways in Iowa|US]]", | |||
[3] = "[[List of Iowa state highways|State]]", | |||
[4] = "[[County roads in Iowa|Secondary]]", | |||
[5] = "[[Iowa Scenic Byways|Scenic]]" | |||
} | } | ||
} | } | ||
Line 42: | Line 51: | ||
} | } | ||
for k, v in pairs(IA) do if k:find ("^I") then | for k, v in pairs(IA) do if k:find ("^I-%a") then | ||
v.link = IA.I.link | v.link = IA.I.link | ||
end | end | ||
Line 51: | Line 60: | ||
IA.BL.abbr = IA.I.abbr .. " Business Loop" | IA.BL.abbr = IA.I.abbr .. " Business Loop" | ||
IA["I 1957"].link = IA.I.link | |||
IA["I 1961"].link = IA.I.link | |||
IA.US.name = "U.S. Highway %route%" | IA.US.name = "U.S. Highway %route%" | ||
IA.US.link = { | IA.US.link = {["32"] = "U.S. Route 6 in Iowa", | ||
["55"] = "U.S. Route 55", | |||
["151"] = "U.S. Route 151", | |||
["161"] = "U.S. Route 161", | |||
["163"] = "Iowa Highway 163", | |||
["218"] = "U.S. Route 218", | |||
["275"] = "U.S. Route 275", | |||
default = "U.S. Route %route% in Iowa"} | |||
} | |||
for k, v in pairs(IA) do if k:find ("^US %d") then | for k, v in pairs(IA) do if k:find ("^US %d") then | ||
Line 74: | Line 79: | ||
end | end | ||
for _,auxType in ipairs({"Alt", "Bus", "Byp | for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do | ||
local spec = IA[" aux "][auxType] | local spec = IA[" aux "][auxType] | ||
for k, v in pairs(IA) do if k:find ("^US-%a+") then | |||
v.name = IA.US.name .. " " .. spec.name | |||
v.link = IA.US.base .. " " .. spec.name .. suffix | |||
end | end | ||
end | end | ||
Line 90: | Line 93: | ||
shield = "US %route% City 1926.svg", | shield = "US %route% City 1926.svg", | ||
name = "City " .. IA.US.name, | name = "City " .. IA.US.name, | ||
link = IA | link = IA.US.base .. " City" .. suffix, | ||
abbr = "City " .. IA.US.abbr | abbr = "City " .. IA.US.abbr | ||
} | } | ||
IA["US 1948-City"] = IA["US 1926-City"] | IA["US 1948-City"] = IA["US 1926-City"] | ||
Line 100: | Line 102: | ||
name = IA["US-Bus"].name, | name = IA["US-Bus"].name, | ||
link = IA["US-Bus"].link, | link = IA["US-Bus"].link, | ||
abbr = IA["US-Bus"].abbr | abbr = IA["US-Bus"].abbr | ||
} | } | ||
IA.IA = { | IA.IA = { | ||
Line 132: | Line 122: | ||
for _,year in ipairs({"1926", "1948", "1961", "1980"}) do | for _,year in ipairs({"1926", "1948", "1961", "1980"}) do | ||
IA["IA " .. year] = { | IA["IA " .. year] = { | ||
shield = | shield = { | ||
arg = year, | |||
["1926"] = "Iowa %route% 1926.svg", | |||
["1948"] = "Iowa %route% 1926.svg", | |||
["1961"] = { | |||
hook = "splitlen", | |||
split = 3, | |||
above = "Circle sign %route% (small).svg", | |||
below = { | |||
hook = "splitlen", | |||
split = 2, | |||
above = "Elongated circle %route%.svg", | |||
below = "Circle sign %route%.svg" | |||
} | |||
}, | |||
["1980"] = { | |||
hook = "between", | |||
lower = 10, | |||
upper = 100, | |||
yes = "Elongated circle %route%.svg", | |||
no = "Circle sign %route%.svg" | |||
} | |||
}, | |||
name = IA.IA.name, | name = IA.IA.name, | ||
link = IA.IA.link, | link = IA.IA.link, | ||
abbr = IA.IA.abbr, | abbr = IA.IA.abbr, | ||
width = "square", | width = "square", | ||
maint = { | |||
arg = year, | |||
default = "[[Iowa State Highway Commission]]", | |||
["1980"] = maint | |||
} | |||
} | } | ||
end | end | ||
end | end | ||
IA["IA-Bus"] = { | IA["IA-Bus"] = { | ||
Line 169: | Line 164: | ||
abbr = IA.IA.abbr.." Business", | abbr = IA.IA.abbr.." Business", | ||
banner = "Business plate.svg", | banner = "Business plate.svg", | ||
width = "square" | width = "square" | ||
} | } | ||
Line 180: | Line 174: | ||
banner = "Avenue of the Saints banner.svg" | banner = "Avenue of the Saints banner.svg" | ||
} | } | ||
IA.CR.link = { | IA.CR.link = { | ||
Line 204: | Line 184: | ||
} | } | ||
} | } | ||
IA.CR.browse = "Secondary roads in Iowa" | |||
IA.CR.browselinks = "" | |||
IA.CR.maint = "[county||%county% County Highway Department|]" | IA.CR.maint = "[county||%county% County Highway Department|]" | ||
Line 224: | Line 206: | ||
} | } | ||
IA. | IA.Lincoln.link = "Lincoln Highway in Iowa" | ||
IA.Lincoln.abbr = "Lincoln Highway Heritage Byway" | |||
IA.Jefferson.abbr = "Jefferson Highway Heritage Byway" | |||
-- add new types above this line | |||
for k, v in pairs(IA) do if k:find ("^%a") then | |||
v.browse = maint | |||
v.browse = IA.common.browse | |||
v.browselinks = IA.common.browselinks | |||
end | |||
end | |||
IA.IL = {alias = {module = "USA/IL", type = "IL"}} | IA.IL = {alias = {module = "USA/IL", type = "IL"}} |