Vejatz lo contengut

Mòdul:Wikidadas/i18n

Un article de Wikipèdia, l'enciclopèdia liura.

La documentacion d'utilizacion d'aquel modul se pòt crear a Mòdul:Wikidadas/i18n/ús

local i18n = {
	["errors"] = {
		["property-not-found"] = "Propietat pas trobada.",
		["qualifier-not-found"] = "Qualificador pas trobat."
	},
	
	["datetime"] =
	{
		-- $1 is a placeholder for the actual number, or use the format of #time parser function
		["beforenow"] = "fa $1",		-- how to format negative numbers for precisions 0 to 5
		["afternow"] = "d'aquí $1",		-- how to format positive numbers for precisions 0 to 5
		["bc"] = '$1 aC',				-- how print negative years
		["ad"] = "$1 dC",				-- how print 1st century AD dates
		
		[0] = "$1 mil milions d'ans",	-- precision: billion years
		[1] = "$100 milions d'ans",	-- precision: hundred million years
		[2] = "$10 milions d'ans",		-- precision: ten million years
		[3] = "$1 milions d'ans",		-- precision: million years
		[4] = "$100000 ans",			-- precision: hundred thousand years; thousand separators added afterwards
		[5] = "$10000 ans",			-- precision: ten thousand years; thousand separators added afterwards
		[6] = '"millenari" "<span style=\'font-variant:small-caps; text-transform:lowercase;\'>"xrY"</span>"',-- precision: millennium
		[7] = '"sègle" "<span style=\'font-variant:small-caps; text-transform:lowercase;\'>"xrY"</span>"',-- precision: century
		[8] = "decenni 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 xg]] "de" [[Y]]' end, -- precision: day
		
		["hms"] = {["hours"] = "h", ["minutes"] = "m", ["seconds"] = "s"},	-- duration: xh xm xs
	},
	
	
	["years-old"] = {"($1 an)", "($1 ans)"}, -- year(s) old, as in {{PLURAL:$1|singular|plural}}
	
	["cite"] = {						-- cite parameters of local templates
		["title"]        = "títol",
		["author"]       = "autor",
		["date"]         = "data",
		["pages"]        = "pagina",
		["language"]     = "lenga",
		-- cite web parameters
		["url"]			= "url",
		["website"]		= "òbra",
		["access-date"]	= "consulta",
		["archive-url"]	= "archiuurl",
		["archive-date"] = "archiudata",
		["publisher"]	= "editor",
		["quote"]		= "citacip,",
		-- cite journal parameters
		["work"]		= "publicacion",
		["issue"]		= "exemplar",
		["issn"]		= "issn",
		["doi"]			= "doi"
	},
	
	-- local wiki settings
	["addpencil"] = true, -- adds a pencil icon linked to Wikidata statement, planned to overwrite by Wikidata Bridge
	["categorylabels"] = "Category:Paginas amb d'etiquetas Wikidata sens traduccion", -- void for no local category
	["categoryprop"] = "", -- Category:Pages using Wikidata property $1 (void for no local category)
	["categoryref"] = "", -- Category:Pages with references from Wikidata (void for no local category)
	["addfallback"] = {'fr', 'it', 'es', 'gl', 'pt', 'an', 'ast', 'ext'}, -- additional fallback language codes
	["suppressids"] = {}, -- list of Qid values to suppress, i.e. no linguistic content
	["qidlabels"] = false -- show labels as Qid if no fallback translation is available (default true)
}

-- Functions for local grammatical cases and local fixes
local cases = {
	-- local fixes
	["infoboxlabel"] = function(word) return require("Module:Wikidadas/labels").fixInfoboxLabel(word) end,
	["infoboxdata"] = function(word) return require("Module:Wikidadas/labels").fixInfoboxData(word) end,
	-- plurals with rules in Catalan
	["plural"] = function(word, ...) if arg[1] == "òc" then return require("Module:oc-flexion").plural(word) end return word end,
	-- ordinal in Catalan, needs to be internationalised
	["ordinal"] = function(number, ...) if arg[1] == "òc" then return require("Module:oc-flexion").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:Localizacion").naming(label, arg[2], arg[3]) end,
	["locationcontext"] = function(label, ...) return require("Module:Localizacion").naming(label, arg[2], arg[3], arg[4]) end,
	-- fraction notation
	["fraction"] = function(value) return require("Module:Wikidadas/Units").fraction1(value) end,
}

return {
	i18n = i18n,
	cases = cases
}