Jump to content

Module:Wikidades/labels

Ón Vicipéid, an chiclipéid shaor.
Leagan ó 07:19, 20 Meán Fómhair 2020 le Amadalvarez (plé | dréachtaí)
(diff) ← An leasú roimhe seo | Leagan reatha (diff) | An chéad leasú eile → (diff)

Documentation for this module may be created at Module:Wikidades/labels/doc

-- Fixes for function getLabel

local infoboxLabelsFromId = {
	-- ["P40"]   = "Fills",                 text adjusted for infobox                 infobox: persona
	-- ["P57"]   = "Direcció",              text adjusted for infobox                 infobox: pel·licula, organització,.. 
}
-- Tables with labels fixed for infoboxes.

-- Fixes for case=infoboxlabel
local infoboxlabels = {
	["príomhchathair"] = "baile",
--	["comunitat autònoma"] = "autonomia",
	["Contae na hÉireann"] = "contae", --roinn na fhrainc?
	["Ceantar na Fhrainc"] = "ceantar",
	["Stáit Chónaidhme na Gearmáine"] = "stáit chónaidhme", --poblacht chónaidhme?
	["Stáit na Sibéire"] = "stáit",
	["Ríocht an Comhlathais"] = "stáit",
	["poblacht"] = "stáit",
	["Criosú Rialtas Áitiúil an Astráil"] = "rialtas áitiúil"
}

-- Fixes for case=infoboxdata
local infoboxdata = {
	["Bach Werke Verzeichnis"] = "BWV",
	["meán gluaisteach "] = "meán",
--	["desplaçament en rosca"] = "en rosca", Níl a fhios agam
	["uasmhéid gluaisteach"] = "uasmhéid",
	["tonáiste meá-lasta"] = "DWT",
	["Cód Idirnáisiúnta d'Ainmníocht Míoleolaíoch"] = "CIAM",
	["Cód Idirnáisiúnta d'Ainmníocht Luibhleolaíoch"] = "CIAL",
	["Cód Idirnáisiúnta d'Ainmníocht agus Rangú Víris"] = "CIARV",
	["Cód Idirnáisiúnta d'Ainmníocht Plandaí Saothraithe"] = "CIAPS",
	["Codi Internacional de Nomenclatura de Bacteris"] = "CINBa",
	["Codi Internacional de Nomenclatura Botànica (edició Viena)"] = "CINB (edició Viena)",
	["Codi Internacional de Nomenclatura Botànica (edició Tòquio)"] = "CINB (edició Tòquio)",
	["Codi Internacional de Nomenclatura Botànica (edició Saint Louis)"] = "CINB (edició Saint Louis)",
	["International Code of Nomenclature for algae, fungi, and plants (edició Melbourne)"] = "CINB (edició Melbourne)",
--	["firinscneach"] = "masculí",
--	["baininscneach"] = "femení",
	["Microsoft Windows"] = "Windows",
	["Modúl Ceannais agus Seirbhíse Apollo"] = "CSM",
	["Modúl Gealaí Apollo"] = "LM",
	["Berkeley Open Infrastructure for Network Computing"] = "BOINC",
--	["enlairament"] = "Nau d'arribada",
--	["aterratge"] = "Nau de retorn",
	["Advanced Packaging Tool"] = "APT",
	["GNU General Public License"] = "GNU GPL",
	["Common Development and Distribution License"] = "CDDL",
	["Cumann na Leadóige Proifisiúnta"] = "CLP",
}
-- Support function used from Module:Wikidata/i18n for function claim with case=infoboxlabel
local function fixInfoboxLabel(label)
	local lang = mw.language.getContentLanguage()
	label = lang:lcfirst(label)
	if infoboxlabels[label] then
		label = infoboxlabels[label]
	else
		label = string.gsub(label, " %(.+", "")
	end
	
	return lang:ucfirst(label)
end
-- Return exported functions
return {
	infoboxLabelsFromId = infoboxLabelsFromId,
	fixInfoboxLabel = fixInfoboxLabel,
	fixInfoboxData = fixInfoboxData,
	}