Pergi ke kandungan

Modul:Road data/strings/USA

Daripada Wikipedia, ensiklopedia bebas.

Pendokumenan untuk modul ini boleh diciptakan di Modul:Road data/strings/USA/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"]`.
]==]

-- United States
local USA = {}

local util = require("Module:Road data/util")
local format = mw.ustring.format


--[[ REGION-SPECIFIC SETTINGS ]]--
USA[" common "] = {
	country = "Amerika Syarikat",
	locations = {
		indep_city = {
			linksuffix = ", %region%",
			prefix = "[[Bandar bebas (Amerika Syarikat)|Bandar]] ",
			jcttoparticle = " "
		},
		sub1 = {
			linksuffix = "Kaunti %sub1dab%, %region%",
			jcttopnamesuffix = "Kaunti "
		},
		sub2 = {
			linksuffix = "[sub1dab||, Kaunti %sub1dab%|], %region%"
		},
		sub2areas = {
			city = {
				linksuffix = " (bandar)",
				jcttoparticle = " ",
				nameprefix = "Bandar "
			},
			town = {
				linksuffix = " (pekan)",
				jcttoparticle = " ",
				nameprefix = "Pekan "
			},
			township = {
				linksuffix = "Perbandaran ",
				namesuffix = "Perbandaran ",
			},
			village = {
				linksuffix = " (kampung)",
				jcttoparticle = " ",
				nameprefix = "Kampung "
			}
		}
	}
}

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

-- definitions for auxiliary routes
USA[" aux "] = {
	Alt = {
		name = "Alternatif",
		abbrsuffix = "Alt.",
		bannerprefix = "Alt"
	},
	Bus = {
		name = "Perniagaan",
		abbrsuffix = "Bus."
	},
	Byp = {
		name = "Jalan pintas",
		abbrsuffix = "Byp.",
		bannerprefix = "By-pass",
		aux = "[[Jalan pintas]]"
	},
	Conn = {
		name = "Sambungan",
		abbrsuffix = "Conn."
	},
	Loop = {name = "Jalan lingkar"},
	Opt = {
		name = "Pilihan",
		abbrsuffix = "Opt."
	},
	Scenic = {name = "Laluan indah"},
	Spur = {name = "Jalan bukit"},
	Temp = {
		name = "Sementara",
		abbrsuffix = "Temp."
	},
	Truck = {name = "Jalan trak"},
}
-- fill out default values
for _,entry in pairs(USA[" aux "]) do
	entry.abbrsuffix = entry.abbrsuffix or entry.name
	entry.bannerprefix = entry.bannerprefix or entry.name
	entry.aux = entry.aux or format("[[Laluan %s]]", entry.name)
end

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

USA.I = {
	base = "Laluan antara negeri %route%",
	shield = "I-%route%.svg",
	shieldmain= {
		arg = "state",
		["AK"] = "I-A%route%.svg",
		["AL"] = "I-%route% (AL).svg",
		["AR"] = "I-%route% (AR).svg",
		["AZ"] = "I-%route% (AZ).svg",
		["CA"] = "I-%route% (CA).svg",
		["HI"] = "I-H%route%.svg",
		["IA"] = "I-%route% (IA).svg",
		["KS"] = "I-%route% (KS).svg",
		["MT"] = "I-%route% (big).svg",
		["NJ"] = "I-%route% (NJ).svg",
		["NM"] = "I-%route% (NM).svg",
		["NV"] = "I-%route% (NV).svg",
		["NY"] = "I-%route% (long).svg",
		["OK"] = "I-%route% (OK).svg",
		["PR"] = "I-PR%route%.svg",
		["SC"] = "I-%route% (SC).svg",
		["TX"] = "I-%route% (TX).svg",
		["UT"] = "I-%route% (UT).svg",
		["WV"] = "I-%route% (WV).svg",
		["WY"] = "I-%route% (WY).svg",
		default = {
			["495"] = {"I-%route%.svg", "Capbeltwaysign.svg"},
			default = "I-%route%.svg"
		}
	},
	name = "Laluan antara negeri %route%",
	link = "Laluan antara negeri %route%" .. USA[" dab "],
	abbr = "I-%route%",
	width = "expand",
	bannersuffix = "blue",
	browse = {
		{link = "Sistem Lebuhraya Antara Negeri", bold = true},
		{
			noprint = true,
			{link = "Senarai Lebuhraya Antara Negeri", name = "Utama"},
			{link = "Senarai Lebuhraya Antara Negeri berawalan", name = "Berawalan"},
			{link = "Senarai Lebuhraya Antara Negeri berakhiran", name = "Berakhiran"},
			{link = "Senarai laluan perniagaan Sistem Lebuhraya Antara Negeri", name = "Perniagaan"}
		}
	}
}

