Module:Documentation/config: Difference between revisions
convert messages to use hyphens instead of camelCase, in line with MediaWiki
m>Mr. Stradivarius (add diff message back for sandbox notice - some wikis might want this to be separate from the one in the end box) |
m>Mr. Stradivarius (convert messages to use hyphens instead of camelCase, in line with MediaWiki) |
||
| Line 14: | Line 14: | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
-- cfg | -- cfg['error-prefix'] | ||
-- The prefix before any error messages found by the script. | -- The prefix before any error messages found by the script. | ||
cfg | cfg['error-prefix'] = '[[Module:Documentation]] error:' | ||
-- cfg | -- cfg['error-category'] | ||
-- The category pages are placed into if any errors are found. | -- The category pages are placed into if any errors are found. | ||
cfg | cfg['error-category'] = 'Documentation template invocations with errors' | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
| Line 26: | Line 26: | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
-- cfg | -- cfg['title-arg-error'] | ||
-- The error message to display if the "page" argument does not result in a | -- The error message to display if the "page" argument does not result in a | ||
-- valid title. | -- valid title. | ||
cfg | cfg['title-arg-error'] = '$1 is not a valid title' | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
| Line 35: | Line 35: | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
-- cfg | -- cfg['protection-template'] | ||
-- The name of the template that displays the protection icon (a padlock on enwiki). | -- The name of the template that displays the protection icon (a padlock on enwiki). | ||
cfg | cfg['protection-template'] = 'pp-template' | ||
-- cfg | -- cfg['protection-template-args'] | ||
-- Any arguments to send to the protection template. | -- Any arguments to send to the protection template. | ||
cfg | cfg['protection-template-args'] = {docusage = 'yes'} | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
| Line 48: | Line 48: | ||
-- On sandbox pages the module can display a template notifying users that the current page is a | -- On sandbox pages the module can display a template notifying users that the current page is a | ||
-- sandbox, and the location of test cases pages, etc. The module decides whether the page is a | -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a | ||
-- sandbox or not based on the value of cfg | -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the | ||
-- messages that the notices contains. | -- messages that the notices contains. | ||
---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | ||
-- cfg | -- cfg['sandbox-notice-image'] | ||
-- The image displayed in the sandbox notice. | -- The image displayed in the sandbox notice. | ||
cfg | cfg['sandbox-notice-image'] = '[[Image:Sandbox.png|50px|alt=|link=]]' | ||
-- cfg | -- cfg['sandbox-notice-blurb'] | ||
-- The opening sentence of the sandbox notice. $1 is a link to the main template page. | -- The opening sentence of the sandbox notice. $1 is a link to the main template page. | ||
cfg | cfg['sandbox-notice-blurb'] = 'This is the [[Wikipedia:Template test cases|template sandbox]] page for $1.' | ||
-- cfg | -- cfg['sandbox-notice-diff-blurb'] | ||
-- cfg | -- cfg['sandbox-notice-diff-display'] | ||
-- cfg | -- cfg['sandbox-notice-diff-blurb'] is the opening sentence of the sandbox notice, with a diff link. $1 is a link | ||
-- to the main template page, and $2 is a diff link between the sandbox and the main template. The | -- to the main template page, and $2 is a diff link between the sandbox and the main template. The | ||
-- display value of the diff link is set by cfg | -- display value of the diff link is set by cfg['sandbox-notice-compare-link-display']. | ||
cfg | cfg['sandbox-notice-diff-blurb'] = 'This is the [[Wikipedia:Template test cases|template sandbox]] page for $1 ($2).' | ||
cfg | cfg['sandbox-notice-compare-link-display'] = 'diff' | ||
-- cfg | -- cfg['sandbox-notice-testcases-blurb'] | ||
-- cfg | -- cfg['sandbox-notice-testcases-link-display'] | ||
-- cfg | -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page | ||
-- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. | -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. | ||
-- cfg | -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. | ||
cfg | |||