Module:Namespace detect/data: Difference between revisions
m
1 revision imported from loginwiki:Module:Namespace_detect/data: Updating template with latest edits from loginwiki
Enwikipedia>Mr. Stradivarius (give the argKeys table global scope so that getParamMappings can access it without having to process the cfg table again) |
(username removed) m (1 revision imported from loginwiki:Module:Namespace_detect/data: Updating template with latest edits from loginwiki) |
||
(19 intermediate revisions by 14 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
|
(username removed)