Jump to content

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

From Wikipedia, the free encyclopedia
Content deleted Content added
fix
update module
Line 21: Line 21:
local suffix = " ([dab||%dab%, |]Wisconsin)"
local suffix = " ([dab||%dab%, |]Wisconsin)"
local suffix2 = " [dab||(%dab%)|]"
local suffix2 = " [dab||(%dab%)|]"
local maint = "[[Wisconsin Department of Transportation|WisDOT]]"


WI.I.link = {
WI.I.link = {
Line 29: Line 28:
}
}


for k, v in pairs(WI) do if k:find ("^I") then
WI["I-Future"].link = WI.I.link
WI.Future = WI["I-Future"]
v.link = WI.I.link
end
end


for _,auxType in ipairs({"Alt", "Express", "Future", "Local", "Spur", "Temp", "Toll", "Truck"}) do
WI["I-Alt"].name = "Alternate Interstate %route%"
local spec = WI[" aux "][auxType]
WI["I-Alt"].link = "Interstate %route% Alternate (Wisconsin)"
for k, v in pairs(WI) do if k:find (auxType) then if k:find ("I-") then
WI["I-Alt"].abbr = "Alt. I-%route%"
v.link = WI.I.base .. " " .. spec.name .. " (Wisconsin)"
v.name = spec.name .. " " .. WI.I.name
v.abbr = spec.abbrsuffix .. " " .. WI.I.abbr
end
end
end
end


WI.BL.link = "Interstate %route% Business ([dab||%dab%, |]Wisconsin)"
WI.BL.link = "Interstate %route% Business ([dab||%dab%, |]Wisconsin)"
Line 55: Line 63:
WI.US.width = "square"
WI.US.width = "square"


for _,year in ipairs({"1926", "1948", "1961"}) do
for k, v in pairs(WI) do if k:find ("^US %d") then
v.name = WI.US.name
WI["US " .. year] = {
v.link = WI.US.link
shield = format("US %%route%% (%s).svg", year),
end
shieldmain = format("US %%route%% Wisconsin %s.svg", year),
name = WI.US.name,
link = WI.US.link,
abbr = WI.US.abbr,
width = "square",
}
end
end


for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = WI[" aux "][auxType]
for k, v in pairs(WI) do if k:find (auxType) then if k:find ("^US") then
v.name = spec.name .. " " .. WI.US.name
v.link = WI.US.base .. " " .. spec.name .. suffix
v.abbr = spec.abbrsuffix .. " " .. WI.US.abbr
v.width = "square"
end
end
end
end
WI["US 1961"].shield = "US %route% (1961 cutout).svg"
WI["US 1961"].shield = "US %route% (1961 cutout).svg"
WI["US 1961"].shieldmain = WI["US 1961"].shield
WI["US 1965"] = WI["US 1961"]
WI["US 1965"] = WI["US 1961"]


for _,type in ipairs({'US', 'US 1926', 'US 1948', 'US 1961', 'US 1965'}) do
for _,type in ipairs({'US 1926', 'US 1948', 'US 1961', 'US 1965'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Spur", "Temp", "Truck"}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Spur", "Temp", "Truck"}) do
local spec = WI[" aux "][auxType]
local spec = WI[" aux "][auxType]
Line 93: Line 106:
default = "WIS %route%.svg",
default = "WIS %route%.svg",
},
},
base = "Wisconsin Highway %route% ",
name = "State Trunk Highway %route%",
name = "State Trunk Highway %route%",
link = "Wisconsin Highway %route% [dab||(%dab%)|]",
link = "Wisconsin Highway %route% [dab||(%dab%)|]",
abbr = "WIS %route%"
abbr = "WIS %route%"
}
}

WI.STH = WI.WI
WI.STH = WI.WI

WI.WIS = WI.WI
WI.WIS = WI.WI


