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

pocheck: handle the '#, c-format' flag

Change-Id: I7d1d344e79e0c23886a21032d2ce85e5abb199cb
Reviewed-on: https://gerrit.libreoffice.org/61162
Tested-by: Jenkins
Reviewed-by: 's avatarAndras Timar <andras.timar@collabora.com>
üst baf048cd
...@@ -35,6 +35,7 @@ private: ...@@ -35,6 +35,7 @@ private:
OString m_sMsgId; OString m_sMsgId;
OString m_sMsgStr; OString m_sMsgStr;
bool m_bFuzzy; bool m_bFuzzy;
bool m_bCFormat;
bool m_bNull; bool m_bNull;
public: public:
...@@ -119,6 +120,7 @@ GenPoEntry::GenPoEntry() ...@@ -119,6 +120,7 @@ GenPoEntry::GenPoEntry()
, m_sMsgId( OString() ) , m_sMsgId( OString() )
, m_sMsgStr( OString() ) , m_sMsgStr( OString() )
, m_bFuzzy( false ) , m_bFuzzy( false )
, m_bCFormat( false )
, m_bNull( false ) , m_bNull( false )
{ {
} }
...@@ -135,6 +137,8 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const ...@@ -135,6 +137,8 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
rOFStream << "#: " << m_sReference << std::endl; rOFStream << "#: " << m_sReference << std::endl;
if ( m_bFuzzy ) if ( m_bFuzzy )
rOFStream << "#, fuzzy" << std::endl; rOFStream << "#, fuzzy" << std::endl;
if ( m_bCFormat )
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_sReference+"\n"+m_sMsgCtxt)
...@@ -175,6 +179,10 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) ...@@ -175,6 +179,10 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
{ {
m_bFuzzy = true; m_bFuzzy = true;
} }
else if (sLine.startsWith("#, c-format"))
{
m_bCFormat = true;
}
else if (sLine.startsWith("msgctxt ")) else if (sLine.startsWith("msgctxt "))
{ {
m_sMsgCtxt = lcl_GenNormString(sLine.copy(8)); m_sMsgCtxt = lcl_GenNormString(sLine.copy(8));
......
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