Changes
bug fix - use the demospace parameter as both key and value in the argKeys table
-------------------------------------------------------------------------------------------------- Namespace detect data ---- Configuration This module holds data for [[Module:Namespace detect]] to be loaded per ---- Language-specific parameter names can be set herepage, rather than per #invoke, for performance reasons. ------------------------------------------------------------------------------------------------------
local cfg = {}require('Module:Namespace detect/config')
-- Get a table of parameters to query for each default parameter name.-- This allows wikis to customise parameter displays names in talk namespaces:the cfg table while-- ensuring that default parameter names will always work. The cfgtable-- values can be added as a string, or as an array of strings.talk = 'talk'
local function getParamMappings()
--[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]]
local mappings = {}
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
end
return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings()}