for _,type in ipairs({'WI', 'STH', 'WIS'}) do
WI["WI-Alt"] = {
for _,auxType in ipairs({"Alt", "Bus", "Spur"}) do
shield = WI.WI.shield,
local spec = WI[" aux "][auxType]
shieldmain = WI.WI.shield,
WI[type .. "-" .. auxType] = {
name = "Alternate " .. WI.WI.name,
shield = WI[type].shield,
link = "Wisconsin Highway %route% Alternate [dab||(%dab%)|]",
shieldmain = WI[type].shield,
abbr = "Alt. WIS %route%",
name = spec.name .. " " .. WI[type].name,
banner = "Alt plate.svg"
link = WI[type].base .. spec.name .. suffix,
}
abbr = spec.abbrsuffix .. " " .. WI[type].abbr,

banner = spec.bannerprefix .. " plate.svg",
WI["WI-Bus"] = {
aux = spec.aux,
shield = WI.WI.shield,
width = "square"
shieldmain = WI.WI.shield,
}
name = "Business " .. WI.WI.name,
end
link = "Wisconsin Highway %route% Business [dab||(%dab%)|]",
end
abbr = "Bus. WIS %route%",
banner = "Business plate.svg"
}

WI["STH-Alt"] = WI["WI-Alt"]

WI["STH-Bus"] = WI["WI-Bus"]

WI["WI-Spur"] = {
shield = WI.WI.shield,
shieldmain = WI.WI.shield,
name = "Spur Wisconsin Highway %route%",
link = "Wisconsin Highway %route% Spur",
abbr = "Spur WIS %route%",
banner = "Spur plate.svg"
}

WI.CTH = {
shield = "WIS County %route%.svg",
name = "County Trunk Highway %route%",
link = "",
abbr = "CTH-%route%"
}

WI.CR = WI.CTH


