Jump to content

Module:Wikidata/i18n

Ón Vicipéid, an chiclipéid shaor.

Documentation for this module may be created at Module:Wikidata/i18n/doc

local i18n = {
	["errors"] = {
		["property-not-found"] = "Property not found.",
		["entity-not-found"] = "Wikidata entity not found.",
		["unknown-claim-type"] = "Unknown claim type.",
		["unknown-entity-type"] = "Unknown entity type.",
		["qualifier-not-found"] = "Qualifier not found.",
		["site-not-found"] = "Wikimedia project not found.",
		["unknown-datetime-format"] = "Unknown datetime format.",
		["local-article-not-found"] = "Article is not yet available in this wiki.",
		['not-from-content-page'] = "Do not invoke from content page. Use a template or use a module subpage like /sandbox for testing."
	},
	["datetime"] =
	{
		-- $1 is a placeholder for the actual number
		[0] = "$1 billion years",		-- precision: billion years
		[1] = "$100 million years",		-- precision: hundred million years
		[2] = "$10 million years",		-- precision: ten million years
		[3] = "$1 million years",		-- precision: million years
		[4] = "$100,000 years",			-- precision: hundred thousand years
		[5] = "$10,000 years",			-- precision: ten thousand years
		[6] = "$1 millennium",			-- precision: millennium
		[7] = "$1 century",				-- precision: century
		[8] = "$1s",					-- precision: decade
		-- the following use the format of #time parser function
		[9]  = "Y",						-- precision: year
		[10] = "F Y",					-- precision: month
		[11] = "F j, Y",				-- precision: day
		[12] = "F j, Y ga",				-- precision: hour
		[13] = "F j, Y g:ia",			-- precision: minute
		[14] = "F j, Y g:i:sa",			-- precision: second
		["beforenow"] = "$1 BCE",		-- how to format negative numbers for precisions 0 to 5
		["afternow"] = "$1 CE",			-- how to format positive numbers for precisions 0 to 5
		["bc"] = '$1 "BCE"',			-- how print negative years
		["ad"] = "$1",					-- how print positive years
		["bc-addon"] = " BC",			-- suffix for negative dates
		["ad-addon"] = "",				-- suffix for 1st century AD dates
	},
	["monolingualtext"] = '<span lang="%language">%text</span>',
	["warnDump"] = "[[Category:Called function 'Dump' from module Wikidata]]",
	
	["cite"] = {					-- Cite web parameters
		["url"]          = "url",
		["title"]        = "title",
		["website"]      = "website",
		["access-date"]  = "access-date",
		["archive-url"]  = "archive-url",
		["archive-date"] = "archive-date",
		["author"]       = "author",
		["publisher"]    = "publisher",
		["quote"]        = "quote",
		["language"]     = "language",
		["date"]         = "date",
		["pages"]        = "pages"
	}
}


-- Functions for local grammatical cases
local cases = {
	["infoboxlabel"] = function(word) return require("Module:Wikidata/labels").fixInfoboxLabel(word) end,
	["infoboxdata"] = function(word) return require("Module:Wikidata/labels").infoboxdata[word] or word end,
	["smallcaps"] = function(word) return '<span style="font-variant: small-caps;">' .. word .. '</span>' end,
}

return {
	i18n = i18n,
	cases = cases
}