跳转到内容

Module:Link utilities/i18n

被永久保护的模块
来自维基导游
-- shared internationalisation for link modules

return {
	-- documentation
	moduleInterface = {
		suite  = 'Link utilities',
		sub    = 'i18n',
		serial = '2025-07-12',
		item   = 104200158
	},

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

	texts = {
		comma       = ', ',
		space       = ' ',
		parentheses = '()'
	},

	-- patterns for delimiters except ',' (en + de)
	delimiters = { ' [aA][nN][dD] ', ' [oO][rR] ', ' [uU][nN][dD] ', ' [oO][dD][eE][rR] ' },

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

	serviceStrings = { 'Servicenummer', 'Sondernummer', 'Ortstarif', 'Inland', 'Notruf' },

	-- phone number options
	options = {
		withCountryCode    = false, -- add country calling code in output in any case
		preventLeadZero    = false, -- remove lead zero from output

		-- enable formatting of phone numbers retrieved from Wikidata
		formattingWikidata = true,  -- format phone numbers retrieved from Wikidata
		addZeros           = true,  -- add trunc prefix (0)
	},

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

	-- 错误类别。模块中会自动添加前导 `[[Category:`
	categories = {
		noCC         = '联系方式:电话号码缺少国家区号]] <span class="error">电话号码缺少国家区号</span>',
		invalid	     = '联系方式:电话号码格式无效]] <span class="error">电话号码格式无效</span>',
		withSlash    = '联系方式:电话号码中包含斜杠]] <span class="error">电话号码中包含斜杠</span>',
	
		onlyDomestic = '该电话号码仅可在本地(国内)使用。',
	
		invalidMail  = '联系方式:电子邮件格式无效]] <span class="error">电子邮件格式无效</span>',
		nonASCII     = '联系方式:电子邮件地址包含 Unicode 字符]] <span class="listing-check-recommended" style="display:none;">电子邮件地址包含 Unicode 字符</span>',
	
		invalidSkype = '联系方式:Skype 用户名无效]] <span class="error">Skype 用户名无效</span>',
	},
	
	-- LinkISBN 功能支持
	isbnTexts = {
		booksourcesClass = 'voy-booksources', -- CSS 类名
		isbnClass        = 'voy-isbn',
		invalidISBN      = '<span class="error">ISBN 无效</span>',
		invalidCat       = '[[Category:含ISBN错误的页面]]'
	}
}