Jump to content

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

From Wikipedia, the free encyclopedia
Content deleted Content added
alt plate
update module
Line 20: Line 20:


local suffix = " ([dab||%dab%, |]Kansas)"
local suffix = " ([dab||%dab%, |]Kansas)"
local maint = "[[Kansas Department of Transportation|KSDOT]]"


KS.I.shieldmain = "I-%route% (KS).svg"
KS.I.link = {
KS.I.link = {
["135"] = "Interstate 135",
["135"] = "Interstate 135",
Line 33: Line 31:
above = "Interstate %route% (Kansas)",
above = "Interstate %route% (Kansas)",
below = "Interstate %route% in Kansas"
below = "Interstate %route% in Kansas"
}
}
}
}


for k, v in pairs(KS) do if k:find ("^I") then
KS["I 1957"].link = KS.I.link
KS["I 1961"].link = KS.I.link
v.link = KS.I.link
end
end
KS["I-Alt"].banner = "Alt plate blue.svg"


KS.US.name = "U.S. Highway %route%"
KS.US.name = "U.S. Highway %route%"
KS.US.link = "U.S. Route %route% in Kansas"
KS.US.link = "U.S. Route %route% in Kansas"
KS.US.abbr = "US-%route%"
KS.US.abbr = "US-%route%"

KS["US 1926"].shieldmain = "US %route% Kansas 1926.svg"
KS["US 1926"].link = KS.US.link
KS["US 1926"].name = KS.US.name
KS["US 1948"].shieldmain = "US %route% Kansas 1948.svg"
KS["US 1948"].link = KS.US.link
KS["US 1948"].name = KS.US.name
KS["US 1961"].shield = "US %route% Kansas 1962.svg"
KS["US 1961"].name = KS.US.name
KS["US 1962"] = KS["US 1961"]
KS["US 1962"] = KS["US 1961"]
KS["US 1961"].shield = "US %route% Kansas 1962.svg"


for _,type in ipairs({'US'}) do
for k, v in pairs(KS) do if k:find ("^US %d") then
v.name = KS.US.name
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
v.link = KS.US.link
local spec = KS[" aux "][auxType]
end
KS["US-" .. auxType] = {
end
shield = KS.US.shield,

shieldmain = KS.US.shieldmain,
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
name = KS.US.name .. " " .. spec.name,
local spec = KS[" aux "][auxType]
link = KS.US.base .. " " .. spec.name .. suffix,
for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
abbr = KS.US.abbr .. " " .. spec.abbrsuffix,
banner = spec.banneralt .. " plate.svg",
v.name = KS.US.name .. " " .. spec.name
v.link = KS.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Kansas)"
aux = spec.aux,
v.banner = spec.banneralt .. " plate.svg"
width = "expand",
}
end
end
end
end
end
end


KS["US-City"] = {
shield = KS.US.shield,
name = "City " .. KS.US.name,
link = "U.S. Route %route% City" .. suffix,
abbr = KS.US.abbr .. " City",
banner = "City plate.svg",
width = "expand"
}
KS["US-Hist"].shield = "" --"US %route% (KS historic).svg"
KS["US-Hist"].shield = "" --"US %route% (KS historic).svg"
KS["US-Hist"].name = "Historic " .. KS.US.name
KS["US-Hist"].name = "Historic " .. KS.US.name
KS["US-Hist"].link = KS.US.link
KS["US-Hist"].link = KS.US.link

KS.KSTP = {
shield = "Kansas Turnpike.svg",
name = "Kansas Turnpike",
link = "Kansas Turnpike",
abbr = "Kansas Turnpike",
bannersuffix = "blue"
}
KS.KTA = KS.KSTP


KS.K = {
KS.K = {
Line 102: Line 75:
abbr = "K-%route%",
abbr = "K-%route%",
width = "expand"
width = "expand"
}
}

KS.KS = KS.K
KS.KS = KS.K


for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
for _,type in ipairs({'K', 'KS'}) do
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
KS["K " .. year] = {
KS[type .. " " .. year] = {
shield = format("K-%%route%% (%s).svg", year),
shield = format("K-%%route%% (%s).svg", year),
name = KS.K.name,
shieldmain = format("K-%%route%% (%s).svg", year),
name = KS.K.name,
link = KS.K.link,
link = KS.K.link,
abbr = KS.K.abbr,
abbr = KS.K.abbr,
width = "square",
}
width = "square",
}
end
end
end

KS["K 1968"].shield = {
KS["K 1968"].shield = {
hook = "splitlen",
hook = "splitlen",
Line 123: Line 94:
above = "K-%route% (1968).svg",
above = "K-%route% (1968).svg",
below = KS.K.shield
below = KS.K.shield
}
}

KS["KS 1968"] = KS["K 1968"]
KS["KS 1968"] = KS["K 1968"]
KS["KS 1962"] = KS["K 1962"]
KS["KS 1948"] = KS["K 1948"]
KS["KS 1926"] = KS["K 1926"]


for _,type in ipairs({'K', 'KS'}) do
for _,type in ipairs({'K', 'KS'}) do
Line 146: Line 112:
end
end
end
end

-- add new types above this line if you want it to have the state highway browse and maint
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|U.S.]]",
[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.CR.maint = ""


return KS
return KS

Revision as of 15:57, 21 September 2021

--[==[
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")
local format = mw.ustring.format
util.addAll(KS, require("Module:Road data/strings/USA"))

local suffix = " ([dab||%dab%, |]Kansas)"

KS.I.link = {
	["135"] = "Interstate 135",
	["435"] = "Interstate 435",
	["635"] = "Interstate 635 (Kansas–Missouri)",
	["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 
	v.link = KS.I.link
	end
end
KS["I-Alt"].banner = "Alt plate blue.svg"

KS.US.name = "U.S. Highway %route%"
KS.US.link = "U.S. Route %route% in Kansas"
KS.US.abbr = "US-%route%"

KS["US 1962"] = KS["US 1961"]
KS["US 1961"].shield = "US %route% Kansas 1962.svg"

for k, v in pairs(KS) do if k:find ("^US %d") then 
	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
	local spec = KS[" aux "][auxType]
		for k, v in pairs(KS) do if k:find (auxType) then if k:find ("^US") then
			v.name = KS.US.name .. " " .. spec.name
			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
	for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
		KS[type .. " " .. year] = {
			shield = format("K-%%route%% (%s).svg", year),
			name = KS.K.name,
			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
	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
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|U.S.]]",
		[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.CR.maint = ""

return KS