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 (avoid using local variables to save table lookups per Jackmcbarn's suggestion, and because this will be cached with mw.loadData so performance of this function is not such a worry) |
(username removed) m (1 revision imported from loginwiki:Module:Namespace_detect/data: Updating template with latest edits from loginwiki) |
||
(18 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 59 ⟶ 64:
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = mw.ustring.lower(ns.name)
local canonicalName = mw.ustring.lower(ns.canonicalName)
mappings[nsname] = {
if canonicalName ~= nsname then
table.insert(mappings[nsname],
end
for _, alias in ipairs(ns.aliases) do
|
(username removed)