From f5fc7972676aa44c454a12e3980a3627ddeb2038 Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Mon, 8 Mar 2010 12:15:56 +0100 Subject: [PATCH] ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #375] Error translating strings with HTML encoded characters in it --- scripts/gettext-keys-generator.pl | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/gettext-keys-generator.pl b/scripts/gettext-keys-generator.pl index cd94cfaf9..46728ac84 100755 --- a/scripts/gettext-keys-generator.pl +++ b/scripts/gettext-keys-generator.pl @@ -32,6 +32,7 @@ use File::Spec; use Getopt::Long qw(:config gnu_getopt no_ignore_case); use Date::Format; +use HTML::Entities; my $DEBUG = 0; my $TOKEN = 'i18n:_'; @@ -162,10 +163,10 @@ sub parse_KEYS() } if (/^msgid "(.*?)"$/) { # &debug("msgid: $1"); - $key = "\"$1\""; + $key = "\"".decode_entities($1)."\""; } if (/^"(.*?)"$/) { - $key .= "\n"."\"$1\""; + $key .= "\n"."\"".decode_entities($1)."\""; } if (/^msgstr/) { &debug("msgid: $key"); @@ -205,7 +206,7 @@ sub parse_ZUL() ($msgid) = $line =~ /$regexp/; if ($msgid ne "") { - $msgid = "\"$msgid\""; + $msgid = '"'.decode_entities($msgid).'"'; &addEntry($msgid, &to_relative_path($filename).":".$numline); } }