Module:Road data/strings/USA/NH

This module is used to store type data for use with several road templates, including {{jct}} and {{routelist row}}. Ba

Module:Road data/strings/USA/NH

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

-- New Hampshire
local NH = {}

local util = require("Module:Road data/util")
util.addAll(NH, require("Module:Road data/strings/USA"))

local format = mw.ustring.format

--[[ REGION-SPECIFIC SETTINGS ]]--
local state = "New Hampshire"
NH[" common "].state = state
NH[" common "].region = state

--[[ ROUTE TYPES ]]--
local suffix = format(" ([dab||%%dab%%, |]%s)", state)

NH.I.shieldmain = {
	["95"] = {NH.I.shield, "Blue Star Turnpike.svg"},
	default = NH.I.shield
}
NH.I.link = NH.I.base .. " in New Hampshire"
NH.I.orientation = {
	arg = "route",
	["95"] = "upright"
}

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

NH.BL.link = NH.I.base .. " Business" .. suffix
for k, v in pairs(NH) do if k:find ("^B%a") then 
	v.link = NH.BL.link
	end
end

NH.US.shield = "US %route% square.svg"
NH.US.link = NH.US.base .. " in New Hampshire"
NH.US.width = "square"

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

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

NH.NH = {
	shield = "NH Route %route%.svg",
	shieldmain = {
		["10A"] = {"NH Route %route%.svg", "Vermont %route%.svg"},
		["25A"] = {"NH Route %route%.svg", "Vermont %route%.svg"},
		["26"] = {"NH Route %route%.svg", "Vermont %route%.svg"},
		["108"] = {"NH Route %route%.svg", "MA Route %route%.svg"},
		["119"] = {"NH Route %route%.svg", "Vermont %route%.svg"},
		["123"] = {"NH Route %route%.svg", "Vermont %route%.svg"},
		default = "NH Route %route%.svg"
	},
	name = {
		["10A"] = "Route %route%",
		["25A"] = "Route %route%",
		["26"] = "Route %route%",
		["108"] = "Route %route%",
		["119"] = "Route %route%",
		["123"] = "Route %route%",
		default = "New Hampshire Route %route%"
	},
	link = "New Hampshire Route %route%",
	abbr = "NH&nbsp;%route%"
}

NH["NH-Byp"] = {
	shield = "NH Route %route% Bypass.svg",
	name = NH.NH.name.default .. " Bypass",
	link = NH.NH.link .. " Bypass",
	abbr = NH.NH.abbr .. " Byp."
}

NH["NH 1948"] = {
	shield = {
		hook = "splitlen",
		split = 3,
		above = "MA Route %route% square.svg",
		below = "MA Route %route%.svg"
	},
	name = NH.NH.name.default,
	link = NH.NH.link,
	abbr = NH.NH.abbr
}

NH["NH 1983"] = {
	shield = "NH Route %route% 1983.svg",
	name = NH.NH.name.default,
	link = NH.NH.link,
	abbr = NH.NH.abbr
}

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(NH) do if k:find ("^%a") then
	v.maint = "[[New Hampshire Department of Transportation|NHDOT]]"
	v.browse = "[[New Hampshire Highway System]]"
	v.browselinks = {
		[1] = "[[List of Interstate Highways in New Hampshire|Interstate]]",
		[2] = "[[List of U.S. Routes in New Hampshire|US]]",
		[3] = "[[List of state routes in New Hampshire|State]]",
		[4] = "[[List of turnpikes in New Hampshire|Turnpikes]]"
	}
	end
end

NH.Turnpike = {
	shield = "%route% Turnpike.svg",
	name = "%route% Turnpike",
	link = "%route% Turnpike",
	abbr = "%route% Turnpike",
	orientation = "upright",
	bannersuffix = {
		Spaulding = "South Carolina",
		default = "Vermont"
	},
	maint = "[[New Hampshire Department of Transportation|NHDOT Bureau of Turnpikes]]",
}

NH.MA = {alias = {module = "USA/MA", type = "SR"}}
NH.VT = {alias = {module = "USA/VT", type = "VT"}}
NH["I-VT"] = {alias = {module = "USA/VT", type = "I"}}
NH["US-VT"] = {alias = {module = "USA/VT", type = "US"}}

return NH

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.