Modul:Convert/extra

S Wikipedije, slobodne enciklopedije
Jump to navigation Jump to search

Dokumentaciju za ovaj modul možete napraviti na stranici Modul:Convert/extra/dok

-- Extra conversion data used by Module:Convert.
--
-- [[Module:Convert/data]] defines all units and is transcluded in all pages
-- where [[Module:Convert]] is used. Testing new units by editing that module
-- would invalidate the cache for all affected pages.
--
-- For quick changes and experiments with new units, this module can be edited.
-- Since this module is transcluded in only a small number of pages, changes
-- should cause little server overhead and should propagate quickly.
--
-- If a unit is defined in the data module, any definition here is ignored,
-- so defining the same unit in both modules is not an error.
-- A unit defined here can refer to units that are also defined here, and
-- can refer to units defined in the data module.
--
-- Periodically, those extra units that are wanted permanently can be removed
-- from here after being added to [[Module:Convert/data]].

local extra_units = {
    ["cent"] = {
	name1    = "cent",
	symbol   = "¢",
	utype    = "cent",
	scale    = 1,
	default  = "cent",
	link     = "Cent (currency)",
    },
    ["¢"] = {
	target   = "cent",
    },
-- Hz added as inverse length; this is not *strictly* correct
-- however it supports electromagnetic wavelength/frequency conversions
    ["Hz"] = {
	_name1   = "hertz",
	_name2   = "hertz",
	_symbol  = "Hz",
	utype    = "length",
	scale    = 3.3356409519815204e-9,
	invert   = -1,
	iscomplex= true,
	prefixes = 1,
	default  = "m",
	link     = "Hertz",
    },
}

return { extra_units = extra_units }