Modulu:Wikidata/i18n: berrikuspenen arteko aldeak

Wikipedia, Entziklopedia askea
Ezabatutako edukia Gehitutako edukia
remove messages not used anymore, fix thousand separators and lang in cases
format precision day
23. lerroa: 23. lerroa:
[9] = "Y", -- precision: year
[9] = "Y", -- precision: year
[10] = "F Y", -- precision: month
[10] = "F Y", -- precision: month
[11] = function (ts) -- precision: day
-- [11] coded in main module for Basque. TODO: localize
-- timestamp: "+1582-10-04T00:00:00Z"
-- require("Module:Date").genitive_year(Y) .. d(' F"k" j')
local year = mw.ustring.match(ts, "\+(%d+)\-")
[11] = "Y-m-d", -- precision: day
local month = mw.ustring.match(ts, "\-(%d+)\-")
local day = mw.ustring.match(ts, "\-(%d+)T")
local year_format = '"[["Y"]]ko"'
if math.fmod(year, 20) == 1 or math.fmod(year, 20) == 10 or math.fmod(year, 20) == 5 or math.fmod(year, 20) == 15 or math.fmod(year, 200) == 100 then
year_format = '"[["Y"]]eko"'
end
return year_format .. ' "[["F"ren" j"]]"' .. ((day ~= '11' and day ~= '31') and '"a"' or '')
end,
[12] = "Y-m-d, ga", -- precision: hour
[12] = "Y-m-d, ga", -- precision: hour
[13] = "Y-m-d g:ia", -- precision: minute
[13] = "Y-m-d g:ia", -- precision: minute

21:00, 6 azaroa 2019ko berrikusketa

Documentation for this module may be created at Modulu:Wikidata/i18n/dok

-- Translations, local configuration and local specific functions

-- Please translate to local language
local i18n = {
	["errors"] = {
		["property-not-found"] = "Propietatea ez da aurkitu.",
		["qualifier-not-found"] = "Kualifikatzailea ez da aurkitu.",
		['not-from-content-page'] = "Ez inbokatu eduki orrialde batetik. Erabili txantiloi bat edo modulu azpi orrialde bat, edo proba orri bat saiakerak egiteko."
	},
	["datetime"] =
	{
		-- $1 is a placeholder for the actual number
		[0] = "$1 mila milioi urte",	-- precision: billion years
		[1] = "$100 milioi urte",		-- precision: hundred million years
		[2] = "$10 milioi urte",		-- precision: ten million years
		[3] = "$1 milioi urte",			-- precision: million years
		[4] = "$100000 urte",			-- precision: hundred thousand years; thousand separators added afterwards
		[5] = "$10000 urte",			-- precision: ten thousand years; thousand separators added afterwards
		[8] = "$1(e)ko hamarkada",		-- precision: decade
		-- the following use the format of #time parser function
		[6] = 'xrY". milurtekoa"',		-- precision: millennium
		[7] = 'xrY". mendea"',			-- precision: century
		[9]  = "Y",						-- precision: year
		[10] = "F Y",					-- precision: month
		[11] = function (ts)			-- precision: day
					-- timestamp: "+1582-10-04T00:00:00Z"
					local year = mw.ustring.match(ts, "\+(%d+)\-")
					local month = mw.ustring.match(ts, "\-(%d+)\-")
					local day = mw.ustring.match(ts, "\-(%d+)T")
					local year_format = '"[["Y"]]ko"'
					if math.fmod(year, 20) == 1 or math.fmod(year, 20) == 10 or math.fmod(year, 20) == 5 or math.fmod(year, 20) == 15  or math.fmod(year, 200) == 100 then
						year_format = '"[["Y"]]eko"'
					end
					return year_format .. ' "[["F"ren" j"]]"' .. ((day ~= '11' and day ~= '31') and '"a"' or '')
				end,
		[12] = "Y-m-d, ga",				-- precision: hour
		[13] = "Y-m-d g:ia",			-- precision: minute
		[14] = "Y-m-d g:i:sa",			-- precision: second
		["beforenow"] = "duela $1",		-- how to format negative numbers for precisions 0 to 5
		["afternow"] = "$1 barru",		-- how to format positive numbers for precisions 0 to 5
		["bc"] = 'K. a. $1',			-- how print negative years
		["ad"] = "$1",					-- how print positive years
		["bc-addon"] = " K. a.",		-- suffix for negative dates
		["ad-addon"] = "",				-- suffix for 1st century AD dates
	},
	["monolingualtext"] = '<span lang="%language">%text</span>',
	
	["cite"] = {					-- Cite web parameters
		["url"]          = "url",
		["title"]        = "izenburua",
		["website"]      = "lana",
		["access-date"]  = "sarrera-data",
		["archive-url"]  = "artxibo-url",
		["archive-date"] = "artxibo-data",
		["author"]       = "egilea",
		["publisher"]    = "editorea",
		["quote"]        = "aipua",
		["language"]     = "hizkuntza",
		["date"]         = "data",
		["pages"]        = "orrialdea"
	}
}

-- Functions for local grammatical cases
local cases = {
	["infoboxlabel"] = function(word) return require("Module:Wikidata/labels").fixInfoboxLabel(word) end,
	["singularra"] = function(word, lang) if lang == nil or lang == "eu" then return require("Module:Declension").absolutive_singular(word) end return word end,
	["plurala"] = function(word, lang) if lang == nil or lang == "eu" then return require("Module:Declension").absolutive_plural(word) end return word end,
	["ergatiboa"] = function(word, lang) if lang == nil or lang == "eu" then return require("Module:Declension").ergative(word) end return word end,
	["genitiboa"] = function(word, lang) if lang == nil or lang == "eu" then return require("Module:Declension").genitive(word) end return word end,
	["zerekiko"] = function(word, lang) if lang == nil or lang == "eu" then return require("Module:Declension").zerekiko(word) end return word end
}

return {
	i18n = i18n,
	cases = cases
}