Difference between revisions of "Module:Citation/CS1/Suggestions/sandbox"

From blackwiki
Jump to navigation Jump to search
blackwiki>Trappist the monk
(no, but |transcript= (one 's') is;)
blackwiki>Matthiaspaul
(added four more misspellings, marked those entries which are known misspellings accordingly)
Line 59: Line 59:
 
['datum'] = 'date', -- German
 
['datum'] = 'date', -- German
 
['deadlink'] = 'url-status',
 
['deadlink'] = 'url-status',
['deadurl'] = 'url-status',
+
['deadurl'] = 'url-status', -- old parameter name
['dead-url'] = 'url-status',
+
['dead-url'] = 'url-status', -- old parameter name
 
['distributor'] = 'publisher',
 
['distributor'] = 'publisher',
 
['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}')
 
['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}')
Line 71: Line 71:
 
['doi_inactivedate'] = 'doi-inactive-date',
 
['doi_inactivedate'] = 'doi-inactive-date',
 
['éditeur'] = 'editor', -- French
 
['éditeur'] = 'editor', -- French
['editon'] = 'edition',
+
['editon'] = 'edition', -- misspelling
['editoin'] = 'edition',
+
['editoin'] = 'edition', -- misspelling
 
['editora'] = 'publisher', -- Portuguese
 
['editora'] = 'publisher', -- Portuguese
 
['editorial'] = 'publisher',
 
['editorial'] = 'publisher',
Line 79: Line 79:
 
['enlaceautor'] = 'author-link', -- Spanish
 
['enlaceautor'] = 'author-link', -- Spanish
 
['embargo'] = 'pmc-embargo-date', -- former parameter name
 
['embargo'] = 'pmc-embargo-date', -- former parameter name
['e-print'] = 'eprint',
+
['e-print'] = 'eprint', -- misspelling
 
['fecha'] = 'date', -- Spanish
 
['fecha'] = 'date', -- Spanish
 
['fechaacceso'] = 'access-date', -- Spanish
 
['fechaacceso'] = 'access-date', -- Spanish
 
['fechaarchivo'] = 'archive-date', -- Spanish
 
['fechaarchivo'] = 'archive-date', -- Spanish
 
['filetype'] = 'format',
 
['filetype'] = 'format',
['first 1'] = 'first1',
+
['first 1'] = 'first1', -- misspelling
['foramt'] = 'format',
+
['foramt'] = 'format', -- misspelling
 
['formato'] = 'format', -- Spanish, Italian, Polish
 
['formato'] = 'format', -- Spanish, Italian, Polish
['frist'] = 'first',
+
['frist'] = 'first', -- misspelling
 
['fundstelle'] = 'at', -- German
 
['fundstelle'] = 'at', -- German
 
['herausgeber'] = 'editor', -- German (singular and plural)
 
['herausgeber'] = 'editor', -- German (singular and plural)
Line 100: Line 100:
 
['isbnformalfalsch'] = 'ignore-isbn-error', -- German
 
['isbnformalfalsch'] = 'ignore-isbn-error', -- German
 