USA["I-Alt"] = {
	shield = USA.I.shield,
	shieldmain = USA.I.shield,
	name = USA.I.name .. " Alternatif",
	link = USA.I.base .. " Alternatif" .. USA[" dab "],
	abbr = USA.I.abbr .. " Alt.",
	banner = "Alternate plate blue.svg",
	bannersuffix = USA.I.bannersuffix,
	aux = "[[Laluan alternatif]]",
	width = "expand",
	browse = USA.I.browse
}

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

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

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

USA["I 1957"] = {
	shield = "I-%route% (1957).svg",
	shieldmain = "I-%route% (%state% 1957).svg",
	name = USA.I.name,
	link = USA.I.link,
	abbr = USA.I.abbr,
	browse = USA.I.browse
}

USA["I 1961"] = {
	shield = {
		hook = "splitlen",
		split = 3,
		above = "I-%route% (1961).svg",
		below = "I-%route% (1957).svg"
	},
	shieldmain = {
		hook = "splitlen",
		split = 3,
		above = "I-%route% (%state% 1961).svg",
		below = "I-%route% (%state% 1957).svg"
	},
	name = USA.I.name,
	link = USA.I.link,
	abbr = USA.I.abbr,
	browse = USA.I.browse
}

USA.BL = {
	shield = "Business Loop %route%.svg",
	shieldmain = "Business Loop %route%.svg",
	name = USA.I.name .. " Perniagaan",
	link = USA.I.base .. " Perniagaan" .. USA[" dab "],
	abbr = USA.I.abbr .. " BL",
	aux = "[[Senarai laluan perniagaan Sistem Lebuhraya Antara Negeri|Laluan perniagaan]]",
	browse = USA.I.browse,
	width = "expand"
}

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

USA["BL 1957"] = {
	shield = "Business Loop %route% (1957).svg",
	shieldmain = "Business Loop %route% (%state% 1957).svg",
	name = USA.BL.name,
	link = USA.BL.link,
	abbr = USA.BL.abbr,
	aux = USA.BL.aux,
	browse = USA.I.browse
}

USA["BS 1957"] = {
	shield = "Business Spur %route% (1957).svg",
	shieldmain = "Business Spur %route% (%state% 1957).svg",
	name = USA.BS.name,
	link = USA.BS.link,
	abbr = USA.BS.abbr,
	aux = USA.BS.aux,
	browse = USA.I.browse
}

USA.US = {
	base = "Laluan A.S. %route%",
	shield = {
		arg = "state",
		["CA"] = "US %route% (1961 cutout).svg",
		default = "US %route%.svg"
	},
	shieldmain = {
		arg = "state",
		["CA"] = "US %route% (1961 cutout).svg",
		default = {
			["85"] = {"US %route%.svg", "CanAm Highway.svg"},
			default = "US %route%.svg"
		}
	},
	name = "Laluan A.S. %route%",
	link = "Laluan A.S. %route%" .. USA[" dab "],
	abbr = "US&nbsp;%route%",
	width = "expand",
	browse = {
		{link = "Sistem Lebuhraya Bernombor Amerika Syarikat", bold = true},
		{noprint = true,
			{link = "Senarai Laluan A.S.", name = "Utama"},
			{link = "Senarai Laluan A.S. bersepanduk", name = "Bersepanduk"},
			{link = "Senarai Laluan A.S. bercabang", name = "Bercabang"},
			{link = "Senarai lebuh raya yang dipintas oleh Lebuhraya Antara Negeri", name = "Dipintas"}
		}
	}
}

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

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

