Module:Pagetype/config: Difference between revisions

Content deleted Content added
add Flow boards
m +cfg for non-existent pages
 
(8 intermediate revisions by 5 users not shown)
Line 10:
--------------------------------------------------------------------------------
 
-- This table holds the valuesdefault topage usetypes for "main=true",each "user=true", etcnamespace. Keys to this
-- this table should be namespace parametersintegers that can be used withas keys to mw.site.namespaces.
-- [[Module:Namespace detect]].
cfg.pagetypes = {
['main'0] = 'article', -- Main namespace
['user'2] = 'user page',
['project'4] = 'project page',
['wikipedia'6] = 'project pagefile',
['wp'8] = 'projectinterface page', -- MediaWiki namespace
['file'10] = 'filetemplate',
['image'12] = 'filehelp page',
['mediawiki'14] = 'interface pagecategory',
['template'100] = 'templateportal',
['help'118] = 'help pagedraft',
['category'710] = 'Timed Text = 'categorypage',
['portal'828] = 'portalmodule',
['book'2300] = 'bookgadget',
[2302] = 'gadget definition',
['draft'] = 'draft',
['education program'-1] = 'education programspecial page',
['timedtext'-2] = 'Timedfile', Text-- page',Media namespace
['module'] = 'module',
['topic'] = 'topic',
['talk'] = 'talk page',
['special'] = 'special page',
['media'] = 'file'
}
 
-- This table holds the names of the namespaces to be looked up from cfg.pagetypes by
-- cfg.pagetypes by default.
cfg.defaultNamespaces = {
[0] = true, -- main
'main',
[6] = true, -- file
'file',
[10] = true, -- template
'template',
[14] = true, -- category
'category',
[828] = true, -- module
'module',
'book'
}
 
-- This table holds the names of the namespaces to be looked up from cfg.pagetypes if
-- cfg.pagetypes if cfg.defaultnsExtended is set.
cfg.extendedNamespaces = {
[0] = true, -- main
'main',
[2] = true, -- user
'user',
[4] = true, -- project
'project',
[6] = true, -- file
'file',
[8] = true, -- mediawiki
'mediawiki',
[10] = true, -- template
'template',
[12] = true, -- help
'category',
[14] = true, -- category
'help',
[100] = true, -- portal
'portal',
[118] = true, -- draft
'module',
[828] = true, -- module
'book',
}
'draft'
 
-- This table holds custom aliases for each namespace.
cfg.customNamespaceAliases = {
[0] = {'main'},
}
 
Line 78 ⟶ 75:
-- The value of cfg.defaultns to set no default namespaces.
cfg.defaultnsNone = 'none'
 
-- The parameter name to use for talk pages.
cfg.talk = 'talk'
 
-- The default value for talk pages.
cfg.talkDefault = 'talk page'
 
-- The parameter name to use for disambiguation pages page.
cfg.dab = 'dab'
 
-- The parameter name to use for non-existent pages.
cfg.ne = 'nonexistent'
cfg.neDefault = 'page'
 
cfg.softRedirect = 'soft_redirect'
cfg.softRedirectDefault = 'redirect'
 
cfg.sia = 'sia'
cfg.siaDefault = 'article'
 
cfg.rfd = 'redirect'
cfg.rfdDefault = 'redirect'
 
-- This table holds the different possible aliases for disambiguation-class
-- pages. These should be lower-case.
cfg.dabAliases = {
['disambiguation'] = true,
['disambig'] = true,
['disamb'] = true,
['dab'] = true,
}
 
Line 99 ⟶ 115:
-- This table holds the different possible aliases for N/A-class pages. These
-- should be lower-case.
cfg.naAliases = {'na', 'n/a'}
['na'] = true,
['n/a'] = true,
}
 
-- The default value for N/A-class pages.
Line 115 ⟶ 134:
-- The value used if the module detects an undefined namespace.
cfg.otherDefault = 'page'
 
-- The usual suffix denoting a plural.
cfg.plural = 's'
 
-- This table holds plurals not formed by a simple suffix.
cfg.irregularPlurals = {
["category"] = "categories"
}
 
--------------------------------------------------------------------------------