From e32d8cd49c4e3137889512e3f3a19018b4195970 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 30 Aug 2010 15:28:11 +0200 Subject: properly parse ts contexts in obsolete messages --- tests/auto/linguist/lconvert/data/test20.ts | 9 +++++++++ tools/linguist/shared/po.cpp | 2 ++ 2 files changed, 11 insertions(+) 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 with | and ~ and so~ + + just something obsolete + translated obsoletion + + + something else obsolete + comment with | and ~ and so~ + another translated obsoletion + 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]))); -- cgit v0.12