From 30292b062a0d471f787ecc5dcd9717041d86b802 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Wed, 27 Jun 2012 16:58:05 +0200 Subject: [PATCH] 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 --- scripts/gettext-keys-generator.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gettext-keys-generator.pl b/scripts/gettext-keys-generator.pl index bb7d1ccb1..f8316cf63 100755 --- a/scripts/gettext-keys-generator.pl +++ b/scripts/gettext-keys-generator.pl @@ -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*$/) {