WI.RR = {
WI.RR = {
Line 151: Line 138:


WI.Rustic = WI.RR
WI.Rustic = WI.RR

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(WI) do if k:find ("^%a") then
v.maint = "[[Wisconsin Department of Transportation|WisDOT]]"
v.browse = "[[Wisconsin State Trunk Highway System]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Wisconsin|Interstate]]",
[2] = "[[List of U.S. Highways in Wisconsin|US]]",
[3] = "[[List of state trunk highways in Wisconsin|State]]",
[4] = "[[Wisconsin Scenic Byways|Scenic]]",
[5] = "[[Rustic Road (Wisconsin)|Rustic]]"
}
end
end


WI.Kettle = {
WI.Kettle = {
Line 158: Line 159:
abbr = "Kettle Moraine Scenic Drive"
abbr = "Kettle Moraine Scenic Drive"
}
}

WI.CTH = {
shield = "WIS County %route%.svg",
name = "County Trunk Highway %route%",
link = "",
abbr = "CTH-%route%",
browse = "[[County Trunk Highways (Wisconsin)|County Trunk Highways]]",
browselinks = ""
}

WI.CR = WI.CTH


WI.IL = {alias = {module = "USA/IL", type = "IL"}}
WI.IL = {alias = {module = "USA/IL", type = "IL"}}
Line 164: Line 177:
WI.M = {alias = {module = "USA/MI", type = "M"}}
WI.M = {alias = {module = "USA/MI", type = "M"}}
WI.MN = {alias = {module = "USA/MN", type = "MN"}}
WI.MN = {alias = {module = "USA/MN", type = "MN"}}
WI.road = {alias = {module = "USA", type = "road"}}


return WI
return WI

Revision as of 05:36, 25 September 2021

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

-- Wisconsin
local WI = {}

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

local suffix = " ([dab||%dab%, |]Wisconsin)"
local suffix2 = " [dab||(%dab%)|]"

WI.I.link = {
	["90"] = "Interstate 90 in Wisconsin",
	["94"] = "Interstate 94 in Wisconsin",
	default = "Interstate %route%"
}

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

for _,auxType in ipairs({"Alt", "Express", "Future", "Local", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = WI[" aux "][auxType]
		for k, v in pairs(WI) do if k:find (auxType) then if k:find ("I-") then
			v.link = WI.I.base .. " " .. spec.name .. " (Wisconsin)"
			v.name = spec.name .. " " .. WI.I.name
			v.abbr = spec.abbrsuffix .. " " .. WI.I.abbr
			end
		end
	end
end

WI.BL.link = "Interstate %route% Business ([dab||%dab%, |]Wisconsin)"
WI.BL.abbr = "BL I-%route%"

WI.BS.link = "Interstate %route% Business ([dab||%dab%, |]Wisconsin)"
WI.BS.abbr = "BS I-%route%"
         
WI.US.shield = "US %route% (WI).svg"
WI.US.shieldmain = "US %route% (WI).svg"
WI.US.name = "U.S. Highway %route%"
WI.US.link = {
	default ="U.S. Route %route% in Wisconsin",
	["8"] = "U.S. Route 8",
	["110"] = "U.S. Route 110",
	["118"] = "U.S. Route 118",
	["141"] = "U.S. Route 141",
	["151"] = "U.S. Route 151",
}
WI.US.width = "square"

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

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = WI[" aux "][auxType]
		for k, v in pairs(WI) do if k:find (auxType) then if k:find ("^US") then
			v.name = spec.name .. " " .. WI.US.name
			v.link = WI.US.base .. " " .. spec.name .. suffix
			v.abbr = spec.abbrsuffix .. " " .. WI.US.abbr
			v.width = "square"
			end
		end
	end
end
WI["US 1961"].shield = "US %route% (1961 cutout).svg"
WI["US 1965"] = WI["US 1961"]

for _,type in ipairs({'US 1926', 'US 1948', 'US 1961', 'US 1965'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Spur", "Temp", "Truck"}) do
		local spec = WI[" aux "][auxType]
		WI[type .. "-" .. auxType] = {
			shield = WI[type].shield,
			shieldmain = WI[type].shieldmain,
			name = spec.name .. " " .. WI[type].name,
			link = "U.S. Route %route% " .. spec.name .. suffix,
			abbr = spec.abbrsuffix .. " " .. WI[type].abbr,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = WI.US.width
		}
	end
end


WI.WI = {
	shield = "WIS %route%.svg",
	shieldmain = {
		["243"] = {"MN-%route% wide.svg", "WIS %route%.svg"},
		default = "WIS %route%.svg",
	},
	base = "Wisconsin Highway %route% ",
	name = "State Trunk Highway %route%",
	link = "Wisconsin Highway %route% [dab||(%dab%)|]",
	abbr = "WIS&nbsp;%route%"
}
WI.STH = WI.WI
WI.WIS = WI.WI

for _,type in ipairs({'WI', 'STH', 'WIS'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Spur"}) do
		local spec = WI[" aux "][auxType]
		WI[type .. "-" .. auxType] = {
			shield = WI[type].shield,
			shieldmain = WI[type].shield,
			name = spec.name .. " " .. WI[type].name,
			link = WI[type].base .. spec.name .. suffix,
			abbr = spec.abbrsuffix .. " " .. WI[type].abbr,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = "square"
		}
	end
end

WI.RR = {
	shield = "Rustic road.svg",
	name = "Rustic Road %route%",
	link = "Rustic Roads (Wisconsin)",
	abbr = "R%route%"
}

WI.Rustic = WI.RR

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(WI) do if k:find ("^%a") then
	v.maint = "[[Wisconsin Department of Transportation|WisDOT]]"
	v.browse = "[[Wisconsin State Trunk Highway System]]"
	v.browselinks = {
		[1] = "[[List of Interstate Highways in Wisconsin|Interstate]]",
		[2] = "[[List of U.S. Highways in Wisconsin|US]]",
		[3] = "[[List of state trunk highways in Wisconsin|State]]",
		[4] = "[[Wisconsin Scenic Byways|Scenic]]",
		[5] = "[[Rustic Road (Wisconsin)|Rustic]]"
	}
	end
end

WI.Kettle = {
	shield = "Kettle moraine.svg",
	name = "Kettle Moraine Scenic Drive",
	link = "Kettle Moraine Scenic Drive",
	abbr = "Kettle Moraine Scenic Drive"
}

WI.CTH = {
	shield = "WIS County %route%.svg",
	name = "County Trunk Highway %route%",
	link = "",
	abbr = "CTH-%route%",
	browse = "[[County Trunk Highways (Wisconsin)|County Trunk Highways]]",
	browselinks = ""
	
}

WI.CR = WI.CTH

WI.IL = {alias = {module = "USA/IL", type = "IL"}}
WI.IA = {alias = {module = "USA/IA", type = "IA"}}
WI.MI = {alias = {module = "USA/MI", type = "M"}}
WI.M = {alias = {module = "USA/MI", type = "M"}}
WI.MN = {alias = {module = "USA/MN", type = "MN"}}

return WI