Jump to content

Module:Road data/strings/USA/VA

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fredddie (talk | contribs) at 20:19, 9 August 2021 (fix). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

-- Virginia
local VA = {}

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

local suffix = " ([dab||%dab%, |]Virginia)"
local suffix2 = " [dab||(%dab%)|]"
local maint = "[[Virginia Department of Transportation|VDOT]]"


VA.I.link = "Interstate %route% (Virginia)"
VA["I 1957"].link = VA.I.link
VA["I 1961"].link = VA.I.link

VA["I-Express"] = {
	shield = VA.I.shield,
	name = "Interstate %route% Express",
	link = "Interstate %route% Express (Virginia)",
	abbr = VA.I.abbr .. " Express",
	width = "expand",
	bannersuffix = "blue"
}
         
VA["I-Future"].link = VA.I.link
VA.Future = VA["I-Future"]         

VA.US.link = "U.S. Route %route% in Virginia"

VA["US 1926"].shieldmain = "US %route% Virginia 1926.svg"
VA["US 1926"].link = VA.US.link
VA["US 1948"].shieldmain = "US %route% Virginia 1948.svg"
VA["US 1948"].link = VA.US.link
VA["US 1961"].link = VA.US.link

VA["US-Alt"].link = VA.US.base .. " Alternate" .. suffix
VA["US-Bus"].link = VA.US.base .. " Business" .. suffix
VA["US-Truck"].link = VA.US.base .. " Truck" .. suffix

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

VA["US-Alt-Bus"] = {
	shield = VA.US.shield,
	name = VA["US-Alt"].name .. " Business",
	link = "U.S. Route %route% Alternate Business ([dab||%dab%, |]Virginia)",
	abbr = "US&nbsp;%route% Alt. Bus.",
	banner = "Business alternate plate.svg",
	width = "expand"
}

VA["US-Old"] = {
	shield = VA.US.shield,
	name = VA.US.name .. " Business",
	link = VA.US.link,
	abbr = VA.US.abbr,
	banner = "Old plate.svg",
	width = "expand"
}

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

VA.SR = {
	shield = {
		default = "Virginia %route%.svg",
		["90000"] = "",
		["90004"] = ""
	},
	shieldmain = {
		default = "Virginia %route%.svg",
		["102"] = {"Virginia %route%.svg", "WV-%route%.svg"},
		["311"] = {"Virginia %route%.svg", "WV-%route%.svg"},
		["90000"] = "",
		["90004"] = ""
	},
	base = "Virginia State Route %route%",
	name = {
		default = "State Route  %route%",
		["102"] = "Virginia State Route %route% and<br>West Virginia Route %route%",
		["311"] = "Virginia State Route %route% and<br>West Virginia Route %route%"
	},
	link = "Virginia State Route %route%[dab|| (%dab%)|]",
	abbr = "SR&nbsp;%route%",
	width = "expand"
	
}

VA.VA = VA.SR

VA.Sec = {
	shield = "Circle sign %route%.svg",
	name = VA.SR.name.default,
	link = {
		ifexists   = true,
		arg   = "county",
		default   = "Virginia State Route %route% (%county% County)",
		otherwise   = VA.SR.link
	},
	abbr = VA.SR.abbr
}

for _,type in ipairs({'SR', 'VA'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Truck", "Toll"}) do
		local spec = VA[" aux "][auxType]
		VA[type .. "-" .. auxType] = {
			shield = VA.SR.shield.default,
			name = VA.SR.name.default .. " " .. spec.name,
			link = VA.SR.base .. " " .. spec.name .. suffix2,
			abbr = VA.SR.abbr .. " " .. spec.abbrsuffix,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = VA.SR.width
		}
	end
end

VA["SR-Toll"].banner = "Toll plate yellow.svg"
VA["VA-Toll"].banner = VA["SR-Toll"].banner

for _,year in ipairs({"1918", "1924"}) do -- add 1956 and 1980 when shields are made
	VA["SR " .. year] = {
		shield = format("Virginia %%route%% (%s).svg", year),
		base = VA.SR.base,
		name = VA.SR.name.default,
		link = VA.SR.link,
		abbr = VA.SR.abbr,
		width = "square",
	}
end

VA["VA 1924"] = VA["SR 1924"]

VA.GWMP = {
	shield = "",
	name = "George Washington Memorial Parkway",
	link = "George Washington Memorial Parkway",
	abbr = "George Washington Parkway"}

VA.BRP = {
	shield = "Blue Ridge Parkway shield.png", 
	name = "Blue Ridge Parkway",
	link = "Blue Ridge Parkway",
	abbr = "Blue Ridge Parkway"
}

VA.Bike = {
	shield = "US Bike %route% (M1-8).svg",
	name = "%route%",
	link = "",
	abbr = "%route%"
}

VA.Byway = {
	shield = "Virginia D6-V1.svg",
	name = "Virginia Byway",
	link = "Virginia Byway",
	abbr = "Virginia Byway"
}
        
VA.KY = {alias = {module = "USA/KY", type = "KY"}}
VA.MD = {alias = {module = "USA/MD", type = "MD"}}
VA["I-MD"] = {alias = {module = "USA/MD", type = "I"}}
VA.NC = {alias = {module = "USA/NC", type = "NC"}}
VA.TN = {alias = {module = "USA/TN", type = "SR"}}
VA["TN-Sec"] = {alias = {module = "USA/TN", type = "Sec"}}
VA.WV = {alias = {module = "USA/WV", type = "WV"}}
VA["US-WV"] = {alias = {module = "USA/WV", type = "US"}}

return VA