mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
17fbb6b17f
Interpreting UTF8 encoded strings using tr() instead of trUtf8() and encoding the string back to utf8 again leads to serious encoding errors. Fixes #230 Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
18 lines
358 B
C++
18 lines
358 B
C++
#ifndef GETTEXTFROMC_H
|
|
#define GETTEXTFROMC_H
|
|
|
|
#include <QHash>
|
|
|
|
extern "C" const char *trGettext(const char *text);
|
|
|
|
class gettextFromC
|
|
{
|
|
Q_DECLARE_TR_FUNCTIONS(gettextFromC)
|
|
public:
|
|
static gettextFromC *instance();
|
|
const char *trGettext(const char *text);
|
|
void reset(void);
|
|
QHash <QByteArray, QByteArray> translationCache;
|
|
};
|
|
|
|
#endif // GETTEXTFROMC_H
|