Jump to content

Module:Val/units/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by The Mol Man (talk | contribs) at 15:41, 8 January 2015 (idk). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

Usage

This module subpage houses the recognized units and abbreviations used by Module:Val.

To add a new entry, take the following steps:

  1. Find alphabetically where the unit should be and enter a new line
  2. 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 ']
  3. Add an equals sign (=) and an opening curly brace ({)
  4. Type abbr=' then type the text that should be output by {{Val}}, and close it with another single quote/apostrophe (') followed by a comma (,)
  5. 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 (')
  6. If there should be no space before the unit, add , nospace=true after the link
  7. 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 },