Module:Road data/strings/USA/SC

< Module:Road data‎ | strings‎ | USA
Revision as of 05:48, 16 July 2021 by Zoran (talk | contribs) (Pywikibot 6.4.0)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

-- South Carolina
local SC = {}

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

local suffix = " ([dab||%dab%, |]South Carolina)"
local suffix2 = " [dab||(%dab%)|]"
local maint = "[[South Carolina Department of Transportation|SCDOT]]"

SC[" common "] = {
	browse = {
		{link = "South Carolina State Highway System", bold = true},
		{
			noprint = true,
			{link = "List of Interstate Highways in South Carolina", name = "Interstate"},
			{link = "List of U.S. Highways in South Carolina", name = "U.S."},
			{link = "List of state highways in South Carolina", name = "State"},
			{link = "List of South Carolina Scenic Byways", name = "Scenic"}
		}
	}
}

SC.I.maint = maint
SC.I.link = {["185"] = "Interstate 185 (South Carolina)",
             ["326"] = "Interstate 326 (South Carolina)",
             default = {hook = "splitlen",
                        split = 3,
                        above = "Interstate %route%",
                        below = "Interstate %route% in South Carolina"}}
                           
SC["I 1957"].link = SC.I.link
SC["I 1961"].link = SC.I.link           

SC.BL.link = "Interstate %route% Business ([dab||%dab%, |]South Carolina)"
SC.BS.link = SC.BL.link

SC.US.maint = maint
SC.US.name = "U.S. Highway %route%"
SC.US.link = {["217"] = "U.S. Route 217 in South Carolina",
			  ["221"] = "U.S. Route 221 in South Carolina",
			  ["278"] = "U.S. Route 278 in South Carolina",
        	  ["301"] = "U.S. Route 301 in South Carolina",
              default = {hook = "splitlen",
                        split = 3,
                        above = "U.S. Route %route%",
                        below = "U.S. Route %route% in South Carolina"}}
                        
for _,year in ipairs({"1926", "1948", "1961"}) do
	SC["US " .. year] = {
		shield = format("US %%route%% (%s).svg", year),
		shieldmain = format("US %%route%% South Carolina %s.svg", year),
		base = SC.US.base,
		name = SC.US.name,
		link = SC.US.link,
		abbr = SC.US.abbr,
		width = "square",
	}
end

SC["US 1961"].shieldmain = SC["US 1961"].shield

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


--Are all these really necessary? --

SC["US-Alt-Truck"] = {shield = SC.US.shield,
                     name = SC.US.name .. " Alternate Truck",
                     link = SC.US.base .. " Alternate Truck" .. suffix,
                     abbr = SC["US-Alt"].abbr .. " Truck",
                     banner = "Alt truck plate.svg",
                     width = 'expand'}

SC.SC = {
	base = "South Carolina Highway %route%",
	shield = "South Carolina %route%.svg",
	shieldmain = "South Carolina %route%.svg",
	name = "South Carolina Highway %route%",
	link = "South Carolina Highway %route%" .. suffix2,
	abbr = "SC&nbsp;%route%",
	width = "wide"
}

for _,type in ipairs({'SC'}) do
	for _,year in ipairs({"1920", "1926", "1955", "1971"}) do
		SC["SC " .. year] = {
			shield = format("SC-%%route%% (%s).svg", year),
			shieldmain = format("SC-%%route%% (%s).svg", year),
			name = SC.SC.name,
			link = SC.SC.link,
			abbr = SC.SC.abbr,
			width = "square",
		}
	end
end

SC["SC 1920"].shield = SC["SC 1926"].shield
SC["SC 1920"].shieldmain = SC["SC 1926"].shieldmain
SC["SC 1971"].shield = "SC-%route%.svg"
SC["SC 1971"].shieldmain = "SC-%route%.svg"
SC["SC 1971"].width = "expand"
SC["SC 1948"] = SC["SC 1971"]   

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


SC["SC-Alt"].banner = "Alt plate South Carolina.svg"
SC["SC-Bus"].banner = "Business plate South Carolina.svg"
SC["SC-Byp"].banner = "By-pass plate South Carolina.svg"
SC["SC-Conn"].banner = "Connector plate South Carolina.svg"
SC["SC-Truck"].banner = "Truck plate South Carolina.svg"

SC["SC 1948-Alt"] = SC["SC 1971-Alt"]                     
SC["SC 1948-Bus"] = SC["SC 1971-Bus"]
SC["SC 1948-Spur"] = SC["SC 1971-Spur"]
SC["SC 1948-Temp"] = SC["SC 1971-Temp"]

local secName = {
	hook = "mask",
	mask = "Road data/masks/USA/SC",
	base = "county",
	masked = "number",
	default = "S-%number%-%route%"
}

SC.Sec = {
	shield = "",
	name = secName,
	link = "",
	abbr = secName
	
}

SC.GA = {alias = {module = "USA/GA", type = "GA"}}
SC["GA-Spur"] = {alias = {module = "USA/GA", type = "SR-Spur"}}
SC.NC = {alias = {module = "USA/NC", type = "NC"}}                
SC.road = {alias = {module = "USA", type = "road"}}

return SC