Index: /applications/editors/josm/plugins/wikipedia/build.xml
===================================================================
--- /applications/editors/josm/plugins/wikipedia/build.xml	(revision 31856)
+++ /applications/editors/josm/plugins/wikipedia/build.xml	(revision 31857)
@@ -5,5 +5,5 @@
     <property name="commit.message" value="Commit message"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="7817"/>
+    <property name="plugin.main.version" value="9149"/>
     <property name="plugin.canloadatruntime" value="true"/>
 
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataTagCellRenderer.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataTagCellRenderer.java	(revision 31857)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikidataTagCellRenderer.java	(revision 31857)
@@ -0,0 +1,69 @@
+package org.wikipedia;
+
+import java.awt.Component;
+import java.util.Map;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.swing.JLabel;
+import javax.swing.JTable;
+import javax.swing.table.DefaultTableCellRenderer;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.tools.LanguageInfo;
+import org.testng.internal.Utils;
+
+public class WikidataTagCellRenderer extends DefaultTableCellRenderer {
+
+    final Map<String, Future<String>> labelCache = new ConcurrentHashMap<>();
+
+    static class LabelLoader implements Callable<String> {
+        final String id;
+        JTable table;
+
+        public LabelLoader(String id, JTable table) {
+            this.id = id;
+            this.table = table;
+        }
+
+        @Override
+        public String call() throws Exception {
+            final String label = WikipediaApp.getLabelForWikidata(id, LanguageInfo.getJOSMLocaleCode());
+            table.repaint();
+            table = null;
+            return label;
+        }
+    }
+
+    @Override
+    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
+        if (column != 1
+                || !(value instanceof Map<?, ?> && ((Map<?, ?>) value).size() == 1)
+                || !"wikidata".equals(table.getValueAt(row, 0).toString())) {
+            return null;
+        }
+        final String id = ((Map<?, ?>) value).keySet().iterator().next().toString();
+        if (!WikipediaApp.WIKIDATA_PATTERN.matcher(id).matches()) {
+            return null;
+        }
+
+        if (!labelCache.containsKey(id)) {
+            labelCache.put(id, Main.worker.submit(new LabelLoader(id, table)));
+        }
+        try {
+            final String label = labelCache.get(id).isDone() ? labelCache.get(id).get() : null;
+            final JLabel component = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
+            component.setText("<html>" + Utils.escapeHtml(id) + (label != null
+                    ? " <span color='gray'>" + Utils.escapeHtml(label) + "</span>"
+                    : ""));
+            component.setToolTipText(label);
+            return component;
+        } catch (InterruptedException | ExecutionException e) {
+            Main.warn("Could not fetch Wikidata label for " + id);
+            Main.warn(e);
+            return null;
+        }
+    }
+}
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 31856)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaApp.java	(revision 31857)
@@ -29,4 +29,5 @@
 import org.openstreetmap.josm.data.osm.OsmPrimitive;
 import org.openstreetmap.josm.data.osm.Tag;
+import org.openstreetmap.josm.tools.CheckParameterUtil;
 import org.openstreetmap.josm.tools.Predicate;
 import org.openstreetmap.josm.tools.Utils;
@@ -37,4 +38,6 @@
 
 public final class WikipediaApp {
+
+    public static Pattern WIKIDATA_PATTERN = Pattern.compile("Q\\d+");
 
     private WikipediaApp() {
@@ -201,4 +204,29 @@
     }
 
+    static String getLabelForWikidata(String wikidataId, String preferredLanguage) {
+        try {
+            CheckParameterUtil.ensureThat(WIKIDATA_PATTERN.matcher(wikidataId).matches(), "Invalid Wikidata ID given");
+            final String url = "https://www.wikidata.org/w/api.php" +
+                    "?action=wbgetentities" +
+                    "&props=labels" +
+                    "&ids=" + wikidataId +
+                    "&languages=" + preferredLanguage +
+                    "&languagefallback=en" +
+                    "&format=xml";
+            Main.info("Wikipedia: GET " + url);
+            try (final InputStream in = Utils.openURL(new URL(url))) {
+                final Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
+                final Node label = (Node) XPathFactory.newInstance().newXPath().compile("//label").evaluate(xml, XPathConstants.NODE);
+                if (label == null) {
+                    return null;
+                } else {
+                    return (String) XPathFactory.newInstance().newXPath().compile("./@value").evaluate(label, XPathConstants.STRING);
+                }
+            }
+        } catch (Exception ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
     static Collection<WikipediaLangArticle> getInterwikiArticles(String wikipediaLang, String article) {
         try {
Index: /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaPlugin.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaPlugin.java	(revision 31856)
+++ /applications/editors/josm/plugins/wikipedia/src/org/wikipedia/WikipediaPlugin.java	(revision 31857)
@@ -21,4 +21,5 @@
         if (newFrame != null) {
             newFrame.addToggleDialog(new WikipediaToggleDialog());
+            newFrame.propertiesDialog.addCustomPropertiesCellRenderer(new WikidataTagCellRenderer());
         }
     }
Index: /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java
===================================================================
--- /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 31856)
+++ /applications/editors/josm/plugins/wikipedia/test/unit/org/wikipedia/WikipediaAppTest.java	(revision 31857)
@@ -143,3 +143,15 @@
         assertThat(map.size(), is(4));
     }
+
+    @Test
+    public void testGetLabelForWikidata() throws Exception {
+        assertThat(WikipediaApp.getLabelForWikidata("Q1741", "de"), is("Wien"));
+        assertThat(WikipediaApp.getLabelForWikidata("Q1741", "en"), is("Vienna"));
+        assertThat(WikipediaApp.getLabelForWikidata("Q" + Long.MAX_VALUE, "en"), nullValue());
+    }
+
+    @Test(expected = RuntimeException.class)
+    public void testGetLabelForWikidataInvalidId() throws Exception {
+        WikipediaApp.getLabelForWikidata("Qxyz", "en");
+    }
 }
