Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Module talk:Type in location

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Module talk:Type in location/doc)
Latest comment: 3 years ago by Hike395 in topic Script errors

Return London to England

[edit]

The {{Infobox church}} template calls this module via {{#invoke:Type in location|main|Church|{{Comma separated entries|{{{location|}}}|{{{country|}}}}}}} but the short description is not including the country.

{{#invoke:Type in location|main|Church|{{Comma separated entries|London}}}}Church in LondonOK
{{#invoke:Type in location|main|Church|{{Comma separated entries|London|England}}}}Church in LondonEngland is lost
{{#invoke:Type in location|main|Church|AAAA}}Church in AAAACut out the extra template
{{#invoke:Type in location|main|Church|AAAA, BBBB}}Church in AAAA, BBBBLooks OK
{{#invoke:Type in location|main|Church|AAAA, BBBB, CCCC}}Church in AAAA, BBBB, CCCCSome magic to keep to 2 levels. Fair enough
{{#invoke:Type in location|main|Church|London}}Church in LondonOK with one level
{{#invoke:Type in location|main|Church|London, England}}Church in LondonEngland is lost again!!

In theory, we should be able to simply generate Church in London, England. Any clues to fixing this? — GhostInTheMachine talk to me 15:03, 7 March 2021 (UTC)Reply

@GhostInTheMachine: This module calls the cleanupLoc function from Module:Settlement short description, which deliberately simplifies "London, England" to "London". This is not a bug. * Pppery * it has begun... 03:56, 8 March 2021 (UTC)Reply
Thanks. Yes I see that there is a further call into the cleanupLoc function which alters assorted descriptions. Galobtter The changes for US and trailing UK do make sense, but please can the London, England change be removed. So, delete line 64 and alter line 63 to change London, UK to London, EnglandGhostInTheMachine talk to me 15:00, 15 March 2021 (UTC)Reply
What needs to happen to get this fixed? — GhostInTheMachine talk to me 21:24, 1 April 2021 (UTC)Reply
@GhostInTheMachine: done Galobtter (pingó mió) 20:43, 19 April 2021 (UTC)Reply
@Galobtter: Many thanks for returning London to England — GhostInTheMachine talk to me 09:38, 20 April 2021 (UTC)Reply

Radio stations

[edit]

This template is used by {{Infobox radio station}} (and {{Infobox television station}}) to generate SDs.

Typically, the |city= field only includes city and state/province, but not country. Nikkimaria changed a couple of descriptions to add the country and suggested the template be changed to be able to handle short description generation such that we don't get "Radio station in New York, US" (the radio infobox does not have a country field, the television one does). I'm not sure how to handle the usage when the field passed has three lines (e.g. "Binghamton, New York, US"). Pinging @GhostInTheMachine, Pppery, and Galobtter: in hopes of some advice on how to proceed/fix this issue. Sammi Brie (she/her • tc) 02:02, 5 June 2021 (UTC)Reply

Is this about WUCI-FM? Which articles are having problems? — GhostInTheMachine talk to me 15:02, 5 June 2021 (UTC)Reply

Module appears to insert extra spaces

[edit]

I am trying to include |country= in {{Infobox cemetery/sandbox}}. I am using {{#invoke:Type in location|main|Cemetery|{{{location|}}}{{#if:{{{country|}}}|, {{{country}}}}}|check-patterns = Cemetery}}, but the module inserts a space before the comma. Is that fixable, or is there a better way to do what I am trying to do?

Also, for location =Finglas Road, [[Glasnevin]], [[Dublin 11]], the module outputs an extra space after "in": Cemetery in  Glasnevin, Dublin. If that can be fixed without breaking anything else, that would be helpful. – Jonesey95 (talk) 23:10, 17 April 2022 (UTC)Reply

You can see some of these extra spaces in production templates at Lincoln High School (San Diego, California) and Abraham Lincoln High School (San Francisco, California). – Jonesey95 (talk) 02:26, 18 April 2022 (UTC)Reply

Script errors

[edit]

Hike395, could you fix the recent script errors in Sino-Korean Friendship Bridge, Rio–Antirrio Bridge, and a couple other articles. the problem appears to be when a {{ubl}} is passed as an input. the module should either handle this case or provide a more useful error message. thank you. Frietjes (talk) 16:56, 27 April 2023 (UTC)Reply

Fixed --- thanks for letting me know. Fixed. Added a test case for the future. — hike395 (talk) 17:54, 27 April 2023 (UTC)Reply