Kaydet (Commit) 302a099e authored tarafından Ztamas's avatar Ztamas

Write source file into po entries' msgctxt

So (msgctxt, msgid) pair is unique in one po file

Change-Id: I64635dd7a6352300ed5fb6949a1b78c2a070c660
üst fea5e609
......@@ -198,7 +198,8 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
rOFStream << "#, fuzzy" << std::endl;
if ( !m_sMsgCtxt.isEmpty() )
rOFStream << "msgctxt "
<< lcl_GenMsgString(m_sMsgCtxt).getStr() << std::endl;
<< lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt).getStr()
<< std::endl;
rOFStream << "msgid "
<< lcl_GenMsgString(m_sMsgId).getStr() << std::endl;
rOFStream << "msgstr "
......@@ -251,7 +252,8 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
m_sMsgStr = lcl_GenNormString(sLine.copy(7));
pLastMsg = &m_sMsgStr;
}
else if (sLine.startsWith("\"") && pLastMsg)
else if (sLine.startsWith("\"") && pLastMsg &&
(pLastMsg != &m_sMsgCtxt || sLine != "\"" + m_sReference + "\"") )
{
*pLastMsg += lcl_GenNormString(sLine);
}
......
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