Mô đun:Road data/strings/USA/AZ

--[==[
To inspect the content of this data module, use Special:ExpandTemplates
and enter the following input text:


To inspect the content of this data module when editing, enter the following
into the Debug console:
local util = require("Mô đun: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"]`.
]==]

-- Arizona
local AZ = {}

local util = require("Mô đun:Road data/util")
util.addAll(AZ, require("Mô đun:Road data/strings/USA"))
local format = mw.ustring.format

local suffix = " ([dab||%dab%, |]Arizona)"
local maint = "ADOT"

AZ.I.link = {
["8"] = "Interstate 8",
["11"] = "Interstate 11",
["17"] = "Interstate 17",
["19"] = "Interstate 19",
default = {
hook = "splitlen",
split = 3,
above = "Interstate %route% (Arizona)",
below = "Interstate %route% in Arizona"
}
}

for k, v in pairs(AZ) do if k:find ("^I") then
v.link = AZ.I.link
end
end

AZ.BL.link = "Interstate %route% Business" .. suffix
AZ.BS.link = "Interstate %route% Business Spur" .. suffix

AZ["BL 1957"].shield = "Business Loop %route% (AZ 1957).svg"
AZ["BL 1957"].name = "State Business Route %route%"
AZ["BL 1957"].link = AZ.BL.link
AZ["BS 1957"].shield = "Business Spur %route% (AZ 1957).svg"
AZ["BS 1957"].name = "State Route %route% Spur"
AZ["BS 1957"].link = AZ.BS.link

AZ.US.link = "U.S. Route %route% [dab||(%dab%, Arizona)|in Arizona]"

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = AZ[" aux "][auxType]
for k, v in pairs(AZ) do if k:find (auxType) then if k:find ("^US") then
v.link = AZ.US.base .. " " .. spec.name .. suffix
end
end
end
end

AZ["US-Alt"].shield = "US %route%A.svg"
AZ["US-Alt"].link = {
["89"] = "U.S. Route 89A",
default = "U.S. Route %route% Alternate" .. suffix
}
AZ["US-Alt"].abbr = AZ.US.abbr .. "A"
AZ["US-Temp"].name = AZ.US.name .. "T"
AZ["US-Temp"].abbr = "US&nbsp;%route%T"

AZ["US-Hist"].shieldmain = {
["66"] = {"US %route% (AZ historic).svg", "MUTCD_D6-4.svg"},
default = "US %route% (AZ historic).svg"
}
AZ["US-Hist"].link = "Historic U.S. Route %route% (Arizona)"
AZ["US-Hist"].orientation = ""
AZ["US-Hist"].width = "expand"

AZ["US 1948"] = {
shield = AZ["US 1926"].shield,
shieldmain = AZ["US 1926"].shield
}

AZ["US Pre-1956"] = AZ["US 1948"]
--"US Pre-1956" is only meant for use on major intersection lists depicting alignments or highways after 1941.
Photographs and state highway maps suggest this type of shield was used on guide signage after 1941
while the standard 1926 shield with the state name was used for reassurance markers.

AZ["US 1956 W"] = {
shield = "US %route% Arizona 1956 West.svg"
}

AZ["US 1956 E"] = {
shield = "US %route% Arizona 1956 East.svg"
}

AZ["US 1956 N"] = {
shield = "US %route% Arizona 1956 North.svg"
}

AZ["US 1956 S"] = {
shield = "US %route% Arizona 1956 South.svg"
}

AZ["US 1956"] = {
shield = "US %route% Arizona 1956.svg"
}

AZ["US 1960"] = {
shield = {"US %route% (AZ 1960 1).svg", "US %route% (AZ 1960 2).svg"},
width = "40"
}

AZ["US 1960 N"] = {
shield = "US %route% (AZ 1960 north).svg"
}

AZ["US 1960 S"] = {
shield = "US %route% (AZ 1960 south).svg"
}

AZ["US 1960 W"] = {
shield = "US %route% (AZ 1960 west).svg"
}

AZ["US 1960 E"] = {
shield = "US %route% (AZ 1960 east).svg"
}

AZ["US 1963"] = AZ["US 1961"]
AZ["US 1961"].shield = "US %route% 1963 (AZ).svg"
AZ["US 1961"].shieldmain = "US %route% 1963 (AZ).svg"

for k, v in pairs(AZ) do if k:find ("^US %d") then
v.name = AZ.US.name
v.link = AZ.US.link
v.abbr = AZ.US.abbr
end
end

AZ["US 1926-Alt"] = {
shield = AZ["US 1926"].shield,
shieldmain = AZ["US 1926"].shieldmain,
name = AZ["US-Alt"].name,
link = AZ["US-Alt"].link,
abbr = AZ["US-Alt"].abbr,
banner = "Alternate plate 1927.svg"
}

AZ["US 1956-Alt"] = {
shield = AZ["US 1956"].shield,
name = AZ["US-Alt"].name,
link = AZ["US-Alt"].link,
abbr = AZ["US-Alt"].abbr,
banner = "Alternate plate.svg"
}

AZ["US 1963-Bus"] = {
shield = AZ["US 1963"].shield,
name = AZ["US-Bus"].name,
link = AZ["US-Bus"].link,
abbr = AZ["US-Bus"].abbr,
banner = "Business plate 1961.svg"
}

AZ["US 1963-Alt"] = {
shield = AZ["US 1963"].shield,
name = AZ["US-Alt"].name,
link = AZ["US-Alt"].link,
abbr = AZ["US-Alt"].abbr,
banner = "Alternate plate 1961.svg"
}

AZ["US 1963-Truck"] = { shield = AZ["US 1963"].shield,
name = AZ["US-Truck"].name,
link = AZ["US-Truck"].link,
abbr = AZ["US-Truck"].abbr,
banner = "Truck plate 1961.svg",
width = "square"}

for k, v in pairs(AZ) do if k:find ("^US") then
v.nbrowse = AZ.US.nbrowse
v.nbrowselinks = AZ.US.nbrowselinks
end
end

AZ.SR = {
base = "Arizona State Route %route%",
shield = "Arizona %route%.svg",
shieldmain = {
["66"] = {"Arizona %route%.svg", "US 66 (AZ historic).svg"},
["78"] = {"Arizona %route%.svg", "New Mexico %route%.svg"},
default = "Arizona %route%.svg",
},
name = {
["78"] = "Arizona State Route %route% andNew Mexico State Road %route%",
default = "State Route %route%"
},
link = "Arizona State Route %route% [dab||(%dab%)|]",
abbr = "SR&nbsp;%route%",
width = "expand"
}
AZ.AZ = AZ.SR

for _,type in ipairs({'SR', 'AZ'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = AZ[" aux "][auxType]
AZ[type .. "-" .. auxType] = {
shield = AZ.SR.shield,
name = "State Route %route% " .. spec.name,
link = AZ.SR.base .. " " .. spec.name .. AZ[" dab "],
abbr = AZ.SR.abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end

AZ["SR-Alt"].name = "State Route %route%A"
AZ["SR-Alt"].link = "Arizona State Route %route%A"
AZ["SR-Alt"].abbr = "SR&nbsp;%route%A"
AZ["AZ-Alt"] = AZ["SR-Alt"]

AZ["SR-Spur"].shield = {
default = AZ.SR.shield,
["202"] = "Arizona Loop 202.svg"
}
AZ["SR-Spur"].abbr = {
default = AZ.SR.abbr .. " Spur",
["202"] = "Loop&nbsp;202 Spur"
}

AZ["SR-Temp"].name = {
default = "State Route %route%T",
["69"] = "State Route T-69"
}
AZ["SR-Temp"].abbr = "SR&nbsp;%route%T"
AZ["AZ-Temp"] = AZ["SR-Temp"]

AZ["SR-Loop"] = {
shield = {
default = "Arizona %route%L.svg",
["101"] = "Arizona Loop 101.svg",
["202"] = "Arizona Loop 202.svg",
["303"] = "Arizona Loop 303.svg",
["404"] = "Arizona Loop 404.svg"
},
name = {
default = "SR&nbsp;%route%L",
["101"] = "State Loop&nbsp;101",
["202"] = "State Loop&nbsp;202",
["303"] = "State Loop&nbsp;303",
["404"] = "State Loop&nbsp;404"
},
link = {
default = "Arizona State Route %route%L",
["101"] = AZ.SR.link,
["202"] = AZ.SR.link,
["303"] = AZ.SR.link,
["404"] = AZ.SR.link
},
abbr = {
default = "SR&nbsp;%route%L",
["101"] = "Loop&nbsp;101",
["202"] = "Loop&nbsp;202",
["303"] = "Loop&nbsp;303",
["404"] = "Loop&nbsp;404"
},
width = "wide"
}
AZ["AZ-Loop"] = AZ["SR-Loop"]
AZ.Loop = AZ["SR-Loop"]

AZ["Loop 1987"] = {
shield = "Old Arizona Loop %route%.svg",
name = AZ["SR-Loop"].name,
link = AZ["SR-Loop"].link,
abbr = AZ["SR-Loop"].abbr,
width = "wide"
}

for _,type in ipairs({'SR', 'AZ'}) do
for _,year in ipairs({"1927", "Pre-1956", "1956", "1963", "1973"}) do
AZ[type .. " " .. year] = {
shield = format("Arizona %%route%% %s.svg", year),
name = AZ.SR.name.default,
link = AZ.SR.link,
abbr = AZ.SR.abbr,
}
end
end

AZ["SR 1960"] = {
shield = {"Arizona %route% (AZ 1960 1).svg", "Arizona %route% (AZ 1960 2).svg"},
width = "40"
}
AZ["AZ 1960"] = AZ["SR 1960"]

AZ["SR 1960 W"] = {
shield = "Arizona %route% (1960 west).svg"
}
AZ["AZ 1960 W"] = AZ["SR 1960 W"]

AZ["SR 1960 E"] = {
shield = "Arizona %route% (1960 east).svg"
}
AZ["AZ 1960 E"] = AZ["SR 1960 E"]

AZ["SR 1960 N"] = {
shield = "Arizona %route% (1960 north).svg"
}
AZ["AZ 1960 N"] = AZ["SR 1960 N"]

AZ["SR 1960 S"] = {
shield = "Arizona %route% (1960 south).svg"
}
AZ["AZ 1960 S"] = AZ["SR 1960 S"]

for k, v in pairs(AZ) do if k:find ("^SR %d") then
v.name = AZ.SR.name.default
v.link = AZ.SR.link
v.abbr = AZ.SR.abbr
end
end

for _,type in ipairs({'SR', 'AZ'}) do
for _,year in ipairs({"Pre-1956", "1956", "1963", "1973"}) do
for _,auxType in ipairs({"Alt", "Spur", "Temp"}) do
local spec = AZ[" aux "][auxType]
AZ[type .. " " .. year .. "-" .. auxType] = {
shield = format("Arizona %%route%% %s.svg", year),
name = AZ[type .. "-" .. auxType].name,
link = AZ[type .. "-" .. auxType].link,
abbr = AZ[type .. "-" .. auxType].abbr,
banner = spec.name .. " plate 1948.svg",
aux = spec.aux,
width = "square",
}
end
end
end

AZ["SR Pre-1956-Alt"].shield = "Arizona %route%A Pre-1956.svg"
AZ["SR 1956-Alt"].shield = "Arizona %route%A 1956.svg"
AZ["SR 1963-Alt"].shield = "Arizona %route%A 1963.svg"
AZ["SR 1973-Alt"].shield = "Arizona %route%A 1973.svg"
AZ["SR Pre-1956-Alt"].banner = ""
AZ["SR 1956-Alt"].banner = ""
AZ["SR 1963-Alt"].banner = ""
AZ["SR 1973-Alt"].banner = ""
AZ["AZ Pre-1956-Alt"] = AZ["SR Pre1956-Alt"]
AZ["AZ 1956-Alt"] = AZ["SR 1956-Alt"]
AZ["AZ 1963-Alt"] = AZ["SR 1963-Alt"]
AZ["AZ 1973-Alt"] = AZ["SR 1973-Alt"]

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(AZ) do if k:find ("^%a") then
v.maint = "ADOT"
v.browse = "Arizona State Highway System"
v.browselinks = {
[1] = "Interstate",
[2] = "US",
[3] = "State",
[4] = "Unconstructed",
[5] = "Former"
}
end
end

for k, v in pairs(AZ) do if k:match ("^%a%s19[2-6]") then
v.maint = "ASHD"
end
end

for k, v in pairs(AZ) do if k:match ("Pre-1956") then
v.maint = "ASHD"
end
end

AZ.NV = {alias = {module = "USA/NV", type = "NV"}}
AZ.CA = {alias = {module = "USA/CA", type = "SR"}}
AZ.NM = {alias = {module = "USA/NM", type = "NM"}}
AZ.UT = {alias = {module = "USA/UT", type = "SR"}}
AZ.MEX = {alias = {module = "MEX", type = "FH"}}
AZ.SON = {alias = {module = "MEX", type = "SH", state="SON"}}

AZ.MC = {
shield = AZ.CR.shield,
shieldmain = AZ.CR.shield,
name = "MC&nbsp;%route%",
link = "Maricopa County Route %route%",
abbr = "MC&nbsp;%route%"
}

AZ.BIA = {
shield = "Indian Route&nbsp;%route%.svg",
name = "BIA Route&nbsp;%route%",
link = "BIA Route&nbsp;%route%",
abbr = "BIA Route&nbsp;%route%"
}

AZ.N = {
shield = AZ.BIA.shield,
name = "Navajo Route&nbsp;%route%",
link = "Navajo Route&nbsp;%route%",
abbr = "N%route%"
}

AZ.Historic = {
shield = "Arizona Scenic Road Marker.svg",
name = "%route% Historic Road",
link = "%route% Historic Road (Arizona)",
abbr = "%route% Historic Road",
orientation = "upright"
}

AZ.Scenic = {
shield = AZ.Historic.shield,
name = "%route% Scenic Road",
link = "%route% Scenic Road (Arizona)",
abbr = "%route% Scenic Road",
orientation = "upright"
}

AZ.Parkway = {
shield = AZ.Historic.shield,
name = "%route% Parkway",
link = "%route% Parkway (Arizona)",
abbr = "%route% Parkway",
orientation = "upright"
}

return AZ