Модул:Citation/CS1/Suggestions/sandbox — разлика између измена

Iz Vojne Enciklopedije
Пређи на навигацију Пређи на претрагу
(+)
 
м (1 измена увезена)
 
(Нису приказане 2 међуизмене 2 корисника)
Ред 1: Ред 1:
--молим уносити предлоге по абецедном редоследу
--molim unositi predloge po abecednom redosledu
--формат је ['нетачно'] = 'тачно',
--format je ['netačno'] = 'tačno',


suggestions = {
suggestions = {
['accessmonth'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
-- ['acccessdate'] = 'access-date',
['accesso'] = 'access-date', --  Italian
-- ['accesdate'] = 'access-date',
['accessyear'] = 'access-date', -- no longer supported by us, but still by citation templates mirrored in foreign WPs; can be emulated using 'access-date'
-- ['access date'] = 'access-date',
-- ['accessate'] = 'access-date',
-- ['accessdare'] = 'access-date',
-- ['accessdatte'] = 'access-date',
-- ['accessddate'] = 'access-date',
-- ['accessdte'] = 'access-date',
-- ['accessed'] = 'access-date',
-- ['accessedate'] = 'access-date',
-- ['accesssdate'] = 'access-date',
-- ['accssdate'] = 'access-date',
-- ['acessdate'] = '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')
['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'] = 'year', -- French
['année'] = 'year', -- French
['año'] = 'year',
['año'] = 'year',
['año-original'] = 'orig-year',
['año-original'] = 'orig-year',
['añoacceso'] = 'access-date', -- Spanish
['añoacceso'] = 'access-date', -- Spanish, Italian
['annoaccesso'] = 'access-date', --Italian
['apellido'] = 'last', -- Spanish, Italian
['annodiaccesso'] = 'access-date', --Italian
['apellido'] = 'last', -- Spanish
['archiv-datum'] = 'archive-date', -- German
['archiv-datum'] = 'archive-date', -- German
['archive date'] = 'archive-date',
['archive date'] = 'archive-date',
['archiv-url'] = 'archive-url', -- German
['archiv-url'] = 'archive-url', -- German
['archive url'] = 'archive-url', -- Spanish
['archive url'] = 'archive-url', -- Spanish, Italian
['artist'] = 'others',
['artist'] = 'others',
['auflage'] = 'edition', -- German
['auflage'] = 'edition', -- German
['auteur'] = 'author', -- French
['auteur'] = 'author', -- French
['auther'] = 'author',
['auther'] = 'author',
-- ['authorformat'] = 'name-list-format', -- remove after 2016-01-01
-- ['author-format'] = 'name-list-format', -- remove after 2016-01-01
['author link'] = 'author-link', -- Polish
['author link'] = 'author-link', -- Polish
['author link2'] = 'author2-link', -- Polish
['author link2'] = 'author2-link', -- Polish
-- ['autor'] = 'author', -- Spanish, Italian, Polish
['autor'] = 'authors', -- German (singular and plural)
['autor'] = 'authors', -- German (singular and plural)
['autore'] = 'author', -- Italian
-- ['autor2'] = 'author2', -- Spanish, Italian, Polish
-- ['autor3'] = 'author3', -- Polish
['autthor'] = 'author',
['autthor'] = 'author',
['band'] = 'volume', -- German
['band'] = 'volume', -- German
-- ['began'] = 'date', -- remove after 2016-01-01
['bind'] = 'volume', -- Norwegian
['chapter_title'] = 'chapter',
['chapter_title'] = 'chapter',
['cita'] = 'quote', -- Spanish
['cita'] = 'quote', -- Spanish, Italian
['citazione'] = 'quote', -- Italian
['coautores'] = 'coauthors', -- Spanish, Italian
['coauthor'] = 'author',
['coauthors'] = 'author',
['coautores'] = 'author', -- Spanish
['coautori'] = 'author', -- Italian
['cognome'] = 'last', -- Italian
['consulté le'] = 'access-date', -- French
['consulté le'] = 'access-date', -- French
['czasopismo'] = 'journal', -- Polish
['czasopismo'] = 'journal', -- Polish
['data'] = 'date', -- Polish, Italian
['data'] = 'date', -- Polish
['dataarchivio'] = 'archive-date', -- Italian
['data dostępu'] = 'access-date', -- Polish
['data dostępu'] = 'access-date', -- Polish
['datum'] = 'date', -- German
['datum'] = 'date', -- German
Ред 48: Ред 58:
['editon'] = 'edition',
['editon'] = 'edition',
['editoin'] = 'edition',
['editoin'] = 'edition',
-- ['editorformat'] = 'name-list-format', -- remove after 2016-01-01
-- ['editor-format'] = 'name-list-format', -- remove after 2016-01-01
-- ['editorgiven'] = 'editor-given', -- remove after 2016-01-01
['editorial'] = 'publisher',
['editorial'] = 'publisher',
-- ['editorsurname'] = 'editor-surname', -- remove after 2016-01-01
['en ligne le'] = 'archive-date', -- French
['en ligne le'] = 'archive-date', -- French
['encyclopædia'] = 'encyclopedia',
['encyclopædia'] = 'encyclopedia',
['enlaceautor'] = 'author-link', -- Spanish
-- ['ended'] = 'date', -- remove after 2016-01-01
['fecha'] = 'date', -- Spanish
['enlaceautor'] = 'author-link', -- Spanish, Italian
['fechaacceso'] = 'access-date', -- Spanish
['fecha'] = 'date', -- Spanish, Italian
['fechaarchivo'] = 'archive-date', -- Spanish
['fechaacceso'] = 'access-date', -- Spanish, Italian
['fechaarchivo'] = 'archive-date', -- Spanish, Italian
['filetype'] = 'format',
['filetype'] = 'format',
['first 1'] = 'first1',
['first 1'] = 'first1',
['foramt'] = 'format',
['foramt'] = 'format',
['forfatter'] = 'author', -- Norwegian
['formato'] = 'format', -- Spanish, Italian, Polish
['formato'] = 'format', -- Spanish, Italian, Polish
['frist'] = 'first',
['frist'] = 'first',
Ред 73: Ред 89:
['last 1'] = 'last1',
['last 1'] = 'last1',
['lieu'] = 'location', -- French
['lieu'] = 'location', -- French
['lingua'] = 'language', -- Italian
['lire en ligne'] = 'url', -- French
['lire en ligne'] = 'url', -- French
['lizenznummer'] = 'id', -- German (as 'id=License ...')
['lizenznummer'] = 'id', -- German (as 'id=License ...')
Ред 90: Ред 105:
['nom'] = 'last', -- French
['nom'] = 'last', -- French
['nom1'] = 'last1', -- French
['nom1'] = 'last1', -- French
['nombre'] = 'first', -- Spanish
['nombre'] = 'first', -- Spanish, Italian
['nome'] = 'first', -- Italian
['nummer'] = 'number', -- German, Norwegian
['nummer'] = 'number', -- German
['obra'] = 'work', -- Spanish, Italian
['obra'] = 'work', -- Spanish
['odpowiedzialność'] = 'agency', -- Polish
['odpowiedzialność'] = 'agency', -- Polish
['offline'] = 'dead-url', -- German
['offline'] = 'dead-url', -- German
['online'] = 'url', -- German (not a direct replacement, but can be emulated)
['online'] = 'url', -- German (not a direct replacement, but can be emulated)
['opublikowany'] = 'agency', -- Polish
['opublikowany'] = 'agency', -- Polish
['opera'] = 'work', -- Italian
['origdate'] = 'orig-year',
['origdate'] = 'orig-year',
['originaljahr'] = 'orig-year', -- German
['originaljahr'] = 'orig-year', -- German
Ред 111: Ред 124:
['páginas'] = 'pages', -- Spanish, Italian
['páginas'] = 'pages', -- Spanish, Italian
['passage'] = 'pages', -- French
['passage'] = 'pages', -- French
['pagina'] = 'pages', -- Italian
['pagine'] = 'pages', -- Italian
['périodique'] = 'publisher', -- French
['périodique'] = 'publisher', -- French
['plublisher'] = 'publisher',
['plublisher'] = 'publisher',
Ред 121: Ред 132:
['ps'] = 'postscript',
['ps'] = 'postscript',
['pub'] = 'publisher',
['pub'] = 'publisher',
['publikasjon'] = 'journal', -- Norwegian: publication
-- ['pubisher'] = 'publisher',
-- ['publiser'] = 'publisher',
-- ['publishers'] = 'publisher',
-- ['publsher'] = 'publisher',
-- ['publsiher'] = 'publisher',
['pulbication-place'] = 'publication-place',
['pulbication-place'] = 'publication-place',
-- ['pulbisher'] = 'publisher',
-- ['pulisher'] = 'publisher',
['reihe'] = 'series', -- German
['reihe'] = 'series', -- German
['retrieved'] = 'access-date',
['retrieved'] = 'access-date',
Ред 127: Ред 146:
['sammelwerk'] = 'work', -- German
['sammelwerk'] = 'work', -- German
['seiten'] = 'pages', -- German
['seiten'] = 'pages', -- German
-- ['separator'] = 'mode', -- remove after 2016-01-01
['seria'] = 'series', -- Polish
['seria'] = 'series', -- Polish
['série'] = 'work', -- French *RECHECK*
['série'] = 'work', -- French *RECHECK*
['service'] = 'agency',
['service'] = 'agency',
['side'] = 'page', -- Norwegian
['sitioweb'] = 'website', --Spanish
['sitioweb'] = 'website', --Spanish
['stron'] = 'page', -- Polish
['stron'] = 'page', -- Polish
Ред 135: Ред 156:
['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
['suscripción'] = 'subscription', -- Spanish, Polish
['suscripción'] = 'subscription', -- Spanish, Italian, Polish
['tag'] = 'date', -- German
['tag'] = 'date', -- German
['tile'] = 'title',
['tile'] = 'title',
Ред 144: Ред 165:
['titolo'] = 'title', -- Spanish, Italian
['titolo'] = 'title', -- Spanish, Italian
['titre'] = 'title', -- French
['titre'] = 'title', -- French
['tittel'] = 'title', -- Norwegian
['títle'] = 'title',
['títle'] = 'title',
['título'] = 'title', -- Spanish
['título'] = 'title', -- Spanish, Italian
['transchapter'] = 'trans-chapter',
['transchapter'] = 'trans-chapter',
['translator'] = 'others',
['translator'] = 'others',
Ред 151: Ред 173:
['typ'] = 'author-mask', -- German (not a direct replacement, but the only valid argument 'typ=wl' can be emulated using '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', -- Polish
['tytuł'] = 'title', -- Polish
['ubicación'] = 'location', -- Spanish
['ubicación'] = 'location', -- Spanish, Italian
['urlarchivo'] = 'archive-url', -- Spanish
['urlarchivo'] = 'archive-url', -- Spanish, Italian
['urlarchivio'] = 'archive-url', -- Italian
['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
['übersetzer'] = 'translator', -- German (singular and plural)
['übersetzer'] = 'translator', -- German (singular and plural)
['utgivelsesår'] = 'year', -- Norwegian: release year
['verlag'] = 'publisher', -- German
['verlag'] = 'publisher', -- German
['vol'] = 'volume',  
['vol'] = 'volume',  
Ред 161: Ред 183:
['werk'] = 'work', -- German
['werk'] = 'work', -- German
['werkerg'] = 'contribution', -- German (not a direct replacement, but can be emulated)
['werkerg'] = 'contribution', -- German (not a direct replacement, but can be emulated)
['wkautore'] = 'author-link', -- Italian
['wolumin'] = 'volume', -- Polish
['wolumin'] = 'volume', -- Polish
['wydanie'] = 'number', -- Polish
['wydanie'] = 'number', -- Polish

Тренутна верзија на датум 5. фебруар 2021. у 13:49

{{#lst:Module:Citation/CS1/doc|header}}

Ово је листа предложених алтернатива за коришћење када је непознати параметар пронађен унутар шаблона за референцирање. Када је непознати параметар пронађен унутар шаблона за референцирање, порука о грешци бива генерисана, а када је могуће — софтвер прави предлог за могући параметар који је корисник хтео да унесе, и то покушавајући да унутар ове листе пронађе честе грешке и грешке у куцању.

Сваки унос је у следећем облику: ['параметар који је погрешно унесен'] = 'параметар који се предлаже за употребу'

Параметар који је погрешно унесен ће бити трансформисан у мала слова пре него што се ступи у проверавање података са ове листе, тако да сви облици уноса на ову листу могу бити написани малим словима.

{{#lst:Module:Citation/CS1/doc|module_components_table}}


--molim unositi predloge po abecednom redosledu
--format je ['netačno'] = 'tačno',

suggestions = {
--	['acccessdate'] = 'access-date',
--	['accesdate'] = 'access-date',
--	['access date'] = 'access-date',
--	['accessate'] = 'access-date',
--	['accessdare'] = 'access-date',
--	['accessdatte'] = 'access-date',
--	['accessddate'] = 'access-date',
--	['accessdte'] = 'access-date',
--	['accessed'] = 'access-date',
--	['accessedate'] = 'access-date',
--	['accesssdate'] = 'access-date',
--	['accssdate'] = 'access-date',
--	['acessdate'] = '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')
	['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'] = 'year', -- French
	['año'] = 'year',
	['año-original'] = 'orig-year',
	['añoacceso'] = 'access-date', -- Spanish, Italian
	['apellido'] = 'last', -- Spanish, Italian
	['archiv-datum'] = 'archive-date', -- German
	['archive date'] = 'archive-date',
	['archiv-url'] = 'archive-url', -- German
	['archive url'] = 'archive-url', -- Spanish, Italian
	['artist'] = 'others',
	['auflage'] = 'edition', -- German
	['auteur'] = 'author', -- French
	['auther'] = 'author',
--	['authorformat'] = 'name-list-format', -- remove after 2016-01-01
--	['author-format'] = 'name-list-format', -- remove after 2016-01-01
	['author link'] = 'author-link', -- Polish
	['author link2'] = 'author2-link', -- Polish
--	['autor'] = 'author', -- Spanish, Italian, Polish
	['autor'] = 'authors', -- German (singular and plural)
--	['autor2'] = 'author2', -- Spanish, Italian, Polish
--	['autor3'] = 'author3', -- Polish
	['autthor'] = 'author',
	['band'] = 'volume', -- German
--	['began'] = 'date', -- remove after 2016-01-01
	['bind'] = 'volume',														-- Norwegian
	['chapter_title'] = 'chapter',
	['cita'] = 'quote', -- Spanish, Italian
	['coautores'] = 'coauthors', -- Spanish, Italian
	['consulté le'] = 'access-date', -- French
	['czasopismo'] = 'journal', -- Polish
	['data'] = 'date', -- Polish
	['data dostępu'] = 'access-date', -- Polish
	['datum'] = 'date', -- German
	['deadlink'] = 'dead-url',
	['distributor'] = 'publisher',
	['dnb'] = 'id', -- German (as 'id={{DNB-IDN|...}}') (not yet supported by us directly)
	['éditeur'] = 'editor', -- French
	['editon'] = 'edition',
	['editoin'] = 'edition',
--	['editorformat'] = 'name-list-format', -- remove after 2016-01-01
--	['editor-format'] = 'name-list-format', -- remove after 2016-01-01
--	['editorgiven'] = 'editor-given', -- remove after 2016-01-01
	['editorial'] = 'publisher',
--	['editorsurname'] = 'editor-surname', -- remove after 2016-01-01
	['en ligne le'] = 'archive-date', -- French
	['encyclopædia'] = 'encyclopedia',
--	['ended'] = 'date', -- remove after 2016-01-01
	['enlaceautor'] = 'author-link', -- Spanish, Italian
	['fecha'] = 'date', -- Spanish, Italian
	['fechaacceso'] = 'access-date', -- Spanish, Italian
	['fechaarchivo'] = 'archive-date', -- Spanish, Italian
	['filetype'] = 'format',
	['first 1'] = 'first1',
	['foramt'] = 'format',
	['forfatter'] = 'author',													-- Norwegian
	['formato'] = 'format', -- Spanish, Italian, Polish
	['frist'] = 'first',
	['herausgeber'] = 'editors', -- German (singular and plural)
	['idioma'] = 'language', -- Spanish, Italian
	['imię'] = 'first', -- Polish
	['isbnistformalfalsch'] = 'ignore-isbn-error', -- German
	['isnb'] = 'isbn',
	['jahr'] = 'year', -- German
	['kapitel'] = 'chapter', -- German
--	['kommentar'] = 'comment', -- German (not yet supported by us)
	['lang'] = 'language',
	['langauge'] = 'language',
	['langue'] = 'language', -- French
	['last 1'] = 'last1',
	['lieu'] = 'location', -- French
	['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, Italian
	['nummer'] = 'number', -- German, Norwegian
	['obra'] = 'work', -- Spanish, Italian
	['odpowiedzialność'] = 'agency', -- Polish
	['offline'] = 'dead-url', -- German
	['online'] = 'url', -- German (not a direct replacement, but can be emulated)
	['opublikowany'] = 'agency', -- Polish
	['origdate'] = 'orig-year',
	['originaljahr'] = 'orig-year', -- German
	['originalort'] = 'location', -- German (if 'ort' is specified at the same time, the latter should be put in 'publication-place')
	['originalsprache'] = 'language', -- German
	['originaltitel'] = 'title', -- German (if 'originaltitel' is specified, any possible contents of 'title' should be put in 'trans-title')
	['ort'] = 'location', -- German
	['other'] = 'others',
	['oznaczenie'] = 'agency', -- Polish
	['pagees'] = 'pages',
	['página'] = 'page', -- Spanish, Italian
	['páginas'] = 'pages', -- Spanish, Italian
	['passage'] = 'pages', -- French
	['périodique'] = 'publisher', -- French
	['plublisher'] = 'publisher',
	['pmcid'] = 'pmc',
	['praca'] = 'work', -- Polish
	['prénom'] = 'first', -- French
	['prénom1'] = 'first1', -- French
	['ps'] = 'postscript',
	['pub'] = 'publisher',
	['publikasjon'] = 'journal',												-- Norwegian: publication
--	['pubisher'] = 'publisher',
--	['publiser'] = 'publisher',
--	['publishers'] = 'publisher',
--	['publsher'] = 'publisher',
--	['publsiher'] = 'publisher',
	['pulbication-place'] = 'publication-place',
--	['pulbisher'] = 'publisher',
--	['pulisher'] = 'publisher',
	['reihe'] = 'series', -- German
	['retrieved'] = 'access-date',
	['rok'] = 'date', -- Polish
	['sammelwerk'] = 'work', -- German
	['seiten'] = 'pages', -- German
--	['separator'] = 'mode', -- remove after 2016-01-01
	['seria'] = 'series', -- Polish
	['série'] = 'work', -- French *RECHECK*
	['service'] = 'agency',
	['side'] = 'page',															-- Norwegian
	['sitioweb'] = 'website', --Spanish
	['stron'] = 'page', -- Polish
	['strony'] = 'pages', -- Polish
	['spalten'] = 'at', -- German (not a direct replacement, but can be emulated)
	['sprache'] = 'language', -- German
	['suscripción'] = 'subscription', -- Spanish, Italian, Polish
	['tag'] = 'date', -- German
	['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
	['tittel'] = 'title',														-- Norwegian
	['títle'] = 'title',
	['título'] = 'title', -- Spanish, Italian
	['transchapter'] = 'trans-chapter',
	['translator'] = 'others',
	['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, Italian
	['urlarchivo'] = 'archive-url', -- Spanish, Italian
	['urn'] = 'id', -- German (as 'id={{URN|...}}') (not yet supported by us directly)
	['übersetzer'] = 'translator', -- German (singular and plural)
	['utgivelsesår'] = 'year',													-- Norwegian: release year
	['verlag'] = 'publisher', -- German
	['vol'] = 'volume', 
	['volumen'] = 'volume', -- Spanish
	['werk'] = 'work', -- German
	['werkerg'] = 'contribution', -- German (not a direct replacement, but can be emulated)
	['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};