Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Road data/strings/USA/PR

From Cube Studios Wiki

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

--[==[
To inspect the content of this data module, PRe [[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["PR-Hist"]`.
]==]

-- Puerto Rico
local PR = {}

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

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

PR.I.shield = "I-PR%route%.svg"
PR.I.link = "Interstate PR%route%"
PR.I.abbr = "PRI-%route%"

PR.PR = {
	shield = "PR primary %route%.svg",
	shieldmain = {"PR primary %route%.svg", "PR urban primary %route%.svg", "PR secondary %route%.svg", "Ellipse sign %route%.svg"},
	name = "Highway %route%",
	link = "Puerto Rico Highway %route% [dab||(%dab%)|]",
	abbr = "PR-%route%",
	width = "expand",
	translation = "Ruta %route%",
	lang = "es"
}

PR.Urban = {
	shield = "PR urban primary %route%.svg"
}

PR.Sec = {
	shield = {
		ifexists = true,
		default = "PR secondary %route%.svg",
		otherwise = {
			hook = "splitlen",
			split = 3,
			above = "CR %route% jct wide.svg",
			below = "CR %route% jct.svg"
		}
	}
}
	

PR.Ter = {
	shield = "Ellipse sign %route%.svg"
}

for k, v in pairs(PR) do if k:find ("^%a") then 
	v.name = PR.PR.name
	v.link = PR.PR.link
	v.abbr = PR.PR.abbr
	v.width = PR.PR.width
	v.translation = PR.PR.translation
	v.lang = PR.PR.lang
	end
end

for _,type in ipairs({'PR', 'Urban', 'Sec', 'Ter'}) do
	for _,auxType in ipairs({"Spur"}) do
		local spec = PR[" aux "][auxType]
		PR[type .. "-" .. auxType] = {
			shield = PR[type].shield,
			shieldmain = PR[type].shield,
			name = PR[type].name .. " Spur",
			link = PR[type].link .. " Spur" .. suffix,
			abbr = PR[type].abbr .. " Spur",
			banner = "Spur plate (es).svg",
			aux = spec.aux,
			width = PR[type].width,
			translation = "Ruta %route% Ramal",
			lang = "es"
		}
	end
end

PR["PR-Spur"].banner = "Spur plate blue (es).svg"
PR["Sec-Spur"].banner = "Spur plate county (es).svg"
PR["PR-Ramal"] = PR["PR-Spur"]	
PR["Urban-Ramal"] = PR["Urban-Spur"]
PR["Sec-Ramal"] = PR["Sec-Spur"]
PR["Ter-Ramal"] = PR["Ter-Spur"]

-- add new types above this line if you want it to have the state highway browse and maint
for k, v in pairs(PR) do if k:find ("^%a") then
	v.maint = "[[Puerto Rico Department of Transportation and Public Works|Puerto Rico DTPW]]"
	v.browse = "[[Roads in Puerto Rico]]"
	v.browselinks = {
		[1] = "[[List of highways in Puerto Rico|List]]"
	}
	end
end

return PR
Cookies help us deliver our services. By using our services, you agree to our use of cookies.