Template talk:Track gauge: Difference between revisions
MiszaBot II (talk | contribs) m Robot: Archiving 3 threads (older than 120d) to Template talk:RailGauge/Archive 3. |
Technical 13 (talk | contribs) m MiszaBot likes it's template at the very top and that "may" have been causing "some" of the problem. |
||
Line 1: | Line 1: | ||
⚫ | |||
⚫ | |||
{{User:MiszaBot/config |
{{User:MiszaBot/config |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
|archive = Template talk:RailGauge/Archive %(counter)d |
|archive = Template talk:RailGauge/Archive %(counter)d |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
}} |
}} |
||
⚫ | |||
⚫ | |||
{{auto archiving notice|bot=MiszaBot II|age=120|small=yes}} |
{{auto archiving notice|bot=MiszaBot II|age=120|small=yes}} |
||
Revision as of 14:33, 8 July 2013
This is the talk page for discussing improvements to the Track gauge template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7Auto-archiving period: 120 days ![]() |
![]() | Trains Template‑class | ||||||
|
This is the talk page for discussing improvements to the Track gauge template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7Auto-archiving period: 120 days ![]() |
14 Proposals
![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
I propose the next changes to the template. All these changes are made in the sandbox, and tested. If we agree in this, I'll prepare an "edit protect" request.
Topic (links to discussion below) |
Change type | Gauge input | Settings input |
Current ({{RailGauge}}) |
Proposed ({{RailGauge/sandbox}}) |
Note |
---|---|---|---|---|---|---|
38 in | New entry | 38in
|
|
3 ft 2 in (965 mm) | {{RailGauge/sandbox}} | Used in Clifton Rocks Railway |
28.08 mm | New entry | 28.08
|
|
28.08 | {{RailGauge/sandbox}} | Used in P4 gauge |
1945 mm | Change fraction | 1945mm
|
|
1,945 mm (6 ft 4+9⁄16 in) | {{RailGauge/sandbox}} | By 1⁄16 is more usual in imperial. Current x+23⁄40=1945.005 mm, to be x+9⁄16=1944.688 mm. So within 0.5 mm, close enough. |
Brunel | Add name for gauge | Brunel
|
allk=on | 7 ft (2,134 mm) Brunel gauge | {{RailGauge/sandbox}} | |
Bosnian | Add name for gauge | Bosnian
|
allk=on | 760 mm (2 ft 5+15⁄16 in) Bosnian gauge | {{RailGauge/sandbox}} | See also "Imperial" |
Imperial | Add name for gauge | Imperial
|
allk=on | Imperial | {{RailGauge/sandbox}} | See also "Bosnian" |
Spaces in input | Input friendly | 1435 mm
|
|
1,435 mm (4 ft 8+1⁄2 in) | {{RailGauge/sandbox}} | Input with spaces is recognised (spaces are stripped). |
0 in | Output friendly | 2140mm
|
|
2140mm | {{RailGauge/sandbox}} | Situations like "0 1⁄16 in": no need to add the zero any more (to get the fraction shown). |
Display only one measure | Output friendly | 66in
|
disp=1
|
5 ft 6 in | {{RailGauge/sandbox}} | When a gauge is repeated in a section or table: we can prevent mentioning the 2nd measure (the conversion) again. Setting disp=1 allows us to use exactly the same RG format without repeating the conversion.
|
First measure | Metric or imp first | 66in
|
|
5 ft 6 in (1,676 mm) | {{RailGauge/sandbox}} | All gauges have a default sequence defined (not changed). We can force a sequence by setting first=met or first=imp .
|
66in
|
first=met
|
1,676 mm (5 ft 6 in) | {{RailGauge/sandbox}} | |||
66in
|
first=imp
|
5 ft 6 in (1,676 mm) | {{RailGauge/sandbox}} | |||
Wrap breaks | Define wrap behaviour | Indian
|
wrap=y
|
Wrap breaks (re)defined: 1. Never within a single measure (imp, met) 2. Not within a gauge name 3. Allow before gauge name 4. If wrap=y , allow after the separator (space or /).
| ||
Indian
|
wrap=
|
|||||
Easier to link | Link to named gauge | Indian
|
(old:al=on), allk=on
|
5 ft 6 in (1,676 mm) Indian gauge | {{RailGauge/sandbox}} | To give the link to the named gauge, al=on|allk=on was needed. Now only allk=on is enough (also by logical sense)
|
Unknown gauge: no error | Maintenance friendly | 99in
|
|
99in | {{RailGauge/sandbox}} | Unknown gauge: The red error text does not appear any more. Input is shown as it is. But the page is still listed in the category. This way, the template can stay on the page, and we catch this unknown gauge (page) for improvement. |
Template internals | Changed workings |
|
|
Internally, template workings have changed: 1. Pure measure strings (imp, met) are made just once 2. Then a subtemplate "composes" the whole (sequence, wrappings, separator, etc.) into the output. Added parameters |dflt1= and |first= to handle the sequence. Each entry has an "id" value (the gauge in mm) to help checking and sorting.
|
- Added input options
- for 0.750in also
|1=0.75in
and|1=0.75"
- for 0.250in also
|1=0.25in
and|1=0.25"
- Tests
- Testcases for these changes
- Template:RailGauge/entry check - test all entries, and compare the sandbox with current template outcome.
- Full doc page the documentation page tested (with the long table).
- 38 in New entry, used in Clifton Rocks Railway. Input "965mm" will show metrics first (as with all options).
- 28.08 mm New entry, used in P4 gauge
- 1945 mm Change fraction. By 1⁄16 is more usual in imperial. Current x+23⁄40=1945.005 mm, to be x+9⁄16=1944.688 mm. So within 0.5 mm, close enough.
- Brunel Add name for gauge, imperial measure first.
- Bosnian Imperial Add name for gauge
- Spaces in input Input with spaces is recognised (spaces are stripped).
- 0 in Output friendly. Situations like "0 1⁄16 in": no need to add the zero any more (to get the fraction shown). Some six gauges are affected (I have removed "0 in" in their output).
- Display only one measure Output friendly. When a gauge is repeated in a section or table: we can prevent mentioning the 2nd measure (the conversion) again. Setting
disp=1
allows us to use exactly the same RG format without repeating the conversion.
- First measure Metric or imp first. All gauges have a default sequence defined (not changed). We can force a sequence by setting
first=met
orfirst=imp
.
- Wrap breaks Wrap breaks are (re)defined: 1. Never within a single measure (imp, met) 2. Not within a gauge name 3. Allow before gauge name 4. If
wrap=y
, allow after the separator (space or /).
- Easier to link Link to named gauge. To give the link to the named gauge,
al=on|allk=on
was needed. Now onlyallk=on
is enough (also by logical sense)
- Unknown gauge: no error When an unknown gauge is entered, the red error text" does not appear any more. Input is shown as it is. But the page is still listed in the category. This way, the template can stay on the page, and we catch this unknown gauge (page) for improvement.
- Template internals Internally, template workings have changed: 1. Pure measure strings (imp, met) are made just once 2. Then a subtemplate "composes" the whole (sequence, wrappings, separator, etc.) into the output. Added parameters
|dflt1=
and|first=
to handle the sequence. Each entry has an "id" value (the gauge in mm) to help checking and sorting. The testcases should prove that the template works as expected.
-DePiep (talk) 14:56, 9 March 2013 (UTC)
Pennsylvania
- Looks OK but there is (are) one (2) missing, i.e. the Pennsylvania Trolley Gauges of 62.25 and 62.5 Peter Horn User talk 22:31, 9 March 2013 (UTC)
- I will add the name "Pennsylvania" for 62.25in and 62.5in to the proposal (and tests, to be sure).
- I understand that Pennsylvania input should be recognised (so not the full P.T.G. name is needed for input). But we can have only one input hit: "Pennsylvania" input will show (I say) the 62.25in output. When asked
|allk=on
both inputs 62.25 and 62.5 input will link to the PTG page. -DePiep (talk) 22:54, 9 March 2013 (UTC)
- See also Template talk:RailGauge#Edit proposal (named gauges) above. Peter Horn User talk 23:07, 9 March 2013 (UTC)
- Done, added.
-
- It is just an Xreference. Peter Horn User talk 19:55, 10 March 2013 (UTC)
It is in the /sandbox, so it is part of the proposal. Test pages will be informed and changed later on. -DePiep (talk) 23:36, 9 March 2013 (UTC)
- By the way, shouldn't it be Pennsylvanian gauge, not Pennsylvania, here? -DePiep (talk) 01:12, 10 March 2013 (UTC)
- I changed it: Pennsylvanian, like Iberian or Russian. done. -DePiep (talk) 01:24, 10 March 2013 (UTC)
- Changed target page (the redirect) to be more clear: Pennsylvanian trolley gauge. -DePiep (talk) 17:44, 10 March 2013 (UTC)
- I changed it: Pennsylvanian, like Iberian or Russian. done. -DePiep (talk) 01:24, 10 March 2013 (UTC)
Edit protect of 15 March 2013
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Request: Please copy all code from the {{RailGauge/sandbox}} (this version) into the template {{RailGauge}}.
- Background. Changes are described in #14 Proposals above. Testcases in: {{RailGauge/testcases}} and {{RailGauge/entry check}}. -DePiep (talk) 11:27, 15 March 2013 (UTC)
Done. Looks like you've been busy! Thanks as always for your meticulous work. — Mr. Stradivarius ♪ talk ♪ 00:57, 16 March 2013 (UTC)
Four uncovered gauges
The next four gauges are not in the template. I propose adding them.
1650 mm in Portet-Saint-Simon–Puigcerdà railway (65 in makes 1651 mm)
- This gauge could use a source.
- The Spanish wiki says (es:Latour-de-Carol): Latour-de-Carol hacia Puigcerdá y Barcelona (España). Ancho ibérico (1668mm).
- Which makes more sense to me. 1650 mm probably an error. -DePiep (talk) 12:53, 17 March 2013 (UTC)
- This gauge could use a source.
- 1680 mm in Concrete sleeper (66+5⁄32 in makes 1680.4 mm) 1680
- 955 mm in Polybahn funicular (37+19⁄32 in makes 954.9 mm) 955
- 850 mm in Menaggio–Porlezza railway (33+15⁄32 in makes 850.1 mm) 850
-DePiep (talk) 12:46, 17 March 2013 (UTC) - Added sandbox demo. -DePiep (talk) 21:02, 17 March 2013 (UTC)
Add three and do template cleanups
I propose the next 3 additions and an input/output cleanup for the template. All is in the {{RailGauge/sandbox}}, a demo overview in {{railGauge/entry check}}. If we agree, I'll write the edit request. -DePiep (talk) 23:59, 18 March 2013 (UTC)
- Add gauge entries (new)
- Concrete sleeper has 1680mm --> sandbox: 1680mm
- Polybahn funicular has 955mm --> sandbox: 955 mm (3 ft 1+19⁄32 in)
- Menaggio–Porlezza railway has 850mm --> sandbox: 850 mm (2 ft 9+15⁄32 in)
- Add input options (existing gauges)
- ussg add 4'8.5" --> 4 ft 8+1⁄2 in (1,435 mm)
- 0.25in add 0.25 --> 0.25
- 56in add 56" --> 4 ft 8 in (1,422 mm)
- 622mm: add |2ft0.5in|2'0.5" --> 2 ft 1⁄2 in (622 mm)
- 613mm 24.125in: add |2ft0.125in|2'0.125" --> 2 ft 1⁄8 in (613 mm)
- Output change
- show 0.25 not 0.250 in =0.250 --> 0.250
- 3in an up: use fractions (1⁄32) not decimals:
- 450mm =450 mm (17+23⁄32 in) --> 450 mm (17+23⁄32 in)
- 765mm =765 mm (2 ft 6+1⁄8 in) --> 765 mm (2 ft 6+1⁄8 in)
- 860mm =860 mm (2 ft 9+7⁄8 in) --> 860 mm (2 ft 9+7⁄8 in)
- 1062mm =1062mm --> 1062mm
- Remove input options
- Non-intuitive (uncommon) abbrevs
- removed:
oh vic scot prov
(full names are available)
- Unsupported or confusing input formats:
- 1537mm 60.5: 5ft1/2in 5'1/2" do not use frac here
- 622mm: remove 2.5ft|2.5' (confusing)
- 613mm 24.125in: 2.125ft|2.125' (confusing)
- 406mm 16in: remove option 1.4ft (confusing)
- 419mm 16.5in: remove option 1.4.5ft (confusing)
- Uncommon metric input options
- Not generally supported input formats (we do not do detailed metres, use mm instead):
- |0.61|0.61m |0.711|0.711m, |0.76|0.76m, |0.838|0.838m, |0.860|0.860m, |0.95|0.95m, |0.965, |1.473|1.473m, |1.664|1.664m, |1.672|1.672m, |1.676|1.676m, |1.88|1.88m, |1.945|1.945m, |2.14|2.14m
- Note: Whenever an input option is removed, but used on a page: that page will be listed in the maintenance category (unrecognised gauge).
- Change input options sequence
- Basic sequence is:
65|65in|65"|5ft5in|5'6"
(imperial) - or:
1435|1435mm|1,435|1,435m
(metric) - So changed into this sequence (with no visible effect):
- 600mm input seq
- 1600mm input seq
- 15in input seq
- 1100mm input seq
-DePiep (talk) 23:59, 18 March 2013 (UTC)
- Template speed
- Also: high-usage rail gauges (like
sg
) are moved to the top, to speed up the template. They are sg, ussg, iberian, russian, metre
. -DePiep (talk) 18:32, 24 March 2013 (UTC)
Edit request on 24 March 2013
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Request: Please copy all code from {{RailGauge/sandbox}} (this version) into {{RailGauge}}.
- Background: Changes are described above. Three entries are added, and a cleanup of input options. Testcases are at {{RailGauge/entry check}}.
-DePiep (talk) 11:44, 24 March 2013 (UTC)
- Reopened request after improving sandbox. Adjusted "this version" link. -DePiep (talk) 21:12, 24 March 2013 (UTC)
Done. Thanks as always. The template is awfully slow to load, though - have you considered porting it to Lua? I'm still getting my head round all the various technical aspects, but as I understand it mw.loadData has been provided for cases like this one, and using it should provide a big performance increase. — Mr. Stradivarius ♪ talk ♪ 08:07, 25 March 2013 (UTC)
disp=or
I have added disp=or
to use "or" as a separater e.g. {{railgauge|1000mm|disp=or
}} → "1,000 mm or 3 ft 3+3⁄8 in". JIMp talk·cont 11:14, 18 April 2013 (UTC)
- Very good. (By the way, how did you manage this without typo? ;-) -DePiep (talk) 20:46, 18 April 2013 (UTC)
Wikidata proposal
See this proposal for Wikidata. -DePiep (talk) 09:37, 16 May 2013 (UTC)
Possible double definitions
Here is a list of gauge definitions from the template list. It looks like they are definitions of the same gauge but with a different value. For each of them, please discuss per pair: are they different (then keep) or are they the same (we merge them into one definition (the disposed definition will be put in a maintenance category so we can edit the article that uses it). -DePiep (talk) 10:27, 16 May 2013 (UTC)
- 10.5 mm
- 10.5 → 10.5
- 10.5mm → 10.5 mm (0.413 in)
-- confusing input options, better require "10.5in"
- Sandbox: removed option
10.5
. Remaining: 10.5mm, 10.5in, 10.5". - 10.5mm → 10.5 mm (0.413 in)
- 10.5in → 10+1⁄2 in (267 mm)
- Sandbox: removed option
- 0.650 in
- 0.649in → 0.649in
- 0.650in → 0.650in
-- are these really different?
- Sandbox: rm
0.649in
options & definition. Suspiciously close to 0.650in (0.02 mm), looks like an old rounding variant for the same gauge.
- Sandbox: rm
- 6.5 mm
- 6.5mm → 6.5 mm (0.256 in)
- 0.256in → 0.256 in (6.5 mm)
- 0.257in → 0.257in
-- is this really a different one, or just a rounding variant?
- Sandbox: removed
0.257in
gauge. Most likely a rounding variant for 0.256in.
- Sandbox: removed
- 22 in
- 558mm → 558mm
- 22in → 1 ft 10 in (559 mm)
-- better define 558mm to be 22 in right?
- Sandbox. Changed: 558mm into 559mm, and being exactly 22in. (so 558mm does not exist here any more).
- 860 mm
- 860 → 860
- 34in → 2 ft 10 in (864 mm)
-- While 34 inches (863.600 mm) = 864 mm, why split them?
- The diff is 4mm, which is much. So we treat them as different gauges:
860mm=33+27⁄32 in
.34in=864mm
(from 863.6mm).- Sandbox: added
864mm
→ 864mm- Input
860mm, 34in
puts page in the maintenance category, so we can check these pages individually on whether 860mm or 864mm was intended. (After these checks this category could be removed, in a next list version). - Todo: check documentation to list 860mm, 864mm, and 34in correctly.
- 0.750in
- Input option
0.750in
should also have0.75in
- Not changed± already in there.
- 9mm
- 9mm → 9 mm (0.354 in)
- 8.97mm → 8.97mm
- Sandbox: not changed, but the pages will be listed in for individual inspection (are these two the same gauge or not).
-DePiep (talk) 10:27, 16 May 2013 (UTC)
Done in the sandbox. Will check. The tracking category is Category:Pages with incorrect use of RailGauge template. DePiep (talk) 14:56, 27 June 2013 (UTC)
Done [1] -DePiep (talk) 21:47, 4 July 2013 (UTC)
Yet another "oddball"
For Trams in Leipzig 1,458 mm (4 ft 9+13⁄32 in)/1,458 and for Tram track gauge 1,458 mm / 4 ft 9+13⁄32 in/1458 instead of 1,458 mm. There is no output...yet. Peter Horn User talk 23:51, 20 June 2013 (UTC)
- One can write: {{RailGauge|1,458 mm}} in that page (I just did).
- Result:
1,458 mm
on the page and a note in Category:Pages with incorrect use of RailGauge template (because it was not recognised by the template). One might follow that category: it shoud be empty but for these pages. - What inch measure you propose? -DePiep (talk) 00:07, 21 June 2013 (UTC)
- Say 1,458 mm (4 ft 9.401575 in) make that 913⁄32 or 9+13⁄32 in Peter Horn User talk 00:56, 21 June 2013 (UTC)
- This one should also be inserted int the list. Peter Horn User talk 01:36, 26 June 2013 (UTC)
- Yes. I am preparing the changes in {{RailGauge/sandbox}}, when testing OK I´ll have them put in the live template. DePiep (talk) 13:38, 27 June 2013 (UTC)
- This one should also be inserted int the list. Peter Horn User talk 01:36, 26 June 2013 (UTC)
- Say 1,458 mm (4 ft 9.401575 in) make that 913⁄32 or 9+13⁄32 in Peter Horn User talk 00:56, 21 June 2013 (UTC)
Done [2] -DePiep (talk) 21:48, 4 July 2013 (UTC)
To be inserted into the list
From Sofia Tramway 1009. Peter Horn User talk 01:04, 21 June 2013 (UTC) Peter Horn User talk 01:08, 21 June 2013 (UTC)
- Looks like it is already in:
{{RailgGauge|1009mm}}
→ 1,009 mm (3 ft 3+23⁄32 in). -DePiep (talk) 10:02, 21 June 2013 (UTC)- ...but it should be changed into: 3 ft 3+23⁄32 in (calculates to 1008.8563 mm, correct). It was originally defined in metric, so we should calculate the inches; not a nominal inch measure, if I understand it well. -DePiep (talk) 10:16, 21 June 2013 (UTC)
- Double check {{convert|1009|mm|ftin|abbr=on}} 1,009 mm (3 ft 3.7 in) or {{convert|1.009|m|ftin|abbr=on}} 1.009 m (3 ft 3.7 in). So it should be corrected, asap, to 3 ft 3+23⁄32. Peter Horn User talk 00:43, 29 June 2013 (UTC)
Done [3] -DePiep (talk) 21:49, 4 July 2013 (UTC)
More accurate?
The output of {{RailGauge|62.5}} 62.5 should perhaps be {{convert|62+1/2|in|mm|2|abbr=on}} 62+1⁄2 in (1,587.50 mm) say 1587 mm? Peter Horn User talk 01:57, 26 June 2013 (UTC)
- 1587.50 should be rounded upwards for being 0.50, I'd say. A 0.4999 should go downward. If I am right, then 1588 is OK. -DePiep (talk) 13:12, 27 June 2013 (UTC)
- Agreed. Peter Horn User talk 18:32, 29 June 2013 (UTC)
Not done -DePiep (talk) 21:51, 4 July 2013 (UTC)
Edit request on 2 July 2013
![]() | This edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
- Request: Please copy all code from
{{RailGauge/sandbox}}
into{{RailGauge}}
. - Background: See edit proposals discussions above: #Possible double definitions #Yet another "oddball" #To be inserted into the list.
- Testcases: See Template:RailGauge/testcases#New and changed July 2013.
DePiep (talk) 13:41, 2 July 2013 (UTC)
- Done! Plastikspork ―Œ(talk) 21:06, 4 July 2013 (UTC)
Done -DePiep (talk) 22:23, 5 July 2013 (UTC)
Gauges we should take an extra look at
Some gauges that should be checked, added or improved in the template list:
- 33 mm (1.3 in): 12.99 in could be 1.3 in within reasonable precision. Well sourced at ScaleSeven.
- 36.75 mm (1.447 in): to add. ScaleSeven, 1:43.5 for Irish gauge. Well sourced.
- 49.20 mm: to add. ScaleSeven, 1:43.5 for Brunel (GWR) gauge. Well sourced.
- 1.75 in (44.45 mm): could be metrics first because defined in metrics? At least it should recognise metric input
44.45mm
. See 1 gauge.- 1.766 in (44.85 mm): check whether this is really different from 1.75in.
- 0.470in: should accept
0.47in
too.- Check whole list for this feature.
0.650in
,
- Check whole list for this feature.
- 12 mm (0.472 in) and 0.470in and 0.472 in (12 mm): all different really?
- 5 ft 3 in (1,600 mm): (
Victoria, Victorian, Irish
): British empire age, so most likely defined in inches not mm. Change default sequence: imp first.
-DePiep (talk) 15:42, 6 July 2013 (UTC), -DePiep (talk) 16:04, 6 July 2013 (UTC) -DePiep (talk) 16:35, 6 July 2013 (UTC)
Clean input: always add unit
We should alway require the input unit (that is: mm, in, m
or ft ... in, '.. '
and sometimes m
). Any unspecified number ("1.45") should be specified (that is: in, mm etc.).
I'll remove non-dimension input from the template, next edit. Have done so from the big /doc page list. -DePiep (talk) 01:42, 7 July 2013 (UTC)