-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPoReader.h
55 lines (43 loc) · 1.31 KB
/
PoReader.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef PO_READER_H
#define PO_READER_H
#include <glibmm.h>
#include <gettext-po.h>
#include <vector>
typedef std::vector<Glib::ustring> MsgContainer;
class PoReader {
public:
PoReader(const Glib::ustring &file_path);
Glib::ustring getHeader(const Glib::ustring &header_name);
void setHeader(const Glib::ustring &name, const Glib::ustring &value);
Glib::ustring getEncoding();
Glib::ustring getMsgid();
Glib::ustring getMsgstr();
void setMsgstr(const Glib::ustring &msg);
Glib::ustring getMsgctx();
void setMsgctx(const Glib::ustring &msgctx);
Glib::ustring getExtractedComments();
Glib::ustring getComments();
void setComments(const Glib::ustring &comments);
bool isFuzzy();
void setFuzzy(bool fuzzines);
bool isTranslated();
bool isCFormat();
bool isObsolete();
size_t getMessageNumber();
guint getPluralFormsNumber();
MsgContainer getFilesUsage();
MsgContainer getMsgstrPlural();
void setMsgstrPlural(MsgContainer msgs);
bool jumpTo(size_t msg_number);
bool nextMessage();
bool previousMessage();
void saveToFile(const Glib::ustring &out_fname);
~PoReader();
private:
po_file_t m_pofile;
Glib::ustring m_file_encoding;
po_message_iterator_t m_miter;
po_message_t m_current_msg;
size_t m_msg_number;
};
#endif /* PO_READER_H */