Changeset 11994 in josm


Ignore:
Timestamp:
2017-04-24T11:39:15+02:00 (2 years ago)
Author:
stoecker
Message:

fix #14685 - wiki language link extractor fails for URL's with equal beginning, drop old workaround

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/defaultpresets.xml

    r11989 r11994  
    74617461        </item> <!-- Power Transformer -->
    74627462        <item name="Power Switchgear" icon="presets/power/switchgear.svg" type="closedway" preset_name_label="true">
    7463             <link href="http://wiki.openstreetmap.org/wiki/Tag:power=switch"
    7464                   de.href="http://wiki.openstreetmap.org/wiki/DE:Tag:power=switch"
    7465                   fr.href="http://wiki.openstreetmap.org/wiki/FR:Tag:power=switch" />
     7463            <link href="http://wiki.openstreetmap.org/wiki/Tag:power=switchgear"
     7464                  de.href="http://wiki.openstreetmap.org/wiki/DE:Tag:power=switchgear" />
    74667465            <space />
    74677466            <label text="(Please only use this tag if more detailed mapping using busbars and bays is impossible!)" />
  • trunk/scripts/presets_lang.pl

    r11669 r11994  
    3737      my $h = uri_unescape($data{href});
    3838      my $v = "href=\"$h\"";
    39       if($h eq "http://wiki.openstreetmap.org/wiki/Proposed_features/House_numbers/Karlsruhe_Schema")
    40       {
    41         $datan{"de"} = "/wiki/Proposed_features/De:Hausnummern";
    42       }
    4339      while($main =~ /<a href="(\/wiki\/[^"]+)"[^>]+><b>·<\/b> <bdi lang="([a-z_A-Z-]+)"(?: style="unicode-bidi:embed;unicode-bidi:-webkit-isolate;unicode-bidi:isolate")?>/g)
    4440      {
     
    6965      }
    7066      print "$v\n";
    71       print "Replace failed for $data{href}.\n" if !($file =~ s/(<link )href="\Q$data{href}\E.*?( ?\/>)/$1$v$2/s);
     67      print "Replace failed for $data{href}.\n" if !($file =~ s/(<link )href="\Q$data{href}\E".*?( ?\/>)/$1$v$2/s);
    7268
    7369      $skip++;
Note: See TracChangeset for help on using the changeset viewer.