Module:Road data/strings/USA/CA

MyWikiBiz, Author Your Legacy — Wednesday December 25, 2024
Jump to navigationJump to search

Documentation for this module may be created at Module:Road data/strings/USA/CA/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"]`.
]==]

-- California
local CA = {}

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

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

CA[" common "] = {
	browse = {
		{link = "State highways in California", bold = true},
		{noprint = true,
			{link = "List of Interstate Highways in California", name = "Interstate"},
			{link = "List of U.S. Routes in California", name = "U.S."},
			{link = "List of state highways in California", name = "State"},
			{link = "County roads in California", name = "Secondary"},
			{link = "List of state highways in California (pre-1964)", name = "Pre-1964"},
			{link = "History of California's state highway system", name = "History"},
			{link = "List of unconstructed state highways in California", name = "Unconstructed"},
			{link = "List of deleted state highways in California", name = "Deleted"},
			{link = "California Freeway and Expressway System", name = "Freeway"},
			{link = "State Scenic Highway System (California)", name = "Scenic"}
		}
	}
}

CA.I.maint = maint
CA.I.shield = CA["I 1961"].shield
CA.I.link = {
	["8"] = "Interstate 8",
	["505"] = "Interstate 505",
	["605"] = "Interstate 605",
	["805"] = "Interstate 805",
	["905"] = "Interstate 905",
	["710"] = "Interstate 710",
	["238"] = "Interstate 238",
	["780"] = "Interstate 780",
	["980"] = "Interstate 980",
	default = {
		hook = "split",
		split = 100,
		above = "Interstate %route% (California)",
		below = "Interstate %route% in California"
	}
}
	           
CA["I-Toll"].shield = CA.I.shield
CA["I-Toll"].link = CA.I.link
        
CA.BL.shield = "Business Loop %route% (CA).svg"
CA.BL.shieldmain = CA.BL.shield
CA.BL.link = CA.I.base .. " Business" .. suffix

CA["I 1957"].link = CA.I.link
CA["I 1961"].link = CA.I.link           

CA.US.maint = maint
CA.US.link = {
	["199"] = "U.S. Route 199",
	["299"] = "U.S. Route 299",
	["399"] = "U.S. Route 399",
	["466"] = "U.S. Route 466",
	default ="U.S. Route %route% in California"
}

CA["US-Byp"].width = 'expand'
CA["US-Bus"].maint = maint

CA["US 1926"].shieldmain = "US %route% California 1926.svg"
CA["US 1948"].shield = "US %route% California 1948.svg"
CA["US 1948"].shieldmain = "US %route% California 1948.svg"

CA["US 1926-Alt"] = {
	shield = CA["US 1926"].shield,
	shieldmain = CA["US 1926"].shieldmain,
	name = CA["US-Alt"].name,
	link = CA["US-Alt"].link,
	abbr = CA["US-Alt"].abbr,
	banner = CA["US-Alt"].banner,
	width = 'US1926'
}
	     
CA["US 1948-Alt"] = {
	shield = CA["US 1948"].shield,
	shieldmain = CA["US 1948"].shieldmain,
	name = CA["US-Alt"].name,
	link = CA["US-Alt"].link,
	abbr = CA["US-Alt"].abbr,
	banner = CA["US-Alt"].banner,
	width = "expand"
}

CA["US 1948-Bus"] = {
	shield = CA["US 1948"].shield,
	shieldmain = CA["US 1948"].shield,
	name = CA["US-Bus"].name,
	link = CA["US-Bus"].link,
	abbr = CA["US-Bus"].abbr,
	banner = "Business plate.svg"
}             

CA["US-Hist"].shield = "Historic US %route% (CA).svg"
CA["US-Hist"].link = "Historic " .. CA.US.base .. " (California)"

CA.SR = {
	base = "California State Route %route%",
	shield = "California %route%.svg",
	shieldmain = {
		["162"] = {"California %route%.svg", "Forest Route 7.svg"},
		["185"] = {"California %route%.svg", "California 77.svg"},
		default = "California %route%.svg"
	},
	name = {
		["162"] = "State Route %route% and<br>State Route 7",
		["185"] = "State Route %route% and<br>State Route 77",
		default = "State Route %route%"
	},
	link = "California State Route %route% [dab||(%dab%)|]",
	abbr = "SR&nbsp;%route%",
	width = "SR"}

for _,year in ipairs({"1934 S", "1948", "1957"}) do
	CA["SR " .. year] = {
		shield = format("California %%route%% %s.svg", year),
		shieldmain = format("California %%route%% %s.svg", year),
		name = CA.SR.name.default,
		link = CA.SR.link,
		abbr = CA.SR.abbr,
		width = "SR",
	}
end

CA["CA 1957"] = CA["SR 1957"]

CA.CA = CA.SR

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

CA["SR-Toll"] = {	shield = CA.SR.shield,
	name = CA.SR.name.default,
	link = CA.SR.link,
	abbr = CA.SR.abbr,
	banner = "Toll plate yellow.svg"}

CA["CA-Toll"] = CA["SR-Toll"]

CA["SR-Hist"] = {	shield = CA.SR.shield,
	name = "Historic State Route %route%",
	link = "Historic " .. CA.SR.base,
	abbr = "Historic SR&nbsp;%route%",
	}

CA["CA-Hist"] = CA["SR-Hist"]

CA.CR.link = "County Route %route% (California)"

CA["US-Alt 1926"] = {	shield = "",
	name = CA["US-Alt"].name,
	link = "",
	abbr = CA["US-Alt"].abbr}

CA["I-OR"] = {alias = {module = "USA/OR", type = "I"}}
CA["US-NV"] = {alias = {module = "USA/NV", type = "US"}}

CA.FH.shieldmain = {
	["59"] = {"Los Angeles County N3.svg", CA.FH.shield},
	default = CA.FH.shield
}

CA.ISR = {
	shield = {CA.I.shield, CA.SR.shield},
	shieldmain = {CA.I.shieldmain, CA.SR.shield},
	name = CA.I.name .. " and " .. CA.SR.name.default,
	link = CA.I.link,
	abbr = "Route %route%"
}

CA.AZ = {alias = {module = "USA/AZ", type = "SR"}}
CA.NV = {alias = {module = "USA/NV", type = "SR"}}
CA.OR = {alias = {module = "USA/OR", type = "OR"}}
CA.MEX = {alias = {module = "MEX", type = "FH"}}

return CA