![]() |
KVIrc 5.2.6
Developer APIs
|
The KviMessageCatalogue class. More...
#include <KviMessageCatalogue.h>
Public Member Functions | |
KviMessageCatalogue () | |
Creates an instance of KviMessageCatalogue. | |
bool | load (const QString &szName) |
const char * | translate (const char *pcText) |
Translates the string. | |
const QString & | translateToQString (const char *pcText) |
Translates the string. | |
~KviMessageCatalogue () | |
Destroys the instance of KviMessageCatalogue and frees all the relevant resources. | |
Protected Attributes | |
KviPointerHashTable< const char *, KviTranslationEntry > * | m_pMessages |
QTextCodec * | m_pTextCodec |
The KviMessageCatalogue class.
This file was originally part of KviLocale.h
KviMessageCatalogue::KviMessageCatalogue | ( | ) |
Creates an instance of KviMessageCatalogue.
References m_pMessages, and m_pTextCodec.
KviMessageCatalogue::~KviMessageCatalogue | ( | ) |
Destroys the instance of KviMessageCatalogue and frees all the relevant resources.
References m_pMessages.
bool KviMessageCatalogue::load | ( | const QString & | szName | ) |
szName |
References KviMemory::allocate(), e, f, KviMemory::free(), i, kvi_getFirstBiggerPrime(), KVI_LOCALE_MAGIC, KVI_LOCALE_MAGIC_SWAPPED, KVI_SWAP_IF_NEEDED, m_pMessages, GnuMoFileHeader::magic, MO_REVISION_NUMBER, GnuMoFileHeader::nstrings, GnuMoFileHeader::orig_tab_offset, GnuMoFileHeader::revision, and GnuMoFileHeader::trans_tab_offset.
Referenced by KviLocale::loadCatalogue().
const char * KviMessageCatalogue::translate | ( | const char * | pcText | ) |
Translates the string.
pcText | The text to translate |
References m_pMessages, KviTranslationEntry::m_szEncodedTranslation, and KviCString::ptr().
Referenced by KviLocale::translate().
const QString & KviMessageCatalogue::translateToQString | ( | const char * | pcText | ) |
Translates the string.
pcText | The text to translate |
References m_pMessages, m_pTextCodec, KviTranslationEntry::m_pTranslation, KviTranslationEntry::m_szEncodedTranslation, KviTranslationEntry::m_szKey, and KviCString::ptr().
Referenced by KviKvsCoreFunctions::KVSCF(), and KviLocale::translateToQString().
|
protected |
Referenced by KviMessageCatalogue(), load(), translate(), translateToQString(), and ~KviMessageCatalogue().
|
protected |
Referenced by KviMessageCatalogue(), and translateToQString().