Module:Road data/strings/USA/KS: Difference between revisions

Content deleted Content added
no need for pkwy/tpk abbreviations, in fact it is supposed to be fully spelled out according to MOS:RJL
nolink
 
(32 intermediate revisions by 6 users not shown)
Line 1:
--Kansas[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
and enter the following input text:
{{#invoke:Road data/dump|dump|module=Module:<name-of-this-module>}}
 
To inspect the content of this data module when editing, enter the following
into the Debug console:
local util = require("Module:Road data/util")
print(util.arrayToString(p))
To inspect a particular route type, change `p` above to include the route type,
e.g., `p.I` and `p["US-Hist"]`.
]==]
 
-- Kansas
local KS = {}
 
local util = require("Module:Road data/util")
KS.I = {shield = "I-%route%.svg",
local format = mw.ustring.format
link = "Interstate %route% (Kansas)",
util.addAll(KS, require("Module:Road data/strings/USA"))
abbr = "I&#8209;%route%",
width = "expand"}
 
local suffix = " ([dab||%dab%, |]Kansas)"
KS.US = {shield = "US %route%.svg",
link = "U.S. Route %route% in Kansas",
abbr = "US-%route%",
width = "expand"}
 
KS.I.link = {
KS["US-Alt"] = {shield = KS.US.shield,
["135"] = "Interstate 135",
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Kansas)",
["435"] = "Interstate 435",
abbr = "US-%route% Alt.",
["635"] = "Interstate 635 (Kansas–Missouri)",
banner = "Alt plate.svg",
["670"] = "Interstate 670 (Kansas–Missouri)",
width = "expand"}
default = {
hook = "splitlen",
split = 3,
above = "Interstate %route% (Kansas)",
below = "Interstate %route% in Kansas"
}
}
 
for k, v in pairs(KS) do if k:find ("^I") then
KS["US-Bus"] = {shield = KS.US.shield,
v.link = KS.I.link
link = "U.S. Route %route% Business ([dab||%dab%, |]Kansas)",
end
abbr = "US-%route% Bus.",
end
banner = "Business plate.svg",
KS["I-Alt"].banner = "Alt plate blue.svg"
width = "expand"}
 
KS.US.name = "U.S. Highway %route%"
KS["US-Byp"] = {shield = KS.US.shield,
KS.US.link = "U.S. Route %route% Bypass ([dab||%dab%,in |]Kansas)",
KS.US.abbr = "US-%route% Byp.",
banner = "By-pass plate.svg",
width = "expand"}
 
KS["US 1962"] = KS["US 1961"]
KS.KSTP = {shield = "Kansas Turnpike.svg",
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
link = "Kansas Turnpike",
abbr = "Kansas Turnpike"}
 
for k, v in pairs(KS) do if k:find ("^US %d") then
KS.KTA = KS.KSTP
v.name = KS.US.name
v.link = KS.US.link
end
end
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
KS.K = {shield = "K-%route%.svg",
local spec = KS[" aux "][auxType]
link = "K-%route% (Kansas highway)",
for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
abbr = "K-%route%",
v.name = KS.US.name .. " " .. spec.name
width = "expand"}
v.link = KS.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Kansas)"
v.banner = spec.banneralt .. " plate.svg"
end
end
end
end
 
KS["US-Hist"].shield = "" --"US %route% (KS historic).svg"
KS["US-Hist"].name = "Historic " .. KS.US.name
KS["US-Hist"].link = KS.US.link
 
KS.K = {
base = "K-%route%",
shield = "K-%route%.svg",
name = "K-%route%",
link = "K-%route% ([dab||%dab% |]Kansas highway)",
abbr = "K-%route%",
width = "expand"
}
KS.KS = KS.K
 
for _,type in ipairs({'K', 'KS'}) do
KS["K-Alt"] = {shield = "K-%route%.svg",
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
link = "K-%route% Alternate (Kansas highway)",
KS[type .. " " .. year] = {
abbr = "K-%route% Alt.",
shield = format("K-%%route%% (%s).svg", year),
banner = "Alt plate.svg",
name = KS.K.name,
width = "expand"}
link = KS.K.link,
abbr = KS.K.abbr,
width = "square",
}
end
end
KS["K 1968"].shield = {
hook = "splitlen",
split = 3,
above = "K-%route% (1968).svg",
below = KS.K.shield
}
KS["KS 1968"] = KS["K 1968"]
 
for _,type in ipairs({'K', 'KS'}) do
KS["KS-Alt"] = KS["K-Alt"]
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Temp", "Truck"}) do
local spec = KS[" aux "][auxType]
KS[type .. "-" .. auxType] = {
shield = KS.K.shield,
shieldmain = KS.K.shieldmain,
name = KS.K.name .. " " .. spec.name,
link = KS.K.base .. " " .. spec.name .. suffix,
abbr = KS.K.abbr .. " " .. spec.abbrsuffix,
banner = spec.banneralt .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
 
-- add new types above this line if you want it to have the state highway browse and maint
KS["K-Spur"] = {shield = "K-%route%.svg",
for k, v in pairs(KS) do if k:find ("^%a") then
link = "K-%route% Spur (Kansas highway)",
v.maint = "[[Kansas Department of Transportation|KDOT]]"
abbr = "K-%route% Spur",
v.browse = "Kansas State Highway System"
banner = "Spur plate.svg",
v.browselinks = {
width = "expand"}
[1] = "[[List of Interstate Highways in Kansas|Interstate]]",
[2] = "[[List of U.S. Highways in Kansas|US]]",
[3] = "[[List of state highways in Kansas|State]]",
[4] = "[[List of Kansas state highway spurs|Spurs]]"
}
end
end
 
KS.KSTP = {
shield = "Kansas Turnpike.svg",
name = "Kansas Turnpike",
link = "Kansas Turnpike",
abbr = "Kansas Turnpike",
bannersuffix = "blue",
maint = "[[Kansas Turnpike Authority]]"
}
KS.KTA = KS.KSTP
 
KS.Scenic = {
KS["KS-Spur"] = KS["K-Spur"]
shield = "Kansas Scenic Byway.svg",
name = "%route%",
link = "",
abbr = "%route%",
bannersuffix = "blue",
width = "wide",
color = "hist"
}
 
KS.CR = {shield.maint = "CR %route% jct.svg",
link = "",
abbr = "CR-%route%"}
 
return KS