Changeset 25155 in osm for applications


Ignore:
Timestamp:
2011-01-25T20:41:30+01:00 (14 years ago)
Author:
stoecker
Message:

update translation issues

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/i18n/build.xml

    r20716 r25155  
    2727  <target name="trans_.java">
    2828    <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">
    3030      <arg line="convpreset.pl ${josm.presets}"/>
    3131    </exec>
  • applications/editors/josm/i18n/convpreset.pl

    r24903 r25155  
    1111my @combo_values;
    1212my $combo_idx;
     13my $result = 0;
    1314my $comment = 0;
    1415
     
    104105  }
    105106  # 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" ? ",":";");
    109111    $combo_n = $n;
    110112    $combo_idx = 0;
     
    112114    if($line =~ /text_context=(".*?")/)
    113115    {
    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;
    122124    for (my $i=0; $i<@combo_values; ++$i) {
    123       $combo_values[$i] =~ s/\x91/,/g;
     125      $combo_values[$i] =~ s/\x91/$sp/g;
    124126      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" ? ",":";");
    132135    $combo_n = $n;
    133136    $combo_idx = 0;
     
    135138    if($line =~ /text_context=(".*?")/)
    136139    {
    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;
    144147    foreach my $val (@combo_values)
    145148    {
    146149      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\");");
    148151    }
    149152    print "\n";
     
    179182     || $line =~ /<\/?optional>/
    180183     || $line =~ /<key/
    181      || $line =~ /annotations/
     184     || $line =~ /<presets/
     185     || $line =~ /<\/presets/
    182186     || $line =~ /roles/
    183187     || $line =~ /href=/
    184188     || $line =~ /<!--/
     189     || $line =~ /<\?xml/
    185190     || $line =~ /-->/
    186191     || $comment)
     
    191196  {
    192197    print "/* unparsed line $line */\n";
    193 #    print STDERR "Unparsed line $line\n";
     198    $result = 20
    194199  }
    195200
     
    200205
    201206print "}}\n";
     207return $result if $result;
  • applications/editors/josm/i18n/specialmessages.java

    r22544 r25155  
    99/* OSM server message */ tr("Database offline for maintenance");
    1010/* 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");
    1112/* Java message loading audio data */ tr("could not get audio input stream from input URL");
    1213/* Java message loading audio data */ tr("Audio Device Unavailable");
Note: See TracChangeset for help on using the changeset viewer.