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 ...@@ -141,7 +141,7 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
rOFStream << "#, c-format" << std::endl; rOFStream << "#, c-format" << std::endl;
if ( !m_sMsgCtxt.isEmpty() ) if ( !m_sMsgCtxt.isEmpty() )
rOFStream << "msgctxt " rOFStream << "msgctxt "
<< lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt) << lcl_GenMsgString(m_sMsgCtxt)
<< std::endl; << std::endl;
rOFStream << "msgid " rOFStream << "msgid "
<< lcl_GenMsgString(m_sMsgId) << std::endl; << lcl_GenMsgString(m_sMsgId) << std::endl;
...@@ -200,10 +200,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) ...@@ -200,10 +200,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
} }
else if (sLine.startsWith("\"") && pLastMsg) else if (sLine.startsWith("\"") && pLastMsg)
{ {
if (pLastMsg != &m_sMsgCtxt || sLine != "\"" + m_sReference + "\\n\"") *pLastMsg += lcl_GenNormString(sLine);
{
*pLastMsg += lcl_GenNormString(sLine);
}
} }
else else
break; break;
...@@ -234,9 +231,11 @@ PoEntry::PoEntry( ...@@ -234,9 +231,11 @@ PoEntry::PoEntry(
throw WRONGHELPTEXT; throw WRONGHELPTEXT;
m_pGenPo.reset( new GenPoEntry() ); 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 = OString sMsgCtxt =
sReference + "\n" +
rGroupId + "\n" + rGroupId + "\n" +
(rLocalId.isEmpty() ? OString() : rLocalId + "\n") + (rLocalId.isEmpty() ? OString() : rLocalId + "\n") +
rResType; 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