Bug #1443: Fix gettext keys extractor

Improve the regex taking into account possible spaces to extract the strings in
the Hibernate validation annotations.

Before this patch only the next lines would be marked to be translated:
    @NotNull(message="code not specified"

However, next line has to be marked to be translated too:
    @NotNull(message = "code not specified")

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-06-27 16:58:05 +02:00
parent b5a4f038f3
commit 30292b062a

View file

@ -279,7 +279,7 @@ sub parse_hibernate_validations()
next;
}
# First line
if ($line =~ /\@\w+\(message=\"(.*?)\"/) {
if ($line =~ /\@\s*\w+\s*\(\s*message\s*=\s*\"(.*?)\s*\"/) {
$msgid = "\"$1\"";
# Line ends with a )
if ($line =~ /\)\s*$/) {