Modulo:Link utilities/i18n

El Vikivojaĝo
Salti al navigilo Salti al serĉilo

Versiokontrolo[redakti]

Versionomo en Vikidatumoj: 2021-11-16 Ok!


-- shared internationalisation for link modules

return {
	-- documentation
	moduleInterface = {
		suite  = 'Link utilities',
		sub    = 'i18n',
		serial = '2021-11-16',
		item   = 104200158
	},

	-- maximum count of items to display in listing
	addNum    = 3,
	addNumFax = 2,
	addMail   = 2,
	addSkype  = 2,

	-- error categories. Leading [[Category: is added in modules
	categories = {
		noCC         = 'Kontakt: Telefon ohne Ländervorwahl]] <span class="error">Telefon ohne Ländervorwahl</span>',
		invalid	     = 'Kontakt: Ungültiges Telefonformat]] <span class="error">Ungültiges Telefonformat</span>',
		withSlash    = 'Kontakt: Telefon mit Schrägstrich]] <span class="error">Telefon mit Schrägstrich</span>',

		invalidMail  = 'Kontakt: Ungültiges Email-Format]] <span class="error">Ungültiges Email-Format</span>',
		nonASCII     = 'Kontakt: Email enthält Unicode-Zeichen]] <span class="listing-check-recommended" style="display:none;">Email enthält Unicode-Zeichen</span>',

		invalidSkype = 'Kontakt: Ungültiger Skype-Nutzername]] <span class="error">Ungültiger Skype-Nutzername</span>',
	},

	texts = {
		onlyDomestic = 'Die Telefonnummer kann nur im Inland benutzt werden.'
	},

	-- patterns for delimiters except ','
	delimiters      = { ' [aA][nN][dD] ', ' [oO][rR] ', ' [uU][nN][dD] ', ' [oO][dD][eE][rR] ' },

	-- patterns for phone extensions
	extensions = {
		';?[Ee][Xx][Tt]%.?[ =]+%d+', -- ext. ####
		                             -- including RFC 3966 syntax ";ext=####"
		'[Aa][Pp][Pp]%.? +%d+',      -- App. ####
		'x%d+'                       -- x####
	},

	-- enable formatting of phone numbers retrieved from Wikidata
	formattingWikidata = true,
	addZeros = true,

	-- Skype query parameters
	params = {
		add       = '',
		call      = '',
		chat      = '',
		sendfile  = '',
		userinfo  = '',
		voicemail = ''
	},

	-- local calling codes contain no trunk prefix zero or leading zero to keep
	noZero = {
		['+1']    = '', -- USA, Canada
		['+1242'] = '', -- Bahamas
		['+1246'] = '', -- Barbados
		['+1264'] = '', -- Anguilla
		['+1268'] = '', -- Antigua and Barbuda
		['+1284'] = '', -- Britisch Virgin Islands
		['+1340'] = '', -- American Virgin Islands
		['+1345'] = '', -- Kaiman Islands
		['+1441'] = '', -- Bermuda
		['+1473'] = '', -- Grenada
		['+1649'] = '', -- Turks and Caicos Islands
		['+1664'] = '', -- Montserrat
		['+1671'] = '', -- Guam
		['+1684'] = '', -- American Samoa
		['+1721'] = '', -- Sint Maarten
		['+1758'] = '', -- Saint Lucia
		['+1767'] = '', -- Dominica
		['+1784'] = '', -- Saint Vincent and the Grenadines
		['+1787'] = '', -- Puerto Rico
		['+1809'] = '', -- Dominican Republic
		['+1829'] = '', -- Dominican Republic
		['+1849'] = '', -- Dominican Republic
		['+1868'] = '', -- Trinidad and Tabago
		['+1869'] = '', -- St. Kitts and Nevis
		['+1876'] = '', -- Jamaica
		['+297']  = '', -- Aruba
		['+30']   = '', -- Greece
		['+34']   = '', -- Spain
		['+351']  = '', -- Portugal
		['+352']  = '', -- Luxembourg
		['+356']  = '', -- Malta
		['+371']  = '', -- Latvia
		['+372']  = '', -- Estonia
		['+377']  = '', -- Monaco
		['+378']  = '', -- San Marino
		['+39']   = '', -- Italy including Vatican City
		['+420']  = '', -- Czech Republic
		['+423']  = '', -- Liechtenstein
		['+45']   = '', -- Denmark
		['+47']   = '', -- Norway
		['+48']   = '', -- Poland
		['+500']  = '', -- Falkland Islands
		['+509']  = '', -- Haiti
		['+599']  = '', -- Sint Eustatius, etc.
		['+5993'] = '', -- Sint Eustatius
		['+5994'] = '', -- Saba
		['+5997'] = '', -- Bonaire
		['+5999'] = '', -- Curaçao
		['+681']  = '', -- Wallis and Futuna
		['+687']  = '', -- New Caledonia
		['+689']  = '', -- French Polynesia
		['+968']  = '', -- Oman
		['+675']  = '', -- Papua New Guinea
		['+977']  = ''  -- Nepal
	},

	-- phone-number patterns which are valid local numbers
	exceptions = {
		service = { 'Servicenummer', 'Sondernummer', 'Ortstarif', 'Inland', 'Notruf' },
		tollfree = { '^800%d*$', '^0508%d*$', '^0800%d*$', '^1[38]00%d*$', '^01800%d*$' },
		['+20'] = { '^12[236]$', '^14[01]$', '^180$', '^16%d%d%d$', '^1717$', '^17%d%d%d$', '^19%d%d%d$' },
		['+34'] = { '^112$', '^1006$', '^06[12]$', '^08[0158]$', '^09[12]$' }, 
		['+41'] = { '^11[278]$', '^14[3457]$' },
		['+43'] = { '^112$', '^12[0238]$', '^13[03]$', '^14[01247]$' },
		['+49'] = { '^11[025]$', '^11611[67]$', '^911$' },
		['+91'] = { '^10[0128]$', '^11[02]$' }
	}
}