Jump to content

Module:Global infobox tools/i18n

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

Documentation for this module may be created at Module:Global infobox tools/i18n/doc

local p = {}

local MLMT	= require "Module:Multilang module tools"
local GIBTi	= require "Module:Global infobox tools/items"

------------------------------------------------------------
-- WARNING: 
-- 1. Only Image parameters is required to localize 
-- 2. The changes made here will affect all infotables. Thus:
-- 3. This module should be protected.
------------------------------------------------------------

----------------------------------------
-- Image parameters  --
----------------------------------------

p.i_items1 = { -- When [GIBTi.rk.rs_image_max_num] = 1
	-- To see the current values for above variables use |allitems=list
	[MLMT.k.Args] = { -- alternative (localized) names for parameters
	--Warning: If an item has more one value: These values must be written between "{" and "}". More than two values are allowed.
		[GIBTi.ik.image]		= "imatge",
		[GIBTi.ik.image_idx]	= "imatge_idx",
		[GIBTi.ik.alt]			= "",
		[GIBTi.ik.size]			= {"mida","amplada"},
		[GIBTi.ik.caption]		= "peu",
	},	
}
p.i_items2 = { -- When [GIBTi.rk.rs_image_max_num] = 2
	-- To see the current values for above variables use |allitems=list
	[MLMT.k.Args] = { -- alternative (localized) names for parameters
	--Warning: If an item has more one value: These values must be written between "{" and "}". More than two values are allowed.
		[GIBTi.ik.image1]		= {"imatge","imatge1"},
		[GIBTi.ik.image_idx1]	= "imatge_idx1",
		[GIBTi.ik.alt1]			= "",
		[GIBTi.ik.size1]		= {"mida","amplada","mida1","amplada1"},
		[GIBTi.ik.caption1]		= {"peu","peu1"},
		[GIBTi.ik.image2]		= "imatge2",
		[GIBTi.ik.image_idx2]	= "imatge_idx2",
		[GIBTi.ik.alt2]			= "",
		[GIBTi.ik.size2]		= {"mida2","amplada2"},
		[GIBTi.ik.caption2]		= "peu2",
	},	
}

----------------------------------------------------------------------------
-- Reserved keys and their DEFAULT values to use for ALL global infoboxes --
----------------------------------------------------------------------------
local center = "valign=center; padding:1px;"
local direct = 'right'
if MLMT.LangIsRTL then
	direct = 'left'
end
p.rs_val = { --
	-- To see the values that these variables take, use |allitems=list
	--styles
    [GIBTi.rk.rs_bodystyle]			= "",
	[GIBTi.rk.rs_titlestyle] 		= center,	-- it will added at begin the rs_colorbox of the specific infobox
	[GIBTi.rk.rs_headerstyle] 		= "",		-- it will added at begin the rs_colorbox of the specific infobox
	[GIBTi.rk.rs_subheaderstyle] 	= center,	-- it will added at begin the rs_color_tit_cllps of the specific infobox
    [GIBTi.rk.rs_imagestyle]		= "padding-bottom:0.1em;line-height:1.35;font-size:98%", 
    [GIBTi.rk.rs_captionstyle]		= "padding-top:0.3em;padding-bottom:0.1em;line-height:1.35;font-size:98%",
    [GIBTi.rk.rs_labelstyle]		= "padding-"..direct..":1.2em;background:#eeeeee; text-align:start",
    [GIBTi.rk.rs_datastyle]			= "text-align:start", 
    [GIBTi.rk.rs_belowstyle]		= "",  
    --icon
	[GIBTi.rk.rs_icon_at_begin]		= true,	-- the position in relation to the title
	--image
	[GIBTi.rk.rs_image_max_num]		= 1,		-- max number of images (1-2)
	[GIBTi.rk.rs_def_image_size]	= "300x300px",	
	[GIBTi.rk.rs_send_img_preinfobox] = false,  -- only used by preinfoboxes, if true read from WD the values and more (read info)
	--referred to label/data content
	[GIBTi.rk.rs_changeable_lbls]	= false,	-- if true, allows users to change the label text, using the next prefix:
	[GIBTi.rk.rs_param_prefix_lbl]	= "l_",
	[GIBTi.rk.rs_def_charnum_cllps]	= 180,		--number of characters from which the text will appear collapsed (for some label-data items)
}

