Kaydet (Commit) 8d4e12a4 authored tarafından Andras Timar's avatar Andras Timar

pocheck: do not change msgctxt when po is regenerated

Change-Id: I220fce194813f783c807c23eeffd2421cadd7636
Reviewed-on: https://gerrit.libreoffice.org/61163
Tested-by: Jenkins
Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst 86919365
......@@ -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;
......@@ -199,12 +199,9 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
pLastMsg = &m_sMsgStr;
}
else if (sLine.startsWith("\"") && pLastMsg)
{
if (pLastMsg != &m_sMsgCtxt || sLine != "\"" + m_sReference + "\\n\"")
{
*pLastMsg += lcl_GenNormString(sLine);
}
}
else
break;
getline(rIFStream,sTemp);
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment