:Module:Road data/strings/USA/NJ

--[==[

To inspect the content of this data module, use Special:ExpandTemplates

and enter the following input text:

{{#invoke:Road data/dump|dump|module=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 Jersey

local NJ = require("Module:Road data/strings/USA")

local util = require("Module:Road data/util")

local format = mw.ustring.format

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

local suffix2 = " [dab||(%dab%)|]"

local maint = "NJDOT"

NJ.I.link = {["87"] = "Interstate 87 (New York)",

["276"] = "Interstate 276",

default = {hook = "split",

split = 100,

above = "Interstate %route% (New Jersey)",

below = "Interstate %route% in New Jersey"}}

for k, v in pairs(NJ) do if k:find ("^I") then

v.link = NJ.I.link

end

end

NJ["I-Alt"].banner = "Alt plate blue.svg"

NJ.US.shield = {

["1/9"] = "US 1-9.svg",

["1-9"] = "US 1-9.svg",

default = "US %route%.svg"

}

NJ.US.link = {

["1/9"] = "U.S. Route 1/9",

["1-9"] = "U.S. Route 1/9",

default = "U.S. Route %route% in New Jersey"

}

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do

local spec = NJ[" aux "][auxType]

for k, v in pairs(NJ) do if k:find (auxType) then if k:find ("^US") then

v.shield = NJ.US.shield

v.link = NJ.US.base .. " " .. spec.name .. suffix

end

end

end

end

for k, v in pairs(NJ) do if k:find ("^US %d") then

v.link = NJ.US.link

end

end

for _,year in ipairs({"1926", "1948", "1961"}) do

for _,auxType in ipairs({"Alt", "Bus", "Byp", "City", "Conn", "Emerg", "Opt", "Scenic", "Spur", "Temp", "Toll", "Truck"}) do

local spec = NJ[" aux "][auxType]

NJ["US " .. year .. "-" .. auxType] = {

shield = NJ["US " .. year].shield,

shieldmain = NJ["US " .. year].shieldmain,

base = NJ["US-" .. auxType].base,

name = NJ["US-" .. auxType].name,

link = NJ["US-" .. auxType].link,

abbr = NJ["US-" .. auxType].abbr,

banner = format("%s plate %s.svg", spec.banneralt, year),

width = "square",

}

end

end

NJ.SR = {

shield = {

hook = "between",

lower = 20,

upper = 100,

yes = "Elongated circle %route%.svg",

no = "Ellipse sign %route%.svg"

},

base = "New Jersey Route %route%",

name = "Route %route%",

link = "New Jersey Route %route% [dab||(%dab%)|]",

abbr = "Route %route%",

width = "expand"

}

NJ.NJ = NJ.SR

NJ.Route = NJ.SR

for _,type in ipairs({'SR', 'NJ', 'Route'}) do

for _,auxType in ipairs({"Alt", "Bus", "Byp"}) do

local spec = NJ[" aux "][auxType]

NJ[type .. "-" .. auxType] = {

shield = NJ.SR.shield,

name = NJ.SR.name .. " " .. spec.name,

link = NJ.SR.base .. " " .. spec.name .. suffix2,

abbr = NJ.SR.abbr .. " " .. spec.abbrsuffix,

banner = spec.banneralt .. " plate.svg",

aux = spec.aux,

width = "expand"

}

end

end

NJ["SR 1956"] = {

shield = "NJ %route% (1956).svg",

bannersuffix = "green"

}

NJ["NJ 1956"] = NJ["SR 1956"]

NJ["SR 1926"] = {

shield = "NJ %route% (1926).svg",

bannersuffix = "1926"

}

NJ["NJ 1926"] = NJ["SR 1926"]

NJ["NJ-old"] = NJ["SR 1926"]

NJ["SR-old"] = NJ["SR 1926"]

for k, v in pairs(NJ) do if k:find ("^SR %d") then

v.name = NJ.SR.name

v.link = NJ.SR.link

v.abbr = NJ.SR.abbr

end

end

NJ["SRS 1926"] = {

shield = "NJ S%route% (1926).svg", --workaround because the Route Snn routes throw an error

name = "Route S%route%",

link = "New Jersey Route S%route% [dab||(%dab%)|]",

abbr = "Route S%route%"

}

NJ["NJS 1926"] = NJ["SRS 1926"]

NJ.Byway = {

shield = "",

name = "%route%",

link = "List of New Jersey Scenic Byways#%route%",

abbr = "%route%",

color = "hist"

}

-- add new types above this line if you want it to have the state highway browse and maint

for k, v in pairs(NJ) do if k:find ("^%a") then

v.maint = "NJDOT"

v.browse = "New Jersey State Highway Routes"

v.browselinks = {

[1] = "Interstate",

[2] = "US",

[3] = "State",

[4] = "Scenic Byways"

}

end

end

NJ.NJTP = {

shield = "New Jersey Turnpike Shield.svg",

name = "New Jersey Turnpike",

link = "New Jersey Turnpike",

abbr = "N.J. Turnpike",

bannersuffix = "green",

maint = "NJTA"

}

NJ.NBEX = {

shield = "New Jersey Turnpike Shield.svg",

name = "Newark Bay Extension",

link = "Interstate 78 in New Jersey",

abbr = "Newark Bay Extension",

bannersuffix = "green",

maint = NJ.NJTP.maint

}

NJ.PAEX = {

shield = "New Jersey Turnpike Shield.svg",

name = "Pearl Harbor Extension",

link = "Pearl Harbor Memorial Turnpike Extension",

abbr = "Pearl Harbor Extension",

bannersuffix = "green",

maint = NJ.NJTP.maint

}

NJ.GSP = {

shield = "GSPkwy Shield.svg",

name = "Garden State Parkway",

link = "Garden State Parkway",

abbr = "G.S. Parkway",

bannersuffix = "GSP",

maint = NJ.NJTP.maint

}

NJ.ACE = {

shield = "Atlantic City Expressway.svg",

name = "Atlantic City Expressway",

link = "Atlantic City Expressway",

abbr = "A.C. Expressway",

bannersuffix = "blue",

maint = "SJTA"

}

for _,type in ipairs({"NJTP", "NBEX", "PAEX", "GSP", "ACE"}) do

NJ[type .. "2"] = {

shield = NJ[type].shield,

name = NJ[type].name,

link = NJ[type].link,

abbr = NJ[type].abbr,

bannersuffix = NJ[type].bannersuffix,

banner = "Toll plate yellow.svg",

maint = NJ[type].maint

}

end

NJ.ACBC = {shield = "Atlantic City Expy Connector.svg",

name = "Atlantic City–Brigantine Connector",

link = "Atlantic City–Brigantine Connector",

abbr = "A.C.–Brigantine Connector",

bannersuffix = "blue",

maint = NJ.ACE.maint

}

NJ.PIP = {

shield = "Palisades Interstate Pkwy.svg",

name = "Palisades Interstate Parkway",

link = "Palisades Interstate Parkway",

abbr = "Palisades Parkway",

bannersuffix = "brown",

color = "hist",

maint = "Palisades Interstate Park Commission"

}

NJ.OD = {shield = "Ocean Drive NJ.svg",

name = "Ocean Drive",

link = "Ocean Drive (New Jersey)",

abbr = "Ocean Drive"

}

local countybrowse = {

arg = "county",

default = "County routes in New Jersey",

Atlantic = "County routes in Atlantic County",

Bergen = "County routes in Bergen County",

Burlington = "County routes in Burlington County",

Camden = "County routes in Camden County",

["Cape May"] = "County routes in Cape May County",

Cumberland = "County routes in Cumberland County",

Essex = "County routes in Essex County",

Gloucester = "County routes in Gloucester County",

Hudson = "County routes in Hudson County",

Hunterdon = "County routes in Hunterdon County",

Mercer = "County routes in Mercer County",

Middlesex = "County routes in Middlesex County",

Monmouth = "County routes in Monmouth County",

Morris = "County routes in Morris County",

Ocean = "County routes in Ocean County",

Passaic = "County routes in Passaic County",

Salem = "County routes in Salem County",

Somerset = "County routes in Somerset County",

Sussex = "County routes in Sussex County",

Union = "County routes in Union County",

Warren = "County routes in Warren County",

}

NJ.CR = {

shield = "[county|Bergen|Bergen County %route% NJ.svg|CR %route% jct.svg]",

shieldmain = {

default = "[county||%county% |]County %route%.svg",

arg = "county",

Bergen = "Bergen County %route% NJ.svg"

},

name = "County Route %route%",

link = {

hook = "between",

lower = 500,

upper = 600,

yes = "County Route %route% (New Jersey)",

no = "County Route %route% (%county% County, New Jersey)"

},

abbr = "CR %route%",

maint = "none",

browse = countybrowse,

browselinks = {

[1] = "System",

[2] = "500-series routes"

}

}

for _,type in ipairs({'CR'}) do

for _,auxType in ipairs({"Alt", "Byp", "Spur", "Truck"}) do

local spec = NJ[" aux "][auxType]

NJ["CR-" .. auxType] = {

shield = NJ.CR.shield,

shieldmain = NJ.CR.shieldmain,

name = NJ.CR.name .. " " .. spec.name,

link = NJ.CR.name .. " " .. spec.name .. " ([county||%county% County, |]New Jersey)",

abbr = NJ.CR.abbr .. " " .. spec.abbrsuffix,

banner = spec.banneralt .. " plate county.svg",

aux = spec.aux,

width = "square",

bannersuffix = "county",

browse = NJ.CR.browse,

browselinks = NJ.CR.browselinks,

}

end

end

NJ.PA = {alias = {module = "USA/PA", type = "PA"}}

NJ.NY = {alias = {module = "USA/NY", type = "NY"}}

return NJ