![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 | Archive 6 | Archive 7 |
Hello all. I've just finished writing a Lua version of this template at Module:RailGauge. The gauge data is stored at Module:RailGauge/data and the test cases are at Module talk:RailGauge/testcases. (You need to ignore the big red crosses on the test cases page and check the actual output - it looks like this is a bug in Module:UnitTests rather than actual failed test cases.) I converted the data from the template code using Module:User:Mr. Stradivarius/RGConvert. The Lua version looks to be a lot quicker than the current template. I did a quick and very unscientific speed comparison by testing the all test cases in my sandbox, and MediaWiki processed the Lua version in 0.66 seconds, and the current template in 2.83 seconds. Please have a play around with it, and see if you find any errors. — Mr. Stradivarius ♪ talk ♪ 07:00, 31 July 2013 (UTC)
 
to encode spaces quite a few times, but in the module I've converted these to normal spaces, so there is a difference in the wikitext, but not one that should affect the output in any way. Similarly, I've also changed a few of the named gauge links, from e.g. [[Metre gauge|metre gauge]]
to [[metre gauge]]
, which makes the wikitext simpler but doesn't change the output. —
Mr. Stradivarius
♪ talk ♪
04:58, 1 August 2013 (UTC)
|first=imp
). -
DePiep (
talk)
12:38, 3 August 2013 (UTC)template -> module
crisp and clear. All target is testcases only. No personal "won't have any effect" edits please. Prove your thing as a pro. -
DePiep (
talk)
22:38, 1 August 2013 (UTC)1000mm
with |allk=on
|al=on
: a difference occurs. Old template overrules |al=
, module does not. The input is not consistent or regular, but can occur. -
DePiep (
talk)
14:46, 3 August 2013 (UTC)
if not data then
. Is arg[ 1 ]
trimmed, when used as catsort argument (%s
)? Note that we cannot test this categorisation outside mainspace. -
DePiep (
talk)
15:03, 3 August 2013 (UTC)
dataOverview
that takes the arg[1]
input and returns all data (in wikitable columns). Probably the Aliases per gauge will still make a cell-list as is today, not a separate row. Imp and met aliases sources
to point to the sources (as I have started recently for the scaled gauges). Another note
column should be for free use. I don't think the sources should be in data file, but free addition (there goes the loop?). Other columns: id(mm)-to-inch calculated (
Template:RailGauge/entry check could go, unless we want tech info out of sight from /doc readers). If a Named gauge option exists, it could be in a separate column (the wikitable is sortable of course), or the function could filter on this. You know what? Better set up a demo-table here. To be continued. -
DePiep (
talk)
13:37, 4 August 2013 (UTC)setup A, not supported by anyone anymore
| ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
id | dflt1 | aliases | name alias | returns | name link | mm-to-inch calculated | source | rounding & normalisation note | note |
---|---|---|---|---|---|---|---|---|---|
1435 | met | 1435 1435mm |
standard sg ... |
1,435 mm (4 ft 8+1⁄2 in) | standard gauge | 56.496 in | Standard gauge | ||
1435 | imp | 56.5in 4ft8.5in |
usstandard ussg ... |
4 ft 8+1⁄2 in (1,435 mm) | standard gauge | 56.496 in | Standard gauge | ||
406 | imp | 16in 16" 1ft4in 1'4" |
16 in (406 mm) | 15.984 in | |||||
1668 | met | 1668 1668mm 1.668m |
Iberian | 1,668 mm (5 ft 5+21⁄32 in) | Iberian gauge | 65.669 in |
|id=
too, which might make it easy to add notes unambiguously. -
DePiep (
talk)
14:48, 4 August 2013 (UTC)|1=
"? (basically very good for checking purposes; not for an editor reading the documentation). -
DePiep (
talk)
20:23, 11 August 2013 (UTC)Rail gauge pages can be categorised by size (and by country, separately and independently). See for example:
Category:Narrow gauge railways and
Category:3ft gauge railways. Such a category may be defined for a range of sizes (see text on the 3ft category page). The category names, especially the heavier used ones, are quite stable (I remember but currently cannot find a closed discussion that lead into general consensus).
Suggestion: we add to the template+data: option sizecat=on
that adds the correct (range) size category. It should be used only in topic pages (about a line with that gauge, pref in the infobox), not on overview pages like "Narrow gauges ...". -
DePiep (
talk)
13:58, 4 August 2013 (UTC)
|sizecat=on
)? -
DePiep (
talk)
19:46, 4 August 2013 (UTC)|lk=
Parameter |lk=on
sets the units (ft, in, mm, m) to wikilink. Recently, we (I) have added a check for pages that do so (see
maintenance cat, catsort:U). All article pages that showed up (~12?) were edited because it was overlinking (agree there are better ways to check this, e.g. a bot or AWB). Remaining pages are non-mainspace. Background: some 6 months ago I disentangeled the params |al=
, |allk=
and |lk=
in the template. They were confusingly interacting. Remaining is the overload of al
and allk
, but without conflict.
I propose: 1. Rename the parameter to be |unitlink=on
for clarity. It is and should be a very low-used option. 2. Old name not supported any more (linking is not a major target for the template). 3. rm from code the maintenance cat for this one lk=on
. 4. fwiw: current link
Foot (length) is an R to
Foot (unit). -
DePiep (
talk)
15:27, 4 August 2013 (UTC)
If I read code correct, check for error( 'Non-number mm value detected' )
in formatMet
can be in checkData
. -
DePiep (
talk)
14:22, 5 August 2013 (UTC)
As it is now, in _main
there is a loop to find if alias == searchKey
. I wonder, is thare not a slolution that targets the alias straight away, say id = data.alias([searchKey])
. It seems simple that a try for data.alias([searchKey]) would give a hit or not. How to get to the id for that alias's single data set I cannot suggest. -
DePiep (
talk)
14:34, 5 August 2013 (UTC)
{
"id" = "1435",
"aliases" = { "1435" = true, "1435mm" = true, "sg" = true, "standard" = true },
"name" = "standard gauge",
"link" = "[[standard gauge]]",
"dflt1" = "met",
"mm" = "1435",
"ft" = "4",
"in" = "8",
"num" = "1",
"den" = "2"
},
local data
for i, t in ipairs( gaugeData ) do
if t.aliases searchKey then
data = t
end
end
for
loops. I'm not sure if changing this would have an appreciable effect on performance though. If you're interested in reading about Lua performance, then
this seems to be the most widely-read paper on the subject. I did have a look for something comparing performance of pairs()
and ipairs()
to direct table lookup, but I couldn't find anything specific. —
Mr. Stradivarius
♪ talk ♪
15:17, 5 August 2013 (UTC)
I've added a checkData check to detect unwanted whitespace from the /data subpage values. It detects whitespace surrounding the name
and link
values, and whitespace anywhere in the other values. —
Mr. Stradivarius
♪ talk ♪
16:32, 5 August 2013 (UTC)
I've changed the search key whitespace trimming so that it trims all whitespace, rather than just spaces. For example, this code now works:
Code | Main | Sandbox |
---|---|---|
{{RailGauge|1 m}} |
1,000 mm (3 ft 3+3⁄8 in) | 1,000 mm (3 ft 3+3⁄8 in) |
— Mr. Stradivarius ♪ talk ♪ 16:49, 5 August 2013 (UTC)
It appears that the next rules are only implicit.
dflt1
definition. If input is in imperial, imp will be the dflt1
.|first=met
of course. Make it an explicit rule (document)? No code change (or in dataCheck).|1=Victorian
→ 1,600 mm (5 ft 3 in)
Victorian broad gauge.Are there situations where accepted metric input does not match id? What would that mean? - DePiep ( talk) 21:38, 13 August 2013 (UTC)
I'd like to have the option to have the id
returned when entering a gauge. Also, secundary, the input's first could be usefull, and adding the name id ("Victorian") would make the identification complete. (input id = {mm, first, name}) -
DePiep (
talk)
21:44, 13 August 2013 (UTC)
I entered twice a unit name: ["id"]=10, ["id"]=11
(in the same id). Wrong by fact, worth checking? -
DePiep (
talk)
02:07, 3 September 2013 (UTC)
As the greatest usage of this template is as ussg, is there some reason it has to display the fractional half as a superscript 1 / subscript 2 rather than just ½? It looks ugly on the page and forces non-standard line spacing before and after. Afterbrunel ( talk) 08:47, 24 September 2013 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
DePiep ( talk) 17:24, 8 October 2013 (UTC)
For Track gauge#Broad gauge make {{RailGauge|7ft}}, 7 ft (2,134 mm) read like 7 ft 0 in (2,134 mm) or 7 ft (2,134 mm), and thus distinguish it from {{RailGauge|84.25}}, 84.25 Peter Horn User talk 01:24, 13 September 2013 (UTC)
I reorganised gauges: 8200mm, 8ft, 1850mm, 68in sourced by Peter Horn. - DePiep ( talk) 00:06, 3 September 2013 (UTC), adding 86in: - DePiep ( talk) 21:51, 4 September 2013 (UTC)
List of entries, over 2in, that are not by 1⁄32 units:
See below, here for overview:
Concluding, we can say & propose:
15.25in
39.3in
For List of track gauges#Broad gauge 1,980 mm (6 ft 6 in) 1,945 mm (6 ft 4+9⁄16 in) 1,750 mm (5 ft 8+7⁄8 in) 1,672 mm (5 ft 5+13⁄16 in) and others to come. Peter Horn User talk 18:17, 15 October 2013 (UTC)
Peter Horn User talk 17:59, 18 October 2013 (UTC) Peter Horn User talk 00:39, 21 October 2013 (UTC)
For Santos tramways, and the articles linked to it, 1350 Santos The Tramways of Santos Retrieved on 26 June 2008. Peter Horn User talk 03:32, 18 October 2013 (UTC)
Peter Horn User talk 18:07, 18 October 2013 (UTC) .
- DePiep ( talk) 19:32, 25 October 2013 (UTC)
{{RailGauge|1350mm}}
(good) for gauges. That way the page is listed in the category, and so can be found, checked and corrected when the new gauge is in. The same for conversions like {{RailGauge|1350mm {{convert|1350mm|...}}}}
(good) and questions {{RailgGauge|1013 mm (disputed)}}
(good): these are listed in the tracking category and so can be addressed later.The article metre gauge mentions a temporary gauge of 1,013 mm (3 ft 3.88 in) (3+7⁄8) in {{RailGauge|1013mm}} for the Sofia Tramway Peter Horn User talk 01:55, 1 November 2013 (UTC)
Added to template: 2.781in, 70.64/70.69mm, 1009mm=metre, 1350mm -
DePiep (
talk)
15:18, 12 November 2013 (UTC)
|alllk=on
?What should be the output for |bosnian
and |760mm
input? There seems to be a connection with 2 ft 6 in (762 mm), but there is also a ~2 millimetres (0.079 in) (~1⁄32 in) difference. -
DePiep (
talk)
12:02, 14 December 2013 (UTC)
I'd like to hear from Aaron-Tripel. Full title is too long to use inline. - DePiep ( talk) 19:34, 24 December 2013 (UTC)
|allk=on
? I mean, it is a "named link" now: 2 ft 6 in (762 mm). But OK, can do it. -
DePiep (
talk)
20:11, 24 December 2013 (UTC)|allk=on
now shows no name and no link. -
DePiep (
talk)
13:12, 26 December 2013 (UTC)For Chicago Tunnel Company#Construction {{RailGauge|14}} 14 instead of {{convert|14|in|mm|0|abbr=on}} 14 in (356 mm) Peter Horn User talk 01:33, 29 November 2013 (UTC)
Added: multiple suggestions, as entered in documentation page: [8]. These additions have been turned into requests here. All were added Jan/Feb by IPs. See #Notes about the process of these proposals below for process issues. - DePiep ( talk) 11:06, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|2.781 in
→ 2.781 in (70.69 mm) -- live|70.69 mm
→ 70.69 mm (2.781 in) -- live|2.781 in
→ 2.781 in (70.69 mm) -- sandbox|70.69 mm
→ 70.69 mm (2.781 in) -- sandbox|allk=on
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|allk=on
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|allk=on
60 in
can result in only one defined gauge measure output (in a mm/in pair), not two (mm/in pairs). Similar to original exact Brunel gauge, the historical one best be named like 5 ft exact
. That is, when sourced. Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
7 ft exact
= brunel. Source: ? Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Changes
[9] by IPs 180.199.41.157, 180.199.36.78
, 180.199.48.148
, 180.199.41.6
, 180.199.32.49
.
All requests were added by IPs in the documentation page, as edits. Of course, a change to the documentation does not change the template. This time I have turned the edits into full requests here, including conversion calculations etc. Next time, a change proposal must be written on this talkpage first (document changes this way will be reversed, beacause doc is for existing code, not requested code). Also, the unsourced notes and examples that were added must be sourced, or they will be deleted. They are tagged for this. - DePiep ( talk) 11:06, 27 February 2014 (UTC)
When the al or allk parameter is on, and especially when the RailGauge template is being used in an infobox, the "[name] gauge" output sometimes wraps (or breaks) in the middle (ie between "[name]" and "gauge"). See, eg, the infobox in Trams in Mainz, in which there is a wrap (or break) between "metre" and "gauge". A wrap (or break) at that point makes the overall output look much less attractive than a wrap (or break) between the figure and the "[name] gauge" portion would do. Could an administrator or template editor please therefore place the Template:Nowrap around the "[name] gauge" outputs that emerge when the al or allk parameter is on? Thanks in anticipation, Bahnfrend ( talk) 12:33, 21 January 2014 (UTC)
demo:
1435 | 1435 | 1435 | 1435 | 1435 |
-
DePiep (
talk) 20:09, 7 March 2014 (UTC)
Done. See
#Code and data change 07 March 2014. @
Bahnfrend:. -
DePiep (
talk)
20:49, 7 March 2014 (UTC)
I have been editing several articles over the past three months related to narrow gauge railways (mostly 36 gauge, 30 gauge, and 24 gauge) and making links for the rail gauges themselves to their relevant articles listing multiple railways using the same gauge. Below are examples of the links I have been adding on each individual page one-by-one:
36
30
24
Someone on my
talk page suggested that this work could be decreased if links to these article links appeared automatically simply by only typing the rail gauge template itself. Is this possible to do? If so, could this be done for some of the more common rail guages, such as the ones in the track gauge sidebar? Also, if this can be done, perhaps the less common gauges could simply be directed to the
List of track gauges article by default, and the very small ridable gauges (say, 500 mm and below, for example) could be directed to the
Ridable miniature railway article by default?
Jackdude101 (
Talk)
18:25, 16 February 2014 (UTC)
Links to be made this way:
Why not link all gauges this way, inclusing the named gauge:
- DePiep ( talk) 19:03, 27 February 2014 (UTC)
Done. See
#Code and data change 07 March 2014. @
Aaron-Tripel and
Jackdude101:. -
DePiep (
talk)
20:47, 7 March 2014 (UTC)
Oops! Yes, a bad effect of my changes. What happened? First some good news. I have added a new tracking category for all Bosnian/750mm/762mm gauges: they are listed in Category:Articles with template RailGauge that may need attention. So from there you all can check each and every article that mentions these gauges (through {RailGauge}). Also all those Cape/3ft6in/1067mm pages are listed, under 'Y'. So we can do a full check.
Code in article:
... [[750 mm gauge railways|{{RailGauge|750}}]] ...
Produces bad text now. Corrected:
... {{RailGauge|750|lk=on}} ...
OK?
This happens only in these kind of wikilinks. And in articles only, not categories or so. If this is a big problem, l'll have to switch that listing category off... - DePiep ( talk) 21:26, 7 March 2014 (UTC)
More requests:
Long list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
180.199.48.216 ( talk) 07:29, 5 March 2014 (UTC)
{{RailGauge/sandbox|1435mm|lk=on}}
→
1,435 mm (4 ft 8+1⁄2 in).These are the rules:
|lk=on
(when that gauge has a link defined)|allk=on
and those named gauge links. This table lists some candidates. Any suggestions? - DePiep ( talk) 19:08, 5 March 2014 (UTC)
nr | Input | mm | RailGauge | Target page | See also | Note |
---|---|---|---|---|---|---|
{{Template:RailGauge/testcases/check2|sg|nr=1|see also=[[standard gauge]]}} {{Template:RailGauge/testcases/check2|ussg|nr=2|see also=}} {{Template:RailGauge/testcases/check2|1m|nr=3|see also=}} {{Template:RailGauge/testcases/check2|600mm|nr=4|see also=}} {{Template:RailGauge/testcases/check2|610mm|nr=5|see also=}} {{Template:RailGauge/testcases/check2|2ft|nr=6|see also=}} {{Template:RailGauge/testcases/check2|2ft6in|nr=7|see also=}} {{Template:RailGauge/testcases/check2|3ft|nr=8|see also=}} {{Template:RailGauge/testcases/check2|39.375in|nr=9|see also=}} {{Template:RailGauge/testcases/check2|762mm|nr=10|see also=}} {{Template:RailGauge/testcases/check2|1067mm|nr=11|see also=3ft6in}} {{Template:RailGauge/testcases/check2|54in|nr=12|see also=[[Scotch gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|58in|nr=13|see also=[[Ohio gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1473mm|nr=14|see also=[[Ohio gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1495mm|nr=15|see also=[[Toronto gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|62.25in|nr=16|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1588mm|nr=17|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1600mm|nr=18|see also=[[Irish gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|63in|nr=19|see also=[[Irish gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|victorian|nr=20|see also=[[Victorian broad gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1676mm|nr=21|see also=[[Indian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|66in|nr=22|see also=[[Indian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1520mm|nr=23|see also=[[Russian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1668mm|nr=24|see also=[[Iberian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|2140mm|nr=25|see also=[[Brunel gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|84.25in|nr=26|see also=[[Brunel gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|750mm|nr=27|target=[[750 mm gauge railways]]|see also=}} {{Template:RailGauge/testcases/check2|29.5in|nr=28|target=[[750 mm gauge railways]]|see also=}} {{Template:RailGauge/testcases/check2|760mm|nr=29|target=[[760 mm gauge railways]]|see also=[[Bosnian gauge]] {{Hmmm|12}}|}} {{Template:RailGauge/testcases/check2|3ft6in|nr=30|see also=[[Cape gauge]] {{nay}}}} |
After sugestions by Jackdude101, Aaron-Tripel, section above. More sandbox effects are shown in RailGauge/doc/sandbox. - DePiep ( talk) 19:08, 5 March 2014 (UTC)
|allk=on
: 1,000 mm (3 ft 3+3⁄8 in)
metre gauge.|lk=on
to link the defined gauge to an article@ Jackdude101:@ Aaron-Tripel:.
A bad effect occured after this change in some situations. What happened? First some good news. I have added the new tracking category for all Bosnian/750mm/762mm gauges: they are listed in Category:Articles with template RailGauge that may need attention. So from there you all can check each and every article that mentions these gauges (through {RailGauge}). Also all those Cape/3ft6in/1067mm pages are listed, under 'Y'. So we can do a full check.
But then: When the {RailGAuge} template adds that category, it is first in the wikilink label (where the template sits). The Category-codetext disrupts the wikitext before being put at the bottom of the page.
Code in article:
... [[750 mm gauge railways|{{RailGauge|750}}]] ...
Produces bad text now. To correct:
... {{RailGauge|750|lk=on}} ...
OK? This happens only in these kind of wikilinks, and only in tracked articles (tracked gauges like 762mm; see category). If this is a big problem, I can switch that listing category off (remove it from the template). - DePiep ( talk) 21:39, 7 March 2014 (UTC)
|addcat=no
). -
DePiep (
talk)
14:35, 3 April 2014 (UTC)The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
nr | Done? | Input | mm | RailGauge | Target page | See also | Note |
---|---|---|---|---|---|---|---|
{{Template:RailGauge/testcases/check2|sg|nr=1|see also=[[standard gauge]]|done={{aye}}}} {{Template:RailGauge/testcases/check2|ussg|nr=2|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|1m|nr=3|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|600mm|nr=4|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|610mm|nr=5|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|2ft|nr=6|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|2ft6in|nr=7|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|3ft|nr=8|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|39.375in|nr=9|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|762mm|nr=10|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|1067mm|nr=11|see also=3ft6in|done={{aye}}}} {{Template:RailGauge/testcases/check2|54in|nr=12|see also=[[Scotch gauge]]|done=}} {{Template:RailGauge/testcases/check2|1372mm|nr=12b|see also=[[Scotch gauge]]|done=}} {{Template:RailGauge/testcases/check2|4ft10in|nr=13|see also=[[Ohio gauge]]}} {{Template:RailGauge/testcases/check2|1473mm|nr=14|see also=[[Ohio gauge]]}} {{Template:RailGauge/testcases/check2|1495mm|nr=15|see also=[[Toronto gauge]]}} {{Template:RailGauge/testcases/check2|62.25in|nr=16a|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}} - to track}} {{Template:RailGauge/testcases/check2|1581mm|nr=17a|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}} - to track}} {{Template:RailGauge/testcases/check2|62.5in|nr=16b|see also=[[Pennsylvanian trolley gauge]]}} {{Template:RailGauge/testcases/check2|1588mm|nr=17b|see also=[[Pennsylvanian trolley gauge]]}} {{Template:RailGauge/testcases/check2|1600mm|nr=18|see also=[[Irish gauge]]}} {{Template:RailGauge/testcases/check2|63in|nr=19|see also=[[Irish gauge]]}} {{Template:RailGauge/testcases/check2|victorian|nr=20|see also=[[Victorian broad gauge]]}} {{Template:RailGauge/testcases/check2|1676mm|nr=21|see also=[[Indian gauge]]}} {{Template:RailGauge/testcases/check2|66in|nr=22|see also=[[Indian gauge]]}} {{Template:RailGauge/testcases/check2|1668mm|nr=24|see also=[[Iberian gauge]]}} {{Template:RailGauge/testcases/check2|750mm|nr=27|target=[[750 mm gauge railways]]|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|29.5in|nr=28|target=[[750 mm gauge railways]]|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|760mm|nr=29|target=|see also=[[Bosnian gauge]]|done=}} {{Template:RailGauge/testcases/check2|3ft6in|nr=30|see also=[[Cape gauge]] {{nay}}|done={{aye}}}} {{Template:RailGauge/testcases/check2|914mm|nr=55a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|900mm|nr=55a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|891mm|nr=65c|target=|see also=Swedish 3 ft|done=}} {{Template:RailGauge/testcases/check2|1676mm|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|5ft6in|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|indian|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1445mm|nr=85a|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|950mm|nr=85b|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|700mm|nr=85c|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|58.875in|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|toronto|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1495mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|russian|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1524mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1520mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|5ft|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|Iberian|nr=90a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1664mm|nr=90a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1668mm|nr=90b|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1672mm|nr=90c|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|brunel|nr=101a|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|7ft0.25in|nr=101b|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|2140mm|nr=101c|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|7ft exact|nr=101a|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|3000mm|nr=31|target=breitsp|see also=|done=}} {{Template:RailGauge/testcases/check2|Baltimore|nr=Bmore|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1638mm|nr=Bmore|target=|see also=|done=No metric def}} {{Template:RailGauge/testcases/check2|5ft4.5in|nr=Bmore|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|15in|nr=15 in|target=[[Fifteen-inch gauge railway]]|see also=|done=}} {{Template:RailGauge/testcases/check2||nr=999|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|400 mm|nr=201|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|450 mm|nr=202|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|500 mm|nr=203|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|17in|nr=205|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|18in|nr=206|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|19in|nr=207|target=|see also=|done=}} |
- DePiep ( talk) 21:03, 8 March 2014 (UTC)
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
EUsg, UICsg, metsg, UKsg, impsg.
As always, A=a.|addcat=no
will skip the maintenance categorization. Allows code like:
1,435mm
In de collectie bevinden zich voertuigen met 350, ..., 550, ..., 620, ... mm spoorwijdte.
{{
cite web}}
: |first1=
missing |last1=
(
help); Missing pipe in: |first1=
(
help)CS1 maint: multiple names: authors list (
link) CS1 maint: numeric names: authors list (
link)
![]() | This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | Archive 2 | Archive 3 | Archive 4 | Archive 5 | Archive 6 | Archive 7 |
Hello all. I've just finished writing a Lua version of this template at Module:RailGauge. The gauge data is stored at Module:RailGauge/data and the test cases are at Module talk:RailGauge/testcases. (You need to ignore the big red crosses on the test cases page and check the actual output - it looks like this is a bug in Module:UnitTests rather than actual failed test cases.) I converted the data from the template code using Module:User:Mr. Stradivarius/RGConvert. The Lua version looks to be a lot quicker than the current template. I did a quick and very unscientific speed comparison by testing the all test cases in my sandbox, and MediaWiki processed the Lua version in 0.66 seconds, and the current template in 2.83 seconds. Please have a play around with it, and see if you find any errors. — Mr. Stradivarius ♪ talk ♪ 07:00, 31 July 2013 (UTC)
 
to encode spaces quite a few times, but in the module I've converted these to normal spaces, so there is a difference in the wikitext, but not one that should affect the output in any way. Similarly, I've also changed a few of the named gauge links, from e.g. [[Metre gauge|metre gauge]]
to [[metre gauge]]
, which makes the wikitext simpler but doesn't change the output. —
Mr. Stradivarius
♪ talk ♪
04:58, 1 August 2013 (UTC)
|first=imp
). -
DePiep (
talk)
12:38, 3 August 2013 (UTC)template -> module
crisp and clear. All target is testcases only. No personal "won't have any effect" edits please. Prove your thing as a pro. -
DePiep (
talk)
22:38, 1 August 2013 (UTC)1000mm
with |allk=on
|al=on
: a difference occurs. Old template overrules |al=
, module does not. The input is not consistent or regular, but can occur. -
DePiep (
talk)
14:46, 3 August 2013 (UTC)
if not data then
. Is arg[ 1 ]
trimmed, when used as catsort argument (%s
)? Note that we cannot test this categorisation outside mainspace. -
DePiep (
talk)
15:03, 3 August 2013 (UTC)
dataOverview
that takes the arg[1]
input and returns all data (in wikitable columns). Probably the Aliases per gauge will still make a cell-list as is today, not a separate row. Imp and met aliases sources
to point to the sources (as I have started recently for the scaled gauges). Another note
column should be for free use. I don't think the sources should be in data file, but free addition (there goes the loop?). Other columns: id(mm)-to-inch calculated (
Template:RailGauge/entry check could go, unless we want tech info out of sight from /doc readers). If a Named gauge option exists, it could be in a separate column (the wikitable is sortable of course), or the function could filter on this. You know what? Better set up a demo-table here. To be continued. -
DePiep (
talk)
13:37, 4 August 2013 (UTC)setup A, not supported by anyone anymore
| ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
id | dflt1 | aliases | name alias | returns | name link | mm-to-inch calculated | source | rounding & normalisation note | note |
---|---|---|---|---|---|---|---|---|---|
1435 | met | 1435 1435mm |
standard sg ... |
1,435 mm (4 ft 8+1⁄2 in) | standard gauge | 56.496 in | Standard gauge | ||
1435 | imp | 56.5in 4ft8.5in |
usstandard ussg ... |
4 ft 8+1⁄2 in (1,435 mm) | standard gauge | 56.496 in | Standard gauge | ||
406 | imp | 16in 16" 1ft4in 1'4" |
16 in (406 mm) | 15.984 in | |||||
1668 | met | 1668 1668mm 1.668m |
Iberian | 1,668 mm (5 ft 5+21⁄32 in) | Iberian gauge | 65.669 in |
|id=
too, which might make it easy to add notes unambiguously. -
DePiep (
talk)
14:48, 4 August 2013 (UTC)|1=
"? (basically very good for checking purposes; not for an editor reading the documentation). -
DePiep (
talk)
20:23, 11 August 2013 (UTC)Rail gauge pages can be categorised by size (and by country, separately and independently). See for example:
Category:Narrow gauge railways and
Category:3ft gauge railways. Such a category may be defined for a range of sizes (see text on the 3ft category page). The category names, especially the heavier used ones, are quite stable (I remember but currently cannot find a closed discussion that lead into general consensus).
Suggestion: we add to the template+data: option sizecat=on
that adds the correct (range) size category. It should be used only in topic pages (about a line with that gauge, pref in the infobox), not on overview pages like "Narrow gauges ...". -
DePiep (
talk)
13:58, 4 August 2013 (UTC)
|sizecat=on
)? -
DePiep (
talk)
19:46, 4 August 2013 (UTC)|lk=
Parameter |lk=on
sets the units (ft, in, mm, m) to wikilink. Recently, we (I) have added a check for pages that do so (see
maintenance cat, catsort:U). All article pages that showed up (~12?) were edited because it was overlinking (agree there are better ways to check this, e.g. a bot or AWB). Remaining pages are non-mainspace. Background: some 6 months ago I disentangeled the params |al=
, |allk=
and |lk=
in the template. They were confusingly interacting. Remaining is the overload of al
and allk
, but without conflict.
I propose: 1. Rename the parameter to be |unitlink=on
for clarity. It is and should be a very low-used option. 2. Old name not supported any more (linking is not a major target for the template). 3. rm from code the maintenance cat for this one lk=on
. 4. fwiw: current link
Foot (length) is an R to
Foot (unit). -
DePiep (
talk)
15:27, 4 August 2013 (UTC)
If I read code correct, check for error( 'Non-number mm value detected' )
in formatMet
can be in checkData
. -
DePiep (
talk)
14:22, 5 August 2013 (UTC)
As it is now, in _main
there is a loop to find if alias == searchKey
. I wonder, is thare not a slolution that targets the alias straight away, say id = data.alias([searchKey])
. It seems simple that a try for data.alias([searchKey]) would give a hit or not. How to get to the id for that alias's single data set I cannot suggest. -
DePiep (
talk)
14:34, 5 August 2013 (UTC)
{
"id" = "1435",
"aliases" = { "1435" = true, "1435mm" = true, "sg" = true, "standard" = true },
"name" = "standard gauge",
"link" = "[[standard gauge]]",
"dflt1" = "met",
"mm" = "1435",
"ft" = "4",
"in" = "8",
"num" = "1",
"den" = "2"
},
local data
for i, t in ipairs( gaugeData ) do
if t.aliases searchKey then
data = t
end
end
for
loops. I'm not sure if changing this would have an appreciable effect on performance though. If you're interested in reading about Lua performance, then
this seems to be the most widely-read paper on the subject. I did have a look for something comparing performance of pairs()
and ipairs()
to direct table lookup, but I couldn't find anything specific. —
Mr. Stradivarius
♪ talk ♪
15:17, 5 August 2013 (UTC)
I've added a checkData check to detect unwanted whitespace from the /data subpage values. It detects whitespace surrounding the name
and link
values, and whitespace anywhere in the other values. —
Mr. Stradivarius
♪ talk ♪
16:32, 5 August 2013 (UTC)
I've changed the search key whitespace trimming so that it trims all whitespace, rather than just spaces. For example, this code now works:
Code | Main | Sandbox |
---|---|---|
{{RailGauge|1 m}} |
1,000 mm (3 ft 3+3⁄8 in) | 1,000 mm (3 ft 3+3⁄8 in) |
— Mr. Stradivarius ♪ talk ♪ 16:49, 5 August 2013 (UTC)
It appears that the next rules are only implicit.
dflt1
definition. If input is in imperial, imp will be the dflt1
.|first=met
of course. Make it an explicit rule (document)? No code change (or in dataCheck).|1=Victorian
→ 1,600 mm (5 ft 3 in)
Victorian broad gauge.Are there situations where accepted metric input does not match id? What would that mean? - DePiep ( talk) 21:38, 13 August 2013 (UTC)
I'd like to have the option to have the id
returned when entering a gauge. Also, secundary, the input's first could be usefull, and adding the name id ("Victorian") would make the identification complete. (input id = {mm, first, name}) -
DePiep (
talk)
21:44, 13 August 2013 (UTC)
I entered twice a unit name: ["id"]=10, ["id"]=11
(in the same id). Wrong by fact, worth checking? -
DePiep (
talk)
02:07, 3 September 2013 (UTC)
As the greatest usage of this template is as ussg, is there some reason it has to display the fractional half as a superscript 1 / subscript 2 rather than just ½? It looks ugly on the page and forces non-standard line spacing before and after. Afterbrunel ( talk) 08:47, 24 September 2013 (UTC)
![]() | This
edit request has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
DePiep ( talk) 17:24, 8 October 2013 (UTC)
For Track gauge#Broad gauge make {{RailGauge|7ft}}, 7 ft (2,134 mm) read like 7 ft 0 in (2,134 mm) or 7 ft (2,134 mm), and thus distinguish it from {{RailGauge|84.25}}, 84.25 Peter Horn User talk 01:24, 13 September 2013 (UTC)
I reorganised gauges: 8200mm, 8ft, 1850mm, 68in sourced by Peter Horn. - DePiep ( talk) 00:06, 3 September 2013 (UTC), adding 86in: - DePiep ( talk) 21:51, 4 September 2013 (UTC)
List of entries, over 2in, that are not by 1⁄32 units:
See below, here for overview:
Concluding, we can say & propose:
15.25in
39.3in
For List of track gauges#Broad gauge 1,980 mm (6 ft 6 in) 1,945 mm (6 ft 4+9⁄16 in) 1,750 mm (5 ft 8+7⁄8 in) 1,672 mm (5 ft 5+13⁄16 in) and others to come. Peter Horn User talk 18:17, 15 October 2013 (UTC)
Peter Horn User talk 17:59, 18 October 2013 (UTC) Peter Horn User talk 00:39, 21 October 2013 (UTC)
For Santos tramways, and the articles linked to it, 1350 Santos The Tramways of Santos Retrieved on 26 June 2008. Peter Horn User talk 03:32, 18 October 2013 (UTC)
Peter Horn User talk 18:07, 18 October 2013 (UTC) .
- DePiep ( talk) 19:32, 25 October 2013 (UTC)
{{RailGauge|1350mm}}
(good) for gauges. That way the page is listed in the category, and so can be found, checked and corrected when the new gauge is in. The same for conversions like {{RailGauge|1350mm {{convert|1350mm|...}}}}
(good) and questions {{RailgGauge|1013 mm (disputed)}}
(good): these are listed in the tracking category and so can be addressed later.The article metre gauge mentions a temporary gauge of 1,013 mm (3 ft 3.88 in) (3+7⁄8) in {{RailGauge|1013mm}} for the Sofia Tramway Peter Horn User talk 01:55, 1 November 2013 (UTC)
Added to template: 2.781in, 70.64/70.69mm, 1009mm=metre, 1350mm -
DePiep (
talk)
15:18, 12 November 2013 (UTC)
|alllk=on
?What should be the output for |bosnian
and |760mm
input? There seems to be a connection with 2 ft 6 in (762 mm), but there is also a ~2 millimetres (0.079 in) (~1⁄32 in) difference. -
DePiep (
talk)
12:02, 14 December 2013 (UTC)
I'd like to hear from Aaron-Tripel. Full title is too long to use inline. - DePiep ( talk) 19:34, 24 December 2013 (UTC)
|allk=on
? I mean, it is a "named link" now: 2 ft 6 in (762 mm). But OK, can do it. -
DePiep (
talk)
20:11, 24 December 2013 (UTC)|allk=on
now shows no name and no link. -
DePiep (
talk)
13:12, 26 December 2013 (UTC)For Chicago Tunnel Company#Construction {{RailGauge|14}} 14 instead of {{convert|14|in|mm|0|abbr=on}} 14 in (356 mm) Peter Horn User talk 01:33, 29 November 2013 (UTC)
Added: multiple suggestions, as entered in documentation page: [8]. These additions have been turned into requests here. All were added Jan/Feb by IPs. See #Notes about the process of these proposals below for process issues. - DePiep ( talk) 11:06, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|2.781 in
→ 2.781 in (70.69 mm) -- live|70.69 mm
→ 70.69 mm (2.781 in) -- live|2.781 in
→ 2.781 in (70.69 mm) -- sandbox|70.69 mm
→ 70.69 mm (2.781 in) -- sandbox|allk=on
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|allk=on
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
|allk=on
60 in
can result in only one defined gauge measure output (in a mm/in pair), not two (mm/in pairs). Similar to original exact Brunel gauge, the historical one best be named like 5 ft exact
. That is, when sourced. Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
7 ft exact
= brunel. Source: ? Needs source. -
DePiep (
talk)
11:54, 27 February 2014 (UTC)
Changes
[9] by IPs 180.199.41.157, 180.199.36.78
, 180.199.48.148
, 180.199.41.6
, 180.199.32.49
.
All requests were added by IPs in the documentation page, as edits. Of course, a change to the documentation does not change the template. This time I have turned the edits into full requests here, including conversion calculations etc. Next time, a change proposal must be written on this talkpage first (document changes this way will be reversed, beacause doc is for existing code, not requested code). Also, the unsourced notes and examples that were added must be sourced, or they will be deleted. They are tagged for this. - DePiep ( talk) 11:06, 27 February 2014 (UTC)
When the al or allk parameter is on, and especially when the RailGauge template is being used in an infobox, the "[name] gauge" output sometimes wraps (or breaks) in the middle (ie between "[name]" and "gauge"). See, eg, the infobox in Trams in Mainz, in which there is a wrap (or break) between "metre" and "gauge". A wrap (or break) at that point makes the overall output look much less attractive than a wrap (or break) between the figure and the "[name] gauge" portion would do. Could an administrator or template editor please therefore place the Template:Nowrap around the "[name] gauge" outputs that emerge when the al or allk parameter is on? Thanks in anticipation, Bahnfrend ( talk) 12:33, 21 January 2014 (UTC)
demo:
1435 | 1435 | 1435 | 1435 | 1435 |
-
DePiep (
talk) 20:09, 7 March 2014 (UTC)
Done. See
#Code and data change 07 March 2014. @
Bahnfrend:. -
DePiep (
talk)
20:49, 7 March 2014 (UTC)
I have been editing several articles over the past three months related to narrow gauge railways (mostly 36 gauge, 30 gauge, and 24 gauge) and making links for the rail gauges themselves to their relevant articles listing multiple railways using the same gauge. Below are examples of the links I have been adding on each individual page one-by-one:
36
30
24
Someone on my
talk page suggested that this work could be decreased if links to these article links appeared automatically simply by only typing the rail gauge template itself. Is this possible to do? If so, could this be done for some of the more common rail guages, such as the ones in the track gauge sidebar? Also, if this can be done, perhaps the less common gauges could simply be directed to the
List of track gauges article by default, and the very small ridable gauges (say, 500 mm and below, for example) could be directed to the
Ridable miniature railway article by default?
Jackdude101 (
Talk)
18:25, 16 February 2014 (UTC)
Links to be made this way:
Why not link all gauges this way, inclusing the named gauge:
- DePiep ( talk) 19:03, 27 February 2014 (UTC)
Done. See
#Code and data change 07 March 2014. @
Aaron-Tripel and
Jackdude101:. -
DePiep (
talk)
20:47, 7 March 2014 (UTC)
Oops! Yes, a bad effect of my changes. What happened? First some good news. I have added a new tracking category for all Bosnian/750mm/762mm gauges: they are listed in Category:Articles with template RailGauge that may need attention. So from there you all can check each and every article that mentions these gauges (through {RailGauge}). Also all those Cape/3ft6in/1067mm pages are listed, under 'Y'. So we can do a full check.
Code in article:
... [[750 mm gauge railways|{{RailGauge|750}}]] ...
Produces bad text now. Corrected:
... {{RailGauge|750|lk=on}} ...
OK?
This happens only in these kind of wikilinks. And in articles only, not categories or so. If this is a big problem, l'll have to switch that listing category off... - DePiep ( talk) 21:26, 7 March 2014 (UTC)
More requests:
Long list
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
180.199.48.216 ( talk) 07:29, 5 March 2014 (UTC)
{{RailGauge/sandbox|1435mm|lk=on}}
→
1,435 mm (4 ft 8+1⁄2 in).These are the rules:
|lk=on
(when that gauge has a link defined)|allk=on
and those named gauge links. This table lists some candidates. Any suggestions? - DePiep ( talk) 19:08, 5 March 2014 (UTC)
nr | Input | mm | RailGauge | Target page | See also | Note |
---|---|---|---|---|---|---|
{{Template:RailGauge/testcases/check2|sg|nr=1|see also=[[standard gauge]]}} {{Template:RailGauge/testcases/check2|ussg|nr=2|see also=}} {{Template:RailGauge/testcases/check2|1m|nr=3|see also=}} {{Template:RailGauge/testcases/check2|600mm|nr=4|see also=}} {{Template:RailGauge/testcases/check2|610mm|nr=5|see also=}} {{Template:RailGauge/testcases/check2|2ft|nr=6|see also=}} {{Template:RailGauge/testcases/check2|2ft6in|nr=7|see also=}} {{Template:RailGauge/testcases/check2|3ft|nr=8|see also=}} {{Template:RailGauge/testcases/check2|39.375in|nr=9|see also=}} {{Template:RailGauge/testcases/check2|762mm|nr=10|see also=}} {{Template:RailGauge/testcases/check2|1067mm|nr=11|see also=3ft6in}} {{Template:RailGauge/testcases/check2|54in|nr=12|see also=[[Scotch gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|58in|nr=13|see also=[[Ohio gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1473mm|nr=14|see also=[[Ohio gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1495mm|nr=15|see also=[[Toronto gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|62.25in|nr=16|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1588mm|nr=17|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1600mm|nr=18|see also=[[Irish gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|63in|nr=19|see also=[[Irish gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|victorian|nr=20|see also=[[Victorian broad gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1676mm|nr=21|see also=[[Indian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|66in|nr=22|see also=[[Indian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1520mm|nr=23|see also=[[Russian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|1668mm|nr=24|see also=[[Iberian gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|2140mm|nr=25|see also=[[Brunel gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|84.25in|nr=26|see also=[[Brunel gauge]]{{Hmmm|12}}}} {{Template:RailGauge/testcases/check2|750mm|nr=27|target=[[750 mm gauge railways]]|see also=}} {{Template:RailGauge/testcases/check2|29.5in|nr=28|target=[[750 mm gauge railways]]|see also=}} {{Template:RailGauge/testcases/check2|760mm|nr=29|target=[[760 mm gauge railways]]|see also=[[Bosnian gauge]] {{Hmmm|12}}|}} {{Template:RailGauge/testcases/check2|3ft6in|nr=30|see also=[[Cape gauge]] {{nay}}}} |
After sugestions by Jackdude101, Aaron-Tripel, section above. More sandbox effects are shown in RailGauge/doc/sandbox. - DePiep ( talk) 19:08, 5 March 2014 (UTC)
|allk=on
: 1,000 mm (3 ft 3+3⁄8 in)
metre gauge.|lk=on
to link the defined gauge to an article@ Jackdude101:@ Aaron-Tripel:.
A bad effect occured after this change in some situations. What happened? First some good news. I have added the new tracking category for all Bosnian/750mm/762mm gauges: they are listed in Category:Articles with template RailGauge that may need attention. So from there you all can check each and every article that mentions these gauges (through {RailGauge}). Also all those Cape/3ft6in/1067mm pages are listed, under 'Y'. So we can do a full check.
But then: When the {RailGAuge} template adds that category, it is first in the wikilink label (where the template sits). The Category-codetext disrupts the wikitext before being put at the bottom of the page.
Code in article:
... [[750 mm gauge railways|{{RailGauge|750}}]] ...
Produces bad text now. To correct:
... {{RailGauge|750|lk=on}} ...
OK? This happens only in these kind of wikilinks, and only in tracked articles (tracked gauges like 762mm; see category). If this is a big problem, I can switch that listing category off (remove it from the template). - DePiep ( talk) 21:39, 7 March 2014 (UTC)
|addcat=no
). -
DePiep (
talk)
14:35, 3 April 2014 (UTC)The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
nr | Done? | Input | mm | RailGauge | Target page | See also | Note |
---|---|---|---|---|---|---|---|
{{Template:RailGauge/testcases/check2|sg|nr=1|see also=[[standard gauge]]|done={{aye}}}} {{Template:RailGauge/testcases/check2|ussg|nr=2|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|1m|nr=3|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|600mm|nr=4|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|610mm|nr=5|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|2ft|nr=6|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|2ft6in|nr=7|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|3ft|nr=8|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|39.375in|nr=9|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|762mm|nr=10|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|1067mm|nr=11|see also=3ft6in|done={{aye}}}} {{Template:RailGauge/testcases/check2|54in|nr=12|see also=[[Scotch gauge]]|done=}} {{Template:RailGauge/testcases/check2|1372mm|nr=12b|see also=[[Scotch gauge]]|done=}} {{Template:RailGauge/testcases/check2|4ft10in|nr=13|see also=[[Ohio gauge]]}} {{Template:RailGauge/testcases/check2|1473mm|nr=14|see also=[[Ohio gauge]]}} {{Template:RailGauge/testcases/check2|1495mm|nr=15|see also=[[Toronto gauge]]}} {{Template:RailGauge/testcases/check2|62.25in|nr=16a|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}} - to track}} {{Template:RailGauge/testcases/check2|1581mm|nr=17a|see also=[[Pennsylvanian trolley gauge]]{{Hmmm|12}} - to track}} {{Template:RailGauge/testcases/check2|62.5in|nr=16b|see also=[[Pennsylvanian trolley gauge]]}} {{Template:RailGauge/testcases/check2|1588mm|nr=17b|see also=[[Pennsylvanian trolley gauge]]}} {{Template:RailGauge/testcases/check2|1600mm|nr=18|see also=[[Irish gauge]]}} {{Template:RailGauge/testcases/check2|63in|nr=19|see also=[[Irish gauge]]}} {{Template:RailGauge/testcases/check2|victorian|nr=20|see also=[[Victorian broad gauge]]}} {{Template:RailGauge/testcases/check2|1676mm|nr=21|see also=[[Indian gauge]]}} {{Template:RailGauge/testcases/check2|66in|nr=22|see also=[[Indian gauge]]}} {{Template:RailGauge/testcases/check2|1668mm|nr=24|see also=[[Iberian gauge]]}} {{Template:RailGauge/testcases/check2|750mm|nr=27|target=[[750 mm gauge railways]]|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|29.5in|nr=28|target=[[750 mm gauge railways]]|see also=|done={{aye}}}} {{Template:RailGauge/testcases/check2|760mm|nr=29|target=|see also=[[Bosnian gauge]]|done=}} {{Template:RailGauge/testcases/check2|3ft6in|nr=30|see also=[[Cape gauge]] {{nay}}|done={{aye}}}} {{Template:RailGauge/testcases/check2|914mm|nr=55a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|900mm|nr=55a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|891mm|nr=65c|target=|see also=Swedish 3 ft|done=}} {{Template:RailGauge/testcases/check2|1676mm|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|5ft6in|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|indian|nr=77a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1445mm|nr=85a|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|950mm|nr=85b|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|700mm|nr=85c|target=it|see also=|done=No 'Italian' definition}} {{Template:RailGauge/testcases/check2|58.875in|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|toronto|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1495mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|russian|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1524mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1520mm|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|5ft|nr=88a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|Iberian|nr=90a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1664mm|nr=90a|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1668mm|nr=90b|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1672mm|nr=90c|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|brunel|nr=101a|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|7ft0.25in|nr=101b|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|2140mm|nr=101c|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|7ft exact|nr=101a|target=brunel|see also=|done=}} {{Template:RailGauge/testcases/check2|3000mm|nr=31|target=breitsp|see also=|done=}} {{Template:RailGauge/testcases/check2|Baltimore|nr=Bmore|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|1638mm|nr=Bmore|target=|see also=|done=No metric def}} {{Template:RailGauge/testcases/check2|5ft4.5in|nr=Bmore|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|15in|nr=15 in|target=[[Fifteen-inch gauge railway]]|see also=|done=}} {{Template:RailGauge/testcases/check2||nr=999|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|400 mm|nr=201|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|450 mm|nr=202|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|500 mm|nr=203|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|17in|nr=205|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|18in|nr=206|target=|see also=|done=}} {{Template:RailGauge/testcases/check2|19in|nr=207|target=|see also=|done=}} |
- DePiep ( talk) 21:03, 8 March 2014 (UTC)
The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.
EUsg, UICsg, metsg, UKsg, impsg.
As always, A=a.|addcat=no
will skip the maintenance categorization. Allows code like:
1,435mm
In de collectie bevinden zich voertuigen met 350, ..., 550, ..., 620, ... mm spoorwijdte.
{{
cite web}}
: |first1=
missing |last1=
(
help); Missing pipe in: |first1=
(
help)CS1 maint: multiple names: authors list (
link) CS1 maint: numeric names: authors list (
link)