summaryrefslogtreecommitdiffstats
path: root/src/kvilib/system/kvi_locale.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kvilib/system/kvi_locale.cpp')
-rw-r--r--src/kvilib/system/kvi_locale.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/src/kvilib/system/kvi_locale.cpp b/src/kvilib/system/kvi_locale.cpp
index 3ee2ef82..d4f89cc1 100644
--- a/src/kvilib/system/kvi_locale.cpp
+++ b/src/kvilib/system/kvi_locale.cpp
@@ -33,7 +33,7 @@
#define _KVI_LOCALE_CPP_
#include "kvi_locale.h"
-#include <tqglobal.h> //for debug()
+#include <tqglobal.h> //for tqDebug()
#include <tqtextcodec.h>
#include <tqdir.h>
@@ -287,14 +287,14 @@ public:
g_pUtf8TextCodec = TQTextCodec::codecForName("UTF-8");
if(!g_pUtf8TextCodec)
{
- debug("Can't find the global utf8 text codec!");
+ tqDebug("Can't find the global utf8 text codec!");
g_pUtf8TextCodec = TQTextCodec::codecForLocale(); // try anything else...
}
}
m_pRecvCodec = TQTextCodec::codecForName(szChildCodecName);
if(!m_pRecvCodec)
{
- debug("Can't find the codec for name %s (composite codec creation)",szName);
+ tqDebug("Can't find the codec for name %s (composite codec creation)",szName);
m_pRecvCodec = g_pUtf8TextCodec;
}
if(bSendInUtf8)
@@ -495,7 +495,7 @@ bool KviMessageCatalogue::load(const TQString& name)
KviFile f(szCatalogueFile);
if(!f.openForReading())
{
- debug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("[KviLocale]: Failed to open the messages file %s: probably doesn't exist",KviTQString::toUtf8(szCatalogueFile).data());
return false;
}
@@ -503,7 +503,7 @@ bool KviMessageCatalogue::load(const TQString& name)
if(f.readBlock((char *)&hdr,sizeof(GnuMoFileHeader)) < (int)sizeof(GnuMoFileHeader))
{
- debug("KviLocale: Failed to read header of %s",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Failed to read header of %s",KviTQString::toUtf8(szCatalogueFile).data());
f.close();
return false;
}
@@ -514,10 +514,10 @@ bool KviMessageCatalogue::load(const TQString& name)
{
if(hdr.magic == KVI_LOCALE_MAGIC_SWAPPED)
{
- debug("KviLocale: Swapped magic for file %s: swapping data too",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Swapped magic for file %s: swapping data too",KviTQString::toUtf8(szCatalogueFile).data());
bMustSwap = true;
} else {
- debug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Bad locale magic for file %s: not a *.mo file ?",KviTQString::toUtf8(szCatalogueFile).data());
f.close();
return false;
}
@@ -525,7 +525,7 @@ bool KviMessageCatalogue::load(const TQString& name)
if(KVI_SWAP_IF_NEEDED(bMustSwap,hdr.revision) != MO_REVISION_NUMBER)
{
- debug("KviLocale: Invalid *.mo file revision number for file %s",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Invalid *.mo file revision number for file %s",KviTQString::toUtf8(szCatalogueFile).data());
f.close();
return false;
}
@@ -534,14 +534,14 @@ bool KviMessageCatalogue::load(const TQString& name)
if(numberOfStrings <= 0)
{
- debug("KviLocale: No translated messages found in file %s",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: No translated messages found in file %s",KviTQString::toUtf8(szCatalogueFile).data());
f.close();
return false;
}
if(numberOfStrings >= 9972)
{
- debug("Number of strings too big...sure that it is a KVIrc catalog file ?");
+ tqDebug("Number of strings too big...sure that it is a KVIrc catalog file ?");
numberOfStrings = 9972;
}
@@ -554,7 +554,7 @@ bool KviMessageCatalogue::load(const TQString& name)
// FIXME: maybe read it in blocks eh ?
if(f.readBlock(buffer,fSize) < (int)fSize)
{
- debug("KviLocale: Error while reading the translation file %s",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Error while reading the translation file %s",KviTQString::toUtf8(szCatalogueFile).data());
kvi_free(buffer);
f.close();
return false;
@@ -563,7 +563,7 @@ bool KviMessageCatalogue::load(const TQString& name)
// Check for broken *.mo files
if(fSize < (24 + (sizeof(GnuMoStringDescriptor) * numberOfStrings)))
{
- debug("KviLocale: Broken translation file %s (too small for all descriptors)",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Broken translation file %s (too small for all descriptors)",KviTQString::toUtf8(szCatalogueFile).data());
kvi_free(buffer);
f.close();
return false;
@@ -578,7 +578,7 @@ bool KviMessageCatalogue::load(const TQString& name)
if(fSize < (unsigned int)expectedFileSize)
{
- debug("KviLocale: Broken translation file %s (too small for all the message strings)",KviTQString::toUtf8(szCatalogueFile).data());
+ tqDebug("KviLocale: Broken translation file %s (too small for all the message strings)",KviTQString::toUtf8(szCatalogueFile).data());
kvi_free(buffer);
f.close();
return false;
@@ -597,9 +597,9 @@ bool KviMessageCatalogue::load(const TQString& name)
for(int i=0;i < numberOfStrings;i++)
{
// FIXME: "Check for NULL inside strings here ?"
- //debug("original seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].offset),
+ //tqDebug("original seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].offset),
// KVI_SWAP_IF_NEEDED(bMustSwap,origDescriptor[i].length));
- //debug("translated seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].offset),
+ //tqDebug("translated seems to be at %u and %u byttes long",KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].offset),
// KVI_SWAP_IF_NEEDED(bMustSwap,transDescriptor[i].length));
KviTranslationEntry * e = new KviTranslationEntry(
@@ -639,8 +639,8 @@ bool KviMessageCatalogue::load(const TQString& name)
m_pTextCodec = KviLocale::codecForName(szHeader.ptr());
if(!m_pTextCodec)
{
- debug("Can't find the codec for charset=%s",szHeader.ptr());
- debug("Falling back to codecForLocale()");
+ tqDebug("Can't find the codec for charset=%s",szHeader.ptr());
+ tqDebug("Falling back to codecForLocale()");
m_pTextCodec = TQTextCodec::codecForLocale();
}
}
@@ -648,8 +648,8 @@ bool KviMessageCatalogue::load(const TQString& name)
if(!m_pTextCodec)
{
- debug("The message catalogue does not have a \"charset\" header");
- debug("Assuming utf8"); // FIXME: or codecForLocale() ?
+ tqDebug("The message catalogue does not have a \"charset\" header");
+ tqDebug("Assuming utf8"); // FIXME: or codecForLocale() ?
m_pTextCodec = TQTextCodec::codecForName("UTF-8");
}
@@ -871,7 +871,7 @@ namespace KviLocale
bool loadCatalogue(const TQString &name,const TQString &szLocaleDir)
{
- //debug("Looking up catalogue %s",name);
+ //tqDebug("Looking up catalogue %s",name);
if(g_pCatalogueDict->find(KviTQString::toUtf8(name).data()))return true; // already loaded
TQString szBuffer;
@@ -881,7 +881,7 @@ namespace KviLocale
KviMessageCatalogue * c = new KviMessageCatalogue();
if(c->load(szBuffer))
{
- //debug("KviLocale: loaded catalogue %s",name);
+ //tqDebug("KviLocale: loaded catalogue %s",name);
g_pCatalogueDict->insert(KviTQString::toUtf8(name).data(),c);
return true;
}
@@ -891,7 +891,7 @@ namespace KviLocale
bool unloadCatalogue(const TQString &name)
{
- //debug("Unloading catalogue : %s",name);
+ //tqDebug("Unloading catalogue : %s",name);
return g_pCatalogueDict->remove(KviTQString::toUtf8(name).data());
}
@@ -1011,10 +1011,10 @@ namespace KviLocale
kvi_strEqualCI(szTmp.ptr(),"posix")))
{
// FIXME: THIS IS NO LONGER VALID!!!
- debug("Can't find the catalogue for locale \"%s\" (%s)",g_szLang.ptr(),szTmp.ptr());
- debug("There is no such translation or the $LANG variable was incorrectly set");
- debug("You can use $KVIRC_LANG to override the catalogue name");
- debug("For example you can set KVIRC_LANG to it_IT to force usage of the it.mo catalogue");
+ tqDebug("Can't find the catalogue for locale \"%s\" (%s)",g_szLang.ptr(),szTmp.ptr());
+ tqDebug("There is no such translation or the $LANG variable was incorrectly set");
+ tqDebug("You can use $KVIRC_LANG to override the catalogue name");
+ tqDebug("For example you can set KVIRC_LANG to it_IT to force usage of the it.mo catalogue");
}
}
}