Jump to content

Template talk:Jct/Archive/2020

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


dab parameter

I infer from the documentation (and talk above) that %dab% returns the value of Jct's |dab= parameter. Several modules such as Module:Road data/strings/USA/NC assume that to be true. Please can anyone show me an example of this actually working? I've tried a few testcases and can't make the qualifier appear in the link name. %route% does work. I haven't got my head around the full labyrinth of calls but I suspect line that line 50 of Module:Road data/parser (local arg = args[formatStr.arg or "route"]) implements %route% in a way that doesn't work for %dab%. What I'm trying is to change %route% to %route%[dab|| (%dab%)|] in Module:Road data/strings/CAN/NS and adding |dab= to some Jct calls, but this has no effect: %dab% is unset. Any help would be appreciated. Thanks, Certes (talk) 14:26, 14 January 2020 (UTC)

@Certes: |dab= is not a valid parameter to {{jct}}. You have to suffix dab with the index of the route you're disambiguating, as explained in the template documentation. For example, you could pass |dab1=City. -happy5214 15:18, 14 January 2020 (UTC)
FWIW, the line you copied is part of a switch table implementation, where the variable arg is set to the parameter whose value should be matched in the table. It's completely separate from the parameter interpolation (delimited by %). -happy5214 15:21, 14 January 2020 (UTC)
Thanks Happy5214, that's sorted it out. I saw dab1 etc. but wrongly assumed that they were for disambiguating destination cities rather then the actual roads. Certes (talk) 15:35, 14 January 2020 (UTC)

abbr=none

I'm working on the Japan module and there are a lot of instances where the link and abbr are the same. It would be nice to be able to turn off the abbreviations in these cases. This way, the link would be formed [[link]] and not [[link|abbr]]. It would also cut the size of the JPN module significantly. –Fredddie 18:51, 19 May 2020 (UTC)

Can we defer that until Chinissai's sandbox code is merged into the live version? I don't want to have to change the code twice. -happy5214 22:49, 19 May 2020 (UTC)

Proposed road data Wikidata properties

Over at Wikidata, I've proposed road name formatter and road number formatter properties that would be based on the Module:Road data/strings modules. I'm not sure if performance considerations would allow these modules to be based on Wikidata items, but at least these properties would make the data contained in the modules more reusable beyond the English Wikipedia, particularly in conjunction with OpenStreetMap where there has long been demand for it. – Minh Nguyễn 💬 02:03, 11 July 2020 (UTC)

I came across this link error that I found ( I-280). Of course, there's no article named Interstate 280 (Illinois–Illinois) but there are articles named Interstate 280 (Illinois–Iowa) and Interstate 280 (Iowa–Illinois). AlphaBeta135 (talk) 17:11, 17 October 2020 (UTC)

 Fixed I messed it up when I updated the module a few weeks ago. –Fredddie 17:21, 17 October 2020 (UTC)