summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 08:17:52 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-01 08:17:52 -0600
commit59d153016be1e09cb31cdb18bef0a649acfc6292 (patch)
treefafdc23d953adf8367366eeb74ea9b67b23c11ae /tdecore
parent8bc199f487aad2badc9a54c2105f13fff3da7295 (diff)
downloadtdelibs-59d153016be1e09cb31cdb18bef0a649acfc6292.tar.gz
tdelibs-59d153016be1e09cb31cdb18bef0a649acfc6292.zip
Rename KLocale to enhance compatibility with KDE4
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/kaboutdata.cpp2
-rw-r--r--tdecore/kcalendarsystem.cpp6
-rw-r--r--tdecore/kcalendarsystem.h6
-rw-r--r--tdecore/kcalendarsystemfactory.cpp2
-rw-r--r--tdecore/kcalendarsystemfactory.h4
-rw-r--r--tdecore/kcalendarsystemgregorian.cpp2
-rw-r--r--tdecore/kcalendarsystemgregorian.h4
-rw-r--r--tdecore/kcalendarsystemhebrew.cpp2
-rw-r--r--tdecore/kcalendarsystemhebrew.h4
-rw-r--r--tdecore/kcalendarsystemhijri.cpp2
-rw-r--r--tdecore/kcalendarsystemhijri.h4
-rw-r--r--tdecore/kcalendarsystemjalali.cpp2
-rw-r--r--tdecore/kcalendarsystemjalali.h2
-rw-r--r--tdecore/kcatalogue.h2
-rw-r--r--tdecore/kdebug.areas2
-rw-r--r--tdecore/kdebugrc2
-rw-r--r--tdecore/kglobal.cpp6
-rw-r--r--tdecore/kglobal.h6
-rw-r--r--tdecore/klocale.cpp286
-rw-r--r--tdecore/klocale.h46
-rw-r--r--tdecore/kstandarddirs.h2
-rw-r--r--tdecore/tde-config.cpp.cmake4
-rw-r--r--tdecore/tde-config.cpp.in4
-rw-r--r--tdecore/tdeconfigbackend.cpp12
-rw-r--r--tdecore/tdeconfigbackend.h6
-rw-r--r--tdecore/tdeconfigbase.cpp2
-rw-r--r--tdecore/tests/kcalendartest.cpp8
-rw-r--r--tdecore/tests/kcmdlineargstest.cpp2
-rw-r--r--tdecore/tests/klocaletest.cpp10
-rw-r--r--tdecore/tests/klocaletest.h2
30 files changed, 222 insertions, 222 deletions
diff --git a/tdecore/kaboutdata.cpp b/tdecore/kaboutdata.cpp
index 2add13022..fd7cce483 100644
--- a/tdecore/kaboutdata.cpp
+++ b/tdecore/kaboutdata.cpp
@@ -267,7 +267,7 @@ TDEAboutData::internalProgramName() const
}
// KCrash should call as few things as possible and should avoid e.g. malloc()
-// because it may deadlock. Since i18n() needs it, when KLocale is available
+// because it may deadlock. Since i18n() needs it, when TDELocale is available
// the i18n() call will be done here in advance.
void
TDEAboutData::translateInternalProgramName() const
diff --git a/tdecore/kcalendarsystem.cpp b/tdecore/kcalendarsystem.cpp
index ab38dc4ca..39331e170 100644
--- a/tdecore/kcalendarsystem.cpp
+++ b/tdecore/kcalendarsystem.cpp
@@ -30,10 +30,10 @@
class KCalendarSystemPrivate
{
public:
- const KLocale * locale;
+ const TDELocale * locale;
};
-KCalendarSystem::KCalendarSystem(const KLocale * locale)
+KCalendarSystem::KCalendarSystem(const TDELocale * locale)
: d(new KCalendarSystemPrivate)
{
d->locale = locale;
@@ -44,7 +44,7 @@ KCalendarSystem::~KCalendarSystem()
delete d;
}
-const KLocale * KCalendarSystem::locale() const
+const TDELocale * KCalendarSystem::locale() const
{
if ( d->locale )
return d->locale;
diff --git a/tdecore/kcalendarsystem.h b/tdecore/kcalendarsystem.h
index bd936336c..bd3fbe4ff 100644
--- a/tdecore/kcalendarsystem.h
+++ b/tdecore/kcalendarsystem.h
@@ -25,7 +25,7 @@
#include <tqstring.h>
#include "tdelibs_export.h"
-class KLocale;
+class TDELocale;
class KCalendarSystemPrivate;
@@ -47,7 +47,7 @@ public:
*
* @param locale It will use this locale for translations, 0 means global.
*/
- KCalendarSystem(const KLocale * locale = 0);
+ KCalendarSystem(const TDELocale * locale = 0);
/**
* Descructor.
@@ -348,7 +348,7 @@ protected:
* Gets the locale the calendar uses for translations. Set in
* the constructor.
*/
- const KLocale * locale() const;
+ const TDELocale * locale() const;
private:
KCalendarSystemPrivate * d;
diff --git a/tdecore/kcalendarsystemfactory.cpp b/tdecore/kcalendarsystemfactory.cpp
index 723873497..d3bd166e0 100644
--- a/tdecore/kcalendarsystemfactory.cpp
+++ b/tdecore/kcalendarsystemfactory.cpp
@@ -41,7 +41,7 @@ KCalendarSystemFactory::~KCalendarSystemFactory()
}
KCalendarSystem *KCalendarSystemFactory::create( const TQString &calType,
- const KLocale * locale )
+ const TDELocale * locale )
{
if ( calType == "hebrew" )
return new KCalendarSystemHebrew(locale);
diff --git a/tdecore/kcalendarsystemfactory.h b/tdecore/kcalendarsystemfactory.h
index 6ebba1573..96aef1c4a 100644
--- a/tdecore/kcalendarsystemfactory.h
+++ b/tdecore/kcalendarsystemfactory.h
@@ -26,7 +26,7 @@
#include "tdelibs_export.h"
class KCalendarSystem;
-class KLocale;
+class TDELocale;
/**
* Factory class for calendar types
@@ -50,7 +50,7 @@ public:
* @return a KCalendarSystem object
*/
static KCalendarSystem *create (const TQString & calType = TQString::fromLatin1("gregorian"),
- const KLocale * locale = 0);
+ const TDELocale * locale = 0);
/**
* Gets list of names of supported calendar systems
diff --git a/tdecore/kcalendarsystemgregorian.cpp b/tdecore/kcalendarsystemgregorian.cpp
index 38ee1014a..ead1aca66 100644
--- a/tdecore/kcalendarsystemgregorian.cpp
+++ b/tdecore/kcalendarsystemgregorian.cpp
@@ -29,7 +29,7 @@
#include "kcalendarsystemgregorian.h"
-KCalendarSystemGregorian::KCalendarSystemGregorian(const KLocale * locale)
+KCalendarSystemGregorian::KCalendarSystemGregorian(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemgregorian.h b/tdecore/kcalendarsystemgregorian.h
index 98fd10e90..34c9ecde3 100644
--- a/tdecore/kcalendarsystemgregorian.h
+++ b/tdecore/kcalendarsystemgregorian.h
@@ -35,7 +35,7 @@ class KCalendarSystemGregorianPrivate;
* The Gregorian calender is the most used calendar today. The first year in
* the calendar is set to the birth of Christ.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Carlos Moro <cfmoro@correo.uniovi.es>
* @since 3.2
@@ -44,7 +44,7 @@ class TDECORE_EXPORT KCalendarSystemGregorian: public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemGregorian (const KLocale * locale = 0);
+ KCalendarSystemGregorian (const TDELocale * locale = 0);
virtual ~KCalendarSystemGregorian ();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemhebrew.cpp b/tdecore/kcalendarsystemhebrew.cpp
index 2824445bb..a0db927f4 100644
--- a/tdecore/kcalendarsystemhebrew.cpp
+++ b/tdecore/kcalendarsystemhebrew.cpp
@@ -259,7 +259,7 @@ static bool is_leap_year(int year)
}
// Ok
-KCalendarSystemHebrew::KCalendarSystemHebrew(const KLocale * locale)
+KCalendarSystemHebrew::KCalendarSystemHebrew(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemhebrew.h b/tdecore/kcalendarsystemhebrew.h
index 728954c58..1482c1a80 100644
--- a/tdecore/kcalendarsystemhebrew.h
+++ b/tdecore/kcalendarsystemhebrew.h
@@ -37,7 +37,7 @@ class KCalendarSystemHebrewPrivate;
* The Hebrew calendar is the traditional Islamic calendar used in the Midle
* East.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Hans Petter Bieker <bieker@kde.org>
* @since 3.2
@@ -46,7 +46,7 @@ class TDECORE_EXPORT KCalendarSystemHebrew : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemHebrew(const KLocale * locale = 0);
+ KCalendarSystemHebrew(const TDELocale * locale = 0);
virtual ~KCalendarSystemHebrew();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemhijri.cpp b/tdecore/kcalendarsystemhijri.cpp
index a6487060e..8c9fac471 100644
--- a/tdecore/kcalendarsystemhijri.cpp
+++ b/tdecore/kcalendarsystemhijri.cpp
@@ -178,7 +178,7 @@ static void gregorianToHijri(const TQDate & date, int * pYear, int * pMonth,
*pDay = islamic.getDay();
}
-KCalendarSystemHijri::KCalendarSystemHijri(const KLocale * locale)
+KCalendarSystemHijri::KCalendarSystemHijri(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemhijri.h b/tdecore/kcalendarsystemhijri.h
index 444f938c7..0ba1e52df 100644
--- a/tdecore/kcalendarsystemhijri.h
+++ b/tdecore/kcalendarsystemhijri.h
@@ -35,7 +35,7 @@ class KCalendarSystemHijriPrivate;
* The Hijri calendar is the traditional Islamic calendar used in the Midle
* East.
*
- * @see KLocale,KCalendarSystem,KCalendarSystemFactory
+ * @see TDELocale,KCalendarSystem,KCalendarSystemFactory
*
* @author Carlos Moro <cfmoro@correo.uniovi.es>
* @since 3.2
@@ -44,7 +44,7 @@ class TDECORE_EXPORT KCalendarSystemHijri : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemHijri(const KLocale * locale = 0);
+ KCalendarSystemHijri(const TDELocale * locale = 0);
virtual ~KCalendarSystemHijri();
virtual int year (const TQDate & date) const;
diff --git a/tdecore/kcalendarsystemjalali.cpp b/tdecore/kcalendarsystemjalali.cpp
index 29798a1dd..559ebb39c 100644
--- a/tdecore/kcalendarsystemjalali.cpp
+++ b/tdecore/kcalendarsystemjalali.cpp
@@ -200,7 +200,7 @@ static int hndays(int m,int y)
}
-KCalendarSystemJalali::KCalendarSystemJalali(const KLocale * locale)
+KCalendarSystemJalali::KCalendarSystemJalali(const TDELocale * locale)
: KCalendarSystem(locale)
{
}
diff --git a/tdecore/kcalendarsystemjalali.h b/tdecore/kcalendarsystemjalali.h
index e5dd56681..8f9c4ddb9 100644
--- a/tdecore/kcalendarsystemjalali.h
+++ b/tdecore/kcalendarsystemjalali.h
@@ -37,7 +37,7 @@ class TDECORE_EXPORT KCalendarSystemJalali : public KCalendarSystem
{
public:
/** Constructor. Just like KCalendarSystem::KCalendarSystem(). */
- KCalendarSystemJalali(const KLocale * locale = 0);
+ KCalendarSystemJalali(const TDELocale * locale = 0);
virtual ~KCalendarSystemJalali();
diff --git a/tdecore/kcatalogue.h b/tdecore/kcatalogue.h
index be918789d..04ba4594b 100644
--- a/tdecore/kcatalogue.h
+++ b/tdecore/kcatalogue.h
@@ -31,7 +31,7 @@ class KCataloguePrivate;
* This class abstracts a gettext message catalog. It will take care of
* opening the file and reading the catalog.
*
- * @see KLocale
+ * @see TDELocale
*/
//REVISED: hausmann
class TDECORE_EXPORT KCatalogue
diff --git a/tdecore/kdebug.areas b/tdecore/kdebug.areas
index bb4990920..67a027c88 100644
--- a/tdecore/kdebug.areas
+++ b/tdecore/kdebug.areas
@@ -17,7 +17,7 @@
170 tdecore (KNetwork socket)
171 tdecore (KSocks)
172 tdecore (TDEStartupInfo)
-173 tdecore (KLocale)
+173 tdecore (TDELocale)
174 tdecore (KProcIO)
175 tdecore (TDEProcess)
176 tdecore (KWin)
diff --git a/tdecore/kdebugrc b/tdecore/kdebugrc
index 6bbca7d66..c697da031 100644
--- a/tdecore/kdebugrc
+++ b/tdecore/kdebugrc
@@ -48,7 +48,7 @@ InfoOutput=4
[172]
InfoOutput=4
-# KLocale debug info off
+# TDELocale debug info off
[173]
InfoOutput=4
diff --git a/tdecore/kglobal.cpp b/tdecore/kglobal.cpp
index 7b492b5a8..9d39c0d6c 100644
--- a/tdecore/kglobal.cpp
+++ b/tdecore/kglobal.cpp
@@ -101,7 +101,7 @@ TDEInstance *TDEGlobal::instance()
return _instance;
}
-KLocale *TDEGlobal::locale()
+TDELocale *TDEGlobal::locale()
{
if( _locale == 0 ) {
if (!_instance)
@@ -109,7 +109,7 @@ KLocale *TDEGlobal::locale()
kglobal_init();
// will set _locale if it works - otherwise 0 is returned
- KLocale::initInstance();
+ TDELocale::initInstance();
if( _instance->aboutData())
_instance->aboutData()->translateInternalProgramName();
}
@@ -217,7 +217,7 @@ TDEGlobal::deleteStaticDeleters()
KStringDict *TDEGlobal::_stringDict = 0;
TDEInstance *TDEGlobal::_instance = 0;
TDEInstance *TDEGlobal::_activeInstance = 0;
-KLocale *TDEGlobal::_locale = 0;
+TDELocale *TDEGlobal::_locale = 0;
KCharsets *TDEGlobal::_charsets = 0;
KStaticDeleterList *TDEGlobal::_staticDeleters = 0;
diff --git a/tdecore/kglobal.h b/tdecore/kglobal.h
index 4b727b281..90548d8b5 100644
--- a/tdecore/kglobal.h
+++ b/tdecore/kglobal.h
@@ -27,7 +27,7 @@ class TDESharedConfig;
class KIconLoader;
class TDEHardwareDevices;
class TDEGlobalNetworkManager;
-class KLocale;
+class TDELocale;
class TDEStandardDirs;
class KStaticDeleterBase;
class KStaticDeleterList;
@@ -95,7 +95,7 @@ public:
* Returns the global locale object.
* @return the global locale object
*/
- static KLocale *locale();
+ static TDELocale *locale();
/**
* The global charset manager.
@@ -168,7 +168,7 @@ public:
//private:
static KStringDict *_stringDict;
static TDEInstance *_instance;
- static KLocale *_locale;
+ static TDELocale *_locale;
static KCharsets *_charsets;
static KStaticDeleterList *_staticDeleters;
diff --git a/tdecore/klocale.cpp b/tdecore/klocale.cpp
index f7a3cf77a..3e169ba03 100644
--- a/tdecore/klocale.cpp
+++ b/tdecore/klocale.cpp
@@ -51,7 +51,7 @@ static const char * const SYSTEM_MESSAGES = "tdelibs";
static const char *maincatalogue = 0;
-class KLocalePrivate
+class TDELocalePrivate
{
public:
int weekStartDay;
@@ -65,7 +65,7 @@ public:
TDEConfig * config;
bool formatInited;
int /*TQPrinter::PageSize*/ pageSize;
- KLocale::MeasureSystem measureSystem;
+ TDELocale::MeasureSystem measureSystem;
TQStringList langTwoAlpha;
TDEConfig *languages;
@@ -79,11 +79,11 @@ public:
bool useMainCatalogue;
};
-static KLocale *this_klocale = 0;
+static TDELocale *this_klocale = 0;
-KLocale::KLocale( const TQString & catalog, TDEConfig * config )
+TDELocale::TDELocale( const TQString & catalog, TDEConfig * config )
{
- d = new KLocalePrivate;
+ d = new TDELocalePrivate;
d->config = config;
d->languages = 0;
d->calendar = 0;
@@ -103,7 +103,7 @@ KLocale::KLocale( const TQString & catalog, TDEConfig * config )
initMainCatalogues(catalog);
}
-TQString KLocale::_initLanguage(TDEConfigBase *config)
+TQString TDELocale::_initLanguage(TDEConfigBase *config)
{
if (this_klocale)
{
@@ -115,7 +115,7 @@ TQString KLocale::_initLanguage(TDEConfigBase *config)
return TQString::null;
}
-void KLocale::initMainCatalogues(const TQString & catalog)
+void TDELocale::initMainCatalogues(const TQString & catalog)
{
// Use the first non-null string.
TQString mainCatalogue = catalog;
@@ -128,7 +128,7 @@ void KLocale::initMainCatalogues(const TQString & catalog)
}
if (mainCatalogue.isEmpty()) {
- kdDebug(173) << "KLocale instance created called without valid "
+ kdDebug(173) << "TDELocale instance created called without valid "
<< "catalog! Give an argument or call setMainCatalogue "
<< "before init" << endl;
}
@@ -144,7 +144,7 @@ void KLocale::initMainCatalogues(const TQString & catalog)
}
}
-void KLocale::initLanguageList(TDEConfig * config, bool useEnv)
+void TDELocale::initLanguageList(TDEConfig * config, bool useEnv)
{
TDEConfigGroupSaver saver(config, "Locale");
@@ -193,7 +193,7 @@ void KLocale::initLanguageList(TDEConfig * config, bool useEnv)
setLanguage( languageList );
}
-void KLocale::initPluralTypes()
+void TDELocale::initPluralTypes()
{
for ( TQValueList<KCatalogue>::Iterator it = d->catalogues.begin();
it != d->catalogues.end();
@@ -206,7 +206,7 @@ void KLocale::initPluralTypes()
}
-int KLocale::pluralType( const TQString & language )
+int TDELocale::pluralType( const TQString & language )
{
for ( TQValueList<KCatalogue>::ConstIterator it = d->catalogues.begin();
it != d->catalogues.end();
@@ -220,7 +220,7 @@ int KLocale::pluralType( const TQString & language )
return -1;
}
-int KLocale::pluralType( const KCatalogue& catalog )
+int TDELocale::pluralType( const KCatalogue& catalog )
{
const char* pluralFormString =
I18N_NOOP("_: Dear translator, please do not translate this string "
@@ -285,28 +285,28 @@ int KLocale::pluralType( const KCatalogue& catalog )
}
}
-void KLocale::doFormatInit() const
+void TDELocale::doFormatInit() const
{
if ( d->formatInited ) return;
- KLocale * that = const_cast<KLocale *>(this);
+ TDELocale * that = const_cast<TDELocale *>(this);
that->initFormat();
d->formatInited = true;
}
-void KLocale::initFormat()
+void TDELocale::initFormat()
{
TDEConfig *config = d->config;
if (!config) config = TDEGlobal::instance()->config();
Q_ASSERT( config );
- kdDebug(173) << "KLocale::initFormat" << endl;
+ kdDebug(173) << "TDELocale::initFormat" << endl;
// make sure the config files are read using the correct locale
- // ### Why not add a TDEConfigBase::setLocale( const KLocale * )?
+ // ### Why not add a TDEConfigBase::setLocale( const TDELocale * )?
// ### Then we could remove this hack
- KLocale *lsave = TDEGlobal::_locale;
+ TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = this;
TDEConfigGroupSaver saver(config, "Locale");
@@ -388,7 +388,7 @@ void KLocale::initFormat()
TDEGlobal::_locale = lsave;
}
-bool KLocale::setCountry(const TQString & country)
+bool TDELocale::setCountry(const TQString & country)
{
// Check if the file exists too??
if ( country.isEmpty() )
@@ -401,7 +401,7 @@ bool KLocale::setCountry(const TQString & country)
return true;
}
-TQString KLocale::catalogueFileName(const TQString & language,
+TQString TDELocale::catalogueFileName(const TQString & language,
const KCatalogue & catalog)
{
TQString path = TQString::fromLatin1("%1/LC_MESSAGES/%2.mo")
@@ -415,7 +415,7 @@ TQString KLocale::catalogueFileName(const TQString & language,
return fileName;
}
-bool KLocale::setLanguage(const TQString & language)
+bool TDELocale::setLanguage(const TQString & language)
{
if ( d->languageList.contains( language ) ) {
d->languageList.remove( language );
@@ -433,7 +433,7 @@ bool KLocale::setLanguage(const TQString & language)
return true; // Maybe the mo-files for this language are empty, but in principle we can speak all languages
}
-bool KLocale::setLanguage(const TQStringList & languages)
+bool TDELocale::setLanguage(const TQStringList & languages)
{
TQStringList languageList( languages );
// This list might contain
@@ -484,7 +484,7 @@ bool KLocale::setLanguage(const TQStringList & languages)
return true; // we found something. Maybe it's only English, but we found something
}
-bool KLocale::isApplicationTranslatedInto( const TQString & language)
+bool TDELocale::isApplicationTranslatedInto( const TQString & language)
{
if ( language.isEmpty() ) {
return false;
@@ -518,7 +518,7 @@ bool KLocale::isApplicationTranslatedInto( const TQString & language)
return ! sAbsFileName.isEmpty();
}
-void KLocale::splitLocale(const TQString & aStr,
+void TDELocale::splitLocale(const TQString & aStr,
TQString & language,
TQString & country,
TQString & chrset)
@@ -551,17 +551,17 @@ void KLocale::splitLocale(const TQString & aStr,
language = str;
}
-TQString KLocale::language() const
+TQString TDELocale::language() const
{
return m_language;
}
-TQString KLocale::country() const
+TQString TDELocale::country() const
{
return m_country;
}
-TQString KLocale::monthName(int i, bool shortName) const
+TQString TDELocale::monthName(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -599,7 +599,7 @@ TQString KLocale::monthName(int i, bool shortName) const
return TQString::null;
}
-TQString KLocale::monthNamePossessive(int i, bool shortName) const
+TQString TDELocale::monthNamePossessive(int i, bool shortName) const
{
if ( shortName )
switch ( i )
@@ -637,12 +637,12 @@ TQString KLocale::monthNamePossessive(int i, bool shortName) const
return TQString::null;
}
-TQString KLocale::weekDayName (int i, bool shortName) const
+TQString TDELocale::weekDayName (int i, bool shortName) const
{
return calendar()->weekDayName(i, shortName);
}
-void KLocale::insertCatalogue( const TQString & catalog )
+void TDELocale::insertCatalogue( const TQString & catalog )
{
if ( !d->catalogNames.contains( catalog) ) {
d->catalogNames.append( catalog );
@@ -650,7 +650,7 @@ void KLocale::insertCatalogue( const TQString & catalog )
updateCatalogues( ); // evaluate the changed list and generate the neccessary KCatalog objects
}
-void KLocale::updateCatalogues( )
+void TDELocale::updateCatalogues( )
{
// some changes have occured. Maybe we have learned or forgotten some languages.
// Maybe the language precedence has changed.
@@ -691,7 +691,7 @@ void KLocale::updateCatalogues( )
-void KLocale::removeCatalogue(const TQString &catalog)
+void TDELocale::removeCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog )) {
d->catalogNames.remove( catalog );
@@ -700,7 +700,7 @@ void KLocale::removeCatalogue(const TQString &catalog)
}
}
-void KLocale::setActiveCatalogue(const TQString &catalog)
+void TDELocale::setActiveCatalogue(const TQString &catalog)
{
if ( d->catalogNames.contains( catalog ) ) {
d->catalogNames.remove( catalog );
@@ -709,7 +709,7 @@ void KLocale::setActiveCatalogue(const TQString &catalog)
}
}
-KLocale::~KLocale()
+TDELocale::~TDELocale()
{
delete d->calendar;
delete d->languages;
@@ -717,7 +717,7 @@ KLocale::~KLocale()
d = 0L;
}
-TQString KLocale::translate_priv(const char *msgid,
+TQString TDELocale::translate_priv(const char *msgid,
const char *fallback,
const char **translated,
int* pluralType ) const
@@ -727,7 +727,7 @@ TQString KLocale::translate_priv(const char *msgid,
}
if (!msgid || !msgid[0])
{
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -766,16 +766,16 @@ TQString KLocale::translate_priv(const char *msgid,
return TQString::fromUtf8( fallback );
}
-TQString KLocale::translate(const char* msgid) const
+TQString TDELocale::translate(const char* msgid) const
{
return translate_priv(msgid, msgid);
}
-TQString KLocale::translate( const char *index, const char *fallback) const
+TQString TDELocale::translate( const char *index, const char *fallback) const
{
if (!index || !index[0] || !fallback || !fallback[0])
{
- kdDebug(173) << "KLocale: trying to look up \"\" in catalog. "
+ kdDebug(173) << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -807,12 +807,12 @@ static TQString put_n_in(const TQString &orig, unsigned long n)
kdError() << "translation of \"" << singular << "\" doesn't contain " << x << " different plural forms as expected\n"; \
return TQString( "BROKEN TRANSLATION %1" ).arg( singular ); }
-TQString KLocale::translate( const char *singular, const char *plural,
+TQString TDELocale::translate( const char *singular, const char *plural,
unsigned long n ) const
{
if (!singular || !singular[0] || !plural || !plural[0])
{
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -960,11 +960,11 @@ TQString KLocale::translate( const char *singular, const char *plural,
return TQString::null;
}
-TQString KLocale::translateQt( const char *context, const char *source,
+TQString TDELocale::translateQt( const char *context, const char *source,
const char *message) const
{
if (!source || !source[0]) {
- kdWarning() << "KLocale: trying to look up \"\" in catalog. "
+ kdWarning() << "TDELocale: trying to look up \"\" in catalog. "
<< "Fix the program" << endl;
return TQString::null;
}
@@ -1004,97 +1004,97 @@ TQString KLocale::translateQt( const char *context, const char *source,
return TQString::null;
}
-bool KLocale::nounDeclension() const
+bool TDELocale::nounDeclension() const
{
doFormatInit();
return d->nounDeclension;
}
-bool KLocale::dateMonthNamePossessive() const
+bool TDELocale::dateMonthNamePossessive() const
{
doFormatInit();
return d->dateMonthNamePossessive;
}
-int KLocale::weekStartDay() const
+int TDELocale::weekStartDay() const
{
doFormatInit();
return d->weekStartDay;
}
-bool KLocale::weekStartsMonday() const //deprecated
+bool TDELocale::weekStartsMonday() const //deprecated
{
doFormatInit();
return (d->weekStartDay==1);
}
-TQString KLocale::decimalSymbol() const
+TQString TDELocale::decimalSymbol() const
{
doFormatInit();
return m_decimalSymbol;
}
-TQString KLocale::thousandsSeparator() const
+TQString TDELocale::thousandsSeparator() const
{
doFormatInit();
return m_thousandsSeparator;
}
-TQString KLocale::currencySymbol() const
+TQString TDELocale::currencySymbol() const
{
doFormatInit();
return m_currencySymbol;
}
-TQString KLocale::monetaryDecimalSymbol() const
+TQString TDELocale::monetaryDecimalSymbol() const
{
doFormatInit();
return m_monetaryDecimalSymbol;
}
-TQString KLocale::monetaryThousandsSeparator() const
+TQString TDELocale::monetaryThousandsSeparator() const
{
doFormatInit();
return m_monetaryThousandsSeparator;
}
-TQString KLocale::positiveSign() const
+TQString TDELocale::positiveSign() const
{
doFormatInit();
return m_positiveSign;
}
-TQString KLocale::negativeSign() const
+TQString TDELocale::negativeSign() const
{
doFormatInit();
return m_negativeSign;
}
-int KLocale::fracDigits() const
+int TDELocale::fracDigits() const
{
doFormatInit();
return m_fracDigits;
}
-bool KLocale::positivePrefixCurrencySymbol() const
+bool TDELocale::positivePrefixCurrencySymbol() const
{
doFormatInit();
return m_positivePrefixCurrencySymbol;
}
-bool KLocale::negativePrefixCurrencySymbol() const
+bool TDELocale::negativePrefixCurrencySymbol() const
{
doFormatInit();
return m_negativePrefixCurrencySymbol;
}
-KLocale::SignPosition KLocale::positiveMonetarySignPosition() const
+TDELocale::SignPosition TDELocale::positiveMonetarySignPosition() const
{
doFormatInit();
return m_positiveMonetarySignPosition;
}
-KLocale::SignPosition KLocale::negativeMonetarySignPosition() const
+TDELocale::SignPosition TDELocale::negativeMonetarySignPosition() const
{
doFormatInit();
return m_negativeMonetarySignPosition;
@@ -1127,7 +1127,7 @@ static void _insertSeparator(TQString &str, const TQString &separator,
str = mainPart + fracPart;
}
-TQString KLocale::formatMoney(double num,
+TQString TDELocale::formatMoney(double num,
const TQString & symbol,
int precision) const
{
@@ -1188,24 +1188,24 @@ TQString KLocale::formatMoney(double num,
return res;
}
-TQString KLocale::formatMoney(const TQString &numStr) const
+TQString TDELocale::formatMoney(const TQString &numStr) const
{
return formatMoney(numStr.toDouble());
}
-TQString KLocale::formatNumber(double num, int precision) const
+TQString TDELocale::formatNumber(double num, int precision) const
{
if (precision == -1) precision = 2;
// no need to round since TQString::number does this for us
return formatNumber(TQString::number(num, 'f', precision), false, 0);
}
-TQString KLocale::formatLong(long num) const
+TQString TDELocale::formatLong(long num) const
{
return formatNumber((double)num, 0);
}
-TQString KLocale::formatNumber(const TQString &numStr) const
+TQString TDELocale::formatNumber(const TQString &numStr) const
{
return formatNumber(numStr, true, 2);
}
@@ -1301,7 +1301,7 @@ static void _round(TQString &str, int precision)
if (precision == 0) str = str.section('.', 0, 0);
}
-TQString KLocale::formatNumber(const TQString &numStr, bool round,
+TQString TDELocale::formatNumber(const TQString &numStr, bool round,
int precision) const
{
TQString tmpString = numStr;
@@ -1335,7 +1335,7 @@ TQString KLocale::formatNumber(const TQString &numStr, bool round,
return mantString + expString;
}
-TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
+TQString TDELocale::formatDate(const TQDate &pDate, bool shortFormat) const
{
const TQString rst = shortFormat?dateFormatShort():dateFormat();
@@ -1410,12 +1410,12 @@ TQString KLocale::formatDate(const TQDate &pDate, bool shortFormat) const
return buffer;
}
-void KLocale::setMainCatalogue(const char *catalog)
+void TDELocale::setMainCatalogue(const char *catalog)
{
maincatalogue = catalog;
}
-double KLocale::readNumber(const TQString &_str, bool * ok) const
+double TDELocale::readNumber(const TQString &_str, bool * ok) const
{
TQString str = _str.stripWhiteSpace();
bool neg = str.find(negativeSign()) == 0;
@@ -1480,7 +1480,7 @@ double KLocale::readNumber(const TQString &_str, bool * ok) const
return tot.toDouble(ok);
}
-double KLocale::readMoney(const TQString &_str, bool * ok) const
+double TDELocale::readMoney(const TQString &_str, bool * ok) const
{
TQString str = _str.stripWhiteSpace();
bool neg = false;
@@ -1594,7 +1594,7 @@ static int readInt(const TQString &str, uint &pos)
return result;
}
-TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, bool* ok) const
{
TQDate date;
date = readDate(intstr, ShortFormat, ok);
@@ -1602,15 +1602,15 @@ TQDate KLocale::readDate(const TQString &intstr, bool* ok) const
return readDate(intstr, NormalFormat, ok);
}
-TQDate KLocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, ReadDateFlags flags, bool* ok) const
{
TQString fmt = ((flags & ShortFormat) ? dateFormatShort() : dateFormat()).simplifyWhiteSpace();
return readDate( intstr, fmt, ok );
}
-TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
+TQDate TDELocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok) const
{
- //kdDebug() << "KLocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
+ //kdDebug() << "TDELocale::readDate intstr=" << intstr << " fmt=" << fmt << endl;
TQString str = intstr.simplifyWhiteSpace().lower();
int day = -1, month = -1;
// allow the year to be omitted if not in the format
@@ -1722,7 +1722,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
error = true;
}
- //kdDebug(173) << "KLocale::readDate day=" << day << " month=" << month << " year=" << year << endl;
+ //kdDebug(173) << "TDELocale::readDate day=" << day << " month=" << month << " year=" << year << endl;
if ( year != -1 && month != -1 && day != -1 && !error)
{
if (ok) *ok = true;
@@ -1739,7 +1739,7 @@ TQDate KLocale::readDate(const TQString &intstr, const TQString &fmt, bool* ok)
}
}
-TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
+TQTime TDELocale::readTime(const TQString &intstr, bool *ok) const
{
TQTime _time;
_time = readTime(intstr, WithSeconds, ok);
@@ -1747,7 +1747,7 @@ TQTime KLocale::readTime(const TQString &intstr, bool *ok) const
return readTime(intstr, WithoutSeconds, ok);
}
-TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
+TQTime TDELocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok) const
{
TQString str = intstr.simplifyWhiteSpace().lower();
TQString Format = timeFormat().simplifyWhiteSpace();
@@ -1855,12 +1855,12 @@ TQTime KLocale::readTime(const TQString &intstr, ReadTimeFlags flags, bool *ok)
}
//BIC: merge with below
-TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs) const
+TQString TDELocale::formatTime(const TQTime &pTime, bool includeSecs) const
{
return formatTime( pTime, includeSecs, false );
}
-TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
+TQString TDELocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDuration) const
{
const TQString rst = timeFormat();
@@ -1946,7 +1946,7 @@ TQString KLocale::formatTime(const TQTime &pTime, bool includeSecs, bool isDurat
return ret;
}
-bool KLocale::use12Clock() const
+bool TDELocale::use12Clock() const
{
if ((timeFormat().contains(TQString::fromLatin1("%I")) > 0) ||
(timeFormat().contains(TQString::fromLatin1("%l")) > 0))
@@ -1955,17 +1955,17 @@ bool KLocale::use12Clock() const
return false;
}
-TQString KLocale::languages() const
+TQString TDELocale::languages() const
{
return d->languageList.join( TQString::fromLatin1(":") );
}
-TQStringList KLocale::languageList() const
+TQStringList TDELocale::languageList() const
{
return d->languageList;
}
-TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
+TQString TDELocale::formatDateTime(const TQDateTime &pDateTime,
bool shortFormat,
bool includeSeconds) const
{
@@ -1976,7 +1976,7 @@ TQString KLocale::formatDateTime(const TQDateTime &pDateTime,
TQString i18n(const char* text)
{
- register KLocale *instance = TDEGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(text);
return TQString::fromUtf8(text);
@@ -1984,7 +1984,7 @@ TQString i18n(const char* text)
TQString i18n(const char* index, const char *text)
{
- register KLocale *instance = TDEGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(index, text);
return TQString::fromUtf8(text);
@@ -1992,7 +1992,7 @@ TQString i18n(const char* index, const char *text)
TQString i18n(const char* singular, const char* plural, unsigned long n)
{
- register KLocale *instance = TDEGlobal::locale();
+ register TDELocale *instance = TDEGlobal::locale();
if (instance)
return instance->translate(singular, plural, n);
if (n == 1)
@@ -2001,23 +2001,23 @@ TQString i18n(const char* singular, const char* plural, unsigned long n)
return put_n_in(TQString::fromUtf8(plural), n);
}
-void KLocale::initInstance()
+void TDELocale::initInstance()
{
if (TDEGlobal::_locale)
return;
TDEInstance *app = TDEGlobal::instance();
if (app) {
- TDEGlobal::_locale = new KLocale(TQString::fromLatin1(app->instanceName()));
+ TDEGlobal::_locale = new TDELocale(TQString::fromLatin1(app->instanceName()));
// only do this for the global instance
TQTextCodec::setCodecForLocale(TDEGlobal::_locale->codecForEncoding());
}
else
- kdDebug(173) << "no app name available using KLocale - nothing to do\n";
+ kdDebug(173) << "no app name available using TDELocale - nothing to do\n";
}
-TQString KLocale::langLookup(const TQString &fname, const char *rtype)
+TQString TDELocale::langLookup(const TQString &fname, const char *rtype)
{
TQStringList search;
@@ -2049,12 +2049,12 @@ TQString KLocale::langLookup(const TQString &fname, const char *rtype)
return TQString::null;
}
-bool KLocale::useDefaultLanguage() const
+bool TDELocale::useDefaultLanguage() const
{
return language() == defaultLanguage();
}
-void KLocale::initEncoding(TDEConfig *)
+void TDELocale::initEncoding(TDEConfig *)
{
const int mibDefault = 4; // ISO 8859-1
@@ -2070,65 +2070,65 @@ void KLocale::initEncoding(TDEConfig *)
Q_ASSERT( d->codecForEncoding );
}
-void KLocale::initFileNameEncoding(TDEConfig *)
+void TDELocale::initFileNameEncoding(TDEConfig *)
{
// If the following environment variable is set, assume all filenames
// are in UTF-8 regardless of the current C locale.
d->utf8FileEncoding = getenv("TDE_UTF8_FILENAMES") != 0;
if (d->utf8FileEncoding)
{
- TQFile::setEncodingFunction(KLocale::encodeFileNameUTF8);
- TQFile::setDecodingFunction(KLocale::decodeFileNameUTF8);
+ TQFile::setEncodingFunction(TDELocale::encodeFileNameUTF8);
+ TQFile::setDecodingFunction(TDELocale::decodeFileNameUTF8);
}
// Otherwise, stay with QFile's default filename encoding functions
// which, on Unix platforms, use the locale's codec.
}
#ifdef USE_QT3
-TQCString KLocale::encodeFileNameUTF8( const TQString & fileName )
+TQCString TDELocale::encodeFileNameUTF8( const TQString & fileName )
#endif // USE_QT3
#ifdef USE_QT4
-QByteArray KLocale::encodeFileNameUTF8( const QString & fileName )
+QByteArray TDELocale::encodeFileNameUTF8( const QString & fileName )
#endif // USE_QT4
{
return TQString(fileName).utf8();
}
#ifdef USE_QT3
-TQString KLocale::decodeFileNameUTF8( const TQCString & localFileName )
+TQString TDELocale::decodeFileNameUTF8( const TQCString & localFileName )
#endif // USE_QT3
#ifdef USE_QT4
-QString KLocale::decodeFileNameUTF8( const QByteArray & localFileName )
+QString TDELocale::decodeFileNameUTF8( const QByteArray & localFileName )
#endif // USE_QT4
{
return TQString::fromUtf8(localFileName);
}
-void KLocale::setDateFormat(const TQString & format)
+void TDELocale::setDateFormat(const TQString & format)
{
doFormatInit();
m_dateFormat = format.stripWhiteSpace();
}
-void KLocale::setDateFormatShort(const TQString & format)
+void TDELocale::setDateFormatShort(const TQString & format)
{
doFormatInit();
m_dateFormatShort = format.stripWhiteSpace();
}
-void KLocale::setDateMonthNamePossessive(bool possessive)
+void TDELocale::setDateMonthNamePossessive(bool possessive)
{
doFormatInit();
d->dateMonthNamePossessive = possessive;
}
-void KLocale::setTimeFormat(const TQString & format)
+void TDELocale::setTimeFormat(const TQString & format)
{
doFormatInit();
m_timeFormat = format.stripWhiteSpace();
}
-void KLocale::setWeekStartsMonday(bool start) //deprecated
+void TDELocale::setWeekStartsMonday(bool start) //deprecated
{
doFormatInit();
if (start)
@@ -2137,7 +2137,7 @@ void KLocale::setWeekStartsMonday(bool start) //deprecated
d->weekStartDay = 7;
}
-void KLocale::setWeekStartDay(int day)
+void TDELocale::setWeekStartDay(int day)
{
doFormatInit();
if (day>7 || day<1)
@@ -2146,134 +2146,134 @@ void KLocale::setWeekStartDay(int day)
d->weekStartDay = day;
}
-TQString KLocale::dateFormat() const
+TQString TDELocale::dateFormat() const
{
doFormatInit();
return m_dateFormat;
}
-TQString KLocale::dateFormatShort() const
+TQString TDELocale::dateFormatShort() const
{
doFormatInit();
return m_dateFormatShort;
}
-TQString KLocale::timeFormat() const
+TQString TDELocale::timeFormat() const
{
doFormatInit();
return m_timeFormat;
}
-void KLocale::setDecimalSymbol(const TQString & symbol)
+void TDELocale::setDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_decimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setThousandsSeparator(const TQString & separator)
+void TDELocale::setThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_thousandsSeparator = separator;
}
-void KLocale::setPositiveSign(const TQString & sign)
+void TDELocale::setPositiveSign(const TQString & sign)
{
doFormatInit();
m_positiveSign = sign.stripWhiteSpace();
}
-void KLocale::setNegativeSign(const TQString & sign)
+void TDELocale::setNegativeSign(const TQString & sign)
{
doFormatInit();
m_negativeSign = sign.stripWhiteSpace();
}
-void KLocale::setPositiveMonetarySignPosition(SignPosition signpos)
+void TDELocale::setPositiveMonetarySignPosition(SignPosition signpos)
{
doFormatInit();
m_positiveMonetarySignPosition = signpos;
}
-void KLocale::setNegativeMonetarySignPosition(SignPosition signpos)
+void TDELocale::setNegativeMonetarySignPosition(SignPosition signpos)
{
doFormatInit();
m_negativeMonetarySignPosition = signpos;
}
-void KLocale::setPositivePrefixCurrencySymbol(bool prefix)
+void TDELocale::setPositivePrefixCurrencySymbol(bool prefix)
{
doFormatInit();
m_positivePrefixCurrencySymbol = prefix;
}
-void KLocale::setNegativePrefixCurrencySymbol(bool prefix)
+void TDELocale::setNegativePrefixCurrencySymbol(bool prefix)
{
doFormatInit();
m_negativePrefixCurrencySymbol = prefix;
}
-void KLocale::setFracDigits(int digits)
+void TDELocale::setFracDigits(int digits)
{
doFormatInit();
m_fracDigits = digits;
}
-void KLocale::setMonetaryThousandsSeparator(const TQString & separator)
+void TDELocale::setMonetaryThousandsSeparator(const TQString & separator)
{
doFormatInit();
// allow spaces here
m_monetaryThousandsSeparator = separator;
}
-void KLocale::setMonetaryDecimalSymbol(const TQString & symbol)
+void TDELocale::setMonetaryDecimalSymbol(const TQString & symbol)
{
doFormatInit();
m_monetaryDecimalSymbol = symbol.stripWhiteSpace();
}
-void KLocale::setCurrencySymbol(const TQString & symbol)
+void TDELocale::setCurrencySymbol(const TQString & symbol)
{
doFormatInit();
m_currencySymbol = symbol.stripWhiteSpace();
}
-int KLocale::pageSize() const
+int TDELocale::pageSize() const
{
doFormatInit();
return d->pageSize;
}
-void KLocale::setPageSize(int pageSize)
+void TDELocale::setPageSize(int pageSize)
{
// #### check if it's in range??
doFormatInit();
d->pageSize = pageSize;
}
-KLocale::MeasureSystem KLocale::measureSystem() const
+TDELocale::MeasureSystem TDELocale::measureSystem() const
{
doFormatInit();
return d->measureSystem;
}
-void KLocale::setMeasureSystem(MeasureSystem value)
+void TDELocale::setMeasureSystem(MeasureSystem value)
{
doFormatInit();
d->measureSystem = value;
}
-TQString KLocale::defaultLanguage()
+TQString TDELocale::defaultLanguage()
{
return TQString::fromLatin1("en_US");
}
-TQString KLocale::defaultCountry()
+TQString TDELocale::defaultCountry()
{
return TQString::fromLatin1("C");
}
-const char * KLocale::encoding() const
+const char * TDELocale::encoding() const
{
#ifdef Q_WS_WIN
if (0==qstrcmp("System", codecForEncoding()->name()))
@@ -2290,24 +2290,24 @@ const char * KLocale::encoding() const
return codecForEncoding()->name();
}
-int KLocale::encodingMib() const
+int TDELocale::encodingMib() const
{
return codecForEncoding()->mibEnum();
}
-int KLocale::fileEncodingMib() const
+int TDELocale::fileEncodingMib() const
{
if (d->utf8FileEncoding)
return 106;
return codecForEncoding()->mibEnum();
}
-TQTextCodec * KLocale::codecForEncoding() const
+TQTextCodec * TDELocale::codecForEncoding() const
{
return d->codecForEncoding;
}
-bool KLocale::setEncoding(int mibEnum)
+bool TDELocale::setEncoding(int mibEnum)
{
TQTextCodec * codec = TQTextCodec::codecForMib(mibEnum);
if (codec)
@@ -2316,7 +2316,7 @@ bool KLocale::setEncoding(int mibEnum)
return codec != 0;
}
-TQStringList KLocale::languagesTwoAlpha() const
+TQStringList TDELocale::languagesTwoAlpha() const
{
if (d->langTwoAlpha.count())
return d->langTwoAlpha;
@@ -2356,7 +2356,7 @@ TQStringList KLocale::languagesTwoAlpha() const
return result;
}
-TQStringList KLocale::allLanguagesTwoAlpha() const
+TQStringList TDELocale::allLanguagesTwoAlpha() const
{
if (!d->languages)
d->languages = new TDEConfig("all_languages", true, false, "locale");
@@ -2364,7 +2364,7 @@ TQStringList KLocale::allLanguagesTwoAlpha() const
return d->languages->groupList();
}
-TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
+TQString TDELocale::twoAlphaToLanguageName(const TQString &code) const
{
if (!d->languages)
d->languages = new TDEConfig("all_languages", true, false, "locale");
@@ -2377,7 +2377,7 @@ TQString KLocale::twoAlphaToLanguageName(const TQString &code) const
return d->languages->readEntry("Name");
}
-TQStringList KLocale::allCountriesTwoAlpha() const
+TQStringList TDELocale::allCountriesTwoAlpha() const
{
TQStringList countries;
TQStringList paths = TDEGlobal::dirs()->findAllResources("locale", "l10n/*/entry.desktop");
@@ -2391,14 +2391,14 @@ TQStringList KLocale::allCountriesTwoAlpha() const
return countries;
}
-TQString KLocale::twoAlphaToCountryName(const TQString &code) const
+TQString TDELocale::twoAlphaToCountryName(const TQString &code) const
{
TDEConfig cfg("l10n/"+code.lower()+"/entry.desktop", true, false, "locale");
cfg.setGroup("KCM Locale");
return cfg.readEntry("Name");
}
-void KLocale::setCalendar(const TQString & calType)
+void TDELocale::setCalendar(const TQString & calType)
{
doFormatInit();
@@ -2408,14 +2408,14 @@ void KLocale::setCalendar(const TQString & calType)
d->calendar = 0;
}
-TQString KLocale::calendarType() const
+TQString TDELocale::calendarType() const
{
doFormatInit();
return d->calendarType;
}
-const KCalendarSystem * KLocale::calendar() const
+const KCalendarSystem * TDELocale::calendar() const
{
doFormatInit();
@@ -2426,14 +2426,14 @@ const KCalendarSystem * KLocale::calendar() const
return d->calendar;
}
-KLocale::KLocale(const KLocale & rhs)
+TDELocale::TDELocale(const TDELocale & rhs)
{
- d = new KLocalePrivate;
+ d = new TDELocalePrivate;
*this = rhs;
}
-KLocale & KLocale::operator=(const KLocale & rhs)
+TDELocale & TDELocale::operator=(const TDELocale & rhs)
{
// Numbers and money
m_decimalSymbol = rhs.m_decimalSymbol;
@@ -2465,8 +2465,8 @@ KLocale & KLocale::operator=(const KLocale & rhs)
return *this;
}
-bool KLocale::setCharset(const TQString & ) { return true; }
-TQString KLocale::charset() const { return TQString::fromLatin1("UTF-8"); }
+bool TDELocale::setCharset(const TQString & ) { return true; }
+TQString TDELocale::charset() const { return TQString::fromLatin1("UTF-8"); }
// KDE4: remove
#if 0
diff --git a/tdecore/klocale.h b/tdecore/klocale.h
index 7a8e05e98..65a21d13d 100644
--- a/tdecore/klocale.h
+++ b/tdecore/klocale.h
@@ -34,7 +34,7 @@ class TQDateTime;
class TDEGlobal;
class TDEConfig;
class TDEConfigBase;
-class KLocalePrivate;
+class TDELocalePrivate;
class KCatalogue;
class KCalendarSystem;
@@ -44,7 +44,7 @@ class KCalendarSystem;
#ifndef I18N_NOOP
/**
- * \relates KLocale
+ * \relates TDELocale
* I18N_NOOP marks a string to be translated without translating it.
* Do not use this unless you know you need it.
* http://developer.kde.org/documentation/other/developer-faq.html#q2.11.2
@@ -54,7 +54,7 @@ class KCalendarSystem;
#ifndef I18N_NOOP2
/**
- * \relates KLocale
+ * \relates TDELocale
* If the string is too ambiguous to be translated well to a non-english
* language, use this instead of I18N_NOOP to separate lookup string and english.
* \warning You need to call i18n( comment, stringVar ) later on, not just i18n( stringVar ).
@@ -64,7 +64,7 @@ class KCalendarSystem;
#endif
/**
- * \relates KLocale
+ * \relates TDELocale
* i18n is the function that does everything you need to translate
* a string. You just wrap around every user visible string a i18n
* call to get a TQString with the string in the user's preferred
@@ -78,7 +78,7 @@ class KCalendarSystem;
TDECORE_EXPORT TQString i18n(const char *text);
/**
- * \relates KLocale
+ * \relates TDELocale
* If the string is too ambiguous to be translated well to a non-english
* language, use this form of i18n to separate lookup string and english
* text.
@@ -87,7 +87,7 @@ TDECORE_EXPORT TQString i18n(const char *text);
TDECORE_EXPORT TQString i18n(const char *comment, const char *text);
/**
- * \relates KLocale
+ * \relates TDELocale
* If you want to handle plural forms, use this form of i18n.
* @param singular the singular form of the word, for example "file".
* @param plural the plural form of the word. Must contain a "%n" that will
@@ -100,7 +100,7 @@ TDECORE_EXPORT TQString i18n(const char *comment, const char *text);
TDECORE_EXPORT TQString i18n(const char *singular, const char *plural, unsigned long n);
/**
- * \relates KLocale
+ * \relates TDELocale
* Qt3's uic generates i18n( "msg", "comment" ) calls which conflict
* with our i18n method. We use uic -tr tr2i18n to redirect
* to the right i18n() function
@@ -111,52 +111,52 @@ inline TQString tr2i18n(const char* message, const char* =0) {
/**
*
- * KLocale provides support for country specific stuff like
+ * TDELocale provides support for country specific stuff like
* the national language.
*
- * KLocale supports translating, as well as specifying the format
+ * TDELocale supports translating, as well as specifying the format
* for numbers, currency, time, and date.
*
* @author Stephan Kulow <coolo@kde.org>, Preston Brown <pbrown@kde.org>,
* Hans Petter Bieker <bieker@kde.org>, Lukas Tinkl <lukas.tinkl@suse.cz>
* @short class for supporting locale settings and national language
*/
-class TDECORE_EXPORT KLocale
+class TDECORE_EXPORT TDELocale
{
friend class TDEGlobal; // for initInstance()
public:
/**
- * Constructs a KLocale with the given catalog name.
+ * Constructs a TDELocale with the given catalog name.
* The constructor looks for an entry Locale/Language in the
* configuration file.
* If no config file is specified, it will also look for languages
* using the environment variables (TDE_LANG, LC_MESSAGES, LC_ALL, LANG),
- * as well as the global configuration file. If KLocale is not able to use
+ * as well as the global configuration file. If TDELocale is not able to use
* any of the specified languages, the default language (en_US) will be
* used.
*
* If you specify a configuration file, it has to be valid until
- * the KLocale object is destroyed.
+ * the TDELocale object is destroyed.
*
* @param catalog The name of the main language file
* @param config The configuration file to use.
*/
- KLocale( const TQString& catalog, TDEConfig *config = 0 );
+ TDELocale( const TQString& catalog, TDEConfig *config = 0 );
/**
* Copy constructor.
*/
- KLocale( const KLocale & rhs );
+ TDELocale( const TDELocale & rhs );
/**
* Assignment operator.
*/
- KLocale& operator= ( const KLocale & rhs );
+ TDELocale& operator= ( const TDELocale & rhs );
/**
* Destructor.
*/
- ~KLocale();
+ ~TDELocale();
/**
* Translates the string into the corresponding string in
@@ -877,14 +877,14 @@ public:
*
* Please use setWeekStartDay instead.
*
- * Changes how KLocale defines the first day in week.
+ * Changes how TDELocale defines the first day in week.
*
* @param start True if Monday is the first day in the week
*/
void setWeekStartsMonday(bool start) KDE_DEPRECATED; //### remove for KDE 4.0
/**
- * Changes how KLocale defines the first day in week.
+ * Changes how TDELocale defines the first day in week.
*
* @param day first day of the week (Monday=1..Sunday=7) as integer
* @since 3.1
@@ -1105,10 +1105,10 @@ public:
TQString & charset);
/**
- * Use this as main catalog for *all* KLocales, if not the appname
+ * Use this as main catalog for *all* TDELocales, if not the appname
* will be used. This function is best to be the very first instruction
* in your program's main function as it only has an effect before the
- * first KLocale object is created.
+ * first TDELocale object is created.
*
* @param catalog Catalogue to override all other main catalogues.
*/
@@ -1173,7 +1173,7 @@ private:
protected:
/**
- * @internal Creates a KLocale object for TDEGlobal and inits the locale
+ * @internal Creates a TDELocale object for TDEGlobal and inits the locale
* pointer.
*/
static void initInstance();
@@ -1344,7 +1344,7 @@ private:
bool m_positivePrefixCurrencySymbol;
bool m_negativePrefixCurrencySymbol;
- KLocalePrivate *d;
+ TDELocalePrivate *d;
};
#endif
diff --git a/tdecore/kstandarddirs.h b/tdecore/kstandarddirs.h
index c07b9c682..29a5a9627 100644
--- a/tdecore/kstandarddirs.h
+++ b/tdecore/kstandarddirs.h
@@ -77,7 +77,7 @@ class TDEStandardDirsPrivate;
* @li html - HTML documentation.
* @li icon - Icons, see KIconLoader.
* @li lib - Libraries.
- * @li locale - Translation files for KLocale.
+ * @li locale - Translation files for TDELocale.
* @li mime - Mime types.
* @li module - Module (dynamically loaded library).
* @li qtplugins - Qt plugins (dynamically loaded objects for Qt)
diff --git a/tdecore/tde-config.cpp.cmake b/tdecore/tde-config.cpp.cmake
index 18d2a373f..b633aa2d4 100644
--- a/tdecore/tde-config.cpp.cmake
+++ b/tdecore/tde-config.cpp.cmake
@@ -113,7 +113,7 @@ void printResult(const TQString &s)
int main(int argc, char **argv)
{
- KLocale::setMainCatalogue("tdelibs");
+ TDELocale::setMainCatalogue("tdelibs");
TDEAboutData about("tde-config", "tde-config", "1.0", description, TDEAboutData::License_GPL, "(C) 2000 Stephan Kulow");
TDECmdLineArgs::init( argc, argv, &about);
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
"kcfg", I18N_NOOP("Configuration description files"),
"lib", I18N_NOOP("Libraries"),
"include", I18N_NOOP("Includes/Headers"),
- "locale", I18N_NOOP("Translation files for KLocale"),
+ "locale", I18N_NOOP("Translation files for TDELocale"),
"mime", I18N_NOOP("Mime types"),
"module", I18N_NOOP("Loadable modules"),
"qtplugins", I18N_NOOP("Qt plugins"),
diff --git a/tdecore/tde-config.cpp.in b/tdecore/tde-config.cpp.in
index 3d6ba7850..fdcc5ba74 100644
--- a/tdecore/tde-config.cpp.in
+++ b/tdecore/tde-config.cpp.in
@@ -113,7 +113,7 @@ void printResult(const TQString &s)
int main(int argc, char **argv)
{
- KLocale::setMainCatalogue("tdelibs");
+ TDELocale::setMainCatalogue("tdelibs");
TDEAboutData about("tde-config", "tde-config", "1.0", description, TDEAboutData::License_GPL, "(C) 2000 Stephan Kulow");
TDECmdLineArgs::init( argc, argv, &about);
@@ -176,7 +176,7 @@ int main(int argc, char **argv)
"kcfg", I18N_NOOP("Configuration description files"),
"lib", I18N_NOOP("Libraries"),
"include", I18N_NOOP("Includes/Headers"),
- "locale", I18N_NOOP("Translation files for KLocale"),
+ "locale", I18N_NOOP("Translation files for TDELocale"),
"mime", I18N_NOOP("Mime types"),
"module", I18N_NOOP("Loadable modules"),
"qtplugins", I18N_NOOP("Qt plugins"),
diff --git a/tdecore/tdeconfigbackend.cpp b/tdecore/tdeconfigbackend.cpp
index e48bd8cc9..77260e326 100644
--- a/tdecore/tdeconfigbackend.cpp
+++ b/tdecore/tdeconfigbackend.cpp
@@ -385,7 +385,7 @@ bool TDEConfigINIBackEnd::parseConfigFiles()
TQString bootLanguage;
if (useKDEGlobals && localeString.isEmpty() && !TDEGlobal::_locale) {
// Boot strap language
- bootLanguage = KLocale::_initLanguage(pConfig);
+ bootLanguage = TDELocale::_initLanguage(pConfig);
setLocaleString(bootLanguage.utf8());
}
@@ -415,7 +415,7 @@ bool TDEConfigINIBackEnd::parseConfigFiles()
TQString currentLanguage;
if (!bootLanguage.isEmpty())
{
- currentLanguage = KLocale::_initLanguage(pConfig);
+ currentLanguage = TDELocale::_initLanguage(pConfig);
// If the file changed the language, we need to read the file again
// with the new language setting.
if (bootLanguage != currentLanguage)
@@ -730,9 +730,9 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1());
pConfig->putData(aEntryKey, aEntry, false);
}
}
- // Look up translations using KLocale
+ // Look up translations using TDELocale
// https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- // This calls KLocale up to 10 times for each config file (and each TDEConfig has up to 4 files)
+ // This calls TDELocale up to 10 times for each config file (and each TDEConfig has up to 4 files)
// so I'll see how much of a performance hit it is
// it also only acts on the last group in a file
// Ideas: only translate most important fields, only translate "Desktop Entry" files,
@@ -741,7 +741,7 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1());
TQFile file("file.txt");
if (foundGettextDomain) {
- KLocale locale(gettextDomain);
+ TDELocale locale(gettextDomain);
TQString language = locale.language();
translateKey(locale, aCurrentGroup, TQCString("Name"));
@@ -772,7 +772,7 @@ tqWarning("SIGBUS while reading %s", rFile.name().latin1());
#endif
}
-void TDEConfigINIBackEnd::translateKey(KLocale& locale, TQCString currentGroup, TQCString key) {
+void TDEConfigINIBackEnd::translateKey(TDELocale& locale, TQCString currentGroup, TQCString key) {
KEntryKey entryKey = KEntryKey(currentGroup, key);
KEntry entry = pConfig->lookupData(entryKey);
if (TQString(entry.mValue) != "") {
diff --git a/tdecore/tdeconfigbackend.h b/tdecore/tdeconfigbackend.h
index 916479643..05884cb7f 100644
--- a/tdecore/tdeconfigbackend.h
+++ b/tdecore/tdeconfigbackend.h
@@ -128,7 +128,7 @@ public:
/**
* Set the locale string that defines the current language.
* @param _localeString the identifier of the language
- * @see KLocale
+ * @see TDELocale
*/
void setLocaleString(const TQCString &_localeString) { localeString = _localeString; }
@@ -252,9 +252,9 @@ protected:
bool bGlobal = false, bool bDefault = false);
// Kubuntu patch, 2006-08-03
- // looks up a key in with KLocale
+ // looks up a key in with TDELocale
// see https://launchpad.net/distros/ubuntu/+spec/langpacks-desktopfiles-kde
- void translateKey(KLocale& locale, TQCString currentGroup, TQCString key);
+ void translateKey(TDELocale& locale, TQCString currentGroup, TQCString key);
/**
* Writes configuration file back.
diff --git a/tdecore/tdeconfigbase.cpp b/tdecore/tdeconfigbase.cpp
index b00430f27..d2ecef888 100644
--- a/tdecore/tdeconfigbase.cpp
+++ b/tdecore/tdeconfigbase.cpp
@@ -66,7 +66,7 @@ void TDEConfigBase::setLocale()
if (TDEGlobal::locale())
aLocaleString = TDEGlobal::locale()->language().utf8();
else
- aLocaleString = KLocale::defaultLanguage().utf8();
+ aLocaleString = TDELocale::defaultLanguage().utf8();
if (backEnd)
backEnd->setLocaleString(aLocaleString);
}
diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp
index fef409d71..53ba63615 100644
--- a/tdecore/tests/kcalendartest.cpp
+++ b/tdecore/tests/kcalendartest.cpp
@@ -14,7 +14,7 @@
#include <klocale.h>
#include <kcmdlineargs.h>
-class KLocale;
+class TDELocale;
void test(TQDate & date);
@@ -81,7 +81,7 @@ int main(int argc, char **argv) {
void test(TQDate & date) {
- kdDebug() << "(KLocale) readDate" << endl;
+ kdDebug() << "(TDELocale) readDate" << endl;
kdDebug() << "Created calendar: " << TDEGlobal::locale()->calendar()->calendarName() << endl;
@@ -117,8 +117,8 @@ void test(TQDate & date) {
kdDebug() << "It's week number " << TDEGlobal::locale()->calendar()->weekNumber(date) << endl;
- kdDebug() << "(KLocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl;
- kdDebug() << "(KLocale) Short formatted date: " << TDEGlobal::locale()->formatDate(date, true) << endl;
+ kdDebug() << "(TDELocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl;
+ kdDebug() << "(TDELocale) Short formatted date: " << TDEGlobal::locale()->formatDate(date, true) << endl;
kdDebug() << "That month have : " << TDEGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl;
diff --git a/tdecore/tests/kcmdlineargstest.cpp b/tdecore/tests/kcmdlineargstest.cpp
index d04a21bff..940a45153 100644
--- a/tdecore/tests/kcmdlineargstest.cpp
+++ b/tdecore/tests/kcmdlineargstest.cpp
@@ -24,7 +24,7 @@ static KCmdLineOptions options[] =
int
main(int argc, char *argv[])
{
- KLocale::setMainCatalogue("tdelibs");
+ TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs::init( argc, argv, "testapp", description, version);
TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp
index bcb7bc9e8..1d0ca7aba 100644
--- a/tdecore/tests/klocaletest.cpp
+++ b/tdecore/tests/klocaletest.cpp
@@ -51,7 +51,7 @@ bool checkDate(TQString txt, TQDate a, TQDate b)
Test::Test( TQWidget *parent, const char *name )
: TQWidget( parent, name )
{
- setCaption("Testing KLocale");
+ setCaption("Testing TDELocale");
TQWidget *d = tqApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
@@ -99,7 +99,7 @@ void Test::createFields()
int main( int argc, char ** argv )
{
- KLocale::setMainCatalogue("tdelibs");
+ TDELocale::setMainCatalogue("tdelibs");
TDEApplication a( argc, argv, "klocaletest" );
TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
@@ -142,7 +142,7 @@ int main( int argc, char ** argv )
tqDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
- KLocale locale(*TDEGlobal::locale());
+ TDELocale locale(*TDEGlobal::locale());
locale.setCurrencySymbol("$$");
num = locale.readMoney("1,234,567.89$$", &ok);
check("readMoney(1,234,567.89$$)",ok?"yes":"no","yes");
@@ -166,10 +166,10 @@ int main( int argc, char ** argv )
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = TDEGlobal::locale()->readTime( "11:22:33", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22:33", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = TDEGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
diff --git a/tdecore/tests/klocaletest.h b/tdecore/tests/klocaletest.h
index 83f4f5cef..6634b6107 100644
--- a/tdecore/tests/klocaletest.h
+++ b/tdecore/tests/klocaletest.h
@@ -7,7 +7,7 @@
class TQLabel;
-/** test: a small test program for KLocale
+/** test: a small test program for TDELocale
*/
class Test : public TQWidget
{