Module talk:Type in location

Return London to England

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 London OK
{{#invoke:Type in location|main|Church|{{Comma separated entries|London|England}}}} Church in London England is lost
{{#invoke:Type in location|main|Church|AAAA}} Church in AAAA Cut out the extra template
{{#invoke:Type in location|main|Church|AAAA, BBBB}} Church in AAAA, BBBB Looks OK
{{#invoke:Type in location|main|Church|AAAA, BBBB, CCCC}} Church in AAAA, BBBB, CCCC Some magic to keep to 2 levels. Fair enough
{{#invoke:Type in location|main|Church|London}} Church in London OK with one level
{{#invoke:Type in location|main|Church|London, England}} Church in London England 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

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

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

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

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.