---------------------------------------------
-- Assigned colors according to Catalan WP --
---------------------------------------------
p.lcol = {
	building		= 'building',
	culture 		= 'culture',
	event			= 'event',
	living_being	= 'living_being',
	location		= 'location',
	organization	= 'organization',
	person			= 'person',
	science 		= 'science',
}
p.col_idx = {
	p.lcol.building,
	p.lcol.culture,
	p.lcol.event,
	p.lcol.living_being,
	p.lcol.location,
	p.lcol.organization,
	p.lcol.person,
	p.lcol.science,
}
p.colors = { -- = {colorbox, color_tit_cllps}
	[p.lcol.building]		= {'#c3e2ef',   '#e2ecf0'},
	[p.lcol.culture]		= {'Moccasin',		'#f4ecdd'},
	[p.lcol.science]		= {'#b0d1ad',   '#d5e0d4'},
	[p.lcol.event]			= {'#ccccff',   '#e3e3f6'},
	[p.lcol.organization]   = {'LightSalmon',   '#eed5cb'},
	[p.lcol.person]			= {'#d6d6c2',   '#e5e5d9'},
	[p.lcol.location]		= {'#d9b38c',   '#e3d9ce'},
	[p.lcol.living_being]	= {'gold',			'#eee8cb'},
}

----------------------------------------
-- Catalan WP icons --
----------------------------------------
-- The icons with "_" prefix do not have match with English templates
-- Otherwise you can look then in en:Template:name. i.g. en:Template:organization

p.licon = {
 -- Arts and culture
	-- Audiovisual arts
	artwork					= 'artwork',
	_audiovisual_program	= '_audiovisual_program',
	_TV_serie				= '_TV_serie',
	film					= 'film',
	-- Language 
	language				= 'language',
	language_family			= 'language_family',
	character				= 'character',
	grapheme				= 'grapheme',
	programming_language	= 'programming_language',
	typeface				= 'typeface',
	writing_system			= 'writing_system',
	-- Music
	album					= 'album',
	music_genre				= 'music_genre',
	musical_composition		= 'musical_composition',
	play					= 'play',
	song					= 'song',
	-- Publications
	book					= 'book',
	document				= 'document',
	newspaper				= 'newspaper',
	website					= 'website',
	-- Other
	flag					= 'flag',
	emblem					= 'emblem',
	video_game				= 'video_game',
	video_game_series		= 'video_game_series',
 -- Geography and place
	_location				= '_location',
	_political_geography	= '_political_geography',
	building				= 'building',
	road					= 'road',
	street					= 'street',
	station					= 'station',
 -- Health
	anatomy					= 'anatomy',
	drug					= 'drug',
	medical_condition		= 'medical_condition',
	medical_intervention	= 'medical_intervention',
	-- Food & drink
	drink					= 'drink',
	wine_region				= 'wine_region',
	food					= 'food',
	cheese					= 'cheese',
 -- History and events
	event					= 'event',
	military_conflict		= 'military_conflict',
	treaty					= 'treaty',
	spaceflight				= 'spaceflight',
 -- People and person
	person					= 'person',
	hereditary_title		= 'hereditary_title',
	_order					= '_order',
	-- Sports
	sport					= 'sport',
	sports_competition_event= 'sports_competition_event',
	game					= 'game',
	football_club_season	= 'football_club_season',
	sports_team				= 'sports_team',
 -- Society and social science
	organization			= 'organization',
	currency				= 'currency',
	economy					= 'economy',
	ethnic_group			= 'ethnic_group',
	legislation				= 'legislation',
	military_unit			= 'military_unit',
	name					= 'name',
	occupation				= 'occupation',
	official_post			= 'official_post',
 -- Science and nature
	-- Astronomy
	asteroide				= 'asteroide',
	astronomical_event		= 'astronomical_event',
	astronomical_object		= 'astronomical_object',
	feature_on_celestial_object= 'feature_on_celestial_object',
	_satellite				= '_satellite',
	star					= 'star',
	-- Biology
	fossil					= 'fossil',
	Taxobox					= 'Taxobox',
	cat_breed				= 'cat_breed',
	dog_breed				= 'dog_breed',
	horse_breed				= 'horse_breed',
	--Chemical
	chemical				= 'chemical',
	isotope					= 'isotope',
	particle				= 'particle',
	protein					= 'protein',
	enzyme					= 'enzyme',
	-- Geology
	mineral					= 'mineral',
	rock					= 'rock',
	--Physics and mathematics
	number					= 'number',
	physical_quantity		= 'physical_quantity',
	polyhedron				= 'polyhedron',
	unit					= 'unit',
	color					= 'color',
	cloud_type				= 'cloud_type',
 -- Technology and applied science
	-- Technology
	_file_format			= '_file_format',
	software				= 'software',
	top_level_domain		= 'top_level_domain',
	-- Transports
	_aircraft				= '_aircraft',
	automobile				= 'automobile',
	_boat					= '_boat',
	motorcycle				= 'motorcycle',
	vehicle_espacial		= 'vehicle_espacial',
	-- Others
	camera					= 'camera',
	_computer_equipment		= '_computer_equipment',
	instrument				= 'instrument',
	mobile_phone			= 'mobile_phone',
	tool					= 'tool',
	weapon					= 'weapon',
}

