Module:Documentation/config: Difference between revisions

    From Nonbinary Wiki
    m>Mr. Stradivarius
    (add sandbox category message)
     
    (47 intermediate revisions by 25 users not shown)
    Line 9: Line 9:


    local cfg = {} -- Do not edit this line.
    local cfg = {} -- Do not edit this line.
    ----------------------------------------------------------------------------------------------------
    -- Environment configuration
    ----------------------------------------------------------------------------------------------------
    -- cfg.errorPrefix
    -- The prefix before any error messages found by the script.
    cfg.errorPrefix = '[[Module:Documentation]] error:'
    -- cfg.errorCategory
    -- The category pages are placed into if any errors are found.
    cfg.errorCategory = 'Documentation template invocations with errors'
    ----------------------------------------------------------------------------------------------------
    -- Environment configuration
    ----------------------------------------------------------------------------------------------------
    -- cfg.titleArgError
    -- The error message to display if the "page" argument does not result in a
    -- valid title.
    cfg.titleArgError = '$1 is not a valid title'


    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------
    Line 35: Line 14:
    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------


    -- cfg.protectionTemplate
    -- cfg['protection-reason-edit']
    -- The name of the template that displays the protection icon (a padlock on enwiki).
    -- The protection reason for edit-protected templates to pass to
    cfg.protectionTemplate = 'pp-template'
    -- [[Module:Protection banner]].
     
    cfg['protection-reason-edit'] = 'template'
    -- cfg.protectionTemplateArgs
    -- Any arguments to send to the protection template.
    cfg.protectionTemplateArgs = {docusage = 'yes'}


    --[[
    ----------------------------------------------------------------------------------------------------
    ----------------------------------------------------------------------------------------------------
    -- Sandbox notice configuration
    -- Sandbox notice configuration
    Line 48: Line 25:
    -- 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.sandboxSubpage. The following settings configure the
    -- 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.sandboxNoticeImage
    -- cfg['sandbox-notice-image']
    -- The image displayed in the sandbox notice.
    -- The image displayed in the sandbox notice.
    cfg.sandboxNoticeImage = '[[Image:Sandbox.png|50px|alt=|link=]]'
    cfg['sandbox-notice-image'] = '[[File:Sandbox.svg|50px|alt=|link=]]'


    -- cfg.sandboxNoticeBlurb
    --[[
    -- The opening sentence of the sandbox notice. $1 is a link to the main template page.
    -- cfg['sandbox-notice-pagetype-template']
    cfg.sandboxNoticeBlurb = 'This is the [[Wikipedia:Template test cases|template sandbox]] page for $1.'
    -- cfg['sandbox-notice-pagetype-module']
    -- cfg['sandbox-notice-pagetype-other']
    -- The page type of the sandbox page. The message that is displayed depends on the current subject
    -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or
    -- cfg['sandbox-notice-diff-blurb'].
    --]]
    cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page'
    cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page'
    cfg['sandbox-notice-pagetype-other'] = 'sandbox page'


    -- cfg.sandboxNoticeDiffBlurb
    --[[
    -- cfg.sandboxNoticeDiffDisplay
    -- cfg['sandbox-notice-blurb']
    -- cfg.sandboxNoticeDiffBlurb is the opening sentence of the sandbox notice, with