Don't add empty strings to translations

pull/230/head
Hleb Valoshka 2019-02-14 21:27:51 +03:00
parent eadcf76a9c
commit 3e0674b9cb
1 changed files with 2 additions and 2 deletions

View File

@ -23,10 +23,10 @@ my %keywords = (
while (<>) {
# Matches lines:
# KEYWORD "String" ...
if ( $_ =~ /^\s*(\w+)\s+"(.+?)"/ ) {
if ( $_ =~ /^\s*(\w+)\s+"(.+?)"/ && $_ !~ /^\s*(\w+)\s+""/) {
# Excludes blank strings and strings of the form word followed by digit
# which are control names (e.g. DateTimePicker3)
if (exists($keywords{$1}) && $2 !~ /^ *$/ && $2 !~ /^\w+\d$/ ) {
if (exists($keywords{$1}) && $2 !~ /^ *$/ && $2 !~ /^\w+\d$/ && $2 !~ /^""/) {
print qq{_("$2");\n};
}
}