Changeset 8627 in osm for applications/editors
- Timestamp:
- 2008-07-01T10:20:21+02:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/lang/convpreset.pl
r8529 r8627 4 4 5 5 my $item; 6 my $line = 1;7 6 my $comment = 0; 8 7 … … 16 15 { 17 16 print "tr(\"$1/ \") /* empty item \"$1\" */\n"; 17 } 18 elsif($line =~ /<item\s+name=" ".*<\/item>/) 19 { 20 print "/* empty item */\n"; 18 21 } 19 22 elsif($line =~ /<item\s+name=(".*?")/) … … 32 35 elsif($line =~ /<text.*text=(".*?")/) 33 36 { 34 print "tr($1) /* item $item text $1 */\n"; 37 my $n = $1; 38 print "tr($n) /* item $item text $n */\n"; 35 39 } 36 40 elsif($line =~ /<check.*text=(".*?")/) 37 41 { 38 print "tr($1) /* item $item check $1 */\n"; 42 my $n = $1; 43 print "tr($n) /* item $item check $n */\n"; 44 } 45 # first handle display values 46 elsif($line =~ /<combo.*text=(".*?").*display_values="(.*?)"/) 47 { 48 my ($n,$vals) = ($1,$2); 49 print "tr($n) /* item $item combo $n */"; 50 foreach my $val (split ",",$vals) 51 { 52 next if $val =~ /^[0-9-]+$/; # search for non-numbers 53 print " tr(\"$val\")"; 54 } 55 print "\n"; 39 56 } 40 57 elsif($line =~ /<combo.*text=(".*?").*values="(.*?)"/) 41 58 { 42 print "tr($1) /* item $item combo $1 */"; 43 foreach my $val (split ",",$2) 59 my ($n,$vals) = ($1,$2); 60 print "tr($n) /* item $item combo $n */"; 61 foreach my $val (split ",",$vals) 44 62 { 45 63 next if $val =~ /^[0-9-]+$/; # search for non-numbers
Note:
See TracChangeset
for help on using the changeset viewer.