Changeset 34996 in osm for applications


Ignore:
Timestamp:
2019-05-04T22:39:59+02:00 (6 years ago)
Author:
stoecker
Message:

fix #josm17679 - CDATA in translated texts

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

Legend:

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

    r33940 r34996  
    4242    print "tr(\"$val\"); /* $line */\n";
    4343  }
     44  elsif($line =~ /<description +lang=['"]en['"]><!\[CDATA\[(.*)\]\]><\/description>/)
     45  {
     46    my $val = $1;
     47    $val =~ s/"/\\"/g;
     48    print "tr(\"$val\"); /* $line */\n";
     49  }
    4450  elsif($line =~ /<description +lang=['"]en['"]>(.*)<\/description>/)
    4551  {
  • applications/editors/josm/i18n/i18n.pl

    r34025 r34996  
    270270  {
    271271    warn "JAVA translation issue for language $la: Mismatching single quotes:\nTranslated text: ".decode("utf8",$tr)."\nOriginal text: ".decode("utf8",$en)."\n";
     272    $error = 1;
     273  }
     274  if($tr =~ /<!\[CDATA\[/)#&& $la ne "en")
     275  {
     276    warn "JAVA translation issue for language $la: CDATA in string:\nTranslated text: ".decode("utf8",$tr)."\nOriginal text: ".decode("utf8",$en)."\n";
    272277    $error = 1;
    273278  }
Note: See TracChangeset for help on using the changeset viewer.