ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #375] Error translating strings with HTML encoded characters in it
This commit is contained in:
parent
d3d162337d
commit
f5fc797267
1 changed files with 4 additions and 3 deletions
|
|
@ -32,6 +32,7 @@
|
||||||
use File::Spec;
|
use File::Spec;
|
||||||
use Getopt::Long qw(:config gnu_getopt no_ignore_case);
|
use Getopt::Long qw(:config gnu_getopt no_ignore_case);
|
||||||
use Date::Format;
|
use Date::Format;
|
||||||
|
use HTML::Entities;
|
||||||
|
|
||||||
my $DEBUG = 0;
|
my $DEBUG = 0;
|
||||||
my $TOKEN = 'i18n:_';
|
my $TOKEN = 'i18n:_';
|
||||||
|
|
@ -162,10 +163,10 @@ sub parse_KEYS()
|
||||||
}
|
}
|
||||||
if (/^msgid "(.*?)"$/) {
|
if (/^msgid "(.*?)"$/) {
|
||||||
# &debug("msgid: $1");
|
# &debug("msgid: $1");
|
||||||
$key = "\"$1\"";
|
$key = "\"".decode_entities($1)."\"";
|
||||||
}
|
}
|
||||||
if (/^"(.*?)"$/) {
|
if (/^"(.*?)"$/) {
|
||||||
$key .= "\n"."\"$1\"";
|
$key .= "\n"."\"".decode_entities($1)."\"";
|
||||||
}
|
}
|
||||||
if (/^msgstr/) {
|
if (/^msgstr/) {
|
||||||
&debug("msgid: $key");
|
&debug("msgid: $key");
|
||||||
|
|
@ -205,7 +206,7 @@ sub parse_ZUL()
|
||||||
($msgid) = $line =~ /$regexp/;
|
($msgid) = $line =~ /$regexp/;
|
||||||
|
|
||||||
if ($msgid ne "") {
|
if ($msgid ne "") {
|
||||||
$msgid = "\"$msgid\"";
|
$msgid = '"'.decode_entities($msgid).'"';
|
||||||
&addEntry($msgid, &to_relative_path($filename).":".$numline);
|
&addEntry($msgid, &to_relative_path($filename).":".$numline);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue