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 | |
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.
-rw-r--r-- | tests/auto/linguist/lconvert/data/msgid.ts | 2 | ||||
-rw-r--r-- | tools/linguist/shared/xliff.cpp | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/auto/linguist/lconvert/data/msgid.ts b/tests/auto/linguist/lconvert/data/msgid.ts index ab65845..f89fa74 100644 --- a/tests/auto/linguist/lconvert/data/msgid.ts +++ b/tests/auto/linguist/lconvert/data/msgid.ts @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> -<TS version="2.0" sourcelanguage="en"> +<TS version="2.0"> <context> <name>Dialog2</name> <message numerus="yes"> 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")); |