Changeset 35144 in osm for applications/editors


Ignore:
Timestamp:
2019-09-27T14:22:20+02:00 (5 years ago)
Author:
donvip
Message:

fix #josm18170 - allow all keys ending by :wikidata

Location:
applications/editors/josm/plugins/tag2link
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tag2link/resources/tag2link_sources.xml

    r35070 r35144  
    5454        </rule>
    5555    </src>
    56    
     56
    5757    <src name="Wikipedia">
    5858        <rule>
     
    6161        </rule>
    6262        <rule>
    63             <condition k="(operator:|network:|brand:|architect:|artist:|subject:|name:etymology:)?wikidata" />
     63            <condition k="(.*:)?wikidata" />
    6464            <link name="View Wikidata page" href="https://www.wikidata.org/wiki/%v%" />
    6565        </rule>
  • applications/editors/josm/plugins/tag2link/test/unit/org/openstreetmap/josm/plugins/tag2link/Tag2LinkRuleCheckerTest.java

    r34811 r35144  
    3030        assertEquals("https://www.wikidata.org/wiki/Q259340", links.iterator().next().url);
    3131    }
     32
     33    @Test
     34    public void testArchipelagoWikidata() {
     35        final Collection<Link> links = Tag2LinkRuleChecker.getLinks(new Tag("archipelago:wikidata", "Q756987"));
     36        assertEquals(1, links.size());
     37        assertEquals("https://www.wikidata.org/wiki/Q756987", links.iterator().next().url);
     38    }
    3239}
Note: See TracChangeset for help on using the changeset viewer.