Jump to content

Module:Road data/strings/USA/LA

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Fredddie (talk | contribs) at 21:20, 13 August 2021 (cleanup). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

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

-- Louisiana
local LA = {}

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

local suffix = " ([dab||%dab%, |]Louisiana)"
local maint = "[[Louisiana Department of Transportation|Louisiana DOT]]"

LA.I.link = "Interstate %route% ([dab||%dab%, |]Louisiana)"

LA.BL.link = "Interstate %route% Business ([dab||%dab%, |]Louisiana)"

LA.US.name = "U.S. Highway %route%"
LA.US.link = "U.S. Route %route% in Louisiana"

for _,year in ipairs({"1926", "1948", "1961"}) do
	LA["US " .. year] = {
		shield = format("US %%route%% (%s).svg", year),
		shieldmain = format("US %%route%% Louisiana %s.svg", year),
		base = LA.US.base,
		name = LA.US.name,
		link = LA.US.link,
		abbr = LA.US.abbr,
		width = "square",
	}
end

LA["US 1961"].shieldmain = "US %route% (1961).svg"

LA["US-Hist"].shield = "US %route% (LA historic).svg"

for _,type in ipairs({'US', 'US 1926', 'US 1948', 'US 1961'}) do
	for _,auxType in ipairs({"Alt", "Bus", "Byp", "Spur", "Truck"}) do
		local spec = LA[" aux "][auxType]
		LA[type .. "-" .. auxType] = {
			shield = LA[type].shield,
			shieldmain = LA[type].shieldmain,
			name = LA[type].name .. " " .. spec.name,
			link = LA[type].base .. " " .. spec.name .. suffix,
			abbr = LA[type].abbr .. " " .. spec.abbrsuffix,
			banner = spec.bannerprefix .. " plate.svg",
			aux = spec.aux,
			width = "expand",
		}
	end
end

LA.LA = {
	base = "Louisiana Highway %route%",
	shield = "Louisiana %route% (2008).svg",
	name = "Louisiana Highway %route%",
	link = "Louisiana Highway %route%",
	abbr = "LA&nbsp;%route%"}

for _,year in ipairs({"1955", "1990"}) do
	LA["LA " .. year] = {
		shield = format("Louisiana %%route%% (%s).svg", year),
		base = LA.LA.base,
		name = LA.LA.name,
		link = LA.LA.link,
		abbr = LA.LA.abbr,
		width = "square",
		bannersuffix = "green",
	}
end
LA["LA 1990"].shield = "Louisiana %route%.svg"

LA["LA 1924"] = {shield = "Louisiana %route% (1924).svg",
				 name = "State Route %route%",
                 link = "Louisiana State Route %route%",
                 abbr = "SR&nbsp;%route%"}
                 
LA.SR =  LA["LA 1924"]

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

-- CR is defined by Module:Road data/strings/USA
LA.CR.name = "Parish Road %route%"
LA.CR.shieldmain = "%county% Parish %route%.svg"
LA.CR.link = "Parish Road %route% (%county% Parish, Louisiana)" --had an ifexist that didn't create link if article didn't exist
LA.CR.abbr = "PR&nbsp;%route%"

LA.PR = LA.CR

return LA