[openstreetmap/openstreetmap-website] Don't include language prefix in wikipedia links (PR #4864)

Anton Khorev notifications at github.com
Sat Jun 1 02:05:27 UTC 2024


In links like [https://de.wikipedia.org/wiki/de:Test?uselang=en](https://de.wikipedia.org/wiki/de:Test?uselang=en) what do you need `de:` for? `de` is already in the domain name `de.wikipedia.org`. iD and Overpass Turbo don't include this prefix.

If the prefix in the path differs from domain name, as was in one of the test cases [https://fr.wikipedia.org/wiki/de:Test?uselang=en](https://fr.wikipedia.org/wiki/de:Test?uselang=en), you get a redirect, in this case to [https://de.wikipedia.org/wiki/Test?uselang=en](https://de.wikipedia.org/wiki/Test?uselang=en). Just generate this url instead.
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/openstreetmap-website/pull/4864

-- Commit Summary --

  * Don't include language prefix in wikipedia links

-- File Changes --

    M app/helpers/browse_tags_helper.rb (33)
    M test/helpers/browse_tags_helper_test.rb (18)

-- Patch Links --

https://github.com/openstreetmap/openstreetmap-website/pull/4864.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4864.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4864
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/4864 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240531/9480ff52/attachment.htm>


More information about the rails-dev mailing list