[mojosetup] Patch: Fix po2localization so it ignores fuzzy translations.
Francois Gouget
fgouget at codeweavers.com
Fri Mar 6 10:51:09 EST 2015
In the best case they could totally break the installation (e.g. if they
contain a '%s'), and in the worst case they could make dialogs or
buttons incomprehensible or misleading.
diff --git a/misc/po2localization.pl b/misc/po2localization.pl
index a429641..1214d95 100755
--- a/misc/po2localization.pl
+++ b/misc/po2localization.pl
@@ -44,6 +44,7 @@ foreach (@ARGV) {
my $comment = '';
my $currentlang = '';
+ my $fuzzy;
while (<POIO>) {
chomp;
@@ -59,6 +60,10 @@ foreach (@ARGV) {
}
next;
}
+ if (/\A\#,.*\bfuzzy\b/) {
+ $fuzzy = 1;
+ next;
+ }
next if /\A\#/;
@@ -125,6 +130,7 @@ foreach (@ARGV) {
die("unexpected line: $_\n");
}
}
+ $msgstr = '' if ($fuzzy);
if ($template) {
push @strings, $msgid; # This is a list, to keep original order.
@@ -134,6 +140,7 @@ foreach (@ARGV) {
$msgstrs{$currentlang}{$msgid} = $msgstr;
}
}
+ $fuzzy = undef;
}
}
--
Francois Gouget <fgouget at codeweavers.com>
More information about the mojosetup
mailing list