Module:Val/units/doc
Appearance
< Module:Val | units
![]() | This is a documentation subpage for Module:Val/units. It may contain usage information, categories and other content that is not part of the original module page. |
Usage
This module subpage houses the recognized units and abbreviations used by Module:Val.
To add a new entry, take the following steps:
- Find alphabetically where the unit should be and enter a new line
- Add the text of the argument as it would appear in {{Val}} as a key in the table; exact casing should be used
- If the text consists entirely of alphabetical characters, it can be entered by it self
- If it contains any other characters, it should be surrounded by
['
and']
- Add an equals sign (
=
) and an opening curly brace ({
) - Type
abbr='
then type the text that should be output by {{Val}}, and close it with another single quote/apostrophe ('
) followed by a comma (,
) - Type
link='
then type the exact link that should be used with the text if a link is desired, and close it with another single quote ('
) - If there should be no space before the unit, add
, nospace=true
after the link - Close the entire line with a closing curly brace (
}
) followed by a comma (,
)
As an example, if we wanted {{Val}} to use "m" as the unit, and a link to metre, we would enter the following line:
meter = { abbr='m', link='metre' },
If we wanted {{Val}} to link to metre per second, but still use the same symbol, we would enter:
['m/s'] = { abbr='m/s', link='metre per second' },
If we wanted {{Val}} to use "%" as the unit, not followed by a space, and a link to percent, we would enter:
percent = { abbr='%', link='percent', nospace=true },