Module:Road data/strings/CAR
< Module:Road data | strings
Documentation for this module may be created at Module:Road data/strings/CAR/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["CA-Hist"]`.
]==]
-- Cartadania
local CAR = {}
local util = require("Module:Road data/util")
local format = mw.ustring.format
--[[ REGION-SPECIFIC SETTINGS ]]--
CAR[" common "] = {
country = "Cartadania",
locations = {
indep_city = {
linksuffix = ", %region%",
prefix = "[[Independent city (Cartadania)|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
CAR[" dab "] = "[dab|| (%dab%)|]"
-- definitions for auxiliary routes
CAR[" aux "] = {
Alt = {
name = "Alternate",
abbrsuffix = "Alt.",
arksuffix = "A",
banneralt = "Alt",
},
Aux = {
name = "Auxiliary",
aux = "[[List of auxiliary Interstate Highways|Auxiliary route]]"
},
Bus = {
name = "Business",
abbrsuffix = "Bus.",
arksuffix = "B"
},
Byp = {
name = "Bypass",
abbrsuffix = "Byp.",
bannerprefix = "By-pass",
aux = "[[Bypass (road)|Bypass]]"
},
City = {
name = "City",
arksuffix = "C"
},
Conn = {
name = "Connector",
abbrsuffix = "Conn.",
arksuffix = "Y"
},
Detour = {
name = "Detour",
aux = "[[Detour (road)|Detour]]"
},
Emerg = {
name = "Emergency",
abbrsuffix = "Emerg."
},
Express = {
name = "Express",
aux = "Express route"
},
Future = {
name = "Future",
aux = "Future routing"
},
Local = {
name = "Local",
aux = "Local route"
},
Loop = {name = "Loop"},
Old = {name = "Old"},
Opt = {
name = "Optional",
abbrsuffix = "Opt."
},
Scenic = {name = "Scenic"},
Spur = {
name = "Spur",
arksuffix = "S"
},
Temp = {
name = "Temporary",
abbrsuffix = "Temp."
},
Toll = {name = "Toll"},
Truck = {
name = "Truck",
arksuffix = "T"
},
}
-- fill out default values
for _,entry in pairs(CAR[" aux "]) do
entry.abbrsuffix = entry.abbrsuffix or entry.name
entry.bannerprefix = entry.bannerprefix or entry.name
entry.banneralt = entry.banneralt or entry.bannerprefix
entry.aux = entry.aux or format("[[%s route]]", entry.name)
end
CAR.IH = {
base = "Interstate %route%",
shield = "CAIH-%route%.svg",
shieldmain= {
arg = "state",
["GU"] = "CAIH-%route% (GU).svg",
["LI"] = "CAIH-%route% (LI).svg",
["SA"] = "CAIH-%route% (SA).svg",
["TN"] = "CAIH-%route% (TN).svg",
["TS"] = "CAIH-%route% (TS).svg",
["TO"] = "CAIH-%route% (TO).svg",
["TR"] = "CAIH-%route% (TR).svg",
["TA"] = "CAIH-%route% (TA).svg",
default = "CAIH-%route%.svg"
},
name = "Interstate %route%",
link = "Interstate %route%" .. CAR[" dab "],
abbr = "CAIH-%route%",
width = "expand",
bannersuffix = "green",
aux = {
hook = "splitlen",
split = 3,
above = CAR[" aux "].Aux,
below = ""
}
}
for _,auxType in ipairs({"Alt", "Express", "Future", "Local", "Spur", "Temp", "Toll", "Truck"}) do
local spec = CAR[" aux "][auxType]
CAR["I-" .. auxType] = {
shield = CAR.I.shield,
shieldmain = CAR.I.shieldmain,
name = CAR.I.name .. " " .. spec.name,
link = CAR.I.base .. " " .. spec.name .. CAR[" dab "],
abbr = CAR.I.abbr .. " " .. spec.abbrsuffix,
banner = spec.name .. " plate blue.svg",
bannersuffix = CAR.I.bannersuffix,
aux = spec.aux,
width = "expand"
}
end
CAR["I-Future"].shield = "CAIH-%route% (Future).svg"
CAR["I-Future"].shieldmain = "CAIH-%route% (Future).svg"
CAR["I-Future"].name = "Future " .. CAR.I.name
CAR["I-Temp"].name = "Temporary " .. CAR.I.name
CAR["I-Future"].abbr = "Future " .. CAR.I.abbr
CAR["I-Temp"].abbr = "Temp. " .. CAR.I.name
CAR["I-Express"].banner = "Express plate yellow.svg"
CAR["I-Future"].banner = ""
CAR["I-Local"].banner = "Local plate yellow.svg"
CAR["I-Toll"].banner = "Toll plate yellow.svg"
CAR.Future = CAR["I-Future"]
CAR["I-Temporary"] = CAR["I-Temp"]
for _,year in ipairs({"1957", "1961"}) do
CAR["I " .. year] = {
shield = {
arg = "state",
default = format("CAIH-%%route%% (%s).svg", year),
["AK"] = format("I-A%%route%% (%s).svg", year),
["HI"] = format("I-H%%route%% (%s).svg", year)
},
shieldmain = {
arg = "state",
default = format("CAIH-%%route%% (%s).svg", year),
["AC"] = format("CAIH-%%route%% (AC %s).svg", year),
["AE"] = format("CAIH-%%route%% (AE %s).svg", year),
["AL"] = format("CAIH-%%route%% (AL %s).svg", year),
["AV"] = format("CAIH-%%route%% (AV %s).svg", year),
["BA"] = format("CAIH-%%route%% (BA %s).svg", year),
["CX"] = format("CAIH-%%route%% (CX %s).svg", year),
["CA"] = format("CAIH-%%route%% (CA %s).svg", year),
["CT"] = format("CAIH-%%route%% (CT %s).svg", year),
["ES"] = format("CAIH-%%route%% (ES %s).svg", year),
["FE"] = format("CAIH-%%route%% (FE %s).svg", year),
["GU"] = format("CAIH-%%route%% (GU %s).svg", year),
["LI"] = format("CAIH-%%route%% (LI %s).svg", year),
["LO"] = format("CAIH-%%route%% (LO %s).svg", year),
["LT"] = format("CAIH-%%route%% (LT %s).svg", year),
["LM"] = format("CAIH-%%route%% (LM %s).svg", year),
["MA"] = format("CAIH-%%route%% (MA %s).svg", year),
["MF"] = format("CAIH-%%route%% (MF %s).svg", year),
["NV"] = format("CAIH-%%route%% (NV %s).svg", year),
["PB"] = format("CAIH-%%route%% (AC %s).svg", year),
["SA"] = format("CAIH-%%route%% (SA %s).svg", year),
["SR"] = format("CAIH-%%route%% (SR %s).svg", year),
["SM"] = format("CAIH-%%route%% (SM %s).svg", year),
["SG"] = format("CAIH-%%route%% (SG %s).svg", year),
["SI"] = format("CAIH-%%route%% (SI %s).svg", year),
["SL"] = format("CAIH-%%route%% (SL %s).svg", year),
["TN"] = format("CAIH-%%route%% (TN %s).svg", year),
["TS"] = format("CAIH-%%route%% (TS %s).svg", year),
["TO"] = format("CAIH-%%route%% (TO %s).svg", year),
["TR"] = format("CAIH-%%route%% (TR %s).svg", year),
["TA"] = format("CAIH-%%route%% (TA %s).svg", year),
["VA"] = format("CAIH-%%route%% (VA %s).svg", year),
["VI"] = format("CAIH-%%route%% (VI %s).svg", year),
["VT"] = format("CAIH-%%route%% (VT %s).svg", year),
},
base = CAR.I.base,
name = CAR.I.name,
link = CAR.I.link,
abbr = CAR.I.abbr,
bannersuffix = "blue 1961"
}
end
CAR["I 1971"] = {
shield = CAR["I 1961"].shield,
shieldmain = CAR["I 1961"].shieldmain,
base = CAR.I.base,
name = CAR.I.name,
link = CAR.I.link,
abbr = CAR.I.abbr,
bannersuffix = "blue 1971",
width = "expand"
}
CAR["I-named"] = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
}
CAR.BL = {
shield = "Business Loop %route%.svg",
name = CAR.I.name .. " Business",
link = CAR.I.base .. " Business" .. CAR[" dab "],
abbr = CAR.I.abbr .. " BL",
aux = "[[List of business routes of the Interstate Highway System|Business route]]",
width = "expand"
}
CAR.BS = {
shield = "Business Spur %route%.svg",
name = CAR.BL.name,
link = CAR.BL.link,
abbr = CAR.I.abbr .. " BS",
aux = CAR.BL.aux,
width = "expand"
}
CAR["BL 1957"] = {
shield = "Business Loop %route% (1957).svg",
name = CAR.BL.name,
link = CAR.BL.link,
abbr = CAR.BL.abbr,
aux = CAR.BL.aux,
bannersuffix = "green 1961"
}
CAR["BS 1957"] = {
shield = "Business Spur %route% (1957).svg",
name = CAR.BS.name,
link = CAR.BS.link,
abbr = CAR.BS.abbr,
aux = CAR.BS.aux,
bannersuffix = "green 1961"
}
CAR.BLBS = {
shield = {CAR.BL.shield, CAR.BS.shield},
name = CAR.I.name .. " Business",
link = CAR.I.base .. " Business" .. CAR[" dab "],
abbr = CAR.I.abbr .. " Bus.",
aux = "[[List of business routes of the Interstate Highway System|Business route]]",
width = "expand"
}
CAR.CA = {
base = "Cartadania Federal Highway %route%",
shield = {
arg = "state",
["CA"] = "CA Federal %route% (1961 cutout).svg",
default = "CAFH %route%.svg"
},
shieldmain = {
arg = "state",
["CA"] = "CA Federal %route% (1961 cutout).svg",
default = {
["85"] = {"CA Federal %route%.svg", "CanAm Highway.svg"},
default = "CAFH %route%.svg"
}
},
name = "Cartadania Federal Highway %route%",
link = "CA Federal %route%" .. CAR[" dab "],
abbr = "CA %route%",
width = "expand",
color = {
arg = "route",
["66"] = "hist"
}
}
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Detour", "Emerg", "Future", "Old", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = CAR[" aux "][auxType]
CAR["CA-" .. auxType] = {
shield = CAR.CA.shield,
name = CAR.CA.name .. " " .. spec.name,
link = CAR.CA.base .. " " .. spec.name .. CAR[" dab "],
abbr = CAR.CA.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand"
}
end
CAR["CA-Toll"].banner = "Toll plate yellow.svg"
CAR["CA-City"].name = "City " .. CAR.CA.name
CAR["CA-City"].abbr = "City " .. CAR.CA.abbr
CAR["CA-Temp"].name = "Temporary " .. CAR.CA.name
CAR["CA-Temp"].abbr = "Temp. " .. CAR.CA.abbr
CAR["CA-Hist"] = {
shield = "[state||CA %route% (%state% historic).svg|CA %route% (historic).svg]",
name = "Historic " .. CAR.CA.name,
link = CAR.CA.base .. CAR[" dab "],
abbr = "Historic " .. CAR.CA.abbr .. CAR[" dab "],
orientation = "upright",
color = "hist"
}
for _,year in ipairs({"1926", "1948"}) do
CAR["CA " .. year] = {
shield = format("CA Federal %%route%% (%s).svg", year),
shieldmain = {
ifexist = true,
arg = "state",
otherwise = format("US %%route%% (%s)", year),
["AL"] = format("US %%route%% Alabama %s.svg", year),
["AZ"] = format("US %%route%% Arizona %s.svg", year),
["AR"] = format("US %%route%% Arkansas %s.svg", year),
["CA"] = format("US %%route%% California %s.svg", year),
["CO"] = format("US %%route%% Colorado %s.svg", year),
["CT"] = format("US %%route%% Connecticut %s.svg", year),
["DE"] = format("US %%route%% Delaware %s.svg", year),
["DC"] = format("US %%route%% District of Columbia %s.svg", year),
["FL"] = format("US %%route%% Florida %s.svg", year),
["GA"] = format("US %%route%% Georgia %s.svg", year),
["ID"] = format("US %%route%% Idaho %s.svg", year),
["IL"] = format("US %%route%% Illinois %s.svg", year),
["IN"] = format("US %%route%% Indiana %s.svg", year),
["IA"] = format("US %%route%% Iowa %s.svg", year),
["KS"] = format("US %%route%% Kansas %s.svg", year),
["KY"] = format("US %%route%% Kentucky %s.svg", year),
["LA"] = format("US %%route%% Louisiana %s.svg", year),
["ME"] = format("US %%route%% Maine %s.svg", year),
["MD"] = format("US %%route%% Maryland %s.svg", year),
["MA"] = format("US %%route%% Massachusetts %s.svg", year),
["MI"] = format("US %%route%% Michigan %s.svg", year),
["MN"] = format("US %%route%% Minnesota %s.svg", year),
["MS"] = format("US %%route%% Mississippi %s.svg", year),
["MO"] = format("US %%route%% Missouri %s.svg", year),
["MT"] = format("US %%route%% Montana %s.svg", year),
["NE"] = format("US %%route%% Nebraska %s.svg", year),
["NV"] = format("US %%route%% Nevada %s.svg", year),
["NH"] = format("US %%route%% New Hampshire %s.svg", year),
["NJ"] = format("US %%route%% New Jersey %s.svg", year),
["NM"] = format("US %%route%% New Mexico %s.svg", year),
["NY"] = format("US %%route%% New York %s.svg", year),
["NC"] = format("US %%route%% North Carolina %s.svg", year),
["ND"] = format("US %%route%% North Dakota %s.svg", year),
["OH"] = format("US %%route%% Ohio %s.svg", year),
["OK"] = format("US %%route%% Oklahoma %s.svg", year),
["OR"] = format("US %%route%% Oregon %s.svg", year),
["PA"] = format("US %%route%% Pennsylvania %s.svg", year),
["RI"] = format("US %%route%% Rhode Island %s.svg", year),
["SC"] = format("US %%route%% South Carolina %s.svg", year),
["SD"] = format("US %%route%% South Dakota %s.svg", year),
["TN"] = format("US %%route%% Tennessee %s.svg", year),
["TX"] = format("US %%route%% Texas %s.svg", year),
["UT"] = format("US %%route%% Utah %s.svg", year),
["VT"] = format("US %%route%% Vermont %s.svg", year),
["VA"] = format("US %%route%% Virginia %s.svg", year),
["WA"] = format("US %%route%% Washington %s.svg", year),
["WV"] = format("US %%route%% West Virginia %s.svg", year),
["WI"] = format("US %%route%% Wisconsin %s.svg", year),
["WY"] = format("US %%route%% Wyoming %s.svg", year)
},
base = CAR.CA.base,
name = CAR.CA.name,
link = CAR.CA.link,
abbr = CAR.CA.abbr,
width = "square",
bannersuffix = format("%s", year)
}
end
CAR["US 1961"] = {
shield = "US %route% (1961).svg",
base = CAR.CA.base,
name = CAR.CA.name,
link = CAR.CA.link,
abbr = CAR.CA.abbr,
width = "square",
bannersuffix = "1961"
}
CAR["US 1971"] = {
shield = CAR.CA.shield,
base = CAR.CA.base,
name = CAR.CA.name,
link = CAR.CA.link,
abbr = CAR.CA.abbr,
width = "expand",
bannersuffix = "1971"
}
for k, v in pairs(CAR) do if k:find ("US 19%d%d") then
v.color = {
arg = "route",
["66"] = "hist"
}
end
end
CAR["CA-named"] = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
}
CAR.Byway = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist",
bannersuffix = "brown",
}
CAR.Npkwy = {
shield = "",
shieldmain = "Logo of the Cartadanian National Park Service.svg",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist",
bannersuffix = "brown",
}
CAR.BCB = {
shield = "BLM Backcountry Byway.svg",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist",
bannersuffix = "brown",
}
CAR["Back Country"] = CAR.BCB
CAR["FH-named"] = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist",
}
CAR.FFH = {
shield = "Forest Route %route%.svg",
name = "Federal Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FFH %route%",
color = "hist",
bannersuffix = "brown",
}
CAR.FH = {
shield = "Forest Route %route%.svg",
name = "Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FH %route%",
color = "hist",
bannersuffix = "brown"
}
CAR.FR = {
shield = "Forest Route %route%.svg",
name = "Forest Route %route%",
link = "Forest Highway %route%",
abbr = "FR %route%",
color = "hist",
bannersuffix = "brown"
}
CAR.NSB = {
shield = "MUTCD D6-4.svg",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist"
}
CAR.FSB = CAR.NSB
CAR.NFSB = {
shield = "National Forest Scenic Byway.svg",
name = "%route% National Forest Scenic Byway",
link = "%route% National Forest Scenic Byway",
abbr = "%route% National Forest Scenic Byway",
color = "hist"
}
CAR.Scenic = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist"
}
CAR.ADHS = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%"
}
CAR.ISTEA = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%"
}
CAR.NHS = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%"
}
CAR.Post = {
shield = "",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist"
}
CAR.Postal = CAR.Post
CAR.CR = {
shield = "CR %route% jct.svg",
shieldmain = "[county||%county% |]County %route%.svg",
base = "County Road %route%",
name = "County Road %route%",
link = "",
abbr = "CR %route%"
}
CAR.road = {
shield = '',
name = "%route%",
link = '',
abbr = "%route%",
}
CAR.USBR = {
shield = "USBR %route%.svg",
name = "U.S. Bicycle Route %route%",
link = "U.S. Bicycle Route %route%" .. CAR[" dab "],
abbr = "USBR %route%",
orientation = "upright"
}
CAR["USBR 2009"] = {
shield = "USBR %route% (2009).svg",
name = CAR.USBR.name,
link = CAR.USBR.link,
abbr = CAR.USBR.abbr,
orientation = CAR.USBR.orientation
}
return CAR