summaryrefslogtreecommitdiffstats
path: root/tools/linguist/shared/xliff.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-29 16:54:19 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2009-06-29 16:56:22 (GMT)
commitf0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c (patch)
treeb1ef602a2ffef28c94d99a59ac8858691411c777 /tools/linguist/shared/xliff.cpp
parent1414c682c532a95a2204bc1b2d01d2493357b686 (diff)
downloadQt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.zip
Qt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.tar.gz
Qt-f0a66c60d1eba14be2b3fdc9307fdd2e4a421a5c.tar.bz2
support editing of length variants
this is not complete, e.g. full text search does not discern which variant contains the hit, the integration with phrases&guesses is non-existing, etc. the form preview will do funny things as long as the widgets don't support the multi-variant strings.
Diffstat (limited to 'tools/linguist/shared/xliff.cpp')
-rw-r--r--tools/linguist/shared/xliff.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/linguist/shared/xliff.cpp b/tools/linguist/shared/xliff.cpp
index 61e4b9f..1313172 100644
--- a/tools/linguist/shared/xliff.cpp
+++ b/tools/linguist/shared/xliff.cpp
@@ -303,6 +303,8 @@ static void writeTransUnits(QTextStream &ts, const TranslatorMessage &msg, const
QString translation;
if (transit != transend) {
translation = *transit;
+ translation.replace(QChar(Translator::BinaryVariantSeparator),
+ QChar(Translator::TextVariantSeparator));
++transit;
puttrans = true;
}
@@ -598,8 +600,11 @@ bool XLIFFHandler::endElement(const QString &namespaceURI, const QString& localN
m_sources.append(accum);
}
} else if (localName == QLatin1String("target")) {
- if (popContext(XC_restype_translation))
+ if (popContext(XC_restype_translation)) {
+ accum.replace(QChar(Translator::TextVariantSeparator),
+ QChar(Translator::BinaryVariantSeparator));
m_translations.append(accum);
+ }
} else if (localName == QLatin1String("context-group")) {
if (popContext(XC_context_group)) {
m_refs.append(TranslatorMessage::Reference(