Template talk:Track gauge

Latest comment: 1 month ago by Oreocooke in topic 650mm

Unexpected effects

edit

I found this, not sure if it has to do with TemplateStyles etc. Article Great Western Railway uses {{Infobox GWR}}, {{Track gauge}} and {{Convert}}.

It has template output like:
  • {{Track gauge|uksg}} (in lede)
expct: 4 ft 8+12 in (1,435 mm)
shows: 4 ft 8+½ in (1,435 mm)
  • {{Convert|11+1/2|mi|km|0|adj=on}} section (in body)
expct: 11+12-mile (19 km) section
shows: 11+½-mile (19 km) section
That is: the "+" and "½" (fraction character) are unexpected. This also happens within {{Infobox GWR}}.

Research & reproduce: I found that when {{Infobox GWR}} is removed (absent), the output is regular. To reproduce: in Special:ExpandTemplates put the lede (and the {{Convert}} code from body), and check with/without {{Infobox GWR}}.

This is as far as I could get. Has to do with TS? @Izno: -DePiep (talk) 09:52, 17 May 2021 (UTC)Reply

This is due to the specific template first using this module when the module is wrapping the gauge in a link and is fundamentally this issue. Let me see if I can fix it here. Izno (talk) 15:10, 17 May 2021 (UTC)Reply
The issue is in formatImp. I think I can do a limited fix though I hate that I must do it the way in question. Let me tweak the sandbox. Izno (talk) 15:17, 17 May 2021 (UTC)Reply
First fix works. I will see if I like one of the other solutions I was thinking about. Izno (talk) 15:32, 17 May 2021 (UTC)Reply
I think I do prefer this version. Please feel free to sync as desired. Izno (talk) 15:49, 17 May 2021 (UTC)Reply
Test #1. Basic input options look fine, using Module:Track gauge/sandbox: see Template:Track_gauge/testcases#All Green tick. -DePiep (talk) 21:23, 17 May 2021 (UTC)Reply
Test #2: Article Great Western Railway with {{Track gauge/sandbox}}, also in {{Infobox GWR/sandbox}}. OK in preview. Green tick. -DePiep (talk) 21:38, 17 May 2021 (UTC)Reply
OK. Edit request: Please someone put all code Module:Track gauge/sandbox into Module:Track gauge (diff). -DePiep (talk) 21:38, 17 May 2021 (UTC)Reply

Recurring bug

edit
@DePiep: I'm still seeing the + (but not the fraction character) at Track gauge#Early track gauges ("the Dundee and Newtyle Railway (1831) in the north-east of Scotland adopted 4 ft 6+1⁄2 in (1,384 mm)"). The correct output appears in preview. Hairy Dude (talk) 12:48, 24 August 2021 (UTC)Reply
@Hairy Dude:. OK here. Did you try to Purge the article (=click on clock topright on the page)? (Could be you have an old version in the cache). Anyway, I have made a minor edit, so the article should reload anyway. OK now? -DePiep (talk) 12:55, 24 August 2021 (UTC)Reply
That was the first thing I tried after I saw the preview was correct. And I also made a minor edit to check. Are you not seeing it? Maybe it's some quirk of the mobile interface. Hairy Dude (talk) 13:04, 24 August 2021 (UTC)Reply
ah, mobile. Yes wrong on my mobile device too. Don't know from here. -DePiep (talk) 18:47, 24 August 2021 (UTC)Reply
  • Izno, could you take a look?
In mobile view, Track gauge#Early track gauges using {{Track gauge|4ft6.5in}} shows the "+"-sign in a fraction. -DePiep (talk) 11:02, 11 September 2021 (UTC)Reply
This change should work around it. Izno (talk) 13:22, 11 September 2021 (UTC)Reply
Coming back two years later, I'm still seeing these pluses at Track gauge. Hairy Dude (talk) 13:00, 21 August 2023 (UTC)Reply
And another year and a half: it's still happening, on the desktop version of Beer Heights Light Railway. @Izno's work-around fixes it. Bazza 7 (talk) 11:38, 10 February 2025 (UTC)Reply
@Bazza 7 it should not be necessary there. Infoboxes are not impacted by this issue. And actually, sidebars should not be impacted by this issue these days either, as they have special code that goes and finds the relevant tags. Izno (talk) 21:45, 10 February 2025 (UTC)Reply
The actual issue is that you (general) put {{RailGauge}} inside a link, which is due to a different interaction with the parsing software, see phab:T200704. If you want to link a rail gauge, please use the appropriate option |lk=on. Izno (talk) 21:48, 10 February 2025 (UTC)Reply
@Izno: Thanks for the explanation. I didn't code that part of the article but came across it in passing. The error appeared in the main article text as well as the info box, which is what made me think the fault still existed. Thanks for correcting the article. Regards, Bazza 7 (talk) 22:08, 10 February 2025 (UTC)Reply

Template-protected edit request on 21 August 2024

edit

Please change the link for the 1432 mm gauge to Standard-gauge railway#Modern almost standard gauge railways instead of the current Track gauge in Hong Kong. Hong Kong is not the only place with that gauge. Ita140188 (talk) 13:04, 21 August 2024 (UTC)Reply

 Completed. P.I. Ellsworth, ed. put'er there 17:17, 2 September 2024 (UTC)Reply

A missed track gauge

edit

Something amiss/does not match

edit

Another missed track gauge

edit

Template-protected edit request on 16 March 2026

edit

references are made to 3 ft 8 in street railways in the Untied States. This size should be added. MJ (talk) 06:13, 16 March 2026 (UTC)Reply

@Mjdestroyerofworlds: References are made where? Bazza 7 (talk) 12:16, 16 March 2026 (UTC)Reply
see:[1][2][3]

References

  1. "Street Railways in the United States & Canada" (PDF). Street Railway Journal. Vol. III, no. 14. American Railway Publishing Company. December 1887. pp. 1064–1084. Retrieved 4 August 2025.
  2. "Trolley Days". The Argus Brightside. Fremont, California. July 24, 1977. p. 7. Retrieved 16 March 2026 via Newspapers.com.
  3. "Novelties in the Realms of Science Literature and Art". The San Francisco Call. San Francisco, California. February 23, 1896. p. 25. Retrieved 16 March 2026 via Newspapers.com.

-MJ (talk) 14:09, 16 March 2026 (UTC)Reply

 Not done: it's not clear what changes you want made. Please detail the specific changes in a "change X to Y" format and provide a reliable source if appropriate. Zackmann (Talk to me/What I been doing) 14:14, 16 March 2026 (UTC)Reply
ok - change Module:Track gauge/data to include
{
	["full-id"] = "1118-imp",
	["id"] = "1118",
	["aliases"] = {[[44in]], [[3ft8in]]},
	["def1"] = "imp",
	["contentcat"] = "3 ft 8 in gauge railways"
	["mm"] = "1118",
	["ft"] = "3",
	["in"] = "8",
},

and see above for references to said gauge. -MJ (talk) 17:04, 16 March 2026 (UTC)Reply

 Done * Pppery * it has begun... 16:33, 26 March 2026 (UTC)Reply

650mm

edit

650mm is not in the list of defined track gauges, but it is in List of track gauges, and used (e.g. O scale). I believe it should be added. User "Oreocooke" (speak of the sun and it shines) 17:36, 11 May 2026 (UTC)Reply