Changeset 33382 in osm for applications/editors


Ignore:
Timestamp:
2017-06-07T22:48:10+02:00 (8 years ago)
Author:
donvip
Message:

fix #josm14184 - fix #josm14207 - fix dead link + add wikispecies link

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

Legend:

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

    r33035 r33382  
    5757            <link name="View Wikidata page" href="https://www.wikidata.org/wiki/%v%" />
    5858        </rule>
     59        <rule>
     60            <condition k="species"/>
     61            <link name="View Wikispecies page" href="https://species.wikimedia.org/wiki/%v%" />
     62        </rule>
    5963    </src>
    6064
     
    180184        <rule>
    181185            <condition k="ref:FR:NAF" v="[A-Z0-9-]{5}" />
    182             <link name="View explanation of %name% code" href="http://www.rouen.cci.fr/outils/ape/Naf_liste.asp?param=2&amp;code=%v%" />
     186            <link name="View INSEE explanation of %name% code" href="http://recherche-naf.insee.fr/SIRENET_ClassesNaf/%v%.htm" />
    183187        </rule>
    184188    </src>
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkPlugin.java

    r29461 r33382  
    2727 * Main class of tag2link plugin.
    2828 * @author Don-vip
    29  * History:
    30  * 0.3d 15-Aug-2012 Add ref:(FR:)?FINESS and osm.fr link for ref:(FR:)?INSEE (josm#7961)
    31  * 0.3c 22-Dec-2011 Add contact namespace for website
    32  * 0.3b 29-Oct-2011 Add UAI support
    33  * 0.3a 29-Oct-2011 Add Country-code prefix, IGN support + not-yet-tested POST requests support
    34  * 0.2d 24-Oct-2011 Icon for Mail action
    35  * 0.2c 24-Oct-2011 Another MHS rule
    36  * 0.2b 24-Oct-2011 UNESCO WHC rule working
    37  * 0.2a 23-Oct-2011 add Mail support + initial work on UNESCO WHC
    38  * 0.1c 23-Oct-2011 add MHS rule (French heritage)
    39  * 0.1b 22-Oct-2011 add CEF rule (French christian churches)
    40  * 0.1  22-Oct-2011 first working prototype
    4129 */
    4230public class Tag2LinkPlugin extends Plugin {
    43 
    44     // private Tag2LinkPreferenceSetting preferenceSetting; TODO
    4531
    4632    private SelectionPopupListener selectionPopupListener;
     
    5541    public Tag2LinkPlugin(PluginInformation info) {
    5642        super(info);
    57         // this.preferenceSetting = new Tag2LinkPreferenceSetting();
    5843        Tag2LinkRuleChecker.init();
    5944    }
    6045
    61     /* (non-Javadoc)
    62      * @see org.openstreetmap.josm.plugins.Plugin#getPreferenceSetting()
    63      */
    64 //    @Override
    65 //    public PreferenceSetting getPreferenceSetting() {
    66 //        return this.preferenceSetting;
    67 //    }
    68 
    69     /* (non-Javadoc)
    70      * @see org.openstreetmap.josm.plugins.Plugin#mapFrameInitialized(org.openstreetmap.josm.gui.MapFrame, org.openstreetmap.josm.gui.MapFrame)
    71      */
    7246    @Override
    7347    public void mapFrameInitialized(MapFrame oldFrame, MapFrame newFrame) {
  • applications/editors/josm/plugins/tag2link/src/org/openstreetmap/josm/plugins/tag2link/Tag2LinkRuleChecker.java

    r31910 r33382  
    110110                try {
    111111                    // Special hack for Wikipedia that prevents spaces being replaced by "+" characters, but by "_"
    112                     if (s.contains("wikipedia.") || s.contains("commons.wikimedia.org")) {
     112                    if (s.contains("wikipedia.") || s.contains(".wikimedia.org")) {
    113113                        val = val.replaceAll(" ", "_");
    114114                    }
Note: See TracChangeset for help on using the changeset viewer.