Changeset 29999 in osm for applications/editors


Ignore:
Timestamp:
2013-10-06T14:29:23+02:00 (11 years ago)
Author:
donvip
Message:

[josm_i18n] fix #josm9112 - fix #josm9156 - i18n patches by AlfonZ

Location:
applications/editors/josm/i18n
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/i18n/convpreset.pl

    r29943 r29999  
    184184  {
    185185    $combo_n = "";
     186    print "\n";
    186187  }
    187188  elsif(!$line)
  • applications/editors/josm/i18n/convstyle.pl

    r29954 r29999  
    55
    66use strict;
     7
     8my $rule_cond; # cumulated conditions from current rule
    79
    810# This is a simple conversion and in no way a complete XML parser
     
    2123    print "/* mappaint style named $1 */ tr($1);\n";
    2224  }
     25  elsif($line =~ /<rule\s*>/)
     26  {
     27    $rule_cond = "";
     28    print "/* $line */\n";
     29  }
     30  elsif($line =~ /<condition.*\s+k="([^"]*)"/)
     31  {
     32    my $cond_k = $1; # according to schema, k is always present
     33    my $cond_v = ($line =~ /\s+v="([^"]*)"/) ? $1 : "";
     34    my $cond_b = ($line =~ /\s+b="([^"]*)"/) ? $1 : "";
     35    print STDERR "$0: Found both v=\"$cond_v\" and b=\"$cond_b\" for k=\"$cond_k\" at line $.\n" if ($cond_v && $cond_b);
     36    my $cond = ($cond_v || $cond_b) ? "$cond_k=$cond_v$cond_b" : "$cond_k"; # v and b shouldn't appear both
     37    if ($rule_cond)
     38    {
     39      $rule_cond .= ", " . $cond;
     40    }
     41    else
     42    {
     43      $rule_cond = $cond;
     44    }
     45    print "/* $line */\n";
     46  }
    2347  elsif($line =~ /colour="([^"]+)#/)
    2448  {
    25     my $c = $1;
    26     my $co = $1;
    27     $c =~ s/[^a-z0-9]+/./g;
    28     print "/* color $co */ tr(\"$c\");\n";
     49    if ($line =~ /\s+colour="([^"]+)#/)
     50    {
     51      my $c = $1;
     52      my $co = $1;
     53      $c =~ s/[^a-z0-9]+/./g;
     54      print "/* color $co (applied for \"$rule_cond\") */ tr(\"$c\");";
     55    }
     56    if ($line =~ /\s+dashedcolour="([^"]+)#/)
     57    {
     58      my $c = $1;
     59      my $co = $1;
     60      $c =~ s/[^a-z0-9]+/./g;
     61      print "/* color $co (applied for \"$rule_cond\") */ tr(\"$c\");";
     62    }
     63    print "\n";
    2964  }
    3065  else
Note: See TracChangeset for help on using the changeset viewer.