Jump to content

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

From Wikipedia, the free encyclopedia
Content deleted Content added
alt plate
update module
Line 20: Line 20:


local suffix = " ([dab||%dab%, |]Delaware)"
local suffix = " ([dab||%dab%, |]Delaware)"
local maint = "[[Delaware Department of Transportation|DelDOT]]"

DE[" aux "].Alt.bannerprefix = "Alt"


DE.I.link = "Interstate %route% (Delaware)"
DE.I.link = "Interstate %route% (Delaware)"
DE["I-Alt"].banner = "Alt plate blue.svg"


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


DE.US.link = "U.S. Route %route% in Delaware"
DE.US.link = "U.S. Route %route% in Delaware"


for k, v in pairs(DE) do if k:find ("^US %d") then
DE["US 1926"].shieldmain = "US %route% Delaware 1926.svg"
DE["US 1926"].link = DE.US.link
v.name = DE.US.name
v.link = DE.US.link
DE["US 1948"].shieldmain = "US %route% Delaware 1948.svg"
end
DE["US 1948"].link = DE.US.link
end
DE["US 1961"].link = DE.US.link

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = DE[" aux "][auxType]
for k, v in pairs(DE) do if k:find (auxType) then if k:find ("^US") then
v.link = DE.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Delaware)"
v.banner = spec.banneralt .. " plate.svg"
end
end
end
end
DE["US-Toll"].link = DE.US.link
DE["US-Toll"].link = DE.US.link


