From 579a5635a68cf3194bcc153765473d7892b81d48 Mon Sep 17 00:00:00 2001 From: Taavi Sangel Date: Tue, 21 Nov 2017 13:29:28 +0200 Subject: [PATCH] added support for multiline msgctxt strings --- lib/po.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/po.js b/lib/po.js index 3ca1bf1..299f9f8 100644 --- a/lib/po.js +++ b/lib/po.js @@ -212,6 +212,7 @@ PO.parse = function (data) { } else if (line.match(/^msgctxt/)) { // Context finish(); item.msgctxt = extract(line); + context = 'msgctxt'; noCommentLineCount++; } else { // Probably multiline string or blank if (line.length > 0) { @@ -222,6 +223,8 @@ PO.parse = function (data) { item.msgid += extract(line); } else if (context === 'msgid_plural') { item.msgid_plural += extract(line); + } else if (context === 'msgctxt') { + item.msgctxt += extract(line); } } }