ManaPlus
translationmanager.h
Go to the documentation of this file.
1 /*
2  * The ManaPlus Client
3  * Copyright (C) 2012-2019 The ManaPlus Developers
4  * Copyright (C) 2019-2021 Andrei Karas
5  *
6  * This file is part of The ManaPlus Client.
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef UTILS_TRANSLATION_TRANSLATIONMANAGER_H
23 #define UTILS_TRANSLATION_TRANSLATIONMANAGER_H
24 
25 #include "localconsts.h"
26 
27 #include "utils/langs.h"
28 #include "utils/stringvector.h"
29 
30 class PoDict;
31 
33 {
34  public:
36 
37  static PoDict *loadLang(const LangVect &lang,
38  const std::string &subName,
39  PoDict *const dict);
40 
41  static void init();
42 
43  static void close();
44 
45  static void loadCurrentLang();
46 
47  static void loadDictionaryLang();
48 
49 #ifdef ENABLE_CUSTOMNLS
50  static void loadGettextLang();
51 #endif // ENABLE_CUSTOMNLS
52 
53  static bool translateFile(const std::string &fileName,
54  PoDict *const dict,
55  StringVect &lines);
56  static PoDict *reverseLang(const PoDict *const dict);
57 };
58 
59 #endif // UTILS_TRANSLATION_TRANSLATIONMANAGER_H
Definition: podict.h:33
static void loadCurrentLang()
static PoDict * reverseLang(const PoDict *const dict)
static PoDict * loadLang(const LangVect &lang, const std::string &subName, PoDict *const dict)
static bool translateFile(const std::string &fileName, PoDict *const dict, StringVect &lines)
static void loadDictionaryLang()
std::vector< std::string > LangVect
Definition: langs.h:31
#define final
Definition: localconsts.h:46
#define A_DELETE_COPY(func)
Definition: localconsts.h:53
std::vector< std::string > StringVect
Definition: stringvector.h:29
std::string fileName
Definition: testmain.cpp:39