Module:Template test case/config: Difference between revisions

Nothing to hide, but nothing to show you either.
Jump to navigation Jump to search
Content added Content deleted
m (Jackmcbarn moved page Module:Template test cases/config to Module:Template test case/config without leaving a redirect: along with parent module)
(add a messages table and expand the comments)
Line 1: Line 1:
-------------------------------------------------------------------------------
-- Module:Template test case/config
-- This module holds configuration data for [[Module:Template test case]].
-- This module holds configuration data for [[Module:Template test case]].
-------------------------------------------------------------------------------


return {
return {

-------------------------------------------------------------------------------
-- Options
-------------------------------------------------------------------------------


-- The magic word used in place of the template name when making nowiki
-- The magic word used in place of the template name when making nowiki
Line 12: Line 19:
sandboxSubpage = 'sandbox',
sandboxSubpage = 'sandbox',


-------------------------------------------------------------------------------
-- Messages
-------------------------------------------------------------------------------

msg = {

-- The error message to use if a nowiki invocation is used but the template
-- name magic word is not found.
['nowiki-magic-word-error'] = "the template invocation must include '$1' in " ..
"place of the template name",

},

-------------------------------------------------------------------------------
-- Wrapper template config.
-- Wrapper template config.
-- This is a table with wrapper template names as keys, and subtables
-- The wrapper template config is a table with wrapper template names as keys,
-- containing two fields:
-- and subtables containing two fields:
-- func - the function name to be used with that template. This must be a
-- func - the function name to be used with that template. This must be a
-- function exported by the main module. This is optional: the default
-- function exported by the main module. This is optional: the default
Line 20: Line 41:
-- args - a table of default arguments to be used with that template. This is
-- args - a table of default arguments to be used with that template. This is
-- is optional.
-- is optional.
-------------------------------------------------------------------------------

wrappers = {
wrappers = {
['Template:Test case'] = {},
['Template:Test case'] = {},
Line 32: Line 55:
}
}
}
}

-------------------------------------------------------------------------------
-- End config
-------------------------------------------------------------------------------


}
}

Revision as of 01:29, 28 November 2014

Documentation for this module may be created at Module:Template test case/config/doc

-------------------------------------------------------------------------------
--                    Module:Template test case/config
-- This module holds configuration data for [[Module:Template test case]].
-------------------------------------------------------------------------------

return {

-------------------------------------------------------------------------------
-- Options
-------------------------------------------------------------------------------

-- The magic word used in place of the template name when making nowiki
-- invocations.
templateNameMagicWord = '__TEMPLATENAME__',

-- The subpage that sandboxes are typically stored on. Used when loading
-- wrapper template config so that wrapper template sandboxes load the same
-- config as wrapper templates.
sandboxSubpage = 'sandbox',

-------------------------------------------------------------------------------
-- Messages
-------------------------------------------------------------------------------

msg = {

-- The error message to use if a nowiki invocation is used but the template
-- name magic word is not found.
['nowiki-magic-word-error'] = "the template invocation must include '$1' in " ..
	"place of the template name",

},

-------------------------------------------------------------------------------
-- Wrapper template config.
-- The wrapper template config is a table with wrapper template names as keys,
-- and subtables containing two fields:
--   func - the function name to be used with that template. This must be a
--       function exported by the main module. This is optional: the default
--       value is "table".
--   args - a table of default arguments to be used with that template. This is
--       is optional.
-------------------------------------------------------------------------------

wrappers = {
	['Template:Test case'] = {},
	['Template:Testcase table'] = {
		args = {_format = 'columns'}
	},
	['Template:Testcase rows'] = {
		args = {_format = 'rows'}
	},
	['Template:Test case nowiki'] = {
		func = 'nowiki'
	}
}

-------------------------------------------------------------------------------
-- End config
-------------------------------------------------------------------------------

}