Module:Road data/strings/USA/OR: Difference between revisions

Content deleted Content added
update module
rm
 
(3 intermediate revisions by the same user not shown)
Line 17:
local util = require("Module:Road data/util")
util.addAll(OR, require("Module:Road data/strings/USA"))
local format = mw.ustring.format
 
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",
Line 46 ⟶ 31:
}
}
 
for k, v in pairs(OR) do if k:find ("^I") then
OR["I 1957"].link = OR.I.link
OR["I 1961"] v.link = OR.I.link
end
end
OR["I 1961"].shield = {
["80N"] = "I-%route% (1957).svg",
Line 60 ⟶ 47:
 
OR.BL.link = "Interstate %route% Business ([dab||%dab%, |]Oregon)"
 
for k, v in pairs(OR) do if k:find ("^BL") then
OR.US.maint = maint
v.link = OR.BL.link
end
end
 
OR.US.name = "U.S. Highway %route%"
OR.US.link = {
Line 73 ⟶ 64:
}
 
for k, v in pairs(OR) do if k:find ("^US %d") then
OR["US 1926"].shieldmain = "US %route% Oregon 1926.svg"
OR["US 1926"] v.name = OR.US.name
OR["US 1926"] v.link = OR.US.link
end
OR["US 1948"].shieldmain = "US %route% Oregon 1948.svg"
end
OR["US 1948"].name = OR.US.name
OR["US 1948"].link = OR.US.link
OR["US 1961"].name = OR.US.name
OR["US 1961"].link = OR.US.link
 
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
OR["US-Alt"].name = OR.US.name .. " Alternate"
local spec = OR[" aux "][auxType]
OR["US-Alt"].link = OR.US.base .. " Alternate" .. suffix
for k, v in pairs(OR) do if k:find (auxType) then if k:find ("^US") then
OR["US-Bus"].name = OR.US.name .. " Business"
OR["US-Bus"] v.linkname = OR.US.basename .. " Business" .. suffixspec.name
OR["US-Byp"] v.namelink = OR.US.base .. " " .. spec.name .. " Bypass([dab||%dab%, |]Oregon)"
end
OR["US-Byp"].link = OR.US.base .. " Bypass" .. suffix
end
OR["US-Spur"].name = OR.US.name .. " Spur"
end
OR["US-Spur"].link = OR.US.base .. " Spur" .. suffix
end
 
OR["US 1961-Alt"] = {
Line 96 ⟶ 85:
link = OR["US-Alt"].link,
abbr = OR["US-Alt"].abbr,
banner = "Alternate plate.svg",
aux = OR[" aux "].Alt
}
 
Line 113 ⟶ 103:
abbr = OR.OR.abbr .. " Bus.",
banner = "Business plate.svg",
width = "expand",
aux = OR[" aux "].Bus
}
Line 122 ⟶ 113:
abbr = OR.OR.abbr .. " Spur",
banner = "Spur plate.svg",
width = "expand",
aux = OR[" aux "].Spur
}
OR["OR 1932"] = {
shield = "OR %route% 1932.svg",
name = OR.OR.name,
link = OR.OR.link,
abbr = OR.OR.abbr
}
 
for _,type in ipairs({"OR"}) do
OR["OR 1948"] = {
for _,year in ipairs({"1932", "1948"}) do
shield = "OR %route% 1948.svg",
OR["OR " .. year] = {
name = OR.OR.name,
shield = format("OR %%route%% %s.svg", year),
link = OR.OR.link,
abbr name = OR.OR.abbrname,
link = OR.OR.link,
}
abbr = OR.OR.abbr,
width = "square"
}
end
end
 
OR.FH.link = ""
 
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 highwayNames = {
Line 221 ⟶ 206:
}
}
 
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(OR) do if k:find ("^%a") then
v.maint = "[[Oregon Department of Transportation|ODOT]]"
v.browse = "[[State highways in Oregon|Oregon Highways]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Oregon|Interstate]]",
[2] = "[[List of U.S. Highways in Oregon|US]]",
[3] = "[[List of numbered state routes in Oregon|State]]",
[4] = "[[List of named state highways in Oregon|Named]]",
[5] = "[[Oregon State Scenic Byways|Scenic]]"
}
end
end
 
for k, v in pairs(OR) do if k:find ("^%a+ %d") then
v.maint = "[[Oregon State Highway Department]]"
end
end
 
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"}}
 
return OR