Jump to content

Module:Road data/strings/CAN/SK: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
add support for municipal routes
change from Hwy to Highway to match provincial standards of naming (similar to BC and AB)
 
(40 intermediate revisions by 2 users not shown)
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"]`.
]==]

-- Saskatchewan
-- Saskatchewan
local SK = {}
local SK = {}


local util = require("Module:Road data/util")
SK.SK = {shield = {["1"] = "Saskatchewan Highway 1.svg",
util.addAll(SK, require("Module:Road data/strings/CAN"))
["16"] = "Saskatchewan Highway 16.svg",
default = {ifexists = true,
default = "Saskatchewan Highway %route% (jct).svg"}},
link = "Saskatchewan Highway %route%",
abbr = {["1"] = "Hwy 1 (TCH)",
["16"] = "Hwy 16 (TCH)",
default = "Hwy %route%"}
}
SK.Mun = {shield = "Saskatchewan Route %route%.svg",
link = SK.SK.link,
abbr = SK.SK.abbr,
banner = "Saskatchewan Rural Municipal Route.svg"
}


SK.SK = {
shield = {
["1"] = "Saskatchewan Highway 1.svg",
["16"] = "Saskatchewan Highway 16.svg",
["16A"] = "Saskatchewan Highway 16A.svg",
["16B"] = "Saskatchewan Highway 16B.svg",
["Circle"] = {"Saskatchewan Highway 11 (jct).svg", "Saskatchewan Highway 16.svg"},
default = {
ifexists = true,
default = "Saskatchewan Highway %route% (jct).svg"
}
},
shieldmain = {
["1"] = "Saskatchewan Highway 1.svg",
["2"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
["3"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
["6"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
["11"] = {"Saskatchewan Highway %route% (jct).svg", "Louis Riel Trail.svg"},
["16"] = {"Saskatchewan Highway %route%.svg", "Yellowhead Highway (Saskatchewan).svg"},
["16A"] = "Saskatchewan Highway 16A.svg",
["16B"] = "Saskatchewan Highway 16B.svg",
["35"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
["39"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
["49"] = {"Saskatchewan Highway %route% (jct).svg", "Manitoba Highway %route%.svg"},
["57"] = {"Saskatchewan Highway %route% (jct).svg", "Manitoba Highway %route%.svg"},
["Circle"] = {"Saskatchewan Highway 11 (jct).svg", "Saskatchewan Highway 16.svg"},
default = {
ifexists = true,
default = "Saskatchewan Highway %route% (jct).svg"
}
},
name = {
default = "Highway %route%",
["Circle"] = "Circle Drive"
},
link = {
default = "[dab||%dab%|Saskatchewan Highway %route%]",
["17"] = "Highway 17 (Alberta–Saskatchewan)",
["Circle"] = "Circle Drive"
},
abbr = {
["Circle"] = "Circle Drive",
default = "Highway %route%"
},
orientation = "upright"

}
SK.Hwy = SK.SK
SK.Hwy = SK.SK


for k, v in pairs(SK) do if k:find ("TCH") then
SK.TCH = SK.SK
v.shield = SK.SK.shield
v.name = SK.SK.name
v.link = "Saskatchewan Highway %route%"
v.abbr = SK.SK.abbr.default .. " (TCH)"
v.orientation = "upright"
end
end

SK.YH = {
shield = {SK.Hwy.shield,"Yellowhead Blank.svg"},
shieldmain = SK.Hwy.shieldmain,
name = SK.Hwy.name,
link = SK.Hwy.link,
abbr = {
["16"] = "Highway&nbsp;%route% (TCH/YH)",
default = SK.Hwy.abbr.default .. " (YH)"
},
orientation = "upright"
}

-- add new types above this line if you want it to have the provincial highway browse and maint
for k, v in pairs(SK) do if k:find ("^%a") then
v.maint = "[[Ministry of Highways and Infrastructure (Saskatchewan)|Ministry of Highways and Infrastructure]]"
end
end

SK.AB = {alias = {module = "CAN/AB", type = "Hwy", width = "expand"}}
SK.MB = {alias = {module = "CAN/MB", type = "Hwy"}}

SK.Mun = {
shield = "Saskatchewan Route %route%.svg",
name = SK.SK.name.default,
link = SK.SK.link,
abbr = SK.SK.abbr,
banner = "Saskatchewan Rural Municipal Route.svg",
orientation = "upright"
}


SK.Tertiary = SK.SK --shields are superimposed
SK.Tertiary = SK.Mun --shields are superimposed


return SK
return SK

Latest revision as of 00:53, 21 August 2024

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

-- Saskatchewan
local SK = {}

local util = require("Module:Road data/util")
util.addAll(SK, require("Module:Road data/strings/CAN"))

SK.SK = {
	shield = {
		["1"] = "Saskatchewan Highway 1.svg",
		["16"] = "Saskatchewan Highway 16.svg",
		["16A"] = "Saskatchewan Highway 16A.svg",
		["16B"] = "Saskatchewan Highway 16B.svg",
		["Circle"] = {"Saskatchewan Highway 11 (jct).svg", "Saskatchewan Highway 16.svg"},
		default = {
			ifexists = true,
			default = "Saskatchewan Highway %route% (jct).svg"
		}
	},
	shieldmain = {
		["1"] = "Saskatchewan Highway 1.svg",
		["2"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
		["3"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
		["6"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
		["11"] = {"Saskatchewan Highway %route% (jct).svg", "Louis Riel Trail.svg"},
		["16"] = {"Saskatchewan Highway %route%.svg", "Yellowhead Highway (Saskatchewan).svg"},
		["16A"] = "Saskatchewan Highway 16A.svg",
		["16B"] = "Saskatchewan Highway 16B.svg",
		["35"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
		["39"] = {"Saskatchewan Highway %route% (jct).svg", "CanAm Highway.svg"},
		["49"] = {"Saskatchewan Highway %route% (jct).svg", "Manitoba Highway %route%.svg"},
		["57"] = {"Saskatchewan Highway %route% (jct).svg", "Manitoba Highway %route%.svg"},
		["Circle"] = {"Saskatchewan Highway 11 (jct).svg", "Saskatchewan Highway 16.svg"},
		default = {
			ifexists = true,
			default = "Saskatchewan Highway %route% (jct).svg"
		}
	},
	name = {
		default = "Highway %route%",
		["Circle"] = "Circle Drive"
	},
	link = {
		default = "[dab||%dab%|Saskatchewan Highway %route%]",
		["17"]  = "Highway 17 (Alberta–Saskatchewan)",
		["Circle"] = "Circle Drive"
	},
         
	abbr = {
		["Circle"] = "Circle Drive",
		default = "Highway %route%"
	},
	orientation = "upright"

}
              
SK.Hwy = SK.SK

for k, v in pairs(SK) do if k:find ("TCH") then 
	v.shield = SK.SK.shield
	v.name = SK.SK.name
	v.link = "Saskatchewan Highway %route%"
	v.abbr = SK.SK.abbr.default .. " (TCH)"
	v.orientation = "upright"
	end
end

SK.YH = {
	shield = {SK.Hwy.shield,"Yellowhead Blank.svg"},
	shieldmain = SK.Hwy.shieldmain,
	name = SK.Hwy.name,
	link = SK.Hwy.link,
	abbr = {
		["16"] = "Highway&nbsp;%route% (TCH/YH)",
		default = SK.Hwy.abbr.default .. " (YH)"
		},
	orientation = "upright"
	}

-- add new types above this line if you want it to have the provincial highway browse and maint
for k, v in pairs(SK) do if k:find ("^%a") then
	v.maint = "[[Ministry of Highways and Infrastructure (Saskatchewan)|Ministry of Highways and Infrastructure]]"
	end
end

SK.AB = {alias = {module = "CAN/AB", type = "Hwy", width = "expand"}}
SK.MB = {alias = {module = "CAN/MB", type = "Hwy"}}              

SK.Mun = {
	shield = "Saskatchewan Route %route%.svg",
	name = SK.SK.name.default,
	link = SK.SK.link,
	abbr = SK.SK.abbr,
	banner = "Saskatchewan Rural Municipal Route.svg",
	orientation = "upright"
}

SK.Tertiary = SK.Mun --shields are superimposed

return SK