diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-31 09:15:58 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-03-31 16:37:13 (GMT) |
commit | 664fdc07056b8497a68518d0f89d689ff399702e (patch) | |
tree | a3f6f442970321b769443f3b61d407556a8bbe80 /tools | |
parent | f19fcbd0d4d2af8773d40cddcba07fc06f2b9bf8 (diff) | |
download | Qt-664fdc07056b8497a68518d0f89d689ff399702e.zip Qt-664fdc07056b8497a68518d0f89d689ff399702e.tar.gz Qt-664fdc07056b8497a68518d0f89d689ff399702e.tar.bz2 |
interpret source language "en" as "POSIX" (more precisely: "none specified")
we set it to that value when writing xliff, as the header is mandatory
and no better value is possible. it seems unlikely that an unqualified
"english" would be used if somebody meant to actually specify a source
language, so this hack should be ok.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/linguist/shared/xliff.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/linguist/shared/xliff.cpp b/tools/linguist/shared/xliff.cpp index 20303ec..6411426 100644 --- a/tools/linguist/shared/xliff.cpp +++ b/tools/linguist/shared/xliff.cpp @@ -503,6 +503,8 @@ bool XLIFFHandler::startElement(const QString& namespaceURI, m_language.replace(QLatin1Char('-'), QLatin1Char('_')); m_sourceLanguage = atts.value(QLatin1String("source-language")); m_sourceLanguage.replace(QLatin1Char('-'), QLatin1Char('_')); + if (m_sourceLanguage == QLatin1String("en")) + m_sourceLanguage.clear(); } else if (localName == QLatin1String("group")) { if (atts.value(QLatin1String("restype")) == QLatin1String(restypeContext)) { m_context = atts.value(QLatin1String("resname")); |