跳转到内容

Module:Coordinates/i18n

来自维基导游
-- Separating code from internationalization

return {
	-- administration
	moduleInterface = {
		suite  = 'Coordinates',
		sub    = 'i18n',
		serial = '2021-11-15',
	},

	-- internationalisation
errorMsg = {
		'未输入任何参数',                             --  1: no parameter(s)
		'输入参数过多',                               --  2: too many parameters
		'包含非法字符',                               --  3: illegal characters
		'度分秒数值参数超过三个',                     --  4: more than 3 numeric dms parameters
		'度数值超出有效范围',                         --  5: degree out of range
		'分数值超出有效范围',                         --  6: minute out of range
		'度数值非整数',                               --  7: degree no integer
		'秒数值超出有效范围',                         --  8: second out of range
		'分数值非整数',                               --  9: minute no integer
		'方向标识未置于最后',                         -- 10: direction not last parameter
		'负值使用不合法',                             -- 11: invalid negative value
		'纬度/经度方向标识错误',                      -- 12: wrong lat/long direction
		'纬度值超出有效范围',                         -- 13: latitude out of range
		'未指定匹配模式',                             -- 14: no pattern given

		noError = '无错误',                           -- no Error
		unknown = '未知错误',                         -- unknown error
		faulty  = '坐标格式错误'                      -- faulty coordinate
	},

	-- maintenance categories
	categories = {
		faulty = '[[Category:页面坐标错误]]',
	    	-- faulty coordinate
	    	-- same as defined in [[MediaWiki:Geodata-broken-tags-category]]
		dms    = '[[Category:使用DMS坐标]]'
	    	-- coordinate given as dms, not as decimal
	},

	-- for input
	-- de:     O = E -> +1
	-- it, fr: O = W -> -1
	inputLetters = {
		N = {  1, 'lat' },
		S = { -1, 'lat' },
		E = {  1, 'long' },
		W = { -1, 'long' },
		O = {  1, 'long' }
	},

	-- for output
	outputLetters = { N = 'N', S = 'S', E = 'O', W = 'W' },
	decimalPoint  = '.',

	-- predefined deg-min-sec output formats
	dmsFormats = {
		f1 = { delimiter = ' ', leadZeros = false }, -- default
		f2 = { delimiter = ' ', leadZeros = true },
		f3 = { delimiter =  '', leadZeros = false },
		f4 = { delimiter =  '', leadZeros = true }
	}
}