Module:Road data/strings/USA/AR

--[==[

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

]==]

-- Arkansas

local AR = {}

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

util.addAll(AR, require("Module:Road data/strings/USA"))

local format = mw.ustring.format

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

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

AR.I.link = { ["30"] = "Interstate 30",

["57"] = "Interstate 57#Future",

["130"] = "Loop (Texarkana)",

["440"] = "Interstate 440 (Arkansas)",

["540"] = "Interstate 540 (Arkansas)",

default = {hook = "splitlen",

split = 3,

above = "Interstate %route%",

below = "Interstate %route% in Arkansas"}}

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

v.link = AR.I.link

end

end

AR.US.name = "U.S. Highway %route%"

AR.US.shield = "US %route% (AR).svg"

AR.US.link = "U.S. Route %route% [dab||(%dab%, Arkansas)|in Arkansas]"

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

v.name = AR.US.name

v.link = AR.US.link

v.abbr = AR.US.abbr

end

end

for _,auxType in ipairs({"Alt", "Bus", "City", "Conn", "Spur"}) do

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

local abbrev = spec.arksuffix or " " .. spec.abbrsuffix

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

v.shield = "US %route%" .. spec.arksuffix .. ".svg"

v.name = AR.US.name .. abbrev

v.link = AR.US.base .. abbrev .. suffix

v.abbr = AR.US.abbr .. abbrev

v.banner = nil

v.width = "wide"

end

end

end

end

for _,auxType in ipairs({"Byp", "Opt", "Scenic", "Temp", "Truck"}) do

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

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

v.shield = AR.US.shield

v.link = AR.US.base .. spec.abbrsuffix .. suffix

v.width = "expand"

end

end

end

end

AR["US-Hist"].name = "Historic " .. AR.US.name

AR.AR = {

base = "Arkansas Highway %route%",

name = "Highway %route%",

shield = {

default = "Arkansas %route%.svg",

["917"] = "Arkansas 917-1.svg",

["980"] = "Arkansas 980(Airport).svg"

},

link = "Arkansas Highway %route%" .. suffix2,

abbr = "AR %route%",

width = "expand",

bannersuffix = {

default = "",

["917"] = "brown",

["980"] = "blue"

}

}

AR.Hwy = AR.AR

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

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

AR[type .. " " .. year] = {

shield = format("Arkansas %%route%% %s.svg", year),

name = "State Road %route%",

link = AR.AR.link,

abbr = AR.AR.abbr,

width = "square"

}

end

end

AR["AR 1970"].shield = {

hook = "splitlen",

split = 3,

above = {

default = "Arkansas %route% 1970.svg",

["917"] = "Arkansas 917-1.svg",

["980"] = "Arkansas 980(Airport).svg"

},

below = AR.AR.shield

}

AR["AR 1970"].name = AR.AR.name

AR["Hwy 1970"] = AR["AR 1970"]

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

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

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

local abbrev = spec.arksuffix or " " .. spec.abbrsuffix

local shieldabbr = spec.arksuffix or ""

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

shield = "Arkansas %route%" .. shieldabbr .. ".svg",

name = AR.AR.name .. abbrev,

link = AR.AR.base .. abbrev .. suffix2,

abbr = AR.AR.abbr .. abbrev,

aux = spec.aux,

width = {

hook = "splitlen",

split = 2,

above = "wide",

below = "square"

}

}

end

end

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

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

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

local abbrev = spec.arksuffix or " " .. spec.abbrsuffix

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

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

shield = AR.AR.shield,

name = AR.AR.name .. abbrev,

link = AR.AR.base .. spec.abbrsuffix .. suffix,

abbr = AR.AR.abbr .. abbrev,

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

aux = spec.aux,

width = "expand"

}

end

end

end

end

end

AR["Hwy-Truck-Spur"] = {

shield = AR["AR-Spur"].shield,

name = AR["AR-Spur"].name,

link = AR["AR-Spur"].link,

abbr = AR["AR-Spur"].abbr,

banner = "Truck plate.svg",

width = AR["AR-Spur"].width

}

AR["AR-Truck-Spur"] = AR["Hwy-Truck-Spur"]

AR["Hwy-Spur-Truck"] = AR["Hwy-Truck-Spur"]

AR["AR-Spur-Truck"] = AR["Hwy-Truck-Spur"]

AR.CRP = {

shield = "Crowley's Ridge Parkway generic.svg",

name = "Crowley's Ridge Parkway",

link = "Crowley's Ridge Parkway",

abbr = "Crowley's Ridge Pkwy.",

bannersuffix = "green"

}

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

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

v.maint = "ArDOT"

v.browse = "Arkansas Highway System"

v.browselinks = {

[1] = "Interstate",

[2] = "US",

[3] = "Business",

[4] = "Secondary",

[5] = "Spurs",

[6] = "Suffixed",

[7] = "Scenic",

[8] = "Heritage"

}

end

end

for k, v in pairs(AR) do if k:match ("^%a*%s19[2-6]") then

v.maint = "SHC"

end

end

for k, v in pairs(AR) do if k:match ("^%a*%s19[7-9]") then

v.maint = "AHTD"

end

end

AR.CR.shield = {

arg = "county",

default = "CR %route% jct.svg",

Lee = "Lee County %route% AR.svg"

}

AR.CR.shieldmain = {

arg = "county",

default = "%county% County %route%.svg",

Lee = "Lee County %route% AR.svg"

}

AR.CR.maint = ""

AR.FR.shield = {hook = "splitlen",

split = 4,

above = "",

below = "Forest Route %route%.svg"

}

AR.FR.shieldmain = {hook = "splitlen",

split = 4,

above = "",

below = "Forest Route %route%.svg"

}

AR.FH.shield = AR.FR.shield

AR.FH.shieldmain = AR.FR.shieldmain

AR["US-TX"] = {alias = {module = "USA/TX", type = "US"}}

return AR