Module:Road data/strings/CAN/NB and Module:Road data/strings/CAN/NB/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Fredddie
fix
 
imported>Kelapstick
fix
 
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"]`.
]==]
-- New Brunswick
-- New Brunswick
local NB = {}
local NB = {}


local util = require("Module:Road data/util")
-- American types
util.addAll(NB, require("Module:Road data/strings/CAN"))
NB.I = {shield = "I-%route%.svg",
        link = "Interstate %route% in Maine",
        abbr = "I-%route%"}
 
NB.US = {shield = "US %route%.svg",
        link = "U.S. Route %route% in Maine",
        abbr = "US&nbsp;%route%"}


-- Provincial types
-- Provincial types
NB.Route = {
NB.Route = {shield = "NB %route%.svg",
shield = {
            link = "New Brunswick Route %route%",
default = "NB %route%.svg",
            abbr = "Route&nbsp;%route%"}
["2"] = "NB %route% (TCH).svg",
 
["16"] = "NB %route% (TCH).svg"
},
name = "Route&nbsp;%route%",
link = "New Brunswick Route %route%",
abbr = "Route&nbsp;%route%",
orientation = "upright"
}
NB.NB = NB.Route
NB.NB = NB.Route


for k, v in pairs(NB) do if k:find ("TCH") then
NB.TCH = {shield = "New Brunswick Route %route% (TCH).png",
v.shield = "NB %route% (TCH).svg"
          link = "New Brunswick Route %route%",
v.name = NB.Route.name
          abbr = "Route&nbsp;%route% (TCH)"}
v.link = NB.Route.link
v.abbr = NB.Route.abbr .. " (TCH)"
v.orientation = "upright"
end
end
 
-- add new types above this line if you want it to have the provincial highway browse and maint
for k, v in pairs(NB) do if k:find ("^%a") then
v.maint = "[[Department of Transportation and Infrastructure (New Brunswick)|Department of Transportation and Infrastructure]]"
end
end
 
NB.A = {alias = {module = "CAN/QC", type = "A"}}
NB.QC = {alias = {module = "CAN/QC", type = "QC"}}
 
-- American types
NB.I = {alias = {module = "USA/ME", type = "I"}}
NB.US = {alias = {module = "USA/ME", type = "US"}}


return NB
return NB