Difference between revisions of "Module:Message box/configuration/sandbox"

From blackwiki
Jump to navigation Jump to search
blackwiki>Guillaume (WMF)
m (test: add machine-readable markers as part of the File metadata cleanup drive.)
blackwiki>Jackmcbarn
(make it all one big table)
Line 5: Line 5:
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
  
 +
return {
 +
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
 
-- Box data
 
-- Box data
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
  
−
local boxData = {
+
boxData = {
−
+
−
ambox = {
+
ambox = {
−
types = {
+
types = {
−
speedy = {
+
speedy = {
−
class = 'ambox-speedy',
+
class = 'ambox-speedy',
−
image = 'Ambox warning pn.svg'
+
image = 'Ambox warning pn.svg'
 +
},
 +
delete = {
 +
class = 'ambox-delete',
 +
image = 'Ambox warning pn.svg'
 +
},
 +
content = {
 +
class = 'ambox-content',
 +
image = 'Ambox important.svg'
 +
},
 +
style = {
 +
class = 'ambox-style',
 +
image = 'Edit-clear.svg'
 +
},
 +
move = {
 +
class = 'ambox-move',
 +
image = 'Merge-split-transwiki default.svg'
 +
},
 +
protection = {
 +
class = 'ambox-protection',
 +
image = 'Padlock-silver-medium.svg'
 +
},
 +
notice = {
 +
class = 'ambox-notice',
 +
image = 'Information icon4.svg'
 +
}
 
},
 
},
−
delete = {
+
default                    = 'notice',
−
class = 'ambox-delete',
+
allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
−
image = 'Ambox warning pn.svg'
+
allowSmall                  = true,
−
},
+
smallParam                  = 'left',
−
content = {
+
smallClass                  = 'mbox-small-left',
−
class = 'ambox-content',
+
substCheck                  = true,
−
image = 'Ambox important.svg'
+
classes                    = {'metadata', 'plainlinks', 'ambox'},
−
},
+
imageEmptyCell              = true,
−
style = {
+
imageCheckBlank            = true,
−
class = 'ambox-style',
+
imageSmallSize              = '20x20px',
−
image = 'Edit-clear.svg'
+
imageCellDiv                = true,
−
},
+
useCollapsibleTextFields    = true,
−
move = {
+
imageRightNone              = true,
−
class = 'ambox-move',
+
sectionDefault              = 'article',
−
image = 'Merge-split-transwiki default.svg'
+
allowMainspaceCategories    = true,
 +
templateCategory            = 'Article message templates',
 +
        templateCategoryRequireName = true,
 +
templateErrorCategory      = 'Article message templates with missing parameters',
 +
templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
 +
},
 +
 +
cmbox = {
 +
types = {
 +
speedy = {
 +
class = 'cmbox-speedy',
 +
image = 'Ambox warning pn.svg'
 +
},
 +
delete = {
 +
class = 'cmbox-delete',
 +
image = 'Ambox warning pn.svg'
 +
},
 +
content = {
 +
class = 'cmbox-content',
 +
image = 'Ambox important.svg'
 +
},
 +
style = {
 +
class = 'cmbox-style',
 +
image = 'Edit-clear.svg'
 +
},
 +
move = {
 +
class = 'cmbox-move',
 +
image = 'Merge-split-transwiki default.svg'
 +
},
 +
protection = {
 +
class = 'cmbox-protection',
 +
image = 'Padlock-silver-medium.svg'
 +
},
 +
notice = {
 +
class = 'cmbox-notice',
 +
image = 'Information icon4.svg'
 +
}
 
},
 
},
−
protection = {
+
default              = 'notice',
−
class = 'ambox-protection',
+
showInvalidTypeError = true,
−
image = 'Padlock-silver-medium.svg'
+
classes              = {'plainlinks', 'cmbox'},
−
},
+
imageEmptyCell      = true
−
notice = {
 
−
class = 'ambox-notice',
 
−
image = 'Information icon4.svg'
 
−
}
 
 
},
 
},
−
default                    = 'notice',
+
−
allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
+
fmbox = {
−
allowSmall                  = true,
+
types = {
−
smallParam                  = 'left',
+
warning = {
−
smallClass                  = 'mbox-small-left',
+
class = 'fmbox-warning',
−
substCheck                  = true,
+
image = 'Cmbox deletion.png'
−
classes                    = {'metadata', 'plainlinks', 'ambox'},
+
},
−
imageEmptyCell              = true,
+
editnotice = {
−
imageCheckBlank            = true,
+
class = 'fmbox-editnotice',
−
imageSmallSize              = '20x20px',
+
image = 'Imbox notice.png'
−
imageCellDiv                = true,
+
},
−
useCollapsibleTextFields    = true,
+
system = {
−
imageRightNone              = true,
+
class = 'fmbox-system',
−
sectionDefault              = 'article',
+
image = 'Imbox notice.png'
−
allowMainspaceCategories    = true,
+
}
−
templateCategory            = 'Article message templates',
 
−
        templateCategoryRequireName = true,
 
−
templateErrorCategory      = 'Article message templates with missing parameters',
 
−
templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
 
−
},
 
−
 
−
cmbox = {
 
−
types = {
 
−
speedy = {
 
−
class = 'cmbox-speedy',
 
−
image = 'Ambox warning pn.svg'
 
−
},
 
−
delete = {
 
−
class = 'cmbox-delete',
 
−
image = 'Ambox warning pn.svg'
 
−
},
 
−
content = {
 
−
class = 'cmbox-content',
 
−
image = 'Ambox important.svg'
 
−
},
 
−
style = {
 
−
class = 'cmbox-style',
 
−
image = 'Edit-clear.svg'
 
−
},
 
−
move = {
 
−
class = 'cmbox-move',
 
−
image = 'Merge-split-transwiki default.svg'
 
−
},
 
−
protection = {
 
−
class = 'cmbox-protection',
 
−
image = 'Padlock-silver-medium.svg'
 
 
},
 
},
−
notice = {
+
default              = 'system',
−
class = 'cmbox-notice',
+
showInvalidTypeError = true,
−
image = 'Information icon4.svg'
+
allowId                = true,
−
}
+
classes              = {'plainlinks', 'fmbox'},
 +
imageEmptyCell      = false,
 +
imageRightNone      = false
 
},
 
},
−
default              = 'notice',
+
−
showInvalidTypeError = true,
+
imbox = {
−
classes              = {'plainlinks', 'cmbox'},
+
types = {
−
imageEmptyCell      = true
+
speedy = {
−
},
+
class = 'imbox-speedy',
−
+
image = 'Imbox speedy deletion.png'
−
fmbox = {
+
},
−
types = {
+
delete = {
−
warning = {
+
class = 'imbox-delete',
−
class = 'fmbox-warning',
+
image = 'Imbox deletion.png'
−
image = 'Cmbox deletion.png'
+
},
−
},
+
content = {
−
editnotice = {
+
class = 'imbox-content',
−
class = 'fmbox-editnotice',
+
image = 'Imbox content.png'
−
image = 'Imbox notice.png'
+
},
 +
style = {
 +
class = 'imbox-style',
 +
image = 'Edit-clear.svg'
 +
},
 +
move = {
 +
class = 'imbox-move',
 +
image = 'Imbox move.png'
 +
},
 +
protection = {
 +
class = 'imbox-protection',
 +
image = 'Imbox protection.png'
 +
},
 +
license = {
 +
class = 'imbox-license licensetpl',
 +
image = 'Imbox license.png'
 +
},
 +
featured = {
 +
class = 'imbox-featured',
 +
image = 'Imbox featured.png'
 +
},
 +
notice = {
 +
class = 'imbox-notice',
 +
image = 'Imbox notice.png'
 +
}
 
},
 
},
−
system = {
+
default              = 'notice',
−
class = 'fmbox-system',
+
showInvalidTypeError = true,
−
image = 'Imbox notice.png'
+
classes              = {'imbox'},
−
}
+
usePlainlinksParam  = true,
 +
imageEmptyCell      = true,
 +
below                = true,
 +
templateCategory    = 'File message boxes'
 
},
 
},
−
default              = 'system',
+
−
showInvalidTypeError = true,
+
ombox = {
−
allowId                = true,
+
types = {
−
classes              = {'plainlinks', 'fmbox'},
+
speedy = {
−
imageEmptyCell      = false,
+
class = 'ombox-speedy',
−
imageRightNone      = false
+
image = 'Imbox speedy deletion.png'
−
},
+
},
−
+
delete = {
−
imbox = {
+
class = 'ombox-delete',
−
types = {
+
image = 'Imbox deletion.png'
−
speedy = {
+
},
−
class = 'imbox-speedy',
+
content = {
−
image = 'Imbox speedy deletion.png'
+
class = 'ombox-content',
−
},
+
image = 'Imbox content.png'
−
delete = {
+
},
−
class = 'imbox-delete',
+
style = {
−
image = 'Imbox deletion.png'
+
class = 'ombox-style',
−
},
+
image = 'Edit-clear.svg'
−
content = {
+
},
−
class = 'imbox-content',
+
move = {
−
image = 'Imbox content.png'
+
class = 'ombox-move',
 +
image = 'Imbox move.png'
 +
},
 +
protection = {
 +
class = 'ombox-protection',
 +
image = 'Imbox protection.png'
 +
},
 +
notice = {
 +
class = 'ombox-notice',
 +
image = 'Imbox notice.png'
 +
}
 
},
 
},
−
style = {
+
default              = 'notice',
−
class = 'imbox-style',
+
showInvalidTypeError = true,
−
image = 'Edit-clear.svg'
+
classes              = {'plainlinks', 'ombox'},
−
},
+
allowSmall          = true,
−
move = {
+
imageEmptyCell      = true,
−
class = 'imbox-move',
+
imageRightNone      = true
−
image = 'Imbox move.png'
 
−
},
 
−
protection = {
 
−
class = 'imbox-protection',
 
−
image = 'Imbox protection.png'
 
−
},
 
−
license = {
 
−
class = 'imbox-license licensetpl',
 
−
image = 'Imbox license.png'
 
−
},
 
−
featured = {
 
−
class = 'imbox-featured',
 
−
image = 'Imbox featured.png'
 
−
},
 
−
notice = {
 
−
class = 'imbox-notice',
 
−
image = 'Imbox notice.png'
 
−
}
 
 
},
 
},
−
default              = 'notice',
+
−
showInvalidTypeError = true,
+
tmbox = {
−
classes              = {'imbox'},
+
types = {
−
usePlainlinksParam  = true,
+
speedy = {
−
imageEmptyCell      = true,
+
class = 'tmbox-speedy',
−
below                = true,
+
image = 'Imbox speedy deletion.png'
−
templateCategory    = 'File message boxes'
+
},
−
},
+
delete = {
−
+
class = 'tmbox-delete',
−
ombox = {
+
image = 'Imbox deletion.png'
−
types = {
+
},
−
speedy = {
+
content = {
−
class = 'ombox-speedy',
+
class = 'tmbox-content',
−
image = 'Imbox speedy deletion.png'
+
image = 'Imbox content.png'
−
},
+
},
−
delete = {
+
style = {
−
class = 'ombox-delete',
+
class = 'tmbox-style',
−
image = 'Imbox deletion.png'
+
image = 'Edit-clear.svg '
−
},
+
},
−
content = {
+
move = {
−
class = 'ombox-content',
+
class = 'tmbox-move',
−
image = 'Imbox content.png'
+
image = 'Imbox move.png'
−
},
+
},
−
style = {
+
protection = {
−
class = 'ombox-style',
+
class = 'tmbox-protection',
−
image = 'Edit-clear.svg'
+
image = 'Imbox protection.png'
−
},
+
},
−
move = {
+
notice = {
−
class = 'ombox-move',
+
class = 'tmbox-notice',
−
image = 'Imbox move.png'
+
image = 'Imbox notice.png'
−
},
+
}
−
protection = {
 
−
class = 'ombox-protection',
 
−
image = 'Imbox protection.png'
 
 
},
 
},
−
notice = {
+
default              = 'notice',
−
class = 'ombox-notice',
+
showInvalidTypeError = true,
−
image = 'Imbox notice.png'
+
classes              = {'plainlinks', 'tmbox'},
−
}
+
allowId              = true,
−
},
+
allowSmall          = true,
−
default              = 'notice',
+
imageRightNone      = true,
−
showInvalidTypeError = true,
+
imageEmptyCell      = true,
−
classes              = {'plainlinks', 'ombox'},
+
imageEmptyCellStyle  = true,
−
allowSmall          = true,
+
templateCategory    = 'Talk message boxes'
−
imageEmptyCell      = true,
+
}
−
imageRightNone      = true
 
 
},
 
},
−
 
−
tmbox = {
 
−
types = {
 
−
speedy = {
 
−
class = 'tmbox-speedy',
 
−
image = 'Imbox speedy deletion.png'
 
−
},
 
−
delete = {
 
−
class = 'tmbox-delete',
 
−
image = 'Imbox deletion.png'
 
−
},
 
−
content = {
 
−
class = 'tmbox-content',
 
−
image = 'Imbox content.png'
 
−
},
 
−
style = {
 
−
class = 'tmbox-style',
 
−
image = 'Edit-clear.svg '
 
−
},
 
−
move = {
 
−
class = 'tmbox-move',
 
−
image = 'Imbox move.png'
 
−
},
 
−
protection = {
 
−
class = 'tmbox-protection',
 
−
image = 'Imbox protection.png'
 
−
},
 
−
notice = {
 
−
class = 'tmbox-notice',
 
−
image = 'Imbox notice.png'
 
−
}
 
−
},
 
−
default              = 'notice',
 
−
showInvalidTypeError = true,
 
−
classes              = {'plainlinks', 'tmbox'},
 
−
allowId              = true,
 
−
allowSmall          = true,
 
−
imageRightNone      = true,
 
−
imageEmptyCell      = true,
 
−
imageEmptyCellStyle  = true,
 
−
templateCategory    = 'Talk message boxes'
 
−
}
 
−
}
 
  
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
Line 257: Line 259:
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
  
−
local msg = {}
+
msg = {
−
 
+
-- Output for boxes where a "type" parameter is specified that is not present
−
-- Output for boxes where a "type" parameter is specified that is not present
+
-- in the list of types in the box data.
−
-- in the list of types in the box data.
+
['invalid-type-error'] = 'This message box is using an invalid "type=%s" ' ..
−
msg['invalid-type-error'] = 'This message box is using an invalid "type=%s" ' ..
+
'parameter and needs fixing.'
−
'parameter and needs fixing.'
+
}
  
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
Line 268: Line 270:
 
--------------------------------------------------------------------------------
 
--------------------------------------------------------------------------------
  
−
return {
 
−
boxData = boxData,
 
−
msg = msg
 
 
}
 
}

