模組:Road data/strings/USA
< Module:Road data | strings
![文档图示](http://upload.wikimedia.org/wikipedia/commons/thumb/4/43/Test_Template_Info-Icon_-_Version_%282%29.svg/50px-Test_Template_Info-Icon_-_Version_%282%29.svg.png)
您可能想要创建本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 USA = {}
local util = require("Module:Road data/util")
local format = mw.ustring.format
--[[ REGION-SPECIFIC SETTINGS ]]--
USA[" common "] = {
country = "United States",
locations = {
indep_city = {
linksuffix = ", %region%",
prefix = "[[獨立市 (美國)|市]]",
jcttoparticle = ""
},
sub1 = {
linksuffix = "縣 (%region%)",
jcttopnamesuffix = "縣"
},
sub2 = {
linksuffix = "[sub1dab|| (%sub1dab%縣)|], %region%"
},
sub2areas = {
city = {
linksuffix = " (city)",
jcttoparticle = "",
nameprefix = "市"
},
town = {
linksuffix = " (town)",
jcttoparticle = "",
nameprefix = "鎮"
},
township = {
linksuffix = "鎮區",
namesuffix = "鎮區",
},
village = {
linksuffix = " (village)",
jcttoparticle = "",
nameprefix = "村"
}
}
}
}
--[[ ROUTE TYPES ]]--
-- disambiguation switch
USA[" dab "] = "[dab|| (%dab%)|]"
-- definitions for auxiliary routes
USA[" aux "] = {
Alt = {
name = "Alternate",
abbrsuffix = "Alt.",
bannerprefix = "Alt"
},
Bus = {
name = "商業線",
abbrsuffix = "商業線"
},
Byp = {
name = "Bypass",
abbrsuffix = "Byp.",
bannerprefix = "By-pass",
aux = "[[Bypass (road)|Bypass]]"
},
Conn = {
name = "Connector",
abbrsuffix = "Conn."
},
Loop = {name = "Loop"},
Opt = {
name = "Optional",
abbrsuffix = "Opt."
},
Scenic = {name = "Scenic"},
Spur = {name = "Spur"},
Temp = {
name = "Temporary",
abbrsuffix = "Temp."
},
Truck = {name = "貨車線"},
}
-- fill out default values
for _,entry in pairs(USA[" aux "]) do
entry.abbrsuffix = entry.abbrsuffix or entry.name
entry.bannerprefix = entry.bannerprefix or entry.name
entry.aux = entry.aux or format("[[%s route]]", entry.name)
end
-- is nonbreaking space.
-- ‑ is nonbreaking hyphen.
USA.I = {
base = "%route%號州際公路",
shield = "I-%route%.svg",
shieldmain= {
arg = "state",
["AK"] = "I-A%route%.svg",
["AL"] = "I-%route% (AL).svg",
["AR"] = "I-%route% (AR).svg",
["AZ"] = "I-%route% (AZ).svg",
["CA"] = "I-%route% (CA).svg",
["HI"] = "I-H%route%.svg",
["IA"] = "I-%route% (IA).svg",
["KS"] = "I-%route% (KS).svg",
["MT"] = "I-%route% (big).svg",
["NJ"] = "I-%route% (NJ).svg",
["NM"] = "I-%route% (NM).svg",
["NV"] = "I-%route% (NV).svg",
["NY"] = "I-%route% (long).svg",
["OK"] = "I-%route% (OK).svg",
["PR"] = "I-PR%route%.svg",
["SC"] = "I-%route% (SC).svg",
["TX"] = "I-%route% (TX).svg",
["UT"] = "I-%route% (UT).svg",
["WV"] = "I-%route% (WV).svg",
["WY"] = "I-%route% (WY).svg",
default = {
["495"] = {"I-%route%.svg", "Capbeltwaysign.svg"},
default = "I-%route%.svg"
}
},
name = "%route%號州際公路",
link = "%route%號州際公路" .. USA[" dab "],
abbr = "%route%號州際公路",
width = "expand",
bannersuffix = "blue",
browse = {
{link = "州際公路系統", bold = true},
{
noprint = true,
{link = "美國州際公路系統主線列表", name = "Main"},
{link = "美國州際公路輔助線列表", name = "Auxiliary"},
{link = "List of suffixed Interstate Highways", name = "Suffixed"},
{link = "List of business routes of the Interstate Highway System", name = "Business"}
}
}
}
USA["I-Alt"] = {
shield = USA.I.shield,
shieldmain = USA.I.shield,
name = USA.I.name .. "輔助線",
link = USA.I.base .. "輔助線" .. USA[" dab "],
abbr = USA.I.abbr .. "輔助線",
banner = "Alternate plate blue.svg",
bannersuffix = USA.I.bannersuffix,
aux = "[[Alternate route]]",
width = "expand",
browse = USA.I.browse
}
USA["I-Toll"] = {
shield = USA.I.shield,
name = USA.I.name .. " Toll",
link = USA.I.link,
abbr = USA.I.abbr,
banner = "Toll plate yellow.svg",
bannersuffix = USA.I.bannersuffix,
width = "expand",
browse = USA.I.browse
}
USA["I-Future"] = {
shield = "I-%route% (Future).svg",
name = USA.I.name,
link = USA.I.link,
abbr = "Future " .. USA.I.abbr,
bannersuffix = USA.I.bannersuffix,
browse = USA.I.browse
}
USA.Future = USA["I-Future"]
USA["I 1957"] = {
shield = "I-%route% (1957).svg",
shieldmain = "I-%route% (%state% 1957).svg",
name = USA.I.name,
link = USA.I.link,
abbr = USA.I.abbr,
browse = USA.I.browse
}
USA["I 1961"] = {
shield = {
hook = "splitlen",
split = 3,
above = "I-%route% (1961).svg",
below = "I-%route% (1957).svg"
},
shieldmain = {
hook = "splitlen",
split = 3,
above = "I-%route% (%state% 1961).svg",
below = "I-%route% (%state% 1957).svg"
},
name = USA.I.name,
link = USA.I.link,
abbr = USA.I.abbr,
browse = USA.I.browse
}
USA.BL = {
shield = "Business Loop %route%.svg",
shieldmain = "Business Loop %route%.svg",
name = USA.I.name .. "商業線",
link = USA.I.base .. "商業線" .. USA[" dab "],
abbr = USA.I.abbr .. "商業線",
aux = "[[List of business routes of the Interstate Highway System|商業線]]",
browse = USA.I.browse,
width = "expand"
}
USA.BS = {
shield = "Business Spur %route%.svg",
shieldmain = "Business Spur %route%.svg",
name = USA.BL.name,
link = USA.BL.link,
abbr = USA.I.abbr .. " BS",
aux = USA.BL.aux,
browse = USA.I.browse,
width = "expand"
}
USA["BL 1957"] = {
shield = "Business Loop %route% (1957).svg",
shieldmain = "Business Loop %route% (%state% 1957).svg",
name = USA.BL.name,
link = USA.BL.link,
abbr = USA.BL.abbr,
aux = USA.BL.aux,
browse = USA.I.browse
}
USA["BS 1957"] = {
shield = "Business Spur %route% (1957).svg",
shieldmain = "Business Spur %route% (%state% 1957).svg",
name = USA.BS.name,
link = USA.BS.link,
abbr = USA.BS.abbr,
aux = USA.BS.aux,
browse = USA.I.browse
}
USA.US = {
base = "%route%號美國國道",
shield = {
arg = "state",
["CA"] = "US %route% (1961 cutout).svg",
default = "US %route%.svg"
},
shieldmain = {
arg = "state",
["CA"] = "US %route% (1961 cutout).svg",
default = {
["85"] = {"US %route%.svg", "CanAm Highway.svg"},
default = "US %route%.svg"
}
},
name = "%route%號美國國道",
link = "%route%號美國國道" .. USA[" dab "],
abbr = "%route%號美國國道",
width = "expand",
browse = {
{link = "美國國道", bold = true},
{noprint = true,
{link = "美國國道列表", name = "Main"},
{link = "List of bannered U.S. Routes", name = "Bannered"},
{link = "List of divided U.S. Routes", name = "Divided"},
{link = "List of highways bypassed by Interstate Highways", name = "Replaced"}
}
}
}
USA.road = {
shield = '',
shieldmain = '',
name = "%route%號",
link = '',
abbr = "%route%號",
browse = '',
}
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = USA[" aux "][auxType]
USA["US-" .. auxType] = {
shield = USA.US.shield,
shieldmain = USA.US.shield,
name = USA.US.name .. " " .. spec.name,
link = USA.US.base .. " " .. spec.name .. USA[" dab "],
abbr = USA.US.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
browse = USA.US.browse
}
end
USA["US-Hist"] = {
shield = "US %route% (historic).svg",
shieldmain = {
arg = "state",
default = "US 66 (historic).svg",
"US %route% (%state% historic).svg"
},
name = "Historic " .. USA.US.name,
link = USA.US.base .. USA[" dab "],
abbr = "Historic " .. USA.US.abbr .. USA[" dab "],
orientation = "upright",
color = "hist",
browse = USA.US.browse
}
for _,year in ipairs({"1926", "1948", "1961"}) do
USA["US " .. year] = {
shield = format("US %%route%% (%s).svg", year),
shieldmain = format("US %%route%% (%s).svg", year),
base = USA.US.base,
name = USA.US.name,
link = USA.US.link,
abbr = USA.US.abbr,
width = "square",
browse = USA.US.browse
}
end
USA.FFH = {
shield = "Forest Route %route%.svg",
name = "Federal Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FFH %route%",
color = "hist"
}
USA.FH = {
shield = "Forest Route %route%.svg",
name = "Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FH %route%",
color = "hist"
}
USA.FR = {
shield = "Forest Route %route%.svg",
name = "Forest Route %route%",
link = "Forest Highway %route%",
abbr = "FR %route%",
color = "hist"
}
USA.NSB = {
shield = "MUTCD D6-4.svg",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist"
}
USA.CR = {
shield = "CR %route% jct.svg",
shieldmain = "[county||%county% |]County %route%.svg",
base = "%route%號縣道",
name = "%route%號縣道",
link = "",
abbr = "%route%號縣道"
}
-- https://mutcd.fhwa.dot.gov/resources/interim_approval/ialistreq.htm#ia15
USA.USBR = {
shield = {
arg = "state",
["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
["CA"] = "US Bike %route% (M1-9 IA-15).svg",
["GA"] = "US Bike %route% (M1-9 IA-15).svg",
["ID"] = "US Bike %route% (M1-9 IA-15).svg",
["IL"] = "US Bike %route% (M1-9 IA-15).svg",
["IN"] = "US Bike %route% (M1-9 IA-15).svg",
["KY"] = "US Bike %route% (M1-9 IA-15).svg",
["MD"] = "US Bike %route% (M1-9 IA-15).svg",
["MI"] = "US Bike %route% (M1-9 IA-15).svg",
["MO"] = "US Bike %route% (M1-9 IA-15).svg",
["TN"] = "US Bike %route% (M1-9 IA-15).svg",
["UT"] = "US Bike %route% (M1-9 IA-15).svg",
["VA"] = "US Bike %route% (M1-9 IA-15).svg",
default = "US Bike %route% (M1-9).svg"
},
shieldmain = {
arg = "state",
["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
["CA"] = "US Bike %route% (M1-9 IA-15).svg",
["GA"] = "US Bike %route% (M1-9 IA-15).svg",
["ID"] = "US Bike %route% (M1-9 IA-15).svg",
["IL"] = "US Bike %route% (M1-9 IA-15).svg",
["IN"] = "US Bike %route% (M1-9 IA-15).svg",
["KY"] = "US Bike %route% (M1-9 IA-15).svg",
["MD"] = "US Bike %route% (M1-9 IA-15).svg",
["MI"] = "US Bike %route% (M1-9 IA-15).svg",
["MO"] = "US Bike %route% (M1-9 IA-15).svg",
["TN"] = "US Bike %route% (M1-9 IA-15).svg",
["UT"] = "US Bike %route% (M1-9 IA-15).svg",
["VA"] = "US Bike %route% (M1-9 IA-15).svg",
default = "US Bike %route% (M1-9).svg"
},
name = "U.S. Bicycle Route %route%",
link = "U.S. Bicycle Route %route%",
abbr = "USBR %route%"
}
util.addAll(USA, require("Module:Road data/strings/USA/regional/Trails"))
return USA