Module:Citation/CS1/Configuration: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Synch from sandbox;) |
(Synch from sandbox;) |
||
Line 315: | Line 315: | ||
local keywords = { |
local keywords = { |
||
['yes_true_y'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription |
['yes_true_y'] = {'yes', 'true', 'y'}, -- ignore-isbn-error, last-author-amp, no-tracking, nopp, registration, subscription |
||
-- ['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped', 'unfit no archive', 'usurped no archive'}, -- hidden 2016-04-10; see Help_talk:Citation_Style_1#Recycled_urls |
|||
['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped'}, |
['deadurl'] = {'yes', 'true', 'y', 'no', 'unfit', 'usurped'}, |
||
['mode'] = {'cs1', 'cs2'}, |
['mode'] = {'cs1', 'cs2'}, |
||
Line 321: | Line 322: | ||
['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all'} |
['date-format'] = {'dmy', 'dmy-all', 'mdy', 'mdy-all', 'ymd', 'ymd-all'} |
||
} |
} |
||
--[[--------------------------< S T R I P M A R K E R S >------------------------------------------------------ |
|||
Common pattern definition location for stripmarkers so that we don't have to go hunting for them if (when) |
|||
MediaWiki changes their form. |
|||
]] |
|||
local stripmarkers = { |
|||
['any'] = '\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127', -- capture returns name of stripmarker |
|||
['math'] = '\127[^\127]*UNIQ%-%-math%-[%a%d]+%-QINU[^\127]*\127' -- math stripmarkers used in coins_cleanup() and coins_replace_math_stripmarker() |
|||
} |
|||
Line 341: | Line 355: | ||
local invisible_chars = { |
local invisible_chars = { |
||
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD |
{'replacement', '\239\191\189'}, -- U+FFFD, EF BF BD |
||
-- {'apostrophe', '‍\226\128\138\039\226\128\139'}, -- apostrophe template: ‍ hair space ' zero-width space; not an error |
|||
{'apostrophe', '\226\128\138\039\226\128\139'}, -- apostrophe template: hair space ' zero-width space; (as of 2015-12-11) not an error |
|||
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D |
{'zero width joiner', '\226\128\141'}, -- U+200D, E2 80 8D |
||
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B |
{'zero width space', '\226\128\139'}, -- U+200B, E2 80 8B |
||
Line 350: | Line 362: | ||
{'line feed', '\010'}, -- U+000A (LF), 0A |
{'line feed', '\010'}, -- U+000A (LF), 0A |
||
{'carriage return', '\013'}, -- U+000D (CR), 0D |
{'carriage return', '\013'}, -- U+000D (CR), 0D |
||
{'stripmarker', stripmarkers.any}, -- stripmarker; may or may not be an error; capture returns the stripmaker type |
|||
{'stripmarker', '\127UNIQ%-%-(%a+)%-[%a%d]+%-QINU\127'}, -- stripmarker; may or may not be an error; capture returns the stripmaker type |
|||
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test |
{'delete', '\127'}, -- U+007F (DEL), 7F; must be done after stripmarker test |
||
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) |
{'C0 control', '[\000-\008\011\012\014-\031]'}, -- U+0000–U+001F (NULL–US), 00–1F (except HT, LF, CR (09, 0A, 0D)) |
||
Line 376: | Line 387: | ||
['etal'] = 'CS1 maint: Explicit use of et al.', |
['etal'] = 'CS1 maint: Explicit use of et al.', |
||
['extra_text'] = 'CS1 maint: Extra text', |
['extra_text'] = 'CS1 maint: Extra text', |
||
['ignore_isbn_err'] = 'CS1 maint: Ignored ISBN errors', -- $1 is authors or editors |
|||
['missing_pipe'] = 'CS1 maint: Missing pipe', |
|||
['mult_names'] = 'CS1 maint: Multiple names: $1', -- $1 is authors or editors |
|||
['unknown_lang'] = 'CS1 maint: Unrecognized language', |
['unknown_lang'] = 'CS1 maint: Unrecognized language', |
||
['untitled'] = 'CS1 maint: Untitled periodical', |
['untitled'] = 'CS1 maint: Untitled periodical', |
||
Line 388: | Line 402: | ||
local prop_cats = { |
local prop_cats = { |
||
['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is language name, $2 is ISO639-1 code |
['foreign_lang_source'] = 'CS1 $1-language sources ($2)', -- |language= categories; $1 is language name, $2 is ISO639-1 code |
||
['foreign_lang_source_2'] = 'CS1 foreign language sources (ISO 639-2)|$1', -- |language= category; a cat for ISO639-2 languages; $1 is the ISO 639-2 code |
|||
['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category |
['script'] = 'CS1 uses foreign language script', -- when language specified by |script-title=xx: doesn't have its own category |
||
['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code |
['script_with_name'] = 'CS1 uses $1-language script ($2)', -- |script-title=xx: has matching category; $1 is language name, $2 is ISO639-1 code |
||
Line 437: | Line 452: | ||
message = '<code style="'..code_style..'">|archive-url=</code> requires <code style="'..code_style..'">|url=</code>', |
message = '<code style="'..code_style..'">|archive-url=</code> requires <code style="'..code_style..'">|url=</code>', |
||
anchor = 'archive_missing_url', |
anchor = 'archive_missing_url', |
||
category = 'Pages with archiveurl citation errors', |
|||
hidden = false }, |
|||
archive_url = { |
|||
message = '<code style="'..code_style..'">|archive-url=</code> is malformed: $1', |
|||
anchor = 'archive_url', |
|||
category = 'Pages with archiveurl citation errors', |
category = 'Pages with archiveurl citation errors', |
||
hidden = false }, |
hidden = false }, |
||
Line 475: | Line 495: | ||
hidden = false }, |
hidden = false }, |
||
bad_isbn = { |
bad_isbn = { |
||
message = 'Check <code style="'..code_style..'">|isbn=</code> value', |
message = 'Check <code style="'..code_style..'">|isbn=</code> value: $1', |
||
anchor = 'bad_isbn', |
anchor = 'bad_isbn', |
||
category = 'CS1 errors: ISBN', |
category = 'CS1 errors: ISBN', |
||
Line 525: | Line 545: | ||
hidden = false }, |
hidden = false }, |
||
bad_url = { |
bad_url = { |
||
message = 'Check |
message = 'Check $1 value', |
||
anchor = 'bad_url', |
anchor = 'bad_url', |
||
category = 'Pages with URL errors', |
category = 'Pages with URL errors', |
||
Line 889: | Line 909: | ||
id_handlers = id_handlers, |
id_handlers = id_handlers, |
||
keywords = keywords, |
keywords = keywords, |
||
stripmarkers=stripmarkers, |
|||
invisible_chars = invisible_chars, |
invisible_chars = invisible_chars, |
||
maint_cats = maint_cats, |
maint_cats = maint_cats, |