diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-30 16:25:27 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-31 16:37:13 (GMT) |
commit | 0226221643e9f88c9b50ede7677b523d143025f3 (patch) | |
tree | 4f4127df63df9209e39d63aa61e5e0557ee3c27a /tools | |
parent | 664fdc07056b8497a68518d0f89d689ff399702e (diff) | |
download | Qt-0226221643e9f88c9b50ede7677b523d143025f3.zip Qt-0226221643e9f88c9b50ede7677b523d143025f3.tar.gz Qt-0226221643e9f88c9b50ede7677b523d143025f3.tar.bz2 |
fix updating of X-Source-Language PO header
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/shared/po.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp index 3354d61..393290c 100644 --- a/tools/linguist/shared/po.cpp +++ b/tools/linguist/shared/po.cpp @@ -630,6 +630,9 @@ bool savePO(const Translator &translator, QIODevice &dev, ConversionData &cd) transl.remove(QRegExp(QLatin1String("\\bX-Language:[^\n]*\n"))); if (!translator.languageCode().isEmpty()) transl += QLatin1String("X-Language: ") + translator.languageCode() + QLatin1Char('\n'); + transl.remove(QRegExp(QLatin1String("\\bX-Source-Language:[^\n]*\n"))); + if (!translator.sourceLanguageCode().isEmpty()) + transl += QLatin1String("X-Source-Language: ") + translator.sourceLanguageCode() + QLatin1Char('\n'); } out << poEscapedString(prefix, QLatin1String("msgstr"), noWrap, transl); } else { |