Module:Road data/strings/USA/NM

MyWikiBiz, Author Your Legacy — Thursday December 05, 2024
< Module:Road data‎ | strings‎ | USA
Revision as of 05:47, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Documentation for this module may be created at Module:Road data/strings/USA/NM/doc

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

-- New Mexico
local NM = {}

local util = require("Module:Road data/util")
local format = mw.ustring.format
util.addAll(NM, require("Module:Road data/strings/USA"))

local suffix = " ([dab||%dab%, |]New Mexico)"
local maint = "[[New Mexico Department of Transportation|NMDOT]]"

NM.I.link = "Interstate %route% (New Mexico)"

NM.BL.link = "Interstate %route% Business ([dab||%dab%, |]New Mexico)"

NM.US.name = "U.S. Highway %route%"
NM.US.link = "U.S. Route %route% in New Mexico"

NM["US 1926"].shieldmain = "US %route% New Mexico 1926.svg"
NM["US 1926"].name = NM.US.name
NM["US 1926"].link = NM.US.link
NM["US 1948"].shieldmain = "US %route% New Mexico 1948.svg"
NM["US 1948"].name = NM.US.name
NM["US 1948"].link = NM.US.link
NM["US 1961"].name = NM.US.name
NM["US 1961"].link = NM.US.link

for _,type in ipairs({'US'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Conn", "Opt", "Scenic", "Spur", "Temp", "Truck"}) do
		local spec = NM[" aux "][auxType]
		NM["US-" .. auxType] = {
			shield = NM.US.shield,
			name = NM.US.name .. " " .. spec.name,
			link = NM.US.base .. " " .. spec.name .. NM[" dab "],
			abbr = NM.US.abbr .. " " .. spec.abbrsuffix,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = "expand",
		}
	end
end

NM["US-Hist"].shield = "US %route% (NM historic).svg"
NM["US-Hist"].shieldmain = "US %route% (NM historic).svg"
NM["US-Hist"].link = NM.US.link

NM.NM = {
	base = "New Mexico State Road %route%",
	shield = "New Mexico %route%.svg",
	name = "State Road %route%",
	link = "New Mexico State Road %route% [dab||(%dab%)|]",
	abbr = "NM&nbsp;%route%",
	orientation = "upright"
	
}

for _,year in ipairs({"1926", "1932", "1952"}) do
	NM["NM " .. year] = {
		shield = format("New Mexico %%route%% %s.svg", year),
		shieldmain = format("New Mexico %%route%% %s.svg", year),
		name = NM.NM.name,
		link = NM.NM.link,
		abbr = NM.NM.abbr,
		width = "square",
	}
end

NM["NM 1932 Dir"] = NM["NM 1932"] -- what is this for?

NM.FR = {shield = "",
		 name = "Frontage Road %route%",
		 link = "List of frontage roads in New Mexico#FR&nbsp;%route%",
		 abbr = "FR %route%"}
         
NM.CR.shield = {
	arg = "county",
	default = "CR %route% jct.svg",
	["Doña Ana"] = ""
}

return NM