['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
 
['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
['isnb'] = 'isbn',
+
['isnb'] = 'isbn', -- misspelling
 
['issnformalfalsch'] = 'ignore-issn-error', -- German
 
['issnformalfalsch'] = 'ignore-issn-error', -- German
 
['jahr'] = 'date', -- German
 
['jahr'] = 'date', -- German
 
['jahrea'] = 'orig-date', -- German (not a direct replacement, but can be emulated)
 
['jahrea'] = 'orig-date', -- German (not a direct replacement, but can be emulated)
 
['kapitel'] = 'chapter', -- German
 
['kapitel'] = 'chapter', -- German
['langauge'] = 'language',
+
['langauge'] = 'language', -- misspelling
 
['langue'] = 'language', -- French
 
['langue'] = 'language', -- French
['last 1'] = 'last1',
+
['last 1'] = 'last1', -- misspelling
 
['lieu'] = 'location', -- French
 
['lieu'] = 'location', -- French
 
['lingua'] = 'language', -- Italian
 
['lingua'] = 'language', -- Italian
 
['lire en ligne'] = 'url', -- French
 
['lire en ligne'] = 'url', -- French
['loaction'] = 'location',
+
['loaction'] = 'location', -- misspelling
['locatoin'] = 'location',
+
['locatoin'] = 'location', -- misspelling
 
['lugar'] = 'location', -- Spanish
 
['lugar'] = 'location', -- Spanish
 
['miejsce'] = 'location', -- Polish
 
['miejsce'] = 'location', -- Polish
Line 120: Line 120:
 
-- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
 
-- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
 
['nazwisko'] = 'last', -- Polish
 
['nazwisko'] = 'last', -- Polish
['nespaper'] = 'newspaper',
+
['nespaper'] = 'newspaper', -- misspelling
['newpaper'] = 'newspaper',
+
['newpaper'] = 'newspaper', -- misspelling
 
['news'] = 'newspaper',
 
['news'] = 'newspaper',
['news-paper'] = 'newspaper',
+
['news-paper'] = 'newspaper', -- misspelling
 
['nom'] = 'last', -- French
 
['nom'] = 'last', -- French
 
['nom1'] = 'last1', -- French
 
['nom1'] = 'last1', -- French
Line 136: Line 136:
 
['opublikowany'] = 'agency', -- Polish
 
['opublikowany'] = 'agency', -- Polish
 
['opera'] = 'work', -- Italian
 
['opera'] = 'work', -- Italian
['origdate'] = 'orig-date',
+
['origdate'] = 'orig-date', -- misspelling
 
['originaljahr'] = 'orig-date', -- German
 
['originaljahr'] = 'orig-date', -- German
 
['originalort'] = 'publication-place', -- German
 
['originalort'] = 'publication-place', -- German
Line 145: Line 145:
 
['other'] = 'others',
 
['other'] = 'others',
 
['oznaczenie'] = 'agency', -- Polish
 
['oznaczenie'] = 'agency', -- Polish
['pagees'] = 'pages',
+
['pagees'] = 'pages', -- misspelling
 
['página'] = 'page', -- Spanish, Italian
 
['página'] = 'page', -- Spanish, Italian
 
['páginas'] = 'pages', -- Spanish, Italian
 
['páginas'] = 'pages', -- Spanish, Italian
Line 152: Line 152:
 
['pagine'] = 'pages', -- Italian
 
['pagine'] = 'pages', -- Italian
 
['périodique'] = 'publisher', -- French
 
['périodique'] = 'publisher', -- French
['plublisher'] = 'publisher',
+
['plublisher'] = 'publisher', -- misspelling
 
['pmcid'] = 'pmc',
 
['pmcid'] = 'pmc',
['post-script'] = 'postscript',
+
['post-script'] = 'postscript', -- misspelling
 
['praca'] = 'work', -- Polish
 
['praca'] = 'work', -- Polish
 
['prénom'] = 'first', -- French
 
['prénom'] = 'first', -- French
Line 160: Line 160:
 
['ps'] = 'postscript',
 
['ps'] = 'postscript',
 
['pub'] = 'publisher',
 
['pub'] = 'publisher',
['pulbication-place'] = 'publication-place',
+
['pulbication-place'] = 'publication-place', -- misspelling
 
['reihe'] = 'series', -- German
 
['reihe'] = 'series', -- German
 
['retrieved'] = 'access-date',
 
['retrieved'] = 'access-date',
 
['rok'] = 'date', -- Polish
 
['rok'] = 'date', -- Polish
 
['sammelwerk'] = 'work', -- German
 
['sammelwerk'] = 'work', -- German
['script-post'] = 'postscript',
+
['script-post'] = 'postscript', -- misspelling
['script-trans'] = 'transcript',
+
['script-trans'] = 'transcript', -- misspelling
 
['seria'] = 'series', -- Polish
 
['seria'] = 'series', -- Polish
 
['série'] = 'series', -- French
 
['série'] = 'series', -- French
Line 176: Line 176:
 
['spalten'] = 'at', -- German (not a direct replacement, but can be emulated)
 
['spalten'] = 'at', -- German (not a direct replacement, but can be emulated)
 
['sprache'] = 'language', -- German
 
['sprache'] = 'language', -- German
['sur-name'] = 'surname',
+
['sur-name'] = 'surname', -- misspelling
 
['suscripción'] = 'url-access', -- Spanish, Polish (as |url-access=subscription)
 
['suscripción'] = 'url-access', -- Spanish, Polish (as |url-access=subscription)
 
['tag'] = 'date', -- German
 
['tag'] = 'date', -- German
 
['template doc demo'] = 'template-doc-demo',
 
['template doc demo'] = 'template-doc-demo',
['tile'] = 'title',
+
['tile'] = 'title', -- misspelling
['tite'] = 'title',
+
['tite'] = 'title', -- misspelling
 
['titel'] = 'title', -- German
 
['titel'] = 'title', -- German
 
['titel-p'] = 'title', -- German ('postscript=none' should be added as well)
 
['titel-p'] = 'title', -- German ('postscript=none' should be added as well)
Line 191: Line 191:
 
['transchapter'] = 'trans-chapter',
 
['transchapter'] = 'trans-chapter',
 
['trans_chapter'] = 'trans-chapter',
 
['trans_chapter'] = 'trans-chapter',
['trans-script'] = 'transcript',
+
['transscript'] = 'transcript', -- misspelling
 +
['trans-script'] = 'transcript', -- misspelling
 +
['transscript-format'] = 'transcript-format', -- misspelling
 +
['transscripturl'] = 'transcript-url', -- misspelling
 +
['transscript-url'] = 'transcript-url', -- misspelling
 
['trans_title'] = 'trans-title',
 
['trans_title'] = 'trans-title',
 
['transtitle'] = 'trans-title',
 
['transtitle'] = 'trans-title',
Line 201: Line 205:
 
['urn'] = 'id', -- German (as 'id={{URN|...}}')
 
['urn'] = 'id', -- German (as 'id={{URN|...}}')
 
['übersetzer'] = 'translator', -- German (singular and plural)
 
['übersetzer'] = 'translator', -- German (singular and plural)
['v-authors'] = 'vauthors',
+
['v-authors'] = 'vauthors', -- misspelling
['v-editors'] = 'veditors',
+
['v-editors'] = 'veditors', -- misspelling
 
['verlag'] = 'publisher', -- German
 
['verlag'] = 'publisher', -- German
 
['verlagea'] = 'publisher', -- German (not a direct replacement, but can be emulated)
 
['verlagea'] = 'publisher', -- German (not a direct replacement, but can be emulated)

Revision as of 20:09, 11 September 2020

Documentation for this module may be created at Module:Citation/CS1/Suggestions/sandbox/doc

--[[

History of changes since last sync: 2020-07-11

2020-09-02: suggest |orig-date= instead of |orig-year= parameter; see Help_talk:Citation_Style_1#cite_news_should_have_two_dates
2020-09-10: add hints for removed parameter names |ignoreisbnerror=, |doi-broken=, |doi-inactive-date= and |embargo=; see Help_talk:Citation_Style_1#Deprecating_some_unused_parameter_aliases
2020-09-10: add hints for removed parameter names |interviewerlink= and |interviewermask=; see Help_talk:Citation_Style_1#name-given= and -surname parameter variants
2020-09-10: add hints for some likely misspellings of parameter names which do not have hyphenated forms (|eprint=, |newspaper=, |postscript=, |surname=, |transcript=, |vauthors=, |veditors=)

]]

-- Please insert new suggestions in alphabetical order
-- The form is ['incorrect'] = 'correct',

suggestions = {
	['abruf'] = 'access-date',													-- German
	['abruf-verborgen'] = 'access-date',										-- German
	['accessmonth'] = 'access-date',
	['accesso'] = 'access-date',												-- Italian
	['accessyear'] = 'access-date',
	['address'] = 'location',
	['année'] = 'date',															-- French
	['año'] = 'date',
	['año-original'] = 'orig-date',
	['añoacceso'] = 'access-date',												-- Spanish
	['annoaccesso'] = 'access-date',											-- Italian
	['annodiaccesso'] = 'access-date',											-- Italian
	['apellido'] = 'last',														-- Spanish
	['archiv-datum'] = 'archive-date',											-- German
	['archive date'] = 'archive-date',
	['archiv-url'] = 'archive-url',												-- German
	['archive url'] = 'archive-url',											-- Spanish
	['artikelnr'] = 'id',														-- German (as 'id=Article No. ...')
	['artist'] = 'others',
	['auflage'] = 'edition',													-- German
	['auteur'] = 'author',														-- French
	['auther'] = 'author',
	['author link'] = 'author-link',											-- Polish
	['author link2'] = 'author2-link',											-- Polish
	['autor'] = 'author',														-- German (singular and plural)
	['autore'] = 'author',														-- Italian
	['autthor'] = 'author',
	['band'] = 'volume',														-- German
	['bandreihe'] = 'volume',													-- German
	['ch'] = 'language',														-- German (as 'language=de-CH')
	['chapter_title'] = 'chapter',
	['cita'] = 'quote',															-- Spanish
	['citazione'] = 'quote',													-- Italian
	['coauthor'] = 'author',
	['coauthors'] = 'author',
	['coautores'] = 'author',													-- Spanish
	['coautori'] = 'author',													-- Italian
	['cognome'] = 'last',														-- Italian
	['consulté le'] = 'access-date',											-- French
	['czasopismo'] = 'journal',													-- Polish
	['data'] = 'date',															-- Polish, Italian
	['dataarchivio'] = 'archive-date',											-- Italian
	['data dostępu'] = 'access-date',											-- Polish
	['datum'] = 'date',															-- German
	['deadlink'] = 'url-status',
	['deadurl'] = 'url-status', -- old parameter name
	['dead-url'] = 'url-status', -- old parameter name
	['distributor'] = 'publisher',
	['dnb'] = 'id',																-- German (as 'id={{DNB-IDN|...}}')
	['doibroken'] = 'doi-broken-date', -- invalid name found in mainspace
	['doi-broken'] = 'doi-broken-date', -- former parameter alias
	['doi_brokendate'] = 'doi-broken-date',
	['doiinactive'] = 'doi-broken-date', -- invalid name found in mainspace
	['doi-inactive'] = 'doi-broken-date', -- invalid name found in mainspace
	['doi-inactive-date'] = 'doi-broken-date', -- former parameter alias
	['doi_inactivedate'] = 'doi-inactive-date',
	['éditeur'] = 'editor',														-- French
	['editon'] = 'edition', -- misspelling
	['editoin'] = 'edition', -- misspelling
	['editora'] = 'publisher',													-- Portuguese
	['editorial'] = 'publisher',
	['en ligne le'] = 'archive-date',											-- French
	['encyclopædia'] = 'encyclopedia',
	['enlaceautor'] = 'author-link',											-- Spanish
	['embargo'] = 'pmc-embargo-date', -- former parameter name
	['e-print'] = 'eprint', -- misspelling
	['fecha'] = 'date',															-- Spanish
	['fechaacceso'] = 'access-date',											-- Spanish
	['fechaarchivo'] = 'archive-date',											-- Spanish
	['filetype'] = 'format',
	['first 1'] = 'first1', -- misspelling
	['foramt'] = 'format', -- misspelling
	['formato'] = 'format',														-- Spanish, Italian, Polish
	['frist'] = 'first', -- misspelling
	['fundstelle'] = 'at',														-- German
	['herausgeber'] = 'editor',													-- German (singular and plural)
	['hrsg'] = 'publisher',														-- German
	['hrsgreihe'] = 'editor',													-- German
	['idioma'] = 'language',													-- Spanish, Italian
	['ignoreisbnerror'] = 'ignore-isbn-error',										-- former parameter alias
	['imię'] = 'first',															-- Polish
	['interviewerlink'] = 'interviewer-link', -- former parameter alias
	['interviewermask'] = 'interviewer-mask', -- former parameter alias
	['isbndefekt'] = 'ignore-isbn-error',										-- German
	['isbnformalfalsch'] = 'ignore-isbn-error',									-- German
	['isbnistformalfalsch'] = 'ignore-isbn-error',								-- German
	['isnb'] = 'isbn', -- misspelling
	['issnformalfalsch'] = 'ignore-issn-error',									-- German
	['jahr'] = 'date',															-- German
	['jahrea'] = 'orig-date',													-- German (not a direct replacement, but can be emulated)
	['kapitel'] = 'chapter',													-- German
	['langauge'] = 'language', -- misspelling
	['langue'] = 'language',													-- French
	['last 1'] = 'last1', -- misspelling
	['lieu'] = 'location',														-- French
	['lingua'] = 'language',													-- Italian
	['lire en ligne'] = 'url',													-- French
	['loaction'] = 'location', -- misspelling
	['locatoin'] = 'location', -- misspelling
	['lugar'] = 'location',														-- Spanish
	['miejsce'] = 'location',													-- Polish
	['miesiąc'] = 'date',														-- Polish
	['mois'] = 'date',															-- French
	['monat'] = 'date',															-- German
--	['name'] = 'author',														-- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion
	['nazwisko'] = 'last',														-- Polish
	['nespaper'] = 'newspaper', -- misspelling
	['newpaper'] = 'newspaper', -- misspelling
	['news'] = 'newspaper',
	['news-paper'] = 'newspaper', -- misspelling
	['nom'] = 'last',															-- French
	['nom1'] = 'last1',															-- French
	['nombre'] = 'first',														-- Spanish
	['nome'] = 'first',															-- Italian
	['nummer'] = 'number',														-- German
	['nummerreihe'] = 'number',													-- German
	['obra'] = 'work',															-- Spanish
	['odpowiedzialność'] = 'agency',											-- Polish
	['offline'] = 'url-status',													-- German (as 'url-status=dead')
	['online'] = 'url',															-- German (not a direct replacement, but can be emulated)
	['opublikowany'] = 'agency',												-- Polish
	['opera'] = 'work',															-- Italian
	['origdate'] = 'orig-date', -- misspelling
	['originaljahr'] = 'orig-date',												-- German
	['originalort'] = 'publication-place',										-- German
	['originalsprache'] = 'language',											-- German
	['originaltitel'] = 'title',												-- German (if 'originaltitel' is specified, any possible contents of 'title' should be put in 'trans-title')
	['ort'] = 'publication-place',												-- German
	['ortea'] = 'publication-place',											-- German (not a direct replacement, but can be emulated)
	['other'] = 'others',
	['oznaczenie'] = 'agency',													-- Polish
	['pagees'] = 'pages', -- misspelling
	['página'] = 'page',														-- Spanish, Italian
	['páginas'] = 'pages',														-- Spanish, Italian
	['passage'] = 'pages',														-- French
	['pagina'] = 'pages',														-- Italian
	['pagine'] = 'pages',														-- Italian
	['périodique'] = 'publisher',												-- French
	['plublisher'] = 'publisher', -- misspelling
	['pmcid'] = 'pmc',
	['post-script'] = 'postscript', -- misspelling
	['praca'] = 'work',															-- Polish
	['prénom'] = 'first',														-- French
	['prénom1'] = 'first1',														-- French
	['ps'] = 'postscript',
	['pub'] = 'publisher',
	['pulbication-place'] = 'publication-place', -- misspelling
	['reihe'] = 'series',														-- German
	['retrieved'] = 'access-date',
	['rok'] = 'date',															-- Polish
	['sammelwerk'] = 'work',													-- German
	['script-post'] = 'postscript', -- misspelling
	['script-trans'] = 'transcript', -- misspelling
	['seria'] = 'series',														-- Polish
	['série'] = 'series',														-- French
	['service'] = 'agency',
	['sitioweb'] = 'website',													-- Spanish
	['sito'] = 'website',														-- Italian
	['stron'] = 'page',															-- Polish
	['strony'] = 'pages',														-- Polish
	['spalten'] = 'at',															-- German (not a direct replacement, but can be emulated)
	['sprache'] = 'language',													-- German
	['sur-name'] = 'surname', -- misspelling
	['suscripción'] = 'url-access',												-- Spanish, Polish (as |url-access=subscription)
	['tag'] = 'date',															-- German
	['template doc demo'] = 'template-doc-demo',
	['tile'] = 'title', -- misspelling
	['tite'] = 'title', -- misspelling
	['titel'] = 'title',														-- German
	['titel-p'] = 'title',														-- German ('postscript=none' should be added as well)
	['titelerg'] = 'contribution',												-- German (not a direct replacement, but can be emulated)
	['titolo'] = 'title',														-- Spanish, Italian
	['titre'] = 'title',														-- French
	['títle'] = 'title',
	['título'] = 'title',														-- Spanish
	['transchapter'] = 'trans-chapter',
	['trans_chapter'] = 'trans-chapter',
	['transscript'] = 'transcript', -- misspelling
	['trans-script'] = 'transcript', -- misspelling
	['transscript-format'] = 'transcript-format', -- misspelling
	['transscripturl'] = 'transcript-url', -- misspelling
	['transscript-url'] = 'transcript-url', -- misspelling
	['trans_title'] = 'trans-title',
	['transtitle'] = 'trans-title',
	['typ'] = 'author-mask',													-- German (not a direct replacement, but the only valid argument 'typ=wl' can be emulated using 'author-mask')
	['tytuł'] = 'title',														-- Polish
	['ubicación'] = 'location',													-- Spanish
	['urlarchivo'] = 'archive-url',												-- Spanish
	['urlarchivio'] = 'archive-url',											-- Italian
	['urn'] = 'id',																-- German (as 'id={{URN|...}}')
	['übersetzer'] = 'translator',												-- German (singular and plural)
	['v-authors'] = 'vauthors', -- misspelling
	['v-editors'] = 'veditors', -- misspelling
	['verlag'] = 'publisher',													-- German
	['verlagea'] = 'publisher',													-- German (not a direct replacement, but can be emulated)
	['vol'] = 'volume', 
	['volumen'] = 'volume',														-- Spanish
	['werk'] = 'work',															-- German
	['werkerg'] = 'contribution',												-- German (not a direct replacement, but can be emulated)
	['wkautore'] = 'author-link',												-- Italian
	['wolumin'] = 'volume',														-- Polish
	['wydanie'] = 'number',														-- Polish
	['wydawca'] = 'publisher',													-- French
	['zaprezentowany'] = 'publisher',											-- French
	['zdb'] = 'id',																-- German (as 'id={{ZDB|...}}')
	['zitat'] = 'quote',														-- German
	['zugriff'] = 'access-date',												-- German
}



--[[--------------------------< 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',
	['^a[utho]+r$'] = 'author',
	['^a[utho]+r(%d+)$'] = 'author$1',											-- enumerated
	['^pu[blish]+ers?$'] = 'publisher',
	}

return {suggestions = suggestions, patterns=patterns};