Rename KLocale to enhance compatibility with KDE4

pull/16/head
Timothy Pearson 12 years ago
parent 8bc199f487
commit 59d153016b

@ -21,7 +21,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<LI><A HREF="#automoc">automoc/am_edit, Makefile.am tags</A></LI>
<LI><A HREF="#TDEApplication">TDEApplication</A></LI>
<LI><A HREF="#TDECmdLineArgs">TDECmdLineArgs</A></LI>
<LI><A HREF="#KLocale">KLocale</A></LI>
<LI><A HREF="#TDELocale">TDELocale</A></LI>
<LI><A HREF="#TDEGlobal">TDEGlobal: access to KDE global objects.</A></LI>
<LI><A HREF="#KIconLoader">KIconLoader</A></LI>
<LI><A HREF="#KTMainWindow">KTMainWindow</A></LI>
@ -109,7 +109,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<H3><A NAME="TDEApplication">TDEApplication</A></H3>
doesn't hold any longer a KLocale instance. With this getLocale()
doesn't hold any longer a TDELocale instance. With this getLocale()
and isLocaleInstantiated are now replaced by TDEGlobal::locale()<P>
it also doesn't hold a KiconLoader instance. As this also getIconLoader()
@ -179,7 +179,7 @@ or <a href="http://doc.trolltech.com/porting.html">this page online</a>.<P>
<H4><P ALIGN="RIGHT"><A HREF="#TOC">Return to the Table of Contents</A></P></H4>
<H3><A NAME="KLocale">KLocale</A></H3>
<H3><A NAME="TDELocale">TDELocale</A></H3>
i18n is no longer a macro<P>
@ -206,7 +206,7 @@ must have created a TDEApplication object before the methods can be used.<P>
<PRE>
#include &lt;kglobal.h&gt;
#include &lt;tdeconfig.h&gt; // Needed to use TDEConfig
#include &lt;klocale.h&gt; // Needed to use KLocale
#include &lt;klocale.h&gt; // Needed to use TDELocale
#include &lt;kiconloader.h&gt; // Needed to use KIconLoader
</PRE>
</TD>

@ -135,7 +135,7 @@ They have been replaced by TQCString and KMD5::Digest. <br>
The API has been cleaned up, it is no longer necessary to call finalize().
Simply remove any calls to it.
<H4>KLocale</H4>
<H4>TDELocale</H4>
<li>charset() has been removed. You might want to use encoding() instead.
<li>setCharset(const TQString &amp;) has been removed. You might want to use
setEncoding(int) instead.
@ -143,9 +143,9 @@ setEncoding(int) instead.
<li>formatNumber(const TQString &amp;) has been removed.
<li>languages() has been removed. Use languageList() instead.
<li>All references to monthName(), monthNamePossessive(), and weekDayName()
should be replaced with methods from KLocale::calendar().
should be replaced with methods from TDELocale::calendar().
<li>Hard coded date handling or date handling with TQDate should in most
cases be replaced by methods in KLocale::calendar().
cases be replaced by methods in TDELocale::calendar().
<H4>Accelerators Keys</H4>
<h5>KAccel</h5>

