模組:Road data/strings/USA/KS
模块文档[创建]
您可能想要创建本Scribunto模块的文档。 编者可以在本模块的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。 请在/doc子页面中添加分类。本模块的子页面。 |
--[==[
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"]`.
]==]
-- 堪薩斯州
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%|]"
local maint = "[[堪薩斯州運輸部|KSDOT]]"
KS.I.shieldmain = "I-%route% (KS).svg"
KS.I.link = {
["135"] = "135號州際公路",
["435"] = "435號州際公路",
["635"] = "635號州際公路 (堪薩斯州-密蘇里州)",
["670"] = "670號州際公路 (堪薩斯州-密蘇里州)",
default = {
hook = "splitlen",
split = 3,
above = "%route%號州際公路 (堪薩斯州)",
below = "%route%號州際公路堪薩斯州段"
}
}
KS["I 1957"].link = KS.I.link
KS["I 1961"].link = KS.I.link
KS.US.name = "%route%號美國國道"
KS.US.link = "%route%號美國國道堪薩斯州段"
KS.US.abbr = "%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"]
for _,type in ipairs({'US'}) do
local auxname = {"替代線", "商業線", "Byp", "Conn", "Opt", "Scenic", "支線", "Temp","貨車線"}
for i,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = KS[" aux "][auxType]
KS["US-" .. auxType] = {
shield = KS.US.shield,
shieldmain = KS.US.shieldmain,
name = KS.US.name .. auxname[i],
link = KS.US.base .. auxname[i] .. suffix,
abbr = KS.US.abbr .. auxname[i],
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
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"].name = "Historic " .. KS.US.name
KS["US-Hist"].link = KS.US.link
KS.KSTP = {
shield = "Kansas Turnpike.svg",
name = "堪薩斯州收費公路",
link = "堪薩斯州收費公路",
abbr = "堪薩斯州收費公路",
bannersuffix = "blue"
}
KS.KTA = KS.KSTP
KS.K = {
base = "%route%號堪薩斯州州道",
shield = "K-%route%.svg",
name = "%route%號堪薩斯州州道",
link = "%route%號堪薩斯州州道",
abbr = "%route%號堪薩斯州州道",
width = "expand"
}
KS.KS = KS.K
for _,year in ipairs({"1926", "1948", "1962", "1968"}) do
KS["K " .. year] = {
shield = format("K-%%route%% (%s).svg", year),
shieldmain = format("K-%%route%% (%s).svg", year),
name = KS.K.name,
link = KS.K.link,
abbr = KS.K.abbr,
width = "square",
}
end
KS["K 1968"].shield = {
hook = "splitlen",
split = 3,
above = "K-%route% (1968).svg",
below = KS.K.shield
}
KS["KS 1968"] = KS["K 1968"]
KS["KS 1962"] = KS["K 1962"]
KS["KS 1948"] = KS["K 1948"]
KS["KS 1926"] = KS["K 1926"]
KS["K-Alt"] = {
shield = KS.K.shield,
name = KS.K.name .. "替代線",
link = "%route%號堪薩斯州州道替代線",
abbr = KS.K.abbr .. "替代線",
banner = "Alt plate.svg",
width = "expand"
}
KS["KS-Alt"] = KS["K-Alt"]
KS["K-Spur"] = {
shield = KS.K.shield,
name = KS.K.name .. "支線",
link = "%route%號堪薩斯州州道",
abbr = KS.K.abbr .. "支線",
banner = "Spur plate.svg",
width = "expand"
}
KS["KS-Spur"] = KS["K-Spur"]
KS["K-Truck"] = {
shield = KS.K.shield,
name = KS.K.name .. "貨車線",
link = "%route%號堪薩斯州州道貨車線",
abbr = KS.K.abbr .. "貨車線",
banner = "Truck plate.svg",
width = "expand"
}
KS["KS-Truck"] = KS["K-Truck"]
return KS