m
1 revision imported from wikipedia:Module:Namespace_detect/data
(give the argKeys table global scope so that getParamMappings can access it without having to process the cfg table again) |
m (1 revision imported from wikipedia:Module:Namespace_detect/data) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 18:
-- values can be added as a string, or as an array of strings.
local
'demopage'
}
local argKeys = {}
for i, defaultKey in ipairs(defaultKeys) do
argKeys[defaultKey] = {defaultKey}
end
for defaultKey, t in pairs(argKeys) do
Line 52 ⟶ 57:
-- }
--]]
local subjectNamespaces = mw.site.subjectNamespaces▼
local mappings = {}
mainNsName = mw.ustring.lower(mainNsName)
mappings['talk'] = clone(argKeys.talk)▼
mappings[mainNsName] = mw.clone(argKeys.main)
▲ mappings['talk'] = mw.clone(argKeys.talk)
if nsid ~= 0 then -- Exclude main namespace.
local nsname =
local canonicalName =
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
end
for _, alias in ipairs(ns.aliases) do
end
end
|