summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-09-30 12:53:48 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-30 21:57:24 +0200
commit8d4e12a4153868c9d98937d49c4ac6064013a8dd (patch)
treee17df421d48f9e56662bf019865498fc2af87afa /l10ntools
parent86919365393a0c3da9c86f63099bc05cb2e39844 (diff)
pocheck: do not change msgctxt when po is regenerated
Change-Id: I220fce194813f783c807c23eeffd2421cadd7636 Reviewed-on: https://gerrit.libreoffice.org/61163 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/po.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index c80249ad9e83..ea52d8d8a66f 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -141,7 +141,7 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
rOFStream << "#, c-format" << std::endl;
if ( !m_sMsgCtxt.isEmpty() )
rOFStream << "msgctxt "
- << lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt)
+ << lcl_GenMsgString(m_sMsgCtxt)
<< std::endl;
rOFStream << "msgid "
<< lcl_GenMsgString(m_sMsgId) << std::endl;
@@ -200,10 +200,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
}
else if (sLine.startsWith("\"") && pLastMsg)
{
- if (pLastMsg != &m_sMsgCtxt || sLine != "\"" + m_sReference + "\\n\"")
- {
- *pLastMsg += lcl_GenNormString(sLine);
- }
+ *pLastMsg += lcl_GenNormString(sLine);
}
else
break;
@@ -234,9 +231,11 @@ PoEntry::PoEntry(
throw WRONGHELPTEXT;
m_pGenPo.reset( new GenPoEntry() );
- m_pGenPo->setReference(rSourceFile.copy(rSourceFile.lastIndexOf('/')+1));
+ OString sReference = rSourceFile.copy(rSourceFile.lastIndexOf('/')+1);
+ m_pGenPo->setReference(sReference);
OString sMsgCtxt =
+ sReference + "\n" +
rGroupId + "\n" +
(rLocalId.isEmpty() ? OString() : rLocalId + "\n") +
rResType;