Module:Road data/strings/USA/MT: Difference between revisions

Content deleted Content added
+2
add
 
(14 intermediate revisions by the same user not shown)
Line 1:
--Montana[==[
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"]`.
]==]
 
-- Montana
local MT = {}
 
local util = require("Module:Road data/util")
MT.I = {shield = "I-%route%.svg",
local format = mw.ustring.format
link = {["115"] = "Interstate 115",
util.addAll(MT, require("Module:Road data/strings/USA"))
["315"] = "Interstate 15 Business (Great Falls, Montana)",
default = {hook = "split",
split = 100,
above = "Interstate %route% (Montana)",
below = "Interstate %route% in Montana"}},
abbr = "I-%route%",
width = "expand"}
 
local suffix = " ([dab||%dab%, |]Montana)"
MT.BL = {shield = "Business Loop %route%.svg",
link = "Interstate %route% Business ([dab||%dab%, |]Montana)",
abbr = "I-%route% Bus.",
width = "expand"}
 
MT.I.link = {
MT.US = {shield = "US %route%.svg",
link = { ["310115"] = "U.S. RouteInterstate 310115",
["315"] = "Interstate 15 Business (Great Falls, Montana)",
["312"] = "U.S. Route 312",
default = {
default ="U.S. Route %route% in Montana"},
hook = "split",
abbr = "US&nbsp;%route%",
split = 100,
width = "expand"}
above = "Interstate %route% (Montana)",
below = "Interstate %route% in Montana"
}
}
 
for k, v in pairs(MT) do if k:find ("^I") then
MT["US-Bus"] = {shield = MT.US.shield,
v.link = MT.I.link
link = "U.S. Route %route% Business ([dab||%dab%, |]Montana)",
end
abbr = "US&nbsp;%route% Bus.",
end
banner = "Business plate.svg",
width = "expand"}
 
MT.BL.link = MT.I.base .. " Business" .. suffix
MT["US-Byp"] = {shield = MT.US.shield,
link = "U.S. Route %route% Bypass ([dab||%dab%, |]Montana)",
abbr = "US&nbsp;%route% Byp.",
banner = "By-pass plate.svg",
width = "expand"}
 
for k, v in pairs(MT) do if k:find ("^BL") then
MT["US-Alt"] = {shield = MT.US.shield,
v.link = MT.BL.link
link = "U.S. Route %route% Alternate ([dab||%dab%, |]Montana)",
end
abbr = "US&nbsp;%route% Alt.",
end
banner = "Alt plate.svg",
width = "expand"}
MT["US-Temp"] = {shield = MT.US.shield,
link = "U.S. Route %route% Temporary ([dab||%dab%, |]Montana)",
abbr = "US&nbsp;%route% Temp.",
banner = "Temp plate.svg",
width = "expand"}
 
MT.MTUS.name = {shield"U.S. =Highway "MT-%route%.svg",
MT.US.link = {
link = "Montana Highway %route%[dab|| (%dab%)|]",
["10A"] = "U.S. Route 10 Alternate ([dab||%dab%–|]Montana)",
abbr = "MT&nbsp;%route%",
["310"] = "U.S. Route 310",
width = "expand"}
["312"] = "U.S. Route 312",
default = "U.S. Route %route% in Montana"
MT["MT 1926"] = {shield = "",
}
link = MT.MT.link,
abbr = MT.MT.abbr,
width = square}
MT["MT 1948"] = {shield = "",
link = MT.MT.link,
abbr = MT.MT.abbr,
width = square}
 
for k, v in pairs(MT) do if k:find ("^US %d") then
MT["MT-Bus"] = {shield = MT.MT.shield,
v.name = MT.US.name
link = "Montana Highway %route% Business[dab|| (%dab%)|]",
v.link = MT.US.link
abbr = "MT&nbsp;%route% Bus.",
end
banner = "Business plate.svg",
end
width = "expand"}
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
MT.S = {shield = "MT-sec-%route%.svg",
local spec = MT[" aux "][auxType]
link = {ifexists = true,
for k, v in pairs(MT) do if k:find (auxType) then if k:find ("^US") then
default = "Montana Secondary Highway %route%",
v.name = MT.US.name .. " " .. spec.name
otherwise = "List of state highways in Montana#Sec0%route%"},
v.link = MT.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Montana)"
abbr = "S-%route%"}
end
end
end
end
 
MT.MT = {
shield = "MT-%route%.svg",
name = "Montana Highway %route%",
link = "Montana Highway %route%[dab|| (%dab%)|]",
abbr = "MT&nbsp;%route%",
width = "expand"
}
 
for _,type in ipairs({"MT"}) do
for _,year in ipairs({"1926", "1948"}) do
MT["MT " .. year] = {
shield = format("MT-%%route%% (%s).svg", year),
name = MT.MT.name,
link = MT.MT.link,
abbr = MT.MT.abbr,
width = "square"
}
end
end
 
MT["MT-Bus"] = {
shield = MT.MT.shield,
name = MT.MT.name .. " Business",
link = "Montana Highway %route% Business[dab|| (%dab%)|]",
abbr = "MT&nbsp;%route% Bus.",
banner = "Business plate.svg",
aux = MT[" aux "].Bus,
width = "expand"
}
 
MT.S = {
shield = "MT-sec-%route%.svg",
name = "Secondary Highway %route%",
link = {
ifexists = true,
default = "Montana Secondary Highway %route%",
otherwise = "List of secondary highways in Montana#Sec0%route%"
},
abbr = "S-%route%"
}
 
MT.Sec = MT.S
 
MT["S 1945"] = {
shield = "MT-sec-%route% (1945).svg",
name = MT.S.name,
link = MT.S.link,
abbr = MT.S.abbr
}
 
MT["Sec 1945"] = MT["S 1945"]
 
-- add new types above this line if you want it to have the state highway browse and maint
MT.CR = {shield = "Connecticut Highway %route%.svg",
for k, v in pairs(MT) do if k:find ("^%a") then
link = "",
v.maint = "[[Montana Department of Transportation|MDT]]"
abbr = "CR&nbsp;%route%"}
v.browse = "[[Montana Highway System]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Montana|Interstate]]",
[2] = "[[List of U.S. Highways in Montana|US]]",
[3] = "[[List of state highways in Montana|State]]",
[4] = "[[List of secondary highways in Montana|Secondary]]"
}
end
end
 
MT.CR.shield = "Connecticut Highway %route%.svg"
 
MT.NSB.shieldmain = {"US 212.svg", "MUTCD D6-4.svg"}
 
-- For internal linking on List of secondary highways in Montana
 
MT.Sec2 = {
MT["US 1926"] = {shield = "US %route% Montana 1926.svg",
shield = MT.Sec.shield,
link = "U.S. Route %route% in Montana",
link = "#Secondary Highway %route%",
abbr = "US&nbsp;%route%",
abbr = MT.Sec.abbr
width = "US1926"}
}
MT["US 1961"] = {shield = "US %route% (1961).svg",
link = "U.S. Route %route% in Montana",
abbr = "US&nbsp;%route%"}
 
return MT