Changeset 25155 in osm for applications/editors/josm
- Timestamp:
- 2011-01-25T20:41:30+01:00 (14 years ago)
- Location:
- applications/editors/josm/i18n
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/i18n/build.xml
r20716 r25155 27 27 <target name="trans_.java"> 28 28 <mkdir dir="${i18n.build.dir}"/> 29 <exec executable="perl" output="${i18n.build.dir}/trans_presets.java">29 <exec executable="perl" failonerror="true" output="${i18n.build.dir}/trans_presets.java"> 30 30 <arg line="convpreset.pl ${josm.presets}"/> 31 31 </exec> -
applications/editors/josm/i18n/convpreset.pl
r24903 r25155 11 11 my @combo_values; 12 12 my $combo_idx; 13 my $result = 0; 13 14 my $comment = 0; 14 15 … … 104 105 } 105 106 # first handle display values 106 elsif($line =~ /<combo.*\s+text=(".*?").*\s+display_values="(.*?)"/) 107 { 108 my ($n,$vals) = ($1,$2); 107 elsif($line =~ /<(combo|multiselect).*\s+text=(".*?").*\s+display_values="(.*?)"/) 108 { 109 my ($type,$n,$vals) = ($1,$2,$3); 110 my $sp = ($type eq "combo" ? ",":";"); 109 111 $combo_n = $n; 110 112 $combo_idx = 0; … … 112 114 if($line =~ /text_context=(".*?")/) 113 115 { 114 print "/* item $item combo$n */ trc($1,$n);";115 } 116 else 117 { 118 print "/* item $item combo$n */ tr($n);";119 } 120 $vals =~ s/\\ ,/\x91/g;121 @combo_values = split ",",$vals;116 print "/* item $item $type $n */ trc($1,$n);"; 117 } 118 else 119 { 120 print "/* item $item $type $n */ tr($n);"; 121 } 122 $vals =~ s/\\$sp/\x91/g; 123 @combo_values = split $sp,$vals; 122 124 for (my $i=0; $i<@combo_values; ++$i) { 123 $combo_values[$i] =~ s/\x91/ ,/g;125 $combo_values[$i] =~ s/\x91/$sp/g; 124 126 next if $combo_values[$i] =~ /^[0-9-]+$/; # search for non-numbers 125 print "/* item $item combo $n display value */" . ($vctx ? " trc($vctx, \"$combo_values[$i]\");" : " tr(\"$combo_values[$i]\");"); 126 } 127 print "\n"; 128 } 129 elsif($line =~ /<combo.*\s+text=(".*?").*\s+values="(.*?)"/) 130 { 131 my ($n,$vals) = ($1,$2); 127 print "/* item $item $type $n display value */" . ($vctx ? " trc($vctx, \"$combo_values[$i]\");" : " tr(\"$combo_values[$i]\");"); 128 } 129 print "\n"; 130 } 131 elsif($line =~ /<(combo|multiselect).*\s+text=(".*?").*\s+values="(.*?)"/) 132 { 133 my ($type,$n,$vals) = ($1,$2,$3); 134 my $sp = ($type eq "combo" ? ",":";"); 132 135 $combo_n = $n; 133 136 $combo_idx = 0; … … 135 138 if($line =~ /text_context=(".*?")/) 136 139 { 137 print "/* item $item combo$n */ trc($1,$n);";138 } 139 else 140 { 141 print "/* item $item combo$n */ tr($n);";142 } 143 @combo_values = split ",",$vals;140 print "/* item $item $type $n */ trc($1,$n);"; 141 } 142 else 143 { 144 print "/* item $item $type $n */ tr($n);"; 145 } 146 @combo_values = split $sp,$vals; 144 147 foreach my $val (@combo_values) 145 148 { 146 149 next if $val =~ /^[0-9-]+$/; # search for non-numbers 147 print "/* item $item combo$n display value */" . ($vctx ? " trc($vctx, \"$val\");" : " tr(\"$val\");");150 print "/* item $item $type $n display value */" . ($vctx ? " trc($vctx, \"$val\");" : " tr(\"$val\");"); 148 151 } 149 152 print "\n"; … … 179 182 || $line =~ /<\/?optional>/ 180 183 || $line =~ /<key/ 181 || $line =~ /annotations/ 184 || $line =~ /<presets/ 185 || $line =~ /<\/presets/ 182 186 || $line =~ /roles/ 183 187 || $line =~ /href=/ 184 188 || $line =~ /<!--/ 189 || $line =~ /<\?xml/ 185 190 || $line =~ /-->/ 186 191 || $comment) … … 191 196 { 192 197 print "/* unparsed line $line */\n"; 193 # print STDERR "Unparsed line $line\n"; 198 $result = 20 194 199 } 195 200 … … 200 205 201 206 print "}}\n"; 207 return $result if $result; -
applications/editors/josm/i18n/specialmessages.java
r22544 r25155 9 9 /* OSM server message */ tr("Database offline for maintenance"); 10 10 /* OSM server message */ tr("The maximum bbox size is 0.25, and your request was too large. Either request a smaller area, or use planet.osm"); 11 /* JOSM server message */ tr("JOSM-Trac login at josm.openstreetmap.de"); 11 12 /* Java message loading audio data */ tr("could not get audio input stream from input URL"); 12 13 /* Java message loading audio data */ tr("Audio Device Unavailable");
Note:
See TracChangeset
for help on using the changeset viewer.