Módulo:Citas/Suggestions
La documentación para este módulo puede ser creada en Módulo:Citas/Suggestions/doc
-- A forma é: "['Erros'] = 'Corrección', -- idioma de orixe".
suggestions = {
['accessmonth'] = 'data-acceso', -- (no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date')
['accessyear'] = 'data-acceso', -- (no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date')
['address'] = 'lugar',
['annee'] = 'ano', -- francés
['année'] = 'ano', -- francés
['año'] = 'ano',
['año-original'] = 'ano-orixinal',
['añoacceso'] = 'data-acceso', -- Spanish, Italian
['añoacesso'] = 'data-acceso',
['anoacesso'] = 'data-acceso',
['apellido'] = 'apelidos', -- Spanish, Italian
['apellidos'] = 'apelidos',
['aepllido'] = 'apelidos',
['apellidp'] = 'apelidos',
['aeplido'] = 'apelidos',
['apelidp'] = 'apelidos',
['archiv-datum'] = 'data-arquivo', -- German
['archive date'] = 'data-arquivo',
['archiv-url'] = 'url-arquivo', -- German
['archive url'] = 'url-arquivo', -- Spanish, Italian
['archivofecha'] = 'data-arquivo',
['archivourl'] = 'url-arquivo',
['arquivourl'] = 'url-arquivo',
['artist'] = 'outros',
['auflage'] = 'edición', -- German
['auteur'] = 'autor', -- francés
['auteur institutionnel'] = 'autor', -- francés
['auteur1'] = 'autor1', -- francés
['auteur2'] = 'autor2', -- francés
['auteurs'] = 'autor', -- francés
['auther'] = 'autor',
['author link'] = 'ligazón-autor', -- Polish
['author link2'] = 'ligazón-autor2', -- Polish
['autthor'] = 'autor',
['band'] = 'volume', -- German
['capitulo'] = 'capítulo',
['capitulos'] = 'capítulo',
['chapter_title'] = 'capítulo',
['consulta'] = 'data-acceso', --castelán
['consultado'] = 'data-acceso', --castelán
['consultadoel'] = 'data-acceso', --castelán
['consultado el'] = 'data-acceso', --castelán
['consultado_el'] = 'data-acceso', --castelán
['consulté le'] = 'data-acceso', -- francés
['consulte le'] = 'data-acceso', -- francés
['creditos'] = 'créditos',
['czasopismo'] = 'revista', -- Polish
['dataaceso'] = 'data-acceso',
['dataaacceso'] = 'data-acceso',
['dataacesso'] = 'dataacceso', --portugués
['data dostępu'] = 'data-acceso', -- Polish
['datum'] = 'data', -- German
['deadlink'] = 'urlmorta',
['diario'] = 'publicación',
['distributor'] = 'editorial',
['ditorial'] = 'editorial',
['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}') (not yet supported by us directly)
['éditeur'] = 'editor', -- French
['editor-apellido'] = 'apelido-editor',
['editor-apellidos'] = 'apelidos-editor',
['editor-nombre'] = 'nome-editor',
['editor1-apellidos'] = 'apelidos-editor1',
['editor1-nombre'] = 'nome-editor1',
['editor2-apellidos'] = 'apelidos-editor2',
['editor2-nombre'] = 'nome-editor2',
['editor3-apellidos'] = 'apelidos-editor3',
['editor3-nombre'] = 'nome-editor3',
['editor4-apellidos'] = 'apelidos-editor4',
['editor4-nombre'] = 'nome-editor4',
['edicion'] = 'edición',
['editon'] = 'edición',
['editoin'] = 'edición',
['en ligne le'] = 'data-arquivo', -- French
['encyclopædia'] = 'enciclopedia',
['enlaceautor'] = 'ligazón-autor', -- Spanish, Italian
['fecha'] = 'data', -- Spanish, Italian
['fehca'] = 'data',
['fechaacceso'] = 'data-acceso', --castelán
['fachaacceso'] = 'data-acceso', --castelán
['fecchacceso'] = 'data-acceso', --castelán
['fechadeacceso'] = 'data-acceso', --castelán
['fechacceso'] = 'data-acceso', --castelán
['fecha de acceso'] = 'data-acceso', --castelán
['fecha acceso'] = 'data-acceso', --castelán
['fecha_de_acceso'] = 'data-acceso', --castelán
['fecha_acceso'] = 'data-acceso', --castelán
['fechadeaccesso'] = 'data-acceso', --castelán
['fechaaceso'] = 'data-acceso', --castelán
['fechaaaceso'] = 'data-acceso', --castelán
['fechaaccesso'] = 'data-acceso', --castelán
['fechaacesso'] = 'data-acceso', --castelán
['fechaarchivo'] = 'data-arquivo', -- Spanish, Italian
['fecharchivo'] = 'data-arquivo',
['fecha-archivo'] = 'data-arquivo',
['filetype'] = 'formato',
['first 1'] = 'nome1',
['foramt'] = 'formato',
['frist'] = 'nome',
['fuente'] = 'publicación',
['herausgeber'] = 'editor', -- German (singular and plural)
['idiona'] = 'idioma',
['imię'] = 'nome', -- Polish
['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
['isnb'] = 'isbn',
['jahr'] = 'ano', -- German
['kapitel'] = 'capítulo', -- German
['lang'] = 'lingua',
['langauge'] = 'lingua',
['langue'] = 'lingua', -- French
['last 1'] = 'apelidos1',
['lieu'] = 'lugar', -- French
['ligazonautor'] = 'ligazón-autor',
['lengua'] = 'lingua', -- castelán
['língua'] = 'lingua', -- italiano
['língua2'] = 'lingua', -- italiano
['língua3'] = 'lingua', -- italiano
['lingua'] = 'lingua', -- italiano
['lingua2'] = 'lingua', -- italiano
['lingua3'] = 'lingua', -- italiano
['lenguaje'] = 'lingua',
['linguaxe'] = 'lingua',
['lire en ligne'] = 'url', -- French
['lizenznummer'] = 'id', -- German (as 'id=License ...')
['loaction'] = 'lugar',
['locatoin'] = 'lugar',
['miejsce'] = 'lugar', -- Polish
['miesiąc'] = 'data', -- Polish
['mois'] = 'data', -- French
['monat'] = 'data', -- German
['nazwisko'] = 'apelidos', -- Polish
['nespaper'] = 'xornal',
['newpaper'] = 'xornal',
['news'] = 'xornal',
['nom'] = 'apelidos', -- French
['nom1'] = 'apelidos1', -- French
['nombre'] = 'nome', -- Spanish, Italian
['nummer'] = 'número', -- German
['numero'] = 'número',
['odpowiedzialność'] = 'axencia', -- Polish
['offline'] = 'urlmorta', -- German
['ombre'] = 'nome',
['online'] = 'url', -- German (not a direct replacement, but can be emulated)
['opublikowany'] = 'axencia', -- Polish
['origdate'] = 'ano-orixinal',
['originaljahr'] = 'ano-orixinal', -- German
['originalort'] = 'lugar', -- German (if 'ort' is specified at the same time, the latter should be put in 'publication-place')
['originalsprache'] = 'lingua', -- German
['originaltitel'] = 'título', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put in 'trans-title')
['ort'] = 'lugar', -- German
['other'] = 'outros',
['oznaczenie'] = 'axencia', -- Polish
['pagees'] = 'páxinas',
['pagina'] = 'páxina',
['paginas'] = 'páxinas',
['página'] = 'páxina', -- Spanish, Italian
['páginas'] = 'páxinas', -- Spanish, Italian
['paxinas'] = 'páxinas',
['paxina'] = 'páxina',
['páxians'] = 'páxinas',
['paxiáns'] = 'páxinas',
['passage'] = 'páxinas', -- French
['périodique'] = 'editorial', -- French
['periodico'] = 'xornal',
['periódico'] = 'xornal',
['publicado'] = 'publicación',
['publicador'] = 'editorial',
['publicista'] = 'editorial',
['plublisher'] = 'editorial',
['pmcid'] = 'pmc',
['praca'] = 'obra', -- Polish
['prénom'] = 'nome', -- French
['prénom1'] = 'nome1', -- French
['ps'] = 'puntofinal',
['pub'] = 'editorial',
['publicacion'] = 'publicación',
['pulbication-place'] = 'lugar-publicación',
['reihe'] = 'series', -- German
['retrieved'] = 'data-acceso',
['rok'] = 'data', -- Polish
['sammelwerk'] = 'obra', -- German
['seiten'] = 'páxinas', -- German
['seria'] = 'serie', -- Polish
['série'] = 'obra', -- French *RECHECK*
['service'] = 'axencia',
['sitioweb'] = 'páxina-web', --Spanish
['stron'] = 'páxina', -- Polish
['strony'] = 'páxinas', -- Polish
['spalten'] = 'en', -- German (not a direct replacement, but can be emulated)
['sprache'] = 'lingua', -- German
['suscripción'] = 'subscrición', -- Spanish, Italian, Polish
['tag'] = 'data', -- German
['tile'] = 'título',
['tite'] = 'título',
['titel'] = 'título', -- German
['titel-p'] = 'título', -- German ('postscript=none' should be added as well)
['titelerg'] = 'contribución', -- German (not a direct replacement, but can be emulated)
['titolo'] = 'título', -- Spanish, Italian
['titre'] = 'título', -- French
['títle'] = 'título',
['titulo'] = 'título',
['transchapter'] = 'trad-capítulo',
['translator'] = 'outros',
['transtitle'] = 'título-trad',
['typ'] = 'máscara-autor', -- German (not a direct replacement, but the only valid argument 'typ=wl' can be emulated using 'author-mask')
['tytuł'] = 'título', -- Polish
['ubicación'] = 'lugar', -- Spanish, Italian
['ubicacion'] = 'lugar',
['ultimo'] = 'apelidos',
['último'] = 'apelidos',
['urlarchivo'] = 'url-arquivo', -- Spanish, Italian
['url-archivo'] = 'url-arquivo',
['URLcapitulo'] = 'url-capítulo',
['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
['übersetzer'] = 'tradutor', -- German (singular and plural)
['verlag'] = 'editorial', -- German
['vol'] = 'volume',
['volumen'] = 'volume', -- Spanish
['werk'] = 'obra', -- German
['werkerg'] = 'contribución', -- German (not a direct replacement, but can be emulated)
['wolumin'] = 'volume', -- Polish
['wydanie'] = 'número', -- Polish
['wydawca'] = 'editorial', -- French
['zaprezentowany'] = 'editorial', -- French
['zdb'] = 'id', -- German (as 'id={{ZDB|...}}') (not yet supported by us directly)
['zitat'] = 'cita', -- German
['zugriff'] = 'data-acceso', -- 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?$'] = 'data-acceso',
['^a[utho]+r$'] = 'autor',
['^a[utho]+r(%d+)$'] = 'autor$1', -- enumerated
['^pu[blish]+ers?$'] = 'editorial',
['^nombre(%d+)$'] = 'nome$1', -- enumerated
['^apellido[s](%d+)$'] = 'apelidos$1', -- enumerated
}
return {suggestions = suggestions, patterns=patterns};