Changes
IMO, aliasing variables like that makes readability worse
-- }
--]]
local mappings = {}
mappings[ustringLowermw.ustring.lower(mw.site.subjectNamespaces[0].name)] = {cfg.main} mappings[cfg.talk] = {cfg.talk} for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = ustringLowermw.ustring.lower(ns.name) local canonicalName = ustringLowermw.ustring.lower(ns.canonicalName)
mappings[nsname] = {nsname}
if canonicalName ~= nsname then
end
for _, alias in ipairs(ns.aliases) do
end
end