Modul:Road data/strings/USA
Tampilan
--[==[
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"]`.
]==]
-- United States
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 = "[[Independent city (United States)|City]] of ",
jcttoparticle = "the "
},
sub1 = {
linksuffix = " County, %region%",
jcttopnamesuffix = " County"
},
sub2 = {
linksuffix = "[sub1dab||, %sub1dab% County|], %region%"
},
sub2areas = {
city = {
linksuffix = " (city)",
jcttoparticle = "the ",
nameprefix = "City of "
},
town = {
linksuffix = " (town)",
jcttoparticle = "the ",
nameprefix = "Town of "
},
township = {
linksuffix = " Township",
namesuffix = " Township",
},
village = {
linksuffix = " (village)",
jcttoparticle = "the ",
nameprefix = "Village of "
}
}
}
}
--[[ ROUTE TYPES ]]--
-- disambiguation switch
USA[" dab "] = "[dab|| (%dab%)|]"
-- definitions for auxiliary routes
USA[" aux "] = {
Alt = {
name = "Alternate",
abbrsuffix = "Alt.",
bannerprefix = "Alt"
},
Bus = {
name = "Business",
abbrsuffix = "Bus."
},
Byp = {
name = "Bypass",
abbrsuffix = "Byp.",
bannerprefix = "By-pass",
aux = "[[Bypass (road)|Bypass]]"
},
Conn = {
name = "Connector",
abbrsuffix = "Conn."
},
Loop = {name = "Loop"},
Scenic = {name = "Scenic"},
Spur = {name = "Spur"},
Truck = {name = "Truck"},
}
-- 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 = "Interstate %route%",
shield = "I-%route%.svg",
name = "Interstate %route%",
link = "Interstate %route%" .. USA[" dab "],
abbr = "I-%route%",
width = "expand",
bannersuffix = "blue",
browse = {
{link = "Interstate Highway System", bold = true},
{
noprint = true,
{link = "List of Interstate Highways", name = "Main"},
{link = "List of auxiliary Interstate Highways", 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,
name = USA.I.name .. " Alternate",
link = USA.I.base .. " Alternate" .. USA[" dab "],
abbr = USA.I.abbr .. " Alt.",
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",
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"
},
name = USA.I.name,
link = USA.I.link,
abbr = USA.I.abbr,
browse = USA.I.browse
}
USA.BL = {
shield = "Business Loop %route%.svg",
name = USA.I.name .. " Business",
link = USA.I.base .. " Business" .. USA[" dab "],
abbr = USA.I.abbr .. " Bus.",
aux = "[[List of business routes of the Interstate Highway System|Business route]]",
browse = USA.I.browse,
width = "expand"
}
USA.BS = {
shield = "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",
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",
name = USA.BS.name,
link = USA.BS.link,
abbr = USA.BS.abbr,
aux = USA.BS.aux,
browse = USA.I.browse
}
USA.US = {
base = "U.S. Route %route%",
shield = "US %route%.svg",
name = "U.S. Route %route%",
link = "U.S. Route %route%" .. USA[" dab "],
abbr = "US %route%",
width = "expand",
browse = {
{link = "United States Numbered Highway System", bold = true},
{
noprint = true,
{link = "List of U.S. Routes", 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 = '',
name = "%route%",
link = '',
abbr = "%route%",
browse = '',
}
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Scenic", "Spur", "Truck"}) do
local spec = USA[" aux "][auxType]
USA["US-" .. auxType] = {
shield = 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",
name = USA.US.name .. " Historic",
link = USA.US.base .. USA[" dab "],
abbr = "Historic " .. USA.US.abbr .. USA[" dab "],
width = "expand",
browse = USA.US.browse
}
for _,year in ipairs({"1926", "1948", "1961"}) do
USA["US " .. year] = {
shield = format("US %%route%% (%s).svg", year),
name = USA.US.name,
link = USA.US.link,
abbr = USA.US.abbr,
browse = USA.US.browse
}
end
-- 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"},
link = "U.S. Bicycle Route %route%",
abbr = "USBR %route%"}
util.addAll(USA, require("Module:Road data/strings/USA/regional/NER"))
return USA