Template:Foo–Bar relations category is permanently
protected from editing because it is a
heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by
consensus, editors may use {{
edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's
documentation to add usage notes or
categories.
Any contributor may edit the template's sandbox. This template does not have a testcases subpage. You can create the testcases subpage here. |
This template does not require a rating on Wikipedia's
content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
|
This
edit request to
Template:Foo–Bar relations category/mapname has been answered. Set the |answered= or |ans= parameter to no to reactivate your request. |
A number of country locator maps have a n-dash separating the country names. Currently, the map finder template does not find them as the code expects a space as separator. I suggest to add other tests to also find locator maps using n-dash. Examples: no map is currently displayed on Category:Latvia–Sweden relations, Category:Latvia–San Marino relations, Category:Bolivia–France relations, Category:Gabon–Russia relations, Category:Australia–Chad relations etc. whereas the maps exist ( File:Latvia–Sweden Locator.svg, File:Latvia–San Marino Locator.svg, File:Bolivia–France Locator.svg, File:Gabon–Russia Locator.svg, File:Australia–Chad Locator.svg).
I suggest to replace this code:
from X to Y
|
---|
-->|<!-- ## No map found, so return nothing by this: ## Some maps also use a n-dash (–) -->{{#ifexist: Media:{{{country1}}}–{{{country2}}} Locator.png<!-- -->|{{{country1}}}–{{{country2}}} Locator.png<!-- -->|<!-- no .png, so try .svg -->{{#ifexist: Media:{{{country1}}}–{{{country2}}} Locator.svg<!-- -->|{{{country1}}}–{{{country2}}} Locator.svg<!-- -->|<!-- no map for {{{country1}}}–{{{country2}}}, so try reverse order -->{{#ifexist: Media:{{{country2}}}–{{{country1}}} Locator.png<!-- -->|{{{country2}}}–{{{country1}}} Locator.png<!-- -->|<!-- no .png, so try .svg -->{{#ifexist: Media:{{{country2}}}–{{{country1}}} Locator.svg<!-- -->|{{{country2}}}–{{{country1}}} Locator.svg<!-- -->|<!-- ## No map found, so try again with uncapitalised "locator" -->{{#ifexist: Media:{{{country1}}}–{{{country2}}} locator.png<!-- -->|{{{country1}}}–{{{country2}}} locator.png<!-- -->|<!-- no .png, so try .svg -->{{#ifexist: Media:{{{country1}}}–{{{country2}}} locator.svg<!-- -->|{{{country1}}}–{{{country2}}} locator.svg<!-- -->|<!-- no map for {{{country1}}}–{{{country2}}}, so try reverse order -->{{#ifexist: Media:{{{country2}}}–{{{country1}}} locator.png<!-- -->|{{{country2}}}–{{{country1}}} locator.png<!-- -->|<!-- no .png, so try .svg -->{{#ifexist: Media:{{{country2}}}–{{{country1}}} locator.svg<!-- -->|{{{country2}}}–{{{country1}}} locator.svg<!-- -->|<!-- ## No map found, so return nothing -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- -->}}<!-- |
– Place Clichy ( talk) 13:32, 23 January 2023 (UTC)
{{Foo–Bar relations category/mapname/sandbox|country1=Latvia|country2=Sweden}}
returns : Latvia–Sweden Locator.svg{{Foo–Bar relations category/mapname/sandbox|country1=Gabon|country2=Russia}}
returns : Gabon–Russia Locator.svg{{Foo–Bar relations category/sandbox}}
displays the map (this can only be tested in preview though). So all tests are positive.