@ -281,7 +281,7 @@ class KABC_EXPORT Address
/**
Returns ISO code for a localized country name. Only localized country
names will be understood. This might be replaced by a KLocale method in
names will be understood. This might be replaced by a TDELocale method in
the future.
@param cname name of the country
@return two digit ISO code
@ -290,7 +290,7 @@ class KABC_EXPORT Address
/**
Returns a localized country name for a ISO code.
This might be replaced by a KLocale method in the future.
This might be replaced by a TDELocale method in the future.
@param ISOname two digit ISO code
@return localized name of the country
@since 3.2

@ -885,7 +885,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
TDECmdLineArgs::addCmdLineOptions( options );
// this program is in tdelibs so it uses tdelibs as catalog
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
// WABA: Make sure not to enable session management.
putenv(strdup("SESSION_MANAGER="));

@ -365,7 +365,7 @@ void KHostName::changeSessionManager()
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEAboutData d(appName, I18N_NOOP("KDontChangeTheHostName"), appVersion,
I18N_NOOP("Informs TDE about a change in hostname"),
TDEAboutData::License_GPL, "(c) 2001 Waldo Bastian");

@ -107,7 +107,7 @@ static void findMenuEntry(KServiceGroup::Ptr parent, const TQString &name, const
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
const char *description = I18N_NOOP("TDE Menu query tool.\n"
"This tool can be used to find in which menu a specific application is shown.\n"
"The --highlight option can be used to visually indicate to the user where\n"
@ -126,7 +126,7 @@ int main(int argc, char **argv)
k.disableSessionManagement();
// this program is in tdelibs so it uses tdelibs as catalog
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
if (args->count() != 1)

@ -717,7 +717,7 @@ public:
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEAboutData d(appName, I18N_NOOP("KBuildSycoca"), appVersion,
I18N_NOOP("Rebuilds the system configuration cache."),
TDEAboutData::License_GPL, "(c) 1999-2002 KDE Developers");
@ -764,8 +764,8 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KCrash::setApplicationName(TQString(appName));
// this program is in tdelibs so it uses tdelibs as catalog
KLocale::setMainCatalogue("tdelibs");
// force generating of KLocale object. if not, the database will get
TDELocale::setMainCatalogue("tdelibs");
// force generating of TDELocale object. if not, the database will get
// be translated
TDEGlobal::locale();
TDEGlobal::dirs()->addResourceType("app-reg", "share/application-registry" );

@ -98,7 +98,7 @@ int main(int argc, char **argv) {
TDECmdLineArgs::init(argc, argv, &aboutData);
TDECmdLineArgs::addCmdLineOptions( options );
KLocale::setMainCatalogue("tdeio_help");
TDELocale::setMainCatalogue("tdeio_help");
TDEInstance ins("meinproc");
TDEGlobal::locale();

@ -72,7 +72,7 @@ extern "C" KDE_EXPORT int kdemain( int argc, char**argv )
putenv(strdup("SESSION_MANAGER="));
// Allow the locale to initialize properly
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -93,7 +93,7 @@ typedef WId Window;
KDE_EXPORT int main(int argc, char *argv[])
{
KLocale::setMainCatalogue("libtdescreensaver");
TDELocale::setMainCatalogue("libtdescreensaver");
TDECmdLineArgs::init(argc, argv, kss_applicationName, kss_description, kss_version);
TDECmdLineArgs::addCmdLineOptions(options);

@ -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

@ -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;

@ -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;

@ -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);

@ -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

@ -29,7 +29,7 @@
#include "kcalendarsystemgregorian.h"
KCalendarSystemGregorian::KCalendarSystemGregorian(const KLocale * locale)
KCalendarSystemGregorian::KCalendarSystemGregorian(const TDELocale * locale)
: KCalendarSystem(locale)
{
}

@ -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;

@ -259,7 +259,7 @@ static bool is_leap_year(int year)
}
// Ok
KCalendarSystemHebrew::KCalendarSystemHebrew(const KLocale * locale)
KCalendarSystemHebrew::KCalendarSystemHebrew(const TDELocale * locale)
: KCalendarSystem(locale)
{
}

@ -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;

@ -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)
{
}

@ -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;

@ -200,7 +200,7 @@ static int hndays(int m,int y)
}
KCalendarSystemJalali::KCalendarSystemJalali(const KLocale * locale)
KCalendarSystemJalali::KCalendarSystemJalali(const TDELocale * locale)
: KCalendarSystem(locale)
{
}

@ -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();

@ -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

@ -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)

@ -48,7 +48,7 @@ InfoOutput=4
[172]
InfoOutput=4
# KLocale debug info off
# TDELocale debug info off
[173]
InfoOutput=4

@ -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;

@ -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;

File diff suppressed because it is too large Load Diff

@ -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

@ -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)

@ -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"),

@ -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"),

@ -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) != "") {

@ -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.

@ -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);
}

@ -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;

@ -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.

@ -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");

@ -7,7 +7,7 @@
class TQLabel;
/** test: a small test program for KLocale
/** test: a small test program for TDELocale
*/
class Test : public TQWidget
{

@ -41,7 +41,7 @@ class TQDateTime;
#ifdef KSSL_HAVE_SSL
// This functionality is missing in OpenSSL
/**
* Convert an ASN1 UTCTIME value to a string. Uses KLocale settings.
* Convert an ASN1 UTCTIME value to a string. Uses TDELocale settings.
*
* @param tm the OpenSSL ASN1_UTCTIME pointer
*
@ -51,7 +51,7 @@ class TQDateTime;
KDE_EXPORT TQString ASN1_UTCTIME_QString(ASN1_UTCTIME *tm);
/**
* Convert an ASN1 UTCTIME value to a TQDateTime. Uses KLocale settings.
* Convert an ASN1 UTCTIME value to a TQDateTime. Uses TDELocale settings.
*
* @param tm the OpenSSL ASN1_UTCTIME pointer
* @param isGmt set to 1 if the date is set to GMT

@ -28,7 +28,7 @@ static const KCmdLineOptions options[] =
int main( int argc, char **argv )
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs::init( argc, argv, "tdemailservice", I18N_NOOP("KMailService"), I18N_NOOP("Mail service"), "unknown" );
TDECmdLineArgs::addCmdLineOptions( options );

@ -58,7 +58,7 @@ void BugMailer::slotSend() {
int main(int argc, char **argv) {
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEAboutData d("tdesendbugmail", I18N_NOOP("KSendBugMail"), "1.0",
I18N_NOOP("Sends a short bug report to submit@bugs.kde.org"),
TDEAboutData::License_GPL, "(c) 2000 Stephan Kulow");

@ -37,7 +37,7 @@ static const KCmdLineOptions options[] =
int main(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs::init(argc, argv, "tdetelnetservice", I18N_NOOP("telnet service"),
I18N_NOOP("telnet protocol handler"), "unknown");
TDECmdLineArgs::addCmdLineOptions(options);

@ -1377,7 +1377,7 @@ UIServer* UIServer::createInstance()
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
// GS 5/2001 - I changed the name to "TDE" to make it look better
// in the titles of dialogs which are displayed.
TDEAboutData aboutdata("tdeio_uiserver", I18N_NOOP("TDE"),

@ -5,7 +5,7 @@
int main(int argc, char** argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEApplication app(argc, argv, "KCustomMenuEditorTest");
KCustomMenuEditor editor(0);
TDEConfig *cfg = new TDEConfig("kdesktop_custom_menu2");

@ -112,7 +112,7 @@ extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
int kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEInstance instance( "tdeio_file" );
( void ) TDEGlobal::locale();

@ -139,7 +139,7 @@ extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
int kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEInstance instance( "tdeio_ftp" );
( void ) TDEGlobal::locale();
@ -1926,7 +1926,7 @@ bool Ftp::ftpReadDir(FtpEntry& de)
// Get day number (always second field)
tmptr->tm_mday = atoi( p_date_2 );
// Get month from first field
// NOTE : no, we don't want to use KLocale here
// NOTE : no, we don't want to use TDELocale here
// It seems all FTP servers use the English way
//kdDebug(7102) << "Looking for month " << p_date_1 << endl;
static const char * s_months[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun",

@ -98,7 +98,7 @@ extern "C" {
int kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEInstance instance( "tdeio_http" );
( void ) TDEGlobal::locale();

@ -189,7 +189,7 @@ void scanDirectory(FileInfoList &fileEntries, const TQString &name, const TQStri
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs::init( argc, argv, appName,
I18N_NOOP("TDE HTTP cache maintenance tool"),
description, version, true);

@ -42,7 +42,7 @@ static const KCmdLineOptions options[] =
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDECmdLineArgs::init(argc, argv, "kcookiejar", I18N_NOOP("HTTP cookie daemon"),
description, version);

@ -59,7 +59,7 @@ Since 2.2 release, Michael Goffioul <tdeprint@swing.be>
printers (to not confuse the CUPS daemon for example)
* Improved how the default printer is selected in print dialog to
work in any cases
* General: make use of KLocale::pageSize() to determine the default
* General: make use of TDELocale::pageSize() to determine the default
page size (used for example for pseudo printers and classes)
* Wizard: fix buffer overflow when adding a remote LPD queue having
a lot of jobs waiting

@ -206,7 +206,7 @@ MarginWidget::MarginWidget(TQWidget *parent, const char* name, bool allowMetricU
if ( allowMetricUnit )
{
int mode = (TDEGlobal::locale()->measureSystem() == KLocale::Metric ? 2 : 1);
int mode = (TDEGlobal::locale()->measureSystem() == TDELocale::Metric ? 2 : 1);
m_top->setMode(mode);
m_bottom->setMode(mode);
m_left->setMode(mode);

@ -460,7 +460,7 @@ TQString KBugReport::text() const
bodyText += line;
}
if (severity == TQString::fromLatin1("i18n") && TDEGlobal::locale()->language() != KLocale::defaultLanguage()) {
if (severity == TQString::fromLatin1("i18n") && TDEGlobal::locale()->language() != TDELocale::defaultLanguage()) {
// Case 1 : i18n bug
TQString package = TQString::fromLatin1("i18n_%1").arg(TDEGlobal::locale()->language());
package = package.replace(TQString::fromLatin1("_"), TQString::fromLatin1("-"));

@ -72,7 +72,7 @@ KDateWidget::KDateWidget( TQDate date, TQWidget *parent,
void KDateWidget::init()
{
d = new KDateWidgetPrivate;
KLocale *locale = TDEGlobal::locale();
TDELocale *locale = TDEGlobal::locale();
TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);
@ -96,7 +96,7 @@ void KDateWidget::init()
void KDateWidget::init(const TQDate& date)
{
d = new KDateWidgetPrivate;
KLocale *locale = TDEGlobal::locale();
TDELocale *locale = TDEGlobal::locale();
TQHBoxLayout *layout = new TQHBoxLayout(this, 0, KDialog::spacingHint());
layout->setAutoAdd(true);
d->m_day = new KDateWidgetSpinBox(1, 1, this);

@ -863,7 +863,7 @@ public:
bool acceptLocalizedNumbers() const;
/** Sets whether to use and accept localized numbers as returned by
KLocale::formatNumber() */
TDELocale::formatNumber() */
virtual void setAcceptLocalizedNumbers( bool accept );
/** Sets a new range for the spin box values. Note that @p lower, @p

@ -326,7 +326,7 @@ void KDoubleValidator::setAcceptLocalizedNumbers( bool accept ) {
TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const {
TQString s = input;
if ( acceptLocalizedNumbers() ) {
KLocale * l = TDEGlobal::locale();
TDELocale * l = TDEGlobal::locale();
// ok, we have to re-format the number to have:
// 1. decimalSymbol == '.'
// 2. negativeSign == '-'

@ -147,7 +147,7 @@ class TDEUI_EXPORT KFloatValidator : public TQValidator {
virtual double top () const;
/**
* Sets the validator to be locale aware if @p is true. In this case, the
* character KLocale::decimalSymbol() from the global locale is recognized
* character TDELocale::decimalSymbol() from the global locale is recognized
* as decimal separator.
*/
void setAcceptLocalizedNumbers(bool b);
@ -169,8 +169,8 @@ class TDEUI_EXPORT KFloatValidator : public TQValidator {
KDoubleValidator extends TQDoubleValidator to be
locale-aware. That means that - subject to not being disabled -
KLocale::decimalSymbol(), KLocale::thousandsSeparator()
and KLocale::positiveSign() and KLocale::negativeSign()
TDELocale::decimalSymbol(), TDELocale::thousandsSeparator()
and TDELocale::positiveSign() and TDELocale::negativeSign()
are respected.
@author Marc Mutz <mutz@kde.org>

@ -241,7 +241,7 @@ KSwitchLanguageDialogPrivate::KSwitchLanguageDialogPrivate(
void KSwitchLanguageDialogPrivate::fillApplicationLanguages(KLanguageButton *button)
{
KLocale *locale = TDEGlobal::locale();
TDELocale *locale = TDEGlobal::locale();
TQStringList allLanguages = locale->allLanguagesTwoAlpha();
for ( TQStringList::ConstIterator it = allLanguages.begin(); it != allLanguages.end(); ++it )
{

@ -26,7 +26,7 @@ int main( int argc, char *argv[] )
{
TQColor color;
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TQApplication::setColorMode( TQApplication::CustomColors );
TDEApplication a( argc, argv, "KColorDialogTest" );
TDEConfig aConfig;

@ -5,7 +5,7 @@
int main(int argc, char** argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEApplication app(argc, argv, "KDatePickertest");
KDatePicker picker;
app.setMainWidget(&picker);

@ -4,7 +4,7 @@
int main(int argc, char** argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEApplication app(argc, argv, "KDateTimeWidgettest");
KDateTimeWidget dateTimeWidget;
app.setMainWidget(&dateTimeWidget);

@ -5,7 +5,7 @@
int main(int argc, char** argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEApplication app(argc, argv, "KDateWidgettest");
KDateWidget dateWidget;
app.setMainWidget(&dateWidget);

@ -4,7 +4,7 @@
int main(int argc, char** argv)
{
KLocale::setMainCatalogue("tdelibs");
TDELocale::setMainCatalogue("tdelibs");
TDEApplication app(argc, argv, "KTimeWidgettest");
KTimeWidget timeWidget;
app.setMainWidget(&timeWidget);

Loading…
Cancel
Save