From 7cd548744376ecb223a792abf6247ea061e690f4 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Thu, 5 Oct 2006 18:05:48 +0100 Subject: [PATCH] * Exclude fuzzy translations from .po files. --- debian/changelog | 6 ++++++ po/bin/po2txt | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7ec5149..9373a0e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +gfxboot-theme-ubuntu (0.2.7) UNRELEASED; urgency=low + + * Exclude fuzzy translations from .po files. + + -- Colin Watson Thu, 5 Oct 2006 18:04:48 +0100 + gfxboot-theme-ubuntu (0.2.6) edgy; urgency=low * Always map the PC105 less than / greater than key, since the BIOS keymap diff --git a/po/bin/po2txt b/po/bin/po2txt index f10ee5b..5b8b538 100755 --- a/po/bin/po2txt +++ b/po/bin/po2txt @@ -26,7 +26,7 @@ sub read_texts { local $_; - my ($lang, @f, $txt, $context, $t, $p, $ids, $file); + my ($lang, @f, $txt, $context, $fuzzy, $t, $p, $ids, $file); $lang = shift; @@ -49,7 +49,7 @@ sub read_texts for (@f) { if(/^\s*#\.\s*(txt_\S+)/) { if($txt) { - @msgstr = @msgid if $ids || join_msg(\@msgstr) eq ""; + @msgstr = @msgid if $ids || $fuzzy || join_msg(\@msgstr) eq ""; $txts{$txt} = join_msg(\@msgstr); } @@ -58,6 +58,12 @@ sub read_texts undef @msgid; undef @msgstr; undef $context; + undef $fuzzy; + next; + } + + if(/^\s*#,\s*fuzzy/) { + $fuzzy = 1; next; } @@ -89,7 +95,7 @@ sub read_texts } if($txt) { - @msgstr = @msgid if $ids || join_msg(\@msgstr) eq ""; + @msgstr = @msgid if $ids || $fuzzy || join_msg(\@msgstr) eq ""; $txts{$txt} = join_msg(\@msgstr); }