USA["US-Hist"] = {
	shield = "US %route% (historic).svg",
	shieldmain = {
		arg = "state",
		default = "US 66 (historic).svg",
		"US %route% (%state% historic).svg"
	},
	name = USA.US.name .. " Bersejarah",
	link = USA.US.base .. USA[" dab "],
	abbr = "Historic " .. USA.US.abbr .. USA[" dab "],
	orientation = "upright",
	color = "hist",
	browse = USA.US.browse
}

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

USA.FFH = {
	shield = "Forest Route %route%.svg",
	name = "Federal Forest Highway %route%",
	link = "Forest Highway %route%",
	abbr = "FFH&nbsp;%route%",
	color = "hist"
}
        
USA.FH = {
	shield = "Forest Route %route%.svg",
	name = "Forest Highway %route%",
	link = "Forest Highway %route%",
	abbr = "FH&nbsp;%route%",
	color = "hist"
}
         
USA.FR = {
	shield = "Forest Route %route%.svg",
	name = "Forest Route %route%",
	link = "Forest Highway %route%",
	abbr = "FR&nbsp;%route%",
	color = "hist"
}
         
USA.NSB = {
	shield = "MUTCD D6-4.svg",
	name = "%route%",
	link = "%route%",
	abbr = "%route%",
	color = "hist"
}
         
USA.CR = {
	shield = "CR %route% jct.svg",
	shieldmain = "[county||%county% |]County %route%.svg",
	base = "Jalan Kaunti %route%",
	name = "Jalan Kaunti %route%",
	link = "",
	abbr = "CR %route%"
}
         
-- https://mutcd.fhwa.dot.gov/resources/interim_approval/ialistreq.htm#ia15
USA.USBR = {
	shield = {
		arg = "state",
		["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
		["CA"] = "US Bike %route% (M1-9 IA-15).svg",
		["GA"] = "US Bike %route% (M1-9 IA-15).svg",
		["ID"] = "US Bike %route% (M1-9 IA-15).svg",
		["IL"] = "US Bike %route% (M1-9 IA-15).svg",
		["IN"] = "US Bike %route% (M1-9 IA-15).svg",
		["KY"] = "US Bike %route% (M1-9 IA-15).svg",
		["MD"] = "US Bike %route% (M1-9 IA-15).svg",
		["MI"] = "US Bike %route% (M1-9 IA-15).svg",
		["MO"] = "US Bike %route% (M1-9 IA-15).svg",
		["TN"] = "US Bike %route% (M1-9 IA-15).svg",
		["UT"] = "US Bike %route% (M1-9 IA-15).svg",
		["VA"] = "US Bike %route% (M1-9 IA-15).svg",
		default = "US Bike %route% (M1-9).svg"
	},
	shieldmain = {
		arg = "state",
		["AZ"] = "US Bike %route% (M1-9 IA-15).svg",
		["CA"] = "US Bike %route% (M1-9 IA-15).svg",
		["GA"] = "US Bike %route% (M1-9 IA-15).svg",
		["ID"] = "US Bike %route% (M1-9 IA-15).svg",
		["IL"] = "US Bike %route% (M1-9 IA-15).svg",
		["IN"] = "US Bike %route% (M1-9 IA-15).svg",
		["KY"] = "US Bike %route% (M1-9 IA-15).svg",
		["MD"] = "US Bike %route% (M1-9 IA-15).svg",
		["MI"] = "US Bike %route% (M1-9 IA-15).svg",
		["MO"] = "US Bike %route% (M1-9 IA-15).svg",
		["TN"] = "US Bike %route% (M1-9 IA-15).svg",
		["UT"] = "US Bike %route% (M1-9 IA-15).svg",
		["VA"] = "US Bike %route% (M1-9 IA-15).svg",
		default = "US Bike %route% (M1-9).svg"
	},
	name = "Laluan Basikal A.S. %route%",
	link = "Laluan Basikal A.S. %route%",
	abbr = "USBR %route%"
}

util.addAll(USA, require("Module:Road data/strings/USA/regional/GRR"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/NER"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/Tour"))
util.addAll(USA, require("Module:Road data/strings/USA/regional/Trails"))

return USA