p.icon_idx = { --Only used to display the icon list
 -- Arts and culture
	-- Audiovisual arts
	p.licon.artwork,
	p.licon._audiovisual_program,
	p.licon._TV_serie,
	p.licon.film,
	-- Language 
	p.licon.language,
	p.licon.language_family,
	p.licon.character,
	p.licon.grapheme,
	p.licon.programming_language,
	p.licon.typeface,
	p.licon.writing_system,
	-- Music
	p.licon.album,
	p.licon.music_genre,
	p.licon.musical_composition,
	p.licon.play,
	p.licon.song,
	-- Publications
	p.licon.book,
	p.licon.document,
	p.licon.newspaper,
	p.licon.website,
	-- Other
	p.licon.flag,
	p.licon.emblem,
	p.licon.video_game,
	p.licon.video_game_series,
 -- Geography and place
	p.licon._location,
	p.licon._political_geography,
	p.licon.building,
	p.licon.road,
	p.licon.street,
	p.licon.station,
 -- Health
	p.licon.anatomy,
	p.licon.drug,
	p.licon.medical_condition,
	p.licon.medical_intervention,
	-- Food & drink
	p.licon.drink,
	p.licon.wine_region,
	p.licon.food,
	p.licon.cheese,
 -- History and events
	p.licon.event,
	p.licon.military_conflict,
	p.licon.treaty,
	p.licon.spaceflight,
 -- People and person
	p.licon.person,
	p.licon.hereditary_title,
	p.licon._order,
	-- Sports
	p.licon.sport,
	p.licon.sports_competition_event,
	p.licon.game,
	p.licon.football_club_season,
	p.licon.sports_team,
 -- Society and social science
	p.licon.organization,
	p.licon.currency,
	p.licon.economy,
	p.licon.ethnic_group,
	p.licon.legislation,
	p.licon.military_unit,
	p.licon.name,
	p.licon.occupation,
	p.licon.official_post,
 -- Science and nature
	-- Astronomy
	p.licon.asteroide,
	p.licon.astronomical_event,
	p.licon.astronomical_object,
	p.licon.feature_on_celestial_object,
	p.licon._satellite,
	p.licon.star,
	-- Biology
	p.licon.fossil,
	p.licon.Taxobox,
	p.licon.cat_breed,
	p.licon.dog_breed,
	p.licon.horse_breed,
	--Chemical
	p.licon.chemical,
	p.licon.isotope,
	p.licon.particle,
	p.licon.protein,
	p.licon.enzyme,
	-- Geology
	p.licon.mineral,
	p.licon.rock,
	--Physics and mathematics
	p.licon.number,
	p.licon.physical_quantity,
	p.licon.polyhedron,
	p.licon.unit,
	p.licon.color,
	p.licon.cloud_type,
 -- Technology and applied science
	-- Technology
	p.licon._file_format,
	p.licon.software,
	p.licon.top_level_domain,
	-- Transports
	p.licon._aircraft,
	p.licon.automobile,
	p.licon._boat,
	p.licon.motorcycle,
	p.licon.vehicle_espacial,
	-- Others
	p.licon.camera,
	p.licon._computer_equipment,
	p.licon.instrument,
	p.licon.mobile_phone,
	p.licon.tool,
	p.licon.weapon,
}

