[Libreoffice-commits] .: Branch 'feature/killsdf' - l10ntools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sun Nov 18 03:15:29 PST 2012
l10ntools/source/po.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 302a099e5264742204b625f1cce949892d8a84f9
Author: Ztamas <zolnaitamas2000g at gmail.com>
Date: Sun Nov 18 12:07:58 2012 +0100
Write source file into po entries' msgctxt
So (msgctxt, msgid) pair is unique in one po file
Change-Id: I64635dd7a6352300ed5fb6949a1b78c2a070c660
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 18c0ef1..df9efe3 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -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);
}
More information about the Libreoffice-commits
mailing list