Module:Citation/CS1/Suggestions
This is a list of suggested alternatives to use when an unknown parameter is encountered by a citation template. When an unknown parameter is found within a citation template an error message is generated, and when possible the software makes a suggestion for what the user may have meant by consulting this list of common mistakes and typos.
Each entry takes the form: ['bad input parameter'] = 'suggested parameter to use'
The bad input parameter will have been transformed to lower case before checking this list, so all input forms on this list should be written in lowercase.
<section begin=header />This module is transcluded in one or more cascade-protected pages, so only administrators can edit it. |
This module and associated sub-modules support the Citation Style 1 citation templates. In general, it is not intended to be called directly, but is called by one of the core CS1 and CS2 templates. <section begin=module_components_table /> These files comprise the module support for CS1|2 citation templates:
<section end=module_components_table />
Other documentation:
- Module:Cs1 documentation support – a set of functions (some experimental) that extract information from the module suite for the purpose of documenting CS1|2
- Module:Citation/CS1/doc/Category list – lists of category names taken directly from Module:Citation/CS1/Configuration and Module:Citation/CS1/Configuration/sandbox
- Documentation from Wikipedia
testcases (From Wikipedia)
- w:Module:Citation/CS1/testcases (run)
- w:Module:Citation/CS1/testcases/errors (run) – error and maintenance messaging
- w:Module:Citation/CS1/testcases/dates (run) – date validation
- w:Module:Citation/CS1/testcases/identifiers (run) – identifiers
- w:Module:Citation/CS1/testcases/anchor (run) – CITEREF anchors
-- Please insert new suggestions in alphabetical order
-- The form is ['incorrect'] = 'correct',
suggestions = {
['ASIN-TLD'] = 'asin-tld', -- old parameter name
['accessmonth'] = 'access-date',
['accessyear'] = 'access-date',
['address'] = 'location',
['archive date'] = 'archive-date', -- misspelling
['archive url'] = 'archive-url', -- misspelling
['archive-link'] = 'archive-url', -- old parameter name
['artist'] = 'others',
['auther'] = 'author', -- misspelling
['authorfirst'] = 'author-first', -- old parameter name
['authorgiven'] = 'author-given', -- old parameter name
['authorlast'] = 'author-last', -- old parameter name
['authormask'] = 'author-mask', -- old parameter name
['authorsurname'] = 'author-surname', -- old parameter name
['autore'] = 'author', -- Italian
['autthor'] = 'author', -- misspelling
['began'] = 'date', -- old parameter name (cite serial only); or orig-date=
['booktitle'] = 'book-title', -- old parameter name
['chapter_title'] = 'chapter',
['chapterurl'] = 'chapter-url', -- old parameter name
['city'] = 'location', -- old parameter name (cite serial only)
['coauthor'] = 'author',
['coauthors'] = 'author',
['conferenceurl'] = 'conference-url', -- old parameter name
['contributionurl'] = 'contribution-url', -- old parameter name
['dead-url'] = 'url-status', -- old parameter name
['deadlink'] = 'url-status', -- old parameter name
['deadurl'] = 'url-status', -- old parameter name
['displayauthors'] = 'display-authors', -- old parameter name
['displayeditors'] = 'display-editors', -- old parameter name
['distributor'] = 'publisher',
['doi-broken'] = 'doi-broken-date', -- old parameter alias
['doi-inactive'] = 'doi-broken-date', -- invalid name found in mainspace
['doi-inactive-date'] = 'doi-broken-date', -- old parameter alias
['doi_brokendate'] = 'doi-broken-date', -- old parameter alias
['doi_inactivedate'] = 'doi-inactive-date', -- old parameter alias
['doibroken'] = 'doi-broken-date', -- invalid name found in mainspace
['doiinactive'] = 'doi-broken-date', -- invalid name found in mainspace
['e-print'] = 'eprint', -- misspelling
-- ['ed'] = 'edition', -- avoid suggestion as in English this could be short for editor or edition
-- ['editora'] = 'publisher', -- can be either editor or publisher
-- ['editore'] = 'agency', -- can be either publisher or agency
-- ['editori'] = 'editor', -- can be either editor or publisher
-- ['editorial'] = 'publisher', -- can be either publisher or work
['editoin'] = 'edition', -- misspelling
['editon'] = 'edition', -- misspelling
['editorfirst'] = 'editor-first', -- old parameter name
['editorgiven'] = 'editor-given', -- old parameter name
['editorlast'] = 'editor-last', -- old parameter name
['editorlink'] = 'editor-link', -- old parameter name
['editormask'] = 'editor-mask', -- old parameter name
['editors'] = 'editor', -- old parameter name (can be emulated using multiple singular |editor= params)
['editorsurname'] = 'editor-surname', -- old parameter name
['embargo'] = 'pmc-embargo-date', -- old parameter name
['ended'] = 'date', -- old parameter name (cite serial only)
['encyclopædia'] = 'encyclopedia',
['episodelink'] = 'episode-link', -- old parameter name
['family'] = 'surname', -- misguess
['filetype'] = 'format',
['foramt'] = 'format', -- misspelling
['fore-name'] = 'given', -- misguess/misspelling
['forename'] = 'given', -- misguess
['frist'] = 'first', -- misspelling
['ignore-isbn-error'] = 'isbn', -- old parameter (can be fully emulated using ((syntax)))
['ignoreisbnerror'] = 'isbn', -- old parameter alias (suggest |isbn as |ignore-isbn-error is deprecated), not a direct replacement, but can be fully emulated using ((syntax))
['in-set'] = 'inset', -- misspelling
['interviewerlink'] = 'interviewer-link', -- old parameter alias
['interviewermask'] = 'interviewer-mask', -- old parameter alias
['isnb'] = 'isbn', -- misspelling
['langauge'] = 'language', -- misspelling
['last-author-amp'] = 'name-list-style', -- old parameter name (as |name-list-style=amp)
['lastauthoramp'] = 'name-list-style', -- old parameter name (as |name-list-style=amp)
['loaction'] = 'location', -- misspelling
['locatoin'] = 'location', -- misspelling
['mailinglist'] = 'mailing-list', -- old parameter name
['mapurl'] = 'map-url', -- old parameter name
-- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
['name-list-format'] = 'name-list-style', -- old parameter name (as |name-list-style=amp)
['nespaper'] = 'newspaper', -- misspelling
['net-work'] = 'network', -- misspelling
['newpaper'] = 'newspaper', -- misspelling
['news'] = 'newspaper',
['news-group'] = 'newsgroup', -- misspelling
['news-paper'] = 'newspaper', -- misspelling
['no-cat'] = 'no-tracking', -- old parameter
['nocat'] = 'no-tracking', -- old parameter
['nopp'] = 'no-pp', -- old parameter name
['notracking'] = 'no-tracking', -- old parameter
['origdate'] = 'orig-date', -- misspelling
['other'] = 'others',
['pagees'] = 'pages', -- misspelling
['plublisher'] = 'publisher', -- misspelling
['pmcid'] = 'pmc',
['post-script'] = 'postscript', -- misspelling
['ps'] = 'postscript',
['pub'] = 'publisher',
-- ['pubblicazione'] = 'magazine', -- could be any kind of work
-- ['publicación'] = 'journal', -- could be any kind of work
['publicationdate'] = 'publication-date', -- old parameter name
-- ['published'] = 'publisher', -- could be date, location, or name of publisher
['publicationplace'] = 'publication-place', -- old parameter name
['pulbication-place'] = 'publication-place', -- misspelling
['registration'] = 'url-access', -- old parameter name
['retrieved'] = 'access-date', -- old parameter name
['script-post'] = 'postscript', -- misspelling
['script-trans'] = 'transcript', -- misspelling
['season'] = 'date', -- old parameter name (cite serial only)
['sectionurl'] = 'section-url', -- old parameter name
['serieslink'] = 'series-link', -- old parameter name
['seriesno'] = 'series-number', -- old parameter name
['service'] = 'agency',
['subjectlink'] = 'subject-link', -- old parameter name
['subscription'] = 'url-access', -- old parameter name (emulated as |url-access=subscription)
['sur-name'] = 'surname', -- misspelling
['template doc demo'] = 'no-tracking', -- old parameter alias
['timecaption'] = 'time-caption', -- old parameter name
['titlelink'] = 'title-link', -- old parameter name
['tite'] = 'title', -- misspelling
['trans-script'] = 'transcript', -- misspelling
['trans_chapter'] = 'trans-chapter', -- old parameter alias
['trans_title'] = 'trans-title', -- old parameter alias
['transchapter'] = 'trans-chapter',
['transcripturl'] = 'transcript-url', -- old parameter name
['transscript'] = 'transcript', -- misspelling
['transscript-format'] = 'transcript-format', -- misspelling
['transscript-url'] = 'transcript-url', -- misspelling
['transscripturl'] = 'transcript-url', -- misspelling
['transtitle'] = 'trans-title',
['títle'] = 'title',
['vol'] = 'volume',
}
--[[--------------------------< P A T T E R N S >--------------------------------------------------------------
Here we use Lua patterns to make suggestions. The form is
['pattern'] = 'correct',
Lua patterns are not REGEX though they are similar. The escape character is '%', not '\'.
For more information about Lua patterns, see: Extension:Scribunto/Lua_reference_manual#Patterns
Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial
match from incorrectly suggesting the wrong parameter name. For instance, the pattern 'a[utho]+r'
matches 'author' in the no-longer-supported parameter |author-separator= so the code suggests
'|author='; the same pattern also matches the no-longer-supported parameter |separator= (returning 'ator')
so again, the code suggests '|author='.
One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.)
The value from the capture replaces $1 in the 'correct' value.
]]
local patterns = {
['^ac+es+ ?d?a?t?e?$'] = 'access-date', -- misspelling
['^a[utho]+r$'] = 'author', -- misspelling
['^a[utho]+r(%d+)$'] = 'author$1', -- misspelling, enumerated
['^authorfirst(%d+)$'] = 'author-first$1', -- old parameter name, enumerated
['^author(%d+)first$'] = 'author-first$1', -- old parameter name, enumerated
['^authorgiven(%d+)$'] = 'author-given$1', -- old parameter name, enumerated
['^author(%d+)given$'] = 'author-given$1', -- old parameter name, enumerated
['^authorlast(%d+)$'] = 'author-last$1', -- old parameter name, enumerated
['^author(%d+)last$'] = 'author-last$1', -- old parameter name, enumerated
['^authormask(%d+)$'] = 'author-mask$1', -- old parameter name, enumerated
['^author(%d+)mask$'] = 'author-mask$1', -- old parameter name, enumerated
['^authorsurname(%d+)$'] = 'author-surname$1', -- old parameter name, enumerated
['^author(%d+)surname$'] = 'author-surname$1', -- old parameter name, enumerated
['^editorfirst(%d+)$'] = 'editor-first$1', -- old parameter name, enumerated
['^editor(%d+)first$'] = 'editor-first$1', -- old parameter name, enumerated
['^editorgiven(%d+)$'] = 'editor-given$1', -- old parameter name, enumerated
['^editor(%d+)given$'] = 'editor-given$1', -- old parameter name, enumerated
['^editorlast(%d+)$'] = 'editor-last$1', -- old parameter name, enumerated
['^editor(%d+)last$'] = 'editor-last$1', -- old parameter name, enumerated
['^editorlink(%d+)$'] = 'editor-link$1', -- old parameter name, enumerated
['^editor(%d+)link$'] = 'editor-link$1', -- old parameter name, enumerated
['^editormask(%d+)$'] = 'editor-mask$1', -- old parameter name, enumerated
['^editor(%d+)mask$'] = 'editor-mask$1', -- old parameter name, enumerated
['^editorsurname(%d+)$'] = 'editor-surname$1', -- old parameter name, enumerated
['^editor(%d+)surname$'] = 'editor-surname$1', -- old parameter name, enumerated
['^first (%d+)$'] = 'first$1', -- enumerated
['^last (%d+)$'] = 'last$1', -- enumerated
['^pu[blish]+ers?$'] = 'publisher', -- misspelling
['^subjectlink(%d+)$'] = 'subject-link$1', -- old parameter name, enumerated
['^subject(%d+)link$'] = 'subject-link$1', -- old parameter name, enumerated
}
return {suggestions = suggestions, patterns=patterns};