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

Content deleted Content added
comment out for now since no shields currently exist
nolink
 
(13 intermediate revisions by 2 users not shown)
Line 1:
--Kansas[==[
To inspect the content of this data module, use [[Special:ExpandTemplates]]
local KS = {}
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
KS.I = {shield = "I-%route%.svg",
into the Debug console:
link = {["135"] = "Interstate 135",
local util = require("Module:Road data/util")
["435"] = "Interstate 435",
print(util.arrayToString(p))
["635"] = "Interstate 635 (Kansas–Missouri)",
To inspect a particular route type, change `p` above to include the route type,
["670"] = "Interstate 670 (Kansas–Missouri)",
e.g., `p.I` and `p["US-Hist"]`.
default = {hook = "splitlen",
]==]
split = 3,
above = "Interstate %route% (Kansas)",
below = "Interstate %route% in Kansas"}},
abbr = "I-%route%",
width = "expand"}
 
-- Kansas
KS["I 1957"] = {shield = "I-%route% (1957).svg",
local KS = {}
link = KS.I.link,
abbr = KS.I.abbr}
KS["I 1961"] = {shield = {["35W"] = "I-%route% (1961).svg",
default = {hook = "split",
split = 100,
above = "I-%route% (1961).svg",
below = "I-%route% (1957).svg"}},
link = KS.I.link,
abbr = KS.I.abbr}
 
local util = require("Module:Road data/util")
KS.US = {shield = "US %route%.svg",
local format = mw.ustring.format
link = "U.S. Route %route% in Kansas",
util.addAll(KS, require("Module:Road data/strings/USA"))
abbr = "US-%route%",
width = "expand"}
KS["US 1926"] = {shield = "US %route% (1926).svg",
link = KS.US.link,
abbr = KS.US.abbr,
width = "US1926"}
 
local suffix = " ([dab||%dab%, |]Kansas)"
KS["US 1948"] = {shield = "US %route% (1948).svg",
link = KS.US.link,
abbr = KS.US.abbr,
width = "square"}
 
KS.I.link = {
KS["US 1961"] = {shield = "US %route% (1961).svg",
["135"] = "Interstate 135",
link = KS.US.link,
["435"] = "Interstate 435",
abbr = KS.US.abbr,
["635"] = "Interstate 635 (Kansas–Missouri)",
width = "square"}
["670"] = "Interstate 670 (Kansas–Missouri)",
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-Alt"] = {shield = KS.US.shield,
v.link = KS.I.link
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Kansas)",
end
abbr = "US-%route% Alt.",
end
banner = "Alt plate.svg",
KS["I-Alt"].banner = "Alt plate blue.svg"
width = "expand"}
 
KS.US.name = "U.S. Highway %route%"
KS["US-Bus"] = {shield = KS.US.shield,
KS.US.link = "U.S. Route %route% Business ([dab||%dab%,in |]Kansas)",
KS.US.abbr = "US-%route% Bus.",
banner = "Business plate.svg",
width = "expand"}
 
KS["US-Byp 1962"] = {shield = KS.["US.shield, 1961"]
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
link = "U.S. Route %route% Bypass ([dab||%dab%, |]Kansas)",
abbr = "US-%route% Byp.",
banner = "By-pass plate.svg",
width = "expand"}
 
