Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : */
9 :
10 : #ifndef _STRINGMERGE_INCLUDED
11 : #define _STRINGMERGE_INCLUDED
12 :
13 : #include <libxml/tree.h>
14 : #include <rtl/string.hxx>
15 : #include <vector>
16 :
17 : /** Class for Android strings.xml localization
18 :
19 : Parse strings.xml files, extract translatable strings
20 : and merge translated strings.
21 : */
22 : class StringParser
23 : {
24 : private:
25 : xmlDocPtr m_pSource;
26 : OString m_sLang;
27 : bool m_bIsInitialized;
28 :
29 : public:
30 : StringParser(
31 : const OString& rInputFile, const OString& rLang );
32 : ~StringParser();
33 :
34 0 : bool isInitialized() const { return m_bIsInitialized; }
35 : void Extract( const OString& rPOFile );
36 : void Merge(
37 : const OString &rMergeSrc, const OString &rDestinationFile );
38 : };
39 :
40 : #endif //_STRINGMERGE_INCLUDED
41 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|