Saltar al conteníu

Módulu:Wikidata/i18n

De Wikipedia

La documentación pa esti módulu pue crease en Módulu:Wikidata/i18n/usu

local i18n = {
	["errors"] = {
		["property-not-found"] = "Nun s'alcontró la propiedá.",
		["qualifier-not-found"] = "Nun s'alcontró'l cualificador.",
	},
	
	["datetime"] =
	{
		-- $1 is a placeholder for the actual number, or use the format of #time parser function
		["beforenow"] = "va $1",		-- how to format negative numbers for precisions 0 to 5
		["afternow"] = "d'equí en $1",	-- how to format positive numbers for precisions 0 to 5
		["bc"] = '$1 edC',				-- how print negative years
		["ad"] = "$1",					-- how print positive years
		
		[0] = "$1 mil millones d'años",	-- precision: billion years
		[1] = "$100 millones d'años",	-- precision: hundred million years
		[2] = "$10 millones d'años",	-- precision: ten million years
		[3] = "$1 millones d'años",		-- precision: million years
		[4] = "$100000 años",			-- precision: hundred thousand years; thousand separators added afterwards
		[5] = "$10000 años",			-- precision: ten thousand years; thousand separators added afterwards
		[6] = 'xrY "mileniu"',			-- precision: millennium
		[7] = '"sieglu" xrY',			-- precision: century
		[8] = "década de $1",			-- precision: decade
		[9]  = "$1",					-- precision: year
		[10] = "F Y",					-- precision: month
		[11] = function(ts) return mw.ustring.match(ts, "\-(%d+)T") == "01" and 'j"r" F Y' or "j F Y" end, -- precision: day
	},
	
	["years-old"] = {
		["singular"] = "year old",	-- year old, as in {{PLURAL:$1|singular|plural}}
		["plural"] = "years old",	-- years old
		["paucal"] = "",			-- for languages with 3 plural forms as in {{PLURAL:$1|singular|paucal|plural}}
	},
	
	["cite"] = {						-- cite parameters of local templates
		["title"]        = "títulu",
		["author"]       = "autor",
		["date"]         = "fecha",
		["pages"]        = "páxines",
		["language"]     = "idioma",
		-- cite web parameters
		["url"]			= "url",
		["website"]		= "obra",
		["access-date"]	= "fechaaccesu",
		["archive-url"]	= "urlarchivu",
		["archive-date"] = "fechaarchivu",
		["publisher"]	= "editorial",
		["quote"]		= "cita",
		-- cite journal parameters
		["work"]		= "publicación",
		["issue"]		= "númberu",
		["issn"]		= "issn",
		["doi"]			= "doi"
	},
	
	-- local wiki settings
	["addpencil"] = false,	-- adds a pencil icon linked to Wikidata statement, planned to overwrite by Wikidata Bridge
	                    	-- see ca:Module:Wikidata/addpencil/en/ús
	["categorylabels"] = "Category:Wikipedia:Páxines con etiquetes de Wikidata ensin traducir", -- void for no local category
	["addfallback"] = {}	-- additional fallback language codes
}

-- Functions for local grammatical cases
local cases = {
	-- local fixes
	["infoboxlabel"] = function(word) return require("Module:Wikidata/labels").fixInfoboxLabel(word) end,
	["infoboxdata"] = function(word) return require("Module:Wikidata/labels").fixInfoboxData(word) end,
	-- plurals with rules in Asturian
	["plural"] = function(word, ...) if arg[1] == "ast" then return require("Module:ast-flexón").plural(word) end return word end,
	-- ordinal in Asturian, needs to be internationalised
	["ordinal"] = function(number, ...) if arg[1] == "ast" then return require("Module:ast-flexón").ordinal(number, arg[2]) end return number end,
	-- naming locations with a referent
	-- arg[1]=actual lang, arg[2]=requested lang, arg[3]=location Qid, arg[4]=article Qid
	["location"] = function(label, ...) return require("Module:Location").naming(label, arg[2], arg[3]) end,
	["locationcontext"] = function(label, ...) return require("Module:Location").naming(label, arg[2], arg[3], arg[4]) end,
}

return {
	i18n = i18n,
	cases = cases
}