Jump to content

Template talk:Routemap: Difference between revisions

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Content deleted Content added
→‎navbar pos: new section
Line 65: Line 65:
== navbar pos ==
== navbar pos ==


Document states: ''Position of the Navbar template. Float to left in the title bar by default; «1» for top-right corner of the map (just under the title bar); «2» for the middle bottom of the map''. However it's appearing on the top-''left'' instead of right. Is the doc wrong, or is that a bug? [[Special:Contributions/2401:7400:C80B:E643:3438:40F6:CECE:CCD5|2401:7400:C80B:E643:3438:40F6:CECE:CCD5]] ([[User talk:2401:7400:C80B:E643:3438:40F6:CECE:CCD5|talk]]) 05:06, 1 March 2023 (UTC)
Document states: ''Position of the Navbar template. Float to left in the title bar by default; «1» for top-right corner of the map (just under the title bar); «2» for the middle bottom of the map''. However for «1», it's appearing on the top-''left'' instead of right. Is the doc wrong, or is that a bug? [[Special:Contributions/2401:7400:C80B:E643:3438:40F6:CECE:CCD5|2401:7400:C80B:E643:3438:40F6:CECE:CCD5]] ([[User talk:2401:7400:C80B:E643:3438:40F6:CECE:CCD5|talk]]) 05:06, 1 March 2023 (UTC)

Revision as of 05:06, 1 March 2023

WikiProject iconTrains Template‑class
WikiProject iconThis template is within the scope of WikiProject Trains, an attempt to build a comprehensive and detailed guide to rail transport on Wikipedia. If you would like to participate, you can visit the project page, where you can join the project and/or contribute to the discussion. See also: WikiProject Trains to do list and the Trains Portal.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Template-protected edit request on August 25 2020

Jc86035: please add kilometres as an input option for {{BScvt}}. Also, it would be nice if proper comma formatting (0,000) was included for numbers greater than 999. Thank you. AlgaeGraphix (talk) 22:21, 25 August 2020 (UTC)[reply]

That template already accepts km as an input. See the second example in the table on the template's documentation page. – Jonesey95 (talk) 22:36, 25 August 2020 (UTC)[reply]
I don't know enough Lua to implement the second request, but there is a possibly useful example at http://lua-users.org/wiki/FormattingNumbers. – Jonesey95 (talk) 22:41, 25 August 2020 (UTC)[reply]

Disabled request. Once the necessary code has been written and tested, it may be reactivated. — Martin (MSGJ · talk) 14:25, 9 September 2020 (UTC)[reply]

@MSGJ: You are most unhelpful. If I was a Lua programmer, I wouldn't have to ask someone else to make the changes. AlgaeGraphix (talk) 03:19, 26 September 2020 (UTC)[reply]
AlgaeGraphix, what exactly are you trying to do? {{BScvt|1.40}} produces:
1.40 mi
2.25 km
(miles -> km). If you want km -> miles, {{BScvt|1.40|x}} produces
1.40 km
0.87 mi
(1.4 km -> miles). ProcrastinatingReader (talk) 00:32, 27 September 2020 (UTC)[reply]
@ProcrastinatingReader: I'd like to see proper formatting for numbers greater than 999, so that {{BScvt|1000}} produces
1,000 mi
1,609 km
instead of
1000 mi
1609 km
. AlgaeGraphix (talk) 12:39, 27 September 2020 (UTC)[reply]
Okay, I'll ping @Jc86035: to see if they can help, as the maintainer of this module. @Johnuniq: may also be able to help, as perhaps this module can just call the functions in Module:Convert to do this? You can also make a request at WT:LUA. Regular reviewers of TPERs are unlikely to be able to help further -- edit requests are generally used for 'code review' of already written changes in sandboxes, or for minor changes. ProcrastinatingReader (talk) 13:18, 27 September 2020 (UTC)[reply]
Options include Module:Formatnum or Module:Math#precision_format or Module:Gapnum or some Q&D code to handle small numbers (<= 999,999). I've been head-spinning over at Commons lately and don't have the energy to look at this at the moment but maybe later if needed. Any work would involve mucking around in the base function which is completely opaque and which should use a table to pass the optional parameters. I would not use convert—first of all, it was one of the first modules and does not provide access to its internals, and second, it is a lot of overhead for a comma. Johnuniq (talk) 05:04, 28 September 2020 (UTC)[reply]
@AlgaeGraphix, Jonesey95, MSGJ, ProcrastinatingReader, and Johnuniq: I've hacked the base function that deals with BScvt to use formatted numbers when the new parameter |numfmt= is set to comma (it just needed a local function to call the mw.language :formatNumber method). It seems to work for {{BScvt/sandbox}} but I'd recommend asking someone more familiar with routemapping to try it out with several edge-cases before thinking of implementing it in the main module.
  • {{BScvt/sandbox|1000|numfmt=comma}}
    1000 mi
    1609 km
