Bước tới nội dung

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

Bách khoa toàn thư mở Wikipedia
--[==[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 followinginto 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"]`.]==]-- Michiganlocal MI = {}local util = require("Mô đun:Road data/util")local format = mw.ustring.formatutil.addAll(MI, require("Mô đun:Road data/strings/USA"))local suffix = " ([dab||%dab%, |]Michigan)"local special = " ([dab||%dab%, Michigan|Michigan highway])"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"	}}for k, v in pairs(MI) do if k:find ("^I") then 	v.link = MI.I.link	endendfor k, v in pairs(MI) do if k:find ("^I %d") then 	v.shield = v.shieldmain	endendMI.BL.link = MI.I.base .. " Business" .. suffixMI.BL.abbr = "BL " .. MI.I.abbrMI.BL.name = "Business Loop " .. MI.I.basefor k, v in pairs(MI) do if k:find ("^BL") then 	v.link = MI.BL.link	v.abbr = MI.BL.abbr	v.name = MI.BL.name	endendMI.BS.link = MI.I.base .. " Business" .. suffixMI.BS.abbr = "BS " .. MI.I.abbrMI.BS.name = "Business Spur " .. MI.I.basefor k, v in pairs(MI) do if k:find ("^BS") then 	v.link = MI.BS.link	v.abbr = MI.BS.abbr	v.name = MI.BS.name	endendMI.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"}for k, v in pairs(MI) do if k:find ("^US %d") then 	v.shield = v.shieldmain	v.name = MI.US.name	v.link = MI.US.link	endendMI["US 1961"] = MI["US 1948"] -- MI did not use the 1961 version and continued to use the 1948for _,auxType in ipairs({"Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do	local spec = MI[" aux "][auxType]		for k, v in pairs(MI) do if k:find (auxType) then if k:find ("^US") then			v.name = spec.name .. " " .. MI.US.name			v.link = MI.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Michigan)"			v.abbr = spec.abbrsuffix .. " " .. MI.US.abbr			end		end	endendfor _,auxType in ipairs({"Alt"}) do	local spec = MI[" aux "][auxType]		for k, v in pairs(MI) do if k:find (auxType) then if k:find ("^US") then			v.shield = "US %route%A.svg"			v.name = MI.US.name .. "A"			v.link = MI.US.base .. "A [dab||(%dab%,  Michigan)|in Michigan]"			v.base = spec.abbrsuffix .. MI.US.abbr			v.abbr = MI.US.abbr .. "A"			v.banner = ""			end		end	endendfor _,year in ipairs({'1926', '1948'}) do	for _,auxType in ipairs({"Bus", "Byp", "Conn", "Spur", "Truck"}) do		local type = "US " .. year		local spec = MI[" aux "][auxType]		MI[type .. "-".. auxType] = {			shield = 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 " .. year .. ".svg",			aux = spec.aux,			width = "expand",		}	endendfor _,year in ipairs({'1926', '1948'}) do	for _,auxType in ipairs({"Alt"}) do		local type = "US " .. year		local spec = MI[" aux "][auxType]		MI[type .. "-".. auxType] = {			shield = format("US %%route%%A Michigan %s.svg", year),			name = MI[type].name .. "A",			link = MI[type].base .. " " .. spec.name .. suffix,			abbr = MI[type].abbr .. "A",			aux = spec.aux,			width = "square",		}	endendMI["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-Spur"] = MI["US 1948-Spur"]MI["US 1961-Truck"] = MI["US 1948-Truck"]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.Mfor _,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",	}endMI["M 1973"].shield = {	["185"] = "M-185 (MISPC).svg",	["331"] = "",	["554"] = "",	default ="M-%route%.svg"	}MI["Capitol Loop"] = {	shield = "CapitolLoop.svg",	link = "Capitol Loop",	abbr = "Capitol Loop",	bannersuffix = "green"}for _,type in ipairs({'M'}) 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",		}	endendfor _,year in ipairs({'1926', '1948'}) do	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Spur", "Truck"}) do		local type = "M " .. year		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 " .. year .. ".svg",			aux = spec.aux,			width = "square",		}	endendMI["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.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"}-- add new types above this line if you want it to have the state highway browse and maintfor k, v in pairs(MI) do if k:find ("^%a") then	v.maint = "[[Michigan Department of Transportation|MDOT]]"	v.browse = "[[Michigan State Trunkline Highway System]]"	v.browselinks = {		[1] = "[[List of Interstate Highways in Michigan|Interstate]]",		[2] = "[[List of U.S. Highways in Michigan|US]]",		[3] = "[[List of state trunkline highways in Michigan|State]]",		[4] = "[[Pure Michigan Byway|Byways]]"	}	endendMI.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",	color = {		arg = "route",		["H-13"] = "hist",		default = "MUTCDgreen"	},	browse = "[[List of county-designated highways in Michigan|County-Designated Highways]]",	browselinks = ""}MI.CR.shield = "Michigan %route% %county% County.svg"MI.CR.shieldmain = MI.CR.shieldMI.CR.link = {	ifexists = true,	default = "County Road %route% (%county% County, Michigan)"}MI.CR.bannersuffix = {arg = "county",	default    = "",	Gogebic      = "county"}MI.CR.browse = "%county% County Roads"MI.CR.browselinks = ""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"}}return MI