22 #include "common/str.h" 23 #include "common/file.h" 25 #ifndef COMMON_FORMATS_PO_PARSER_H 26 #define COMMON_FORMATS_PO_PARSER_H 38 void insert(
const char *msg);
39 int findIndex(
const char *msg);
42 const char *operator[](
int)
const;
58 PlainPoMessageEntry(
const char *translation,
const char *message,
const char *context = NULL) : msgstr(NULL), msgid(NULL), msgctxt(NULL) {
59 if (translation != NULL && *translation !=
'\0') {
60 size_t len = 1 + strlen(translation);
61 msgstr =
new char[len];
64 if (message != NULL && *message !=
'\0') {
65 size_t len = 1 + strlen(translation);
66 msgid =
new char[len];
69 if (context != NULL && *context !=
'\0') {
70 size_t len = 1 + strlen(translation);
71 msgctxt =
new char[len];
89 void addMessageEntry(
const char *translation,
const char *message,
const char *context = NULL);
91 const char *language()
const;
92 const char *languageName()
const;
111 char *stripLine(
char *);
112 char *parseLine(
const char *line,
const char *field);
116 #endif // COMMON_FORMATS_PO_PARSER_H size_t strlcpy(char *dst, const char *src, size_t size)
Definition: algorithm.h:29
Definition: po_parser.h:84
Definition: po_parser.h:33
Definition: po_parser.h:53