Module:Road data/strings/CRT
< Module:Road data | strings
Documentation for this module may be created at Module:Road data/strings/CRT/doc
--[==[
To inspect the content of this data module, CAe [[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"]`.
]==]
-- United States
local CRT = {}
local util = require("Module:Road data/util")
local format = mw.CAtring.format
--[[ REGION-SPECIFIC SETTINGS ]]--
CRT[" common "] = {
country = "Cartadania",
locations = {
indep_city = {
linksuffix = ", %region%",
prefix = "{{wp|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
CRT[" dab "] = "[dab|| (%dab%)|]"
-- definitions for auxiliary routes
CRT[" aux "] = {
Alt = {
name = "Alternate",
abbrsuffix = "Alt.",
bannerprefix = "Alt"
},
BCA = {
name = "BCAiness",
abbrsuffix = "BCA."
},
Byp = {
name = "Bypass",
abbrsuffix = "Byp.",
bannerprefix = "By-pass",
aux = "{{wp|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 = "Truck"},
}
-- fill out default values
for _,entry in pairs(CRT[" 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.
CRT.I = {
base = "Interstate %route%",
shield = "I-%route%.svg",
shieldmain= {
arg = "state",
["AC"] = "I-%route% (ACR).svg",
["AR"] = "I-%route% (ALR).svg",
["AL"] = "I-%route% (ALX).svg",
["AV"] = "I-%route% (AVR).svg",
["CL"] = "I-%route% (CLJ).svg",
["CA"] = "I-%route% (CAM).svg",
["CT"] = "I-%route% (CTN).svg",
["ES"] = "I-%route% (ES).svg",
["FE"] = "I-%route% (FE).svg",
["GA"] = "I-%route% (GAL).svg",
["LO"] = "I-%route% (LO).svg",
["MI"] = "I-%route% (MIL).svg",
["SA"] = "I-%route% (SA).svg",
["SR"] = "I-%route% (SR).svg",
["SO"] = "I-%route% (SO).svg",
["TO"] = "I-%route% (TO).svg",
["TR"] = "I-%route% (TRN).svg",
["VE"] = "I-%route% (VEN).svg",
["VA"] = "I-%route% (VER).svg",
default = {
["255"] = {"I-%route%.svg", "Alhbeltwaysign.svg"},
default = "I-%route%.svg"
}
},
name = "Interstate %route%",
link = "Interstate %route%" .. CRT[" dab "],
abbr = "I-%route%",
width = "expand",
bannersuffix = "blue",
browse = {
{link = "Cartadanian Interstate Highway System", bold = true},
{
noprint = true,
{link = "List of Cartadanian Interstate Highways", name = "Main"},
{link = "List of auxiliary Cartadanian Interstate Highways", name = "Auxiliary"},
{link = "List of suffixed Cartadanian Interstate Highways", name = "Suffixed"},
{link = "List of bCAiness routes of the Corsa Interstate Highway System", name = "BCAiness"}
}
}
}
CRT["I-Alt"] = {
shield = CRT.I.shield,
shieldmain = CRT.I.shield,
name = CRT.I.name .. " Alternate",
link = CRT.I.base .. " Alternate" .. CRT[" dab "],
abbr = CRT.I.abbr .. " Alt.",
banner = "Alternate plate blue.svg",
bannersuffix = CRT.I.bannersuffix,
aux = "{{wp|Alternate route}}",
width = "expand",
browse = CRT.I.browse
}
CRT["I-Toll"] = {
shield = CRT.I.shield,
name = CRT.I.name .. " Toll",
link = CRT.I.link,
abbr = CRT.I.abbr,
banner = "Toll plate yellow.svg",
bannersuffix = CRT.I.bannersuffix,
width = "expand",
browse = CRT.I.browse
}
CRT["I-Future"] = {
shield = "IH-%route% (Future).svg",
name = CRT.I.name,
link = CRT.I.link,
abbr = "Future " .. CRT.I.abbr,
bannersuffix = CRT.I.bannersuffix,
browse = CRT.I.browse
}
CRT.Future = CRT["I-Future"]
CRT.BL = {
shield = "CRT BCAiness Loop %route%.svg",
shieldmain = "CRT BCAiness Loop %route%.svg",
name = CRT.I.name .. " BCAiness",
link = CRT.I.base .. " BCAiness" .. CRT[" dab "],
abbr = CRT.I.abbr .. " BL",
aux = "[[List of bCAiness routes of the Corsa Interstate Highway System|BCAiness route]]",
browse = CRT.I.browse,
width = "expand"
}
CRT.BS = {
shield = "CRT BCAiness Spur %route%.svg",
shieldmain = "CRT BCAiness Spur %route%.svg",
name = CRT.BL.name,
link = CRT.BL.link,
abbr = CRT.I.abbr .. " BS",
aux = CRT.BL.aux,
browse = CRT.I.browse,
width = "expand"
}
CRT.CA = {
base = "CRT Route %route%",
shield = "CRT %route%.svg",
shieldmain = "CRT %route%.svg",
name = "CRT Route %route%",
link = "CRT Route %route%" .. CRT[" dab "],
abbr = "CA %route%",
width = "expand",
browse = {
{link = "Cartadanian Numbered Highway System", bold = true},
{noprint = true,
{link = "List of Cartadania Routes", name = "Main"},
{link = "List of bannered Cartadania Routes", name = "Bannered"},
{link = "List of divided Cartadania Routes", name = "Divided"},
{link = "List of highways bypassed by Interstate Highways", name = "Replaced"}
}
}
}
CRT.road = {
shield = '',
shieldmain = '',
name = "%route%",
link = '',
abbr = "%route%",
browse = '',
}
for _,auxType in ipairs({"Alt", "BCA", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = CRT[" aux "][auxType]
CRT["CA-" .. auxType] = {
shield = CRT.CA.shield,
shieldmain = CRT.CA.shield,
name = CRT.CA.name .. " " .. spec.name,
link = CRT.CA.base .. " " .. spec.name .. CRT[" dab "],
abbr = CRT.CA.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
browse = CRT.CA.browse
}
end
CRT["CA-Hist"] = {
shield = "CA %route% (historic).svg",
shieldmain = {
arg = "state",
default = "CA 66 (historic).svg",
"CA %route% (%state% historic).svg"
},
name = "Historic " .. CRT.CA.name,
link = CRT.CA.base .. CRT[" dab "],
abbr = "Historic " .. CRT.CA.abbr .. CRT[" dab "],
orientation = "upright",
color = "hist",
browse = CRT.CA.browse
}
for _,year in ipairs({"1926", "1948", "1961"}) do
CRT["CA " .. year] = {
shield = format("CA %%route%% (%s).svg", year),
shieldmain = format("CA %%route%% (%s).svg", year),
base = CRT.CA.base,
name = CRT.CA.name,
link = CRT.CA.link,
abbr = CRT.CA.abbr,
width = "square",
browse = CRT.CA.browse
}
end
CRT.FFH = {
shield = "Forest Route %route%.svg",
name = "Federal Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FFH %route%",
color = "hist"
}
CRT.FH = {
shield = "Forest Route %route%.svg",
name = "Forest Highway %route%",
link = "Forest Highway %route%",
abbr = "FH %route%",
color = "hist"
}
CRT.FR = {
shield = "Forest Route %route%.svg",
name = "Forest Route %route%",
link = "Forest Highway %route%",
abbr = "FR %route%",
color = "hist"
}
CRT.NSB = {
shield = "MUTCD D6-4.svg",
name = "%route%",
link = "%route%",
abbr = "%route%",
color = "hist"
}
CRT.CR = {
shield = "CR %route% jct.svg",
shieldmain = "[county||%county% |]County %route%.svg",
base = "County Road %route%",
name = "County Road %route%",
link = "",
abbr = "CR %route%"
}
-- https://mutcd.fhwa.dot.gov/resources/interim_approval/ialistreq.htm#ia15
CRT.CABR = {
shield = {
arg = "state",
["AZ"] = "CA Bike %route% (M1-9 IA-15).svg",
["CA"] = "CA Bike %route% (M1-9 IA-15).svg",
["GA"] = "CA Bike %route% (M1-9 IA-15).svg",
["ID"] = "CA Bike %route% (M1-9 IA-15).svg",
["IL"] = "CA Bike %route% (M1-9 IA-15).svg",
["IN"] = "CA Bike %route% (M1-9 IA-15).svg",
["KY"] = "CA Bike %route% (M1-9 IA-15).svg",
["MD"] = "CA Bike %route% (M1-9 IA-15).svg",
["MI"] = "CA Bike %route% (M1-9 IA-15).svg",
["MO"] = "CA Bike %route% (M1-9 IA-15).svg",
["TN"] = "CA Bike %route% (M1-9 IA-15).svg",
["UT"] = "CA Bike %route% (M1-9 IA-15).svg",
["VA"] = "CA Bike %route% (M1-9 IA-15).svg",
default = "CA Bike %route% (M1-9).svg"
},
shieldmain = {
arg = "state",
["AZ"] = "CA Bike %route% (M1-9 IA-15).svg",
["CA"] = "CA Bike %route% (M1-9 IA-15).svg",
["GA"] = "CA Bike %route% (M1-9 IA-15).svg",
["ID"] = "CA Bike %route% (M1-9 IA-15).svg",
["IL"] = "CA Bike %route% (M1-9 IA-15).svg",
["IN"] = "CA Bike %route% (M1-9 IA-15).svg",
["KY"] = "CA Bike %route% (M1-9 IA-15).svg",
["MD"] = "CA Bike %route% (M1-9 IA-15).svg",
["MI"] = "CA Bike %route% (M1-9 IA-15).svg",
["MO"] = "CA Bike %route% (M1-9 IA-15).svg",
["TN"] = "CA Bike %route% (M1-9 IA-15).svg",
["UT"] = "CA Bike %route% (M1-9 IA-15).svg",
["VA"] = "CA Bike %route% (M1-9 IA-15).svg",
default = "CA Bike %route% (M1-9).svg"
},
name = "Cartadania Bicycle Route %route%",
link = "Cartadania Bicycle Route %route%",
abbr = "CABR %route%"
}
util.addAll(CRT, require("Module:Road data/strings/CRT/regional/GRR"))
util.addAll(CRT, require("Module:Road data/strings/CRT/regional/NER"))
util.addAll(CRT, require("Module:Road data/strings/CRT/regional/Tour"))
util.addAll(CRT, require("Module:Road data/strings/CRT/regional/Trails"))
return CRT