Modulo:Wd/i18n
Aspettu
La documentazione per questo modulo può essere creata in Modulo:Wd/i18n/man
-- The values and functions in this submodule should be localized per wiki.
local p = {}
function p.init(aliasesP)
p = {
["errors"] = {
["unknown-data-type"] = "Tipu di dati scunnisciutu o micca suppurtatu '$1'.",
["missing-required-parameter"] = "Nisunu parametru necessariu definitu, ci ne vole almenu unu",
["extra-required-parameter"] = "U paràmetru '$1' deve esse definitu cum'è ozzionale",
["no-function-specified"] = "Duvete specificà una funzione per chjamà", -- equal to the standard module error message
["main-called-twice"] = 'A funzione "principale" o "main") ùn pò esse chjamata duie volte',
["no-such-function"] = 'A funzione "$1" ùn esiste micca' -- equal to the standard module error message
},
["info"] = {
["edit-on-wikidata"] = "Edità quessa nantu à Wikidata"
},
["numeric"] = {
["decimal-mark"] = ".",
["delimiter"] = ","
},
["datetime"] = {
["prefixes"] = {
["decade-period"] = ""
},
["suffixes"] = {
["millennium"] = "millenniu",
["century"] = "seculu",
["million-years"] = "millioni d'anni",
["billion-years"] = "miliardi d’anni",
["year"] = "annu",
["years"] = "anni"
},
["julian-calendar"] = "Calendariu di Giuulianu", -- linked page title
["julian"] = "Giulianu",
["BCE"] = "BCE",
["CE"] = "CE",
["common-era"] = "Era cumuna" -- linked page title
},
["coord"] = {
["latitude-north"] = "N",
["latitude-south"] = "S",
["longitude-east"] = "E",
["longitude-west"] = "W",
["degrees"] = "°",
["minutes"] = "'",
["seconds"] = '"',
["separator"] = ", "
},
["values"] = {
["unknown"] = "scunnisciutu",
["none"] = "nimu"
},
["cite"] = {
["version"] = "2", -- increment this each time the below parameters are changed to avoid conflict errors
["web"] = {
-- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "situ web",
[aliasesP.referenceURL] = "url",
[aliasesP.publicationDate] = "data",
[aliasesP.retrieved] = "data di accessu",
[aliasesP.title] = "titulu",
[aliasesP.archiveURL] = "url d'archiviu",
[aliasesP.archiveDate] = "archive-date",
[aliasesP.language] = "linguaghju",
[aliasesP.author] = "autore", -- existence of author1, author2, author3, etc. is assumed
[aliasesP.publisher] = "editore",
[aliasesP.quote] = "citazione",
[aliasesP.pages] = "pagine" -- extra option
},
["q"] = {
-- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "1",
[aliasesP.pages] = "pagine",
[aliasesP.column] = "at",
[aliasesP.chapter] = "capitulu",
[aliasesP.sectionVerseOrParagraph] = "sezzione",
["external-id"] = "id", -- used for any type of database property ID
[aliasesP.title] = "titulu",
[aliasesP.publicationDate] = "data",
[aliasesP.retrieved] = "data di accessu"
}
}
}
p.getOrdinalSuffix = function(num)
if tostring(num):sub(-2,-2) == '1' then
return "th" -- 10th, 11th, 12th, 13th, ... 19th
end
num = tostring(num):sub(-1)
if num == '1' then
return "st"
elseif num == '2' then
return "nd"
elseif num == '3' then
return "rd"
else
return "th"
end
end
p.addDelimiters = function(n)
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")
if left and num and right then
return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right
else
return n
end
end
return p
end
return p