Revision as of 19:44, 28 November 2014

Documentation for this module may be created at Module:Message box/configuration/sandbox/doc

--------------------------------------------------------------------------------
--                          Message box configuration                         --
--                                                                            --
-- This module contains configuration data for [[Module:Message box]].        --
--------------------------------------------------------------------------------

return {
	
--------------------------------------------------------------------------------
-- Box data
--------------------------------------------------------------------------------

	boxData = {
		
		ambox = {
			types = {
				speedy = {
					class = 'ambox-speedy',
					image = 'Ambox warning pn.svg'
				},
				delete = {
					class = 'ambox-delete',
					image = 'Ambox warning pn.svg'
				},
				content = {
					class = 'ambox-content',
					image = 'Ambox important.svg'
				},
				style = {
					class = 'ambox-style',
					image = 'Edit-clear.svg'
				},
				move = {
					class = 'ambox-move',
					image = 'Merge-split-transwiki default.svg'
				},
				protection = {
					class = 'ambox-protection',
					image = 'Padlock-silver-medium.svg'
				},
				notice = {
					class = 'ambox-notice',
					image = 'Information icon4.svg'
				}
			},
			default                     = 'notice',
			allowBlankParams            = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'},
			allowSmall                  = true,
			smallParam                  = 'left',
			smallClass                  = 'mbox-small-left',
			substCheck                  = true,
			classes                     = {'metadata', 'plainlinks', 'ambox'},
			imageEmptyCell              = true,
			imageCheckBlank             = true,
			imageSmallSize              = '20x20px',
			imageCellDiv                = true,
			useCollapsibleTextFields    = true,
			imageRightNone              = true,
			sectionDefault              = 'article',
			allowMainspaceCategories    = true,
			templateCategory            = 'Article message templates',
		        templateCategoryRequireName = true,
			templateErrorCategory       = 'Article message templates with missing parameters',
			templateErrorParamsToCheck  = {'issue', 'fix', 'subst'}
		},
		
		cmbox = {
			types = {
				speedy = {
					class = 'cmbox-speedy',
					image = 'Ambox warning pn.svg'
				},
				delete = {
					class = 'cmbox-delete',
					image = 'Ambox warning pn.svg'
				},
				content = {
					class = 'cmbox-content',
					image = 'Ambox important.svg'
				},
				style = {
					class = 'cmbox-style',
					image = 'Edit-clear.svg'
				},
				move = {
					class = 'cmbox-move',
					image = 'Merge-split-transwiki default.svg'
				},
				protection = {
					class = 'cmbox-protection',
					image = 'Padlock-silver-medium.svg'
				},
				notice = {
					class = 'cmbox-notice',
					image = 'Information icon4.svg'
				}
			},
			default              = 'notice',
			showInvalidTypeError = true,
			classes              = {'plainlinks', 'cmbox'},
			imageEmptyCell       = true
		},
		
		fmbox = {
			types = {
				warning = {
					class = 'fmbox-warning',
					image = 'Cmbox deletion.png'
				},
				editnotice = {
					class = 'fmbox-editnotice',
					image = 'Imbox notice.png'
				},
				system = {
					class = 'fmbox-system',
					image = 'Imbox notice.png'
				}
			},
			default              = 'system',
			showInvalidTypeError = true,
			allowId                = true,
			classes              = {'plainlinks', 'fmbox'},
			imageEmptyCell       = false,
			imageRightNone       = false
		},
		
		imbox = {
			types = {
				speedy = {
					class = 'imbox-speedy',
					image = 'Imbox speedy deletion.png'
				},
				delete = {
					class = 'imbox-delete',
					image = 'Imbox deletion.png'
				},
				content = {
					class = 'imbox-content',
					image = 'Imbox content.png'
				},
				style = {
					class = 'imbox-style',
					image = 'Edit-clear.svg'
				},
				move = {
					class = 'imbox-move',
					image = 'Imbox move.png'
				},
				protection = {
					class = 'imbox-protection',
					image = 'Imbox protection.png'
				},
				license = {
					class = 'imbox-license licensetpl',
					image = 'Imbox license.png'
				},
				featured = {
					class = 'imbox-featured',
					image = 'Imbox featured.png'
				},
				notice = {
					class = 'imbox-notice',
					image = 'Imbox notice.png'
				}
			},
			default              = 'notice',
			showInvalidTypeError = true,
			classes              = {'imbox'},
			usePlainlinksParam   = true,
			imageEmptyCell       = true,
			below                = true,
			templateCategory     = 'File message boxes'
		},
		
		ombox = {
			types = {
				speedy = {
					class = 'ombox-speedy',
					image = 'Imbox speedy deletion.png'
				},
				delete = {
					class = 'ombox-delete',
					image = 'Imbox deletion.png'
				},
				content = {
					class = 'ombox-content',
					image = 'Imbox content.png'
				},
				style = {
					class = 'ombox-style',
					image = 'Edit-clear.svg'
				},
				move = {
					class = 'ombox-move',
					image = 'Imbox move.png'
				},
				protection = {
					class = 'ombox-protection',
					image = 'Imbox protection.png'
				},
				notice = {
					class = 'ombox-notice',
					image = 'Imbox notice.png'
				}
			},
			default              = 'notice',
			showInvalidTypeError = true,
			classes              = {'plainlinks', 'ombox'},
			allowSmall           = true,
			imageEmptyCell       = true,
			imageRightNone       = true
		},
		
		tmbox = {
			types = {
				speedy = {
					class = 'tmbox-speedy',
					image = 'Imbox speedy deletion.png'
				},
				delete = {
					class = 'tmbox-delete',
					image = 'Imbox deletion.png'
				},
				content = {
					class = 'tmbox-content',
					image = 'Imbox content.png'
				},
				style = {
					class = 'tmbox-style',
					image = 'Edit-clear.svg '
				},
				move = {
					class = 'tmbox-move',
					image = 'Imbox move.png'
				},
				protection = {
					class = 'tmbox-protection',
					image = 'Imbox protection.png'
				},
				notice = {
					class = 'tmbox-notice',
					image = 'Imbox notice.png'
				}
			},
			default              = 'notice',
			showInvalidTypeError = true,
			classes              = {'plainlinks', 'tmbox'},
			allowId              = true,
			allowSmall           = true,
			imageRightNone       = true,
			imageEmptyCell       = true,
			imageEmptyCellStyle  = true,
			templateCategory     = 'Talk message boxes'
		}
	},

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

	msg = {
		-- Output for boxes where a "type" parameter is specified that is not present
		-- in the list of types in the box data.
		['invalid-type-error'] = 'This message box is using an invalid "type=%s" ' ..
		'parameter and needs fixing.'
	}

--------------------------------------------------------------------------------
-- End configuration
--------------------------------------------------------------------------------

}