Module:Road data/strings/USI

Jump to navigation Jump to search

Documentation for this module may be created at Module:Road data/strings/USI/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))
]==]

-- Ibica
local USI = {}

local util = require("Module:Road data/util")

local format = mw.ustring.format

--[[ REGION-SPECIFIC SETTINGS ]]--
USI[" common "] = {
	country = "Ibica",
	locations = {
		indep_city = {
			linksuffix = ", %region%",
			prefix = "City of ",
			jcttoparticle = "the "
		},
		sub1 = {
			linksuffix = " County, %region%",
			jcttopnamesuffix = " County"
		},
		sub2 = {
			linksuffix = "[sub1dab||, %sub1dab% County|], %region%"
		},
		sub2areas = {
			city = {
				linksuffix = " (city)",
				jcttoparticle = "the ",
				nameprefix = "City of "
			},
			town = {
				linksuffix = " (town)",
				jcttoparticle = "the ",
				nameprefix = "Town of "
			},
			township = {
				linksuffix = " Township",
				namesuffix = " Township",
			},
			village = {
				linksuffix = " (village)",
				jcttoparticle = "the ",
				nameprefix = "Village of "
			}
		}
	}
}

--[[ ROUTE TYPES ]]--
-- disambiguation switch
USI[" dab "] = "[dab|| (%dab%)|]"

-- definitions for auxiliary routes
USI[" aux "] = {
	Alt = {
		name = "Alternate",
		abbrsuffix = "Alt.",
		bannerprefix = "Alt"
	},
	Bus = {
		name = "Business",
		abbrsuffix = "Bus."
	},
	Byp = {
		name = "Bypass",
		abbrsuffix = "Byp.",
		bannerprefix = "By-pass",
		aux = "[[Bypass (road)|Bypass]]"
	},
	Conn = {
		name = "Connector",
		abbrsuffix = "Conn."
	},
	Loop = {name = "Loop"},
	Scenic = {name = "Scenic"},
	Spur = {name = "Spur"},
	Truck = {name = "Truck"},
}
-- fill out default values
for _,entry in pairs(USI[" aux "]) do
	entry.abbrsuffix = entry.abbrsuffix or entry.name
	entry.bannerprefix = entry.bannerprefix or entry.name
	entry.aux = entry.aux or format("[[%s route]]", entry.name)
end

-- &nbsp; is nonbreaking space.
-- &#8209; is nonbreaking hyphen.

USI.I = {
	base = "Interstate %route%",
	shield = "I-%route%.svg",
	name = "Interstate %route%",
	link = "Interstate %route%" .. USI[" dab "],
	abbr = "I-%route%",
	width = "expand",
	bannersuffix = "blue",
	browse = {
		{link = "Interstate Highway System", bold = true},
		{
			noprint = true,
			{link = "List of Interstate Highways", name = "Main"},
			{link = "List of auxiliary Interstate Highways", name = "Auxiliary"},
			{link = "List of suffixed Interstate Highways", name = "Suffixed"},
			{link = "List of business routes of the Interstate Highway System", name = "Business"}
		}
	}
}

USI["I-Alt"] = {
	shield = USI.I.shield,
	name = USI.I.name .. " Alternate",
	link = USI.I.base .. " Alternate" .. USI[" dab "],
	abbr = USI.I.abbr .. " Alt.",
	banner = "Alternate plate blue.svg",
	bannersuffix = USI.I.bannersuffix,
	aux = "[[Alternate route]]",
	width = "expand",
	browse = USI.I.browse
}

USI["I-Toll"] = {
	shield = USI.I.shield,
	name = USI.I.name .. " Toll",
	link = USI.I.link,
	abbr = USI.I.abbr,
	banner = "Toll plate yellow.svg",
	bannersuffix = USI.I.bannersuffix,
	width = "expand",
	browse = USI.I.browse
}

USI["I-Future"] = {
	shield = "I-%route% (Future).svg",
	name = USI.I.name,
	link = USI.I.link,
	abbr = "Future " .. USI.I.abbr,
	bannersuffix = USI.I.bannersuffix,
	browse = USI.I.browse
}

USI.Future = USI["I-Future"]

USI.BL = {
	shield = "Business Loop %route%.svg",
	name = USI.I.name .. " Business",
	link = USI.I.base .. " Business" .. USI[" dab "],
	abbr = USI.I.abbr .. " Bus.",
	aux = "[[List of business routes of the Interstate Highway System|Business route]]",
	browse = USI.I.browse,
	width = "expand"
}

USI.BS = {
	shield = "Business Spur %route%.svg",
	name = USI.BL.name,
	link = USI.BL.link,
	abbr = USI.I.abbr .. " BS",
	aux = USI.BL.aux,
	browse = USI.I.browse,
	width = "expand"
}

USI.IR = {
	base = "Ibican Route %route%",
	shield = "IR %route%.svg",
	name = "Ibican Route %route%",
	link = "Ibican Route %route%" .. USI[" dab "],
	abbr = "Ibican Route&nbsp;%route%",
	width = "expand",
	browse = {
		{link = "Ibican Numbered Highway System", bold = true},
		{
			noprint = true,
			{link = "List of Ibican Routes", name = "Main"},
			{link = "List of bannered Ibican Routes", name = "Bannered"},
			{link = "List of divided Ibican Routes", name = "Divided"},
		}
	}
}

USI.road = {
	shield = '',
	name = "%route%",
	link = '',
	abbr = "%route%",
	browse = '',
}

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

return USI