Changeset 17006 in josm for trunk/src/org/openstreetmap/josm/tools
- Timestamp:
- 2020-09-03T21:50:29+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/tools/Tag2Link.java
r16839 r17006 187 187 } 188 188 if (key.matches("(.*:)?wikidata")) { 189 OsmUtils.splitMultipleValues(value) 190 .forEach(q -> linkConsumer.acceptLink(tr("View Wikidata item"), "https://www.wikidata.org/wiki/" + q, imageResource.get()));189 OsmUtils.splitMultipleValues(value).forEach(q -> linkConsumer.acceptLink( 190 tr("View Wikidata item"), "https://www.wikidata.org/wiki/" + q, imageResource.get())); 191 191 } 192 192 if (key.matches("(.*:)?species")) { … … 195 195 } 196 196 if (key.matches("wikimedia_commons|image") && value.matches("(?i:File):.*")) { 197 String url = "https://commons.wikimedia.org/wiki/" + value;198 linkConsumer.acceptLink(tr("View image on Wikimedia Commons"), url, imageResource.get());197 OsmUtils.splitMultipleValues(value).forEach(i -> linkConsumer.acceptLink( 198 tr("View image on Wikimedia Commons"), "https://commons.wikimedia.org/wiki/" + i, imageResource.get())); 199 199 } 200 200 if (key.matches("wikimedia_commons|image") && value.matches("(?i:Category):.*")) { 201 String url = "https://commons.wikimedia.org/wiki/" + value;202 linkConsumer.acceptLink(tr("View category on Wikimedia Commons"), url, imageResource.get());201 OsmUtils.splitMultipleValues(value).forEach(i -> linkConsumer.acceptLink( 202 tr("View category on Wikimedia Commons"), "https://commons.wikimedia.org/wiki/" + i, imageResource.get())); 203 203 } 204 204
Note:
See TracChangeset
for help on using the changeset viewer.