for k, v in pairs(KS) do if k:find ("^US %d") then
KS["US-City"] = {shield = KS.US.shield,
v.name = KS.US.name
link = "U.S. Route %route% City ([dab||%dab%, |]Kansas)",
v.link = KS.US.link
abbr = "US-%route% City",
end
banner = "City plate.svg",
end
width = "expand"}
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
KS["US-Hist"] = {shield = "", --"US %route% (KS historic).svg"
local spec = KS[" aux "][auxType]
link = KS.US.link,
for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
abbr = "Historic US-%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"
KS["US-Opt"] = {shield = KS.US.shield,
end
link = "U.S. Route %route% Optional ([dab||%dab%, |]Kansas)",
end
abbr = "US-%route% Opt.",
end
banner = "Optional plate.svg",
end
width = "expand"}
 
KS["US-SpurHist"].shield = {shield"" =--"US %route% (KS historic).US.shield,svg"
KS["US-Hist"].name = "Historic " .. KS.US.name
link = "U.S. Route %route% Spur ([dab||%dab%, |]Kansas)",
KS["US-Hist"].link = KS.US.link
abbr = "US-%route% Spur",
banner = "Spur plate.svg",
width = "expand"}
 
KS["US-Temp"] = {shield = KS.US.shield,
link = "U.S. Route %route% Temporary ([dab||%dab%, |]Kansas)",
abbr = "US-%route% Temp.",
banner = "Temporary plate.svg",
width = "expand"}
 
KS["US-Truck"] = {shield = KS.US.shield,
link = "U.S. Route %route% Truck ([dab||%dab%, |]Kansas)",
abbr = "US-%route% Truck",
banner = "Truck plate.svg",
width = "expand"}
 
KS.KSTP = {shield = "Kansas Turnpike.svg",
link = "Kansas Turnpike",
abbr = "Kansas Turnpike",
bannersuffix = "blue"}
 
KS.KTA = KS.KSTP
 
KS.K = {shield = "K-%route%.svg",
link = "K-%route% ([dab||%dab%|Kansas highway])",
abbr = "K-%route%",
width = "expand"}
 
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 1968"] = {shield = {hook = "splitlen",
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
split = 3,
KS[type .. " " .. year] = {
above = "K-%route% (1968).svg",
shield = format("K-%%route%% (%s).svg", year),
below = KS.K.shield},
linkname = KS.K.linkname,
abbrlink = KS.K.abbrlink,
widthabbr = "square"}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["K 1962"] = {shield = "K-%route% (1962).svg",
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Temp", "Truck"}) do
link = KS.K.link,
local spec = KS[" aux "][auxType]
abbr = KS.K.abbr,
KS[type .. "-" .. auxType] = {
width = "square"}
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["KS 1962"] = KS["K 1962"]
for k, v in pairs(KS) do if k:find ("^%a") then
v.maint = "[[Kansas Department of Transportation|KDOT]]"
v.browse = "Kansas State Highway System"
v.browselinks = {
[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 = {
KS["K 1948"] = {shield = "K-%route% (1948).svg",
shield = "Kansas Turnpike.svg",
link = KS.K.link,
name = "Kansas Turnpike",
abbr = KS.K.abbr,
link = "Kansas Turnpike",
width = "square"}
abbr = "Kansas Turnpike",
 
bannersuffix = "blue",
KS["KS 1948"] = KS["K 1948"]
maint = "[[Kansas Turnpike Authority]]"
 
}
KS["K 1926"] = {shield = "K-%route% (1926).svg",
linkKS.KTA = KS.K.link,KSTP
abbr = KS.K.abbr,
width = "square"}
 
KS["KS 1962"] = KS["K 1926"]
 
KS["K-Alt"] = {shield = "K-%route%.svg",
link = "K-%route% Alternate (Kansas highway)",
abbr = "K-%route% Alt.",
banner = "Alt plate.svg",
width = "expand"}
 
KS["KS-Alt"] = KS["K-Alt"]
 
KS["K-Spur"] = {shield = "K-%route%.svg",
link = "K-%route% Spur (Kansas highway)",
abbr = "K-%route% Spur",
banner = "Spur plate.svg",
width = "expand"}
 
KS["KS-Spur"] = KS["K-Spur"]
 
KS.Scenic = {
KS["K-Truck"] = {shield = "K-%route%.svg",
shield = "Kansas Scenic Byway.svg",
link = "K-%route% Truck (Kansas highway)",
abbr name = "K-%route% Truck",
link = "",
banner = "Truck plate.svg",
abbr = "%route%",
width = "expand"}
bannersuffix = "blue",
width = "wide",
KS["KS-Truck"] = KS["K-Truck"]
color = "hist"
}
 
KS.CR = {shield.maint = "CR %route% jct.svg",
link = "",
abbr = "CR-%route%"}
 
return KS