summaryrefslogtreecommitdiffstats
path: root/tools/linguist
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-03-31 09:32:48 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-03-31 16:37:14 (GMT)
commit89c369f344455a11259b29854a3556650a88c63d (patch)
treeb640d894e21529a09e07706b8d24c767ec68a7a1 /tools/linguist
parentba40d481456095304729d0ef4279e0a53281798a (diff)
downloadQt-89c369f344455a11259b29854a3556650a88c63d.zip
Qt-89c369f344455a11259b29854a3556650a88c63d.tar.gz
Qt-89c369f344455a11259b29854a3556650a88c63d.tar.bz2
don't mark untranslated messages as fuzzy in PO files
... as this is what gettext processors expect.
Diffstat (limited to 'tools/linguist')
-rw-r--r--tools/linguist/shared/po.cpp4
1 files changed, 2 insertions, 2 deletions
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"));