summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/auto/linguist/lconvert/data/test20.ts9
-rw-r--r--tools/linguist/shared/po.cpp2
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/linguist/lconvert/data/test20.ts b/tests/auto/linguist/lconvert/data/test20.ts
index f042edf..0e38b4b 100644
--- a/tests/auto/linguist/lconvert/data/test20.ts
+++ b/tests/auto/linguist/lconvert/data/test20.ts
@@ -158,5 +158,14 @@
<comment>comment with | and ~ and so~</comment>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>just something obsolete</source>
+ <translation type="obsolete">translated obsoletion</translation>
+ </message>
+ <message>
+ <source>something else obsolete</source>
+ <comment>comment with | and ~ and so~</comment>
+ <translation type="obsolete">another translated obsoletion</translation>
+ </message>
</context>
</TS>
diff --git a/tools/linguist/shared/po.cpp b/tools/linguist/shared/po.cpp
index 620d27b..a58a0bf 100644
--- a/tools/linguist/shared/po.cpp
+++ b/tools/linguist/shared/po.cpp
@@ -656,6 +656,8 @@ bool loadPO(Translator &translator, QIODevice &dev, ConversionData &cd)
item.isPlural = true;
} else if (line.startsWith("#~ msgctxt ")) {
item.tscomment = slurpEscapedString(lines, l, 11, "#~ ", cd);
+ if (qtContexts)
+ splitContext(&item.tscomment, &item.context);
} else {
cd.appendError(QString(QLatin1String("PO-format parse error in line %1: '%2'"))
.arg(l + 1).arg(codec->toUnicode(lines[l])));