Module:Road data/strings/USA/OK

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

-- Oklahoma
local OK = {}

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

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

OK.I.shield = {hook = "splitlen",
                        	split = 3,
                        	above = "I-%route% (long).svg",
                        	below = "I-%route%.svg"}
OK.I.link	= {	["244"] = "Interstate 244",
				["440"] = "Interstate 44 in Oklahoma#Interstate 440",
				["444"] = "Interstate 444",
				default = {hook = "splitlen",
                           split = 3,
                           above = "Interstate %route% (Oklahoma)",
                           below = "Interstate %route% in Oklahoma"}}

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

OK.BL.link = "Interstate %route% Business" .. suffix
OK["I-Bus"] = OK.BL

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

OK.US.name = "U.S. Highway %route%"
OK.US.link = "U.S. Route %route% in Oklahoma"

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

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



for _,year in ipairs({'1926', '1948', '1961'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
		local type = "US " .. year
		local spec = OK[" aux "][auxType]
		OK[type .. "-" .. auxType] = {
			shield = OK[type].shield,
			shieldmain = OK[type].shieldmain,
			name = OK[type].name .. " " .. spec.name,
			link = OK[type].base .. " " .. spec.name .. suffix,
			abbr = OK[type].abbr .. " " .. spec.abbrsuffix,
			banner = spec.bannerprefix .. " plate " .. year .. ".svg",
			aux = spec.aux,
			width = "square"
		}
	end
end

OK.SH = {
	base = "Oklahoma State Highway %route%",
	shield = "Oklahoma State Highway %route%.svg",
	name = "State Highway %route%",
	link = "Oklahoma State Highway %route% [dab||(%dab%)|]",
	abbr = "SH-%route%",
	width = "expand"
}
OK.OK = OK.SH

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

OK["SH-Spur"].shield = {
	["7"] = 'Oklahoma State Highway 7 Spur.svg',
	default = OK.SH.shield
}
OK["SH-Spur"].banner = {
	["7"] = '',
	default = "Spur plate.svg"
}
OK["SH-Toll"].banner = "Toll plate yellow.svg"

for _,year in ipairs({"1924", "1948", "1961"}) do
	OK["SH " .. year] = {
		shield = format("Oklahoma %%route%% %s.svg", year),
		name = OK.SH.name,
		link = OK.SH.link,
		abbr = OK.SH.abbr,
		width = "square",
	}
end

OK["SH 1961"].shield = {
	hook = "splitlen",
	split = 3,
	above = "Elongated circle %route%.svg",
	below = "Circle sign %route%.svg"
	
}

OK["SH-old"] = OK["SH 1961"]
OK["OK-old"] = OK["SH 1961"]

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(OK) do if k:find ("^%a") then
	v.maint = "[[Oklahoma Department of Transportation|ODOT]]"
	end
end

OK.Turnpike = {
	shield = {
		Cherokee = {"%route% Turnpike.svg"},
		Chickasaw = {"%route% Turnpike.svg", "Oklahoma State Highway 301.svg"},
		Cimarron = {"%route% Turnpike.svg"},
		Creek = {"%route% Turnpike.svg", "Oklahoma State Highway 364.svg"},
		["Eastern Oklahoma County"] = "", -- for the time being
		["H.E. Bailey"] = {"%route% Turnpike.svg"},
		["Indian Nation"] = {"%route% Turnpike.svg", "Oklahoma State Highway 375.svg"},
		Kickapoo = {"%route% Turnpike.svg"},
		Kilpatrick = {"%route% Turnpike.svg"},
		Muskogee = {"%route% Turnpike.svg", "Oklahoma State Highway 351.svg"},
		Turner = {"%route% Turnpike.svg"},
		["Will Rogers"] = {"%route% Turnpike.svg"},
		default = "%route% Turnpike.svg"
	},
	shieldmain = {
		Cherokee = {"%route% Turnpike.svg", "US 412.svg"},
		Chickasaw = {"%route% Turnpike.svg", "Oklahoma State Highway 301.svg"},
		Cimarron = {"%route% Turnpike.svg", "US 412.svg"},
		Creek = {"%route% Turnpike.svg", "Oklahoma State Highway 364.svg"},
		["Eastern Oklahoma County"] = "", -- for the time being
		["H.E. Bailey"] = {"%route% Turnpike.svg", "I-44 (OK).svg"},
		["Indian Nation"] = {"%route% Turnpike.svg", "Oklahoma State Highway 375.svg"},
		Kickapoo = {"%route% Turnpike.svg", "I-335 (OK).svg"},
		Kilpatrick = {"%route% Turnpike.svg", "I-344 (OK).svg"},
		Muskogee = {"%route% Turnpike.svg", "Oklahoma State Highway 351.svg"},
		Turner = {"%route% Turnpike.svg", "I-44 (OK).svg"},
		["Will Rogers"] = {"%route% Turnpike.svg", "I-44 (OK).svg"},
		default = "%route% Turnpike.svg"
	},
	name = "%route% Turnpike",
	link = "%route% Turnpike",
	abbr = "%route% Turnpike",
	maint = "[[Oklahoma Turnpike Authority]]"
}

OK.AR = {alias = {module = "USA/AR", type = "Hwy"}}
OK.TX = {alias = {module = "USA/TX", type = "TX"}}
OK.NM = {alias = {module = "USA/NM", type = "NM"}}
OK.CO = {alias = {module = "USA/CO", type = "SH"}}
OK.KS = {alias = {module = "USA/KS", type = "K"}}
OK.MO = {alias = {module = "USA/MO", type = "Route"}}

return OK

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.