Skip to content

Commit

Permalink
Fixed a word extractor. bugid:105974
Browse files Browse the repository at this point in the history
  • Loading branch information
yuji committed Apr 12, 2011
1 parent b60b336 commit ca6b50a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build/l10n/trans.pl
Expand Up @@ -129,7 +129,7 @@
}
# $trans =~ s/([^\\]?)'/$1\\'/g;
# $args{phrase} =~ s/([^\\])'/$1\\'/g;
$args{phrase} =~ s/^'/\\'/;
# $args{phrase} =~ s/^'/\\'/;
$args{phrase} =~ s/\\"/"/g;

unless ($phrase{$args{phrase}}) {
Expand Down Expand Up @@ -193,7 +193,7 @@
printf "\t$q%s$q => $q%s$q, # Translate - $reason\n", $args{phrase}, $trans; # Print out the translation if there was an existing one based on the lowercase string, else empty
}
}
while ($text =~ /\s*(?:["'])?label(?:["'])?\s*=>\s*(["'])(.*?)([^\\])\1/gs) {
while ($text =~ /\s*(?:["'])?label(?:_plural)?(?:["'])?\s*=>\s*(["'])(.*?)([^\\])\1/gs) {
my($msg, %args);
my $trans = '';
$args{phrase} = $2.$3;
Expand Down Expand Up @@ -249,7 +249,7 @@
}
}
elsif ($tmpl =~ /\.yaml$/) {
while ($text =~ /\s*label:\s*(.+)/g) {
while ($text =~ /\s*(?:label:|label_plural:)\s*(.+)/g) {
my($msg, %args);
my $trans = '';
$args{phrase} = $1;
Expand Down

0 comments on commit ca6b50a

Please sign in to comment.