ਮੌਡਿਊਲ:Convert/extraThis module can be used to quickly add a new unit for use with {{convert}}. When satisfied that a unit is working correctly, ask at Module talk:Convert for the unit to be moved to the permanent list of units. See Template:Convert/unit sandbox for a good way to prepare unit definitions that can be copied into this page. The following extracts from Module:Convert/data show examples that could be used to define a new unit. Any number of spaces can be used where blanks are shown in the following.
-- 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 = {
["sec"] = { -- experiment per request at [[Template talk:Convert#Auto-select time unit?]]
_name1 = "second",
_symbol = "s",
utype = "time",
scale = 1,
prefixes = 1,
default = "v < 7200 ! min ! h",
link = "Second",
},
["inches"] = {
target = "in",
},
["bit"] = {
_name1 = "bit",
_symbol = "bit",
utype = "information",
scale = 0.125,
prefixes = 1,
default = "B",
link = "Bit",
},
["B"] = {
_name1 = "byte",
_symbol = "B",
utype = "information",
scale = 8,
prefixes = 1,
default = "bit",
link = "Byte",
},
["DW-tonne"] = {
name1_us = "deadweight metric ton",
symbol = "deadweight tonne",
sym_us = "~deadweight metric ton",
usename = 1,
utype = "mass",
scale = 1000,
default = "DWton",
link = "Deadweight tonnage",
},
["hm³"] = {
target = "hm3",
},
["MPGE"] = { -- temporary test for scale 1609.344/(33.705*3.6e6) planned at [[Template talk:Convert#Check arithmetic for MPGe conversion]] ([[Special:PermanentLink/1133610113#Check arithmetic for MPGe conversion|permalink]])
name1 = "mile per gallon gasoline equivalent",
name2 = "miles per gallon gasoline equivalent",
symbol = "mpg‑e",
utype = "energy per unit length",
scale = 1.3263314048360777e-5,
invert = -1,
iscomplex= true,
default = "kWh/100 mi",
link = "Miles per gallon gasoline equivalent",
},
}
return { extra_units = extra_units }
|
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve
Portal di Ensiklopedia Dunia