Module:Road data/strings/USA/MI explained

--[==[ 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 followinginto 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"]`.]

]

-- Michiganlocal MI =

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

local suffix = " ([dab||%dab%, |]Michigan)"local special = " ([dab||%dab%, Michigan|Michigan highway])"

MI.I.link =

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

for k, v in pairs(MI) do if k:find ("^I %d") then v.shield = v.shieldmain endend

MI.BL.link = MI.I.base .. " Business" .. suffixMI.BL.abbr = "BL " .. MI.I.abbrMI.BL.name = "Business Loop " .. MI.I.base

for 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 endend

MI.BS.link = MI.I.base .. " Business" .. suffixMI.BS.abbr = "BS " .. MI.I.abbrMI.BS.name = "Business Spur " .. MI.I.base

for 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 endend

MI.US.name = "US Highway %route%"MI.US.link =

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 1948

for _,auxType in ipairs 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 endend

for _,auxType in ipairs 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 endend

for _,year in ipairs do for _,auxType in ipairs do local type = "US " .. year local spec = MI[" aux "][auxType] MI[type .. "-".. auxType] = endend

for _,year in ipairs do for _,auxType in ipairs do local type = "US " .. year local spec = MI[" aux "][auxType] MI[type .. "-".. auxType] = 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 = MI.MI = MI.M

for _,year in ipairs do MI["M " .. year] = end

MI["M 1973"].shield =

MI["Capitol Loop"] =

for _,type in ipairs do for _,auxType in ipairs do local spec = MI[" aux "][auxType] MI[type .. "-" .. auxType] = endend

for _,year in ipairs do for _,auxType in ipairs do local type = "M " .. year local spec = MI[" aux "][auxType] MI[type .. "-" .. auxType] = 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 =

MI.NSB.shieldmain = MI.NSB.orientation = "upright"

MI.BlankM =

MI["BlankM-Conn"] =

MI["BlankUS-Bus"] =

MI["BlankUS-Conn"] =

-- 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 = "MDOT" endend

MI.CDH =

MI.CR.shield = "Michigan %route% %county% County.svg"MI.CR.shieldmain = MI.CR.shieldMI.CR.link = MI.CR.bannersuffix =

MI.NFSB.shieldmain =

MI.CTR =

MI.WI = MI["US-WI"] = MI.IN = MI["US-IN"] = MI.OH = MI["US-OH"] = MI.ON =

return MI