Changeset 29999 in osm for applications/editors
- Timestamp:
- 2013-10-06T14:29:23+02:00 (11 years ago)
- Location:
- applications/editors/josm/i18n
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/convpreset.pl
r29943 r29999 184 184 { 185 185 $combo_n = ""; 186 print "\n"; 186 187 } 187 188 elsif(!$line) -
applications/editors/josm/i18n/convstyle.pl
r29954 r29999 5 5 6 6 use strict; 7 8 my $rule_cond; # cumulated conditions from current rule 7 9 8 10 # This is a simple conversion and in no way a complete XML parser … … 21 23 print "/* mappaint style named $1 */ tr($1);\n"; 22 24 } 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 } 23 47 elsif($line =~ /colour="([^"]+)#/) 24 48 { 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"; 29 64 } 30 65 else
Note:
See TracChangeset
for help on using the changeset viewer.