[openstreetmap/openstreetmap-website] Add interactive icons for wikipedia and website in object details (#1517)
Ryszard Mikke
notifications at github.com
Thu Apr 6 17:38:31 UTC 2017
1. The relations that a /node, /way or a /relation belongs to should be listed first, just after object's tags. See issue #794 . I was really happy when I saw someone has already requested it.
__*Rationale:*__ Relations are more important and give more important information, than the list of nodes in a /way.
2. Those relations should have a wikipedia icon if there is a wikipedia article listed for relation and a website (or link) icon if a website is defined for relation. Actually, it would be good to have it for ways and nodes as well. These icons should be interactive and open wikipedia or website _in a new tab_ in browser.
__*Rationale:*__ This way a mapper will see that there is an article/website defined for a relation and there is no need to add it to every element of the relation. I'm now going through _wikipedia errors_ part of OSMOSE and I can see a plenty of wikipedia links added randomly to ways that are parts of boundaries, roads or rivers.
Also, it will make wikipedia articles defined for containing relation easily available from object's details.
3. Optionally, the wikipedia icons could be more intelligent than just opening a wikipedia article from wikipedia=* tag. The algorithm could be:
* If there is no wikidata=* tag in object's tags, an article under wikipedia=* is displayed
* Otherwise, the current user's language preferences are checked and:
* if the user has not defined language preferences, we go to "fallback" (see below)
* otherwise we go through user's preferred languages (top down) and for the first language on the list that has a wikipedia article listed in this language in wikidata entry, we display this article in this language.
E.g The user has defined Polish, English and Russian as preferred languages, and the wikidata entry has links to articles in Russian and Kazakh languages, a Russian article would be displayed even if wikipedia=* tag lists the Kazakh article.
"Fallback" when there are no language preferences to go through or none of the preferred languages is found in wikidata:
* if there is an English article in the wikidata entry, display English article.
* otherwise, display an article from wikipedia=* tag.
__*Rationale:*__ This way registered users will quickly see the article in their most preferred language if available.
Also, if there was such an intelligent wikipedia licon, the same could be done with object's name i.e. we could add an icon after the object's name that would open a wikipedia article in user's most preferred language.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1517
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170406/64d46c63/attachment.html>
More information about the rails-dev
mailing list