summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2018-09-30 12:14:19 +0200
committerAndras Timar <andras.timar@collabora.com>2018-09-30 21:57:10 +0200
commit86919365393a0c3da9c86f63099bc05cb2e39844 (patch)
tree6dce802d13198e3e50b361fab0ffb9e8b90e609b /l10ntools
parentbaf048cd2ffe1f3afeb204b9dcc11d36999c1725 (diff)
pocheck: handle the '#, c-format' flag
Change-Id: I7d1d344e79e0c23886a21032d2ce85e5abb199cb Reviewed-on: https://gerrit.libreoffice.org/61162 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/po.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx
index 72644095c8f8..c80249ad9e83 100644
--- a/l10ntools/source/po.cxx
+++ b/l10ntools/source/po.cxx
@@ -35,6 +35,7 @@ private:
OString m_sMsgId;
OString m_sMsgStr;
bool m_bFuzzy;
+ bool m_bCFormat;
bool m_bNull;
public:
@@ -119,6 +120,7 @@ GenPoEntry::GenPoEntry()
, m_sMsgId( OString() )
, m_sMsgStr( OString() )
, m_bFuzzy( false )
+ , m_bCFormat( false )
, m_bNull( false )
{
}
@@ -135,6 +137,8 @@ void GenPoEntry::writeToFile(std::ofstream& rOFStream) const
rOFStream << "#: " << m_sReference << std::endl;
if ( m_bFuzzy )
rOFStream << "#, fuzzy" << std::endl;
+ if ( m_bCFormat )
+ rOFStream << "#, c-format" << std::endl;
if ( !m_sMsgCtxt.isEmpty() )
rOFStream << "msgctxt "
<< lcl_GenMsgString(m_sReference+"\n"+m_sMsgCtxt)
@@ -175,6 +179,10 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream)
{
m_bFuzzy = true;
}
+ else if (sLine.startsWith("#, c-format"))
+ {
+ m_bCFormat = true;
+ }
else if (sLine.startsWith("msgctxt "))
{
m_sMsgCtxt = lcl_GenNormString(sLine.copy(8));