Similarly, the functionality could be implemented in any of the other calls/templates that the module deals with, if there's a demand for it. Cheers --RexxS (talk) 15:32, 28 September 2020 (UTC)[reply]
Very good, I forgot about the mw formatNum. Johnuniq (talk) 01:53, 29 September 2020 (UTC)[reply]

{{BSsplit}} on left side breaks alignment in mobile view

Having {{rint}} and {{BSsplit}} on the left side of the route diagram breaks alignment on mobile view (works fine on Desktop). Example: {{rint|sanfrancisco|metro}}~~{{BSsplit|{{munis|Market and Main}} /|{{munis|Market and Drumm}}}}~~! !udINTACC\d\udHSTACC~~ ~~{{munis|The Embarcadero and Brannan}}

Market and Main /
Market and Drumm
The Embarcadero and Brannan

Not sure if this is fixable 132.147.87.52 (talk) 00:57, 27 June 2021 (UTC)[reply]

This looks fine to me in mobile view on Firefox for Mac OS. Can you post a screen shot? What app or browser are you using, on what OS? – Jonesey95 (talk) 14:42, 27 June 2021 (UTC)[reply]
Safari on iPhone iOS 14.6. How can I post a screenshot?132.147.87.52 (talk) 04:45, 28 June 2021 (UTC)[reply]
Link to screenshot: https://ibb.co/Bz8tj52 132.147.87.52 (talk) 05:04, 28 June 2021 (UTC)[reply]
Same (or similar) happens with Chrome on Android [text on LHS overlaps symbols]. --John Maynard Friedman (talk) 11:23, 28 June 2021 (UTC)[reply]
I can't tell what kind of bug that is, but I worked around it in a somewhat hacky way with |align=left. See the updated version of {{Muni Heritage}}. It's still not ideal. – Jonesey95 (talk) 15:30, 28 June 2021 (UTC)[reply]
Looks like it has nothing to do with {{rint}}. Any text on the left of {{BSsplit}} will break it: Text {{BSsplit|{{munis|Market and Main}} /|{{munis|Market and Drumm}}}}~~! !udINTACC\d\udHSTACC~~ ~~{{munis|The Embarcadero and Brannan}} 132.147.87.52 (talk) 00:45, 29 June 2021 (UTC)[reply]
Pinging JJMC89, Jc86035 & Sameboat who maintain the {{Routemap}} template & Lua module. AlgaeGraphix (talk) 00:49, 30 June 2021 (UTC)[reply]
Seems does not impact left side only. Same issue on the right side. Example code: d\\uextACC\\uextSTRc1\uextSTRl+4\uextSTRq\uxtKRZq2+4tu\uextINTACCq\uextdCONTfq~~ ~~ ~~{{SMRT color icon|te}}''{{BSto|[[Thomson–East Coast MRT line]]|to {{mrts|Gardens by the Bay}}}}''{{SMRT code|TE|20}} Screenshot: https://ibb.co/9vbCfLx 138.75.157.61 (talk) 13:18, 18 July 2021 (UTC)[reply]
align=left doesn't quite work either, though it is an improvement in that the words just overwrite the line rather than each other: see "to Oxford" at bottom left of {{Milton Keynes railway map}}. (Using Chrome on Android).--John Maynard Friedman (talk) 17:19, 18 July 2021 (UTC)[reply]

New name for BSsplit template when used with Routemap

I have just given a new name for this template (when used with Routemap):

Let's see if it takes use or if it is better that the name remains as it is.
ZandDev (talk) 10:49, 1 September 2021 (UTC)[reply]

@ZandDev: What? This template is Routemap, why would you use it with itself? --Redrose64 🌹 (talk) 19:38, 1 September 2021 (UTC)[reply]
@Redrose64: Ops I refer to BSsplit template ZandDev (talk) 20:57, 1 September 2021 (UTC)[reply]

double-U halved

Please see {{Suez Canal map}}. In the third row, there is text "W" and "E" (for West and East entrance). The "W" is half hidden under the following icon. Can someone move that letter to the left to make it visible? Or, if necessary, completely to the right of its following icon. Thanks. -DePiep (talk)

Document states: Position of the Navbar template. Float to left in the title bar by default; «1» for top-right corner of the map (just under the title bar); «2» for the middle bottom of the map. However for «1», it's appearing on the top-left instead of right. Is the doc wrong, or is that a bug? 2401:7400:C80B:E643:3438:40F6:CECE:CCD5 (talk) 05:06, 1 March 2023 (UTC)[reply]