From 664fdc07056b8497a68518d0f89d689ff399702e Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 31 Mar 2010 11:15:58 +0200 Subject: 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. --- tests/auto/linguist/lconvert/data/msgid.ts | 2 +- tools/linguist/shared/xliff.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) 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 @@ - + Dialog2 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")); -- cgit v0.12