Module:Road data/strings/USA/MI

MyWikiBiz, Author Your Legacy — Monday November 25, 2024
Jump to navigationJump to search

Documentation for this module may be created at Module:Road data/strings/USA/MI/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["US-Hist"]`.
]==]

-- Michigan
local MI = {}

local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(MI, require("Module:Road data/strings/USA"))

local suffix = " ([dab||%dab%, |]Michigan)"
local special = " ([dab||%dab%, Michigan|Michigan highway])"
local maint = "[[Michigan Department of Transportation|MDOT]]"

MI[" common "] = {
	browse = {
		{link = "Michigan State Trunkline Highway System", bold = true},
		{
			noprint = true,
			{link = "List of Interstate Highways in Michigan", name = "Interstate"},
			{link = "List of U.S. Highways in Michigan", name = "U.S."},
			{link = "List of state trunkline highways in Michigan", name = "State"},
			{link = "Pure Michigan Byway", name = "Byways"}
		}
	}
}

MI.I.maint = maint
MI.I.link =  {
	["96"] = "Interstate 96",
	["196"] = "Interstate 196",
	["296"] = "Interstate 296",
	["496"] = "Interstate 496",
	["696"] = "Interstate 696",
	["94N"] = "Interstate 94N",
	default = {hook = "split",
		split = 100,
		above = "Interstate %route% (Michigan)",
		below = "Interstate %route% in Michigan"
		
	}
	
}
		
MI["I 1957"].shield = "I-%route% (MI 1957).svg"
MI["I 1957"].link = MI.I.link
MI["I 1961"].link = MI.I.link           

MI.BL.link = MI.I.base .. " Business" .. suffix
MI.BL.abbr = "BL " .. MI.I.abbr
MI["BL 1957"].link = MI.BL.link
MI["BL 1957"].abbr = MI.BL.abbr

MI.BS.link = MI.I.base .. " Business" .. suffix
MI.BS.abbr = "BS " .. MI.I.abbr
MI["BS 1957"].link = MI.BS.link
MI["BS 1957"].abbr = MI.BS.abbr

MI.US.maint = maint
MI.US.name = "US Highway %route%"
MI.US.link = {
	["8"] = "U.S. Route 8",
	["102"] = "U.S. Route 102",
	["112"] = "U.S. Route 112",
	["131"] = "U.S. Route 131",
	["141"] = "U.S. Route 141",
	["223"] = "U.S. Route 223",
	default ="U.S. Route %route% in Michigan"

}
MI["US 1926"].shield = "US %route% Michigan 1926.svg"
MI["US 1926"].shieldmain = "US %route% Michigan 1926.svg"
MI["US 1926"].base = MI.US.base
MI["US 1926"].name = MI.US.name
MI["US 1926"].link = MI.US.link
MI["US 1948"].shield = "US %route% Michigan 1948.svg"
MI["US 1948"].shieldmain = "US %route% Michigan 1948.svg"
MI["US 1948"].base = MI.US.base
MI["US 1948"].name = MI.US.name
MI["US 1948"].link = MI.US.link
MI["US 1961"] = MI["US 1948"] -- MI did not use the 1961 version and continued to use the 1948

MI.M = {
	base = "M-%route%",
	shield =   {
		["185"] = "M-185 (MISPC).svg",
		["331"] = "",
		["554"] = "",
		default = {
			hook = "split",
			split = 100,
			above = "M-%route% rectangle.svg",
		below = "M-%route%.svg"
		}
	},
	name = "M-%route%",
	link = "M-%route% ([dab||%dab% |]Michigan highway)",
	abbr = "M-%route%",
	width = "expand"
}
MI.MI = MI.M

for _,year in ipairs({"1919", "1926", "1948", "1973"}) do
	MI["M " .. year] = {
		shield = format("M-%%route%% %s.svg", year),
		base = MI.M.base,
		name = MI.M.name,
		link = MI.M.link,
		abbr = MI.M.abbr,
		width = "square",
	}
end

MI["M 1973"].shield = {
	["185"] = "M-185 (MISPC).svg",
	["331"] = "",
	["554"] = "",
	default ="M-%route%.svg"
	
}

MI.CDH = {
	shield = "County %route%.svg",
	shieldmain = {
		["H-13"] = {"County %route%.svg", "Forest Route 13.svg"},
		default = "County %route%.svg"
	},
	link = "%route% (Michigan county highway)",
	abbr = "%route%",
	bannersuffix = "county"
}

MI.CR.shield = "Michigan %route% %county% County.svg"
MI.CR.shieldmain = MI.CR.shield
MI.CR.link = {
	ifexists = true,
	default = "County Road %route% (%county% County, Michigan)"}
MI.CR.bannersuffix = {arg = "county",
	default    = "",
	Gogebic      = "county"}

MI["Capitol Loop"] = {
	shield = "CapitolLoop.svg",
	link = "Capitol Loop",
	abbr = "Capitol Loop",
	bannersuffix = "green"}

for _,type in ipairs({'US', 'US 1926', 'US 1948'}) do
	for _,auxType in ipairs({"Bus", "Byp", "Conn", "Spur", "Truck"}) do
		local spec = MI[" aux "][auxType]
		MI[type .. "-".. auxType] = {
			shield = MI[type].shield,
			shieldmain = MI[type].shieldmain,
			name = spec.name .. " " .. MI[type].name,
			link = MI[type].base .. " " .. spec.name .. suffix,
			abbr = spec.abbrsuffix .. " " .. MI[type].abbr,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = "expand",
		}
	end
end

MI["US-Alt"] = {
	shield = "US %route%A.svg",
	shieldmain = "US %route%A.svg",
	name = MI.US.name .. "A",
	link = MI.US.base .. "A [dab||(%dab%,  Michigan)|in Michigan]",
	abbr = MI.US.abbr .. "A",
	banner = "",
	width = "expand"
}

MI["US-Emerg"] = {
	shield = MI.US.shield,
	name = "Emergency " .. MI.US.name,
	link = "U.S. Route %route% Emergency ([dab||%dab%, |]Michigan)",
	abbr = "Emergency US&nbsp;%route%",
	banner = "Emergency plate.svg",
	width = "expand"
}
	
MI["US 1926-Alt"] = {
	shield = "US %route%A Michigan 1926.svg",
	shieldmain = "US %route%A Michigan 1926.svg",
	name = MI["US-Alt"].name,
	link = MI["US-Alt"].link,
	abbr = MI["US-Alt"].abbr,
	width = 'square'
}

MI["US 1948-Alt"] = {
	shield = "US %route%A Michigan 1948.svg",
	shieldmain = "US %route%A Michigan 1948.svg",
	name = MI["US-Alt"].name,
	link = MI["US-Alt"].link,
	abbr = MI["US-Alt"].abbr,
	width = 'square'
}

MI["US 1926-Bus"].banner = "Business plate 1927.svg"
MI["US 1926-Byp"].banner = "By-pass plate 1927.svg"
MI["US 1926-Conn"].banner = "Connector plate 1927.svg"
MI["US 1926-Truck"].banner = "Truck plate 1927.svg"
MI["US 1948-Bus"].banner = "Business plate 1948.svg"
MI["US 1948-Byp"].banner = "By-pass plate 1948.svg"
MI["US 1948-Conn"].banner = "Connector plate 1948.svg"
MI["US 1948-Truck"].banner = "Truck plate 1948.svg"
MI["US 1961-Alt"] = MI["US 1948-Alt"]
MI["US 1961-Bus"] = MI["US 1948-Bus"]
MI["US 1961-Byp"] = MI["US 1948-Byp"]
MI["US 1961-Conn"] = MI["US 1948-Conn"]
MI["US 1961-Truck"] = MI["US 1948-Truck"]


for _,type in ipairs({'M', 'M 1926', 'M 1948'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Spur", "Truck"}) do
		local spec = MI[" aux "][auxType]
		MI[type .. "-" .. auxType] = {
			shield = MI[type].shield,
			shieldmain = MI[type].shieldmain,
			name = spec.name .. " " .. MI[type].name,
			link = MI[type].base .. " " .. spec.name .. " ([dab||%dab%, Michigan|Michigan highway])",
			abbr = spec.abbrsuffix .. " " .. MI[type].abbr,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = "expand",
		}
	end
end

MI["MI-Alt"] = MI["M-Alt"]
MI["MI-Bus"] = MI["M-Bus"]
MI["MI-Byp"] = MI["M-Byp"]
MI["MI-Conn"] = MI["M-Conn"]
MI["MI-Spur"] = MI["M-Spur"]
MI["MI-Truck"] = MI["M-Truck"]

MI["M 1926-Alt"].banner = "Alternate plate 1927.svg"
MI["M 1926-Bus"].banner = "Business plate 1927.svg"
MI["M 1926-Byp"].banner = "By-pass plate 1927.svg"
MI["M 1926-Conn"].banner = "Connector plate 1927.svg"
MI["M 1926-Spur"].banner = "Spur plate 1927.svg"
MI["M 1926-Truck"].banner = "Truck plate 1927.svg"
MI["M 1948-Alt"].banner = "Alternate plate 1948.svg"
MI["M 1948-Bus"].banner = "Business plate 1948.svg"
MI["M 1948-Byp"].banner = "By-pass plate 1948.svg"
MI["M 1948-Conn"].banner = "Connector plate 1948.svg"
MI["M 1948-Spur"].banner = "Spur plate 1948.svg"
MI["M 1948-Spur"].width = "square"
MI["M 1948-Truck"].banner = "Truck plate 1948.svg"

MI.WI = {alias = {module = "USA/WI", type = "WI"}}
MI["US-WI"] = {alias = {module = "USA/WI", type = "US"}}	
MI.IN = {alias = {module = "USA/IN", type = "IN"}}
MI["US-IN"] = {alias = {module = "USA/IN", type = "US"}}	
MI.OH = {alias = {module = "USA/OH", type = "OH"}}
MI["US-OH"] = {alias = {module = "USA/OH", type = "US"}}
MI.ON = {alias = {module = "CAN/ON", type = "ON"}}

MI.Connector = {
	shield = "No image.svg",
	name = "Connector %route%",
	link = "Connector %route% (Michigan highway)",
	abbr = "Connector %route%"
}

MI.NSB.shieldmain = {
	["River Road National Scenic Byway"] = {"MUTCD D6-4.svg", "National Forest Scenic Byway.svg"},
	default = "MUTCD D6-4.svg"
}
MI.NSB.orientation = "upright"

MI.BlankM = {
	shield = "No image.svg",
	name = MI.M.name,
	link = MI.M.link,
	abbr = MI.M.abbr
}

MI["BlankM-Conn"] = {
	shield = MI.BlankM.shield,
	name = MI["M-Conn"].name,
	link = MI["M-Conn"].link,
	abbr = MI["M-Conn"].abbr
}

MI["BlankUS-Bus"] = {
	shield = MI.BlankM.shield,
	name = MI["US-Bus"].name,
	link = MI["US-Bus"].link,
	abbr = MI["US-Bus"].abbr,
	width = "expand"
}

MI["BlankUS-Conn"] = {
	shield = MI.BlankM.shield,
	name = MI["US-Conn"].name,
	link = MI["US-Conn"].link,
	abbr = MI["US-Conn"].abbr,
	width = "expand"
}

return MI