Module:Track gauge/data/doc: Difference between revisions

Content deleted Content added
m template
Undid revision 1194215761 by SleepTrain456 (talk)
 
(10 intermediate revisions by 3 users not shown)
Line 1:
{{High-use}}
{{Module rating|protected}}
[[Module:Track gauge/data]] holds the data for [[Module:Track gauge]] and template {{tlt|Track gauge}}. It contains oversome 230250 track gauge definitions (widths), often by different units (defined metric and/or imperial).
 
==Entry data structure==
Line 6:
<pre>
{
["full-id"] = "1435-met", -- Gauge-id including unit
["id"] = "1000", -- Gauge identification in mm.
["aliases"] = {[[1000mm]], [[1m]]}, -- Aliases for the gauge (input options; input spaces, commas and capitals are re-formatted by the module).
Line 29 ⟶ 30:
The "id", "aliases", and "def1" fields are required. Also, some size in metric and in imperial must be present. That is: at least one metric size field (mm or m) and one imperial size field (ft, inch, or num+den) must exist. All other fields are optional.
 
:'''id''': An id stands for the physical size, a length. It can be reused in multiple entries., Usuallyfor used twiceexample when a gauge is defined in both metric and in imperial. Even a third gauge name (by another alias) can beuse ths addedsize-id.
:'''alias''' (input option): An Alias''alias'' must be unique over all data. Alias names here should not contain any spaces; spaces are trimmed from the input when it is processed, so alias names containing spaces will not be matched.
 
 
== Development ==