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

Anton Khorev notifications at github.com
Tue Jul 15 17:04:40 UTC 2025


@AntonKhorev commented on this pull request.



> +      $("<a>")
+        .attr("href", OSM.WIKIMEDIA_COMMONS_URL + "File:" + encodeURIComponent(data.icon))
+        .append($("<img>").attr({ src, height: "32" }))
+        .addClass("float-end mb-1 ms-2")
+        .appendTo(cell);
+    }
+    if (data.label) {
+      const label = $btn
+        .siblings(`a[href*="wikidata.org/entity/${data.qid}"]`)
+        .clone()
+        .text(data.label.value)
+        .attr("dir", "auto");
+      cell.append($("<span>").append(label));
+      if (isUnexpectedLanguage(data.label.language)) {
+        label.attr("lang", data.label.language);
+        label.after($("<sup>").text(" " + localeName.of(data.label.language)));

I had to figure out what "Multiple languages" means on the third item:
<img width="318" height="260" alt="image" src="https://github.com/user-attachments/assets/6e503981-7148-40bd-8c64-e9b6d90f7185" />


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

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


More information about the rails-dev mailing list