Vés al contingut

Mòdul:Infobox medical intervention/prova/i18n

De la Viquipèdia, l'enciclopèdia lliure
local p = {}

local MLMT	= require "Module:Multilang module tools/prova"
local GIBTi	= require "Module:Global infobox tools/prova/items"
local IMIi	= require "Module:Infobox medical intervention/prova/items"

p.rs_val = { --reserved keys and their values for infobox configuration
	-- When here a value is nil or "", the used value is the value read from Global infobox tools/i18n.rs_val
	-- To see the values that these variables take, use |allitems=list
	--colors
	[GIBTi.rk.rs_colorbox]			= "", --color for title and headers
	[GIBTi.rk.rs_color_tit_cllps]	= "", --color for header of the collapsible text data
	--styles
    [GIBTi.rk.rs_bodystyle]			= "",
    [GIBTi.rk.rs_titlestyle]		= "", -- by default is rs_colorbox as background and centered text
    [GIBTi.rk.rs_headerstyle]		= "", -- by default is rs_colorbox as background 
    [GIBTi.rk.rs_subheaderstyle]	= "", -- by default is rs_color_tit_cllps as background and centered text
    [GIBTi.rk.rs_imagestyle]		= "", -- by default is padding-bottom:0.1em;line-height:1.35;font-size:98%
    [GIBTi.rk.rs_captionstyle]		= "", -- by default is padding-top:0.3em;padding-bottom:0.1em;line-height:1.35;font-size:98%
    [GIBTi.rk.rs_labelstyle]		= "", -- by default is text-align:start; padding-right:1.2em; background:#eeeeee (approx. silver)
    [GIBTi.rk.rs_datastyle]			= "", -- by default is text-align:start
    [GIBTi.rk.rs_belowstyle]  		= "", -- 
    --icon
	[GIBTi.rk.rs_icon]				= "", -- filename of the icon that appears beside of the title
	[GIBTi.rk.rs_icon_at_begin]		= nil, -- the position in relation to the title
	[GIBTi.rk.rs_icon_hint]			= "", -- by default is the template name, displayed when hovering over the icon with the mouse cursor 
	--image
	[GIBTi.rk.rs_image_max_num]		= 1, -- max number of images (1-2)
	[GIBTi.rk.rs_def_image_size]	= "", -- by default is 300x300px
	--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]	= "", -- by default is l_
	[GIBTi.rk.rs_def_charnum_cllps]	= nil, --number of characters from which the text will appear collapsed (for some label-data items)
	[GIBTi.rk.rs_below]        		= "", --fixed text (i.e. information) for for all the same infoboxes
}

p.items = { --This is (perhaps) the only table you need to modify to localize the content
	-- 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.rk.name]		= "nom",
		[IMIi.k.ICD10]		= "CIM10",
		[IMIi.k.ICD9]		= "CIM9",
		[IMIi.k.ICD9u]		= "",
		[IMIi.k.OPS]		= "",
		[IMIi.k.LOINC]		= "",
		[IMIi.k.Other]		= {"altres_codis","AltresCodis"},
		[IMIi.k.Medline]	= "",
		[IMIi.k.HCPCS]		= "",
		[IMIi.k.CPT]		= "",
	},
	[MLMT.k.Labels] = { -- alternative (localized) name to header/label returned from Wikidata 
	-- If possible, it is always best to modify the locazation in Wikidata	
		[IMIi.k.ICD10]		= "[[CIM-10-PCS]]",
		[IMIi.k.ICD9]		= "[[CIM-9-MC Volum_3|CIM-9-MC]]",
		[IMIi.k.ICD9u]		= "[[CIM-9-MC Volum_3|CIM-9]]",
		[IMIi.k.OPS]		= "[[OPS-301]]",
		[IMIi.k.LOINC]		= "[[LOINC]]",
		[IMIi.k.Other]		= "Altres [[Codis de procediments|codis]]",
		[IMIi.k.Medline]	= "[[MedlinePlus]]",
		[IMIi.k.HCPCS]		= "[[HCPCS Level 2|HCPCS-L2]]",
		[IMIi.k.CPT]		= "[[Current Procedural Terminology|CPT]]",
	},	
}

------------------------------------------------------
-- OMIT PARAMETERS AND PRESET VALUES FOR PARAMETERS --
------------------------------------------------------

p.omit_params = {
	-- Key of standard params to omit
	-- When also change of the parameter order is required, the better solution is to use a new_idx
}

----------------------------------------
-- NEW ITEMS (non-standard) --
----------------------------------------
--Read documentation (or look at other more complex modules) how to add non-standard parameters

p.k = {
	-- definition of the keys of new items to use below, in format, i.g. name = "name"
}

p.new_items = {
	-- items to add
	[MLMT.k.Args] = {
		--[[
		Each item consists of:
		[key] = {"manual_parameter_name/s", "call to WD"},
		The first or second subitem can be omitted.	To omit a subitem means to leave it between "".
		"manual_parameter_name/s" can be "name" or {"name_1", "name2"}
		"call to WD" may be:
		  simple, e.g. "_P123456789" or
		  complex, e.g. {property = "P123456789", formatting = "[http:/web/$1 $1]", ...}		
		--]]	
	},	
	[MLMT.k.Labels] = {
		--[[
		Each item consists of:
		[key] = "label",
		"label" must be:
		  a text or 
		  a call to WD, e.g. "_P123456789"
		--]]	
	},
}

--If a new items is used: a copy of IMIi.idx with the new items is required.

return p