diff options
author | Andras Timar <andras.timar@collabora.com> | 2018-09-30 12:14:19 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-11-21 13:37:11 +0100 |
commit | cb760bea86e89161b1d610430ecb920cf907af7a (patch) | |
tree | 7de1b5cfe346d625d6765314debe9baeef1720d2 /l10ntools | |
parent | c7da2fde04464da7372565d3cfb729ec46247412 (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>
(cherry picked from commit 86919365393a0c3da9c86f63099bc05cb2e39844)
Reviewed-on: https://gerrit.libreoffice.org/63595
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/po.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 7959b8361d7d..45c775d7c456 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -34,6 +34,7 @@ private: OString m_sMsgId; OString m_sMsgStr; bool m_bFuzzy; + bool m_bCFormat; bool m_bNull; public: @@ -118,6 +119,7 @@ GenPoEntry::GenPoEntry() , m_sMsgId( OString() ) , m_sMsgStr( OString() ) , m_bFuzzy( false ) + , m_bCFormat( false ) , m_bNull( false ) { } @@ -134,6 +136,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) @@ -174,6 +178,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)); |