Module:Adjacent stations/i18n and Module:Uses TemplateStyles/config: Difference between pages

From Polyphasic Sleep Wiki
(Difference between pages)
m 1 revision imported
 
m Protected "Module:Uses TemplateStyles/config": High-risk template or module (more info) ([Edit=Require autoconfirmed or confirmed access] (indefinite))
 
Line 1: Line 1:
local p = {}
local cfg = {} -- Don’t touch this line.


p = {
-- Subpage blacklist: these subpages will not be categorized (except for the
['en-GB'] = {
-- error category, which is always added if there is an error).
['preceding'] = function(s)
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have
return s and 'Preceding ' .. s
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,
end,
-- so they *will* have categories. All rules should be in the
['following'] = function(s)
--   ['<subpage name>'] = true,
return s and 'Following ' .. s
-- format.
end,
cfg['subpage_blacklist'] = {
['stop_noun'] = 'station',
['doc'] = true,
['nonstop_past'] = function(s)
['sandbox'] = true,
return s and s .. ' did not stop here'
['sandbox2'] = true,
end,
['testcases'] = true,
['nonstop_present'] = function(s)
return s and s .. ' does not stop here'
end,
['comma'] = function(s)
return s and ', ' .. s
end,
['or'] = function(s)
return s and ' or ' .. s
end,
['via-first'] = false, -- If the «via» text comes before termini, change to «true»
['via'] = function(s)
return s and ' via&nbsp;' .. s
end,
['comma-format'] = ',%s+',
['or-format'] = '%s+or%s+',
['via-format'] = '%s+via%s+(.+)$', -- first match is station name
['towards'] = function(s)
return s and 'towards ' .. s
end,
['through'] = function(s)
return s and 'through to ' .. s
end,
['reverse'] = 'Reverses direction',
['oneway'] = 'One-way operation',
['terminus'] = 'Terminus',
['transfer'] = function(s)
return s and 'transfer at ' .. s
end,
['error_duplicate'] = function(s)
return s and 'Same row number used multiple times for ' .. s
end,
['error_format'] = 'Station format table missing in data page',
['error_line'] = 'Lines table missing in data module',
['error_missing'] = function(s)
return s and '"' .. (s or '') .. '" is missing from the data page'
end,
['error_unknown'] = function(s)
return s and 'Unknown line "' .. (s or '') .. '"'
end
}
}
}


p['en-US'] = mw.clone(p['en-GB'])
-- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the
p['en-US']['towards'] = function(s) return s and 'toward ' .. s end
-- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css
-- Set to nil to disable sandbox links.
cfg['sandbox_title'] = 'sandbox'


return p
-- Error category: this category is added if the module call contains errors
-- (e.g. no stylesheet listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = 'Uses TemplateStyles templates with errors'
 
-- Default category: this category is added if no custom category is specified
-- in module/template call. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Templates using TemplateStyles'
 
-- Protection conflict category: this category is added if the protection level
-- of any stylesheet differs from the one of the template. A category name
-- without namespace, or nil to disable categorization (not recommended).
cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level'
 
-- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil
-- to disable padlock check.
cfg['padlock_pattern'] = '{{pp-'
 
-- Missing padlock category: this category is added if a protected stylesheet
-- doesn’t contain any padlock template (specified by the above Lua pattern).
-- A category name without namespace (no nil allowed) if the pattern is not nil,
-- unused (and thus may be nil) otherwise.
cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks'
 
return cfg -- Don’t touch this line.

Revision as of 18:00, 12 July 2020

Documentation for this module may be created at Module:Uses TemplateStyles/config/doc

local cfg = {} -- Don’t touch this line.

-- Subpage blacklist: these subpages will not be categorized (except for the
-- error category, which is always added if there is an error).
-- For example “Template:Foo/doc” matches the `doc = true` rule, so it will have
-- no categories. “Template:Foo” and “Template:Foo/documentation” match no rules,
-- so they *will* have categories. All rules should be in the
--   ['<subpage name>'] = true,
-- format.
cfg['subpage_blacklist'] = {
	['doc'] = true,
	['sandbox'] = true,
	['sandbox2'] = true,
	['testcases'] = true,
}

-- Sandbox title: if the stylesheet’s title is <template>/<stylesheet>.css, the
-- stylesheet’s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css
-- Set to nil to disable sandbox links.
cfg['sandbox_title'] = 'sandbox'

-- Error category: this category is added if the module call contains errors
-- (e.g. no stylesheet listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = 'Uses TemplateStyles templates with errors'

-- Default category: this category is added if no custom category is specified
-- in module/template call. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Templates using TemplateStyles'

-- Protection conflict category: this category is added if the protection level
-- of any stylesheet differs from the one of the template. A category name
-- without namespace, or nil to disable categorization (not recommended).
cfg['protection_conflict_category'] = 'Templates using TemplateStyles with a different protection level'

-- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil
-- to disable padlock check.
cfg['padlock_pattern'] = '{{pp-'

-- Missing padlock category: this category is added if a protected stylesheet
-- doesn’t contain any padlock template (specified by the above Lua pattern).
-- A category name without namespace (no nil allowed) if the pattern is not nil,
-- unused (and thus may be nil) otherwise.
cfg['missing_padlock_category'] = 'Templates using TemplateStyles without padlocks'

return cfg -- Don’t touch this line.