Jump to content

Module:Road data/strings/BRA: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
update module
Line 1: Line 1:
--[==[
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"]`.
]==]

-- Brazil
-- Brazil
local BRA = {}
local BRA = {}


BRA.BR = {shield = {hook = "padroute",
BRA.BR = {
shield = {
hook = "padroute",
paddedLength = 3,
paddedLength = 3,
default = "BR-%paddedRoute% jct.svg"},
default = "BR-%paddedRoute% jct.svg"
},
shieldmain = { -- eventually there will be specific shields
link = "BR-%route%",
abbr = {hook = "padroute",
hook = "padroute",
paddedLength = 3,
paddedLength = 3,
default = "BR-%paddedRoute%"}}
default = "BR-%paddedRoute% jct.svg"
},

link = "BR-%route%",
-- SH is a generic case that uses state abbreviations as a variable
BRA.SH = { shield = {hook = "padroute",
abbr = {
hook = "padroute",
paddedLength = 3,
paddedLength = 3,
default = "Brasil estado %paddedRoute% jct.svg"},
default = "BR-%paddedRoute%"
}
link = {hook = "padroute",
}
paddedLength = 3,
default = "%type%-%paddedRoute%"},
abbr = {hook = "padroute",
paddedLength = 3,
default = "%type%-%paddedRoute%"}}
BRA.AC = BRA.SH

BRA.AL = BRA.SH

BRA.AP = BRA.SH

BRA.AM = BRA.SH

BRA.BA = BRA.SH

BRA.CE = BRA.SH

BRA.DF = BRA.SH

BRA.ES = BRA.SH

BRA.GO = BRA.SH

BRA.MA = BRA.SH

BRA.MT = BRA.SH

BRA.MS = BRA.SH

BRA.NG = BRA.SH

BRA.PA = BRA.SH

BRA.PB = BRA.SH

BRA.PR = BRA.SH

BRA.PE = BRA.SH

BRA.PI = BRA.SH

BRA.RJ = BRA.SH

BRA.RN = BRA.SH

BRA.RS = BRA.SH

BRA.RO = BRA.SH

BRA.RR = BRA.SH

BRA.SC = BRA.SH

BRA.SP = BRA.SH

BRA.SE = BRA.SH


-- State highways take the same form
BRA.TO = BRA.SH
for _,type in ipairs({"AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MS", "MT", "NG", "PA", "PB", "PE", "PI", "PR", "RJ", "RN", "RO", "RS", "RR", "SC", "SE", "SP", "TO"}) do
BRA[type] = {
shield = {
hook = "padroute",
paddedLength = 3,
default = "Brasil estado %paddedRoute% jct.svg"
},
shieldmain = {
hook = "padroute",
paddedLength = 3,
default = {
arg = type,
default = type .. "-%paddedRoute% jct.svg",
["RS"] = "RS-%paddedRoute% shield.png"
}
},
name = {
hook = "padroute",
paddedLength = 3,
default = type .. "-%paddedRoute%"
},
link = {
hook = "padroute",
paddedLength = 3,
default = type .. "-%paddedRoute%"
},
abbr = {
hook = "padroute",
paddedLength = 3,
default = type .. "-%route%"
}
}
end
return BRA
return BRA

Revision as of 21:22, 13 February 2021

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

-- Brazil
local BRA = {}

BRA.BR = {
	shield = {
		hook = "padroute",
		paddedLength = 3,
		default = "BR-%paddedRoute% jct.svg"
	},
	shieldmain = { -- eventually there will be specific shields
			hook = "padroute",
			paddedLength = 3,
			default = "BR-%paddedRoute% jct.svg"
	},
	link = "BR-%route%",
	abbr = {
		hook = "padroute",
		paddedLength = 3,
		default = "BR-%paddedRoute%"
	}
}

-- State highways take the same form
for _,type in ipairs({"AC", "AL", "AM", "AP", "BA", "CE", "DF", "ES", "GO", "MA", "MS", "MT", "NG", "PA", "PB", "PE", "PI", "PR", "RJ", "RN", "RO", "RS", "RR", "SC", "SE", "SP", "TO"}) do
	BRA[type] = {
		shield = {
			hook = "padroute",
			paddedLength = 3,
			default = "Brasil estado %paddedRoute% jct.svg"
		},
		shieldmain = {
			hook = "padroute",
			paddedLength = 3,
			default = {
				arg = type,
				default = type .. "-%paddedRoute% jct.svg",
				["RS"] = "RS-%paddedRoute% shield.png"
			}
		},
		name = {
			hook = "padroute",
			paddedLength = 3,
			default = type .. "-%paddedRoute%"
		},
		link = {
			hook = "padroute",
			paddedLength = 3,
			default = type .. "-%paddedRoute%"
		},
		abbr = {
			hook = "padroute",
			paddedLength = 3,
			default = type .. "-%route%"
		}
	}
end
         
return BRA