Jump to content

Module:Jctint/USA and Module:Jctint/USA/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
Rename the variable to locationsModule
 
No edit summary
 
Line 37: Line 37:
PR = {
PR = {
default = {
default = {
linksuffix = ", Puerto Rico"
linksuffix = ", Puerto Rico",
prefix = "",
}
}
}
}
Line 48: Line 49:


local sub1name = {
local sub1name = {
LA = "Parish",
LA = " Parish",
PR = ""
PR = ""
}
}
Line 73: Line 74:
},
},
indep_city = {
indep_city = {
group = "city"
group = "city",
PR = "municipal"
},
},
town = {
town = {
Line 211: Line 213:
end
end
end
end
local spans = {"cspan", "lspan", "mspan", "auspan", "ospan", "espan", "namespan", "rspan", "nspan", "pspan", "xcspan", "munspan", "uspan", "kmspan"}
local spans = {"cspan", "lspan", "mspan", "auspan", "ospan", "espan", "namespan", "rspan", "nspan", "pspan", "xcspan", "munspan"}
for _,param in ipairs(spans) do
for _,param in ipairs(spans) do
if args[param] == "1" then
if args[param] == "1" then
Line 250: Line 252:
unit2 = lengthUnit .. "2",
unit2 = lengthUnit .. "2",
unit_ref = {lengthUnit .. "_ref", "length_ref" --[[TODO transition]]},
unit_ref = {lengthUnit .. "_ref", "length_ref" --[[TODO transition]]},
unit2_ref = {lengthUnit .. "2_ref", "length2_ref" --[[TODO transition]]},
uspan = {"mspan", "kmspan"},
uspan = {"mspan", "kmspan"},
place = {"place", "bridge", "tunnel"},
place = {"place", "bridge", "tunnel"},
Line 278: Line 279:
-- begin transition code
-- begin transition code
moduleArgs.primary_topic = "no"
moduleArgs.primary_topic = "no"
moduleArgs.sub1name = sub1name[args.state] or "County"
moduleArgs.sub1name = sub1name[args.state] or " County"
moduleArgs.region_special = region_special[args.state]
moduleArgs.region_special = region_special[args.state]
moduleArgs.region = mw.loadData("Module:Jct/statename")[args.state]
moduleArgs.region = mw.loadData("Module:Jct/statename")[args.state]
Line 335: Line 336:
end
end


local coreModule = require("Module:Jctint/core")
local coreModule = require("Module:Jctint")
local coreResult = coreModule._jctint(moduleArgs)
local coreResult = coreModule._jctint(moduleArgs)