summaryrefslogtreecommitdiff
path: root/l10ntools/inc/po.hxx
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2012-08-29 09:47:26 +0200
committerAndras Timar <atimar@suse.com>2012-08-29 07:59:36 +0000
commit437ae002185a81802cb31b00fa777a7b5d8f9847 (patch)
treecc117bb7725202b1764dacb174e224e22ff91ebd /l10ntools/inc/po.hxx
parent42688495edac102b18014a02072ba081870059db (diff)
Renew localization and kill sdf 1.step
Extract strings from source directly to pot files Implement PoHeader and PoEntry classes Renew fomrat of pot/po files Implement conversion from old po to new po Change-Id: I411b6041f7d525e76b189d7f31adc5b9ab60f6d6 Reviewed-on: https://gerrit.libreoffice.org/506 Reviewed-by: Andras Timar <atimar@suse.com> Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'l10ntools/inc/po.hxx')
-rw-r--r--l10ntools/inc/po.hxx97
1 files changed, 97 insertions, 0 deletions
diff --git a/l10ntools/inc/po.hxx b/l10ntools/inc/po.hxx
new file mode 100644
index 000000000000..de01053ba217
--- /dev/null
+++ b/l10ntools/inc/po.hxx
@@ -0,0 +1,97 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _PO_INCLUDED
+#define _PO_INCLUDED
+
+#include <fstream>
+#include <rtl/string.hxx>
+
+class PoEntry
+{
+
+private:
+
+ OString m_sWhiteSpace;
+ OString m_sExtractCom;
+ OString m_sReference;
+ OString m_sContext;
+ OString m_sUnTransStr;
+ OString m_sTransStr;
+
+ OString m_sKeyId;
+
+protected:
+ void setExtractCom(const OString& rExtCom)
+ { m_sExtractCom = rExtCom; }
+
+public:
+ PoEntry();
+ PoEntry(const OString& i_rSDFLine,
+ const sal_uInt16 eType = TEXT);
+ virtual ~PoEntry();
+
+ virtual void writeToFile(std::ofstream& io_rOFStream);
+
+ void setTransStr(const OString& rTransStr);
+
+ enum SDFPARTS { PROJECT, SOURCEFILE, DUMMY, RESOURCETYPE, GROUPID,
+ LOCALID, HELPID, PLATFORM, WIDTH, LANGUAGEID,
+ TEXT, HELPTEXT, QUICKHELPTEXT, TITLE, TIMESTAMP };
+};
+
+
+
+
+class PoHeader: public PoEntry
+{
+
+private:
+ OString m_sExtractionSource;
+ OString m_sProjectIdVersion;
+ OString m_sReportMsgidBugsTo;
+ OString m_sPotCreationDate;
+ OString m_sPoRevisionDate;
+ OString m_sLastTranslator;
+ OString m_sLanguageTeam;
+ OString m_sMimeVersion;
+ OString m_sPluralForms;
+ OString m_sContentType;
+ OString m_sCharset;
+ OString m_sEncoding;
+ OString m_sXGenerator;
+ OString m_sXAcceleratorMarker;
+
+public:
+ PoHeader( const OString& rExtSrc );
+ ~PoHeader();
+};
+
+#endif // _PO_INCLUDED
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */