[openstreetmap/openstreetmap-website] Integrate human-readable wikidata browser plugin (PR #6127)

Marwin Hochfelsner notifications at github.com
Fri Jul 4 12:28:38 UTC 2025


@hlfan commented on this pull request.



> +      $("<a>")
+        .attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + data.icon)
+        .append($("<img>").attr({ src: OSM.WIKIMEDIA_COMMONS_URL + "Special:FilePath/" + data.icon, height: "32" }))
+        .addClass("float-end mb-1 ms-2")
+        .appendTo(cell);
+    }
+    if (data.label) {
+      $btn
+        .siblings(`a[href*="wikidata.org/entity/${data.qid}"]`)
+        .clone()
+        .text(data.label)
+        .addClass("me-1")
+        .appendTo(cell);
+    }
+    if (data.article) {
+      $(`<${data.label ? "sup" : "div"}>`)

If we want to qualify the label language, then imo the Wikipedia link should get the same treatment, because if they were added in a separate tag, the language would be indicated by a prefix like fr:...
Formatting it nicer and removing the prefix because "the URL already hints at the language" seems like a bad idea to me.

In the Wikipedia you can find links like `redlink [es]` with a interwikilink to the other language. This and the reason Wikidata is language agnostic is why I put the enwiki site code here in the first place. 

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

Message ID: <openstreetmap/openstreetmap-website/pull/6127/review/2987015324 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250704/436c8950/attachment.htm>


More information about the rails-dev mailing list