Module:Namespace detect/data

From The Pinched Universe
Revision as of 16:05, 25 June 2024 by Hori (talk | contribs) (Created page with "local a=require('Module:Namespace detect/config')local function b(c,d,e)if d~=e then c[#c+1]=d end end;local f={'main','talk','other','subjectns','demospace','demopage'}local g={}for h,e in ipairs(f)do g[e]={e}end;for e,c in pairs(g)do local i=a[e]local j=type(i)if j=='string'then b(c,i,e)elseif j=='table'then for h,d in ipairs(i)do b(c,d,e)end end;a[e]=nil end;local function k()local l={}local m=mw.site.subjectNamespaces[0].name;m=mw.ustring.lower(m)l[m]=mw.clone(g.main...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The documentation for this module is not intended to be hosted on this wiki.

However, you might be able to find it at one of the following locations:

local a=require('Module:Namespace detect/config')local function b(c,d,e)if d~=e then c[#c+1]=d end end;local f={'main','talk','other','subjectns','demospace','demopage'}local g={}for h,e in ipairs(f)do g[e]={e}end;for e,c in pairs(g)do local i=a[e]local j=type(i)if j=='string'then b(c,i,e)elseif j=='table'then for h,d in ipairs(i)do b(c,d,e)end end;a[e]=nil end;local function k()local l={}local m=mw.site.subjectNamespaces[0].name;m=mw.ustring.lower(m)l[m]=mw.clone(g.main)l['talk']=mw.clone(g.talk)for n,o in pairs(mw.site.subjectNamespaces)do if n~=0 then local p=mw.ustring.lower(o.name)local q=mw.ustring.lower(o.canonicalName)l[p]={p}if q~=p then table.insert(l[p],q)end;for r,s in ipairs(o.aliases)do table.insert(l[p],mw.ustring.lower(s))end end end;return l end;return{argKeys=g,cfg=a,mappings=k()}