Module:Jcon/data and Module:Jcon/data/sandbox: Difference between pages
(Difference between pages)
imported>BrandonXLF Get types from Module:Road data/strings/CAN/ON |
imported>BrandonXLF Add comment |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
local ON = require('Module:Road data/strings/CAN/ON') | |||
-- MTO signs - Table mapping sign names to their image | -- MTO signs - Table mapping sign names to their image | ||
p. | p.signs = { | ||
['hospital'] = 'Ontario M401.svg', | ['hospital'] = 'Ontario M401.svg', | ||
['airport'] = 'Ontario M502.svg', | ['airport'] = 'Ontario M502.svg', | ||
| Line 13: | Line 14: | ||
-- Place types to strip when processing road types | -- Place types to strip when processing road types | ||
p. | p.placeTypes = { | ||
'municipality', | 'municipality', | ||
'municipal', | 'municipal', | ||
| Line 28: | Line 29: | ||
} | } | ||
-- | -- Map of lowercase types to properly cased types at Module:Road_data/strings/CAN/ON | ||
p.typeMap = {} | |||
for type, | for type, _ in pairs(ON) do | ||
p[string.lower(type)] = | p.typeMap[string.lower(type)] = type | ||
end | end | ||
return p | return p | ||