From 89c369f344455a11259b29854a3556650a88c63d Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 31 Mar 2010 11:32:48 +0200 Subject: don't mark untranslated messages as fuzzy in PO files ... as this is what gettext processors expect. --- tests/auto/linguist/lconvert/data/endless-po-loop.ts | 4 ++-- tests/auto/linguist/lconvert/data/msgid.ts | 8 ++++---- tests/auto/linguist/lconvert/data/singular.po | 3 --- tests/auto/linguist/lconvert/data/wrapping.po | 1 - tools/linguist/shared/po.cpp | 4 ++-- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/tests/auto/linguist/lconvert/data/endless-po-loop.ts b/tests/auto/linguist/lconvert/data/endless-po-loop.ts index 6212fbd..8aa7215 100644 --- a/tests/auto/linguist/lconvert/data/endless-po-loop.ts +++ b/tests/auto/linguist/lconvert/data/endless-po-loop.ts @@ -5,12 +5,12 @@ Assistant This is some text which introduces the DonauDampfSchifffahrtsKapitaensMuetzeMitKomischenUltraViolettenFransenUndEinemKnopf - + %n document(s) found. - + diff --git a/tests/auto/linguist/lconvert/data/msgid.ts b/tests/auto/linguist/lconvert/data/msgid.ts index f89fa74..39401d8 100644 --- a/tests/auto/linguist/lconvert/data/msgid.ts +++ b/tests/auto/linguist/lconvert/data/msgid.ts @@ -5,23 +5,23 @@ Dialog2 %n files - + %n cars - + Age: %1 - + func3 - + diff --git a/tests/auto/linguist/lconvert/data/singular.po b/tests/auto/linguist/lconvert/data/singular.po index a0d4019..e0cfafb 100644 --- a/tests/auto/linguist/lconvert/data/singular.po +++ b/tests/auto/linguist/lconvert/data/singular.po @@ -9,7 +9,6 @@ msgstr "translated" msgid "untranslated two" msgstr "translated" -#, fuzzy #| msgid "old untranslated" msgid "untranslated two b" msgstr "" @@ -20,7 +19,6 @@ msgstr "" msgid "untranslated three" msgstr "translated" -#, fuzzy #| msgid "old untranslated" #| msgid_plural "old untranslated plural" msgid "untranslated three b" @@ -31,7 +29,6 @@ msgstr "" msgid "untranslated four" msgstr "translated" -#, fuzzy #| msgid_plural "old untranslated only plural" msgid "untranslated four b" msgstr "" diff --git a/tests/auto/linguist/lconvert/data/wrapping.po b/tests/auto/linguist/lconvert/data/wrapping.po index 39b7fbe..8223611 100644 --- a/tests/auto/linguist/lconvert/data/wrapping.po +++ b/tests/auto/linguist/lconvert/data/wrapping.po @@ -3,7 +3,6 @@ # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # -#, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 87b2a8a..2895143 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -482,7 +482,7 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd) msg.setTranslations(item.msgStr); if (isObsolete) msg.setType(TranslatorMessage::Obsolete); - else if (item.isFuzzy) + else if (item.isFuzzy || (!msg.sourceText().isEmpty() && !msg.isTranslated())) msg.setType(TranslatorMessage::Unfinished); else msg.setType(TranslatorMessage::Finished); @@ -645,7 +645,7 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd) bool noWrap = false; QStringList flags; - if (msg.type() == TranslatorMessage::Unfinished) + if (msg.type() == TranslatorMessage::Unfinished && msg.isTranslated()) flags.append(QLatin1String("fuzzy")); TranslatorMessage::ExtraData::const_iterator itr = msg.extras().find(QLatin1String("po-flags")); -- cgit v0.12