Changeset 35146 in osm for applications
- Timestamp:
- 2019-09-27T14:43:08+02:00 (5 years ago)
- Location:
- applications/editors/josm/plugins/tag2link
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tag2link/resources/tag2link_sources.xml
r35145 r35146 50 50 </rule> 51 51 <rule> 52 <condition k="image" v=" File:.*"/>52 <condition k="image" v="(?i:File|Category):.*"/> 53 53 <link name="View image" href="https://commons.wikimedia.org/wiki/%v%" /> 54 54 </rule> … … 69 69 </rule> 70 70 <rule> 71 <condition k="wikimedia_commons" v="( File|Category):.*"/>71 <condition k="wikimedia_commons" v="(?i:File):.*"/> 72 72 <link name="View Commons file" href="https://commons.wikimedia.org/wiki/%v%" /> 73 73 </rule> 74 74 <rule> 75 <condition k="wikimedia_commons" v=" Category:.*"/>75 <condition k="wikimedia_commons" v="(?i:Category):.*"/> 76 76 <link name="View Commons category" href="https://commons.wikimedia.org/wiki/%v%" /> 77 77 </rule> -
applications/editors/josm/plugins/tag2link/test/unit/org/openstreetmap/josm/plugins/tag2link/Tag2LinkRuleCheckerTest.java
r35144 r35146 19 19 @Test 20 20 public void testImageCommons() { 21 finalCollection<Link> links = Tag2LinkRuleChecker.getLinks(new Tag("image", "File:Witten Brücke Gasstraße.jpg"));21 Collection<Link> links = Tag2LinkRuleChecker.getLinks(new Tag("image", "File:Witten Brücke Gasstraße.jpg")); 22 22 assertEquals(1, links.size()); 23 23 assertEquals("https://commons.wikimedia.org/wiki/File%3AWitten_Br%C3%BCcke_Gasstra%C3%9Fe.jpg", links.iterator().next().url); 24 links = Tag2LinkRuleChecker.getLinks(new Tag("image", "category:JOSM")); 25 assertEquals(1, links.size()); 26 assertEquals("https://commons.wikimedia.org/wiki/category%3AJOSM", links.iterator().next().url); 24 27 } 25 28
Note:
See TracChangeset
for help on using the changeset viewer.