p.icons_headers = { --Only used to display the headers for icon list
	[p.licon.artwork]		= 'Arts and culture',
	[p.licon._location]		= 'Geography and place',
	[p.licon.anatomy]		= 'Health',
	[p.licon.event]			= 'History and events',
	[p.licon.person]		= 'People and person',
	[p.licon.organization]	= 'Society and social science',
	[p.licon.asteroide]		= 'Science and nature',
	[p.licon._file_format]	= 'Technology and applied science',
}

p.icons = {  
 -- Arts and culture
	-- Audiovisual arts
	[p.licon.artwork]				= 'Picture icon BLACK.svg',
	[p.licon._audiovisual_program]	= 'Transmitter (824) - The Noun Project.svg',
	[p.licon._TV_serie]				= 'TV_icon.svg',
	[p.licon.film]					= 'Ic movie 48px.svg',
	-- Language 
	[p.licon.language]				= 'Octicons-comment.svg',
	[p.licon.language_family]		= 'Octicons-comment.svg',
	[p.licon.character]				= 'Character-icon-3.1.svg',
	[p.licon.grapheme]				= 'Transponaturtecken.svg',
	[p.licon.programming_language]	= 'High-contrast utilities console.svg',
	[p.licon.typeface]				= 'Capitalis monumentalis A.svg',
	[p.licon.writing_system]		= 'Kanji Wa.svg',
	-- Music
	[p.licon.album]					= 'Linecons_vynil.svg',
	[p.licon.music_genre]			= 'Antu audacious.svg',
	[p.licon.musical_composition]	= 'Musical note nicu bucule 01.svg',
	[p.licon.play]					= 'Emoji u1f3ad-bw.svg',
	[p.licon.song]					= 'Musical note nicu bucule 01.svg',
	-- Publications
	[p.licon.book]					= 'Emoji u1f4d6 ct.svg',
	[p.licon.document]				= 'Simpleicons Business note-1.svg',
	[p.licon.newspaper]				= 'Noto Emoji KitKat 1f4f0 t.svg',
	[p.licon.website]				= 'Antu tag-places-black.svg',
	-- Other
	[p.licon.flag]					= 'PICOL Flag.svg',
	[p.licon.emblem]				= 'Coat of arms high contrast icon.svg',
	[p.licon.video_game]			= 'Video game controller icon designed by Maico Amorim.svg',
	[p.licon.video_game_series]		= 'Video game controller icon designed by Maico Amorim.svg',
 -- Geography and place
	[p.licon._location]				= 'Simpleicons Places placeholder-tool.svg',
	[p.licon._political_geography]	= 'CC-devnations.svg',
	[p.licon.building]				= 'Organization icon.svg',
	[p.licon.road]					= 'AB-AS.svg',
	[p.licon.street]				= 'AB-AS.svg',
	[p.licon.station]				= 'Aiga railtransportation 25.svg',
 -- Health
	[p.licon.anatomy]				= 'Bone noun 71979 cc.svg',
	[p.licon.drug]					= 'McCormick Pills.svg',
	[p.licon.medical_condition]		= 'Arrythmia noun 246518 cc.svg',
	[p.licon.medical_intervention]	= 'Surgeon icon with eyes.svg',
	-- Food & drink
	[p.licon.drink]					= 'Ic local bar 48px.svg',
	[p.licon.wine_region]			= 'Simpleicons Interface glass-with-wine.svg',
	[p.licon.food]					= 'Emojione BW 1F36E.svg',
	[p.licon.cheese]				= 'Toicon-icon-stone-curdle.svg',
 -- History and events
	[p.licon.event]					= 'Simpleicons Business calendar-with-a-clock-time-tools.svg',
	[p.licon.military_conflict]		= 'Battle icon gladii.svg',
	[p.licon.treaty]				= 'Font Awesome 5 regular calendar-check.svg',
	[p.licon.spaceflight]			= 'Octicons-rocket.svg',
 -- People and person
	[p.licon.person]				= 'Simpleicons Interface user-outline.svg',
	[p.licon.hereditary_title]		= 'Coat of arms high contrast icon.svg',
	[p.licon._order]				= 'Group half.svg',
	-- Sports
	[p.licon.sport]					= 'Emoji_u26bd_transparent.svg',
	[p.licon.sports_competition_event]= 'Baseball Picol icon.svg',
	[p.licon.game]					= 'OOjs UI icon die-ltr.svg',
	[p.licon.football_club_season]	= 'Noun project 393.svg',
	[p.licon.sports_team]			= 'Noun project 393.svg',
 -- Society and social science
	[p.licon.organization]			= 'Group half.svg',
	[p.licon.currency]				= 'Community Noun project 39956.svg',
	[p.licon.economy]				= 'Linecons banknote.svg',
	[p.licon.ethnic_group]			= 'Female_icon.svg',
	[p.licon.legislation]			= 'Rpb notepad icon.svg',
	[p.licon.military_unit]			= 'Crossed cannons.svg',
	[p.licon.name]					= 'Black - replace this image female.svg',
	[p.licon.occupation]			= 'Symbole travaux marteau et clef.svg',
	[p.licon.official_post]			= 'FP Interior icon.svg',
 -- Science and nature
	-- Astronomy
	[p.licon.asteroide]				= 'Icona asteroide.svg',
	[p.licon.astronomical_event]	= 'Noun Astronomy Icon2.svg',
	[p.licon.astronomical_object]	= 'Galaxy icon.svg',
	[p.licon.feature_on_celestial_object]= 'Antu palemoon b&w.svg',
	[p.licon._satellite]			= 'Toicon-icon-lines-and-angles-sleep.svg',
	[p.licon.star]					= 'Twemoji 2734 black.svg',
	-- Biology
	[p.licon.fossil]				= 'Leaf icon (Noun Project).svg',
	[p.licon.Taxobox]				= 'Butterfly icon (Noun Project).svg',
	[p.licon.cat_breed]				= 'Cat_silhouette.svg',
	[p.licon.dog_breed]				= 'Dog.svg',
	[p.licon.horse_breed]			= 'Font Awesome 5 solid horse.svg',
	--Chemical
	[p.licon.chemical]				= 'Test tube icon.svg',
	[p.licon.isotope]				= 'Atom editor logo black.svg',
	[p.licon.particle]				= 'Atom editor logo black.svg',
	[p.licon.protein]				= 'Plain DNA icon.svg',
	[p.licon.enzyme]				= 'Noun_project_3067.svg',
	-- Geology
	[p.licon.mineral]				= 'Linecons diamond.svg',
	[p.licon.rock]					= 'Noun project 528.svg',
	--Physics and mathematics
	[p.licon.number]				= 'Emojione BW 0037.svg',
	[p.licon.physical_quantity]		= 'Noun project 1842.svg',
	[p.licon.polyhedron]			= 'Pyramid icon.svg',
	[p.licon.unit]					= 'Noun project 1842 flipped.svg',
	[p.licon.color]					= 'Ic palette 48px.svg',
	[p.licon.cloud_type]			= 'Ic cloud 48px.svg',
 -- Technology and applied science
	-- Technology
	[p.licon._file_format]			= 'Octicons-file-code.svg',
	[p.licon.software]				= 'Crystal Clear app winprops bw.svg',
	[p.licon.top_level_domain]		= 'Antu application-vnd-google-earth-kml-black.svg',
	-- Transports
	[p.licon._aircraft]				= 'Plane icon.svg',
	[p.licon.automobile]			= 'Aiga carrental cropped.svg',
	[p.licon._boat]					= 'Ferry symbol padded.svg',
	[p.licon.motorcycle]			= 'Motorcycle icon.svg',
	[p.licon.vehicle_espacial]		= 'Octicons-rocket.svg',
	-- Others
	[p.licon.camera]				= 'Camera (Windows) icon.png',
	[p.licon._computer_equipment]	= 'Ic settings applications 48px.svg',
	[p.licon.instrument]			= 'Simple Music.svg',
	[p.licon.mobile_phone]			= 'Mobile phone font awesome2.svg',
	[p.licon.tool]					= 'Ic settings applications 48px.svg',
	[p.licon.weapon]				= 'Pistol icon.svg',
}

return p