Difference between revisions of "Module:Citation/CS1/Suggestions/sandbox"
< Module:Citation | CS1 | Suggestions
Jump to navigation
Jump to search
test>Trappist the monk |
test>Matthiaspaul (Remove |translator= from suggestion list as it is meanwhile a supported parameter. Suggest superset parameter |date= instead of the discouraged parameter |year=. Refine several foreign language suggestions to reflect changes in parameters supported by English citation templates. Add various suggestions to emulate parameters supported by German citation templates as much as possible.) |
||
| Line 1: | Line 1: | ||
--[[ | --[[ | ||
| + | |||
History of changes since last sync: 2017-04-29 | History of changes since last sync: 2017-04-29 | ||
| − | |||
| − | |||
| + | * 2018-07-31: remove lang from suggestion list as it is now explicitly whitelisted; see Help_talk:Citation_Style_1#lang_on_suggestion_list_removed;_general_q_about_suggestion_list | ||
| + | * 2020-02-16: sync from live; add |deadurl= and |dead-url=; |doi_brokendate=, |doi_inactivedate=, |template doc demo=, |trans_chapter=, |trans_title= added earlier but apparently not documented; see Wikipedia:Village_pump_(technical)#Automated_suggestion_for_%7Cdead-url%3D_%7Cdeadurl%3D_to_%7Curl-status | ||
| + | * 2020-06-16: Remove |translator= from suggestion list as it is now a supported parameter. Suggest superset parameter |date= instead of the discouraged parameter |year=. Refine several foreign language suggestions to reflect changes in parameters supported by English citation templates. Add various suggestions to emulate parameters supported by German citation templates as much as possible. | ||
]] | ]] | ||
| − | --Please insert new suggestions in alphabetical order | + | -- Please insert new suggestions in alphabetical order |
| − | --The form is ['incorrect'] = 'correct', | + | -- The form is ['incorrect'] = 'correct', |
suggestions = { | suggestions = { | ||
| − | ['accessmonth'] = 'access-date', | + | ['abruf'] = 'access-date', -- German |
| − | ['accesso'] = 'access-date', | + | ['abruf-verborgen'] = 'access-date', -- German |
| − | ['accessyear'] = 'access-date', | + | ['accessmonth'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date' |
| + | ['accesso'] = 'access-date', -- Italian | ||
| + | ['accessyear'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date' | ||
['address'] = 'location', | ['address'] = 'location', | ||
| − | ['année'] = ' | + | ['année'] = 'date', -- French |
| − | ['año'] = ' | + | ['año'] = 'date', |
['año-original'] = 'orig-year', | ['año-original'] = 'orig-year', | ||
| − | ['añoacceso'] = 'access-date', | + | ['añoacceso'] = 'access-date', -- Spanish |
| − | ['annoaccesso'] = 'access-date', | + | ['annoaccesso'] = 'access-date', -- Italian |
| − | ['annodiaccesso'] = 'access-date', | + | ['annodiaccesso'] = 'access-date', -- Italian |
| − | ['apellido'] = 'last', | + | ['apellido'] = 'last', -- Spanish |
| − | ['archiv-datum'] = 'archive-date', | + | ['archiv-datum'] = 'archive-date', -- German |
['archive date'] = 'archive-date', | ['archive date'] = 'archive-date', | ||
| − | ['archiv-url'] = 'archive-url', | + | ['archiv-url'] = 'archive-url', -- German |
| − | ['archive url'] = 'archive-url', | + | ['archive url'] = 'archive-url', -- Spanish |
| + | ['artikelnr'] = 'id', -- German (as 'id=Article No. ...') (not yet supported by us directly) | ||
['artist'] = 'others', | ['artist'] = 'others', | ||
| − | ['auflage'] = 'edition', | + | ['auflage'] = 'edition', -- German |
| − | ['auteur'] = 'author', | + | ['auteur'] = 'author', -- French |
['auther'] = 'author', | ['auther'] = 'author', | ||
| − | ['author link'] = 'author-link', | + | ['author link'] = 'author-link', -- Polish |
| − | ['author link2'] = 'author2-link', | + | ['author link2'] = 'author2-link', -- Polish |
| − | ['autor'] = 'authors', | + | ['autor'] = 'authors', -- German (singular and plural) |
| − | ['autore'] = 'author', | + | ['autore'] = 'author', -- Italian |
['autthor'] = 'author', | ['autthor'] = 'author', | ||
| − | ['band'] = 'volume', | + | ['band'] = 'volume', -- German |
| + | ['bandreihe'] = 'volume', -- German | ||
| + | ['ch'] = 'language', -- German (as 'language=de-CH') | ||
['chapter_title'] = 'chapter', | ['chapter_title'] = 'chapter', | ||
| − | ['cita'] = 'quote', | + | ['cita'] = 'quote', -- Spanish |
| − | ['citazione'] = 'quote', | + | ['citazione'] = 'quote', -- Italian |
['coauthor'] = 'author', | ['coauthor'] = 'author', | ||
['coauthors'] = 'author', | ['coauthors'] = 'author', | ||
| − | ['coautores'] = 'author', | + | ['coautores'] = 'author', -- Spanish |
| − | ['coautori'] = 'author', | + | ['coautori'] = 'author', -- Italian |
| − | ['cognome'] = 'last', | + | ['cognome'] = 'last', -- Italian |
| − | ['consulté le'] = 'access-date', | + | ['comment'] = 'postscript', |
| − | ['czasopismo'] = 'journal', | + | ['consulté le'] = 'access-date', -- French |
| − | ['data'] = 'date', | + | ['czasopismo'] = 'journal', -- Polish |
| − | ['dataarchivio'] = 'archive-date', | + | ['data'] = 'date', -- Polish, Italian |
| − | ['data dostępu'] = 'access-date', | + | ['dataarchivio'] = 'archive-date', -- Italian |
| − | ['datum'] = 'date', | + | ['data dostępu'] = 'access-date', -- Polish |
| + | ['datum'] = 'date', -- German | ||
['deadlink'] = 'url-status', | ['deadlink'] = 'url-status', | ||
['deadurl'] = 'url-status', | ['deadurl'] = 'url-status', | ||
['dead-url'] = 'url-status', | ['dead-url'] = 'url-status', | ||
['distributor'] = 'publisher', | ['distributor'] = 'publisher', | ||
| − | ['dnb'] = 'id', | + | ['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}') (not yet supported by us directly) |
['doi_brokendate'] = 'doi-broken-date', | ['doi_brokendate'] = 'doi-broken-date', | ||
['doi_inactivedate'] = 'doi-inactive-date', | ['doi_inactivedate'] = 'doi-inactive-date', | ||
| − | ['éditeur'] = 'editor', | + | ['éditeur'] = 'editor', -- French |
['editon'] = 'edition', | ['editon'] = 'edition', | ||
['editoin'] = 'edition', | ['editoin'] = 'edition', | ||
| − | ['editora'] = 'publisher', | + | ['editora'] = 'publisher', -- Portuguese |
['editorial'] = 'publisher', | ['editorial'] = 'publisher', | ||
| − | ['en ligne le'] = 'archive-date', | + | ['en ligne le'] = 'archive-date', -- French |
['encyclopædia'] = 'encyclopedia', | ['encyclopædia'] = 'encyclopedia', | ||
| − | ['enlaceautor'] = 'author-link', | + | ['enlaceautor'] = 'author-link', -- Spanish |
| − | ['fecha'] = 'date', | + | ['fecha'] = 'date', -- Spanish |
| − | ['fechaacceso'] = 'access-date', | + | ['fechaacceso'] = 'access-date', -- Spanish |
| − | ['fechaarchivo'] = 'archive-date', | + | ['fechaarchivo'] = 'archive-date', -- Spanish |
['filetype'] = 'format', | ['filetype'] = 'format', | ||
['first 1'] = 'first1', | ['first 1'] = 'first1', | ||
['foramt'] = 'format', | ['foramt'] = 'format', | ||
| − | ['formato'] = 'format', | + | ['formato'] = 'format', -- Spanish, Italian, Polish |
['frist'] = 'first', | ['frist'] = 'first', | ||
| − | ['herausgeber'] = 'editors', | + | ['fundstelle'] = 'at', -- German (not directly supported by us) |
| − | ['idioma'] = 'language', | + | ['herausgeber'] = 'editors', -- German (singular and plural) |
| − | ['imię'] = 'first', | + | ['hrsg'] = 'publisher', -- German |
| − | ['isbnistformalfalsch'] = 'ignore-isbn-error', | + | ['hrsgreihe'] = 'editor', -- German |
| + | ['idioma'] = 'language', -- Spanish, Italian | ||
| + | ['imię'] = 'first', -- Polish | ||
| + | ['isbndefekt'] = 'ignore-isbn-error', -- German | ||
| + | ['isbnformalfalsch'] = 'ignore-isbn-error', -- German | ||
| + | ['isbnistformalfalsch'] = 'ignore-isbn-error', -- German | ||
['isnb'] = 'isbn', | ['isnb'] = 'isbn', | ||
| − | ['jahr'] = 'year', | + | ['issnformalfalsch'] = 'ignore-issn-error', -- German |
| − | ['kapitel'] = 'chapter', | + | ['jahr'] = 'date', -- German |
| − | -- ['kommentar'] = ' | + | ['jahrea'] = 'orig-year', -- German (not a direct replacement, but can be emulated) |
| + | ['kapitel'] = 'chapter', -- German | ||
| + | ['kbytes'] = 'format', -- German (not a direct replacement, but can be emulated) | ||
| + | ['kommentar'] = 'postscript', -- German (not a direct replacement, but can be emulated) | ||
['langauge'] = 'language', | ['langauge'] = 'language', | ||
| − | ['langue'] = 'language', | + | ['langue'] = 'language', -- French |
['last 1'] = 'last1', | ['last 1'] = 'last1', | ||
| − | ['lieu'] = 'location', | + | ['lieu'] = 'location', -- French |
| − | ['lingua'] = 'language', | + | ['lingua'] = 'language', -- Italian |
| − | ['lire en ligne'] = 'url', | + | ['lire en ligne'] = 'url', -- French |
| − | ['lizenznummer'] = 'id', | + | ['lizenznummer'] = 'id', -- German (as 'id=License ...') |
['loaction'] = 'location', | ['loaction'] = 'location', | ||
['locatoin'] = 'location', | ['locatoin'] = 'location', | ||
| − | ['lugar'] = 'location', | + | ['lugar'] = 'location', -- Spanish |
| − | ['miejsce'] = 'location', | + | ['miejsce'] = 'location', -- Polish |
| − | ['miesiąc'] = 'date', | + | ['miesiąc'] = 'date', -- Polish |
| − | ['mois'] = 'date', | + | ['mois'] = 'date', -- French |
| − | ['monat'] = 'date', | + | ['monat'] = 'date', -- German |
| − | -- ['name'] = 'author', | + | -- ['name'] = 'author', -- 'name' is often erroneously used for 'title' and 'work' as well, so no suggestion is better than a wrong suggestion |
| − | ['nazwisko'] = 'last', | + | ['nazwisko'] = 'last', -- Polish |
['nespaper'] = 'newspaper', | ['nespaper'] = 'newspaper', | ||
['newpaper'] = 'newspaper', | ['newpaper'] = 'newspaper', | ||
['news'] = 'newspaper', | ['news'] = 'newspaper', | ||
| − | ['nom'] = 'last', | + | ['nom'] = 'last', -- French |
| − | ['nom1'] = 'last1', | + | ['nom1'] = 'last1', -- French |
| − | ['nombre'] = 'first', | + | ['nombre'] = 'first', -- Spanish |
| − | ['nome'] = 'first', | + | ['nome'] = 'first', -- Italian |
| − | ['nummer'] = 'number', | + | ['nummer'] = 'number', -- German |
| − | ['obra'] = 'work', | + | ['nummerreihe'] = 'number', -- German |
| − | ['odpowiedzialność'] = 'agency', | + | ['obra'] = 'work', -- Spanish |
| − | ['offline'] = 'url-status', | + | ['odpowiedzialność'] = 'agency', -- Polish |
| − | ['online'] = 'url', | + | ['offline'] = 'url-status', -- German (as 'url-status=dead') |
| − | ['opublikowany'] = 'agency', | + | ['online'] = 'url', -- German (not a direct replacement, but can be emulated) |
| − | ['opera'] = 'work', | + | ['opublikowany'] = 'agency', -- Polish |
| + | ['opera'] = 'work', -- Italian | ||
['origdate'] = 'orig-year', | ['origdate'] = 'orig-year', | ||
| − | ['originaljahr'] = 'orig-year', | + | ['originaljahr'] = 'orig-year', -- German |
| − | ['originalort'] = ' | + | ['originalort'] = 'publication-place', -- German |
| − | ['originalsprache'] = 'language', | + | ['originalsprache'] = 'language', -- German |
| − | ['originaltitel'] = 'title', | + | ['originaltitel'] = 'title', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put in 'trans-title') |
| − | ['ort'] = ' | + | ['ort'] = 'publication-place', -- German |
| + | ['ortea'] = 'publishing-place', -- German (not a direct replacement, but can be emulated) | ||
['other'] = 'others', | ['other'] = 'others', | ||
| − | ['oznaczenie'] = 'agency', | + | ['oznaczenie'] = 'agency', -- Polish |
['pagees'] = 'pages', | ['pagees'] = 'pages', | ||
| − | ['página'] = 'page', | + | ['página'] = 'page', -- Spanish, Italian |
| − | ['páginas'] = 'pages', | + | ['páginas'] = 'pages', -- Spanish, Italian |
| − | ['passage'] = 'pages', | + | ['passage'] = 'pages', -- French |
| − | ['pagina'] = 'pages', | + | ['pagina'] = 'pages', -- Italian |
| − | ['pagine'] = 'pages', | + | ['pagine'] = 'pages', -- Italian |
| − | ['périodique'] = 'publisher', | + | ['périodique'] = 'publisher', -- French |
['plublisher'] = 'publisher', | ['plublisher'] = 'publisher', | ||
['pmcid'] = 'pmc', | ['pmcid'] = 'pmc', | ||
| − | ['praca'] = 'work', | + | ['praca'] = 'work', -- Polish |
| − | ['prénom'] = 'first', | + | ['prénom'] = 'first', -- French |
| − | ['prénom1'] = 'first1', | + | ['prénom1'] = 'first1', -- French |
['ps'] = 'postscript', | ['ps'] = 'postscript', | ||
['pub'] = 'publisher', | ['pub'] = 'publisher', | ||
['pulbication-place'] = 'publication-place', | ['pulbication-place'] = 'publication-place', | ||
| − | ['reihe'] = 'series', | + | ['reihe'] = 'series', -- German |
['retrieved'] = 'access-date', | ['retrieved'] = 'access-date', | ||
| − | ['rok'] = 'date', | + | ['rok'] = 'date', -- Polish |
| − | ['sammelwerk'] = 'work', | + | ['sammelwerk'] = 'work', -- German |
| − | + | ['seria'] = 'series', -- Polish | |
| − | ['seria'] = 'series', | + | ['série'] = 'series', -- French |
| − | ['série'] = ' | ||
['service'] = 'agency', | ['service'] = 'agency', | ||
| − | ['sitioweb'] = 'website', | + | ['sitioweb'] = 'website', -- Spanish |
| − | ['sito'] = 'website', | + | ['sito'] = 'website', -- Italian |
| − | ['stron'] = 'page', | + | ['stron'] = 'page', -- Polish |
| − | ['strony'] = 'pages', | + | ['strony'] = 'pages', -- Polish |
| − | ['spalten'] = 'at', | + | ['spalten'] = 'at', -- German (not a direct replacement, but can be emulated) |
| − | ['sprache'] = 'language', | + | ['sprache'] = 'language', -- German |
| − | ['suscripción'] = ' | + | ['suscripción'] = 'url-access', -- Spanish, Polish (as |url-access=subscription) |
| − | ['tag'] = 'date', | + | ['tag'] = 'date', -- German |
['template doc demo'] = 'template-doc-demo', | ['template doc demo'] = 'template-doc-demo', | ||
['tile'] = 'title', | ['tile'] = 'title', | ||
['tite'] = 'title', | ['tite'] = 'title', | ||
| − | ['titel'] = 'title', | + | ['titel'] = 'title', -- German |
| − | ['titel-p'] = 'title', | + | ['titel-p'] = 'title', -- German ('postscript=none' should be added as well) |
| − | ['titelerg'] = 'contribution', | + | ['titelerg'] = 'contribution', -- German (not a direct replacement, but can be emulated) |
| − | ['titolo'] = 'title', | + | ['titolo'] = 'title', -- Spanish, Italian |
| − | ['titre'] = 'title', | + | ['titre'] = 'title', -- French |
['títle'] = 'title', | ['títle'] = 'title', | ||
| − | ['título'] = 'title', | + | ['título'] = 'title', -- Spanish |
['transchapter'] = 'trans-chapter', | ['transchapter'] = 'trans-chapter', | ||
['trans_chapter'] = 'trans-chapter', | ['trans_chapter'] = 'trans-chapter', | ||
['trans_title'] = 'trans-title', | ['trans_title'] = 'trans-title', | ||
| − | |||
['transtitle'] = 'trans-title', | ['transtitle'] = 'trans-title', | ||
| − | ['typ'] = 'author-mask', | + | ['typ'] = 'author-mask', -- German (not a direct replacement, but the only valid argument 'typ=wl' can be emulated using 'author-mask') |
| − | ['tytuł'] = 'title', | + | ['tytuł'] = 'title', -- Polish |
| − | ['ubicación'] = 'location', | + | ['ubicación'] = 'location', -- Spanish |
| − | ['urlarchivo'] = 'archive-url', | + | ['umfang'] = 'postscript', -- German (not yet directly supported by us) |
| − | ['urlarchivio'] = 'archive-url', | + | ['urlarchivo'] = 'archive-url', -- Spanish |
| − | ['urn'] = 'id', | + | ['urlarchivio'] = 'archive-url', -- Italian |
| − | ['übersetzer'] = 'translator', | + | ['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly) |
| − | ['verlag'] = 'publisher', | + | ['übersetzer'] = 'translator', -- German (singular and plural) |
| + | ['verlag'] = 'publisher', -- German | ||
| + | ['verlagea'] = 'publisher', -- German (not a direct replacement, but can be emulated) | ||
['vol'] = 'volume', | ['vol'] = 'volume', | ||
| − | ['volumen'] = 'volume', | + | ['volumen'] = 'volume', -- Spanish |
| − | ['werk'] = 'work', | + | ['werk'] = 'work', -- German |
| − | ['werkerg'] = 'contribution', | + | ['werkerg'] = 'contribution', -- German (not a direct replacement, but can be emulated) |
| − | ['wkautore'] = 'author-link', | + | ['wkautore'] = 'author-link', -- Italian |
| − | ['wolumin'] = 'volume', | + | ['wolumin'] = 'volume', -- Polish |
| − | ['wydanie'] = 'number', | + | ['wydanie'] = 'number', -- Polish |
| − | ['wydawca'] = 'publisher', | + | ['wydawca'] = 'publisher', -- French |
| − | ['zaprezentowany'] = 'publisher', | + | ['zaprezentowany'] = 'publisher', -- French |
| − | ['zdb'] = 'id', | + | ['zdb'] = 'id', -- German (as 'id={{ZDB|...}}') (not yet supported by us directly) |
| − | ['zitat'] = 'quote', | + | ['zitat'] = 'quote', -- German |
| − | ['zugriff'] = 'access-date', | + | ['zugriff'] = 'access-date', -- German |
} | } | ||
| Line 189: | Line 207: | ||
--[[--------------------------< P A T T E R N S >-------------------------------------------------------------- | --[[--------------------------< P A T T E R N S >-------------------------------------------------------------- | ||
| − | Here we use Lua patterns to make suggestions. The form is ['pattern'] = 'correct', | + | Here we use Lua patterns to make suggestions. The form is |
| + | |||
| + | ['pattern'] = 'correct', | ||
| − | Lua patterns are not | + | 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 | + | Patterns should probably always include the '^' and '$' anchor assertions to prevent a partial |
| − | suggesting the wrong parameter name. For instance, the pattern 'a[utho]+r' matches 'author' in the no-longer-supported | + | match from incorrectly suggesting the wrong parameter name. For instance, the pattern 'a[utho]+r' |
| − | parameter |author-separator= so the code suggests '|author='; the same pattern also matches the no-longer-supported | + | matches 'author' in the no-longer-supported parameter |author-separator= so the code suggests |
| − | parameter |separator= (returning 'ator') so again, the code suggests '|author='. | + | '|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.) | + | One capture is supported, typically the enumerator from an enumerated parameter (the '6' in |author6=, etc.) |
| − | capture replaces $1 in the 'correct' value. | + | The value from the capture replaces $1 in the 'correct' value. |
]] | ]] | ||
| Line 207: | Line 228: | ||
['^ac+es+ ?d?a?t?e?$'] = 'access-date', | ['^ac+es+ ?d?a?t?e?$'] = 'access-date', | ||
['^a[utho]+r$'] = 'author', | ['^a[utho]+r$'] = 'author', | ||
| − | ['^a[utho]+r(%d+)$'] = 'author$1', | + | ['^a[utho]+r(%d+)$'] = 'author$1', -- enumerated |
['^pu[blish]+ers?$'] = 'publisher', | ['^pu[blish]+ers?$'] = 'publisher', | ||
} | } | ||
return {suggestions = suggestions, patterns=patterns}; | return {suggestions = suggestions, patterns=patterns}; | ||
Revision as of 14:14, 16 June 2020
Documentation for this module may be created at Module:Citation/CS1/Suggestions/sandbox/doc
--[[
History of changes since last sync: 2017-04-29
* 2018-07-31: remove lang from suggestion list as it is now explicitly whitelisted; see Help_talk:Citation_Style_1#lang_on_suggestion_list_removed;_general_q_about_suggestion_list
* 2020-02-16: sync from live; add |deadurl= and |dead-url=; |doi_brokendate=, |doi_inactivedate=, |template doc demo=, |trans_chapter=, |trans_title= added earlier but apparently not documented; see Wikipedia:Village_pump_(technical)#Automated_suggestion_for_%7Cdead-url%3D_%7Cdeadurl%3D_to_%7Curl-status
* 2020-06-16: Remove |translator= from suggestion list as it is now a supported parameter. Suggest superset parameter |date= instead of the discouraged parameter |year=. Refine several foreign language suggestions to reflect changes in parameters supported by English citation templates. Add various suggestions to emulate parameters supported by German citation templates as much as possible.
]]
-- 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', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
['accesso'] = 'access-date', -- Italian
['accessyear'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
['address'] = 'location',
['année'] = 'date', -- French
['año'] = 'date',
['año-original'] = 'orig-year',
['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. ...') (not yet supported by us directly)
['artist'] = 'others',
['auflage'] = 'edition', -- German
['auteur'] = 'author', -- French
['auther'] = 'author',
['author link'] = 'author-link', -- Polish
['author link2'] = 'author2-link', -- Polish
['autor'] = 'authors', -- 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
['comment'] = 'postscript',
['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',
['dead-url'] = 'url-status',
['distributor'] = 'publisher',
['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}') (not yet supported by us directly)
['doi_brokendate'] = 'doi-broken-date',
['doi_inactivedate'] = 'doi-inactive-date',
['éditeur'] = 'editor', -- French
['editon'] = 'edition',
['editoin'] = 'edition',
['editora'] = 'publisher', -- Portuguese
['editorial'] = 'publisher',
['en ligne le'] = 'archive-date', -- French
['encyclopædia'] = 'encyclopedia',
['enlaceautor'] = 'author-link', -- Spanish
['fecha'] = 'date', -- Spanish
['fechaacceso'] = 'access-date', -- Spanish
['fechaarchivo'] = 'archive-date', -- Spanish
['filetype'] = 'format',
['first 1'] = 'first1',
['foramt'] = 'format',
['formato'] = 'format', -- Spanish, Italian, Polish
['frist'] = 'first',
['fundstelle'] = 'at', -- German (not directly supported by us)
['herausgeber'] = 'editors', -- German (singular and plural)
['hrsg'] = 'publisher', -- German
['hrsgreihe'] = 'editor', -- German
['idioma'] = 'language', -- Spanish, Italian
['imię'] = 'first', -- Polish
['isbndefekt'] = 'ignore-isbn-error', -- German
['isbnformalfalsch'] = 'ignore-isbn-error', -- German
['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
['isnb'] = 'isbn',
['issnformalfalsch'] = 'ignore-issn-error', -- German
['jahr'] = 'date', -- German
['jahrea'] = 'orig-year', -- German (not a direct replacement, but can be emulated)
['kapitel'] = 'chapter', -- German
['kbytes'] = 'format', -- German (not a direct replacement, but can be emulated)
['kommentar'] = 'postscript', -- German (not a direct replacement, but can be emulated)
['langauge'] = 'language',
['langue'] = 'language', -- French
['last 1'] = 'last1',
['lieu'] = 'location', -- French
['lingua'] = 'language', -- Italian
['lire en ligne'] = 'url', -- French
['lizenznummer'] = 'id', -- German (as 'id=License ...')
['loaction'] = 'location',
['locatoin'] = 'location',
['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',
['newpaper'] = 'newspaper',
['news'] = 'newspaper',
['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-year',
['originaljahr'] = 'orig-year', -- 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'] = 'publishing-place', -- German (not a direct replacement, but can be emulated)
['other'] = 'others',
['oznaczenie'] = 'agency', -- Polish
['pagees'] = 'pages',
['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',
['pmcid'] = 'pmc',
['praca'] = 'work', -- Polish
['prénom'] = 'first', -- French
['prénom1'] = 'first1', -- French
['ps'] = 'postscript',
['pub'] = 'publisher',
['pulbication-place'] = 'publication-place',
['reihe'] = 'series', -- German
['retrieved'] = 'access-date',
['rok'] = 'date', -- Polish
['sammelwerk'] = 'work', -- German
['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
['suscripción'] = 'url-access', -- Spanish, Polish (as |url-access=subscription)
['tag'] = 'date', -- German
['template doc demo'] = 'template-doc-demo',
['tile'] = 'title',
['tite'] = 'title',
['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',
['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
['umfang'] = 'postscript', -- German (not yet directly supported by us)
['urlarchivo'] = 'archive-url', -- Spanish
['urlarchivio'] = 'archive-url', -- Italian
['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
['übersetzer'] = 'translator', -- German (singular and plural)
['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|...}}') (not yet supported by us directly)
['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};