Přeskočit na obsah

Modul:Marker utilities/i18n

Z Wikicest

Dokumentaci tohoto modulu lze vytvořit na stránce Modul:Marker utilities/i18n/Dokumentace

-- kopie z německých wikicest (https://de.wikivoyage.org/w/index.php?title=Modul:Marker_utilities/i18n&oldid=1644142)
-- copy from dewikivoyage (https://de.wikivoyage.org/w/index.php?title=Modul:Marker_utilities/i18n&oldid=1644142)
-- Separating code from internationalization

return {
	-- module administration
	moduleInterface  = {
		suite  = 'Marker utilities',
		sub    = 'i18n',
		serial = '2024-10-06',
		item   = 65441686
	},

	dates            = { yyyymmdd = { p = '^20[0-5]%d%-[01]?%d%-[0-3]?%d$', f = 'j. M Y' },
	                     yyyy     = { p = '^20[0-5]%d$', f = 'Y' },
	                     yy       = { p = '^[0-5]%d$', f = 'Y' },
	                     mmdd     = { p = '^[01]?%d%-[0-3]?%d$', f = 'j. M' },
	                     dd       = { p = '^[0-3]?%d%.?$', f = 'j.' },
	                     mm       = { p = '^[01]?%d%.?$', f = 'M' },
	                     lastedit = { f = 'F Y' },
	                     asOf     = { f = 'n/Y' }
	                   },
	fileExtensions   = { 'tif', 'tiff', 'gif', 'png', 'jpg', 'jpeg', 'jpe',
	                     'webp', 'xcf', 'ogg', 'ogv', 'svg', 'pdf', 'stl',
	                     'djvu', 'webm', 'mpg', 'mpeg' },
	months           = { 'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec',
	                     'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec' },
	monthAbbr        = { 'Led%.?', 'Úno%.?', 'Bře%.?', 'Dub%.?', 'Kvě%.?', 'Čvn%.?',
	                     'Čvc%.?', 'Srp%.?', 'Zář%.?', 'Říj%.?', 'Lis%.?', 'Pro%.?' },

	-- Map related constants
	map = {
		coordURL          = 'https://cs.wikivoyage.org/w/index.php?title=Special:MapSources&params=',
		defaultDmsFormat  = 'f1', -- see: Module:Coordinates/i18n
		defaultSiteType   = 'type:landmark_globe:earth',
		defaultZoomLevel  = 17,
		maxZoomLevel      = 19,   -- also to set in Module:GeoData, Module:Mapshape utilities/i18n
	},

	-- Wikidata properties
	properties = {
		appliesToJurisdiction = 'P1001',
		appliesToPart     = 'P518',
		appliesToPeople   = 'P6001',
		capacity          = 'P1083',
		centerCoordinates = 'P5140',
		commonsCategory   = 'P373',
		coordinates       = 'P625',
		endTime           = 'P582',  -- time
		image             = 'P18',
		instanceOf        = 'P31',
		iso4217           = 'P498',
		languageOfName    = 'P407',
		mainCategory      = 'P910',
		maximumAge        = 'P4135',
		minimumAge        = 'P2899',
		nameInNativeLang  = 'P1559',
		occupation        = 'P106',
		of                = 'P642',
		officialName      = 'P1448',
		pointInTime       = 'P585',
		propertyScope     = 'P5314', -- for fees
		quantity          = 'P1114',
		retrieved         = 'P813',
		roomNumber        = 'P8733',
		startTime         = 'P580',  -- time, for fees
		streetAddress     = 'P6375',
		subclassOf        = 'P279',
		unitSymbol        = 'P5061',
		use               = 'P366',
		validInPeriod     = 'P1264'
	},

	-- Groups of Wikidata properties
	propTable = {
		contactComments = { 'P366', 'P518', 'P642', 'P1001', 'P1559', 'P106' },
		feeComments     = { 'P5314', 'P518', 'P6001', 'P1264', 'P585', 'P2899',
		                    'P4135', 'P642', 'P580' },
		policyComments  = { 'P518', 'P1001', 'P6001' },
		quantity        = { 'P1114', 'P1083' }
	},

	-- Wikidata properties representing a qualifier
	qualifiers = {
		mobilePhone = 'Q17517',
		P8733       = 'Q180516',
		roomNumber  = 'Q180516'
	},

	-- Languages for fallbacks, except wiki language
	langs = { 'en', 'cs', 'de' }, -- array can be empty

	-- Display and performance options for vCard / Listing and Marker modules
	-- additional options in Module:VCard/i18n
	options = {
		excludeColorTypes = true,
		normalizeValues   = { 'type', 'subtype', 'show', 'status', 'symbol' },
		noStarParams      = { 'nameExtra', 'nameLocal', 'alt', 'comment' },
		noTypeMsgs        = true, -- prevents display of maintenance( typeFromWD, typeIsGroup )
		parameters        = { 'commonscat', 'id', 'nameExtra', 'wikipedia' }, -- parameter is used
		showLocalData     = true,  -- names, addresses, directions
		showSisters       = true,  -- possible values true, false, 'atEnd'
		usePropertyCateg  = true,  -- create maintenance categories for Wikidata properties
		useTypeCateg      = true,  -- create maintenance categories for marker types
		markerMetadata    = true,  -- add metadata at marker templates

		-- text limit of content/description parameter
		contentLimit      = 1000,
		groupsWithLimit   = { buy = 1, drink = 1, eat = 1, sleep = 1 },

		-- Wikidata related constants
		searchLimit       = 4,     -- count of levels for P31-P279 search

		-- useful but not necessary function calls
		WDmediaCheck      = false, -- check file names retrieved from Wikidata
		mediaCheck        = false, -- for better performance, otherwise expensive
		                         -- mw.title.new( 'Media:' .. image ) call is used
		secondaryCoords   = false, -- adding listing coordinates to article database
		                         -- using #coordinates parser function
		skipPathCheck     = false  -- for URL check, see Module:UrlCheck
	},

	-- strings
	texts = {
		asOf           = '; stav %s', -- with semicolon separator
		from           = 'od %s',
		fromTo         = '%s–%s',
		to             = 'do %s',
		fromTo2        = '%s až %s',

		-- General, i18n
		               -- black x-like cross
		closeX         = '[[File:Close x - black.png|15px|link=|class=noviewer|Unbekanntes Marker-Symbol]]',
		missingName    = 'Chybí název',
		-- In case of CJK languages no spaces are used with punctuation
		-- Enumeration commas. listing-comma is used for alt names only
		comma          = '<span class="listing-comma">, ​</span>', -- with zero-width space
		commaSeparator = ', ',
		period         = '.',
		periodSeparator= '. ',
		-- Space following a punctuation mark
		space          = ' ',
		parentheses    = ' (%s)',
		emph           = "''%s''",

		-- Formatting numbers: replacement patterns
		decimalPoint   = ',',
		groupSeparator = '.',

		-- Anchor id
		anchor         = 'vCard_%s',

		-- Marker
		CategoryNS     = { '[Cc]ategory', '[Kk]ategorie' },
		FileNS         = { '[Ff]ile', '[Ss]oubor', '[Oo]brázek' },
		latitude       = 'Zeměpisná šířka',
		longitude      = 'Zeměpisná délka',
		tooltip        = 'Kliknutím na značku se otevře mapa.',

		-- vCard / Listing module
		checkin        = 'Check-in: %s',
		checkout       = 'Check-out: %s',
		closed         = 'Uzavřeno: %s',
		closedPattern  = '^[Uu]zavřeno:?%s*',
		email          = 'e-mail: %s',
		expirationPeriod = 'now - 3 years',
		fax            = 'Fax: %s',
		hintName       = 'Název v místním jazyce %s',
		hintLatin      = 'Název v latinském přepisu',
		hintAddress    = 'Adresa v místním jazyce %s',
		hintAddress2   = 'Adresa v %s',
		hintDirections = 'Pokyny v místním jazyce %s',
		hours          = 'Otevřeno: %s',
		iata           = '[[International Air Transport Association|IATA]]: %s',
		icao           = '[Mezinárodní organizace pro civilní letectví|ICAO]]: %s',
		lastedit       = 'Aktualizace: %s',
		lasteditNone   = 'není specifikováno',
		maybeOutdated  = '(Informace mohou být zastaralé)[[Kategorie:Údržba:Bod:zastaralé informace]]',
		mobile         = 'Mobil: %s',
		payment        = 'Přijímané způsoby platby: %s',
		phone          = '<abbr title="Telefon">Tel.</abbr>: %s',
		price          = 'Cena: %s',
		skype          = 'Skype: %s',
		subtype        = 'Vlastnost: %s.',
		subtypes       = 'Vlastnosti: %s.',
		subtypeAbbr    = '<abbr title="%s">%s</abbr>',
		subtypeFile    = '[[File:%s|x14px|link=|class=noviewer listing-subtype-icon|%s]]',
		subtypeSpan    = '<span title="%s">%s</span>',
		subtypeWithCount = '%d %s',
		tollfree       = '<abbr title="Telefon">Tel.</abbr> zdarma: %s'
	},

	-- namespaces without maintenance messages
	nsNoMaintenance = {
		[ 4 ]   = true,
		[ 10 ]  = true,
		[ 828 ] = true
	},

	-- format strings for mu.addMaintenance
	formats = {
		category = '[[Kategorie:%s]]',
		error    = ' <span class="error">%s</span>',
		hint     = ' <span class="listing-check-recommended" style="display: none;">%s</span>'
	},

	-- maintenance
	maintenance = {
		-- general
		properties     = '[[Kategorie:Monitoring:Data z Wikidat]]', --myslím že není třeba kategorizovat
		type           = { category = 'Monitoring:Data z Wikidat' }, --myslím že není třeba kategorizovat
		group          = { category = 'Monitoring:Data z Wikidat' }, --myslím že není třeba kategorizovat

		urlWithIP      = { category = 'Údržba:Špatná URL', hint = 'URL obsahuje IP adresu' },
		wrongUrl       = { category = 'Údržba:Neplatná URL', err = 'neplatná URL' },

		commonscatWD   = { category = 'Monitoring:Data z Wikidat' }, --myslím že není třeba kategorizovat
		contentTooLong = { category = 'Údržba:Popis je příliš dlouhý', err = 'Popis je příliš dlouhý' },
--		currencyTooltip= { category = 'VCard: Währungstooltips eingesetzt' }, --myslím že není třeba kategorizovat
		dmsCoordinate  = { category = 'Údržba:DMS-souřadnice', hint = 'DMS-souřadnice' },
		duplicateAliases = { category = 'Údržba:Stránky s duplicitním voláním šablon', err = 'Duplicitní aliasy: %s' },
--		groupUsed      = { category = 'VCard: Parameter group benutzt' },
		illegalCtrls   = { category = 'Údržba:Parametry s neplatnými řídicími znaky', err = 'Parametry s neplatnými řídicími znaky' },
		labelFromWD    = { category = 'Monitoring:Data z Wikidat', hint = 'Štítek z Wikidat' }, --myslím že není třeba kategorizovat; když tam kategorie není tak to hází chybu
--		linkIsRedirect = { category = 'VCard: Artikellink ist Weiterleitung' }, --myslím že není třeba kategorizovat
		linkToOtherWV  = { category = 'Údržba:Odkaz na jiné wikicesty' },
		malformedName  = { category = 'Údržba:Špatný název', err = 'Špatný název' },
		missingImg     = { category = 'Údržba:Stránky s neexistujícím souborem', err = 'Neexistující soubor: %s' },
		missingNameMsg = { category = 'Údržba:Šablona bod beze jména', err = 'Chybí název' },
		missingType    = { category = 'Údržba:Šablona bod bez typu', hint = 'Chybí typ' },
		nameFromWD     = { category = 'Monitoring:Data z Wikidat', hint = 'Název z Wikidat' }, --myslím že není třeba kategorizovat
		nameWithStar   = { category = 'Údržba:Šablona bod s hvězdičkou ve jméně', err = 'Název obsahuje hvězdičku' },
		outdated       = { category = 'Údržba:Akce ukončena', err = 'Akce ukončena' },
 		parameterUsed  = { category = 'Údržba:Použitý parametr %s' }, --myslím že není třeba kategorizovat
		deleteShowCopy = { category = 'Údržba:Kopie smazána', hint = 'show=kopie smazána' },
--		showInlineUsed = { category = 'VCard: show=inline gesetzt' }, --myslím že není třeba kategorizovat
--		showPoiUsed    = { category = 'VCard: show=poi gesetzt' }, --myslím že není třeba kategorizovat
		typeFromWDchain= { category = 'Monitoring:Data z Wikidat', hint = 'Typ z Wikidat' },
--		typeIsGroup    = { category = 'Údržba:Chybné hodnoty', hint = 'Typ je název skupiny' },
--		typeIsColor    = { category = 'Údržba:Chybné hodnoty', hint = 'Typ je název barvy' },
		                 -- typeIsColor is not used if excludeColorTypes = true
		unknownCountry = { category = 'Údržba:Články s neznámým kódem země', err = 'Neznámý kód země' },
		unknownGroup   = { category = 'Údržba:Šablona bod s neznámou skupinou', err = 'Neznámá skupina' },
		unknownLanguage= { category = 'Údržba:Šablona bod s neznámým jazykem', hint = 'Neznámý místní jazyk' },
		unknownParam   = { category = 'Údržba:Články s neznámými parametry', err = 'Neznámý parametr: %s' },
		unknownParams  = { category = 'Údržba:Články s neznámými parametry', err = 'Neznámé parametry: %s' },
		unknownPropertyLanguage= { category = 'Údržba:Šablona bod s neznámým jazykem', hint = 'Neznámý jazyk pro vlastnost' },
		unknownStatus  = { category = 'Údržba:Šablona bod s neznámým statusem', err = 'Neznámý status' },
		unknownType    = { category = 'Údržba:Chybné hodnoty', err = 'Neznámý typ: %s' },
--		unusedRedirect = { category = 'VCard: Unbenutzter Weiterleitungs-Sitelink' },
		urlIsSocialMedia = { category = 'Údržba:Špatná URL', err = 'URL ze sociálních sítí' },
		wikidata       = { category = 'Monitoring:Data z Wikidat' }, 
		wrongCoord     = { category = 'Údržba:Šablona bod s chybějícími souřadnicemi', err = 'Chybné souřadnice' },
		wrongImgName   = { category = 'Údržba:Chybný název souboru', err = 'Chybný název souboru' },
		wrongQualifier = { category = 'Údržba:Nesprávný odkaz na Wikidata', err = 'Nesprávný odkaz na Wikidata' },

		-- Marker module
		missingCoord   = { category = 'Údržba:Šablona bod s chybějícími souřadnicemi', err = 'Chybí souřadnice' },
		numberUsed     = { category = 'Údržba:Chybné hodnoty' },
		unknownIcon    = { category = 'Údržba:Chybné hodnoty' },

		-- vCard / Listing module
		countryFromWD  = { category = 'Monitoring:Data z Wikidat' },
		missingCoordVc = { category = 'Údržba:Šablona bod s chybějícími souřadnicemi' },
--		paymentUsed    = { category = 'VCard: Zahlungsarten spezifiziert' },
		socialUrlUsed  = { category = 'Údržba:URL sociálních sítí', hint = 'URL sítě %s použita' },
		unitFromWD     = { category = 'Monitoring:Data z Wikidat' },
		unknownLabel   = { category = 'Údržba:Neznámý štítek nebo id' },
		unknownMAKI    = { category = 'Údržba:Neznámý symbol MAKI', hint = 'Neznámý symbol MAKI' },
		unknownShow    = { category = 'Údržba:Chybné hodnoty', err = 'Hodnota(y) pro show neznámá: %s' },
		unknownSubtype = { category = 'Údržba:Chybné hodnoty', err = 'Hodnota(y) pro podtyp neznámý: %s' },
		unknownUnit    = { category = 'Údržba:Chybné hodnoty', hint = 'Neznámá entita' },
		unknowWDfeatures = { category = 'Údržba:Šablona bod s neznámými charakteristikami Wikidat', hint = 'Neznámé charakteristiky Wikidat' },
		wrongDate      = { category = 'Údržba:Články s chybami v datech', hint = 'Nesprávné datum' },
		wrongSocialId  = { category = 'Údrža:Nesprávné ID sociální sítě', err = 'Nesprávné ID %s' },
		wrongSocialUrl = { category = 'Údržba:Neplatná URL', err = 'Chybná URL %s' }
	},

	iconTitles = {
		commons    = '%s na Wikimedia Commons',
		facebook   = '%s na Facebooku',
		flickr     = '%s na Flickru',
		instagram  = '%s na Instagramu',
		internet   = 'Web této instituce',
		rss        = 'RSS webový zdroj této instituce',
		tiktok     = '%s na TikToku',
		twitter    = '%s na X (Twitteru)',
		wikidata   = '%s (%s) na Wikidatech',
		wikipedia  = '%s na Wikipedii',
		wikivoyage = '%s na Wikicestách (Wikivoyage) v jiném jazyce',
		youtube    = '%s na YouTube'
	},

	-- social media services
	services = {
		{ key = 'facebook',  url = 'https://www.facebook.com/%s', pattern = { '^[-.%d%w]+$', '^[^%z\1-,/:-?\91-\94{-~]+/[1-9]%d+$' } },
		{ key = 'flickr',    url = 'https://www.flickr.com/photos/%s', pattern = '^%d%d%d%d%d+@N%d%d$' },
		{ key = 'instagram', url = 'https://www.instagram.com/%s/', pattern = { '^[0-9a-z_][0-9a-z._]+[0-9a-z_]$', '^explore/locations/%d+$' } },
		{ key = 'tiktok',    url = 'https://www.tiktok.com/@%s', pattern = '^[0-9A-Za-z_][0-9A-Za-z_.]+$' },
		{ key = 'twitter',   url = 'https://twitter.com/%s', pattern = '^[0-9A-Za-z_]+$' },
		{ key = 'youtube',   url = { 'https://www.youtube.com/channel/%s', 'https://www.youtube.com/%s' },
			pattern = { '^UC[-_0-9A-Za-z]+[AQgw]$', '^@[-0-9A-Za-z_.][-0-9A-Za-z_.][-0-9A-Za-z_.]+$' } }
	},

	-- status symbols
	statuses = {
		none    = { alias = "class-0", label = "Bez klasifikace" },
		stub    = { alias = "class-1", label = "Pahýl" },
		outline = { alias = "class-2", label = "Návrh článku" },
		usable  = { alias = "class-3", label = "Užitečný článek" },
		guide   = { alias = "class-4", label = "Celý článek" },
		star    = { alias = "class-5", label = "Doporučený článek" },
		
		['top-hotel']  = { label = "Top-Hotel", category = 1 },
		['top-restaurant']  = { label = "Top-Restaurace", category = 1 },
		['top-sight']  = { label = "Top-Atrakce", category = 1 },
		recommendation = { label = "Doporučení" }
	},

	-- Marker name styles
	-- Colors in Template:VCard/styles.css
	nameStyles = {
		italic  = 'font-weight: normal; font-style: italic;',
		kursiv  = 'font-weight: normal; font-style: italic;', -- de: kursiv = italic
		normal  = 'font-weight: normal; font-style: normal;',
		station = 'font-weight: normal; white-space: nowrap; padding-left: 2px; padding-right: 2px;'
	},

	-- yes/no variants
	yesno = {
		y    = 'y',
		yes  = 'y',
		j    = 'y',
		ja   = 'y',
		a    = 'y',
		ano  = 'y',
		n    = 'n',
		no   = 'n',
		nein = 'n',
		ne   = 'n'
	},

	-- List of currencies without conversion tooltips
	noCurrencyConversion = {
--		all = 1, -- no rate conversion tooltips are shown
		         -- there is no confusion with (uppercase) ALL = "Q125999"
		EGP = 1, -- rates are outdated
		EUR = 1  -- local currency
	},

	-- Language-dependent sorting substitutes
	substitutes = {
		{ l = 'ä', as = 'a' },
		{ l = 'ö', as = 'o' },
		{ l = 'ü', as = 'u' },
		{ l = 'ß', as = 'ss' }
	}
}