Module:Road data/strings/USA/WV

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

-- West Virginia
local WV = {}

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

local suffix = " ([dab||%dab%, |]West Virginia)"
local maint = "[[West Virginia Division of Highways|WVDOH]]"

WV.I.maint = maint
WV.I.link = {
	["68"]	= "Interstate 68",
	["79"]	= "Interstate 79",
	["470"]	= "Interstate 470 (Ohio–West Virginia)",
	default = "Interstate %route% in West Virginia"
}

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

WV.US.link = {
	["35"] = "U.S. Route 35",
	["48"] = "U.S. Route 48",
	["119"] = "U.S. Route 119",
	["121"] = "U.S. Route 121",
	["340"] = "U.S. Route 340",
	["460"] = "U.S. Route 460",
	["522"] = "U.S. Route 522",
	default = "U.S. Route %route% in West Virginia"
}

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

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

WV.WV = {
	base = "West Virginia Route %route%",
	shield = "WV-%route%.svg",
	name = "West Virginia Route %route%",
    link = "West Virginia Route %route%" .. WV[" dab "],
    abbr = "WV&nbsp;%route%",
    width = "expand"
}

for _,type in ipairs({"WV"}) do
	for _,year in ipairs({"1922", "1948"}) do
		WV["WV " .. year] = {
			shield = format("WV-%%route%% (%s).svg", year),
			name = WV.WV.name,
			link = WV.WV.link,
			abbr = WV.WV.abbr,
			width = "square"
		}
	end
end

for _,type in ipairs({'WV'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Spur", "Truck"}) do
		local spec = WV[" aux "][auxType]
		WV[type .. "-" .. auxType] = {
			shield = WV.WV.shield,
			name = WV.WV.name .. " " .. spec.name,
			link = WV.WV.base .. " " .. spec.name .. "[dab|| (%dab%)|]",
			abbr = WV.WV.abbr .. " " .. spec.abbrsuffix,
			banner = spec.banneralt .. " plate.svg",
			aux = spec.aux,
			width = WV.WV.width
		}
	end
end
         
WV["WV-Alt"] = {
	shield = WV.WV.shield,
	name = WV.WV.name .. " Alternate",
	link = "West Virginia Route %route% Alternate [dab||(%dab%)|]",
	abbr = "WV&nbsp;%route% Alt.",
	banner = "Alt plate.svg",
	width = "expand"
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(WV) do if k:find ("^%a") then
	v.maint = "[[West Virginia Division of Highways|WVDOH]]"
	v.browse = "[[West Virginia State Highway System]]"
	v.browselinks = {
		[1] = "[[List of Interstate Highways in West Virginia|Interstate]]",
		[2] = "[[List of U.S. Highways in West Virginia|US]]",
		[3] = "[[List of state routes in West Virginia|State]]"
	}
	end
end

WV.WVTP = {
	shield = "",
	name = "West Virginia Turnpike",
	link = "West Virginia Turnpike",
	abbr = "West Virginia Turnpike",
	maint = "[[West Virginia Parkways Authority]]"
}

local CRFraction = '<span class="nowrap" style="display:inline-block; vertical-align:-0.5em; font-size:85%; text-align:center;"><span style="display:block; line-height:1em; padding:0 0.1em;">%route%</span><span style="display:block; line-height:1em; padding:0 0.1em; border-top:1px solid;">%denom%</span></span>'

WV.CR = {
	shield = {["507"] = "Ellipse sign 507.svg",
	["707"] = "Ellipse sign 707.svg",
	["857"] = "Ellipse sign 857.svg",
	default = "Circle sign %route%[denom||-%denom%|].svg"
	},
	link = {
		ifexists = true,
		default = "County Route %route% (%county% County, West Virginia)"
	},
	abbr = "CR&nbsp;[denom||" .. CRFraction .. "|%route%]",
	maint = "",
	browse = "[[List of county routes in West Virginia|County Routes in West Virginia]]",
	browselinks = ""
}

WV.FR.link = ""

WV.OH = {alias = {module = "USA/OH", type = "SR"}}
WV["US-VA"] = {alias = {module = "USA/VA", type = "US"}}

return WV

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.