« Module:Wikidata/i18n » : différence entre les versions

De kookipedia
Aller à la navigation Aller à la recherche
(Page créée avec « return { -- Error message ["property-param-not-provided"] = "paramètre 'property' manquant", ["qualifier-param-not-provided"] = "paramètre 'qualifier' manquant", ["entity-param-not-provided"] = "paramètre 'entity' manquant", ["entity-not-found"] = "entité non trouvée", ["unknown-claim-type"] = "type d'affirmation inconnu", ["unknown-snak-typeg"] = "type de 'snak' inconnu", ["unknown-datavalue-type"] = "type de valeur de donnée inconnu", ["unknown-en... »)
 
Aucun résumé des modifications
 
Ligne 1 : Ligne 1 :
return {
local i18n = {
-- Error message
["errors"] = {
["property-param-not-provided"] = "paramètre 'property' manquant",
["property-not-found"] = "Property not found.",
["qualifier-param-not-provided"] = "paramètre 'qualifier' manquant",
["qualifier-not-found"] = "Qualifier not found.",
["entity-param-not-provided"] = "paramètre 'entity' manquant",
},
["entity-not-found"] = "entité non trouvée",
["datetime"] =
["unknown-claim-type"] = "type d'affirmation inconnu",
{
["unknown-snak-typeg"] = "type de 'snak' inconnu",
-- $1 is a placeholder for the actual number, or use the format of #time parser function
["unknown-datavalue-type"] = "type de valeur de donnée inconnu",
["beforenow"] = "$1 BCE", -- how to format negative numbers for precisions 0 to 5
["unknown-entity-type"] = "type d'entité inconnu",
["afternow"] = "$1 CE", -- how to format positive numbers for precisions 0 to 5
["invalid-id"] = "identifiant inconnu",
["bc"] = '$1 BCE', -- how print negative years
["invalid-datatype"] = "donnée de type $1, devrait être $2",
["ad"] = "$1", -- how print 1st century AD dates
["invalid-linktype"] = "type de lien inconnu",
["invalid-event-type"] = "l'événement devrait être une chaîne, est $1",
[0] = "$1 billion years", -- precision: billion years
["invalid-entity-id"] = "identifiant d'entité invalide : $1",
[1] = "$100 million years", -- precision: hundred million years
["invalid-project-code"] = "identifiant de project Wikimédia invalide : $1",
[2] = "$10 million years", -- precision: ten million years
["cat-unsorted-issue"] = "Page avec un problème de codage Wikidata",
[3] = "$1 million years", -- precision: million years
[4] = "$100000 years", -- precision: hundred thousand years; thousand separators added afterwards
[5] = "$10000 years", -- precision: ten thousand years; thousand separators added afterwards
[6] = "$1 millennium", -- precision: millennium
[7] = "lqern wis $1", -- precision: century
[8] = "$1s", -- precision: decade
[9]  = "Y", -- precision: year
[10] = "F Y", -- precision: month
[11] = "j F Y", -- precision: day
["hms"] = {["hours"] = "h", ["minutes"] = "m", ["seconds"] = "s"}, -- duration: xh xm xs
},
["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"] = "title",
["author"] = "author",
["date"] = "date",
["pages"] = "pages",
["language"] = "language",
-- cite web parameters
["url"] = "url",
["website"] = "website",
["access-date"] = "access-date",
["archive-url"] = "archive-url",
["archive-date"] = "archive-date",
["publisher"] = "publisher",
["quote"] = "quote",
-- cite journal parameters
["work"] = "work",
["issue"] = "issue",
["issn"] = "issn",
["doi"] = "doi"
},
-- Autres messages
-- local wiki settings
["no-label"] = "pas de libellé",
["addpencil"] = false, -- adds a pencil icon linked to Wikidata statement, planned to overwrite by Wikidata Bridge
['no description'] = "pas de description",
["categorylabels"] = "", -- Category:Pages with Wikidata labels not translated (void for no local category)
["novalue"] = "-",
["categoryprop"] = "", -- Category:Pages using Wikidata property $1 (void for no local category)
["hidevalue"] = "-", -- symbol signalling in the wikitext that the value should not be displayed
["addfallback"] = {} -- additional fallback language codes, i.e. {'sv', 'de'}
["somevalue"] = "inconnu",
}
["sometime"] = "date inconnue",
['to translate'] = 'Page utilisant des données de Wikidata à traduire',
["trackingcat"] = 'Page utilisant $1',
['see-wikidata-value'] = "Voir et modifier les données sur Wikidata", -- lien vers des valeurs sur une propriété Wikidata
['see-wikidata'] = "Voir l'élément Wikidata correspondant", -- utilisé sur les liens Wikidata par défaut en l'absence de lien interne disponible
['see-another-project'] = "Article sur $1",
['see-another-language'] = "Article sur Wikipédia en $1",
['activate-query'] = '<div class="par_wikidata"></div>', -- activates an on-demand-only query
['qualif-separator'] = " ; ", -- separate qualifiers shown next to a standard statement


-- Functions for local grammatical cases (as ordinal) and local fixes (if used)
local cases = {
["infoboxlabel"] = function(word) return require("Module:Wikidata/labels").fixInfoboxLabel(word) end,
["infoboxdata"] = function(word) return require("Module:Wikidata/labels").fixInfoboxData(word) end,
["annexed"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").annexed(word) end return word end,
["feminine"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").feminine(word) end return word end,
["annexed_feminine"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").annexed_feminine(word) end return word end,
}


['approximate-value'] = "environ $1",
return {
['approximate-place'] = "$1 (ou environs)",
i18n = i18n,
['uncertain-information'] = "$1 (?)",
cases = cases
 
}
}

Dernière version du 19 septembre 2024 à 16:58

La documentation pour ce module peut être créée à Module:Wikidata/i18n/doc

local i18n = {
	["errors"] = {
		["property-not-found"] = "Property not found.",
		["qualifier-not-found"] = "Qualifier not found.",
	},
	["datetime"] =
	{
		-- $1 is a placeholder for the actual number, or use the format of #time parser function
		["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 1st century AD dates
		
		[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] = "$100000 years",		-- precision: hundred thousand years; thousand separators added afterwards
		[5] = "$10000 years",		-- precision: ten thousand years; thousand separators added afterwards
		[6] = "$1 millennium",		-- precision: millennium
		[7] = "lqern wis $1",		-- precision: century
		[8] = "$1s",				-- precision: decade
		[9]  = "Y",					-- precision: year
		[10] = "F Y",				-- precision: month
		[11] = "j F Y",				-- precision: day
		
		["hms"] = {["hours"] = "h", ["minutes"] = "m", ["seconds"] = "s"},	-- duration: xh xm xs
	},
	
	["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"] = "title",
		["author"] = "author",
		["date"] = "date",
		["pages"] = "pages",
		["language"] = "language",
		-- cite web parameters
		["url"] = "url",
		["website"] = "website",
		["access-date"] = "access-date",
		["archive-url"] = "archive-url",
		["archive-date"] = "archive-date",
		["publisher"] = "publisher",
		["quote"] = "quote",
		-- cite journal parameters
		["work"] = "work",
		["issue"] = "issue",
		["issn"] = "issn",
		["doi"] = "doi"
	},
	
	-- local wiki settings
	["addpencil"] = false, -- adds a pencil icon linked to Wikidata statement, planned to overwrite by Wikidata Bridge
	["categorylabels"] = "", -- Category:Pages with Wikidata labels not translated (void for no local category)
	["categoryprop"] = "", -- Category:Pages using Wikidata property $1 (void for no local category)
	["addfallback"] = {} -- additional fallback language codes, i.e. {'sv', 'de'}
}

-- Functions for local grammatical cases (as ordinal) and local fixes (if used)
local cases = {
	["infoboxlabel"] = function(word) return require("Module:Wikidata/labels").fixInfoboxLabel(word) end,
	["infoboxdata"] = function(word) return require("Module:Wikidata/labels").fixInfoboxData(word) end,
	["annexed"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").annexed(word) end return word end,
	["feminine"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").feminine(word) end return word end,
	["annexed_feminine"] = function(word, ...) if arg[1] == "kab" then return require("Module:Declension").annexed_feminine(word) end return word end,
}

return {
	i18n = i18n,
	cases = cases
}