Jump to content

Module:Road data/strings/USA/OR

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fredddie (talk | contribs) at 18:47, 21 September 2020 (tweak). 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"]`.
]==]

-- Oregon
local OR = {}

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

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

OR[" common "] = {
	browse = {
		{link = "State highways in Oregon", name = "Oregon Highways", bold = true},
		{
			noprint = true,
			{link = "List of Interstate Highways in Oregon", name = "Interstate"},
			{link = "List of U.S. Highways in Oregon", name = "U.S."},
			{link = "List of highway route numbers in Oregon", name = "State"},
			{link = "List of named state highways in Oregon", name = "Named"},
			{link = "Oregon State Scenic Byways", name = "Scenic"}
		}
	}
}

OR.I.maint = maint
OR.I.link = {["82"] = "Interstate 82",
             ["205"] = "Interstate 205 (Oregon–Washington)",
             default = {hook = "splitlen",
                        split = 3,
                        above = "Interstate %route% (Oregon)",
                        below = "Interstate %route% in Oregon"}}
                           
OR["I 1957"].link = OR.I.link
OR["I 1961"].link = OR.I.link           
OR["I 1961"].shield = {	["80N"] = "I-%route% (1957).svg",
						default = {	hook = "splitlen",
									split = 3,
									above = "I-%route% (1961).svg",
									below = "I-%route% (1957).svg"}}

OR.BL.link = "Interstate %route% Business ([dab||%dab%, |]Oregon)"
						
OR.US.maint = maint
OR.US.name = "U.S. Highway %route%"
OR.US.link = {["28"] = "U.S. Route 28",
			  ["126"] = "U.S. Route 126",
			  ["197"] = "U.S. Route 197",
			  ["199"] = "U.S. Route 199",
			  ["630"] = "U.S. Route 630",
        	  ["730"] = "U.S. Route 730",
              default = "U.S. Route %route% in Oregon"}

OR["US-Alt"].link = OR.US.base .. " Alternate" .. suffix
OR["US-Bus"].link = OR.US.base .. " Business" .. suffix
OR["US-Byp"].link = OR.US.base .. " Bypass" .. suffix
OR["US-Spur"].link = OR.US.base .. " Spur" .. suffix

for _,year in ipairs({"1926", "1948", "1961"}) do
	local oldUSmain = "US " .. year
	OR[oldUSmain].name = OR.US.name
	OR[oldUSmain].link = OR.US.link
end


OR["US 1961-Alt"] = {shield = OR["US 1961"].shield,
	                 link = OR["US-Alt"].link,
	                 abbr = OR["US-Alt"].abbr,
                     banner = "Alternate plate.svg"}

OR.OR = {shield = "OR %route%.svg",
         link = "Oregon Route %route% [dab||(%dab%)|]",
         abbr = "OR&nbsp;%route%",
         width = "expand"}

OR["OR-Bus"] = {shield = OR.OR.shield,
                link = "Oregon Route %route% Business [dab||(%dab%)|]",
                abbr = OR.OR.abbr .. " Bus.",
                banner = "Business plate.svg",
                width = "expand"}
                
OR["OR-Spur"] = {shield = OR.OR.shield,
                link = "Oregon Route %route% Spur [dab||(%dab%)|]",
                abbr = OR.OR.abbr .. " Spur",
                banner = "Spur plate.svg",
                width = "expand"}
                
OR["OR 1932"] = {shield = "OR %route% 1932.svg",
         link = OR.OR.link,
         abbr = OR.OR.abbr}

OR["OR 1948"] = {shield = "OR %route% 1948.svg",
         link = OR.OR.link,
         abbr = OR.OR.abbr}
         
OR.FH = {shield = "Forest Route %route%.svg",
	     link = "",
	     abbr = "FH&nbsp;%route%"}

OR.CA = {alias = {module = "USA/CA", type = "SR"}}
OR.WA = {alias = {module = "USA/WA", type = "WA"}}
OR.ID = {alias = {module = "USA/ID", type = "SH"}}
OR.NV = {alias = {module = "USA/NV", type = "NV"}}

local roadway = " Highway"

--[==[ {}
	if route == "61" or "64" or "75" then
		return nil
	elseif route >= "481" then
		return " Spur"
	else
		return " Highway"
end

]==]

local number = " No. %route%"
--[==[ {}
	if route == "81" or "138" then
		return " East No. %route%"
	elseif route == "68" then
		return " North No. %route%"
	elseif route == "91" then
		return " West No. %route%"
	elseif route == "160" then
		return " South No. %route%"
	else
		return " No. %route%"
end
]==]

OR.Hwy = {	shield = "",
			link = {hook = "mask",
                  	mask = "Road data/masks/USA/OR",
                  	base = "route",
                  	masked = "names",
                  	default = "%names%" .. roadway .. {["81"] = " East No. %route%",
                  										["138"] = " East No. %route%",
                  										["68"] = " North No. %route%",
                  										["91"] = " West No. %route%",
                  										["160"] = " South No. %route%",
                  										default = "No. %route%"}},
			abbr = {hook = "mask",
                  	mask = "Road data/masks/USA/OR/Names",
                  	base = "route",
                  	masked = "names",
                  	default = "%names%" .. roadway .. {	["81"] = " East No. %route%",
                  										["138"] = " East No. %route%",
                  										["68"] = " North No. %route%",
                  										["91"] = " West No. %route%",
                  										["160"] = " South No. %route%",
                  										default = "No. %route%"} .. number }
			}

return OR