Vés al contingut

Mòdul:Wikidades/proves201117/i18n

De la Viquipèdia, l'enciclopèdia lliure
local i18n = {
	["errors"] = {
		["property-not-found"] = "Propietat no trobada.",
		["qualifier-not-found"] = "Qualificador no 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'anys",	-- precision: billion years
		[1] = "$100 milions d'anys",	-- precision: hundred million years
		[2] = "$10 milions d'anys",		-- precision: ten million years
		[3] = "$1 milions d'anys",		-- precision: million years
		[4] = "$100000 anys",			-- precision: hundred thousand years
		[5] = "$10000 anys",			-- precision: ten thousand years
		[6] = '"mil·lenni" "<span style=\'font-variant:small-caps; text-transform:lowercase;\'>"xrY"</span>"',-- precision: millennium
		[7] = '"segle" "<span style=\'font-variant:small-caps; text-transform:lowercase;\'>"xrY"</span>"',-- precision: century
		[8] = "dècada del $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
		
		["hms"] = {["hours"] = "h", ["minutes"] = "m", ["seconds"] = "s"},	-- duration as xh xm xs
	},
	
	["years-old"] = {
		["singular"] = "($1 any)",		-- year old, or nominative singular for 3 plural forms
		["plural"] = "($1 anys)",		-- years old, or genitive plural for 3 plural forms
		["paucal"] = "",				-- genitive singular for 3 plural forms
	},
	
	["cite"] = {
		-- general cite parameters
		["title"]        = "títol",
		["author"]       = "autor",
		["date"]         = "data",
		["pages"]        = "pàgina",
		["language"]     = "llengua",
		-- cite web parameters
		["url"]			= "url",
		["website"]		= "obra",
		["access-date"]	= "consulta",
		["archive-url"]	= "arxiuurl",
		["archive-date"] = "arxiudata",
		["publisher"]	= "editor",
		["quote"]		= "citació",
		-- cite journal parameters
		["work"]		= "publicació",
		["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"] = "", -- void for no local category
	["categoryprop"] = "", -- Category:Pages using Wikidata property $1 (void for no local category)
	["addfallback"] = {'fr', 'it', 'es', 'gl', 'pt', 'an', 'ast', 'ext'} -- additional fallback language codes
}

-- Functions for local grammatical cases
local cases = {
	-- local fixes
	["infoboxlabel"] = function(word) return require("Module:Wikidades/labels").fixInfoboxLabel(word) end,
	["infoboxdata"] = function(word) return require("Module:Wikidades/labels").fixInfoboxData(word) end,
	-- plurals with rules in Catalan
	["plural"] = function(word, ...) if arg[1] == "ca" then return require("Module:ca-flexió").plural(word) end return word end,
	-- ordinal in Catalan, needs to be internationalised
	["ordinal"] = function(number, ...) if arg[1] == "ca" then return require("Module:ca-flexió").ordinal(number, arg[2]) end return number end,
	-- naming locations with a referent
	["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,
	["ucfirst"] = function(label) return mw.language.new('ast'):ucfirst(label) end
}

return {
	i18n = i18n,
	cases = cases
}