[Libreoffice-commits] core.git: Branch 'libreoffice-6-1' - l10ntools/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 21 12:37:37 UTC 2018


 l10ntools/source/po.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit cb760bea86e89161b1d610430ecb920cf907af7a
Author:     Andras Timar <andras.timar at collabora.com>
AuthorDate: Sun Sep 30 12:14:19 2018 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Nov 21 13:37:11 2018 +0100

    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 at collabora.com>
    (cherry picked from commit 86919365393a0c3da9c86f63099bc05cb2e39844)
    Reviewed-on: https://gerrit.libreoffice.org/63595
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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));


More information about the Libreoffice-commits mailing list