Changeset 33841 in osm for applications/editors/josm/i18n


Ignore:
Timestamp:
2017-11-20T16:29:04+01:00 (7 years ago)
Author:
stoecker
Message:

fix recent parsing errors

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

Legend:

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

    r32280 r33841  
    3838  $r .= " chunk $chunk" if $chunk;
    3939  $r .= " group $group" if $group;
     40  $r .= " combo $combo_type $combo_n" if $combo_type;
    4041  $r .= " $_[0]" if $_[0];
    4142  return $r ? "/* $r */ " : "";
     
    4849  chomp($line);
    4950  print "tr(\"---DUMMY-MARKER---\"); ";
    50   if($line =~ /<item\s+name=(".*?")/)
     51  if($line =~ /<item\s+name=(".*?")/ || $line =~ /<item.* name=(".*?")/)
    5152  {
    5253    my $val = fix($1);
     
    173174    my $vctxi = ($line =~ /value_context=(".*?")/) ? $1 : $vctx;
    174175    my $value = ($line =~ /value=(".*?")/) ? $1 : undef;
    175     if($line =~ /display_value=(".*?")/)
     176    if($line =~ /[^.]display_value=(".*?")/)
    176177    {
    177178      my $val = fix($1);
    178       print infoblock("$combo_type $combo_n entry $value display value") . ($vctxi ? " trc($vctxi, $val);" : " tr($val);");
     179      print infoblock("entry $value display value") . ($vctxi ? " trc($vctxi, $val);" : " tr($val);");
    179180    }
    180181    else
    181182    {
    182183      my $val = fix($value);
    183       print infoblock("$combo_type $combo_n entry $value display value") . ($vctxi ? " trc($vctxi, $val);" : " tr($val);");
     184      print infoblock("entry $value display value") . ($vctxi ? " trc($vctxi, $val);" : " tr($val);");
    184185    }
    185186    if($line =~ /short_description=(".*?")/)
    186187    {
    187188      my $val = fix($1);
    188       print infoblock("$combo_type $combo_n entry $value short description") . "tr($val);";
     189      print infoblock("entry $value short description") . "tr($val);";
    189190    }
    190191    print "\n";
  • applications/editors/josm/i18n/convwiki.pl

    r33756 r33841  
    3232  if($name =~ /^(.*?)([^\/]+-preset\.xml)$/)
    3333  {
    34     system "mv $name $name.orig";
     34    system "mv \"$name\" \"$name.orig\"";
    3535    my ($path, $xmlname) = ($1, $2);
    36     my $res = `xmllint --format --schema ../core/data/tagging-preset.xsd $name.orig --encode utf-8 --output $name 2>&1`;
     36    my $res = `xmllint --format --schema ../core/data/tagging-preset.xsd \"$name.orig\" --encode utf-8 --output \"$name\" 2>&1`;
    3737    print $res if $res !~ /\.orig validates/;
    38     system "perl convpreset.pl $name >${path}trans_$xmlname";
     38    system "perl convpreset.pl \"$name\" >\"${path}trans_$xmlname\"";
    3939    unlink "$name.orig";
    4040  }
    4141  elsif($name =~ /^(.*?)([^\/]+-style\.xml$)/)
    4242  {
    43     system "perl convstyle.pl $name >${1}trans_$2";
     43    system "perl convstyle.pl \"$name\" >${1}trans_$2";
    4444  }
    4545  elsif($name =~ /^(.*?)([^\/]+\.mapcss)$/)
    4646  {
    47     system "perl convcss.pl $name >${1}trans_$2";
     47    system "perl convcss.pl \"$name\" >${1}trans_$2";
    4848  }
    4949  else
    5050  {
    51     die "Unknown file type $name.";
     51    die "Unknown file type \"$name\".";
    5252  }
    5353  unlink $name;
Note: See TracChangeset for help on using the changeset viewer.