Template talk:PossibleSynonym2

From OpenStreetMap Wiki
Jump to navigation Jump to search

Values

When we use this template with a value, it is to tell that this value is wrong. It means, I think, that there is no wiki page "Tag:key=value". So we have (always) the value in red with no working link and a subtitle (I mean a text under the mouse) "... (page does not exist)".

I propose someone fixes this, for example when someone uses "|value" it works like "||value" to desactivate the value link.

If this proposal is ok and you change it, see also the template "PossibleSynonym" because same problem. Yunan973 (talk) 15:05, 20 June 2024 (UTC)

This behaviour may be annoying but is standard and not wrong IMHO. Nonetheless, I can understand your point. I think the page link has some value to the wiki so there are 2 possible work-arounds I see: 1) Let the template check if the tag page exists and if not, use "||value" for not linking. 2) Override text color of the link to be always black. --Chris2map (talk) 14:37, 21 June 2024 (UTC)
Can this be turned into a flag for the template editors can add? Red links imply that there is value in creating the page and that the wiki is incomplete without it, but usually (e.g., brand=independent) the value just shows a value which shouldn't be used. This goes for most name-like values. --JeroenHoek (talk) 08:38, 27 November 2025 (UTC)
We could add a parameter e.g. "unlinked=" #if:{{{unlinked|}}}|{{Value|1={{{1}}}={{{2|*}}}}} to display the tag without links to key and value if it is set with any parameter value like "unlinked=yes" or "unlinked=1" or anything else. But I think it would be better to have a default solution that is not depending on a flag that has to be set by editors (users). To totally skip the links isn't the best solution IMHO. I would prefer a compromise solution and have quickly adapted the template with gray links and red under-lines for a field test (Special:Diff/2924675). If it doesn't work for you or anyone else, please revert the changes or let me know. --Chris2map (talk) 14:25, 28 November 2025 (UTC)
Thanks, but that doesn't really work for me. It introduces a new visual language, making it more complex than necessary. It still looks like a broken link. What will be lost to the user if we just drop the link from the value-part completely? --JeroenHoek (talk) 09:39, 2 December 2025 (UTC)
Regarding appearance, I agree with you. The (red) links are helpful to me to have access to the "tools" from the description box (taginfo, Tag History) and, if exists, data item content and data item link. In order to get both, the link to the page with the tag description box and a non red and unlinked tag, I added the code to the template to check, if a tag page exists or not. If a tag page doesn't exist, the tag is shown without a link. Instead there is a magnifying glass behind it that links to the non-existing page and shows the description box. Please have a look at some pages with "possible synonyms 2" and let me know, how this one works for you. --Chris2map (talk) 18:24, 4 December 2025 (UTC)
Thanks. I like that approach. amenity=recycling is a nice showcase. --JeroenHoek (talk) 13:17, 5 December 2025 (UTC)

IMPERATIVE: >

When a value contains the sign >, the template stops to work. Example with {{PossibleSynonym2|height|>20|tagLink=yes}}:

  • height=>20[{{fullurl:Tag:height=>20}} 🔎]
If you know places with this tag, verify if it could be tagged with another tag.
Automated edits are strongly discouraged unless you really know what you are doing!

How to fix that, quick answer needed because of the wiki page height. Yunan973 (talk) 17:18, 20 June 2024 (UTC)

I ping @Minh Nguyen: because maybe you can help. Yunan973 (talk) 14:17, 21 June 2024 (UTC)
I tried to escape the ">" character by either &gt; / &#62; / %3E, to use <nowiki> and to use "1= 2= 3=" with the template parameters: Sadly no success. --Chris2map (talk) 14:47, 21 June 2024 (UTC)
A first workaround: Template:Sandbox --Chris2map (talk) 17:37, 21 June 2024 (UTC)
Seems very good to me: it resolves this topic but also the previous topic. But is the "specialvalue=" key essential ? Is it possible that the default mode (without this key) is like with this key? Yunan973 (talk) 16:50, 22 June 2024 (UTC)
It is possible to set as default mode, but if we do so we'll lost the linking to the tag's page, which is useful in a few cases; e.g. see Key:access. --Chris2map (talk) 18:29, 22 June 2024 (UTC)
@Yunan973: I made two changes to fix this issue: {{Tag}} no longer tries to link to an invalid page title, and it ignores empty language parameters. – Minh Nguyễn 💬 03:56, 24 June 2024 (UTC)
Thanks. Yunan973 (talk) 14:35, 29 June 2024 (UTC)