Trichome

--[=[ 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 would be transcluded in only a small number of pages,
changes should cause little server overhead and should propagate quickly.
]=]

local extra_units = {
    -- TODO: Remove following tests.
    ["RDF"] = { target = "DF" },        -- redirect to new unit defined below
    ["RM"] = { target = "m" },          -- redirect to "m" in [[Module:Convert/data]]
    ["xyz"] = { target     = "xyz" },
    ["J/DM"] = {
	per	 = { "J", "DM" },
	utype	 = "energy per unit length",
	default	 = "kJ/km",
    },
    ["DF"] = {
	name1	 = "double foot",
	name2	 = "double feet",
	symbol	 = "dft",
	utype	 = "length",
	scale	 = 0.6096,
	default	 = "m",
    },
    ["DM"] = {
	_name1	 = "double metre",
	_name1_us = "double meter",
	_symbol	 = "Dm",
	utype	 = "length",
	scale	 = 2,
	prefixes = 1,
	default	 = "v > 0 and v < 1.5 ! ftin ! ft",
	link	 = "Double metre",
    },
    ["ina"] = {
	name1	 = "inch",
	name2	 = "inches",
	symbol	 = '<abbr title="inches">in</abbr>',
	utype	 = "length",
	scale	 = 0.0254,
	exception = "subunit_more_precision",
	default	 = "mm",
    },
    ["$/km"] = {
	per	 = { "$", "km" },
	utype	 = "cost $ per unit length",
	default	 = "$/mi",
    },
    ["$/mi"] = {
	per	 = { "$", "mi" },
	utype	 = "cost $ per unit length",
	default	 = "$/km",
    },
}

return { extra_units = extra_units }

Leave a Reply