Module:Namespace detect/data: திருத்தங்களுக்கு இடையிலான வேறுபாடு

உள்ளடக்கம் நீக்கப்பட்டது உள்ளடக்கம் சேர்க்கப்பட்டது
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
Undid revision 601018314 by Mr. Stradivarius (talk) looks like that broke something
வரிசை 52:
-- }
--]]
local ustringLower = mw.ustring.lower
local tinsert = table.insert
local clone = mw.clone
forlocal nsid,subjectNamespaces ns= in pairs(mw.site.subjectNamespaces) do
local mappings = {}
local mainNsName = mw.site.mappings[ustringLower(subjectNamespaces[0].name)] = clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
mainNsName = mw.ustring.lower(mainNsName)
for nsid, ns in pairs(subjectNamespaces) do
mappings[mainNsName] = mw.clone(argKeys.main)
mappings['talk'] = mw.clone(argKeys.talk)
for nsid, ns in pairs(mw.site.subjectNamespaces) do
if nsid ~= 0 then -- Exclude main namespace.
local nsname = ustringLower(ns.name)
local canonicalName = ustringLower(ns.canonicalName)
mappings[nsname] = {mw.ustring.lower(nsname)}
if canonicalName ~= nsname then
table.inserttinsert(mappings[nsname], mw.ustring.lower(canonicalName))
end
for _, alias in ipairs(ns.aliases) do
table.inserttinsert(mappings[nsname], mw.ustring.lowerustringLower(alias))
end
end
"https://tamilar.wiki/w/Module:Namespace_detect/data" இலிருந்து மீள்விக்கப்பட்டது