--[==[
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"]`.
]==]
-- Pennsylvania
local PA = {}
local format = mw.ustring.format
local util = require("Module:Road data/util")
util.addAll(PA, require("Module:Road data/strings/USA"))
local convert_num = require('Module:Numeral converter').convert
local suffix = " ([dab||%dab%, |]پنسیلوانیا)"
local maint = "[[Pennsylvania Department of Transportation|پندات]]"
PA.I.link = "بزرگراه میانایالتی %route% (پنسیلوانیا)"
for k, v in pairs(PA) do if mw.ustring.find (k, "^I") then
v.link = PA.I.link
end
end
PA.BL.link = "بزرگراه میانایالتی تجاری %route% ([dab||%dab%, |]پنسیلوانیا)"
for k, v in pairs(PA) do if mw.ustring.find (k, "^BL") then
v.link = PA.BL.link
end
end
PA.US.link = "جاده %route% ایالات متحده در پنسیلوانیا"
for k, v in pairs(PA) do if mw.ustring.find (k, "^US %d") then
v.name = PA.US.name
v.link = PA.US.link
end
end
for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do
local spec = PA[" aux "][auxType]
for k, v in pairs(PA) do if mw.ustring.find (k, auxType) then if mw.ustring.find (k, "^US") then
v.name = PA.US.name .. " " .. spec.name
v.link = PA.US.base .. " " .. spec.name .. " ([dab||%dab%, |]پنسیلوانیا)"
end
end
end
end
PA["US 1961"].shield = "US %route% (1961 cutout).svg"
PA["US-Truck-Alt"] = {
shield = PA.US.shield,
name = PA["US-Alt"].name .. " ترابری",
link = "جاده %route% ایالات متحده جایگزین ترابری ([dab||%dab%, |]پنسیلوانیا)",
abbr = "ا.م. %route% ج. ترابری",
banner = "Alternate truck plate.svg",
width = "expand",
aux = PA[" aux "].Truck
}
PA["US-Alt-Truck"] = PA["US-Truck-Alt"]
PA["US-Bus-Alt-Truck"] = {
shield = PA.US.shield,
name = PA["US-Bus"].name .. " جایگزین ترابری",
link = "جاده %route% ایالات متحده تجاری جایگزین ترابری ([dab||%dab%, |]پنسیلوانیا)",
abbr = "ا.م. %route% ت. ج. ترابری",
banner = "Business-alternate-truck plate.svg",
width = "expand",
aux = PA[" aux "].Truck
}
PA["US-Bus-Truck-Alt"] = PA["US-Bus-Alt-Truck"]
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 = PA[" aux "][auxType]
PA[type .. "-" .. auxType] = {
shield = PA[type].shield,
shieldmain = PA[type].shieldmain,
name = PA[type].name .. " " .. spec.name,
link = PA[type].base .. " " .. spec.name .. suffix,
abbr = PA[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate " .. year .. ".svg",
bannersuffix = year,
aux = spec.aux,
width = PA[type].width
}
end
end
PA.SR = {
base = "جاده %route% پنسیلوانیا",
shield = "PA-%route%.svg",
shieldmain = {
["179"] = {"PA-%route%.svg", "Ellipse sign %route%.svg"},
["491"] = {"PA-%route%.svg", "Ellipse sign %route%.svg"},
default = "PA-%route%.svg"
},
name = {
["179"] = "جاده %route%",
["491"] = "جاده %route%",
default = "جاده %route% پنسیلوانیا"
},
link = "جاده %route% پنسیلوانیا [dab||(%dab%)|]",
abbr = "PA %route%",
width = "expand"
}
PA.PA = PA.SR
for _,type in ipairs({"SR", "PA"}) do
for _,year in ipairs({"1926", "1948", "1960", "1962"}) do
PA[type .. " " .. year] = {
shield = format("PA-%%route%% (%s).svg", year),
name = PA.SR.name.default,
link = PA.SR.link,
abbr = PA.SR.abbr,
width = "square",
bannersuffix = year
}
end
end
for _,type in ipairs({'SR', 'PA'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local spec = PA[" aux "][auxType]
PA[type .. "-" .. auxType] = {
shield = PA[type].shield,
name = "جاده %route% پنسیلوانیا " .. spec.name,
link = "جاده %route% پنسیلوانیا " .. spec.name .. PA[" dab "],
abbr = PA[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate.svg",
aux = spec.aux,
width = "expand",
}
end
end
for _,type in ipairs({'SR', 'PA'}) do
for _,year in ipairs({'1926', '1948'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local type = type .. " " .. year
local spec = PA[" aux "][auxType]
PA[type .. "-" .. auxType] = {
shield = PA[type].shield,
name = "جاده %route% پنسیلوانیا " .. spec.name,
link = "جاده %route% پنسیلوانیا " .. spec.name .. PA[" dab "],
abbr = PA[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate " .. year .. ".svg",
bannersuffix = year,
aux = spec.aux,
width = "square",
}
end
end
end
for _,type in ipairs({'SR', 'PA'}) do
for _,year in ipairs({'1960'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local type = type .. " " .. year
local spec = PA[" aux "][auxType]
PA[type .. "-" .. auxType] = {
shield = PA[type].shield,
name = "جاده %route% پنسیلوانیا " .. spec.name,
link = "جاده %route% پنسیلوانیا " .. spec.name .. PA[" dab "],
abbr = PA[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate 1948.svg",
bannersuffix = "1948",
aux = spec.aux,
width = "expand",
}
end
end
end
for _,type in ipairs({'SR', 'PA'}) do
for _,year in ipairs({'1962'}) do
for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
local type = type .. " " .. year
local spec = PA[" aux "][auxType]
PA[type .. "-" .. auxType] = {
shield = PA[type].shield,
name = "جاده %route% پنسیلوانیا " .. spec.name,
link = "جاده %route% پنسیلوانیا " .. spec.name .. PA[" dab "],
abbr = PA[type].abbr .. " " .. spec.abbrsuffix,
banner = spec.bannerprefix .. " plate 1961.svg",
bannersuffix = "1961",
aux = spec.aux,
width = "expand",
}
end
end
end
PA["SR-Truck-Alt"] = {
shield = "PA-%route%.svg",
name = "PA Route %route% Alternate Truck",
link = "جاده %route% پنسیلوانیا جایگزین ترابری [dab||(%dab%)|]",
abbr = "PA %route% ج. ترابری",
banner = "Alternate truck plate.svg",
width = "expand",
aux = PA[" aux "].Truck
}
PA["PA-Truck-Alt"] = PA["SR-Truck-Alt"]
PA["SR-Alt-Truck"] = PA["SR-Truck-Alt"]
PA["PA-Alt-Truck"] = PA["SR-Truck-Alt"]
PA.SBR = {
shield = "PA Bike Route %route%.svg",
name = "BicyclePA Route %route%",
link = "BicyclePA Route %route%",
abbr = "BicyclePA Route %route%",
orientation = "upright"
}
PA.QR = {
shield = "",
name = "مسیر ایالتی %route%",
link = "",
abbr = "SR %route%"
}
-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(PA) do if mw.ustring.find (k, "^%a") then
v.maint = "[[Pennsylvania Department of Transportation|پندات]]"
v.browse = "[[سامانه مسیرهای ایالتی پنسیلوانیا]]"
v.browselinks = {
[1] = "[[List of Interstate Highways in Pennsylvania|میانایالتی]]",
[2] = "[[List of U.S. Routes in Pennsylvania|ایالات متحده]]",
[3] = "[[List of state routes in Pennsylvania|ایالتی]]",
[4] = "[[Pennsylvania Scenic Byways|توریستی]]",
[5] = "[[List of Legislative Routes in Pennsylvania|قانونی]]"
}
end
end
for k, v in pairs(PA) do if mw.ustring.find (k, "^%a+ %d") then
v.maint = "[[Pennsylvania Department of Highways|حوزه بزرگراههای پنسیلوانیا]]"
end
end
PA.PATP = {
shield = "Pennsylvania Turnpike logo.svg",
name = "Pennsylvania Turnpike",
link = "Pennsylvania Turnpike",
abbr = "Penna Turnpike",
bannersuffix = "green",
maint = [[Pennsylvania Turnpike Commission]]
}
PA.Turnpike = PA.PATP
PA.PANE = {
shield = "Pennsylvania Turnpike logo.svg",
name = "Pennsylvania Turnpike Northeast Extension",
link = "Pennsylvania Turnpike Northeast Extension",
abbr = "Penna Turnpike NE Extension",
bannersuffix = "green",
maint = PA.PATP.maint
}
PA.Toll = {
shield = "Turnpike-%route%.svg",
name = PA.SR.name.default,
link = PA.SR.link,
abbr = "PA Turnpike %route%",
width = "expand",
bannersuffix = "green"
}
PA["Toll2"] = {
shield = "Turnpike-%route%.svg",
link = PA.Toll.link,
abbr = PA.Toll.abbr,
width = PA.Toll.width,
banner = "Toll plate yellow.svg",
bannersuffix = "green"
}
PA["PA-Toll"] = {
shield = "PA-Toll-%route%.svg",
name = PA.SR.name.default .. " Toll",
link = PA.SR.link,
abbr = PA.SR.abbr .. " Toll",
width = "expand",
}
PA.Belt = {
shield = "Pittsburgh PA %route% Belt shield.svg",
name = "کمربندی %route%",
link = "کمربندی %route% (پیتسبرگ)",
abbr = "کمربندی %route%"
}
PA.DE = {alias = {module = "USA/DE", type = "DE"}}
PA.MD = {alias = {module = "USA/MD", type = "MD"}}
PA.NJ = {alias = {module = "USA/NJ", type = "NJ"}}
PA.NJTP = {alias = {module = "USA/NJ", type = "NJTP"}}
PA["I-NJ"] = {alias = {module = "USA/NJ", type = "I"}}
return PA