Dokumentation für das Modul Citation/i18n[Ansicht] [Bearbeiten] [Versionsgeschichte] [Aktualisieren]

Verwendung

Das Modul stellt die Parametertabelle und Zeichenketten für die Internationalisierung des Moduls Citation zur Verfügung.

Versionsbezeichnung auf Wikidata: 2024-12-12 Ok!

Verwendung in anderen Modulen

Dieses Modul ist notwendig für die Ausführung folgender Module. Bei Anpassungen sollte die Funktionstüchtigkeit der folgenden Module geprüft werden. Benutze dazu auch diese Tracking-Kategorie um Fehler zu finden, die sich dann auf Artikel auswirken:

Hinweise
-- Separating code from internationalization

-- documentation
local citationI18n = {
	suite  = 'Citation',
	sub    = 'i18n',
	serial = '2024-12-12'
}

return {
	-- administration
	moduleInterface = citationI18n,
	styleSrc = 'Module:Citation/styles.css',

	-- options
	skipPathCheck = false, -- for URL check, see Module:UrlCheck

	-- project information
	project = {
		name = 'wikivoyage.org',
		languageCode = mw.language.getContentLanguage():getCode(),
		language = mw.language.fetchLanguageName( mw.language.getContentLanguage():getCode() )
	},

	-- list of valid type values
	refTypes = {
		book       = { 'book', 'Buch' },
		map        = { 'map', 'Karte' },
		bookitem   = { 'bookitem', 'collection', 'Sammelwerk' },
		journal    = { 'journal', 'Zeitschrift' },
		newspaper  = { 'newspaper', 'Zeitung' },
		web        = { 'web', 'Web', 'Internet' },
		webnews    = { 'webnews', 'news', 'Nachricht' },
	},

	-- list of valid status values
	urlStatusTable = {
		dead    = { 'dead', 'offline' },
		live    = { 'live', 'online' },
		usurped = { 'unfit', 'usurped', 'usurpiert' }
	},

	-- list of possible parameters
	-- no index/key : possible parameter names
	-- types = : reference types for which parameter is valid
	-- COinS = : COinS key
	-- prefix = : hint before identifier
	-- url = : identifier url formatter
	-- doi = : doi equivalent
	params = {
		-- type, author and title
		type          = { 'type', 'Typ' },
		author        = { 'Autor', COinS = 'rft.au' },
		title         = { 'Titel', COinS = 'rft.title' },
		titleAddition = { 'TitelErg' },
		scale         = { 'Maßstab', types = 'map' },
		url           = { 'Online', 'URL', COinS = 'url', url = '%s' },
		access        = { 'Zugriff' },

		-- edited collections
		editor      = { 'Herausgeber', 'Hrsg', types = { 'book', 'map', 'bookitem' } },
		collection  = { 'Sammelwerk', types = 'bookitem' },
		journal     = { 'Zeitschrift', 'Sammelwerk', types = 'journal', COinS = 'rft.jtitle' },
		newspaper   = { 'Zeitung', 'Sammelwerk', types = 'newspaper', COinS = 'rft.jtitle' },
		abbr        = { 'Abk', types = { 'bookitem', 'journal', 'newspaper' }, COinS = 'rft.stitle' },
		website     = { 'Website', 'Internet', 'Sammelwerk', types = { 'web', 'webnews' } },
		siteUrl     = { 'Site-URL', 'Website-URL', types = { 'bookitem', 'journal', 'newspaper', 'web', 'webnews' },
		                url = '%s' },

		-- published
		place       = { 'Ort', COinS = 'rft.place' },
		publisher   = { 'Verlag', types = { 'book', 'map', 'bookitem', 'web', 'webnews' }, COinS = 'rft.pub' },
		date        = { 'Datum', 'Jahr', COinS = 'rft.date' },
		edition     = { 'Auflage', types = { 'book', 'map', 'bookitem' }, COinS = 'rft.edition' },
		series      = { 'Reihe', types = { 'book', 'bookitem', 'map' }, COinS = 'rft.series' },

		-- source
		volume      = { 'Band', types = { 'book', 'map', 'bookitem', 'journal', 'newspaper' }, COinS = 'rft.volume' },
		issue       = { 'Nummer', types = { 'journal', 'newspaper' }, COinS = 'rft.issue' },
		chapter     = { 'Kapitel', types = 'book', COinS = 'rft.atitle' },
		chapterUrl  = { 'Kapitel-URL', types = 'book' },
		pages       = { 'Seiten', types = { 'book', 'bookitem', 'journal', 'newspaper', 'web', 'webnews' }, COinS = 'rft.pages' },
		columns     = { 'Spalten', types = { 'book', 'bookitem', 'journal', 'newspaper', 'web', 'webnews' } },

		-- identifiers
		isbn        = { 'ISBN', 'isbn', types = { 'book', 'bookitem', 'map', 'journal' }, COinS = 'rft.isbn' },
		issn        = { 'ISSN', 'issn', COinS = 'rft.issn',
		                prefix = '[[w:Internationale Standardnummer für fortlaufende Sammelwerke|ISSN]] ',
		                url = '//zdb-katalog.de/list.xhtml?t=iss%3D%22%s%22&key=cql' },
		eissn       = { 'EISSN', 'eissn', COinS = 'rft.eissn' },
		ignoreError = { 'ignoreError' },

		arxiv       = { 'arXiv', 'ARXIV', 'arxiv', 'eprint', types = { 'journal' }, COinS = 'info:arxiv',
		                prefix = '[[w:arXiv|arXiv]]:',
		                url = '//arxiv.org/abs/%s' },
		asin        = { 'ASIN', 'asin',
		                prefix = '[[w:Amazon Standard Identification Number|ASIN]] ',
		                url = '//www.amazon.de/gp/product/%s' },
		bibcode     = { 'BIBCODE', 'bibcode', COinS = 'info:bibcode',
		                prefix = '[[w:Bibcode|Bibcode]]:',
		                url = '//ui.adsabs.harvard.edu/abs/%s' },
		dnb         = { 'DNB', 'dnb', types = { 'book', 'bookitem', 'map' },
		                prefix = '[[w:Deutsche Nationalbibliothek|DNB]] ',
		                url = '//d-nb.info/%s' },
		doi         = { 'DOI', 'doi', COinS = 'info:doi',
		                prefix = '[[w:Digital Object Identifier|doi]]:',
		                url = '//doi.org/%s' },
		hdl         = { 'HDL', 'hdl', COinS = 'info:hdl',
		                prefix = '[[w:Handle-System|hdl]]:',
		                url = '//hdl.handle.net/%s' },
		jstor       = { 'JSTOR', 'jstor', types = { 'journal', 'newspaper' }, COinS = 'jstor',
		                prefix = '[[w:JSTOR|JSTOR]] ',
		                url = '//www.jstor.org/stable/%s',
		                doi = '10.2307/%s' },
		oclc        = { 'OCLC', 'oclc', types = { 'book', 'bookitem', 'map' }, COinS = 'info:oclcnum',
		                prefix = '[[w:Online Computer Library Center|OCLC]] ',
		                url = '//worldcat.org/oclc/%s' },
		ol          = { 'OL', 'ol',
		                prefix = '[[w:Open Library|OL]] ',
		                url = '//openlibrary.org/%s' },
		pmid        = { 'PMID', 'pmid', types = { 'journal' }, COinS = 'info:pmid',
		                prefix = '[[w:PubMed|PubMed]] ',
		                url = '//pubmed.ncbi.nlm.nih.gov/%s' },
		urn         = { 'URN', 'urn', types = { 'book', 'journal', 'map' },
		                prefix = '[[w:Uniform Resource Name|urn]]:',
		                url = '//nbn-resolving.org/urn:%s' },

		-- archive
		urlStatus   = { 'URL-Status' },
		accessDate  = { 'Abruf' },
		archiveUrl  = { 'Archiv-URL' },
		archiveDate = { 'Archiv-Datum' },
		format      = { 'Format' },
		KBytes      = { 'KBytes' },
		MBytes      = { 'MBytes' },

		-- additional statesments
		extent      = { 'Umfang', 'Seitenanzahl', types = { 'book', 'bookitem', 'map' }, COinS = 'rft.tpages' },
		language    = { 'Sprache' },
		comment     = { 'Kommentar' },
		quote       = { 'Zitat' }
	},

	-- use following urls if args.url is not specified
	additionalTitleUrls = { 'urn', 'doi', 'hdl', 'jstor' },

	-- list of formatter strings
	-- formatting is geared to DIN 690 = ISO 690, and DIN 1505-2
	formatters = {
		-- author
		auAuthor = '<span class="voy-cite-author">%s</span>',
		auAuthorAll = '%s: ',
		auAuthorEditor = '%s ; %s',
		auEditor = '<span class="voy-cite-editor">%s</span>&nbsp;(Hrsg.)',

		-- title
		tiAll = '%s. ',
		tiAddition = '%s&nbsp;/ %s',
		tiChapter = 'Kapitel <bdi class="voy-cite-chapter-title">%s</bdi>',
		tiCollectionTitle = '<bdi class="voy-cite-collection-title">%s</bdi>',
		tiIn = 'In:&nbsp;',
		tiJournalTitle = '<bdi class="voy-cite-journal-title">%s</bdi>',
		tiNewspaperTitle = '<bdi class="voy-cite-newspaper-title">%s</bdi>',
		tiScale = 'Maßstab: <span class="voy-cite-scale">%s</span>. ',
		tiSeries = '<span class="voy-cite-series">%s</span>',
		tiTitle = '<bdi class="voy-cite-title">%s</bdi>',
		tiVolume = '%s; Bd.&#x202F;<span class="voy-cite-volume">%s</span>',
		tiWebsiteTitle = '<bdi class="voy-cite-website-title">%s</bdi>',

		-- publisher
		puAll = '%s.',
		puDate = '<span class="voy-cite-date">%s</span>',
		puDateEditionNum = '%s (%d.&#x202F;Auflage)',
		puDateEdition = '%s (%s)',
		puPlace = '<span class="voy-cite-place">%s</span>',
		puPlaceDate = '%s, %s',
		puPlacePub = '%s: %s',
		puPublisher = '<span class="voy-cite-publisher">%s</span>',

		-- additions
		addColumns = 'Sp.&#x202F;%s',
		addComment = ' %s',
		addDelimiter1 = ', ',
		addDelimiter2 = '; ',
		addExtent = '%s Seiten',
		addInLanguage = 'in %s',
		addLanguage = ' (%s)',
		addPages = 'S.&#x202F;%s',
		addQuote = ' <span class="voy-cite-quotation">%s</span>',

		-- periodical	
		prAbbr = ' (%s)',
		prIssue = 'Nr.&#x202F;<span class="voy-cite-issue">%s</span>',
		prPlace = ' &lt;<span class="voy-cite-place">%s</span>&gt;',
		prVolume = 'Bd.&#x202F;<span class="voy-cite-volume">%s</span>',
		prVolIssue = '%s,<span class="voy-cite-issue">%s</span>',
		prVolYear = '%s (<span class="voy-cite-date">%s</span>)',

		-- newspaper
		nsVolume = 'Jg.&#x202F;<span class="voy-cite-volume">%s</span>',

		-- web
		wbAccess = 'abgerufen am %s',
		wbKBytes = 'Dateigröße: %s&#x202F;KByte',
		wbMBytes = 'Dateigröße: %s&#x202F;MByte',

		-- archive
		arArchived = 'Archiviert',
		arOriginal = 'Original',
		arArchive = ' %s vom %s.',
		arArchiveDate = ' %s vom %s am %s.',
		arOffline = ' %s nicht mehr verfügbar.'
	},

	accessTypes = {
		closed = { 'kostenpflichtig', 'Paywall', 'Paid Content', 'Bezahlung', 'closed', file = '[[File:Closed Access logo transparent.svg|9px|link=w:Paid Content|alt=Kostenpflichtiger Zugriff|Paid Content – kostenpflichtiger Zugriff]]' },
		free   = { 'frei', 'free', file = '[[File:Lock-green.svg|9px|link=w:Freie Inhalte|Freie Veröffentlichung – Neben dem Lesen weitere Nutzungsrechte]]' },
		mixed  = { 'gemischt', 'Freemium', 'mixed', file = '[[File:Mixed Access logo PLoS transparent.svg|9px|link=w:Freemium|alt=Unterschiedliche Nutzungsbedingungen|Unterschiedliche Nutzungsbedingungen – Nutzung teilweise gratis]]' },
		open   = { 'offen', 'open', file = '[[File:Open Access logo PLoS transparent.svg|9px|link=w:Open Access|alt=Open Access|Open-Access-Veröffentlichung – Nutzungsrecht zum Lesen]]' }
	},

	-- error categories and hints
	texts = {
		accessNoUrl   = '<span class="error">Zugriffsform ohne Internetlink</span>[[Category:Literatur: Zugriffsform ohne Internetlink]]',
		accesswrong   = '<span class="error">Unbekannte Zugriffsform</span>[[Category:Literatur: unbekannte Zugriffsform]]',
		decimalPoint  = ',',
		moreThan100   = '<span class="error">Dateigröße über 100 MB</span>[[Category:Literatur: Dateigröße über 100 MB]]',
		noTitle       = '<span class="error">Fehlender Titel</span>',
		noTitleUrl    = '<span class="error">Titel und URL fehlen</span>[[Category:Literatur: Titel und URL fehlen]]',
		noURL         = '<span class="error">Ungültige URL</span>[[Category:Literatur: ungültige URL]]',
		unwantedURL   = '<span class="error">unerwünschte URL</span>[[Category:Literatur: unerwünschte URL]]',
		unknownParam  = '<span class="error">Ungültiger Parameter: %s</span>[[Category:Literatur: ungültige Parameter]]',
		unknownParams = '<span class="error">Ungültige Parameter: %s</span>[[Category:Literatur: ungültige Parameter]]',
		unknownTitle  = '[[Category:Literatur: fehlender Titel]]',
		unknownPeriodical = '[[Category:Literatur: fehlender Titel eines Periodikums]]',
		redundantParams = '[[Category:Literatur: redundante Parameter]]',
		wrongChars    = '<span class="error">Ungültige Steuerzeichen</span>[[Category:Literatur: ungültige Steuerzeichen]]',
		wrongDate     = '<span class="error">Ungültiges Datum</span>[[Category:Literatur: ungültiges Datum]]',
		wrongIssn     = '<span class="error">Ungültige ISSN</span>[[Category:Seiten mit ISSN-Fehlern]]',
		wrongPages    = '<span class="error">Ungültige Seiten</span>[[Category:Literatur: ungültige Seiten]]',
		wrongType     = '<span class="error">Ungültiger Typ</span>[[Category:Literatur: ungültiger Typ]]',
		wrongURN      = '[[Category:Literatur: ungültige URN-Prüfziffer]]',
		wrongValue    = '<span class="error">Ungültiger Wert: %s</span>[[Category:Literatur: ungültiger Wert]]',
		wrongValues   = '<span class="error">Ungültige Werte: %s</span>[[Category:Literatur: ungültiger Wert]]',
		KBytesMBytes  = '<span class="error">KBytes und MBytes gleichzeitig</span>[[Category:Literatur: KBytes und MBytes gleichzeitig]]'
	},

	citeClass      = 'citation ',

	addCiteClasses = {
		book      = 'printNoLink book',
		bookitem  = 'printNoLink book bookSection',
		journal   = 'printNoLink journal',
		map       = 'printNoLink map book',
		newspaper = 'printNoLink news newspaper',
		web       = 'web',
		webnews   = 'news'
	},

	replacements = {
		{ s = '([!%?…‥])%s*%.+', r = '%1' },
		{ s = "([!%?…‥]'')%s*%.+", r = '%1' },
		{ s = '([!%?…‥]</span>)%s*%.+', r = '%1' },
		{ s = '(%d+)%s+(f?f%.)', r = '%1&#x202F;%2' },
		{ s = '%s+([.:,;!?/›»])', r = '&#x202F;%1' },
		{ s = '([‹«])%s+', r = '%1&#x202F;' }
	},

	unwantedUrls = {
		'doi.org/', 'hdl.handle.net/', 'jstor.org/', 'openlibrary.org/',
		'arxiv.org/abs/', 'adsabs.harvard.edu/', 'worldcat.org/oclc',
		'ncbi.nlm.nih.gov/pubmed/', 'urn:nbn:'
	},

	-- nbn-resolving.org resolving: ch, de, or propagation
	-- https://wiki.dnb.de/display/URNSERVDOK/URN-Resolver+API
	nbnResolving = { at = '_', ch = '_', cz = '_', de = '_', fi = '_', hu = '_',
		it = '_', nl = '_', no = '_', se = '_'},
	nbnCheckDigit = { at = '_', ch = '_', de = '_', fi = '_' }
}