for _,type in ipairs({'US', 'US 1948', 'US 1961'}) do
for _,year in ipairs({'1948', '1961'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Toll", "Truck"}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Toll", "Truck"}) do
local type = "US " .. year
local spec = DE[" aux "][auxType]
local spec = DE[" aux "][auxType]
DE[type .. "-" .. auxType] = {
DE[type .. "-" .. auxType] = {
Line 47: Line 58:
link = DE[type].base .. " " .. spec.name .. suffix,
link = DE[type].base .. " " .. spec.name .. suffix,
abbr = DE[type].abbr .. " " .. spec.abbrsuffix,
abbr = DE[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.banneralt .. " plate.svg",
banner = spec.banneralt .. " plate " .. year .. ".svg",
aux = spec.aux,
aux = spec.aux,
width = DE[type].width,
width = DE[type].width,
Line 54: Line 65:
end
end


DE["US-Toll"].banner = "Toll plate yellow.svg"


DE.SR = {
DE.SR = {
base = "Delaware Route %route%",
base = "Delaware Route %route%",
Line 86: Line 93:
DE.DE = DE.SR
DE.DE = DE.SR


for _,type in ipairs({'SR'}) do
for _,type in ipairs({'SR', "DE"}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = DE[" aux "][auxType]
local spec = DE[" aux "][auxType]
DE["SR-" .. auxType] = {
DE[type .. "-" .. auxType] = {
shield = DE.SR.shield,
shield = DE.SR.shield,
shieldmain = DE.SR.shield,
name = DE.SR.name.default .. " " .. spec.name,
name = DE.SR.name.default .. " " .. spec.name,
link = DE.SR.base .. " " .. spec.name .. DE[" dab "],
link = DE.SR.base .. " " .. spec.name .. DE[" dab "],
Line 101: Line 107:
end
end
end
end
DE["SR-Toll"].banner = "Toll plate yellow.svg"
DE["DE-Toll"].banner = DE["SR-Toll"].banner


for _,type in ipairs({'SR', "DE"}) do
DE["DE-Alt"] = DE["SR-Alt"]
for _,year in ipairs({"1926", "1955", "1964", "1970", "1978"}) do
DE["DE-Bus"] = DE["SR-Bus"]
DE[type .. " " .. year] = {
DE["DE-Truck"] = DE["SR-Truck"]
shield = format("Delaware %%route%% %s.svg", year),

name = DE.SR.name.default,
DE["SR-Toll"] = {shield = DE.DE.shield,
name = DE.SR.name.default .. " Toll",
link = DE.SR.link,
link = DE.DE.link,
abbr = DE.SR.abbr,
width = "square",
abbr = "DE %route% Toll",
}
banner = "Toll plate yellow.svg",
end
width = "expand"}

DE["DE-Toll"] = DE["SR-Toll"]

for _,year in ipairs({"1926", "1955", "1964", "1970", "1978"}) do
DE["SR " .. year] = {
shield = format("Delaware %%route%% %s.svg", year),
shieldmain = format("Delaware %%route%% %s.svg", year),
name = DE.SR.name.default,
link = DE.SR.link,
abbr = DE.SR.abbr,
width = "square",
}
end
end
DE["SR 1926"].orientation = "upright"

DE["DE 1926"].orientation = "upright"
DE["SR 1955"].orientation = "upright"
DE["DE 1955"].orientation = "upright"
DE["SR 1970"].shield = "Circle sign %route%.svg"
DE["DE 1970"].shield = "Circle sign %route%.svg"
DE["SR 1978"].shield = {
DE["SR 1978"].shield = {
hook = "splitlen",
hook = "splitlen",
Line 132: Line 133:
above = "Elongated circle %route%.svg"
above = "Elongated circle %route%.svg"
}
}
DE["SR 1978"].shieldmain = DE.SR.shield
DE["DE 1978"].shield = DE["SR 1978"].shield
DE["SR 1978"].width = DE.SR.width
DE["SR 1978"].width = DE.SR.width
DE["DE 1978"].width = DE.SR.width
DE["DE 1978"] = DE["SR 1978"]
DE["SR 1978-Alt"] = {
shield = DE["SR 1978"].shield,

DE["SR 1978-Alt"] = { shield = DE["SR 1978"].shield,
name = DE["SR-Alt"].name,
name = DE["SR-Alt"].name,
link = DE["SR-Alt"].link,
link = DE["SR-Alt"].link,
abbr = DE["SR-Alt"].abbr,
banner = "Alt plate.svg",
abbr = DE["SR-Alt"].abbr,
width = "expand"
banner = "Alt plate.svg",
}
width = "expand"}
DE["DE 1978-Alt"] = DE["SR 1978-Alt"]
DE["DE 1978-Alt"] = DE["SR 1978-Alt"]
DE["SR 1970"].shield = "Circle sign %route%.svg"
DE["SR 1970"].shieldmain = DE["SR 1970"].shield

DE["DE 1970"] = DE["SR 1970"]

DE["DE 1964"] = DE["SR 1964"]

DE["SR 1955"].orientation = "upright"

DE["DE 1955"] = DE["SR 1955"]

DE["SR 1926"].orientation = "upright"

DE["DE 1926"] = DE["SR 1926"]


DE.DETP = {
DE.DETP = {
shield = "Delaware Turnpike logo.gif",
shield = "Delaware Turnpike logo.png",
shieldmain = "Delaware Turnpike logo.gif",
name = "Delaware Turnpike",
name = "Delaware Turnpike",
link = "Delaware Turnpike",
link = "Delaware Turnpike",
Line 170: Line 154:
width = 29
width = 29
}
}

DE.NJTP = {alias = {module = "USA/NJ", type = "NJTP"}}
DE.DEMD = {
shield = {"MD Route %route%.svg", DE.SR.shield},
shieldmain = {"MD Route %route%.svg", DE.SR.shield},
name = "Route %route%",
link = "Route %route% (Delaware–Maryland)",
abbr = "Route %route%",
width = 40
}
DE.MD = {alias = {module = "USA/MD", type = "MD"}}
DE.Byway = {
DE.Byway = {
Line 194: Line 165:
DE.SBR = {
DE.SBR = {
shield = "US Bike %route% (M1-8).svg",
shield = "US Bike %route% (M1-8).svg",
shieldmain = "US Bike %route% (M1-8).svg",
name = "Bike Route %route%",
name = "Bike Route %route%",
link = "Delaware Bicycle Route %route%",
link = "Delaware Bicycle Route %route%",
Line 200: Line 170:
orientation = "upright"
orientation = "upright"
}
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(DE) do if k:find ("^%a") then
v.maint = "[[Delaware Department of Transportation|DelDOT]]"
v.browse = "[[Delaware State Route System]]"
v.browselinks = {
[1] = "[[List of numbered routes in Delaware|List]]",
[2] = "[[Delaware Byways|Byways]]"
}
end
end

DE.DEMD = {
shield = {"MD Route %route%.svg", DE.SR.shield},
name = "Route %route%",
link = "Route %route% (Delaware–Maryland)",
abbr = "Route %route%",
width = 40
}

DE.NJTP = {alias = {module = "USA/NJ", type = "NJTP"}}
DE.MD = {alias = {module = "USA/MD", type = "MD"}}


return DE
return DE

Revision as of 18:29, 20 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"]`.
]==]

-- Delaware
local DE = {}

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

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

DE.I.link = "Interstate %route% (Delaware)"
DE["I-Alt"].banner = "Alt plate blue.svg"

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

DE.US.link = "U.S. Route %route% in Delaware"

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

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
	local spec = DE[" aux "][auxType]
		for k, v in pairs(DE) do if k:find (auxType) then if k:find ("^US") then
			v.link = DE.US.base .. " " .. spec.name .. " ([dab||%dab%, |]Delaware)"
			v.banner = spec.banneralt .. " plate.svg"
			end
		end
	end
end
DE["US-Toll"].link = DE.US.link

for _,year in ipairs({'1948', '1961'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Toll", "Truck"}) do
		local type = "US " .. year
		local spec = DE[" aux "][auxType]
		DE[type .. "-" .. auxType] = {
			shield = DE[type].shield,
			shieldmain = DE[type].shield,
			name = DE[type].name .. " " .. spec.name,
			link = DE[type].base .. " " .. spec.name .. suffix,
			abbr = DE[type].abbr .. " " .. spec.abbrsuffix,
			banner = spec.banneralt .. " plate " .. year .. ".svg",
			aux = spec.aux,
			width = DE[type].width,
		}
	end
end

DE.SR = {
	base = "Delaware Route %route%",
	shield = {
		hook = "splitlen",
		split = 3,
		above = "Ellipse sign %route%.svg",
		below = "Elongated circle %route%.svg"
	},
	shieldmain = {
		["261"] = {"Ellipse sign %route%.svg", "PA-%route%.svg"},
		default = {
			hook = "splitlen",
			split = 3,
			above = "Ellipse sign %route%.svg",
		below = "Elongated circle %route%.svg"
		}
	},
	name = {
		["261"] = "Route %route%",
		default = "Delaware Route %route%"
	},
	link = "Delaware Route %route% [dab||(%dab%)|]",
	abbr = "DE&nbsp;%route%",
	width = "expand"
}

DE.DE = DE.SR

for _,type in ipairs({'SR', "DE"}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
		local spec = DE[" aux "][auxType]
		DE[type .. "-" .. auxType] = {
			shield = DE.SR.shield,
			name = DE.SR.name.default .. " " .. spec.name,
			link = DE.SR.base .. " " .. spec.name .. DE[" dab "],
			abbr = DE.SR.abbr .. " " .. spec.abbrsuffix,
			banner = spec.banneralt .. " plate.svg",
			aux = spec.aux,
			width = "expand",
		}
	end
end
DE["SR-Toll"].banner = "Toll plate yellow.svg"
DE["DE-Toll"].banner = DE["SR-Toll"].banner

for _,type in ipairs({'SR', "DE"}) do
	for _,year in ipairs({"1926", "1955", "1964", "1970", "1978"}) do
		DE[type .. " " .. year] = {
			shield = format("Delaware %%route%% %s.svg", year),
			name = DE.SR.name.default,
			link = DE.SR.link,
			abbr = DE.SR.abbr,
			width = "square",
		}
	end
end
DE["SR 1926"].orientation = "upright"
DE["DE 1926"].orientation = "upright"
DE["SR 1955"].orientation = "upright"
DE["DE 1955"].orientation = "upright"
DE["SR 1970"].shield = "Circle sign %route%.svg"
DE["DE 1970"].shield = "Circle sign %route%.svg"
DE["SR 1978"].shield = {
	hook = "splitlen",
	split = 3,
	below = "Circle sign %route%.svg",
	above = "Elongated circle %route%.svg"
}
DE["DE 1978"].shield = DE["SR 1978"].shield
DE["SR 1978"].width = DE.SR.width
DE["DE 1978"].width = DE.SR.width
				  
DE["SR 1978-Alt"] = {
	shield = DE["SR 1978"].shield,
	name = DE["SR-Alt"].name,
	link = DE["SR-Alt"].link,
	abbr = DE["SR-Alt"].abbr,
	banner = "Alt plate.svg",
	width = "expand"
} 
DE["DE 1978-Alt"] = DE["SR 1978-Alt"]

DE.DETP = {
	shield = "Delaware Turnpike logo.png",
	name = "Delaware Turnpike",
	link = "Delaware Turnpike",
	abbr = "Delaware Turnpike",
	width = 29
}
         
DE.Byway = {
	shield = "Delaware Byways.png",
	name = "%route%",
	link = "%route%",
	abbr = "%route%",
	color = "hist"
}

DE.SBR = {
	shield = "US Bike %route% (M1-8).svg",
	name = "Bike Route %route%",
	link = "Delaware Bicycle Route %route%",
	abbr = "Bike Route %route%",
	orientation = "upright"
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(DE) do if k:find ("^%a") then
	v.maint = "[[Delaware Department of Transportation|DelDOT]]"
	v.browse = "[[Delaware State Route System]]"
	v.browselinks = {
		[1] = "[[List of numbered routes in Delaware|List]]",
		[2] = "[[Delaware Byways|Byways]]"
	}
	end
end

DE.DEMD = {
	shield = {"MD Route %route%.svg", DE.SR.shield},
	name = "Route %route%",
	link = "Route %route% (Delaware–Maryland)",
	abbr = "Route&nbsp;%route%",
	width = 40
}

DE.NJTP = {alias = {module = "USA/NJ", type = "NJTP"}}
DE.MD = {alias = {module = "USA/MD", type = "MD"}}

return DE