diff --git a/dolphin/plugins/git/fileviewgitplugin.cpp b/dolphin/plugins/git/fileviewgitplugin.cpp
index 6d2beca5..0528729e 100644
--- a/dolphin/plugins/git/fileviewgitplugin.cpp
+++ b/dolphin/plugins/git/fileviewgitplugin.cpp
@@ -25,6 +25,7 @@
#include
#include
#include
+#include
#include
#include
diff --git a/dolphin/src/kitemviews/kfileitemmodel.cpp b/dolphin/src/kitemviews/kfileitemmodel.cpp
index b5cafd85..e87a8e76 100644
--- a/dolphin/src/kitemviews/kfileitemmodel.cpp
+++ b/dolphin/src/kitemviews/kfileitemmodel.cpp
@@ -1533,9 +1533,7 @@ QList > KFileItemModel::dateRoleGroups() const
}
previousModifiedDate = modifiedDate;
- const int daysDistance = modifiedDate.daysTo(currentDate);
-
- QString newGroupValue = KGlobal::locale()->formatDateTime(modifiedDate, KLocale::FancyLongDate);
+ QString newGroupValue = KGlobal::locale()->formatDate(modifiedDate, QLocale::NarrowFormat);
if (newGroupValue != groupValue) {
groupValue = newGroupValue;
groups.append(QPair(i, newGroupValue));
diff --git a/drkonqi/drkonqidialog.cpp b/drkonqi/drkonqidialog.cpp
index bc6408c4..b4d23c1e 100644
--- a/drkonqi/drkonqidialog.cpp
+++ b/drkonqi/drkonqidialog.cpp
@@ -136,9 +136,9 @@ void DrKonqiDialog::buildIntroWidget()
crashedApp->pid(),
crashedApp->signalName(),
crashedApp->signalNumber(),
- KGlobal::locale()->formatDate(crashedApp->datetime().date(), KLocale::ShortDate),
+ KGlobal::locale()->formatDate(crashedApp->datetime().date()),
- KGlobal::locale()->formatTime(crashedApp->datetime().time(), true)
+ KGlobal::locale()->formatTime(crashedApp->datetime().time())
));
}
diff --git a/kate/part/utils/kateprinter.cpp b/kate/part/utils/kateprinter.cpp
index 300ace73..15759466 100644
--- a/kate/part/utils/kateprinter.cpp
+++ b/kate/part/utils/kateprinter.cpp
@@ -235,11 +235,11 @@ bool KatePrinter::print (KateDocument *doc)
KUser u (KUser::UseRealUserID);
tags["u"] = u.loginName();
- tags["d"] = KGlobal::locale()->formatDateTime(dt, KLocale::ShortDate);
- tags["D"] = KGlobal::locale()->formatDateTime(dt, KLocale::LongDate);
- tags["h"] = KGlobal::locale()->formatTime(dt.time(), false);
- tags["y"] = KGlobal::locale()->formatDate(dt.date(), KLocale::ShortDate);
- tags["Y"] = KGlobal::locale()->formatDate(dt.date(), KLocale::LongDate);
+ tags["d"] = KGlobal::locale()->formatDateTime(dt, QLocale::ShortFormat);
+ tags["D"] = KGlobal::locale()->formatDateTime(dt, QLocale::LongFormat);
+ tags["h"] = KGlobal::locale()->formatTime(dt.time(), QLocale::ShortFormat);
+ tags["y"] = KGlobal::locale()->formatDate(dt.date(), QLocale::ShortFormat);
+ tags["Y"] = KGlobal::locale()->formatDate(dt.date(), QLocale::LongFormat);
tags["f"] = doc->url().fileName();
tags["U"] = doc->url().pathOrUrl();
if ( selectionOnly )
diff --git a/kcminit/main.cpp b/kcminit/main.cpp
index 9a1d334f..3de1eccb 100644
--- a/kcminit/main.cpp
+++ b/kcminit/main.cpp
@@ -239,7 +239,6 @@ int main(int argc, char *argv[])
KApplication app;
QDBusConnection::sessionBus().interface()->registerService( "org.kde.kcminit",
QDBusConnectionInterface::DontQueueService );
- KLocale::setMainCatalog(0);
KCMInit kcminit( KCmdLineArgs::parsedArgs());
return 0;
}
diff --git a/kcontrol/dateandtime/dtime.cpp b/kcontrol/dateandtime/dtime.cpp
index afb8d8d8..b2afb2ad 100644
--- a/kcontrol/dateandtime/dtime.cpp
+++ b/kcontrol/dateandtime/dtime.cpp
@@ -95,7 +95,7 @@ Dtime::Dtime(QWidget * parent)
timeEdit = new QTimeEdit( timeBox );
timeEdit->setWrapping(true);
- timeEdit->setDisplayFormat(KGlobal::locale()->use12Clock() ? "hh:mm:ss ap" : "HH:mm:ss");
+ timeEdit->setDisplayFormat(KGlobal::locale()->timeFormat(QLocale::ShortFormat));
v3->addWidget(timeEdit);
v3->addStretch();
diff --git a/kcontrol/locale/AUTHORS b/kcontrol/locale/AUTHORS
deleted file mode 100644
index 74a381b4..00000000
--- a/kcontrol/locale/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Matthias Hoelzer (hoelzer@physik.uni-wuerzburg.de)
-Hans Petter Bieker
diff --git a/kcontrol/locale/countryselectordialog.cpp b/kcontrol/locale/countryselectordialog.cpp
deleted file mode 100644
index f5663190..00000000
--- a/kcontrol/locale/countryselectordialog.cpp
+++ /dev/null
@@ -1,363 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2007 by Albert Astals Cid *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- ***************************************************************************/
-
-#include "countryselectordialog.h"
-
-#include "kcontrollocale.h"
-
-#include
-
-#include
-#include
-#include
-#include
-#include
-
-struct CountryModelItem
-{
- CountryModelItem()
- {
- }
-
- CountryModelItem( CountryModelItem *p, const QString &theText, const QString &theTag )
- : parent(p), text(theText), tag(theTag)
- {
- }
-
- ~CountryModelItem()
- {
- qDeleteAll(children);
- }
-
- int row() const
- {
- if (parent) return parent->children.indexOf(const_cast(this));
- return 0;
- }
-
- CountryModelItem *parent;
- QList< CountryModelItem* > children;
-
- QString text, tag;
- KIcon icon;
-};
-
-
-
-bool CountryModelItemLessThan(CountryModelItem *s1, CountryModelItem *s2)
-{
- return s1->text < s2->text;
-}
-
-
-
-class CountryModel : public QAbstractItemModel
-{
- public:
- CountryModel(QObject *parent) : QAbstractItemModel(parent)
- {
- m_rootItem = new CountryModelItem(NULL, QString(), QString());
- }
-
- CountryModel(CountryModelItem *rootItem, QObject *parent) : QAbstractItemModel(parent)
- {
- m_rootItem = rootItem;
- }
-
- ~CountryModel()
- {
- if (m_rootItem->parent == NULL) delete m_rootItem;
- }
-
- void addRegion(const QString &name, const QString &tag)
- {
- CountryModelItem *cmi = new CountryModelItem(m_rootItem, name, tag);
- m_rootItem->children.append(cmi);
- }
-
- void addSubRegion(const KIcon &flag, const QString &name, const QString &tag, const QString &superRegion)
- {
- CountryModelItem *parent = NULL;
- foreach(CountryModelItem *cm, m_rootItem->children)
- {
- if (cm->tag == superRegion) parent = cm;
- }
- if (parent)
- {
- CountryModelItem *cmi = new CountryModelItem(parent, name, tag);
- cmi->icon = flag;
- parent->children.append(cmi);
- }
- }
-
- void sort()
- {
- qSort(m_rootItem->children.begin(), m_rootItem->children.end(), CountryModelItemLessThan);
- foreach(CountryModelItem *cm, m_rootItem->children)
- {
- qSort(cm->children.begin(), cm->children.end(), CountryModelItemLessThan);
- }
- }
-
- int rowCount(const QModelIndex &parent) const
- {
- if (parent.column() > 0)
- return 0;
-
- CountryModelItem *parentItem;
- if (!parent.isValid())
- parentItem = m_rootItem;
- else
- parentItem = static_cast(parent.internalPointer());
-
- return parentItem->children.count();
- }
-
- int columnCount(const QModelIndex &parent) const
- {
- if (!parent.isValid()) return 1;
- else
- {
- CountryModelItem *p = static_cast(parent.internalPointer());
- if (p->parent) return 1;
- else return 0;
- }
- }
-
- QModelIndex index(int row, int column, const QModelIndex &parent) const
- {
- if (!hasIndex(row, column, parent))
- return QModelIndex();
-
- CountryModelItem *parentItem;
- if (!parent.isValid())
- parentItem = m_rootItem;
- else
- parentItem = static_cast(parent.internalPointer());
-
- CountryModelItem *childItem = parentItem->children.at(row);
- if (childItem)
- return createIndex(row, column, childItem);
- else
- return QModelIndex();
- }
-
- QModelIndex parent(const QModelIndex &index) const
- {
- if (!index.isValid())
- return QModelIndex();
-
- CountryModelItem *childItem = static_cast(index.internalPointer());
- CountryModelItem *parentItem = childItem->parent;
-
- if (parentItem == m_rootItem)
- return QModelIndex();
-
- return createIndex(parentItem->row(), 0, parentItem);
- }
-
- QVariant data(const QModelIndex &index, int role) const
- {
- if (index.isValid())
- {
- CountryModelItem *cmi = static_cast(index.internalPointer());
- if (role == Qt::DisplayRole)
- {
- return cmi->text;
- }
- else if (role == Qt::DecorationRole)
- {
- if (cmi->parent->parent) return cmi->icon;
- }
- }
- return QVariant();
- }
-
- private:
- CountryModelItem *m_rootItem;
-};
-
-
-
-class CSDListView : public QListView
-{
- public:
- CSDListView(QWidget *parent) : QListView(parent)
- {
- }
-
- void setOtherWidget(QWidget *widget, Qt::Key key)
- {
- m_other = widget;
- m_key = key;
- }
-
- protected:
- void keyPressEvent(QKeyEvent *event)
- {
- if (event->key() == m_key) m_other->setFocus();
- else QListView::keyPressEvent(event);
- }
-
- private:
- QWidget *m_other;
- Qt::Key m_key;
-};
-
-
-
-CountrySelectorDialog::CountrySelectorDialog(QWidget *parent) : KDialog(parent)
-{
- setCaption( i18n("Country Selector") );
- setButtons( KDialog::Ok | KDialog::Cancel );
-
- QWidget *widget = new QWidget(this);
- setMainWidget(widget);
-}
-
-bool CountrySelectorDialog::editCountry(KControlLocale *locale)
-{
- QHBoxLayout *hbl = new QHBoxLayout(mainWidget());
- CSDListView *lv1 = new CSDListView(mainWidget());
- m_countriesView = new CSDListView(mainWidget());
- hbl->addWidget(lv1);
- hbl->addWidget(m_countriesView);
- lv1->setOtherWidget(m_countriesView, Qt::Key_Right);
- m_countriesView->setOtherWidget(lv1, Qt::Key_Left);
-
- QString country, region;
- country = locale->country();
-
- CountryModel *cm = new CountryModel(this);
-
- QStringList regionlist = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("l10n/*.desktop"),
- KStandardDirs::NoDuplicates);
-
- QFontMetrics fm(lv1->font());
- int lv1Width = 0;
-
- foreach(const QString ®ion, regionlist)
- {
- QString tag = region;
- int index;
-
- index = tag.lastIndexOf('/');
- if (index != -1)
- tag = tag.mid(index + 1);
-
- index = tag.lastIndexOf('.');
- if (index != -1)
- tag.truncate(index);
-
- KConfig entry(region);
- KConfigGroup cg = entry.group("KCM Locale");
- QString name = cg.readEntry("Name", ki18n("without name").toString(locale));
-
- cm->addRegion(name, tag);
- QString spacedName = name + " ";
- lv1Width = qMax(lv1Width, fm.width(spacedName));
- }
-
- // add all languages to the list
- QStringList countrylist = KGlobal::dirs()->findAllResources("locale",
- sub + QString::fromLatin1("l10n/*/entry.desktop"),
- KStandardDirs::NoDuplicates);
- foreach(const QString &countryFile, countrylist)
- {
- KConfig entry(countryFile);
- KConfigGroup cg = entry.group("KCM Locale");
- QString name = cg.readEntry("Name", ki18n("without name").toString(locale));
- QString parentRegion = cg.readEntry("Region");
-
- QString tag = countryFile;
- int index = tag.lastIndexOf('/');
- tag.truncate(index);
- index = tag.lastIndexOf('/');
- tag = tag.mid(index + 1);
-
- QString flag( KStandardDirs::locate( "locale", QString::fromLatin1( "l10n/%1/flag.png" ).arg(tag) ) );
- cm->addSubRegion(KIcon(flag), name, tag, parentRegion);
- if (tag == country) region = parentRegion;
- }
-
- cm->sort();
-
- cm->addRegion(i18nc("@item:inlistbox Country", "Not set (Generic English)"), "C");
- if (country == "C") region = "C";
-
- lv1->setModel(cm);
- lv1->setFixedWidth(lv1Width + lv1->verticalScrollBar()->height());
- // + 2 because 1 is "Not set (Generic English)" and the other is for spacing
- lv1->setMinimumHeight((regionlist.count() + 2) * fm.height());
-
- connect(lv1->selectionModel(), SIGNAL(currentChanged(const QModelIndex &, const QModelIndex &)), SLOT(regionChanged(const QModelIndex &)));
- connect(lv1, SIGNAL(activated(const QModelIndex &)), SLOT(regionActivated()));
- connect(m_countriesView, SIGNAL(activated(const QModelIndex &)), SLOT(accept()));
-
- for(int i = 0; i < lv1->model()->rowCount(); ++i)
- {
- const QModelIndex ¤t = lv1->model()->index(i, 0);
- CountryModelItem *cmi = static_cast(current.internalPointer());
- if (cmi->tag == region)
- {
- lv1->selectionModel()->setCurrentIndex(current, QItemSelectionModel::SelectCurrent);
- }
- }
- if (m_countriesView->model() != NULL)
- {
- for(int i = 0; i < m_countriesView->model()->rowCount(); ++i)
- {
- const QModelIndex ¤t = m_countriesView->model()->index(i, 0);
- CountryModelItem *cmi = static_cast(current.internalPointer());
- if (cmi->tag == country)
- {
- m_countriesView->selectionModel()->setCurrentIndex(current, QItemSelectionModel::SelectCurrent);
- }
- }
- m_countriesView->setFocus();
- }
- else lv1->setFocus();
-
- if (exec() == QDialog::Accepted)
- {
- const QModelIndex ¤t = m_countriesView->currentIndex();
- if (current.isValid())
- {
- CountryModelItem *cmi = static_cast(current.internalPointer());
- return locale->setCountry(cmi->tag);
- }
- else if (m_countriesView->model() == NULL)
- {
- return locale->setCountry("C");
- }
- }
- return false;
-}
-
-void CountrySelectorDialog::regionChanged(const QModelIndex ¤t)
-{
- delete m_countriesView->model();
- CountryModelItem *cmi = static_cast(current.internalPointer());
- if (!cmi->children.isEmpty())
- {
- CountryModel *cm = new CountryModel(cmi, this);
- m_countriesView->setModel(cm);
- }
- else
- {
- m_countriesView->setModel(NULL);
- }
-}
-
-void CountrySelectorDialog::regionActivated()
-{
- if (m_countriesView->model() != NULL) m_countriesView->setFocus();
- else accept();
-}
diff --git a/kcontrol/locale/countryselectordialog.h b/kcontrol/locale/countryselectordialog.h
deleted file mode 100644
index 193853e7..00000000
--- a/kcontrol/locale/countryselectordialog.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/***************************************************************************
- * Copyright (C) 2007 by Albert Astals Cid *
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- ***************************************************************************/
-
-#ifndef COUNTRYSELECTORDIALOG_H
-#define COUNTRYSELECTORDIALOG_H
-
-#include
-
-class CSDListView;
-
-class KControlLocale;
-
-#include
-
-class CountrySelectorDialog : public KDialog
-{
-Q_OBJECT
- public:
- CountrySelectorDialog(QWidget *parent);
-
- bool editCountry(KControlLocale *locale);
-
- private slots:
- void regionChanged(const QModelIndex ¤t);
- void regionActivated();
-
- private:
- CSDListView *m_countriesView;
-};
-
-#endif
diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp
index cda1576e..10c2e2d7 100644
--- a/kcontrol/locale/kcmlocale.cpp
+++ b/kcontrol/locale/kcmlocale.cpp
@@ -1,2515 +1,342 @@
-/*
- * Copyright (c) 1998 Matthias Hoelzer (hoelzer@physik.uni-wuerzburg.de)
- * Copyright (c) 1999 Preston Brown
- * Copyright (c) 1999-2003 Hans Petter Bieker
- * Copyright 2010 John Layt
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- */
+/* This file is part of the KDE project
+ Copyright (C) 2023 Ivailo Monev
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2, as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
#include "kcmlocale.h"
-#include
-#include
-#include
-#include
-
#include
-#include
-#include
-#include
-#include
-#include
#include
-#include
+#include
#include
+#include
+#include
#include
-#include
+#include
-#include "ui_kcmlocalewidget.h"
+K_PLUGIN_FACTORY(KCMLocaleFactory, registerPlugin();)
+K_EXPORT_PLUGIN(KCMLocaleFactory("kcmlocale"))
-K_PLUGIN_FACTORY( KCMLocaleFactory, registerPlugin(); )
-K_EXPORT_PLUGIN( KCMLocaleFactory( "kcmlocale" ) )
+// NOTE: keep in sync with:
+// kdelibs/kdecore/localization/klocale.cpp
+static const QString s_defaultlanguage = KLocale::defaultLanguage();
+static const int s_defaultbinary = static_cast(KLocale::IECBinaryDialect);
-KCMLocale::KCMLocale( QWidget *parent, const QVariantList &args )
- : KCModule( KCMLocaleFactory::componentData(), parent, args ),
- m_userConfig( 0 ),
- m_kcmConfig( 0 ),
- m_defaultConfig( 0 ),
- m_groupConfig( 0 ),
- m_countryConfig( 0 ),
- m_cConfig( 0 ),
- m_kcmLocale( 0 ),
- m_defaultLocale( 0 ),
- m_ui( new Ui_KCMLocaleWidget )
+KCMLocale::KCMLocale(QWidget *parent, const QVariantList &args)
+ : KCModule(KCMLocaleFactory::componentData(), parent, args),
+ m_layout(nullptr),
+ m_languagelabel(nullptr),
+ m_languagebox(nullptr),
+ m_binarylabel(nullptr),
+ m_binarybox(nullptr),
+ m_measurelabel(nullptr),
+ m_measurebox(nullptr),
+ m_dateshortlabel(nullptr),
+ m_dateshortedit(nullptr),
+ m_datelonglabel(nullptr),
+ m_datelongedit(nullptr),
+ m_datenarrowlabel(nullptr),
+ m_datenarrowedit(nullptr),
+ m_spacer(nullptr)
{
- KAboutData *about = new KAboutData( "kcmlocale", 0, ki18n( "Localization options for KDE applications" ),
- 0, KLocalizedString(), KAboutData::License_GPL,
- ki18n( "Copyright 2010 John Layt" ) );
+ KAboutData *about = new KAboutData(
+ "kcmlocale", 0, ki18n("Localization options for KDE applications"),
+ 0, KLocalizedString(), KAboutData::License_GPL,
+ ki18n("Copyright 2023 Ivailo Monev")
+ );
- about->addAuthor( ki18n( "John Layt" ), ki18n( "Maintainer" ), "john@layt.net" );
+ about->addAuthor(ki18n("Ivailo Monev"), ki18n("Maintainer"), "xakepa10@gmail.com");
- setAboutData( about );
+ setAboutData(about);
- m_ui->setupUi( this );
+ m_layout = new QGridLayout(this);
- initSettings();
+ m_languagelabel = new QLabel(this);
+ m_languagelabel->setText(i18n("Language:"));
+ m_layout->addWidget(m_languagelabel, 0, 0);
+ m_languagebox = new KComboBox(this);
+ foreach (const QString &language, KLocale::allLanguagesList()) {
+ QString languagelang;
+ QString languagecntry;
+ QString languagemod;
+ QString languagechar;
+ KLocale::splitLocale(language, languagelang, languagecntry, languagemod, languagechar);
+ if (languagecntry.isEmpty()) {
+ const QString languagetext = KGlobal::locale()->languageCodeToName(language);
+ m_languagebox->addItem(languagetext, language);
+ } else {
+ const QString languagetext = QString::fromLatin1("%1 - %2").arg(
+ KGlobal::locale()->languageCodeToName(languagelang),
+ KGlobal::locale()->countryCodeToName(languagecntry)
+ );
+ m_languagebox->addItem(languagetext, language);
+ }
+ }
+ const QString languagehelp = i18n(
+ "This is the list of languages KDE Workspace can use for converting "
+ "date, time and numbers. Changing the language will also change the "
+ "translations language, however each application can specify additional "
+ "translation languages."
+ "
"
+ );
+ m_languagebox->setToolTip(languagehelp);
+ m_languagebox->setWhatsThis(languagehelp);
+ connect(m_languagebox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotLanguageChanged(int)));
+ m_layout->addWidget(m_languagebox, 0, 1);
- // Country tab
- connect( m_ui->m_comboCountry, SIGNAL( activated( int ) ),
- this, SLOT( changedCountryIndex( int ) ) );
- connect( m_ui->m_buttonDefaultCountry, SIGNAL( clicked() ),
- this, SLOT( defaultCountry() ) );
+ m_binarylabel = new QLabel(this);
+ m_binarylabel->setText(i18n("Byte size units:"));
+ m_layout->addWidget(m_binarylabel, 1, 0);
+ m_binarybox = new KComboBox(this);
+ Q_ASSERT(int(KLocale::LastBinaryDialect) == int(KLocale::MetricBinaryDialect));
+ m_binarybox->addItem(
+ i18nc("Unit of binary measurement", "IEC Units (KiB, MiB, etc)"),
+ static_cast(KLocale::IECBinaryDialect)
+ );
+ m_binarybox->addItem(
+ i18nc("Unit of binary measurement", "JEDEC Units (KB, MB, etc)"),
+ static_cast(KLocale::JEDECBinaryDialect)
+ );
+ m_binarybox->addItem(
+ i18nc("Unit of binary measurement", "Metric Units (kB, MB, etc)"),
+ static_cast(KLocale::MetricBinaryDialect)
+ );
+ const QString binaryhelp = i18n(
+ "This changes the units used by most KDE programs to display "
+ "numbers counted in bytes. Traditionally \"kilobytes\" meant units "
+ "of 1024, instead of the metric 1000, for most (but not all) byte "
+ "sizes."
+ "
"
+ "- To reduce confusion you can use the recently standardized IEC "
+ "units which are always in multiples of 1024.
"
+ "- You can also select metric, which is always in units of 1000.
"
+ "- Selecting JEDEC restores the older-style units used in KDE 3.5 "
+ "and some other operating systems.
"
+ "
"
+ "
"
+ );
+ m_binarybox->setToolTip(binaryhelp);
+ m_binarybox->setWhatsThis(binaryhelp);
+ connect(m_binarybox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotBinaryChanged(int)));
+ m_layout->addWidget(m_binarybox, 1, 1);
- // Translations tab
+ m_measurelabel = new QLabel(this);
+ m_measurelabel->setText(i18n("Measurement system:"));
+ m_layout->addWidget(m_measurelabel, 2, 0);
+ m_measurebox = new KComboBox(this);
+ Q_ASSERT(int(QLocale::MetricSystem) == 0);
+ Q_ASSERT(int(QLocale::UKSystem) == 2);
+ m_measurebox->addItem(
+ i18n("Metric System"),
+ static_cast(QLocale::MetricSystem)
+ );
+ m_measurebox->addItem(
+ i18n("Imperial System"),
+ static_cast(QLocale::ImperialSystem)
+ );
+ m_measurebox->addItem(
+ i18n("UK System"),
+ static_cast(QLocale::UKSystem)
+ );
+ const QString measurehelp = i18n("Here you can define the measurement system to use.
");
+ m_measurebox->setToolTip(measurehelp);
+ m_measurebox->setWhatsThis(measurehelp);
+ connect(m_measurebox, SIGNAL(currentIndexChanged(int)), this, SLOT(slotMeasureChanged(int)));
+ m_layout->addWidget(m_measurebox, 2, 1);
- // User has changed the translations selection in some way
- connect( m_ui->m_selectTranslations, SIGNAL( added( QListWidgetItem* ) ),
- this, SLOT( changedTranslationsSelected( QListWidgetItem* ) ) );
- connect( m_ui->m_selectTranslations, SIGNAL( removed( QListWidgetItem* ) ),
- this, SLOT( changedTranslationsAvailable( QListWidgetItem* ) ) );
- connect( m_ui->m_selectTranslations, SIGNAL( movedUp( QListWidgetItem* ) ),
- this, SLOT( changedTranslationsSelected( QListWidgetItem* ) ) );
- connect( m_ui->m_selectTranslations, SIGNAL( movedDown( QListWidgetItem* ) ),
- this, SLOT( changedTranslationsSelected( QListWidgetItem* ) ) );
- // User has clicked Default button, resest lists to Defaults
- connect( m_ui->m_buttonDefaultTranslations, SIGNAL( clicked() ),
- this, SLOT( defaultTranslations() ) );
+ // TODO: tooltips and whatsthis
+ QGroupBox* dategroup = new QGroupBox(this);
+ dategroup->setTitle(i18n("Date format"));
+ QGridLayout* datelayout = new QGridLayout(dategroup);
+ dategroup->setLayout(datelayout);
+ m_dateshortlabel = new QLabel(dategroup);
+ m_dateshortlabel->setText(i18n("Short date format:"));
+ datelayout->addWidget(m_dateshortlabel, 0, 0);
+ m_dateshortedit = new KLineEdit(dategroup);
+ connect(m_dateshortedit, SIGNAL(textChanged(QString)), this, SLOT(slotDateOrTimeChanged(QString)));
+ datelayout->addWidget(m_dateshortedit, 0, 1);
+ m_datelonglabel = new QLabel(dategroup);
+ m_datelonglabel->setText(i18n("Long date format:"));
+ datelayout->addWidget(m_datelonglabel, 1, 0);
+ m_datelongedit = new KLineEdit(dategroup);
+ connect(m_datelongedit, SIGNAL(textChanged(QString)), this, SLOT(slotDateOrTimeChanged(QString)));
+ datelayout->addWidget(m_datelongedit, 1, 1);
+ m_datenarrowlabel = new QLabel(dategroup);
+ m_datenarrowlabel->setText(i18n("Narrow date format:"));
+ datelayout->addWidget(m_datenarrowlabel, 2, 0);
+ m_datenarrowedit = new KLineEdit(dategroup);
+ connect(m_datenarrowedit, SIGNAL(textChanged(QString)), this, SLOT(slotDateOrTimeChanged(QString)));
+ datelayout->addWidget(m_datenarrowedit, 2, 1);
+ m_layout->addWidget(dategroup, 3, 0, 1, 2);
- // Numbers tab
+ // TODO: time and datetime format
- connect( m_ui->m_comboNumericDigitGrouping, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedNumericDigitGroupingIndex( int ) ) );
- connect( m_ui->m_buttonDefaultNumericDigitGrouping, SIGNAL( clicked() ),
- this, SLOT( defaultNumericDigitGrouping() ) );
+ m_spacer = new QSpacerItem(1, 1, QSizePolicy::Expanding, QSizePolicy::Expanding);
+ m_layout->addItem(m_spacer, 4, 1, 2);
- connect( m_ui->m_comboThousandsSeparator, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedNumericThousandsSeparator( const QString & ) ) );
- connect( m_ui->m_buttonDefaultThousandsSeparator, SIGNAL( clicked() ),
- this, SLOT( defaultNumericThousandsSeparator() ) );
-
- connect( m_ui->m_comboDecimalSymbol, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedNumericDecimalSymbol( const QString & ) ) );
- connect( m_ui->m_buttonDefaultDecimalSymbol, SIGNAL( clicked() ),
- this, SLOT( defaultNumericDecimalSymbol() ) );
-
- connect( m_ui->m_intDecimalPlaces, SIGNAL( valueChanged( int ) ),
- this, SLOT( changedNumericDecimalPlaces( int ) ) );
- connect( m_ui->m_buttonDefaultDecimalPlaces, SIGNAL( clicked() ),
- this, SLOT( defaultNumericDecimalPlaces() ) );
-
- connect( m_ui->m_comboPositiveSign, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedNumericPositiveSign( const QString & ) ) );
- connect( m_ui->m_buttonDefaultPositiveSign, SIGNAL( clicked() ),
- this, SLOT( defaultNumericPositiveSign() ) );
-
- connect( m_ui->m_comboNegativeSign, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedNumericNegativeSign( const QString & ) ) );
- connect( m_ui->m_buttonDefaultNegativeSign, SIGNAL( clicked() ),
- this, SLOT( defaultNumericNegativeSign() ) );
-
- connect( m_ui->m_comboDigitSet, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedNumericDigitSetIndex( int ) ) );
- connect( m_ui->m_buttonDefaultDigitSet, SIGNAL( clicked() ),
- this, SLOT( defaultNumericDigitSet() ) );
-
- // Calendar tab
-
- connect( m_ui->m_comboCalendarSystem, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedCalendarSystemIndex( int ) ) );
- connect( m_ui->m_buttonDefaultCalendarSystem, SIGNAL( clicked() ),
- this, SLOT( defaultCalendarSystem() ) );
-
- connect( m_ui->m_checkCalendarGregorianUseCommonEra, SIGNAL( clicked( bool ) ),
- this, SLOT( changedUseCommonEra( bool ) ) );
- connect( m_ui->m_buttonDefaultCalendarGregorianUseCommonEra, SIGNAL( clicked() ),
- this, SLOT( defaultUseCommonEra() ) );
-
- connect( m_ui->m_intShortYearWindowStartYear, SIGNAL( valueChanged( int ) ),
- this, SLOT( changedShortYearWindow( int ) ) );
- connect( m_ui->m_buttonDefaultShortYearWindow, SIGNAL( clicked() ),
- this, SLOT( defaultShortYearWindow() ) );
-
- connect( m_ui->m_comboWeekNumberSystem, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedWeekNumberSystemIndex( int ) ) );
- connect( m_ui->m_buttonDefaultWeekNumberSystem, SIGNAL( clicked() ),
- this, SLOT( defaultWeekNumberSystem() ) );
-
- connect( m_ui->m_comboWeekStartDay, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedWeekStartDayIndex( int ) ) );
- connect( m_ui->m_buttonDefaultWeekStartDay, SIGNAL( clicked() ),
- this, SLOT( defaultWeekStartDay() ) );
-
- // Date / Time tab
-
- connect( m_ui->m_comboTimeFormat, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedTimeFormat( const QString & ) ) );
- connect( m_ui->m_buttonDefaultTimeFormat, SIGNAL( clicked() ),
- this, SLOT( defaultTimeFormat() ) );
-
- connect( m_ui->m_comboAmSymbol, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedAmSymbol( const QString & ) ) );
- connect( m_ui->m_buttonDefaultAmSymbol, SIGNAL( clicked() ),
- this, SLOT( defaultAmSymbol() ) );
-
- connect( m_ui->m_comboPmSymbol, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedPmSymbol( const QString & ) ) );
- connect( m_ui->m_buttonDefaultPmSymbol, SIGNAL( clicked() ),
- this, SLOT( defaultPmSymbol() ) );
-
- connect( m_ui->m_comboDateFormat, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedDateFormat( const QString & ) ) );
- connect( m_ui->m_buttonDefaultDateFormat, SIGNAL( clicked() ),
- this, SLOT( defaultDateFormat() ) );
-
- connect( m_ui->m_comboShortDateFormat, SIGNAL( editTextChanged( const QString & ) ),
- this, SLOT( changedShortDateFormat( const QString & ) ) );
- connect( m_ui->m_buttonDefaultShortDateFormat, SIGNAL( clicked() ),
- this, SLOT( defaultShortDateFormat() ) );
-
- connect( m_ui->m_checkMonthNamePossessive, SIGNAL( clicked( bool ) ),
- this, SLOT( changedMonthNamePossessive( bool ) ) );
- connect( m_ui->m_buttonDefaultMonthNamePossessive, SIGNAL( clicked() ),
- this, SLOT( defaultMonthNamePossessive() ) );
-
- connect( m_ui->m_comboDateTimeDigitSet, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedDateTimeDigitSetIndex( int ) ) );
- connect( m_ui->m_buttonDefaultDateTimeDigitSet, SIGNAL( clicked() ),
- this, SLOT( defaultDateTimeDigitSet() ) );
-
- // Other tab
-
- connect( m_ui->m_comboPageSize, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedPageSizeIndex( int ) ) );
- connect( m_ui->m_buttonDefaultPageSize, SIGNAL( clicked() ),
- this, SLOT( defaultPageSize() ) );
-
- connect( m_ui->m_comboMeasureSystem, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedMeasureSystemIndex( int ) ) );
- connect( m_ui->m_buttonDefaultMeasureSystem, SIGNAL( clicked() ),
- this, SLOT( defaultMeasureSystem() ) );
-
- connect( m_ui->m_comboBinaryUnitDialect, SIGNAL( currentIndexChanged( int ) ),
- this, SLOT( changedBinaryUnitDialectIndex( int ) ) );
- connect( m_ui->m_buttonDefaultBinaryUnitDialect, SIGNAL( clicked() ),
- this, SLOT( defaultBinaryUnitDialect() ) );
+ setLayout(m_layout);
}
KCMLocale::~KCMLocale()
{
- // Throw away any unsaved changes as delete calls an unwanted sync()
- m_kcmConfig->markAsClean();
- m_userConfig->markAsClean();
- m_defaultConfig->markAsClean();
- m_cConfig->markAsClean();
- m_countryConfig->markAsClean();
- m_groupConfig->markAsClean();
- delete m_kcmLocale;
- delete m_defaultLocale;
- delete m_ui;
}
-// Init all the config/settings objects, only called at the very start but inits everything so
-// load() and mergeSettings() can assume everything exists every time they are called
-void KCMLocale::initSettings()
-{
- // Setup the KCM Config/Settings
- // These are the effective settings merging KCM Changes, User, Group, Country, and C settings
- // This will be used to display current state of settings in the KCM
- // These settings should never be saved anywhere
- m_kcmConfig = KSharedConfig::openConfig( "kcmlocale-kcm", KConfig::SimpleConfig );
- m_kcmSettings = KConfigGroup( m_kcmConfig, "Locale" );
- m_kcmSettings.deleteGroup();
- m_kcmSettings.markAsClean();
-
- // Setup the Default Config/Settings
- // These will be a merge of the C, Country and Group settings
- // If the user clicks on the Defaults button, these are the settings that will be used
- // These settings should never be saved anywhere
- m_defaultConfig = KSharedConfig::openConfig( "kcmlocale-default", KConfig::SimpleConfig );
- m_defaultSettings = KConfigGroup( m_defaultConfig, "Locale" );
-
- // Setup the User Config/Settings
- // These are the User overrides, they exclude any Group, Country, or C settings
- // This will be used to store the User changes
- // These are the only settings that should ever be saved
- m_userConfig = KSharedConfig::openConfig( "kcmlocale-user", KConfig::IncludeGlobals );
- m_userSettings = KConfigGroup( m_userConfig, "Locale" );
-
- // Setup the Current Config/Settings
- // These are the currently saved User settings
- // This will be used to check if the kcm settings have been changed
- // These settings should never be saved anywhere
- m_currentConfig = KSharedConfig::openConfig( "kcmlocale-current", KConfig::IncludeGlobals );
- m_currentSettings = KConfigGroup( m_currentConfig, "Locale" );
-
- // Setup the Group Config/Settings
- // These are the Group overrides, they exclude any User, Country, or C settings
- // This will be used in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- m_groupConfig = KSharedConfig::openConfig( "kcmlocale-group", KConfig::NoGlobals );
- m_groupSettings = KConfigGroup( m_groupConfig, "Locale" );
-
- // Setup the C Config Settings
- // These are the C/Posix defaults and KDE defaults where a setting doesn't exist in Posix
- // This will be used as the lowest level in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- m_cConfig = KSharedConfig::openConfig( KStandardDirs::locate( "locale",
- QString::fromLatin1("l10n/C/entry.desktop") ) );
- m_cSettings= KConfigGroup( m_cConfig, "KCM Locale" );
-
- initCountrySettings( KGlobal::locale()->country() );
-
- initCalendarSettings();
-
- m_kcmLocale = new KLocale( QLatin1String("kcmlocale"), m_kcmConfig );
- m_defaultLocale = new KLocale( QLatin1String("kcmlocale"), m_defaultConfig );
-
- // Find out the system country using a null config
- m_systemCountry = m_kcmLocale->country();
-
- // Set up the initial languages to use
- m_currentTranslations = m_userSettings.readEntry( "Language", QString() );
- m_kcmTranslations = m_currentTranslations.split( ':', QString::SkipEmptyParts );
-}
-
-void KCMLocale::initCountrySettings( const QString &countryCode )
-{
- // Setup the Country Config/Settings
- // These are the Country overrides, they exclude any User, Group, or C settings
- // This will be used in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- m_countryConfig = KSharedConfig::openConfig( KStandardDirs::locate( "locale",
- QString::fromLatin1("l10n/%1/entry.desktop")
- .arg( countryCode ) ) );
- m_countrySettings = KConfigGroup( m_countryConfig, "KCM Locale" );
- QString calendarType = m_countrySettings.readEntry( "CalendarSystem", "gregorian" );
- QString calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_countryCalendarSettings = m_countrySettings.group( calendarGroup );
-}
-
-// Init all the calendar settings sub-group objects, called both at the start and whenever the
-// calendar system is changed
-void KCMLocale::initCalendarSettings()
-{
- // Setup the User Config/Settings
- // These are the User overrides, they exclude any Group, Country, or C settings
- // This will be used to store the User changes
- QString calendarType = m_kcmSettings.readEntry( "CalendarSystem", QString() );
- QString calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_userCalendarSettings = m_userSettings.group( calendarGroup );
-
- // Setup the Current Config/Settings
- // These are the currently saved User settings
- // This will be used to check if the kcm settings have been changed
- calendarType = m_currentSettings.readEntry( "CalendarSystem", KGlobal::locale()->calendar()->calendarLabel() );
- calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_currentCalendarSettings = m_currentSettings.group( calendarGroup );
-
- // Setup the Group Config/Settings
- // These are the Group overrides, they exclude any User, Country, or C settings
- // This will be used in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- calendarType = m_groupSettings.readEntry( "CalendarSystem", KGlobal::locale()->calendar()->calendarLabel() );
- calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_groupCalendarSettings = m_groupSettings.group( calendarGroup );
-
- // Setup the C Config Settings
- // These are the C/Posix defaults and KDE defaults where a setting doesn't exist in Posix
- // This will be used as the lowest level in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- calendarType = m_cSettings.readEntry( "CalendarSystem", QString() );
- calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_cCalendarSettings = m_cSettings.group( calendarGroup );
-
- // Setup a the Country Config/Settings
- // These are the Country overrides, they exclude any User, Group, or C settings
- // This will be used in the merge to obtain the KCM Defaults
- // These settings should never be saved anywhere
- calendarType = m_countrySettings.readEntry( "CalendarSystem", "gregorian" );
- calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_countryCalendarSettings = m_countrySettings.group( calendarGroup );
-}
-
-// Load == User has clicked on Reset to restore load saved settings
-// Also gets called automatically called after constructor
void KCMLocale::load()
{
- // Throw away any unsaved changes then reload from file
- m_userConfig->markAsClean();
- m_userConfig->reparseConfiguration();
+ KConfig localeconfig = KConfig("kdeglobals", KConfig::FullConfig);
+ KConfigGroup localegroup = localeconfig.group("Locale");
- // Get the currently installed translations
- m_installedTranslations.clear();
- m_installedTranslations = m_kcmLocale->installedLanguages();
-
- // Check if any of the user requested translations are no longer installed
- // If any missing remove them and save the settings, we'll tell the user later
- m_kcmTranslations.clear();
- QStringList missingLanguages;
- QStringList userTranslations = m_userSettings.readEntry( "Language", QString() ).split( ':', QString::SkipEmptyParts );
- foreach ( const QString &languageCode, userTranslations ) {
- if ( m_installedTranslations.contains( languageCode ) ) {
- m_kcmTranslations.append( languageCode );
- } else {
- missingLanguages.append( languageCode );
- }
- }
- if (!missingLanguages.isEmpty()) {
- m_userSettings.writeEntry( "Language", m_kcmTranslations.join( ":" ), KConfig::Persistent | KConfig::Global );
- m_userConfig->sync();
- }
-
- // Now load the new current settings
- m_currentConfig->reparseConfiguration();
- m_currentTranslations = m_userSettings.readEntry( "Language", QString() );
-
- // Then create the new settings using the default, include user settings
- mergeSettings();
-
- // The update all the widgets to use the new settings
- initAllWidgets();
-
- // Now we have a ui built tell the user about the missing languages
- foreach ( const QString &languageCode, missingLanguages ) {
- KMessageBox::information(this, ki18n("You have the language with code '%1' in your list "
- "of languages to use for translation but the "
- "localization files for it could not be found. The "
- "language has been removed from your configuration. "
- "If you want to add it again please install the "
- "localization files for it and add the language again.")
- .subs( languageCode ).toString( m_kcmLocale ) );
- }
-}
-
-// Defaults == User has clicked on Defaults to load default settings
-// We interpret this to mean the defaults for the system country and language
-void KCMLocale::defaults()
-{
- // Clear out the user config but don't sync or reparse as we want to ignore the user settings
- m_userCalendarSettings.deleteGroup( KConfig::Persistent | KConfig::Global );
- m_userSettings.deleteGroup( KConfig::Persistent | KConfig::Global );
- m_kcmTranslations.clear();
- m_currentTranslations = QString();
-
- // Reload the system country
- initCountrySettings( m_systemCountry );
-
- // Then create the new settings using the default, exclude user settings
- mergeSettings();
-
- // Save the current translations for checking later
- m_currentTranslations = m_kcmSettings.readEntry( "Language", QString() );
-
- // The update all the widgets to use the new settings
- initAllWidgets();
-}
-
-// Write our own copy routine as we need to be selective about what values get copied, e.g. exclude
-// Name, Region, etc, and copyTo() seems to barf on some uses
-void KCMLocale::copySettings( KConfigGroup *fromGroup, KConfigGroup *toGroup, KConfig::WriteConfigFlags flags )
-{
- copySetting( fromGroup, toGroup, "Country", flags );
- copySetting( fromGroup, toGroup, "Language", flags );
- copySetting( fromGroup, toGroup, "DecimalPlaces", flags );
- copySetting( fromGroup, toGroup, "DecimalSymbol", flags );
- copySetting( fromGroup, toGroup, "DigitGroupFormat", flags );
- copySetting( fromGroup, toGroup, "ThousandsSeparator", flags );
- copySetting( fromGroup, toGroup, "PositiveSign", flags );
- copySetting( fromGroup, toGroup, "NegativeSign", flags );
- copySetting( fromGroup, toGroup, "DigitSet", flags );
- copySetting( fromGroup, toGroup, "CalendarSystem", flags );
- copySetting( fromGroup, toGroup, "TimeFormat", flags );
- QString eraKey = QString::fromLatin1("DayPeriod1");
- int i = 1;
- while ( fromGroup->hasKey( eraKey ) ) {
- copySetting( fromGroup, toGroup, eraKey, flags );
- ++i;
- eraKey = QString::fromLatin1("DayPeriod%1").arg( i );
- }
- copySetting( fromGroup, toGroup, "DateFormat", flags );
- copySetting( fromGroup, toGroup, "DateFormatShort", flags );
- copySetting( fromGroup, toGroup, "DateMonthNamePossessive", flags );
- copySetting( fromGroup, toGroup, "WeekNumberSystem", flags );
- copySetting( fromGroup, toGroup, "WeekStartDay", flags );
- copySetting( fromGroup, toGroup, "DateTimeDigitSet", flags );
- copySetting( fromGroup, toGroup, "BinaryUnitDialect", flags );
- copySetting( fromGroup, toGroup, "PageSize", flags );
- copySetting( fromGroup, toGroup, "MeasureSystem", flags );
-}
-
-void KCMLocale::copyCalendarSettings( KConfigGroup *fromGroup, KConfigGroup *toGroup, KConfig::WriteConfigFlags flags )
-{
- copySetting( fromGroup, toGroup, "ShortYearWindowStartYear", flags );
- copySetting( fromGroup, toGroup, "UseCommonEra", flags );
- QString eraKey = QString::fromLatin1("Era1");
- int i = 1;
- while ( fromGroup->hasKey( eraKey ) ) {
- copySetting( fromGroup, toGroup, eraKey, flags );
- ++i;
- eraKey = QString::fromLatin1("Era%1").arg( i );
- }
-}
-
-void KCMLocale::copySetting( KConfigGroup *fromGroup, KConfigGroup *toGroup, const QString &key, KConfig::WriteConfigFlags flags )
-{
- if ( fromGroup->hasKey( key ) ) {
- toGroup->writeEntry( key, fromGroup->readEntry( key, QString() ), flags );
- }
-}
-
-void KCMLocale::mergeSettings()
-{
- // Set the Locale for the configs to use
- QString locale;
- if ( m_kcmTranslations.count() >= 1 ) {
- locale = m_kcmTranslations.first();
+ const QString localelanguage = localegroup.readEntry("Language", s_defaultlanguage);
+ const int languageindex = m_languagebox->findData(localelanguage);
+ if (languageindex >= 0) {
+ m_languagebox->setCurrentIndex(languageindex);
+ emit changed(true);
} else {
- locale = "en_US";
+ kWarning() << "Could not find the language index for" << localelanguage;
}
- m_cConfig->setLocale( locale );
- m_countryConfig->setLocale( locale );
- m_groupConfig->setLocale( locale );
+ const int localebinary = localegroup.readEntry("BinaryUnitDialect", s_defaultbinary);
+ const int binaryindex = m_binarybox->findData(localebinary);
+ if (binaryindex >= 0) {
+ m_binarybox->setCurrentIndex(binaryindex);
+ emit changed(true);
+ } else {
+ kWarning() << "Could not find the binary index for" << localebinary;
+ }
- // Merge the default settings, i.e. C, Country, and Group
- m_defaultSettings.deleteGroup();
- m_defaultSettings.markAsClean();
- m_defaultConfig->setLocale( locale );
- copySettings( &m_cSettings, &m_defaultSettings );
- copySettings( &m_countrySettings, &m_defaultSettings );
- copySettings( &m_groupSettings, &m_defaultSettings );
- // Mark as clean to prevent any accidental sync() via side-effect once passed to the KLocale
- m_defaultConfig->markAsClean();
- // Need to set the language of the KLocale first, so when we pass the config into the setCountry
- // call the implicit setLocale() will find the languages match and not force a reparse of the
- // non-existent settings file, losing all our settings in the process.
- m_defaultLocale->setLanguage( m_kcmTranslations );
- m_defaultLocale->setCountry( m_defaultSettings.readEntry( "Country", QString() ), m_defaultConfig.data() );
- m_defaultSettings.writeEntry( "DayPeriod1",
- amPeriod( m_defaultLocale->dayPeriodText( QTime( 0, 0, 0 ), KLocale::LongName ),
- m_defaultLocale->dayPeriodText( QTime( 0, 0, 0 ), KLocale::ShortName ),
- m_defaultLocale->dayPeriodText( QTime( 0, 0, 0 ), KLocale::NarrowName ) ) );
- m_defaultSettings.writeEntry( "DayPeriod2",
- pmPeriod( m_defaultLocale->dayPeriodText( QTime( 12, 0, 0 ), KLocale::LongName ),
- m_defaultLocale->dayPeriodText( QTime( 12, 0, 0 ), KLocale::ShortName ),
- m_defaultLocale->dayPeriodText( QTime( 12, 0, 0 ), KLocale::NarrowName ) ) );
- m_defaultConfig->markAsClean();
+ // NOTE: KLocale defaults to what QLocale returns
+ const QLocale locale(localelanguage);
+ const int localemeasure = localegroup.readEntry("MeasurementSystem", int(locale.measurementSystem()));
+ const int measureindex = m_measurebox->findData(localemeasure);
+ if (measureindex >= 0) {
+ m_measurebox->setCurrentIndex(measureindex);
+ emit changed(true);
+ } else {
+ kWarning() << "Could not find the measure index for" << localemeasure;
+ }
- // Merge the KCM settings, i.e. C, Country, Group, and User
- m_kcmSettings.deleteGroup();
- m_kcmConfig->markAsClean();
- m_kcmConfig->setLocale( locale );
- copySettings( &m_defaultSettings, &m_kcmSettings );
- copySettings( &m_userSettings, &m_kcmSettings );
+ const QString localedateshort = localegroup.readEntry("ShortDateFormat", locale.dateFormat(QLocale::ShortFormat));
+ m_dateshortedit->setText(localedateshort);
+ const QString localedatelong = localegroup.readEntry("LongDateFormat", locale.dateFormat(QLocale::LongFormat));
+ m_datelongedit->setText(localedatelong);
+ const QString localedatenarrow = localegroup.readEntry("NarrowDateFormat", locale.dateFormat(QLocale::NarrowFormat));
+ m_datenarrowedit->setText(localedatenarrow);
- // Merge the calendar settings sub-groups
- mergeCalendarSettings();
-
- // Reload the kcm translations list
- m_kcmTranslations.clear();
- m_kcmTranslations = m_kcmSettings.readEntry( "Language", QString() ).split( ':', QString::SkipEmptyParts );
-
- // Reload the kcm locale from the kcm settings
- // Mark as clean to prevent any accidental sync() via side-effect once passed to the KLocale
- m_kcmConfig->markAsClean();
- // Need to set the language of the KLocale first, so when we pass the config into the setCountry
- // call the implicit setLocale() will find the languages match and not force a reparse of the
- // non-existent settings file, losing all our settings in the process.
- m_kcmLocale->setLanguage( m_kcmTranslations );
- m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
-}
-
-void KCMLocale::mergeCalendarSettings()
-{
- // Merge the default settings, i.e. C, Country, and Group
- QString calendarType = m_defaultSettings.readEntry( "CalendarSystem", "gregorian" );
- QString calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_defaultCalendarSettings = m_defaultSettings.group( calendarGroup );
- m_defaultCalendarSettings.deleteGroup();
- copyCalendarSettings( &m_cCalendarSettings, &m_defaultCalendarSettings );
- copyCalendarSettings( &m_countryCalendarSettings, &m_defaultCalendarSettings );
- copyCalendarSettings( &m_groupCalendarSettings, &m_defaultCalendarSettings );
-
- // Merge the KCM settings, i.e. C, Country, Group, and User
- calendarType = m_kcmSettings.readEntry( "CalendarSystem", "gregorian" );
- calendarGroup = QString::fromLatin1( "KCalendarSystem %1" ).arg( calendarType );
- m_kcmCalendarSettings = m_kcmSettings.group( calendarGroup );
- m_kcmCalendarSettings.deleteGroup();
- copyCalendarSettings( &m_defaultCalendarSettings, &m_kcmCalendarSettings );
- copyCalendarSettings( &m_userCalendarSettings, &m_kcmCalendarSettings );
+ emit changed(false);
}
void KCMLocale::save()
{
- m_userConfig->sync();
+ KConfig localeconfig = KConfig("kdeglobals", KConfig::FullConfig);
+ KConfigGroup localegroup = localeconfig.group("Locale");
+ const QString localelanguage = m_languagebox->itemData(m_languagebox->currentIndex()).toString();
+ localegroup.writeEntry("Language", localelanguage);
+ const int localebinary = m_binarybox->itemData(m_binarybox->currentIndex()).toInt();
+ localegroup.writeEntry("BinaryUnitDialect", localebinary);
+ const int localemeasure = m_measurebox->itemData(m_measurebox->currentIndex()).toInt();
+ localegroup.writeEntry("MeasurementSystem", localemeasure);
+ // TODO: when the format is same as the default do not write it to the config (it may change)
+ localegroup.writeEntry("ShortDateFormat", m_dateshortedit->text());
+ localegroup.writeEntry("LongDateFormat", m_datelongedit->text());
+ localegroup.writeEntry("NarrowDateFormat", m_datenarrowedit->text());
+ localegroup.sync();
+ emit changed(false);
- // rebuild the date base if language was changed
- if ( m_currentTranslations != m_kcmSettings.readEntry( "Language", QString() ) ) {
- KMessageBox::information(this, ki18n("Changed language settings apply only to "
- "newly started applications.\nTo change the "
- "language of all programs, you will have to "
- "logout first.").toString(m_kcmLocale),
- ki18n("Applying Language Settings").toString(m_kcmLocale),
- QLatin1String("LanguageChangesApplyOnlyToNewlyStartedPrograms"));
- KBuildSycocaProgressDialog::rebuildKSycoca(this);
+ KMessageBox::information(this,
+ i18n(
+ "Changed language settings apply only to "
+ "newly started applications.\nTo change the "
+ "language of all programs, you will have to "
+ "logout first."
+ ),
+ i18n("Applying Language Settings"),
+ QLatin1String("LanguageChangesApplyOnlyToNewlyStartedPrograms")
+ );
+
+ KBuildSycocaProgressDialog::rebuildKSycoca(this);
+ KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged, KGlobalSettings::SETTINGS_LOCALE);
+}
+
+void KCMLocale::defaults()
+{
+ const int languageindex = m_languagebox->findData(s_defaultlanguage);
+ if (languageindex >= 0) {
+ m_languagebox->setCurrentIndex(languageindex);
+ emit changed(true);
+ } else {
+ kWarning() << "Could not find the language index for" << s_defaultlanguage;
}
- load();
- KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged, KGlobalSettings::SETTINGS_LOCALE);
+ const int binaryindex = m_binarybox->findData(s_defaultbinary);
+ if (binaryindex >= 0) {
+ m_binarybox->setCurrentIndex(binaryindex);
+ emit changed(true);
+ } else {
+ kWarning() << "Could not find the binary index for" << s_defaultbinary;
+ }
+
+ loadLocaleSettings();
}
QString KCMLocale::quickHelp() const
{
- return ki18n("Country/Region & Language
\n"
- "Here you can set your localization settings such as language, "
- "numeric formats, date and time formats, etc. Choosing a country "
- "will load a set of default formats which you can then change to "
- "your personal preferences. These personal preferences will remain "
- "set even if you change the country. The reset buttons allow you "
- "to easily see where you have personal settings and to restore "
- "those items to the country's default value.
"
- ).toString(m_kcmLocale);
+ return i18n(
+ "Country/Region & Language
\n"
+ "Here you can set your localization settings such as language, "
+ "numeric formats, date and time formats, etc. Choosing a country "
+ "will load a set of default formats which you can then change to "
+ "your personal preferences. These personal preferences will remain "
+ "set even if you change the country. The reset buttons allow you "
+ "to easily see where you have personal settings and to restore "
+ "those items to the country's default value.
"
+ );
}
-void KCMLocale::initAllWidgets()
+void KCMLocale::loadLocaleSettings()
{
- //Common
- initTabs();
- initSample();
- initResetButtons();
-
- //Country tab
- initCountry();
-
- //Translations tab
- initTranslations();
-
- initSettingsWidgets();
-}
-
-void KCMLocale::initSettingsWidgets()
-{
- // Initialise the settings widgets with the default values whenever the country or language changes
-
- //Numeric tab
- initNumericDigitGrouping();
- initNumericThousandsSeparator();
- initNumericDecimalSymbol();
- initNumericDecimalPlaces();
- initNumericPositiveSign();
- initNumericNegativeSign();
- initNumericDigitSet();
-
- //Calendar tab
- initCalendarSystem();
- // this also inits all the Calendar System dependent settings
-
- //Date/Time tab
- initTimeFormat();
- initAmPmSymbols();
- initDateFormat();
- initShortDateFormat();
- initMonthNamePossessive();
- initDateTimeDigitSet();
-
- //Other tab
- initPageSize();
- initMeasureSystem();
- initBinaryUnitDialect();
-
- checkIfChanged();
-}
-
-void KCMLocale::initResetButtons()
-{
- KGuiItem defaultItem( QString(), "document-revert", ki18n( "Reset item to its default value" ).toString( m_kcmLocale ) );
-
- //Country tab
- m_ui->m_buttonDefaultCountry->setGuiItem( defaultItem );
-
- //Translations tab
- m_ui->m_buttonDefaultTranslations->setGuiItem( defaultItem );
-
- //Numeric tab
- m_ui->m_buttonDefaultNumericDigitGrouping->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultThousandsSeparator->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultDecimalSymbol->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultDecimalPlaces->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultPositiveSign->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultNegativeSign->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultDigitSet->setGuiItem( defaultItem );
-
- //Calendar tab
- m_ui->m_buttonDefaultCalendarSystem->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultCalendarGregorianUseCommonEra->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultShortYearWindow->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultWeekNumberSystem->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultWeekStartDay->setGuiItem( defaultItem );
-
- //Date/Time tab
- m_ui->m_buttonDefaultTimeFormat->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultAmSymbol->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultPmSymbol->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultDateFormat->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultShortDateFormat->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultMonthNamePossessive->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultDateTimeDigitSet->setGuiItem( defaultItem );
-
- //Other tab
- m_ui->m_buttonDefaultPageSize->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultMeasureSystem->setGuiItem( defaultItem );
- m_ui->m_buttonDefaultBinaryUnitDialect->setGuiItem( defaultItem );
-}
-
-void KCMLocale::checkIfChanged()
-{
- if ( m_userSettings.keyList() != m_currentSettings.keyList() ||
- m_userCalendarSettings.keyList() != m_currentCalendarSettings.keyList() ) {
- emit changed( true );
- } else {
- foreach( const QString & key, m_currentSettings.keyList() ) {
- if ( m_userSettings.readEntry( key, QString() ) !=
- m_currentSettings.readEntry( key, QString() ) ) {
- emit changed( true );
- return;
- }
- }
- foreach( const QString & key, m_currentCalendarSettings.keyList() ) {
- if ( m_userCalendarSettings.readEntry( key, QString() ) !=
- m_currentCalendarSettings.readEntry( key, QString() ) ) {
- emit changed( true );
- return;
- }
- }
- emit changed( false );
- }
-}
-
-// Determine if the item should be enabled or disabled
-void KCMLocale::enableItemWidgets( const QString &itemKey,
- KConfigGroup *userSettings, KConfigGroup *kcmSettings, KConfigGroup *defaultSettings,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- // If the setting is locked down by Kiosk, then don't let the user make any changes
- if ( userSettings->isEntryImmutable( itemKey ) ) {
- itemWidget->setEnabled( false );
- itemDefaultButton->setEnabled( false );
- } else {
- itemWidget->setEnabled( true );
- // If the new value is not the default, then enable the default button
- if ( kcmSettings->readEntry( itemKey, QString() ) !=
- defaultSettings->readEntry( itemKey, QString() ) ) {
- itemDefaultButton->setEnabled( true );
- } else {
- itemDefaultButton->setEnabled( false );
- }
- }
-}
-
-// Set the value of a QString item in kcm and user settings
-void KCMLocale::setItemValue( const QString &itemKey, const QString &itemValue,
- KConfigGroup *userSettings, KConfigGroup *kcmSettings, KConfigGroup *defaultSettings )
-{
- if ( !userSettings->isEntryImmutable( itemKey ) ) {
- // Always write to the kcm as the value will always exist there and needs overwriting
- kcmSettings->writeEntry( itemKey, itemValue );
- // If different to the default save the new value, otherwise delete and use the default
- if ( itemValue != defaultSettings->readEntry( itemKey, QString() ) ) {
- userSettings->writeEntry( itemKey, itemValue, KConfig::Persistent | KConfig::Global );
- } else {
- userSettings->deleteEntry( itemKey, KConfig::Persistent | KConfig::Global );
- }
- }
-}
-
-void KCMLocale::setItem( const QString &itemKey, const QString &itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setItemValue( itemKey, itemValue,
- &m_userSettings, &m_kcmSettings, &m_defaultSettings);
- enableItemWidgets( itemKey,
- &m_userSettings, &m_kcmSettings, &m_defaultSettings,
- itemWidget, itemDefaultButton );
- checkIfChanged();
-}
-
-void KCMLocale::setItem( const QString &itemKey, int itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, QVariant( itemValue ).toString(), itemWidget, itemDefaultButton );
-}
-
-void KCMLocale::setItem( const QString &itemKey, bool itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, QVariant( itemValue ).toString(), itemWidget, itemDefaultButton );
-}
-
-void KCMLocale::setCalendarItem( const QString &itemKey, const QString &itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setItemValue( itemKey, itemValue,
- &m_userCalendarSettings, &m_kcmCalendarSettings, &m_defaultCalendarSettings );
- enableItemWidgets( itemKey,
- &m_userCalendarSettings, &m_kcmCalendarSettings, &m_defaultCalendarSettings,
- itemWidget, itemDefaultButton );
- checkIfChanged();
-}
-
-void KCMLocale::setCalendarItem( const QString &itemKey, int itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setCalendarItem( itemKey, QVariant( itemValue ).toString(), itemWidget, itemDefaultButton );
-}
-
-void KCMLocale::setCalendarItem( const QString &itemKey, bool itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton )
-{
- setCalendarItem( itemKey, QVariant( itemValue ).toString(), itemWidget, itemDefaultButton );
-}
-
-// Don't use for edit combo's
-void KCMLocale::setComboItem( const QString &itemKey, const QString &itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, itemValue, itemCombo, itemDefaultButton );
- // Read the entry rather than use itemValue in case setItem didn't change the value, e.g. if immutable
- itemCombo->setCurrentIndex( itemCombo->findData( m_kcmSettings.readEntry( itemKey, QString() ) ) );
-}
-
-// Don't use for edit combo's
-void KCMLocale::setComboItem( const QString &itemKey, int itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, itemValue, itemCombo, itemDefaultButton );
- // Read the entry rather than use itemValue in case setItem didn't change the value, e.g. if immutable
- itemCombo->setCurrentIndex( itemCombo->findData( m_kcmSettings.readEntry( itemKey, 0 ) ) );
-}
-
-// Don't use for user changes as will EOL on the entry
-void KCMLocale::setEditComboItem( const QString &itemKey, const QString &itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, itemValue, itemCombo, itemDefaultButton );
- // Read the entry rather than use itemValue in case setItem didn't change the value, e.g. if immutable
- itemCombo->setEditText( m_kcmSettings.readEntry( itemKey, QString() ) );
-}
-
-void KCMLocale::setIntItem( const QString &itemKey, int itemValue,
- KIntNumInput *itemInput, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, itemValue, itemInput, itemDefaultButton );
- // Read the entry rather than use itemValue in case setItem didn't change the value, e.g. if immutable
- itemInput->setValue( m_kcmSettings.readEntry( itemKey, 0 ) );
-}
-
-void KCMLocale::setCheckItem( const QString &itemKey, bool itemValue,
- QCheckBox *itemCheck, KPushButton *itemDefaultButton )
-{
- setItem( itemKey, itemValue, itemCheck, itemDefaultButton );
- // Read the entry rather than use itemValue in case setItem didn't change the value, e.g. if immutable
- itemCheck->setChecked( m_kcmSettings.readEntry( itemKey, false ) );
-}
-
-// Add week day names to a combo
-void KCMLocale::initWeekDayCombo( KComboBox *dayCombo )
-{
- dayCombo->clear();
- int daysInWeek = m_kcmLocale->calendar()->daysInWeek( QDate::currentDate() );
- for ( int i = 1; i <= daysInWeek; ++i )
- {
- dayCombo->insertItem( i - 1, m_kcmLocale->calendar()->weekDayName( i ), QVariant( i ) );
- }
-}
-
-// Add standard separator symbols to a combo
-void KCMLocale::initSeparatorCombo( KComboBox *seperatorCombo )
-{
- seperatorCombo->clear();
- seperatorCombo->addItem( ki18nc( "No separator symbol" , "None" ).toString( m_kcmLocale ), QString() );
- seperatorCombo->addItem( QString(','), QString(',') );
- seperatorCombo->addItem( QString('.'), QString('.') );
- seperatorCombo->addItem( ki18nc( "Space separator symbol", "Single Space" ).toString( m_kcmLocale ), QString(' ') );
-}
-
-// Generic utility to set up a DigitSet combo, used for numbers, dates
-void KCMLocale::initDigitSetCombo( KComboBox *digitSetCombo )
-{
- digitSetCombo->clear();
- QList digitSets = m_kcmLocale->allDigitSetsList();
- foreach ( const KLocale::DigitSet &digitSet, digitSets )
- {
- digitSetCombo->addItem( m_kcmLocale->digitSetToName( digitSet, true ), QVariant( digitSet ) );
- }
-}
-
-void KCMLocale::insertDigitGroupingItem( KComboBox *digitGroupingCombo,
- KSharedConfigPtr groupingConfig, KConfigGroup *groupingSettings,
- const QString &digitGroupingKey, const QString &digitGroupingFormat)
-{
- groupingSettings->writeEntry( digitGroupingKey, digitGroupingFormat );
- KLocale *customLocale = new KLocale( QLatin1String("kcmlocale"), groupingConfig );
- if ( digitGroupingKey == "DigitGroupFormat" ) {
- digitGroupingCombo->addItem( customLocale->formatNumber( 123456789.12 ), digitGroupingFormat );
- } else {
- Q_ASSERT(false);
- }
- groupingConfig->markAsClean();
- delete customLocale;
-}
-
-// Generic utility to set up a Digit Grouping combo, used for numbers
-void KCMLocale::initDigitGroupingCombo( KComboBox *digitGroupingCombo, const QString &digitGroupingKey)
-{
- digitGroupingCombo->clear();
- KSharedConfigPtr groupingConfig = KSharedConfig::openConfig( "kcmlocale-grouping", KConfig::SimpleConfig );
- KConfigGroup groupingSettings = KConfigGroup( groupingConfig, "Locale" );
- copySettings( &m_kcmSettings, &groupingSettings );
- insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "3" );
- insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "3;2" );
- insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "4" );
- insertDigitGroupingItem( digitGroupingCombo, groupingConfig, &groupingSettings, digitGroupingKey, "-1" );
-}
-
-void KCMLocale::initTabs()
-{
- m_ui->m_tabWidgetSettings->setTabText( 0, ki18n( "Country" ).toString( m_kcmLocale ) );
- m_ui->m_tabWidgetSettings->setTabText( 1, ki18n( "Languages" ).toString( m_kcmLocale ) );
- m_ui->m_tabWidgetSettings->setTabText( 2, ki18n( "Numbers" ).toString( m_kcmLocale ) );
- m_ui->m_tabWidgetSettings->setTabText( 3, ki18n( "Calendar" ).toString( m_kcmLocale ) );
- m_ui->m_tabWidgetSettings->setTabText( 4, ki18n( "Date && Time" ).toString( m_kcmLocale ) );
- m_ui->m_tabWidgetSettings->setTabText( 5, ki18n( "Other" ).toString( m_kcmLocale ) );
-}
-
-void KCMLocale::initSample()
-{
- m_ui->m_labelNumbersSample->setText( ki18n( "Numbers:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This is how positive numbers will be displayed.").toString( m_kcmLocale );
- m_ui->m_textNumbersPositiveSample->setToolTip( helpText );
- m_ui->m_textNumbersPositiveSample->setWhatsThis( helpText );
- helpText = ki18n( "This is how negative numbers will be displayed.").toString( m_kcmLocale );
- m_ui->m_textNumbersNegativeSample->setToolTip( helpText );
- m_ui->m_textNumbersNegativeSample->setWhatsThis( helpText );
-
- m_ui->m_labelDateSample->setText( ki18n( "Date:" ).toString( m_kcmLocale ) );
- helpText = ki18n( "This is how long dates will be displayed.").toString( m_kcmLocale );
- m_ui->m_textDateSample->setToolTip( helpText );
- m_ui->m_textDateSample->setWhatsThis( helpText );
-
- m_ui->m_labelShortDateSample->setText( ki18n( "Short date:" ).toString( m_kcmLocale ) );
- helpText = ki18n( "This is how short dates will be displayed.").toString( m_kcmLocale );
- m_ui->m_textShortDateSample->setToolTip( helpText );
- m_ui->m_textShortDateSample->setWhatsThis( helpText );
-
- m_ui->m_labelTimeSample->setText( ki18n( "Time:" ).toString( m_kcmLocale ) );
- helpText = ki18n( "This is how time will be displayed.").toString( m_kcmLocale );
- m_ui->m_textTimeSample->setToolTip( helpText );
- m_ui->m_textTimeSample->setWhatsThis( helpText );
-
- QTimer *timer = new QTimer( this );
- timer->setObjectName( QLatin1String( "clock_timer" ) );
- connect( timer, SIGNAL( timeout() ), this, SLOT( updateSample() ) );
- timer->start( 1000 );
-}
-
-void KCMLocale::updateSample()
-{
- m_ui->m_textNumbersPositiveSample->setText( m_kcmLocale->formatNumber( 123456789.12 ) );
- m_ui->m_textNumbersNegativeSample->setText( m_kcmLocale->formatNumber( -123456789.12 ) );
-
- KDateTime dateTime = KDateTime::currentLocalDateTime();
- m_ui->m_textDateSample->setText( m_kcmLocale->formatDate( dateTime.date(), KLocale::LongDate ) );
- m_ui->m_textShortDateSample->setText( m_kcmLocale->formatDate( dateTime.date(), KLocale::ShortDate ) );
- m_ui->m_textTimeSample->setText( m_kcmLocale->formatTime( dateTime.time(), true ) );
-}
-
-void KCMLocale::initCountry()
-{
- m_ui->m_comboCountry->blockSignals( true );
-
- m_ui->m_labelCountry->setText( ki18n( "Country:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This is the country where you live. The KDE Workspace will use "
- "the settings for this country or region.
" ).toString( m_kcmLocale );
- m_ui->m_comboCountry->setToolTip( helpText );
- m_ui->m_comboCountry->setWhatsThis( helpText );
-
- m_ui->m_comboCountry->clear();
-
- QStringList countryCodes = m_kcmLocale->allCountriesList();
- countryCodes.removeDuplicates();
- QMap countryNames;
-
- foreach ( const QString &countryCode, countryCodes ) {
- countryNames.insert( m_kcmLocale->countryCodeToName( countryCode ), countryCode );
- }
-
- QString systemCountryName = m_kcmLocale->countryCodeToName( m_systemCountry );
- QString systemCountry = ki18nc( "%1 is the system country name", "System Country (%1)" ).subs( systemCountryName ).toString( m_kcmLocale );
- m_ui->m_comboCountry->addItem( systemCountry , QString() );
-
- QString defaultLocale = ki18n( "No Country (Default Settings)" ).toString( m_kcmLocale );
- m_ui->m_comboCountry->addItem( defaultLocale , "C" );
-
- QMapIterator it( countryNames );
- while ( it.hasNext() ) {
- it.next();
- KIcon flag( KStandardDirs::locate( "locale", QString::fromLatin1( "l10n/%1/flag.png" ).arg( it.value() ) ) );
- m_ui->m_comboCountry->addItem( flag, it.key(), it.value() );
- }
-
- setCountry( m_kcmSettings.readEntry( "Country", QString() ) );
-
- m_ui->m_comboCountry->blockSignals( false );
-}
-
-void KCMLocale::defaultCountry()
-{
- setCountry( m_defaultSettings.readEntry( "Country", QString() ) );
-}
-
-void KCMLocale::changedCountryIndex( int index )
-{
- m_ui->m_comboCountry->blockSignals( true );
- setCountry( m_ui->m_comboCountry->itemData( index ).toString() );
- initCountrySettings( m_kcmSettings.readEntry( "Country", QString() ) );
- mergeSettings();
- m_ui->m_comboCountry->blockSignals( false );
- initSettingsWidgets();
-}
-
-void KCMLocale::setCountry( const QString &newValue )
-{
- setComboItem( "Country", newValue,
- m_ui->m_comboCountry, m_ui->m_buttonDefaultCountry );
-}
-
-void KCMLocale::initTranslations()
-{
- m_ui->m_selectTranslations->blockSignals( true );
-
- m_ui->m_selectTranslations->setAvailableLabel( ki18n( "Available Languages:" ).toString( m_kcmLocale ) );
- QString availableHelp = ki18n( "This is the list of installed KDE Workspace language "
- "translations not currently being used. To use a language "
- "translation move it to the 'Preferred Languages' list in "
- "the order of preference. If no suitable languages are "
- "listed, then you may need to install more language packages "
- "using your usual installation method.
" ).toString( m_kcmLocale );
- m_ui->m_selectTranslations->availableListWidget()->setToolTip( availableHelp );
- m_ui->m_selectTranslations->availableListWidget()->setWhatsThis( availableHelp );
-
- m_ui->m_selectTranslations->setSelectedLabel( ki18n( "Preferred Languages:" ).toString( m_kcmLocale ) );
- QString selectedHelp = ki18n( "This is the list of installed KDE Workspace language "
- "translations currently being used, listed in order of "
- "preference. If a translation is not available for the "
- "first language in the list, the next language will be used. "
- "If no other translations are available then US English will "
- "be used.
").toString( m_kcmLocale );
- m_ui->m_selectTranslations->selectedListWidget()->setToolTip( selectedHelp );
- m_ui->m_selectTranslations->selectedListWidget()->setWhatsThis( selectedHelp );
-
- // Clear the selector before reloading
- m_ui->m_selectTranslations->availableListWidget()->clear();
- m_ui->m_selectTranslations->selectedListWidget()->clear();
-
- // Load each user selected language into the selected list
- foreach ( const QString &languageCode, m_kcmTranslations ) {
- QListWidgetItem *listItem = new QListWidgetItem( m_ui->m_selectTranslations->selectedListWidget() );
- listItem->setText( m_kcmLocale->languageCodeToName( languageCode ) );
- listItem->setData( Qt::UserRole, languageCode );
- }
-
- // Load all the available languages the user hasn't selected into the available list
- foreach ( const QString &languageCode, m_installedTranslations ) {
- if ( !m_kcmTranslations.contains( languageCode ) ) {
- QListWidgetItem *listItem = new QListWidgetItem( m_ui->m_selectTranslations->availableListWidget() );
- listItem->setText( m_kcmLocale->languageCodeToName( languageCode ) );
- listItem->setData( Qt::UserRole, languageCode );
- }
- }
- m_ui->m_selectTranslations->availableListWidget()->sortItems();
-
- // Default to selecting the first Selected language,
- // otherwise the first Available language,
- // otherwise no languages so disable all buttons
- if ( m_ui->m_selectTranslations->selectedListWidget()->count() > 0 ) {
- m_ui->m_selectTranslations->selectedListWidget()->setCurrentRow( 0 );
- } else if ( m_ui->m_selectTranslations->availableListWidget()->count() > 0 ) {
- m_ui->m_selectTranslations->availableListWidget()->setCurrentRow( 0 );
- }
-
- enableItemWidgets( "Language",
- &m_userSettings, &m_kcmSettings, &m_defaultSettings,
- m_ui->m_selectTranslations, m_ui->m_buttonDefaultTranslations );
-
- m_ui->m_selectTranslations->blockSignals( false );
-}
-
-void KCMLocale::defaultTranslations()
-{
- setTranslations( m_defaultSettings.readEntry( "Language", QString() ) );
-}
-
-void KCMLocale::changedTranslationsAvailable( QListWidgetItem *item )
-{
- Q_UNUSED( item );
- m_ui->m_selectTranslations->availableListWidget()->sortItems();
- int row = m_ui->m_selectTranslations->availableListWidget()->currentRow();
- changedTranslations();
- m_ui->m_selectTranslations->availableListWidget()->setCurrentRow( row );
-}
-
-void KCMLocale::changedTranslationsSelected( QListWidgetItem *item )
-{
- Q_UNUSED( item );
- int row = m_ui->m_selectTranslations->selectedListWidget()->currentRow();
- changedTranslations();
- m_ui->m_selectTranslations->selectedListWidget()->setCurrentRow( row );
-}
-
-void KCMLocale::changedTranslations()
-{
- // Read the list of all Selected translations from the selector widget
- QStringList selectedTranslations;
- for ( int i = 0; i < m_ui->m_selectTranslations->selectedListWidget()->count(); ++i ) {
- selectedTranslations.append( m_ui->m_selectTranslations->selectedListWidget()->item( i )->data( Qt::UserRole ).toString() );
- }
-
- setTranslations( selectedTranslations.join( ":" ) );
-}
-
-void KCMLocale::setTranslations( const QString &newValue )
-{
- setItem( "Language", newValue, m_ui->m_selectTranslations, m_ui->m_buttonDefaultTranslations );
-
- // Create the kcm translations list
- m_kcmTranslations.clear();
- m_kcmTranslations = m_kcmSettings.readEntry( "Language", QString() ).split( ':', QString::SkipEmptyParts );
- m_kcmLocale->setLanguage( m_kcmTranslations );
-
- // Do merge again as may be localized settings that need to be reloaded
- mergeSettings();
-
- initAllWidgets();
-}
-
-void KCMLocale::initNumericDigitGrouping()
-{
- m_ui->m_comboNumericDigitGrouping->blockSignals( true );
-
- m_ui->m_labelNumericDigitGrouping->setText( ki18n( "Digit grouping:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the digit grouping used to display "
- "numbers.
" ).toString( m_kcmLocale );
- m_ui->m_comboNumericDigitGrouping->setToolTip( helpText );
- m_ui->m_comboNumericDigitGrouping->setWhatsThis( helpText );
-
- initDigitGroupingCombo( m_ui->m_comboNumericDigitGrouping, "DigitGroupFormat" );
-
- setNumericDigitGrouping( m_kcmSettings.readEntry( "DigitGroupFormat", "3" ) );
-
- m_ui->m_comboNumericDigitGrouping->blockSignals( false );
-
- updateSample();
-}
-
-void KCMLocale::defaultNumericDigitGrouping()
-{
- setNumericDigitGrouping( m_defaultSettings.readEntry( "DigitGroupFormat", "3" ) );
-}
-
-void KCMLocale::changedNumericDigitGroupingIndex( int index )
-{
- setNumericDigitGrouping( m_ui->m_comboNumericDigitGrouping->itemData( index ).toString() );
-}
-
-void KCMLocale::setNumericDigitGrouping( const QString &newValue )
-{
- setComboItem( "DigitGroupFormat", newValue,
- m_ui->m_comboNumericDigitGrouping, m_ui->m_buttonDefaultNumericDigitGrouping );
-
- // No api to set, so need to force reload the locale
- m_kcmConfig->markAsClean();
- m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
-
- updateSample();
-}
-
-void KCMLocale::initNumericThousandsSeparator()
-{
- m_ui->m_comboThousandsSeparator->blockSignals( true );
-
- m_ui->m_labelThousandsSeparator->setText( ki18n( "Group separator:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the digit group separator used to display "
- "numbers.
" ).toString( m_kcmLocale );
- m_ui->m_comboThousandsSeparator->setToolTip( helpText );
- m_ui->m_comboThousandsSeparator->setWhatsThis( helpText );
-
- initSeparatorCombo( m_ui->m_comboThousandsSeparator );
-
- setNumericThousandsSeparator( m_kcmSettings.readEntry( "ThousandsSeparator", QString() )
- .remove( QString::fromLatin1("$0") ) );
-
- m_ui->m_comboThousandsSeparator->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericThousandsSeparator()
-{
- setNumericThousandsSeparator( m_defaultSettings.readEntry( "ThousandsSeparator", QString() )
- .remove( QString::fromLatin1("$0") ) );
-}
-
-// Change in response to user input, doesn't set edit text as causes cursor to EOL
-void KCMLocale::changedNumericThousandsSeparator( const QString &newValue )
-{
- QString useValue = newValue;
- int item = m_ui->m_comboThousandsSeparator->findText( newValue );
- if ( item >= 0 ) {
- useValue = m_ui->m_comboThousandsSeparator->itemData( item ).toString();
- m_ui->m_comboThousandsSeparator->setEditText( useValue );
- }
- if ( useValue == QString(' ') ) {
- useValue = "$0 $0";
- }
- setItem( "ThousandsSeparator", useValue,
- m_ui->m_comboThousandsSeparator, m_ui->m_buttonDefaultThousandsSeparator );
- m_kcmLocale->setThousandsSeparator( m_kcmSettings.readEntry( "ThousandsSeparator", QString() )
- .remove( QString::fromLatin1("$0") ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-// Change programatically, does set edit text so user can see it
-void KCMLocale::setNumericThousandsSeparator( const QString &newValue )
-{
- changedNumericThousandsSeparator( newValue );
- m_ui->m_comboThousandsSeparator->setEditText( m_kcmSettings.readEntry( "ThousandsSeparator", QString() )
- .remove( QString::fromLatin1("$0") ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-void KCMLocale::initNumericDecimalSymbol()
-{
- m_ui->m_comboDecimalSymbol->blockSignals( true );
-
- m_ui->m_labelDecimalSymbol->setText( ki18n( "Decimal separator:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the decimal separator used to display "
- "numbers (i.e. a dot or a comma in most countries).
" ).toString( m_kcmLocale );
- m_ui->m_comboDecimalSymbol->setToolTip( helpText );
- m_ui->m_comboDecimalSymbol->setWhatsThis( helpText );
-
- initSeparatorCombo( m_ui->m_comboDecimalSymbol );
-
- setNumericDecimalSymbol( m_kcmSettings.readEntry( "DecimalSymbol", QString() ) );
-
- m_ui->m_comboDecimalSymbol->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericDecimalSymbol()
-{
- setNumericDecimalSymbol( m_defaultSettings.readEntry( "DecimalSymbol", QString() ) );
-}
-
-// Change in response to user input, doesn't set edit text as causes cursor to EOL
-void KCMLocale::changedNumericDecimalSymbol( const QString &newValue )
-{
- QString useValue = newValue;
- int item = m_ui->m_comboDecimalSymbol->findText( newValue );
- if ( item >= 0 ) {
- useValue = m_ui->m_comboDecimalSymbol->itemData( item ).toString();
- }
- setItem( "DecimalSymbol", useValue,
- m_ui->m_comboDecimalSymbol, m_ui->m_buttonDefaultDecimalSymbol );
- m_kcmLocale->setDecimalSymbol( m_kcmSettings.readEntry( "DecimalSymbol", QString() ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-// Change programatically, does set edit text so user can see it
-void KCMLocale::setNumericDecimalSymbol( const QString &newValue )
-{
- setEditComboItem( "DecimalSymbol", newValue,
- m_ui->m_comboDecimalSymbol, m_ui->m_buttonDefaultDecimalSymbol );
- m_kcmLocale->setDecimalSymbol( m_kcmSettings.readEntry( "DecimalSymbol", QString() ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-void KCMLocale::initNumericDecimalPlaces()
-{
- m_ui->m_intDecimalPlaces->blockSignals( true );
-
- m_ui->m_labelDecimalPlaces->setText( ki18n( "Decimal places:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can set the number of decimal places displayed for "
- "numeric values, i.e. the number of digits after the "
- "decimal separator.
" ).toString( m_kcmLocale );
- m_ui->m_intDecimalPlaces->setToolTip( helpText );
- m_ui->m_intDecimalPlaces->setWhatsThis( helpText );
-
- setNumericDecimalPlaces( m_kcmSettings.readEntry( "DecimalPlaces", 0 ) );
-
- m_ui->m_intDecimalPlaces->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericDecimalPlaces()
-{
- setNumericDecimalPlaces( m_defaultSettings.readEntry( "DecimalPlaces", 0 ) );
-}
-
-void KCMLocale::changedNumericDecimalPlaces( int newValue )
-{
- setNumericDecimalPlaces( newValue );
-}
-
-void KCMLocale::setNumericDecimalPlaces( int newValue )
-{
- setIntItem( "DecimalPlaces", newValue,
- m_ui->m_intDecimalPlaces, m_ui->m_buttonDefaultDecimalPlaces );
- m_kcmLocale->setDecimalPlaces( m_kcmSettings.readEntry( "DecimalPlaces", 0 ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-void KCMLocale::initNumericPositiveSign()
-{
- m_ui->m_comboPositiveSign->blockSignals( true );
-
- m_ui->m_labelPositiveFormat->setText( ki18n( "Positive sign:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can specify text used to prefix positive numbers. "
- "Most locales leave this blank.
" ).toString( m_kcmLocale );
- m_ui->m_comboPositiveSign->setToolTip( helpText );
- m_ui->m_comboPositiveSign->setWhatsThis( helpText );
-
- m_ui->m_comboPositiveSign->clear();
- m_ui->m_comboPositiveSign->addItem( ki18nc( "No positive symbol", "None" ).toString( m_kcmLocale ), QString() );
- m_ui->m_comboPositiveSign->addItem( QString('+'), QString('+') );
-
- setNumericPositiveSign( m_kcmSettings.readEntry( "PositiveSign", QString() ) );
-
- m_ui->m_comboPositiveSign->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericPositiveSign()
-{
- setNumericPositiveSign( m_defaultSettings.readEntry( "PositiveSign", QString() ) );
-}
-
-// Change in response to user input, doesn't set edit text as causes cursor to EOL
-void KCMLocale::changedNumericPositiveSign( const QString &newValue )
-{
- QString useValue = newValue;
- int item = m_ui->m_comboPositiveSign->findText( newValue );
- if ( item >= 0 ) {
- useValue = m_ui->m_comboPositiveSign->itemData( item ).toString();
- }
- setItem( "PositiveSign", useValue,
- m_ui->m_comboPositiveSign, m_ui->m_buttonDefaultPositiveSign );
- m_kcmLocale->setPositiveSign( m_kcmSettings.readEntry( "PositiveSign", QString() ) );
-
- // Update the format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-// Change programatically, does set edit text so user can see it
-void KCMLocale::setNumericPositiveSign( const QString &newValue )
-{
- setEditComboItem( "PositiveSign", newValue,
- m_ui->m_comboPositiveSign, m_ui->m_buttonDefaultPositiveSign );
- m_kcmLocale->setPositiveSign( m_kcmSettings.readEntry( "PositiveSign", QString() ) );
-
- // Update the format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-void KCMLocale::initNumericNegativeSign()
-{
- m_ui->m_comboNegativeSign->blockSignals( true );
-
- m_ui->m_labelNegativeFormat->setText( ki18n( "Negative sign:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can specify text used to prefix negative numbers. "
- "This should not be empty, so you can distinguish positive and "
- "negative numbers. It is normally set to minus (-).
" ).toString( m_kcmLocale );
- m_ui->m_comboNegativeSign->setToolTip( helpText );
- m_ui->m_comboNegativeSign->setWhatsThis( helpText );
-
- m_ui->m_comboNegativeSign->clear();
- m_ui->m_comboNegativeSign->addItem( ki18nc("No negative symbol", "None" ).toString( m_kcmLocale ), QString() );
- m_ui->m_comboNegativeSign->addItem( QString('-'), QString('-') );
-
- setNumericNegativeSign( m_kcmSettings.readEntry( "NegativeSign", QString() ) );
-
- m_ui->m_comboNegativeSign->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericNegativeSign()
-{
- setNumericNegativeSign( m_defaultSettings.readEntry( "NegativeSign", QString() ) );
-}
-
-// Change in response to user input, doesn't set edit text as causes cursor to EOL
-void KCMLocale::changedNumericNegativeSign( const QString &newValue )
-{
- QString useValue = newValue;
- int item = m_ui->m_comboNegativeSign->findText( newValue );
- if ( item >= 0 ) {
- useValue = m_ui->m_comboNegativeSign->itemData( item ).toString();
- }
- setItem( "NegativeSign", useValue,
- m_ui->m_comboNegativeSign, m_ui->m_buttonDefaultNegativeSign );
- m_kcmLocale->setNegativeSign( m_kcmSettings.readEntry( "NegativeSign", QString() ) );
-}
-
-// Change programatically, does set edit text so user can see it
-void KCMLocale::setNumericNegativeSign( const QString &newValue )
-{
- setEditComboItem( "NegativeSign", newValue,
- m_ui->m_comboNegativeSign, m_ui->m_buttonDefaultNegativeSign );
- m_kcmLocale->setNegativeSign( m_kcmSettings.readEntry( "NegativeSign", QString() ) );
-}
-
-void KCMLocale::initNumericDigitSet()
-{
- m_ui->m_comboDigitSet->blockSignals( true );
-
- m_ui->m_labelDigitSet->setText( ki18n( "Digit set:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the set of digits used to display numbers. "
- "If digits other than Arabic are selected, they will appear only if "
- "used in the language of the application or the piece of text where "
- "the number is shown.
" ).toString( m_kcmLocale );
- m_ui->m_comboDigitSet->setToolTip( helpText );
- m_ui->m_comboDigitSet->setWhatsThis( helpText );
-
- initDigitSetCombo( m_ui->m_comboDigitSet );
-
- setNumericDigitSet( m_kcmSettings.readEntry( "DigitSet", 0 ) );
-
- m_ui->m_comboDigitSet->blockSignals( false );
-}
-
-void KCMLocale::defaultNumericDigitSet()
-{
- setNumericDigitSet( m_defaultSettings.readEntry( "DigitSet", 0 ) );
-}
-
-void KCMLocale::changedNumericDigitSetIndex( int index )
-{
- setNumericDigitSet( m_ui->m_comboDigitSet->itemData( index ).toInt() );
-}
-
-void KCMLocale::setNumericDigitSet( int newValue )
-{
- setComboItem( "DigitSet", newValue,
- m_ui->m_comboDigitSet, m_ui->m_buttonDefaultDigitSet );
- m_kcmLocale->setDigitSet( (KLocale::DigitSet) m_kcmSettings.readEntry( "DigitSet", 0 ) );
-
- // Update the numeric format samples to relect new setting
- initNumericDigitGrouping();
-}
-
-void KCMLocale::initCalendarSystem()
-{
- m_ui->m_comboCalendarSystem->blockSignals( true );
-
- m_ui->m_labelCalendarSystem->setText( ki18n( "Calendar system:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can set the Calendar System to use to display dates.
" ).toString( m_kcmLocale );
- m_ui->m_comboCalendarSystem->setToolTip( helpText );
- m_ui->m_comboCalendarSystem->setWhatsThis( helpText );
-
- m_ui->m_comboCalendarSystem->clear();
-
- QList calendarSystems = KCalendarSystem::calendarSystemsList();
-
- foreach ( const KLocale::CalendarSystem &calendarType, calendarSystems ) {
- m_ui->m_comboCalendarSystem->addItem( KCalendarSystem::calendarLabel(calendarType , m_kcmLocale ),
- QVariant( calendarType ) );
- }
-
- setCalendarSystem( m_kcmSettings.readEntry( "CalendarSystem", QString() ) );
-
- m_ui->m_comboCalendarSystem->blockSignals( false );
-}
-
-void KCMLocale::defaultCalendarSystem()
-{
- setCalendarSystem( m_defaultSettings.readEntry( "CalendarSystem", QString() ) );
-}
-
-void KCMLocale::changedCalendarSystemIndex( int index )
-{
- setCalendarSystem( m_ui->m_comboCalendarSystem->itemData( index ).toString() );
-}
-
-void KCMLocale::setCalendarSystem( const QString &newValue )
-{
- setComboItem( "CalendarSystem", newValue,
- m_ui->m_comboCalendarSystem, m_ui->m_buttonDefaultCalendarSystem );
-
- // Load the correct settings group for the new calendar
- initCalendarSettings();
- mergeCalendarSettings();
-
- // If item was changed, i.e. not immutable, then update locale
- m_kcmLocale->setCalendar( m_kcmSettings.readEntry( "CalendarSystem", QString() ) );
-
- // Update the Calendar dependent widgets with the new Calendar System details
- initUseCommonEra();
- initShortYearWindow();
- initWeekNumberSystem();
- initWeekStartDay();
- updateSample();
-}
-
-void KCMLocale::initUseCommonEra()
-{
- m_ui->m_checkCalendarGregorianUseCommonEra->blockSignals( true );
-
- m_ui->m_checkCalendarGregorianUseCommonEra->setText( ki18n( "Use Common Era" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This option determines if the Common Era (CE/BCE) should be used "
- "instead of the Christian Era (AD/BC).
" ).toString( m_kcmLocale );
- m_ui->m_checkCalendarGregorianUseCommonEra->setToolTip( helpText );
- m_ui->m_checkCalendarGregorianUseCommonEra->setWhatsThis( helpText );
-
- QString calendarType = m_kcmSettings.readEntry( "CalendarSystem", QString() );
- if ( calendarType == "gregorian" || calendarType == "gregorian-proleptic" ) {
- setUseCommonEra( m_kcmCalendarSettings.readEntry( "UseCommonEra", false ) );
- } else {
- setUseCommonEra( false );
- m_ui->m_checkCalendarGregorianUseCommonEra->setEnabled( false );
- m_ui->m_buttonDefaultCalendarGregorianUseCommonEra->setEnabled( false );
- }
-
- m_ui->m_checkCalendarGregorianUseCommonEra->blockSignals( false );
-}
-
-void KCMLocale::defaultUseCommonEra()
-{
- setUseCommonEra( m_defaultCalendarSettings.readEntry( "UseCommonEra", false ) );
-}
-
-void KCMLocale::changedUseCommonEra( bool newValue )
-{
- setUseCommonEra( newValue );
-}
-
-void KCMLocale::setUseCommonEra( bool newValue )
-{
- setCalendarItem( "UseCommonEra", newValue,
- m_ui->m_checkCalendarGregorianUseCommonEra, m_ui->m_buttonDefaultCalendarGregorianUseCommonEra );
- m_ui->m_checkCalendarGregorianUseCommonEra->setChecked( m_kcmCalendarSettings.readEntry( "UseCommonEra", false ) );
-
- // No api to set, so need to force reload the locale
- m_kcmConfig->markAsClean();
- m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
- m_kcmLocale->setCalendar( m_kcmSettings.readEntry( "CalendarSystem", QString() ) );
-}
-
-void KCMLocale::initShortYearWindow()
-{
- m_ui->m_intShortYearWindowStartYear->blockSignals( true );
-
- m_ui->m_labelShortYearWindow->setText( ki18n( "Short year window:" ).toString( m_kcmLocale ) );
- m_ui->m_labelShortYearWindowTo->setText( ki18nc( "label between two year inputs, i.e. 1930 to 2029", "to" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This option determines what year range a two digit date is "
- "interpreted as, for example with a range of 1950 to 2049 the "
- "value 10 is interpreted as 2010. This range is only applied when "
- "reading the Short Year (YY) date format.
" ).toString( m_kcmLocale );
- m_ui->m_intShortYearWindowStartYear->setToolTip( helpText );
- m_ui->m_intShortYearWindowStartYear->setWhatsThis( helpText );
- m_ui->m_spinShortYearWindowEndYear->setToolTip( helpText );
- m_ui->m_spinShortYearWindowEndYear->setWhatsThis( helpText );
-
- setShortYearWindow( m_kcmCalendarSettings.readEntry( "ShortYearWindowStartYear", 0 ) );
-
- m_ui->m_intShortYearWindowStartYear->blockSignals( false );
-}
-
-void KCMLocale::defaultShortYearWindow()
-{
- setShortYearWindow( m_defaultCalendarSettings.readEntry( "ShortYearWindowStartYear", 0 ) );
-}
-
-void KCMLocale::changedShortYearWindow( int newValue )
-{
- setShortYearWindow( newValue );
-}
-
-void KCMLocale::setShortYearWindow( int newValue )
-{
- setCalendarItem( "ShortYearWindowStartYear", newValue,
- m_ui->m_intShortYearWindowStartYear, m_ui->m_buttonDefaultShortYearWindow );
- int startYear = m_kcmCalendarSettings.readEntry( "ShortYearWindowStartYear", 0 );
- m_ui->m_intShortYearWindowStartYear->setValue( startYear );
- m_ui->m_spinShortYearWindowEndYear->setValue( startYear + 99 );
-
- // No api to set, so need to force reload the locale and calendar
- m_kcmConfig->markAsClean();
- m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
- m_kcmLocale->setCalendar( m_kcmSettings.readEntry( "CalendarSystem", QString() ) );
-}
-
-void KCMLocale::initWeekNumberSystem()
-{
- m_ui->m_comboWeekNumberSystem->blockSignals( true );
-
- m_ui->m_labelWeekNumberSystem->setText( ki18n( "Week number system:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This option determines how the Week Number will be calculated. "
- "There are four options available:
"
- ""
- "- ISO Week Use the ISO standard Week Number. This will always "
- "use Monday as the first day of the ISO week. This is the most commonly "
- "used system.
"
- "- Full First Week The first week of the year starts on the "
- "first occurrence of the First day of the week, and lasts for "
- "seven days. Any days before Week 1 are considered part of the last "
- "week of the previous year. This system is most commonly used in the "
- "USA.
"
- "- Partial First Week The first week starts on the first day "
- "of the year. The second week of the year starts on the first "
- "occurrence of the First day of the week, and lasts for "
- "seven days. The first week may not contain seven days.
"
- "- Simple Week The first week starts on the first day of the "
- "year and lasts seven days, with all new weeks starting on the same "
- "weekday as the first day of the year.
"
- "
"
- ).toString( m_kcmLocale );
- m_ui->m_comboWeekNumberSystem->setToolTip( helpText );
- m_ui->m_comboWeekNumberSystem->setWhatsThis( helpText );
-
- m_ui->m_comboWeekNumberSystem->clear();
- m_ui->m_comboWeekNumberSystem->addItem( ki18n( "ISO Week" ).toString( m_kcmLocale ),
- QVariant( KLocale::IsoWeekNumber ) );
- m_ui->m_comboWeekNumberSystem->addItem( ki18n( "Full First Week" ).toString( m_kcmLocale ),
- QVariant( KLocale::FirstFullWeek ) );
- m_ui->m_comboWeekNumberSystem->addItem( ki18n( "Partial First Week" ).toString( m_kcmLocale ),
- QVariant( KLocale::FirstPartialWeek ) );
- m_ui->m_comboWeekNumberSystem->addItem( ki18n( "Simple Week" ).toString( m_kcmLocale ),
- QVariant( KLocale::SimpleWeek ) );
-
- setWeekNumberSystem( (KLocale::WeekNumberSystem) m_kcmSettings.readEntry( "WeekNumberSystem", 0 ) );
-
- m_ui->m_comboWeekNumberSystem->blockSignals( false );
-}
-
-void KCMLocale::defaultWeekNumberSystem()
-{
- setWeekNumberSystem( m_defaultSettings.readEntry( "WeekNumberSystem", 0 ) );
-}
-
-void KCMLocale::changedWeekNumberSystemIndex( int index )
-{
- setWeekNumberSystem( m_ui->m_comboWeekNumberSystem->itemData( index ).toInt() );
-}
-
-void KCMLocale::setWeekNumberSystem( int newValue )
-{
- setComboItem( "WeekNumberSystem", newValue,
- m_ui->m_comboWeekNumberSystem, m_ui->m_buttonDefaultWeekNumberSystem );
- m_kcmLocale->setWeekNumberSystem( (KLocale::WeekNumberSystem) m_kcmSettings.readEntry( "WeekNumberSystem", 0 ) );
-}
-
-void KCMLocale::initWeekStartDay()
-{
- m_ui->m_comboWeekStartDay->blockSignals( true );
-
- m_ui->m_labelWeekStartDay->setText( ki18n( "First day of week:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This option determines which day will be considered as the first "
- "one of the week. This value may affect the Week Number System.
"
- ).toString( m_kcmLocale );
- m_ui->m_comboWeekStartDay->setToolTip( helpText );
- m_ui->m_comboWeekStartDay->setWhatsThis( helpText );
-
- initWeekDayCombo( m_ui->m_comboWeekStartDay );
-
- setWeekStartDay( m_kcmSettings.readEntry( "WeekStartDay", 0 ) );
-
- m_ui->m_comboWeekStartDay->blockSignals( false );
-}
-
-void KCMLocale::defaultWeekStartDay()
-{
- setWeekStartDay( m_defaultSettings.readEntry( "WeekStartDay", 0 ) );
-}
-
-void KCMLocale::changedWeekStartDayIndex( int index )
-{
- setWeekStartDay( m_ui->m_comboWeekStartDay->itemData( index ).toInt() );
-}
-
-void KCMLocale::setWeekStartDay( int newValue )
-{
- setComboItem( "WeekStartDay", newValue,
- m_ui->m_comboWeekStartDay, m_ui->m_buttonDefaultWeekStartDay );
- m_kcmLocale->setWeekStartDay( m_kcmSettings.readEntry( "WeekStartDay", 0 ) );
-}
-
-void KCMLocale::initTimeFormat()
-{
- m_ui->m_comboTimeFormat->blockSignals( true );
-
- m_ui->m_labelTimeFormat->setText( ki18n( "Time format:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "The text in this textbox will be used to format time strings. "
- "The sequences below will be replaced:
"
- ""
- "HH | "
- "The hour as a decimal number using a 24-hour clock (00-23). |
"
- "hH | "
- "The hour (24-hour clock) as a decimal number (0-23). |
"
- "PH | "
- "The hour as a decimal number using a 12-hour clock (01-12). |
"
- "pH | "
- "The hour (12-hour clock) as a decimal number (1-12). |
"
- "MM | "
- "The minutes as a decimal number (00-59). |
"
- "SS | "
- "The seconds as a decimal number (00-59). |
"
- "AMPM | "
- "Either 'AM' or 'PM' according to the given time value. "
- "Noon is treated as 'PM' and midnight as 'AM'. |
"
- "
" ).toString( m_kcmLocale );
- m_ui->m_comboTimeFormat->setToolTip( helpText );
- m_ui->m_comboTimeFormat->setWhatsThis( helpText );
-
- m_timeFormatMap.clear();
- m_timeFormatMap.insert( QString( 'H' ), ki18n( "HH" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'k' ), ki18n( "hH" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'I' ), ki18n( "PH" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'l' ), ki18n( "pH" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'M' ), ki18nc( "Minute", "MM" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'S' ), ki18n( "SS" ).toString( m_kcmLocale ) );
- m_timeFormatMap.insert( QString( 'p' ), ki18n( "AMPM" ).toString( m_kcmLocale ) );
-
- QStringList formatList;
- QString cValue = m_cSettings.readEntry( "TimeFormat", QString() );
- formatList.append( posixToUserTime( m_kcmSettings.readEntry( "TimeFormat", cValue ) ) );
- formatList.append( posixToUserTime( m_defaultSettings.readEntry( "TimeFormat", cValue ) ) );
- formatList.append( posixToUserTime( m_countrySettings.readEntry( "TimeFormat", cValue ) ) );
- formatList.append( posixToUserTime( cValue ) );
- // TODO convert these to POSIX and US format!
- QString formats =ki18nc( "some reasonable time formats for the language",
- "HH:MM:SS\n"
- "pH:MM:SS AMPM").toString( m_kcmLocale );
- formatList.append( formats.split( QString::fromLatin1("\n") ) );
- formatList.removeDuplicates();
- m_ui->m_comboTimeFormat->clear();
- m_ui->m_comboTimeFormat->addItems( formatList );
-
- setTimeFormat( m_kcmSettings.readEntry( "TimeFormat", QString() ) );
-
- m_ui->m_comboTimeFormat->blockSignals( false );
-}
-
-void KCMLocale::defaultTimeFormat()
-{
- setTimeFormat( m_defaultSettings.readEntry( "TimeFormat", QString() ) );
-}
-
-void KCMLocale::changedTimeFormat( const QString &newValue )
-{
- setItem( "TimeFormat", userToPosixTime( newValue ),
- m_ui->m_comboTimeFormat, m_ui->m_buttonDefaultTimeFormat );
- m_kcmLocale->setTimeFormat( m_kcmSettings.readEntry( "TimeFormat", QString() ) );
- updateSample();
-}
-
-void KCMLocale::setTimeFormat( const QString &newValue )
-{
- setItem( "TimeFormat", newValue,
- m_ui->m_comboTimeFormat, m_ui->m_buttonDefaultTimeFormat );
- QString value = m_kcmSettings.readEntry( "TimeFormat", QString() );
- m_ui->m_comboTimeFormat->setEditText( posixToUserTime( value ) );
- m_kcmLocale->setTimeFormat( value );
- updateSample();
-}
-
-QString KCMLocale::dayPeriodText( const QString &dayPeriod )
-{
- // If you get here with an empty dayPeriod, this is not the cause, merely a symptom of the
- // real bug. You need to find out why it is empty otherwise time parse/format will break.
- Q_ASSERT( !dayPeriod.isEmpty() );
- return dayPeriod.isEmpty() ? QString() : dayPeriod.split( QChar::fromLatin1(',') ).at( 2 );
-}
-
-QString KCMLocale::amPeriod( const QString &longName, const QString &shortName, const QString &narrowName )
-{
- QStringList dayPeriod;
- dayPeriod.append( QString::fromLatin1("am") );
- dayPeriod.append( longName );
- dayPeriod.append( shortName );
- dayPeriod.append( narrowName );
- dayPeriod.append( QTime( 0, 0, 0 ).toString( QString::fromLatin1("HH:mm:ss.zzz") ) );
- dayPeriod.append( QTime( 11, 59, 59, 999 ).toString( QString::fromLatin1("HH:mm:ss.zzz") ) );
- dayPeriod.append( QChar::fromLatin1('0') );
- dayPeriod.append( QString::fromLatin1("12") );
- return dayPeriod.join( QChar::fromLatin1(',') );
-}
-
-QString KCMLocale::pmPeriod( const QString &longName, const QString &shortName, const QString &narrowName )
-{
- QStringList dayPeriod;
- dayPeriod.append( QString::fromLatin1("pm") );
- dayPeriod.append( longName );
- dayPeriod.append( shortName );
- dayPeriod.append( narrowName );
- dayPeriod.append( QTime( 12, 0, 0 ).toString( QString::fromLatin1("HH:mm:ss.zzz") ) );
- dayPeriod.append( QTime( 23, 59, 59, 999 ).toString( QString::fromLatin1("HH:mm:ss.zzz") ) );
- dayPeriod.append( QChar::fromLatin1('0') );
- dayPeriod.append( QString::fromLatin1("12") );
- return dayPeriod.join( QChar::fromLatin1(',') );
-}
-
-void KCMLocale::initAmPmSymbols()
-{
- m_ui->m_comboAmSymbol->blockSignals( true );
- m_ui->m_comboPmSymbol->blockSignals( true );
-
- m_ui->m_labelAmSymbol->setText( ki18n( "AM symbol:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can set the text to be displayed for AM.
" ).toString( m_kcmLocale );
- m_ui->m_comboAmSymbol->setToolTip( helpText );
- m_ui->m_comboAmSymbol->setWhatsThis( helpText );
-
- m_ui->m_labelPmSymbol->setText( ki18n( "PM symbol:" ).toString( m_kcmLocale ) );
- helpText = ki18n( "Here you can set the text to be displayed for PM.
" ).toString( m_kcmLocale );
- m_ui->m_comboPmSymbol->setToolTip( helpText );
- m_ui->m_comboPmSymbol->setWhatsThis( helpText );
-
- QStringList formatList;
- formatList.append( m_kcmLocale->dayPeriodText( QTime( 0, 0, 0 ) ) );
- formatList.append( m_defaultLocale->dayPeriodText( QTime( 0, 0, 0 ) ) );
- formatList.removeDuplicates();
- m_ui->m_comboAmSymbol->clear();
- m_ui->m_comboAmSymbol->addItems( formatList );
-
- formatList.clear();
- formatList.append( m_kcmLocale->dayPeriodText( QTime( 12, 0, 0 ) ) );
- formatList.append( m_defaultLocale->dayPeriodText( QTime( 12, 0, 0 ) ) );
- formatList.removeDuplicates();
- m_ui->m_comboPmSymbol->clear();
- m_ui->m_comboPmSymbol->addItems( formatList );
-
- setAmPmPeriods( m_kcmSettings.readEntry( "DayPeriod1", QString() ),
- m_kcmSettings.readEntry( "DayPeriod2", QString() ) );
-
- m_ui->m_comboAmSymbol->setEditText( dayPeriodText( m_kcmSettings.readEntry( "DayPeriod1", QString() ) ) );
- m_ui->m_comboPmSymbol->setEditText( dayPeriodText( m_kcmSettings.readEntry( "DayPeriod2", QString() ) ) );
-
- m_ui->m_comboAmSymbol->blockSignals( false );
- m_ui->m_comboPmSymbol->blockSignals( false );
-}
-
-void KCMLocale::setAmPmPeriods( const QString &amPeriod, const QString &pmPeriod )
-{
- // If either setting is locked down by Kiosk, then don't let the user make any changes, and disable the widgets
- if ( m_userSettings.isEntryImmutable( "DayPeriod1" ) ||
- m_userSettings.isEntryImmutable( "DayPeriod2" ) ) {
- m_ui->m_comboAmSymbol->setEnabled( false );
- m_ui->m_buttonDefaultAmSymbol->setEnabled( false );
- m_ui->m_comboPmSymbol->setEnabled( false );
- m_ui->m_buttonDefaultPmSymbol->setEnabled( false );
- } else {
- m_ui->m_comboAmSymbol->setEnabled( true );
- m_ui->m_comboPmSymbol->setEnabled( true );
- m_ui->m_buttonDefaultAmSymbol->setEnabled( false );
- m_ui->m_buttonDefaultPmSymbol->setEnabled( false );
-
- m_kcmSettings.writeEntry( "DayPeriod1", amPeriod );
- m_kcmSettings.writeEntry( "DayPeriod2", pmPeriod );
-
- // If either value is not the default then both values must be set in the user settings
- if ( amPeriod != m_defaultSettings.readEntry( "DayPeriod1", QString() ) ||
- pmPeriod != m_defaultSettings.readEntry( "DayPeriod2", QString() ) ) {
- m_userSettings.writeEntry( "DayPeriod1", amPeriod, KConfig::Persistent | KConfig::Global );
- m_userSettings.writeEntry( "DayPeriod2", pmPeriod, KConfig::Persistent | KConfig::Global );
- } else { // Is the default so delete any user setting
- m_userSettings.deleteEntry( "DayPeriod1", KConfig::Persistent | KConfig::Global );
- m_userSettings.deleteEntry( "DayPeriod2", KConfig::Persistent | KConfig::Global );
- }
-
- if ( m_kcmSettings.readEntry( "DayPeriod1", QString() ) !=
- m_defaultSettings.readEntry( "DayPeriod1", QString() ) ) {
- m_ui->m_buttonDefaultAmSymbol->setEnabled( true );
- }
- if ( m_kcmSettings.readEntry( "DayPeriod2", QString() ) !=
- m_defaultSettings.readEntry( "DayPeriod2", QString() ) ) {
- m_ui->m_buttonDefaultPmSymbol->setEnabled( true );
- }
-
- checkIfChanged();
-
- // No api to set, so need to force reload the locale
- m_kcmConfig->markAsClean();
- m_kcmLocale->setCountry( m_kcmSettings.readEntry( "Country", QString() ), m_kcmConfig.data() );
- m_kcmLocale->setCalendar( m_kcmSettings.readEntry( "CalendarSystem", QString() ) );
- }
-
- updateSample();
-}
-
-void KCMLocale::defaultAmSymbol()
-{
- setAmPmPeriods( m_defaultSettings.readEntry( "DayPeriod1", QString() ),
- m_kcmSettings.readEntry( "DayPeriod2", QString() ) );
- m_ui->m_comboAmSymbol->setEditText( dayPeriodText( m_kcmSettings.readEntry( "DayPeriod1", QString() ) ) );
-}
-
-void KCMLocale::changedAmSymbol( const QString &newValue )
-{
- QStringList dayPeriod = m_defaultSettings.readEntry( "DayPeriod1", QString() ).split(',');
- dayPeriod[2] = newValue;
- setAmPmPeriods( dayPeriod.join( QChar::fromLatin1(',') ), m_kcmSettings.readEntry( "DayPeriod2", QString() ) );
-}
-
-void KCMLocale::defaultPmSymbol()
-{
- setAmPmPeriods( m_kcmSettings.readEntry( "DayPeriod1", QString() ),
- m_defaultSettings.readEntry( "DayPeriod2", QString() ) );
- m_ui->m_comboPmSymbol->setEditText( dayPeriodText( m_kcmSettings.readEntry( "DayPeriod2", QString() ) ) );
-}
-
-void KCMLocale::changedPmSymbol( const QString &newValue )
-{
- QStringList dayPeriod = m_defaultSettings.readEntry( "DayPeriod2", QString() ).split(',');
- dayPeriod[2] = newValue;
- setAmPmPeriods( m_kcmSettings.readEntry( "DayPeriod1", QString() ), dayPeriod.join( QChar::fromLatin1(',') ) );
-}
-
-void KCMLocale::initDateFormat()
-{
- m_ui->m_comboDateFormat->blockSignals( true );
-
- m_ui->m_labelDateFormat->setText( ki18n( "Long date format:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "The text in this textbox will be used to format long dates. "
- "The sequences below will be replaced:
"
- ""
- ""
- "YYYY | "
- "The year with century as a decimal number. | "
- "
"
- ""
- "YY | "
- "The year without century as a decimal number (00-99). | "
- "
"
- ""
- "MM | "
- "The month as a decimal number (01-12). | "
- "
"
- ""
- "mM | "
- "The month as a decimal number (1-12). | "
- "
"
- ""
- "SHORTMONTH | "
- "The first three characters of the month name. | "
- "
"
- ""
- "MONTH | "
- "The full month name. | "
- "
"
- ""
- "DD | "
- "The day of month as a decimal number (01-31). | "
- "
"
- ""
- "dD | "
- "The day of month as a decimal number (1-31). | "
- "
"
- ""
- "SHORTWEEKDAY | "
- "The first three characters of the weekday name. | "
- "
"
- ""
- "WEEKDAY | "
- "The full weekday name. | "
- "
"
- ""
- "ERAYEAR | "
- "The Era Year in local format (e.g. 2000 AD). | "
- "
"
- ""
- "SHORTERANAME | "
- "The short Era Name. | "
- "
"
- ""
- "YEARINERA | "
- "The Year in Era as a decimal number. | "
- "
"
- ""
- "DAYOFYEAR | "
- "The Day of Year as a decimal number. | "
- "
"
- ""
- "ISOWEEK | "
- "The ISO Week as a decimal number. | "
- "
"
- ""
- "DAYOFISOWEEK | "
- "The Day of the ISO Week as a decimal number. | "
- "
"
- "
" ).toString( m_kcmLocale );
- m_ui->m_comboDateFormat->setToolTip( helpText );
- m_ui->m_comboDateFormat->setWhatsThis( helpText );
-
- m_dateFormatMap.clear();
- m_dateFormatMap.insert( QString( 'Y' ), ki18n("YYYY").toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'y' ), ki18n( "YY" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'n' ), ki18n( "mM" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'm' ), ki18nc( "Month", "MM" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'b' ), ki18n( "SHORTMONTH" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'B' ), ki18n( "MONTH" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'e' ), ki18n( "dD" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'd' ), ki18n( "DD" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'a' ), ki18n( "SHORTWEEKDAY" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'A' ), ki18n( "WEEKDAY" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( "EY", ki18n( "ERAYEAR" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( "Ey", ki18n( "YEARINERA" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( "EC", ki18n( "SHORTERANAME" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'j' ), ki18n( "DAYOFYEAR" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'V' ), ki18n( "ISOWEEK" ).toString( m_kcmLocale ) );
- m_dateFormatMap.insert( QString( 'u' ), ki18n( "DAYOFISOWEEK" ).toString( m_kcmLocale ) );
-
- QStringList formatList;
- QString cValue = m_cSettings.readEntry( "DateFormat", QString() );
- formatList.append( posixToUserDate( m_kcmSettings.readEntry( "DateFormat", cValue ) ) );
- formatList.append( posixToUserDate( m_defaultSettings.readEntry( "DateFormat", cValue ) ) );
- formatList.append( posixToUserDate( m_countrySettings.readEntry( "DateFormat", cValue ) ) );
- formatList.append( posixToUserDate( cValue ) );
- // TODO convert these to POSIX and US format!
- QString formats = ki18nc("some reasonable date formats for the language",
- "WEEKDAY MONTH dD YYYY\n"
- "SHORTWEEKDAY MONTH dD YYYY").toString( m_kcmLocale );
- formatList.append( formats.split( QString::fromLatin1("\n") ) );
- formatList.removeDuplicates();
- m_ui->m_comboDateFormat->clear();
- m_ui->m_comboDateFormat->addItems( formatList );
-
- setDateFormat( m_kcmSettings.readEntry( "DateFormat", QString() ) );
-
- m_ui->m_comboDateFormat->blockSignals( false );
-}
-
-void KCMLocale::defaultDateFormat()
-{
- setDateFormat( m_defaultSettings.readEntry( "DateFormat", QString() ) );
-}
-
-void KCMLocale::changedDateFormat( const QString &newValue )
-{
- setItem( "DateFormat", userToPosixDate( newValue ),
- m_ui->m_comboDateFormat, m_ui->m_buttonDefaultDateFormat );
- m_kcmLocale->setDateFormat( m_kcmSettings.readEntry( "DateFormat", QString() ) );
- updateSample();
-}
-
-void KCMLocale::setDateFormat( const QString &newValue )
-{
- setItem( "DateFormat", newValue,
- m_ui->m_comboDateFormat, m_ui->m_buttonDefaultDateFormat );
- QString value = m_kcmSettings.readEntry( "DateFormat", QString() );
- m_ui->m_comboDateFormat->setEditText( posixToUserDate( value ) );
- m_kcmLocale->setDateFormat( value );
- updateSample();
-}
-
-void KCMLocale::initShortDateFormat()
-{
- m_ui->m_comboShortDateFormat->blockSignals( true );
-
- m_ui->m_labelShortDateFormat->setText( ki18n( "Short date format:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "The text in this textbox will be used to format short dates. "
- "For instance, this is used when listing files. The sequences below "
- "will be replaced:
"
- ""
- ""
- "YYYY | "
- "The year with century as a decimal number. | "
- "
"
- ""
- "YY | "
- "The year without century as a decimal number (00-99). | "
- "
"
- ""
- "MM | "
- "The month as a decimal number (01-12). | "
- "
"
- ""
- "mM | "
- "The month as a decimal number (1-12). | "
- "
"
- ""
- "SHORTMONTH | "
- "The first three characters of the month name. | "
- "
"
- ""
- "MONTH | "
- "The full month name. | "
- "
"
- ""
- "DD | "
- "The day of month as a decimal number (01-31). | "
- "
"
- ""
- "dD | "
- "The day of month as a decimal number (1-31). | "
- "
"
- ""
- "SHORTWEEKDAY | "
- "The first three characters of the weekday name. | "
- "
"
- ""
- "WEEKDAY | "
- "The full weekday name. | "
- "
"
- ""
- "ERAYEAR | "
- "The Era Year in local format (e.g. 2000 AD). | "
- "
"
- ""
- "SHORTERANAME | "
- "The short Era Name. | "
- "
"
- ""
- "YEARINERA | "
- "The Year in Era as a decimal number. | "
- "
"
- ""
- "DAYOFYEAR | "
- "The Day of Year as a decimal number. | "
- "
"
- ""
- "ISOWEEK | "
- "The ISO Week as a decimal number. | "
- "
"
- ""
- "DAYOFISOWEEK | "
- "The Day of the ISO Week as a decimal number. | "
- "
"
- "
" ).toString( m_kcmLocale );
- m_ui->m_comboShortDateFormat->setToolTip( helpText );
- m_ui->m_comboShortDateFormat->setWhatsThis( helpText );
-
- QStringList formatList;
- QString cValue = m_cSettings.readEntry( "DateFormatShort", QString() );
- formatList.append( posixToUserDate( m_kcmSettings.readEntry( "DateFormatShort", cValue ) ) );
- formatList.append( posixToUserDate( m_defaultSettings.readEntry( "DateFormatShort", cValue ) ) );
- formatList.append( posixToUserDate( m_countrySettings.readEntry( "DateFormatShort", cValue ) ) );
- formatList.append( posixToUserDate( cValue ) );
- formatList.append( "YYYY-MM-DD" );
- // TODO convert these to POSIX and US format!
- QString formats = ki18nc("some reasonable short date formats for the language",
- "YYYY-MM-DD\n"
- "dD.mM.YYYY\n"
- "DD.MM.YYYY").toString( m_kcmLocale );
- formatList.append( formats.split( QString::fromLatin1("\n") ) );
- formatList.removeDuplicates();
- m_ui->m_comboShortDateFormat->clear();
- m_ui->m_comboShortDateFormat->addItems( formatList );
-
- setShortDateFormat( m_kcmSettings.readEntry( "DateFormatShort", QString() ) );
-
- m_ui->m_comboShortDateFormat->blockSignals( false );
-}
-
-void KCMLocale::defaultShortDateFormat()
-{
- setShortDateFormat( m_defaultSettings.readEntry( "DateFormatShort", QString() ) );
-}
-
-void KCMLocale::changedShortDateFormat( const QString &newValue )
-{
- setItem( "DateFormatShort", userToPosixDate( newValue ),
- m_ui->m_comboShortDateFormat, m_ui->m_buttonDefaultShortDateFormat );
- m_kcmLocale->setDateFormatShort( m_kcmSettings.readEntry( "DateFormatShort", QString() ) );
- updateSample();
-}
-
-void KCMLocale::setShortDateFormat( const QString &newValue )
-{
- setItem( "DateFormatShort", newValue,
- m_ui->m_comboShortDateFormat, m_ui->m_buttonDefaultShortDateFormat );
- QString value = m_kcmSettings.readEntry( "DateFormatShort", QString() );
- m_ui->m_comboShortDateFormat->setEditText( posixToUserDate( value ) );
- m_kcmLocale->setDateFormatShort( value );
- updateSample();
-}
-
-void KCMLocale::initMonthNamePossessive()
-{
- m_ui->m_checkMonthNamePossessive->blockSignals( true );
-
- m_ui->m_labelMonthNamePossessive->setText( ki18n( "Possessive month names:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This option determines whether possessive form of month names "
- "should be used in dates.
" ).toString( m_kcmLocale );
- m_ui->m_checkMonthNamePossessive->setToolTip( helpText );
- m_ui->m_checkMonthNamePossessive->setWhatsThis( helpText );
-
- m_ui->m_checkMonthNamePossessive->setChecked( m_kcmLocale->dateMonthNamePossessive() );
- setCheckItem( "DateMonthNamePossessive", m_kcmSettings.readEntry( "DateMonthNamePossessive", false ),
- m_ui->m_checkMonthNamePossessive, m_ui->m_buttonDefaultMonthNamePossessive );
-
- setMonthNamePossessive( m_kcmSettings.readEntry( "DateMonthNamePossessive", false ) );
-
- // Hide the option as it's not usable without ordinal day numbers
- m_ui->m_labelMonthNamePossessive->setHidden( true );
- m_ui->m_checkMonthNamePossessive->setHidden( true );
- m_ui->m_buttonDefaultMonthNamePossessive->setHidden( true );
-
- m_ui->m_checkMonthNamePossessive->blockSignals( false );
-}
-
-void KCMLocale::defaultMonthNamePossessive()
-{
- setMonthNamePossessive( m_defaultSettings.readEntry( "DateMonthNamePossessive", false ) );
-}
-
-void KCMLocale::changedMonthNamePossessive( bool newValue )
-{
- setMonthNamePossessive( newValue );
-}
-
-void KCMLocale::setMonthNamePossessive( bool newValue )
-{
- setCheckItem( "DateMonthNamePossessive", newValue,
- m_ui->m_checkMonthNamePossessive, m_ui->m_buttonDefaultMonthNamePossessive );
- m_kcmLocale->setDateMonthNamePossessive( m_kcmSettings.readEntry( "DateMonthNamePossessive", 0 ) );
- updateSample();
-}
-
-void KCMLocale::initDateTimeDigitSet()
-{
- m_ui->m_comboDateTimeDigitSet->blockSignals( true );
-
- m_ui->m_labelDateTimeDigitSet->setText( ki18n( "Digit set:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the set of digits used to display dates and "
- "times. If digits other than Arabic are selected, they will appear "
- "only if used in the language of the application or the piece of "
- "text where the date or time is shown.
Note that the set of "
- "digits used to display numeric values have to be set "
- "separately (see the 'Numbers' tab).
" ).toString( m_kcmLocale );
- m_ui->m_comboDateTimeDigitSet->setToolTip( helpText );
- m_ui->m_comboDateTimeDigitSet->setWhatsThis( helpText );
-
- initDigitSetCombo( m_ui->m_comboDateTimeDigitSet );
-
- setDateTimeDigitSet( m_kcmSettings.readEntry( "DateTimeDigitSet", 0 ) );
-
- m_ui->m_comboDateTimeDigitSet->blockSignals( false );
-}
-
-void KCMLocale::defaultDateTimeDigitSet()
-{
- setDateTimeDigitSet( m_defaultSettings.readEntry( "DateTimeDigitSet", 0 ) );
-}
-
-void KCMLocale::changedDateTimeDigitSetIndex( int index )
-{
- setDateTimeDigitSet( m_ui->m_comboDateTimeDigitSet->itemData( index ).toInt() );
-}
-
-void KCMLocale::setDateTimeDigitSet( int newValue )
-{
- setComboItem( "DateTimeDigitSet", newValue,
- m_ui->m_comboDateTimeDigitSet, m_ui->m_buttonDefaultDateTimeDigitSet );
- m_kcmLocale->setDateTimeDigitSet( (KLocale::DigitSet) m_kcmSettings.readEntry( "DateTimeDigitSet", 0 ) );
+ const QString localelanguage = m_languagebox->itemData(m_languagebox->currentIndex()).toString();
+ const QLocale locale(localelanguage);
+ m_dateshortedit->setText(locale.dateFormat(QLocale::ShortFormat));
+ m_datelongedit->setText(locale.dateFormat(QLocale::LongFormat));
+ m_datenarrowedit->setText(locale.dateFormat(QLocale::NarrowFormat));
}
-void KCMLocale::initPageSize()
+void KCMLocale::slotLanguageChanged(const int index)
{
- m_ui->m_comboPageSize->blockSignals( true );
-
- m_ui->m_labelPageSize->setText( ki18n( "Page size:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the default page size to be used in new "
- "documents.
Note that this setting has no effect on printer "
- "paper size.
" ).toString( m_kcmLocale );
- m_ui->m_comboPageSize->setToolTip( helpText );
- m_ui->m_comboPageSize->setWhatsThis( helpText );
-
- m_ui->m_comboPageSize->clear();
-
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A4").toString( m_kcmLocale ),
- QVariant( QPrinter::A4 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "US Letter").toString( m_kcmLocale ),
- QVariant( QPrinter::Letter ) );
- m_ui->m_comboPageSize->insertSeparator( m_ui->m_comboPageSize->count() );
-
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A0").toString( m_kcmLocale ),
- QVariant( QPrinter::A0 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A1").toString( m_kcmLocale ),
- QVariant( QPrinter::A1 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A2").toString( m_kcmLocale ),
- QVariant( QPrinter::A2 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A3").toString( m_kcmLocale ),
- QVariant( QPrinter::A3 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A4").toString( m_kcmLocale ),
- QVariant( QPrinter::A4 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A5").toString( m_kcmLocale ),
- QVariant( QPrinter::A5 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A6").toString( m_kcmLocale ),
- QVariant( QPrinter::A6 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A7").toString( m_kcmLocale ),
- QVariant( QPrinter::A7 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A8").toString( m_kcmLocale ),
- QVariant( QPrinter::A8 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "A9").toString( m_kcmLocale ),
- QVariant( QPrinter::A9 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B0").toString( m_kcmLocale ),
- QVariant( QPrinter::B0 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B1").toString( m_kcmLocale ),
- QVariant( QPrinter::B1 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B2").toString( m_kcmLocale ),
- QVariant( QPrinter::B2 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B3").toString( m_kcmLocale ),
- QVariant( QPrinter::B3 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B4").toString( m_kcmLocale ),
- QVariant( QPrinter::B4 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B5").toString( m_kcmLocale ),
- QVariant( QPrinter::B5 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B6").toString( m_kcmLocale ),
- QVariant( QPrinter::B6 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B7").toString( m_kcmLocale ),
- QVariant( QPrinter::B7 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B8").toString( m_kcmLocale ),
- QVariant( QPrinter::B8 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B9").toString( m_kcmLocale ),
- QVariant( QPrinter::B9 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "B10").toString( m_kcmLocale ),
- QVariant( QPrinter::B10 ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "C5 Envelope").toString( m_kcmLocale ),
- QVariant( QPrinter::C5E ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "US Common 10 Envelope").toString( m_kcmLocale ),
- QVariant( QPrinter::Comm10E ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "DLE Envelope").toString( m_kcmLocale ),
- QVariant( QPrinter::DLE ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "Executive").toString( m_kcmLocale ),
- QVariant( QPrinter::Executive ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "Folio").toString( m_kcmLocale ),
- QVariant( QPrinter::Folio ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "Ledger").toString( m_kcmLocale ),
- QVariant( QPrinter::Ledger ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "US Legal").toString( m_kcmLocale ),
- QVariant( QPrinter::Legal ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "US Letter").toString( m_kcmLocale ),
- QVariant( QPrinter::Letter ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "Tabloid").toString( m_kcmLocale ),
- QVariant( QPrinter::Tabloid ) );
- m_ui->m_comboPageSize->addItem( ki18nc("Page size", "Custom").toString( m_kcmLocale ),
- QVariant( QPrinter::Custom ) );
-
- setPageSize( m_kcmSettings.readEntry( "PageSize", 0 ) );
-
- m_ui->m_comboPageSize->blockSignals( false );
-}
-
-void KCMLocale::defaultPageSize()
-{
- setPageSize( m_defaultSettings.readEntry( "PageSize", 0 ) );
-}
-
-void KCMLocale::changedPageSizeIndex( int index )
-{
- setPageSize( m_ui->m_comboPageSize->itemData( index ).toInt() );
-}
-
-void KCMLocale::setPageSize( int newValue )
-{
- setComboItem( "PageSize", newValue,
- m_ui->m_comboPageSize, m_ui->m_buttonDefaultPageSize );
- m_kcmLocale->setPageSize( m_kcmSettings.readEntry( "PageSize", 0 ) );
-}
-
-void KCMLocale::initMeasureSystem()
-{
- m_ui->m_comboMeasureSystem->blockSignals( true );
-
- m_ui->m_labelMeasureSystem->setText( ki18n( "Measurement system:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "Here you can define the measurement system to use.
" ).toString( m_kcmLocale );
- m_ui->m_comboMeasureSystem->setToolTip( helpText );
- m_ui->m_comboMeasureSystem->setWhatsThis( helpText );
-
- m_ui->m_comboMeasureSystem->clear();
-
- m_ui->m_comboMeasureSystem->addItem( ki18n("Metric System").toString( m_kcmLocale ), (int) KLocale::Metric );
- m_ui->m_comboMeasureSystem->addItem( ki18n("Imperial System").toString( m_kcmLocale ), (int) KLocale::Imperial );
-
- setMeasureSystem( m_kcmSettings.readEntry( "MeasureSystem", 0 ) );
-
- m_ui->m_comboMeasureSystem->blockSignals( false );
-}
-
-void KCMLocale::defaultMeasureSystem()
-{
- setMeasureSystem( m_defaultSettings.readEntry( "MeasureSystem", 0 ) );
-}
-
-void KCMLocale::changedMeasureSystemIndex( int index )
-{
- setMeasureSystem( m_ui->m_comboMeasureSystem->itemData( index ).toInt() );
-}
-
-void KCMLocale::setMeasureSystem( int newValue )
-{
- setComboItem( "MeasureSystem", newValue,
- m_ui->m_comboMeasureSystem, m_ui->m_buttonDefaultMeasureSystem );
- m_kcmLocale->setMeasureSystem( (KLocale::MeasureSystem) m_kcmSettings.readEntry( "MeasureSystem", 0 ) );
+ Q_UNUSED(index);
+ loadLocaleSettings();
+ emit changed(true);
}
-void KCMLocale::initBinaryUnitDialect()
+void KCMLocale::slotBinaryChanged(const int index)
{
- m_ui->m_comboBinaryUnitDialect->blockSignals( true );
-
- m_ui->m_labelBinaryUnitDialect->setText( ki18n( "Byte size units:" ).toString( m_kcmLocale ) );
- QString helpText = ki18n( "This changes the units used by most KDE programs to display "
- "numbers counted in bytes. Traditionally \"kilobytes\" meant units "
- "of 1024, instead of the metric 1000, for most (but not all) byte "
- "sizes."
- "
"
- "- To reduce confusion you can use the recently standardized IEC "
- "units which are always in multiples of 1024.
"
- "- You can also select metric, which is always in units of 1000.
"
- "- Selecting JEDEC restores the older-style units used in KDE 3.5 "
- "and some other operating systems.
"
- "
"
- "" ).toString( m_kcmLocale );
- m_ui->m_comboBinaryUnitDialect->setToolTip( helpText );
- m_ui->m_comboBinaryUnitDialect->setWhatsThis( helpText );
-
- m_ui->m_comboBinaryUnitDialect->clear(),
- m_ui->m_comboBinaryUnitDialect->addItem( ki18nc("Unit of binary measurement", "IEC Units (KiB, MiB, etc)").toString( m_kcmLocale ),
- QVariant( KLocale::IECBinaryDialect ) );
- m_ui->m_comboBinaryUnitDialect->addItem( ki18nc("Unit of binary measurement", "JEDEC Units (KB, MB, etc)").toString( m_kcmLocale ),
- QVariant( KLocale::JEDECBinaryDialect ) );
- m_ui->m_comboBinaryUnitDialect->addItem( ki18nc("Unit of binary measurement", "Metric Units (kB, MB, etc)").toString( m_kcmLocale ),
- QVariant( KLocale::MetricBinaryDialect ) );
-
- setBinaryUnitDialect( m_kcmSettings.readEntry( "BinaryUnitDialect", 0 ) );
-
- m_ui->m_comboBinaryUnitDialect->blockSignals( false );
-}
-
-void KCMLocale::defaultBinaryUnitDialect()
-{
- setBinaryUnitDialect( m_defaultSettings.readEntry( "BinaryUnitDialect", 0 ) );
-}
-
-void KCMLocale::changedBinaryUnitDialectIndex( int index )
-{
- setBinaryUnitDialect( m_ui->m_comboBinaryUnitDialect->itemData( index ).toInt() );
-}
-
-void KCMLocale::setBinaryUnitDialect( int newValue )
-{
- setComboItem( "BinaryUnitDialect", newValue,
- m_ui->m_comboBinaryUnitDialect, m_ui->m_buttonDefaultBinaryUnitDialect );
- m_kcmLocale->setBinaryUnitDialect( (KLocale::BinaryUnitDialect)
- m_kcmSettings.readEntry( "BinaryUnitDialect", 0 ) );
- m_ui->m_labelBinaryUnitSample->setText( ki18nc("Example test for binary unit dialect",
- "Example: 2000 bytes equals %1")
- .subs( m_kcmLocale->formatByteSize( 2000, 2 ) )
- .toString( m_kcmLocale ) );
-}
-
-QString KCMLocale::posixToUserTime( const QString &posixFormat ) const
-{
- return posixToUser( posixFormat, m_timeFormatMap );
+ Q_UNUSED(index);
+ emit changed(true);
}
-QString KCMLocale::posixToUserDate( const QString &posixFormat ) const
+void KCMLocale::slotMeasureChanged(const int index)
{
- return posixToUser( posixFormat, m_dateFormatMap );
+ Q_UNUSED(index);
+ emit changed(true);
}
-QString KCMLocale::posixToUser( const QString &posixFormat, const QMap &map ) const
+void KCMLocale::slotDateOrTimeChanged(const QString &text)
{
- QString result;
-
- bool escaped = false;
- for ( int pos = 0; pos < posixFormat.length(); ++pos ) {
- QChar c = posixFormat.at( pos );
- if ( escaped ) {
- QString key = c;
- if ( c == 'E' ) {
- key += posixFormat.at( ++pos );
- }
- QString val = map.value( key, QString() );
- if ( !val.isEmpty() ) {
- result += val;
- } else {
- result += key;
- }
- escaped = false;
- } else if ( c == '%' ) {
- escaped = true;
- } else {
- result += c;
- }
- }
-
- return result;
-}
-
-QString KCMLocale::userToPosixTime( const QString &userFormat ) const
-{
- return userToPosix( userFormat, m_timeFormatMap );
-}
-
-QString KCMLocale::userToPosixDate( const QString &userFormat ) const
-{
- return userToPosix( userFormat, m_dateFormatMap );
-}
-
-QString KCMLocale::userToPosix( const QString &userFormat, const QMap &map ) const
-{
- QMultiMap sizeMap;
- QMap::const_iterator it = map.constBegin();
- while ( it != map.constEnd() ) {
- sizeMap.insert( it.value().length(), it.key() );
- ++it;
- }
-
- QString result;
-
- for ( int pos = 0; pos < userFormat.length(); ++pos ) {
- bool matchFound = false;
- QMapIterator it2(sizeMap);
- it2.toBack();
- while (!matchFound && it2.hasPrevious()) {
- it2.previous();
- QString s = map.value(it2.value());
-
- if ( userFormat.mid( pos, s.length() ) == s ) {
- result += '%';
- result += it2.value();
- pos += s.length() - 1;
- matchFound = true;
- }
- }
-
- if ( !matchFound ) {
- QChar c = userFormat.at( pos );
- if ( c == '%' ) {
- result += c;
- }
- result += c;
- }
- }
-
- return result;
+ Q_UNUSED(text);
+ emit changed(true);
}
#include "moc_kcmlocale.cpp"
diff --git a/kcontrol/locale/kcmlocale.h b/kcontrol/locale/kcmlocale.h
index a234fa2f..0369c94d 100644
--- a/kcontrol/locale/kcmlocale.h
+++ b/kcontrol/locale/kcmlocale.h
@@ -1,391 +1,69 @@
/* This file is part of the KDE libraries
- * Copyright 2010 John Layt
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
+ Copyright (C) 2023 Ivailo Monev
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License version 2, as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
#ifndef KCMLOCALE_H
#define KCMLOCALE_H
#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-class KPushButton;
-class KComboBox;
-class KIntNumInput;
-
-QT_BEGIN_NAMESPACE
-class Ui_KCMLocaleWidget;
-QT_END_NAMESPACE
+#include
+#include
+#include
+#include
+#include
/**
* @short A KCM to configure locale settings
- *
- * This module is for changing the User's Locale settings, which may override their Group and
- * Country defaults.
- *
- * The settings hierarchy is as follows:
- * - User settings from kdeglobals
- * - Group settings from $KDEDIRS
- * - Country settings from l10n
- * - C default settings from l10n
- *
- * The settings that apply to the User are a merger of all these.
- *
- * This may be restricted by Kiosk Group settings locking the user from updating some/all settings.
- *
- * The KCM starts by loading the fully merged settings including the User settings
- * In KCM terms, to Reload is to load the fully merged settings including the User settings
- * In KCM terms, to reset to Defaults is to remove the User settings only.
- * The user can also reset to Default each individual setting.
*/
-
class KCMLocale : public KCModule
{
Q_OBJECT
-
public:
- KCMLocale(QWidget *parent, const QVariantList &);
- virtual ~KCMLocale();
+ KCMLocale(QWidget *parent, const QVariantList &args);
+ ~KCMLocale();
- virtual void load();
- virtual void save();
- virtual void defaults();
- virtual QString quickHelp() const;
-
-private:
-
- //Common load/save utilities
-
- // Initialise the different settings groups
- void initSettings();
- void initCountrySettings( const QString &countryCode );
- void initCalendarSettings();
-
- // Merge the different settings groups into the effective settings
- void mergeSettings();
- void mergeCalendarSettings();
-
- // Copy the supported settings between settings groups
- void copySettings( KConfigGroup *fromGroup, KConfigGroup *toGroup,
- KConfig::WriteConfigFlags flags = KConfig::Normal );
- void copyCalendarSettings( KConfigGroup *fromGroup, KConfigGroup *toGroup,
- KConfig::WriteConfigFlags flags = KConfig::Normal );
- void copySetting( KConfigGroup *fromGroup, KConfigGroup *toGroup, const QString &key,
- KConfig::WriteConfigFlags flags = KConfig::Normal );
-
- // Enable / Disable an item in the gui
- void enableItemWidgets( const QString &itemKey, KConfigGroup *userSettings,
- KConfigGroup *kcmSettings, KConfigGroup *defaultSettings,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
-
- // Set the item value in the required settings groups
- void setItemValue( const QString &itemKey, const QString &itemValue,
- KConfigGroup *userSettings, KConfigGroup *kcmSettings, KConfigGroup *defaultSettings );
-
- // Set an item: set the item value, enable the widgets, set the changed flag, don't update the widget
- void setItem( const QString &itemKey, const QString &itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
- void setItem( const QString &itemKey, int itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
- void setItem( const QString &itemKey, bool itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
- void setCalendarItem( const QString &itemKey, const QString &itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
- void setCalendarItem( const QString &itemKey, int itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
- void setCalendarItem( const QString &itemKey, bool itemValue,
- QWidget *itemWidget, KPushButton *itemDefaultButton );
-
- // Set an item: set the item value, enable the widgets, set the changed flag, update the widget
- void setComboItem( const QString &itemKey, const QString &itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton );
- void setComboItem( const QString &itemKey, int itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton );
- void setEditComboItem( const QString &itemKey, const QString &itemValue,
- KComboBox *itemCombo, KPushButton *itemDefaultButton );
- void setIntItem( const QString &itemKey, int itemValue,
- KIntNumInput *itemInput, KPushButton *itemDefaultButton );
- void setCheckItem( const QString &itemKey, bool itemValue,
- QCheckBox *itemCheck, KPushButton *itemDefaultButton );
-
- // Check if the chaged flag needs to be set
- void checkIfChanged();
-
- //Common init utilities
- void initSeparatorCombo( KComboBox *separatorCombo );
- void initWeekDayCombo( KComboBox *dayCombo );
- void initDigitSetCombo( KComboBox *digitSetCombo );
- void initDigitGroupingCombo( KComboBox *digitGroupingCombo, const QString &digitGroupingKey);
- void insertDigitGroupingItem( KComboBox *digitGroupingCombo,
- KSharedConfigPtr groupingConfig, KConfigGroup *groupingSettings,
- const QString &digitGroupingKey, const QString &digitGroupingFormat);
-
- void initAllWidgets();
- void initSettingsWidgets();
- void initResetButtons();
- void initTabs();
- void initSample();
-
- //Country tab
-
- void initCountry();
- void setCountry( const QString &newValue );
-
- //Translations/Languages tab
-
- void initTranslations();
- void setTranslations( const QString &newValue );
-
- //Numeric tab
-
- void initNumericDigitGrouping();
- void setNumericDigitGrouping( const QString &newValue );
-
- void initNumericThousandsSeparator();
- void setNumericThousandsSeparator( const QString &newValue );
-
- void initNumericDecimalSymbol();
- void setNumericDecimalSymbol( const QString &newValue );
-
- void initNumericDecimalPlaces();
- void setNumericDecimalPlaces( int newValue );
-
- void initNumericPositiveSign();
- void setNumericPositiveSign( const QString &newValue );
-
- void initNumericNegativeSign();
- void setNumericNegativeSign( const QString &newValue );
-
- void initNumericDigitSet();
- void setNumericDigitSet( int newValue );
-
- //Calendar Tab
-
- void initCalendarSystem();
- void setCalendarSystem( const QString &newValue );
-
- void initUseCommonEra();
- void setUseCommonEra( bool newValue );
-
- void initShortYearWindow();
- void setShortYearWindow( int newValue );
-
- void initWeekNumberSystem();
- void setWeekNumberSystem( int newValue );
-
- void initWeekStartDay();
- void setWeekStartDay( int newValue );
-
- //Date/Time tab
-
- void initTimeFormat();
- void setTimeFormat( const QString &newValue );
-
- void initAmPmSymbols();
- void setAmPmPeriods( const QString &amValue, const QString &pmValue );
-
- void initDateFormat();
- void setDateFormat( const QString &newValue );
-
- void initShortDateFormat();
- void setShortDateFormat( const QString &newValue );
-
- void initMonthNamePossessive();
- void setMonthNamePossessive( bool newValue );
-
- void initDateTimeDigitSet();
- void setDateTimeDigitSet( int newValue );
-
- //Other Tab
-
- void initPageSize();
- void setPageSize( int newValue );
-
- void initMeasureSystem();
- void setMeasureSystem( int newValue );
-
- void initBinaryUnitDialect();
- void setBinaryUnitDialect( int newValue );
+ void load() final;
+ void save() final;
+ void defaults() final;
+ QString quickHelp() const final;
private Q_SLOTS:
-
- void updateSample();
-
- //Country tab
-
- void defaultCountry();
- void changedCountryIndex( int index );
-
- //Translations/Languages tab
-
- void defaultTranslations();
- void changedTranslations();
- void changedTranslationsAvailable( QListWidgetItem * item );
- void changedTranslationsSelected( QListWidgetItem * item );
-
- //Numeric tab
-
- void defaultNumericDigitGrouping();
- void changedNumericDigitGroupingIndex( int index );
-
- void defaultNumericThousandsSeparator();
- void changedNumericThousandsSeparator( const QString &newValue );
-
- void defaultNumericDecimalSymbol();
- void changedNumericDecimalSymbol( const QString &newValue );
-
- void defaultNumericDecimalPlaces();
- void changedNumericDecimalPlaces( int newValue );
-
- void defaultNumericPositiveSign();
- void changedNumericPositiveSign( const QString &newValue );
-
- void defaultNumericNegativeSign();
- void changedNumericNegativeSign( const QString &newValue );
-
- void defaultNumericDigitSet();
- void changedNumericDigitSetIndex( int index );
-
- //Calendar Tab
-
- void defaultCalendarSystem();
- void changedCalendarSystemIndex( int index );
-
- void defaultUseCommonEra();
- void changedUseCommonEra( bool newValue );
-
- void defaultShortYearWindow();
- void changedShortYearWindow( int newValue );
-
- void defaultWeekNumberSystem();
- void changedWeekNumberSystemIndex( int index );
-
- void defaultWeekStartDay();
- void changedWeekStartDayIndex( int index );
-
- //Date/Time tab
-
- void defaultTimeFormat();
- void changedTimeFormat( const QString &newValue );
-
- void defaultAmSymbol();
- void changedAmSymbol( const QString &newValue );
-
- void defaultPmSymbol();
- void changedPmSymbol( const QString &newValue );
-
- void defaultDateFormat();
- void changedDateFormat( const QString &newValue );
-
- void defaultShortDateFormat();
- void changedShortDateFormat( const QString &newValue );
-
- void defaultMonthNamePossessive();
- void changedMonthNamePossessive( bool newValue );
-
- void defaultDateTimeDigitSet();
- void changedDateTimeDigitSetIndex( int index );
-
- //Other Tab
-
- void defaultPageSize();
- void changedPageSizeIndex( int index );
-
- void defaultMeasureSystem();
- void changedMeasureSystemIndex( int index );
-
- void defaultBinaryUnitDialect();
- void changedBinaryUnitDialectIndex( int index );
+ void slotLanguageChanged(const int index);
+ void slotBinaryChanged(const int index);
+ void slotMeasureChanged(const int index);
+ void slotDateOrTimeChanged(const QString &text);
private:
- // Date/Time format map utilities
- QString posixToUserDate( const QString &posixFormat ) const;
- QString posixToUserTime( const QString &posixFormat ) const;
- QString posixToUser( const QString &posixFormat, const QMap &map ) const;
- QString userToPosixDate( const QString &userFormat ) const;
- QString userToPosixTime( const QString &userFormat ) const;
- QString userToPosix( const QString &userFormat, const QMap &map ) const;
+ void loadLocaleSettings();
- // Day Period utilities
- QString dayPeriodText( const QString &dayPeriod );
- QString amPeriod( const QString &longName, const QString &shortName, const QString &narrowName );
- QString pmPeriod( const QString &longName, const QString &shortName, const QString &narrowName );
-
- // The current User settings from .kde/share/config/kdeglobals
- // This gets updated with the users changes in the kcm and saved when requested
- KSharedConfigPtr m_userConfig;
- KConfigGroup m_userSettings;
- KConfigGroup m_userCalendarSettings;
- // The kcm config/settings, a merger of C, Country, Group and User settings
- // This is used to build the displayed settings and to initialise the sample locale, but never saved
- KSharedConfigPtr m_kcmConfig;
- KConfigGroup m_kcmSettings;
- KConfigGroup m_kcmCalendarSettings;
- // The currently saved user config/settings
- // This is used to check if anything has changed, but never saved
- KSharedConfigPtr m_currentConfig;
- KConfigGroup m_currentSettings;
- KConfigGroup m_currentCalendarSettings;
- // The KCM Default settings, a merger of C, Country, and Group, i.e. excluding User
- KSharedConfigPtr m_defaultConfig;
- KConfigGroup m_defaultSettings;
- KConfigGroup m_defaultCalendarSettings;
-
- // The current Group settings, i.e. does NOT include the User or Country settings
- KSharedConfigPtr m_groupConfig;
- KConfigGroup m_groupSettings;
- KConfigGroup m_groupCalendarSettings;
- // The Country Locale config from l10n//entry.desktop
- KSharedConfigPtr m_countryConfig;
- KConfigGroup m_countrySettings;
- KConfigGroup m_countryCalendarSettings;
- // The default C Locale config/settings from l10n/C/entry.desktop
- KSharedConfigPtr m_cConfig;
- KConfigGroup m_cSettings;
- KConfigGroup m_cCalendarSettings;
-
- QMap m_dateFormatMap;
- QMap m_timeFormatMap;
-
- // The system country, not the KDE one
- QString m_systemCountry;
-
- // NOTE: we need to mantain our own language list instead of using KLocale's
- // because KLocale does not add a language if there is no translation
- // for the current application so it would not be possible to set
- // a language which has no systemsettings/kcontrol module translation
- // The list of translations used in the kcm, is users list plus us_EN
- QStringList m_kcmTranslations;
- // The currently saved list of user translations, used to check if value changed
- QString m_currentTranslations;
- // The currently installed translations, used to check if users translations are valid
- QStringList m_installedTranslations;
-
- // The locale we use when displaying the sample output, not used for anything else
- KLocale *m_kcmLocale;
- // The locale for the current defaults, needed for am/pm as the defaults are hard coded in KLocale
- KLocale *m_defaultLocale;
-
- Ui_KCMLocaleWidget *m_ui;
+ QGridLayout* m_layout;
+ QLabel* m_languagelabel;
+ KComboBox* m_languagebox;
+ QLabel* m_binarylabel;
+ KComboBox* m_binarybox;
+ QLabel* m_measurelabel;
+ KComboBox* m_measurebox;
+ QLabel* m_dateshortlabel;
+ KLineEdit* m_dateshortedit;
+ QLabel* m_datelonglabel;
+ KLineEdit* m_datelongedit;
+ QLabel* m_datenarrowlabel;
+ KLineEdit* m_datenarrowedit;
+ QSpacerItem* m_spacer;
};
-#endif //KCMLOCALE_H
+#endif // KCMLOCALE_H
diff --git a/kcontrol/locale/kcmlocalewidget.ui b/kcontrol/locale/kcmlocalewidget.ui
deleted file mode 100644
index d123fbb0..00000000
--- a/kcontrol/locale/kcmlocalewidget.ui
+++ /dev/null
@@ -1,1155 +0,0 @@
-
-
- KCMLocaleWidget
-
-
-
- 0
- 0
- 702
- 439
-
-
-
-
- 0
- 0
-
-
-
- -
-
-
- 0
-
-
-
- Country
-
-
-
-
-
-
- Country:
-
-
- m_comboCountry
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Languages
-
-
- -
-
-
- Available Languages:
-
-
- Preferred Languages:
-
-
- KActionSelector::BelowCurrent
-
-
-
- -
-
-
-
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Numbers
-
-
-
- QFormLayout::ExpandingFieldsGrow
-
- -
-
-
- Digit grouping:
-
-
- m_comboNumericDigitGrouping
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Group separator:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- m_comboThousandsSeparator
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Decimal separator:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- m_comboDecimalSymbol
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Decimal places:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- 0
-
-
- 10
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Positive sign:
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Negative sign:
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Digit set:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- m_comboDigitSet
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Calendar
-
-
-
- QFormLayout::ExpandingFieldsGrow
-
- -
-
-
- Calendar system:
-
-
- m_comboCalendarSystem
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
- m_checkCalendarGregorianUseCommonEra
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- Use Common Era
-
-
-
- -
-
-
-
-
- -
-
-
- Short year window:
-
-
- m_intShortYearWindowStartYear
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- 2000
-
-
- -9999
-
-
- 9999
-
-
-
- -
-
-
- to
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- true
-
-
- QAbstractSpinBox::NoButtons
-
-
- -9999
-
-
- 9999
-
-
- 2099
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Week number system:
-
-
- m_comboWeekNumberSystem
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- First day of week:
-
-
- m_comboWeekStartDay
-
-
-
-
-
-
-
- Date && Time
-
-
-
- QFormLayout::ExpandingFieldsGrow
-
- -
-
-
-
-
-
-
-
-
- Time format:
-
-
- m_comboTimeFormat
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
- AM symbol:
-
-
- m_comboAmSymbol
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
- PM symbol:
-
-
- m_comboPmSymbol
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Long date format:
-
-
- m_comboDateFormat
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Short date format:
-
-
- m_comboShortDateFormat
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
- true
-
-
-
- -
-
-
-
-
- -
-
-
- false
-
-
-
-
-
-
-
-
- Possessive month names:
-
-
- m_checkMonthNamePossessive
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
- false
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Digit set:
-
-
- m_comboDateTimeDigitSet
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Other
-
-
- -
-
-
-
-
-
-
-
-
- Page size
-
-
- m_comboPageSize
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
-
-
- Measurement system
-
-
- m_comboMeasureSystem
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
- -
-
-
- Byte size units
-
-
- m_comboBinaryUnitDialect
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- Numbers:
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Date:
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- Short date:
-
-
-
- -
-
-
- Time:
-
-
-
- -
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
- KIntSpinBox
- QSpinBox
-
-
-
- KPushButton
- QPushButton
-
-
-
- KComboBox
- QComboBox
-
-
-
- KTabWidget
- QTabWidget
-
- 1
-
-
- KIntNumInput
- QWidget
-
-
-
- KActionSelector
- QWidget
-
-
-
-
- m_tabWidgetSettings
- m_comboCountry
- m_buttonDefaultCountry
- m_buttonDefaultThousandsSeparator
- m_buttonDefaultDecimalSymbol
- m_intDecimalPlaces
- m_buttonDefaultDecimalPlaces
- m_comboPositiveSign
- m_buttonDefaultPositiveSign
- m_comboNegativeSign
- m_buttonDefaultNegativeSign
- m_comboDigitSet
- m_buttonDefaultDigitSet
- m_comboCalendarSystem
- m_buttonDefaultCalendarSystem
- m_checkCalendarGregorianUseCommonEra
- m_buttonDefaultCalendarGregorianUseCommonEra
- m_intShortYearWindowStartYear
- m_spinShortYearWindowEndYear
- m_buttonDefaultShortYearWindow
- m_comboWeekStartDay
- m_buttonDefaultWeekStartDay
- m_comboTimeFormat
- m_buttonDefaultTimeFormat
- m_comboAmSymbol
- m_buttonDefaultAmSymbol
- m_comboPmSymbol
- m_buttonDefaultPmSymbol
- m_comboDateFormat
- m_buttonDefaultDateFormat
- m_comboShortDateFormat
- m_buttonDefaultShortDateFormat
- m_checkMonthNamePossessive
- m_buttonDefaultMonthNamePossessive
- m_comboDateTimeDigitSet
- m_buttonDefaultDateTimeDigitSet
- m_comboPageSize
- m_buttonDefaultPageSize
- m_comboMeasureSystem
- m_buttonDefaultMeasureSystem
- m_comboBinaryUnitDialect
- m_buttonDefaultBinaryUnitDialect
-
-
-
diff --git a/keditbookmarks/globalbookmarkmanager.cpp b/keditbookmarks/globalbookmarkmanager.cpp
index 6a06aeed..81ea314f 100644
--- a/keditbookmarks/globalbookmarkmanager.cpp
+++ b/keditbookmarks/globalbookmarkmanager.cpp
@@ -100,8 +100,8 @@ QString GlobalBookmarkManager::makeTimeStr(int b)
QDateTime dt;
dt.setTime_t(b);
return (dt.daysTo(QDateTime::currentDateTime()) > 31)
- ? KGlobal::locale()->formatDate(dt.date(), KLocale::LongDate)
- : KGlobal::locale()->formatDateTime(dt, KLocale::LongDate);
+ ? KGlobal::locale()->formatDate(dt.date())
+ : KGlobal::locale()->formatDateTime(dt);
}
#include "moc_globalbookmarkmanager.cpp"
diff --git a/kfind/kdatecombo.cpp b/kfind/kdatecombo.cpp
index 68095040..4cfdc406 100644
--- a/kfind/kdatecombo.cpp
+++ b/kfind/kdatecombo.cpp
@@ -71,7 +71,7 @@ KDateCombo::~KDateCombo()
QString KDateCombo::date2String(const QDate & date)
{
- return(KGlobal::locale()->formatDate(date, KLocale::ShortDate));
+ return(KGlobal::locale()->formatDate(date));
}
QDate & KDateCombo::string2Date(const QString & str, QDate *qd)
diff --git a/kfind/kftabdlg.cpp b/kfind/kftabdlg.cpp
index 8d0e2a51..7ec7f835 100644
--- a/kfind/kftabdlg.cpp
+++ b/kfind/kftabdlg.cpp
@@ -29,7 +29,6 @@
#include
#include
-#include
#include
#include
#include
@@ -177,7 +176,7 @@ KfindTabWidget::KfindTabWidget(QWidget *parent)
betweenType->setCurrentIndex(1);
updateDateLabels(1, 1);
- QDate dt = KGlobal::locale()->calendar()->addYears(QDate::currentDate(), -1);
+ QDate dt = QDate::currentDate().addYears(-1);
fromDate = new KDateCombo(dt, pages[1] );
fromDate->setObjectName( QLatin1String( "fromDate" ) );
@@ -546,7 +545,7 @@ void KfindTabWidget::slotSizeBoxChanged(int index)
void KfindTabWidget::setDefaults()
{
- QDate dt = KGlobal::locale()->calendar()->addYears(QDate::currentDate(), -1);
+ QDate dt = QDate::currentDate().addYears(-1);
fromDate ->setDate(dt);
toDate ->setDate(QDate::currentDate());
@@ -761,7 +760,7 @@ void KfindTabWidget::setQuery(KQuery *query)
}
QString KfindTabWidget::date2String(const QDate & date) {
- return(KGlobal::locale()->formatDate(date, KLocale::ShortDate));
+ return(KGlobal::locale()->formatDate(date));
}
QDate &KfindTabWidget::string2Date(const QString & str, QDate *qd) {
diff --git a/kinfocenter/main.cpp b/kinfocenter/main.cpp
index 8520d3f3..f084994d 100644
--- a/kinfocenter/main.cpp
+++ b/kinfocenter/main.cpp
@@ -36,8 +36,6 @@ KicApp::KicApp() : KApplication()
int main(int argc, char *argv[])
{
- KLocale::setMainCatalog("kinfocenter");
-
KAboutData aboutKInfoCenter( "kinfocenter", 0, ki18n("KDE Info Center"),
KDE_VERSION_STRING, ki18n("The KDE Info Center"), KAboutData::License_GPL,
ki18n("(c) 2009-2010, The KDE SC KInfocenter Development Team"));
diff --git a/kwin/effects/windowgeometry/windowgeometry.cpp b/kwin/effects/windowgeometry/windowgeometry.cpp
index 8f52a964..509b8d67 100644
--- a/kwin/effects/windowgeometry/windowgeometry.cpp
+++ b/kwin/effects/windowgeometry/windowgeometry.cpp
@@ -124,13 +124,13 @@ void WindowGeometryEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
static inline QString number(int n)
{
QString sign;
+ const QLocale locale = KGlobal::locale()->toLocale();
if (n >= 0) {
- sign = KGlobal::locale()->positiveSign();
+ sign = locale.positiveSign();
if (sign.isEmpty()) sign = '+';
- }
- else {
+ } else {
n = -n;
- sign = KGlobal::locale()->negativeSign();
+ sign = locale.negativeSign();
if (sign.isEmpty()) sign = '-';
}
return sign + QString::number(n);
diff --git a/l10n/README b/l10n/README
index e293a57a..6178ba7e 100644
--- a/l10n/README
+++ b/l10n/README
@@ -61,173 +61,6 @@ between the entry name and the value.
Default: blank
-* Region
-
- Defines which submenu the country belongs to. Currently there are 20 different regions
- conforming to the United Nations statistical regions, excluding the Oceania sub-divisions,
- but adding Central Europe. See http://unstats.un.org/unsd/methods/m49/m49regin.htm for details.
-
- centralasia (Central Asia)
- eastasia (East Asia)
- southasia (South Asia)
- southeastasia (South-East Asia)
- middleeast (Middle-East/West Asia)
- centralafrica (Central Africa)
- northafrica (Northern Africa)
- southafrica (Southern Africa)
- westafrica (Western Africa)
- eastafrica (Eastern Africa)
- easteurope (Eastern Europe)
- westeurope (Western Europe)
- southeurope (Southern Europe)
- northeurope (Northern Europe)
- centraleurope (Central Europe)
- northamerica (North America)
- southamerica (South America)
- centralemarica (Central America)
- caribbean (Caribbean)
- oceania (Oceania)
-
- Default: blank
-
-* Languages
- A comma separated list of locale codes for the official languages
- of the country.
-
- Default: blank
-
-* DecimalSymbol
- The symbol that separates the decimals from the rest of the
- number.
-
- Default: "."
-
-* DecimalPlaces
- The number of decimal places to display in a formatted number
-
- Default: 2
-
-* ThousandsSeparator
- Thousands separator.
-
- Default: ","
-
-* DigitSet
- The set of digits used to display numbers.
-
- 0 Arabic
- 1 Arabic-Indic
- 2 Eastern Arabic-Indic
- 3 Devenagari
-
- Default: 0
-
-* PositiveSign
- Positive sign for numbers.
- Note: Do not add "+" if you don't really want numbers to be
- formatted that way.
-
- Default: ""
-
-* NegativeSign
- Negative sign for numbers.
-
- Default: "-"
-
-* DateFormat[language code]
- This defines how a date is formated. The date string will be
- contructed from this string and the sequences below will be
- replaced. This should be marked with a language code as well for
- each supported language.
-
- %Y The year with century as a decimal number.
- %y The year without century as a decimal number (00-99).
- %m The month as a decimal number (01-12).
- %n The month as a decimal number (1-12).
- %b The national representation of the abbreviated month name,
- where the abbreviation is the first three characters.
- %B The national representation of the full month name.
- %d The day of month as a decimal number (01-31).
- %e The day of month as a decimal number (1-31).
- %a The national representation of the abbreviated weekday name,
- where the abbreviation is the first three characters.
- %A The national representation of the full weekday name.
-
- Default: "%A %d %B %Y"
-
-* DateFormatShort
- This is the same as DateFormat, but is used when the program asks
- for a short date. Usally this is used when listing files etc.
-
- Default: "%Y-%m-%d"
-
-* TimeFormat
- This defines how a times are formated. The date string will be
- contructed from this string and the sequences below will be
- replaced.
-
- %H The hour as a decimal number using a 24-hour clock (range 00 to
- 23).
- %k The hour (24-hour clock) as a decimal number (range 0 to 23).
- %I The hour as a decimal number using a 12-hour clock (range 01 to
- 12).
- %l The hour (12-hour clock) as a decimal number (range 1 to 12).
- %M The minute as a decimal number (range 00 to 59).
- %S The second as a decimal number (range 00 to 59).
- %p Either AM or PM according to the given time value. AM or PM are
- translating to the current language. Noon is treated as PM
- and midnight as AM.
-
- Default: "%H:%M:%S"
-
-* DateTimeDigitSet
- The set of digits used to display date and time numbers.
-
- See DigitSet for possible values.
-
- Default: 0
-
-* WeekStartDay
- This defines which day is the first of the week. Accepted value is
- an integer number where 1 means Monday, 2 Tuesday, and so on.
-
- Default: 1
-
-* MeasureSystem
- This defines which measure system we should use. There are two
- values here, 0 for Metric and 1 for Imperial. Metric would give
- you meters (or cm/mm), while Imperial would give you inches.
-
- Default: 0
-
-* PageSize
- This defines which page size we should use by default. It should
- be the number of the item in the QPrinter::PageSize enum. Here are
- some values:
-
- 0 A4
- 1 B5
- 2 US Letter
- ...and so on
-
- Default: 0
-
-* CalendarSystem
- This defines which calendar system to use. Available systems are:
-
- gregorian
- gregorian-proleptic
- julian
-
- Default: gregorian
-
-* AddressFormat
-* BusinessAddressFormat
-* AddressCountryPosition
- These fields define the formatting of postal addresses. For
- detailled information on these fields' format, please refer to
- kdepimlibs/kabc/README.AddressFormat
-
Hans Petter Bieker
Lukas Tinkl
John Layt
diff --git a/l10n/ad/entry.desktop b/l10n/ad/entry.desktop
index fae1a9a1..cc177461 100644
--- a/l10n/ad/entry.desktop
+++ b/l10n/ad/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Andore
Name[x-test]=xxAndorraxx
Name[zh_CN]=安道尔
Name[zh_TW]=安道爾
-Region=westeurope
-Languages=ca,fr,es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ae/entry.desktop b/l10n/ae/entry.desktop
index 363ab78f..e9c7a0aa 100644
--- a/l10n/ae/entry.desktop
+++ b/l10n/ae/entry.desktop
@@ -91,8 +91,3 @@ Name[xh]=United Arab Emirates
Name[x-test]=xxUnited Arab Emiratesxx
Name[zh_CN]=阿联酋
Name[zh_TW]=阿拉伯聯合大公國
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/af/entry.desktop b/l10n/af/entry.desktop
index d25188fc..05e35bce 100644
--- a/l10n/af/entry.desktop
+++ b/l10n/af/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Afganistan
Name[x-test]=xxAfghanistanxx
Name[zh_CN]=阿富汗
Name[zh_TW]=阿富汗
-Region=centralasia
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ag/entry.desktop b/l10n/ag/entry.desktop
index 692af4d2..040c82fd 100644
--- a/l10n/ag/entry.desktop
+++ b/l10n/ag/entry.desktop
@@ -91,16 +91,3 @@ Name[xh]=Antigua ne Barbuda
Name[x-test]=xxAntigua and Barbudaxx
Name[zh_CN]=安提瓜和巴布达
Name[zh_TW]=安地瓜島和巴布達島
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/ai/entry.desktop b/l10n/ai/entry.desktop
index 8b7bba42..95476825 100644
--- a/l10n/ai/entry.desktop
+++ b/l10n/ai/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Anguila
Name[x-test]=xxAnguillaxx
Name[zh_CN]=安圭拉
Name[zh_TW]=安圭拉
-Region=caribbean
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/al/entry.desktop b/l10n/al/entry.desktop
index ef5e59a0..e99177ad 100644
--- a/l10n/al/entry.desktop
+++ b/l10n/al/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Albaneye
Name[x-test]=xxAlbaniaxx
Name[zh_CN]=阿尔巴尼亚
Name[zh_TW]=阿爾巴尼亞
-Region=southeurope
-Languages=sq,el
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[sq]=%a, %d %B %Y
-DateFormatShort=%Y-%m-%d
-TimeFormat=%l.%M.%S.%p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/am/entry.desktop b/l10n/am/entry.desktop
index 94ad3d4c..41b4e4ce 100644
--- a/l10n/am/entry.desktop
+++ b/l10n/am/entry.desktop
@@ -91,17 +91,3 @@ Name[wa]=Årmeneye
Name[x-test]=xxArmeniaxx
Name[zh_CN]=亚美尼亚
Name[zh_TW]=亞美尼亞
-Region=middleeast
-Languages=hy
-DecimalSymbol=,
-ThousandsSeparator=.
-# FIXME Name is Dram, symbol is unknown
-PositiveSign=
-NegativeSign=-
-DateFormat[hy]=%A,%B %e, %Y
-DateFormatShort=%m/%d/%y
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/an/entry.desktop b/l10n/an/entry.desktop
index 23ee5498..c4a77a48 100644
--- a/l10n/an/entry.desktop
+++ b/l10n/an/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Antiyes Neyerlandesses
Name[x-test]=xxNetherlands Antillesxx
Name[zh_CN]=荷属安的列斯群岛
Name[zh_TW]=荷屬安地列斯群島
-Region=caribbean
-Languages=nl,en_GB,es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ao/entry.desktop b/l10n/ao/entry.desktop
index b43b6e1c..eaa75c43 100644
--- a/l10n/ao/entry.desktop
+++ b/l10n/ao/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Angola
Name[x-test]=xxAngolaxx
Name[zh_CN]=安哥拉
Name[zh_TW]=安哥拉
-Region=southafrica
-Languages=pt
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ar/entry.desktop b/l10n/ar/entry.desktop
index 7ce1e047..1d3433d6 100644
--- a/l10n/ar/entry.desktop
+++ b/l10n/ar/entry.desktop
@@ -92,19 +92,3 @@ Name[xh]=Argentina
Name[x-test]=xxArgentinaxx
Name[zh_CN]=阿根廷
Name[zh_TW]=阿根廷
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-PageSize=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(Casilla de Correo %p\n)%0(%s\n)%z%w%l
-AddressCountryPosition=below
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/as/entry.desktop b/l10n/as/entry.desktop
index fc2e269d..0b2c19de 100644
--- a/l10n/as/entry.desktop
+++ b/l10n/as/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Samowa Amerikinne
Name[x-test]=xxAmerican Samoaxx
Name[zh_CN]=美属萨摩亚
Name[zh_TW]=美屬薩摩亞
-Region=oceania
-Languages=en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%m/%d/%y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-PageSize=2
-MeasureSystem=1
-#DecimalPlaces=2
diff --git a/l10n/at/entry.desktop b/l10n/at/entry.desktop
index 17b570b0..893166da 100644
--- a/l10n/at/entry.desktop
+++ b/l10n/at/entry.desktop
@@ -92,20 +92,3 @@ Name[xh]=Austria
Name[x-test]=xxAustriaxx
Name[zh_CN]=奥地利
Name[zh_TW]=奧地利
-Region=centraleurope
-Languages=de
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[de]=%A, %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%n\n)%0(%cm\n)%0(Postfach %p\n)%0(%s\n)%0(%z)%w%l
-BusinessAddressFormat=%0(%cm\n)%0(z.Hd. %n\n)%0(Postfach %p\n)%0(%s\n)%0(%z)%w%l
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/au/entry.desktop b/l10n/au/entry.desktop
index 02cd062c..ab518607 100644
--- a/l10n/au/entry.desktop
+++ b/l10n/au/entry.desktop
@@ -92,24 +92,3 @@ Name[xh]=Australia
Name[x-test]=xxAustraliaxx
Name[zh_CN]=澳大利亚
Name[zh_TW]=澳大利亞
-Region=oceania
-Languages=en_GB,en
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%a, %e %b %Y
-DateFormat[en]=%a, %e %b %Y
-DateFormat[en_US]=%a, %e %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat[en_GB]=%I:%M:%S %p
-TimeFormat[en]=%I:%M:%S %p
-TimeFormat[en_US]=%I:%M:%S %p
-TimeFormat[eo]=%H:%M:%S
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%L%w%w%R%w%w)%z
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/aw/entry.desktop b/l10n/aw/entry.desktop
index a52d595e..705a16f4 100644
--- a/l10n/aw/entry.desktop
+++ b/l10n/aw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Arouba
Name[x-test]=xxArubaxx
Name[zh_CN]=阿鲁巴
Name[zh_TW]=阿魯巴
-Region=caribbean
-Languages=nl,en_GB,sp
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ax/entry.desktop b/l10n/ax/entry.desktop
index d107298b..a332e11a 100644
--- a/l10n/ax/entry.desktop
+++ b/l10n/ax/entry.desktop
@@ -88,20 +88,3 @@ Name[wa]=Iyes Ålande
Name[x-test]=xxÅland Islandsxx
Name[zh_CN]=阿兰群岛
Name[zh_TW]=奧蘭群島
-Region=northeurope
-Languages=sv,se
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[sv]=%Aen den %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[se]=%A, %B %e. b. %Y
-DateFormatShort=%Y-%m-%d
-TimeFormat=%H.%M.%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(PB %p\n)%0(%s\n)%z%w%L
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/az/entry.desktop b/l10n/az/entry.desktop
index 7830658e..caa5f965 100644
--- a/l10n/az/entry.desktop
+++ b/l10n/az/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Azerbaijan
Name[x-test]=xxAzerbaijanxx
Name[zh_CN]=阿塞拜疆
Name[zh_TW]=亞塞拜然
-
-Region=middleeast
-Languages=az
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[az]=%A %d %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d-%m-%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/ba/entry.desktop b/l10n/ba/entry.desktop
index a1c3ff2f..4d58c626 100644
--- a/l10n/ba/entry.desktop
+++ b/l10n/ba/entry.desktop
@@ -91,16 +91,3 @@ Name[xh]=Bosnia ne Herzegovina
Name[x-test]=xxBosnia and Herzegovinaxx
Name[zh_CN]=波斯尼亚和黑塞哥维那
Name[zh_TW]=波士尼亞與赫塞哥維納
-Region=southeurope
-Languages=bs,hr,sr
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[bs]=%a, %d %B %Y.
-DateFormat[hr]=%a, %d %B %Y.
-DateFormat[sr]=%a, %d %B %Y.
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y.
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/bb/entry.desktop b/l10n/bb/entry.desktop
index 34833d45..0c042ae5 100644
--- a/l10n/bb/entry.desktop
+++ b/l10n/bb/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Barbados
Name[x-test]=xxBarbadosxx
Name[zh_CN]=巴巴多斯
Name[zh_TW]=巴貝多
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/bd/entry.desktop b/l10n/bd/entry.desktop
index 967f01f6..769f4f16 100644
--- a/l10n/bd/entry.desktop
+++ b/l10n/bd/entry.desktop
@@ -92,11 +92,3 @@ Name[xh]=Bangladesh
Name[x-test]=xxBangladeshxx
Name[zh_CN]=孟加拉国
Name[zh_TW]=孟加拉
-Region=southasia
-Languages=bn,en_GB
-DateFormat=%A %d %b %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-PageSize=0
-MeasureSystem=1
-#DecimalPlaces=2
diff --git a/l10n/be/entry.desktop b/l10n/be/entry.desktop
index 0b59203a..c7e72288 100644
--- a/l10n/be/entry.desktop
+++ b/l10n/be/entry.desktop
@@ -93,24 +93,3 @@ Name[x-test]=xxBelgiumxx
Name[zh_CN]=比利时
Name[zh_TW]=比利時
Region=westeurope
-Languages=nl_BE,fr_BE,de_BE,nl,fr,de,wa
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[nl]=%A %e %B %Y
-DateFormat[fr]=%A %e %B %Y
-DateFormat[de]=%A %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[wa]=%A %e di %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(PO Box %p\n)%z%w%L
-AddressFormat[fr]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L
-AddressFormat[de]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(Postfach %p\n)%z%w%L
-AddressFormat[nl]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(Postbus %p\n)%z%w%L
-AddressCountryPosition=BELOW
diff --git a/l10n/bf/entry.desktop b/l10n/bf/entry.desktop
index 92309290..d5377462 100644
--- a/l10n/bf/entry.desktop
+++ b/l10n/bf/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Bourkina Fasso
Name[x-test]=xxBurkina Fasoxx
Name[zh_CN]=布基纳法索
Name[zh_TW]=布吉納法索
-Region=westafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bg/entry.desktop b/l10n/bg/entry.desktop
index fe542f4d..7320a7de 100644
--- a/l10n/bg/entry.desktop
+++ b/l10n/bg/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Bulgaria
Name[x-test]=xxBulgariaxx
Name[zh_CN]=保加利亚
Name[zh_TW]=保加利亞
-Region=easteurope
-Languages=bg
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[bg]=%e.%n.%Y
-DateFormat[eo]=%A, %e %B %Y
-DateFormatShort=%e.%n.%Y
-TimeFormat=%H:%M:%S
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/bh/entry.desktop b/l10n/bh/entry.desktop
index 9df8444e..9b5d1909 100644
--- a/l10n/bh/entry.desktop
+++ b/l10n/bh/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Bahrain
Name[x-test]=xxBahrainxx
Name[zh_CN]=巴林
Name[zh_TW]=巴林
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/bi/entry.desktop b/l10n/bi/entry.desktop
index 59600ab8..627e7cdf 100644
--- a/l10n/bi/entry.desktop
+++ b/l10n/bi/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Bouroundi
Name[x-test]=xxBurundixx
Name[zh_CN]=布隆迪
Name[zh_TW]=浦隆地
-Region=centralafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bj/entry.desktop b/l10n/bj/entry.desktop
index cdf815ab..a6de413b 100644
--- a/l10n/bj/entry.desktop
+++ b/l10n/bj/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Benin
Name[x-test]=xxBeninxx
Name[zh_CN]=贝宁
Name[zh_TW]=貝南
-Region=westafrica
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bl/entry.desktop b/l10n/bl/entry.desktop
index 8af12669..06adb5b2 100644
--- a/l10n/bl/entry.desktop
+++ b/l10n/bl/entry.desktop
@@ -65,18 +65,3 @@ Name[wa]=Sint Bartelemi
Name[x-test]=xxSaint Barthélemyxx
Name[zh_CN]=Saint Barthélemy
Name[zh_TW]=Saint Barthélemy
-Region=caribbean
-Languages=fr
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat=%A %e %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L
-AddressCountryPosition=BELOW
-DecimalPlaces=2
diff --git a/l10n/bm/entry.desktop b/l10n/bm/entry.desktop
index bddf4f45..a8142679 100644
--- a/l10n/bm/entry.desktop
+++ b/l10n/bm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Bermudes
Name[x-test]=xxBermudaxx
Name[zh_CN]=百慕大
Name[zh_TW]=百慕達
-Region=northamerica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bn/entry.desktop b/l10n/bn/entry.desktop
index a8a0782a..62489155 100644
--- a/l10n/bn/entry.desktop
+++ b/l10n/bn/entry.desktop
@@ -92,16 +92,3 @@ Name[wa]=Bruney Darussalam
Name[x-test]=xxBrunei Darussalamxx
Name[zh_CN]=文莱达鲁萨兰
Name[zh_TW]=文萊達魯薩蘭
-Region=southeastasia
-Languages=ms,zn_CN
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bo/entry.desktop b/l10n/bo/entry.desktop
index c49514d5..de2aecc1 100644
--- a/l10n/bo/entry.desktop
+++ b/l10n/bo/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Bolivia
Name[x-test]=xxBoliviaxx
Name[zh_CN]=玻利维亚
Name[zh_TW]=玻利維亞
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eu]=%a, %Yeko %bren %da
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/br/entry.desktop b/l10n/br/entry.desktop
index 81201aa0..50707745 100644
--- a/l10n/br/entry.desktop
+++ b/l10n/br/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Brazil
Name[x-test]=xxBrazilxx
Name[zh_CN]=巴西
Name[zh_TW]=巴西
-Region=southamerica
-Languages=pt_BR
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[pt_BR]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d-%m-%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-AddressFormat=%0(%cm\n)%0(%n\n)%0(Caixa Postal %p\n)%0(%s\n)%l%0( - %r)%0(\n%z)
-#DecimalPlaces=2
diff --git a/l10n/bs/entry.desktop b/l10n/bs/entry.desktop
index 7dd7efbe..1cecbacc 100644
--- a/l10n/bs/entry.desktop
+++ b/l10n/bs/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Bahamas
Name[x-test]=xxBahamasxx
Name[zh_CN]=巴哈马
Name[zh_TW]=巴哈馬
-Region=caribbean
-Languages=en_GB,es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/bt/entry.desktop b/l10n/bt/entry.desktop
index 61f502f1..96e16eb9 100644
--- a/l10n/bt/entry.desktop
+++ b/l10n/bt/entry.desktop
@@ -92,17 +92,3 @@ Name[wa]=Boutan
Name[x-test]=xxBhutanxx
Name[zh_CN]=不丹
Name[zh_TW]=不丹
-Region=southasia
-Languages=dz,en
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en]=%A %d %B %Y
-DateFormat[dz]=སྤྱི་ལོ་%Y ཟླ%n ཚེ་%d
-DateFormatShort=%Y-%m-%d
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/bw/entry.desktop b/l10n/bw/entry.desktop
index 034def6e..5e4ce63b 100644
--- a/l10n/bw/entry.desktop
+++ b/l10n/bw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Boswana
Name[x-test]=xxBotswanaxx
Name[zh_CN]=博茨瓦纳
Name[zh_TW]=波札那
-Region=southafrica
-Languages=en_GB,ts
-DecimalSymbol=.
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%A %d %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l.%M.%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/by/entry.desktop b/l10n/by/entry.desktop
index 80efa46b..acf0a060 100644
--- a/l10n/by/entry.desktop
+++ b/l10n/by/entry.desktop
@@ -93,18 +93,3 @@ Name[xh]=Belarus
Name[x-test]=xxBelarusxx
Name[zh_CN]=白俄罗斯
Name[zh_TW]=白俄羅斯
-Region=easteurope
-Languages=be,ru
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat=%e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-CalendarSystem=gregorian
-#DecimalPlaces=2
diff --git a/l10n/bz/entry.desktop b/l10n/bz/entry.desktop
index 86d39b6c..18d92282 100644
--- a/l10n/bz/entry.desktop
+++ b/l10n/bz/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Belize
Name[x-test]=xxBelizexx
Name[zh_CN]=伯利兹
Name[zh_TW]=貝里斯
-Region=centralamerica
-Languages=en_GB,es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ca/entry.desktop b/l10n/ca/entry.desktop
index f60597b4..caff84d4 100644
--- a/l10n/ca/entry.desktop
+++ b/l10n/ca/entry.desktop
@@ -95,27 +95,3 @@ Name[xh]=Canada
Name[x-test]=xxCanadaxx
Name[zh_CN]=加拿大
Name[zh_TW]=加拿大
-Region=northamerica
-Languages=en_GB,fr,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-ThousandsSeparator[fr]=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%B %e, %Y
-DateFormat[fr]=%e %B %Y
-DateFormat[en_US]=%B %e, %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort[en_GB]=%d/%m/%y
-DateFormatShort[fr]=%Y-%m-%d
-DateFormatShort[en_US]=%d/%m/%y
-TimeFormat[en_GB]=%I:%M:%S %p
-TimeFormat[fr]=%H:%M:%S
-TimeFormat[en_US]=%I:%M:%S %p
-TimeFormat[eo]=%H:%M:%S
-WeekStartDay=7
-PageSize=2
-MeasureSystem=0
-AddressFormat=%0(%N\n)%0(%CM\n)%0(%S\n)%0(PO BOX %p\n)%0(%L%w%R)%,%z
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/cc/entry.desktop b/l10n/cc/entry.desktop
index 03ef7ac9..38ef7e91 100644
--- a/l10n/cc/entry.desktop
+++ b/l10n/cc/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Cocos
Name[x-test]=xxCocos (Keeling) Islandsxx
Name[zh_CN]=科科斯群岛
Name[zh_TW]=可可斯群島
-Region=southeastasia
-Languages=ms,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cd/entry.desktop b/l10n/cd/entry.desktop
index e8b5ff0f..9b9d6662 100644
--- a/l10n/cd/entry.desktop
+++ b/l10n/cd/entry.desktop
@@ -88,16 +88,3 @@ Name[wa]=Congo, republike democratike
Name[x-test]=xxCongo, The Democratic Republic of thexx
Name[zh_CN]=刚果民主共和国
Name[zh_TW]=剛果民主共和國
-Region=centralafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cf/entry.desktop b/l10n/cf/entry.desktop
index dd1802dc..e5984564 100644
--- a/l10n/cf/entry.desktop
+++ b/l10n/cf/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Cintrafrike
Name[x-test]=xxCentral African Republicxx
Name[zh_CN]=中非共和国
Name[zh_TW]=中非共和國
-Region=centralafrica
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cg/entry.desktop b/l10n/cg/entry.desktop
index 3aad04f0..17dcdb90 100644
--- a/l10n/cg/entry.desktop
+++ b/l10n/cg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Congo
Name[x-test]=xxCongoxx
Name[zh_CN]=刚果
Name[zh_TW]=剛果
-Region=centralafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ch/entry.desktop b/l10n/ch/entry.desktop
index 427c4a99..499b90eb 100644
--- a/l10n/ch/entry.desktop
+++ b/l10n/ch/entry.desktop
@@ -92,24 +92,3 @@ Name[xh]=Switzerland
Name[x-test]=xxSwitzerlandxx
Name[zh_CN]=瑞士
Name[zh_TW]=瑞士
-Region=centraleurope
-Languages=de,fr,it
-DecimalSymbol=.
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[de]=%A, %e. %B %Y
-DateFormat[fr]=%A, %e %B %Y
-DateFormat[it]=%A, %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H.%M:%S
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(P.O. Box %p\n)%0(%s\n)%z%w%l
-AddressFormat[de]=%0(%cm\n)%0(%n\n)%0(Postfach %p\n)%0(%s\n)%z%w%l
-AddressFormat[fr]=%0(%cm\n)%0(%n\n)%0(Case postale %p\n)%0(%s\n)%z%w%l
-AddressFormat[it]=%0(%cm\n)%0(%n\n)%0(Casella postale %p\n)%0(%s\n)%z%w%l
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/ci/entry.desktop b/l10n/ci/entry.desktop
index c91fd187..4e87b6d8 100644
--- a/l10n/ci/entry.desktop
+++ b/l10n/ci/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Coisse d' Ivwere
Name[x-test]=xxCote d'ivoirexx
Name[zh_CN]=科特迪瓦
Name[zh_TW]=象牙海岸
-Region=westafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ck/entry.desktop b/l10n/ck/entry.desktop
index 84995249..fff6eefd 100644
--- a/l10n/ck/entry.desktop
+++ b/l10n/ck/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Iyes Cook
Name[x-test]=xxCook islandsxx
Name[zh_CN]=库克群岛
Name[zh_TW]=庫克群島
-Region=oceania
-Languages=ms,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cl/entry.desktop b/l10n/cl/entry.desktop
index 53141411..56e672cc 100644
--- a/l10n/cl/entry.desktop
+++ b/l10n/cl/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Chile
Name[x-test]=xxChilexx
Name[zh_CN]=智利
Name[zh_TW]=智利
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/cm/entry.desktop b/l10n/cm/entry.desktop
index a13b9c4b..cffc0611 100644
--- a/l10n/cm/entry.desktop
+++ b/l10n/cm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Camrone
Name[x-test]=xxCameroonxx
Name[zh_CN]=喀麦隆
Name[zh_TW]=喀麥隆
-Region=centralafrica
-Languages=fr,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cn/entry.desktop b/l10n/cn/entry.desktop
index f0691785..7cc8fea6 100644
--- a/l10n/cn/entry.desktop
+++ b/l10n/cn/entry.desktop
@@ -93,19 +93,3 @@ Name[xh]=China
Name[x-test]=xxChinaxx
Name[zh_CN]=中国
Name[zh_TW]=中國
-Region=eastasia
-Languages=zh_CN
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[zh_CN]=%Y年%n月%e日 %A
-DateFormat[zh_TW]=%Y年%n月%e日 %A
-#DateFormat[de]=%A %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%Y-%m-%d
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-#DecimalPlaces=2
diff --git a/l10n/co/entry.desktop b/l10n/co/entry.desktop
index 2723150b..fc206b45 100644
--- a/l10n/co/entry.desktop
+++ b/l10n/co/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Columbia
Name[x-test]=xxColombiaxx
Name[zh_CN]=哥伦比亚
Name[zh_TW]=哥倫比亞
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/cr/entry.desktop b/l10n/cr/entry.desktop
index 377156f6..afe3c24a 100644
--- a/l10n/cr/entry.desktop
+++ b/l10n/cr/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Costa Rica
Name[x-test]=xxCosta Ricaxx
Name[zh_CN]=哥斯达黎加
Name[zh_TW]=哥斯大黎加
-Region=centralamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%A, %e de %B de %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=1
-PageSize=2
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/cu/entry.desktop b/l10n/cu/entry.desktop
index fae9c6eb..3388635f 100644
--- a/l10n/cu/entry.desktop
+++ b/l10n/cu/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Cuba
Name[x-test]=xxCubaxx
Name[zh_CN]=古巴
Name[zh_TW]=古巴
-Region=caribbean
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%A, %e de %B de %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=1
-PageSize=2
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/cv/entry.desktop b/l10n/cv/entry.desktop
index af9ea9fd..7bdc481c 100644
--- a/l10n/cv/entry.desktop
+++ b/l10n/cv/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Cap Vert
Name[x-test]=xxCape Verdexx
Name[zh_CN]=佛得角
Name[zh_TW]=維德角
-Region=westafrica
-Languages=pt
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cx/entry.desktop b/l10n/cx/entry.desktop
index 4a405a4f..08f7859c 100644
--- a/l10n/cx/entry.desktop
+++ b/l10n/cx/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Christmas
Name[x-test]=xxChristmas Islandxx
Name[zh_CN]=圣诞岛
Name[zh_TW]=聖誕島
-Region=southeastasia
-Languages=en_GB,zh_CN,ms
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cy/entry.desktop b/l10n/cy/entry.desktop
index bb73c93e..79a0af52 100644
--- a/l10n/cy/entry.desktop
+++ b/l10n/cy/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Chîpe
Name[x-test]=xxCyprusxx
Name[zh_CN]=塞浦路斯
Name[zh_TW]=賽普勒斯
-Region=southeurope
-Languages=el,tr,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/cz/entry.desktop b/l10n/cz/entry.desktop
index bfda3bf9..a4385012 100644
--- a/l10n/cz/entry.desktop
+++ b/l10n/cz/entry.desktop
@@ -87,17 +87,3 @@ Name[wa]=Tchekeye
Name[x-test]=xxCzech Republicxx
Name[zh_CN]=捷克共和国
Name[zh_TW]=捷克共和國
-Region=centraleurope
-Languages=cs
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=−
-DateFormat[cs]=%a %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e. %n. %Y
-TimeFormat=%H:%M:%S
-DateMonthNamePossessive=true
-AddressFormat=%0(%cm\n)%0(%n\n)%0(p. p. %p\n)%0(%s\n)%z%w%w%l
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/de/entry.desktop b/l10n/de/entry.desktop
index bacbeeb1..77b95490 100644
--- a/l10n/de/entry.desktop
+++ b/l10n/de/entry.desktop
@@ -92,23 +92,3 @@ Name[xh]=Germany
Name[x-test]=xxGermanyxx
Name[zh_CN]=德国
Name[zh_TW]=德國
-Region=centraleurope
-Languages=de,nds
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-ThousandsSeparator[nds]=$0.$0
-PositiveSign=
-NegativeSign=-
-DateFormat[de]=%A, %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[nds]=%A, de %e. %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-TimeFormat[nds]=%H.%M:%S
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(Postfach %p\n)%0(%s\n)%z%w%l
-AddressFormat[nds]=%0(%n\n)%0(- %cm -\n)%0(Postfach %p\n)%0(%s\n)%z%w%l
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/dj/entry.desktop b/l10n/dj/entry.desktop
index bb393879..aff18d2d 100644
--- a/l10n/dj/entry.desktop
+++ b/l10n/dj/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Djibouti
Name[x-test]=xxDjiboutixx
Name[zh_CN]=吉布提
Name[zh_TW]=吉布地
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/dk/entry.desktop b/l10n/dk/entry.desktop
index 2c154174..750dddc2 100644
--- a/l10n/dk/entry.desktop
+++ b/l10n/dk/entry.desktop
@@ -93,19 +93,3 @@ Name[xh]=Denmark
Name[x-test]=xxDenmarkxx
Name[zh_CN]=丹麦
Name[zh_TW]=丹麥
-Region=northeurope
-Languages=da
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[da]=%A den %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e/%n-%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(Postboks %p\n)%z%w%l
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/dm/entry.desktop b/l10n/dm/entry.desktop
index d9161196..edfec2e8 100644
--- a/l10n/dm/entry.desktop
+++ b/l10n/dm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Dominike
Name[x-test]=xxDominicaxx
Name[zh_CN]=多米尼加
Name[zh_TW]=多明尼加
-Region=caribbean
-Languages=en_GB,fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/do/entry.desktop b/l10n/do/entry.desktop
index aea44685..06ed6775 100644
--- a/l10n/do/entry.desktop
+++ b/l10n/do/entry.desktop
@@ -91,14 +91,3 @@ Name[xh]=IRepublic yeDominican
Name[x-test]=xxDominican Republicxx
Name[zh_CN]=多米尼加共和国
Name[zh_TW]=多明尼加共和國
-Region=caribbean
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/dz/entry.desktop b/l10n/dz/entry.desktop
index e32dfe26..efc8996b 100644
--- a/l10n/dz/entry.desktop
+++ b/l10n/dz/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Algeria
Name[x-test]=xxAlgeriaxx
Name[zh_CN]=阿尔及利亚
Name[zh_TW]=阿爾及利亞
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/ec/entry.desktop b/l10n/ec/entry.desktop
index 17049ca0..d026dbbd 100644
--- a/l10n/ec/entry.desktop
+++ b/l10n/ec/entry.desktop
@@ -79,14 +79,3 @@ Name[wa]=Ecwåteur
Name[x-test]=xxEcuadorxx
Name[zh_CN]=厄瓜多尔
Name[zh_TW]=厄瓜多
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/ee/entry.desktop b/l10n/ee/entry.desktop
index a7bf39a6..558934cf 100644
--- a/l10n/ee/entry.desktop
+++ b/l10n/ee/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Estonia
Name[x-test]=xxEstoniaxx
Name[zh_CN]=爱沙尼亚
Name[zh_TW]=愛沙尼亞
-Region=northeurope
-Languages=et
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[et]=%A, %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/eg/entry.desktop b/l10n/eg/entry.desktop
index ffaa4aa4..b4f0a3f6 100644
--- a/l10n/eg/entry.desktop
+++ b/l10n/eg/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Egypt
Name[x-test]=xxEgyptxx
Name[zh_CN]=埃及
Name[zh_TW]=埃及
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/eh/entry.desktop b/l10n/eh/entry.desktop
index 696e0b01..41c13add 100644
--- a/l10n/eh/entry.desktop
+++ b/l10n/eh/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Sara Coûtchantrece
Name[x-test]=xxWestern Saharaxx
Name[zh_CN]=西撒哈拉
Name[zh_TW]=西盛哈拉
-Region=northafrica
-Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/entities.ods b/l10n/entities.ods
deleted file mode 100644
index d31290d1..00000000
Binary files a/l10n/entities.ods and /dev/null differ
diff --git a/l10n/er/entry.desktop b/l10n/er/entry.desktop
index bd4d3040..c3591942 100644
--- a/l10n/er/entry.desktop
+++ b/l10n/er/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Eritrêye
Name[x-test]=xxEritreaxx
Name[zh_CN]=厄立特里亚
Name[zh_TW]=厄利垂亞
-Region=northafrica
-Languages=ti,ar
-DecimalSymbol=.
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-#DateFormat[ti]=
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/es/entry.desktop b/l10n/es/entry.desktop
index 422365e0..8276d855 100644
--- a/l10n/es/entry.desktop
+++ b/l10n/es/entry.desktop
@@ -92,22 +92,3 @@ Name[xh]=Spain
Name[x-test]=xxSpainxx
Name[zh_CN]=西班牙
Name[zh_TW]=西班牙
-Region=westeurope
-Languages=es,ca,eu,gl
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%A, %e de %B de %Y
-DateFormat[eu]=%a, %Yeko %bren %da
-DateFormat[gl]=%A, %e de %B de %Y
-DateFormat[ca]=%A, %e %B de %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateMonthNamePossessive[ca]=true
-DateFormatShort=%d-%m-%y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(Apartado Postal %p\n)%0(%s\n)%z%w%l%0(\n%r)
-#DecimalPlaces=2
diff --git a/l10n/et/entry.desktop b/l10n/et/entry.desktop
index 84886408..66ed544d 100644
--- a/l10n/et/entry.desktop
+++ b/l10n/et/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Etiopeye
Name[x-test]=xxEthiopiaxx
Name[zh_CN]=埃塞俄比亚
Name[zh_TW]=衣索比亞
-Region=northafrica
-Languages=en_GB,am,om,so,ti
-DecimalSymbol=.
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-#DateFormat[??]=
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/fi/entry.desktop b/l10n/fi/entry.desktop
index 44e6d8be..2fe678df 100644
--- a/l10n/fi/entry.desktop
+++ b/l10n/fi/entry.desktop
@@ -93,22 +93,3 @@ Name[xh]=Finland
Name[x-test]=xxFinlandxx
Name[zh_CN]=芬兰
Name[zh_TW]=芬蘭
-Region=northeurope
-Languages=fi,sv,se
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[fi]=%A, %e. %Bta %Y
-DateFormat[sv]=%Aen den %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[se]=%A, %B %e. b. %Y
-DateFormatShort=%d.%m.%Y
-DateFormatShort[se]=%Y-%m-%d
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(PB %p\n)%0(%s\n)%z%w%L
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/fj/entry.desktop b/l10n/fj/entry.desktop
index c17b0ff1..090444ad 100644
--- a/l10n/fj/entry.desktop
+++ b/l10n/fj/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Fidji
Name[x-test]=xxFijixx
Name[zh_CN]=斐济
Name[zh_TW]=菲濟
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/fk/entry.desktop b/l10n/fk/entry.desktop
index 074162ba..fe51c82f 100644
--- a/l10n/fk/entry.desktop
+++ b/l10n/fk/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Iyes Malouwines
Name[x-test]=xxFalkland Islands (Malvinas)xx
Name[zh_CN]=福克兰群岛(马尔维纳斯)
Name[zh_TW]=福克蘭群島 (馬爾維納斯)
-Region=southamerica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/fm/entry.desktop b/l10n/fm/entry.desktop
index f573ec20..32024429 100644
--- a/l10n/fm/entry.desktop
+++ b/l10n/fm/entry.desktop
@@ -88,16 +88,3 @@ Name[wa]=Micronezeye
Name[x-test]=xxMicronesia, Federated States ofxx
Name[zh_CN]=密克罗尼西亚联邦
Name[zh_TW]=密克羅尼西亞聯邦
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/fo/entry.desktop b/l10n/fo/entry.desktop
index 37979985..9d5ba895 100644
--- a/l10n/fo/entry.desktop
+++ b/l10n/fo/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iye Faeroyé
Name[x-test]=xxFaroe Islandsxx
Name[zh_CN]=法罗群岛
Name[zh_TW]=法羅群島
-Region=northeurope
-Languages=fa,da
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[fo]=%A %d %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/fr/entry.desktop b/l10n/fr/entry.desktop
index b61561a6..3065f0d6 100644
--- a/l10n/fr/entry.desktop
+++ b/l10n/fr/entry.desktop
@@ -93,19 +93,3 @@ Name[xh]=Fransi
Name[x-test]=xxFrancexx
Name[zh_CN]=法国
Name[zh_TW]=法國
-Region=westeurope
-Languages=fr,br,eu,ca,oc,de
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[fr]=%A %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/ga/entry.desktop b/l10n/ga/entry.desktop
index bb3678df..ef040094 100644
--- a/l10n/ga/entry.desktop
+++ b/l10n/ga/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Gabon
Name[x-test]=xxGabonxx
Name[zh_CN]=加蓬
Name[zh_TW]=加彭
-Region=centralafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gb/entry.desktop b/l10n/gb/entry.desktop
index 25b1a487..e565c98a 100644
--- a/l10n/gb/entry.desktop
+++ b/l10n/gb/entry.desktop
@@ -93,14 +93,3 @@ Name[x-test]=xxUnited Kingdomxx
Name[zh_CN]=英国
Name[zh_TW]=聯合王國
Region=westeurope
-Languages=en_GB,cy
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-PageSize=0
-MeasureSystem=0
-WeekStartDay=7
-#DecimalPlaces=2
-AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%0(%L\n)%0(%r\n)%0(%z\n)
-AddressCountryPosition=BELOW
diff --git a/l10n/gd/entry.desktop b/l10n/gd/entry.desktop
index 60220087..a0bad118 100644
--- a/l10n/gd/entry.desktop
+++ b/l10n/gd/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Grenada
Name[x-test]=xxGrenadaxx
Name[zh_CN]=格林纳达
Name[zh_TW]=格瑞那達
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/ge/entry.desktop b/l10n/ge/entry.desktop
index a1f32310..c176504e 100644
--- a/l10n/ge/entry.desktop
+++ b/l10n/ge/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Djeyordjeye
Name[x-test]=xxGeorgiaxx
Name[zh_CN]=格鲁吉亚
Name[zh_TW]=喬治亞
-Region=easteurope
-Languages=ka,ru
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat=%Y წლის %e %B, %A
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=A4
-MeasureSystem=Metric
-#DecimalPlaces=2
diff --git a/l10n/gf/entry.desktop b/l10n/gf/entry.desktop
index acd47cd1..0311e9c5 100644
--- a/l10n/gf/entry.desktop
+++ b/l10n/gf/entry.desktop
@@ -70,17 +70,3 @@ Name[wa]=Guyane francesse
Name[x-test]=xxFrench Guianaxx
Name[zh_CN]=法属圭亚那
Name[zh_TW]=法屬圭亞那
-
-Region=southamerica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gg/entry.desktop b/l10n/gg/entry.desktop
index 08633a3d..fa7fbd4b 100644
--- a/l10n/gg/entry.desktop
+++ b/l10n/gg/entry.desktop
@@ -65,13 +65,3 @@ Name[wa]=Guernzey
Name[x-test]=xxGuernseyxx
Name[zh_CN]=Guernsey
Name[zh_TW]=Guernsey
-Region=westeurope
-Languages=en_GB,fr
-DateFormat=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-PageSize=0
-MeasureSystem=0
-WeekStartDay=7
-DecimalPlaces=2
diff --git a/l10n/gh/entry.desktop b/l10n/gh/entry.desktop
index 3f9b7e8d..39c28fea 100644
--- a/l10n/gh/entry.desktop
+++ b/l10n/gh/entry.desktop
@@ -92,13 +92,3 @@ Name[xh]=Ghana
Name[x-test]=xxGhanaxx
Name[zh_CN]=加纳
Name[zh_TW]=迦納
-Region=westafrica
-Languages=en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%A, %e %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/gi/entry.desktop b/l10n/gi/entry.desktop
index 7adf000a..679c4dc4 100644
--- a/l10n/gi/entry.desktop
+++ b/l10n/gi/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Djibraltar
Name[x-test]=xxGibraltarxx
Name[zh_CN]=直布罗陀
Name[zh_TW]=直布羅陀
-Region=westeurope
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gl/entry.desktop b/l10n/gl/entry.desktop
index 23509bb0..5a345d1d 100644
--- a/l10n/gl/entry.desktop
+++ b/l10n/gl/entry.desktop
@@ -91,20 +91,3 @@ Name[wa]=Groenlande
Name[x-test]=xxGreenlandxx
Name[zh_CN]=格陵兰
Name[zh_TW]=格陵蘭
-Region=northamerica
-Languages=kl,da
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-#DateFormat[gl]=%A den %e. %B %Y
-DateFormat[da]=%A den %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e/%n-%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(Postboks %p\n)%z%w%l
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/gm/entry.desktop b/l10n/gm/entry.desktop
index ed6d7dea..6ebbf2fa 100644
--- a/l10n/gm/entry.desktop
+++ b/l10n/gm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Gambeye
Name[x-test]=xxGambiaxx
Name[zh_CN]=冈比亚
Name[zh_TW]=甘比亞
-Region=westafrica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gn/entry.desktop b/l10n/gn/entry.desktop
index 34805efa..a51f11b3 100644
--- a/l10n/gn/entry.desktop
+++ b/l10n/gn/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Guinêye
Name[x-test]=xxGuineaxx
Name[zh_CN]=几内亚
Name[zh_TW]=幾內亞
-Region=westafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gp/entry.desktop b/l10n/gp/entry.desktop
index 03c228bb..bfa6f450 100644
--- a/l10n/gp/entry.desktop
+++ b/l10n/gp/entry.desktop
@@ -92,14 +92,3 @@ Name[zh_CN]=瓜德罗普
Name[zh_TW]=瓜德魯普
Region=caribbean
Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gq/entry.desktop b/l10n/gq/entry.desktop
index bc61f0fe..30dc3585 100644
--- a/l10n/gq/entry.desktop
+++ b/l10n/gq/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Guinêye Ecwåtoriåle
Name[x-test]=xxEquatorial Guineaxx
Name[zh_CN]=赤道几内亚
Name[zh_TW]=赤道幾內亞
-Region=centralafrica
-Languages=es,fr,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gr/entry.desktop b/l10n/gr/entry.desktop
index 622349c2..b85a9176 100644
--- a/l10n/gr/entry.desktop
+++ b/l10n/gr/entry.desktop
@@ -92,17 +92,3 @@ Name[xh]=Greece
Name[x-test]=xxGreecexx
Name[zh_CN]=希腊
Name[zh_TW]=希臘
-Region=southeurope
-Languages=el
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateMonthNamePossessive=true
-DateFormat[el]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%S\n)%0(P.O. BOX %p\n)%z%w%L
-AddressCountryPosition=BELOW
diff --git a/l10n/gt/entry.desktop b/l10n/gt/entry.desktop
index 4bc43ffa..000ea298 100644
--- a/l10n/gt/entry.desktop
+++ b/l10n/gt/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Guatemala
Name[x-test]=xxGuatemalaxx
Name[zh_CN]=危地马拉
Name[zh_TW]=瓜地馬拉
-Region=centralamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/gu/entry.desktop b/l10n/gu/entry.desktop
index e01bbd22..4cfcb8ee 100644
--- a/l10n/gu/entry.desktop
+++ b/l10n/gu/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Gwam
Name[x-test]=xxGuamxx
Name[zh_CN]=关岛
Name[zh_TW]=關島
-Region=oceania
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gw/entry.desktop b/l10n/gw/entry.desktop
index 6ef4c60c..19ccdaac 100644
--- a/l10n/gw/entry.desktop
+++ b/l10n/gw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Guinêye-Bissaw
Name[x-test]=xxGuinea-Bissauxx
Name[zh_CN]=几内亚比绍
Name[zh_TW]=幾內亞比紹
-Region=westafrica
-Languages=es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/gy/entry.desktop b/l10n/gy/entry.desktop
index 89b964fb..35188207 100644
--- a/l10n/gy/entry.desktop
+++ b/l10n/gy/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Guyana
Name[x-test]=xxGuyanaxx
Name[zh_CN]=圭亚那
Name[zh_TW]=蓋亞納
-Region=southamerica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/hk/entry.desktop b/l10n/hk/entry.desktop
index 5a955f53..23a62a39 100644
--- a/l10n/hk/entry.desktop
+++ b/l10n/hk/entry.desktop
@@ -88,16 +88,3 @@ Name[wa]=Hong Kong
Name[x-test]=xxHong Kong SAR(China)xx
Name[zh_CN]=中国香港特别行政区
Name[zh_TW]=香港 SAR(中國)
-Region=eastasia
-Languages=zh_TW,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/hn/entry.desktop b/l10n/hn/entry.desktop
index 0d51be7a..3fe0ac73 100644
--- a/l10n/hn/entry.desktop
+++ b/l10n/hn/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Honduras
Name[x-test]=xxHondurasxx
Name[zh_CN]=洪都拉斯
Name[zh_TW]=宏都拉斯
-Region=centralamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/hr/entry.desktop b/l10n/hr/entry.desktop
index 225c3e6b..e963d251 100644
--- a/l10n/hr/entry.desktop
+++ b/l10n/hr/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Croatia
Name[x-test]=xxCroatiaxx
Name[zh_CN]=克罗地亚
Name[zh_TW]=克羅埃西亞
-Region=southeurope
-Languages=hr
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[hr]=%a %d %B %Y.
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y.
-TimeFormat=%H:%M:%S
-DateMonthNamePossessive=true
-#DecimalPlaces=2
diff --git a/l10n/ht/entry.desktop b/l10n/ht/entry.desktop
index e1fd07a8..d1be5bda 100644
--- a/l10n/ht/entry.desktop
+++ b/l10n/ht/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Hayiti
Name[x-test]=xxHaitixx
Name[zh_CN]=海地
Name[zh_TW]=海地
-Region=caribbean
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/hu/entry.desktop b/l10n/hu/entry.desktop
index f082fbdc..0d654436 100644
--- a/l10n/hu/entry.desktop
+++ b/l10n/hu/entry.desktop
@@ -92,18 +92,3 @@ Name[xh]=Hungary
Name[x-test]=xxHungaryxx
Name[zh_CN]=匈牙利
Name[zh_TW]=匈牙利
-Region=centraleurope
-Languages=hu
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat=%Y. %B %e.
-DateFormat[hu]=%Y. %B %e.
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%Y.%m.%d.
-TimeFormat=%H:%M:%S
-AddressFormat=%0(%n\n)%0(\n%l)%0(\n%s)%0(\nPF. %p)%0(\n%z)%0(\n%r)
-BusinessAddressFormat=%0(%n\n)%cm\n%z%w%l%0(\n%s)%0(\nPF. %p)%0(\n%r)
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/id/entry.desktop b/l10n/id/entry.desktop
index a37989f0..ce858d73 100644
--- a/l10n/id/entry.desktop
+++ b/l10n/id/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Indonesia
Name[x-test]=xxIndonesiaxx
Name[zh_CN]=印度尼西亚
Name[zh_TW]=印尼
-Region=southeastasia
-Languages=id
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[id]=%A, %d %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e/%m/%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/ie/entry.desktop b/l10n/ie/entry.desktop
index 3c8ed7f0..52d3d833 100644
--- a/l10n/ie/entry.desktop
+++ b/l10n/ie/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Ireland
Name[x-test]=xxIrelandxx
Name[zh_CN]=爱尔兰
Name[zh_TW]=愛爾蘭
-Region=westeurope
-Languages=en_GB,ga
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[ga]=%a %d %b %Y
-DateFormat[en_GB]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/il/entry.desktop b/l10n/il/entry.desktop
index e36825af..5e379170 100644
--- a/l10n/il/entry.desktop
+++ b/l10n/il/entry.desktop
@@ -93,21 +93,3 @@ Name[xh]=USirayeli
Name[x-test]=xxIsraelxx
Name[zh_CN]=以色列
Name[zh_TW]=以色列
-Region=middleeast
-Languages=he,ar
-#DecimalSymbol=
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-DateFormat[he]=%A, %e ב%B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e/%n/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#Civil calendar is Gregorian, religious is Hebrew
-#CalendarSystem=gregorian
-AddressFormat=%0(%n\n)%0(%cm\n)%0(ת.ד. %p\n)%0(%s\n)%0(%l%w%z)
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/im/entry.desktop b/l10n/im/entry.desktop
index b312d72b..827ecdae 100644
--- a/l10n/im/entry.desktop
+++ b/l10n/im/entry.desktop
@@ -64,13 +64,3 @@ Name[wa]=Iye di Man
Name[x-test]=xxIsle of Manxx
Name[zh_CN]=马恩岛
Name[zh_TW]=曼島
-Region=westeurope
-Languages=en_GB,gv
-DateFormat=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-PageSize=0
-MeasureSystem=0
-WeekStartDay=7
-DecimalPlaces=2
diff --git a/l10n/in/entry.desktop b/l10n/in/entry.desktop
index 4a844dc6..1919892f 100644
--- a/l10n/in/entry.desktop
+++ b/l10n/in/entry.desktop
@@ -92,12 +92,3 @@ Name[xh]=India
Name[x-test]=xxIndiaxx
Name[zh_CN]=印度
Name[zh_TW]=印度
-Region=southasia
-Languages=hi,bn,ta,en_GB
-DateFormat=%A %d %b %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/iq/entry.desktop b/l10n/iq/entry.desktop
index 6984e176..d591becf 100644
--- a/l10n/iq/entry.desktop
+++ b/l10n/iq/entry.desktop
@@ -92,9 +92,3 @@ Name[xh]=Iraq
Name[x-test]=xxIraqxx
Name[zh_CN]=伊拉克
Name[zh_TW]=伊拉克
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/ir/entry.desktop b/l10n/ir/entry.desktop
index c0922e0c..0b709582 100644
--- a/l10n/ir/entry.desktop
+++ b/l10n/ir/entry.desktop
@@ -91,17 +91,3 @@ Name[xh]=Iran
Name[x-test]=xxIranxx
Name[zh_CN]=伊朗
Name[zh_TW]=伊朗
-Region=middleeast
-Languages=
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[fa]=%A %e %B %Y
-DateFormatShort=%Y-%d-%m
-TimeFormat=%H:%M:%S
-MeasureSystem=0
-PageSize=0
-WeekStartDay=6
-#CalendarSystem=
-#DecimalPlaces=2
diff --git a/l10n/is/entry.desktop b/l10n/is/entry.desktop
index 8696cc66..ee824765 100644
--- a/l10n/is/entry.desktop
+++ b/l10n/is/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Iceland
Name[x-test]=xxIcelandxx
Name[zh_CN]=冰岛
Name[zh_TW]=冰島
-Region=northeurope
-Languages=is
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[is]=%A %e. %B %Y
-DateFormatShort=%d.%m.%y
-DateFormat[eo]=%A, la %ea de %B %Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/it/entry.desktop b/l10n/it/entry.desktop
index 05e46989..0ef6e4b6 100644
--- a/l10n/it/entry.desktop
+++ b/l10n/it/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Ithali
Name[x-test]=xxItalyxx
Name[zh_CN]=意大利
Name[zh_TW]=義大利
-Region=southeurope
-Languages=it,de
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[it]=%A %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e/%n/%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%S\n)%0(CASELLA POSTALE %p\n)%0(%z%w%L)%w%R
-AddressCountryPosition=BELOW
diff --git a/l10n/je/entry.desktop b/l10n/je/entry.desktop
index 6acebc58..e38a61f2 100644
--- a/l10n/je/entry.desktop
+++ b/l10n/je/entry.desktop
@@ -65,13 +65,3 @@ Name[wa]=Djerzey
Name[x-test]=xxJerseyxx
Name[zh_CN]=Jersey
Name[zh_TW]=Jersey
-Region=westeurope
-Languages=en_GB,fr
-DateFormat=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-PageSize=0
-MeasureSystem=0
-WeekStartDay=7
-DecimalPlaces=2
diff --git a/l10n/jm/entry.desktop b/l10n/jm/entry.desktop
index de48a421..11baa42c 100644
--- a/l10n/jm/entry.desktop
+++ b/l10n/jm/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Jamaica
Name[x-test]=xxJamaicaxx
Name[zh_CN]=牙买加
Name[zh_TW]=牙買加
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/jo/entry.desktop b/l10n/jo/entry.desktop
index 282193d4..b304b0b9 100644
--- a/l10n/jo/entry.desktop
+++ b/l10n/jo/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Jordan
Name[x-test]=xxJordanxx
Name[zh_CN]=约旦
Name[zh_TW]=約旦
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/jp/entry.desktop b/l10n/jp/entry.desktop
index 7705219d..33490c67 100644
--- a/l10n/jp/entry.desktop
+++ b/l10n/jp/entry.desktop
@@ -92,19 +92,3 @@ Name[xh]=Japan
Name[x-test]=xxJapanxx
Name[zh_CN]=日本
Name[zh_TW]=日本
-Region=eastasia
-Languages=ja
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[ja]=%Y年%B%e日 %A
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%Y-%m-%d
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%z%w%r)%w%l%0(\n%s)%0(\n%cm)%0(\n%n)
-AddressCountryPosition=ABOVE
-#DecimalPlaces=2
diff --git a/l10n/ke/entry.desktop b/l10n/ke/entry.desktop
index d3fc32c2..29e470de 100644
--- a/l10n/ke/entry.desktop
+++ b/l10n/ke/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Kenia
Name[x-test]=xxKenyaxx
Name[zh_CN]=肯尼亚
Name[zh_TW]=肯亞
-Region=eastafrica
-Languages=en_GB,sw,om,so
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-#DateFormat[??]=
-DateFormatShort=%n/%e/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/kg/entry.desktop b/l10n/kg/entry.desktop
index 5d6f8882..87a78e81 100644
--- a/l10n/kg/entry.desktop
+++ b/l10n/kg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Kirguiztan
Name[x-test]=xxKyrgyzstanxx
Name[zh_CN]=吉尔吉斯斯坦
Name[zh_TW]=吉爾吉斯
-Region=centralasia
-Languages=ru
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/kh/entry.desktop b/l10n/kh/entry.desktop
index b783546d..aa757512 100644
--- a/l10n/kh/entry.desktop
+++ b/l10n/kh/entry.desktop
@@ -91,18 +91,3 @@ Name[wa]=Cambodje
Name[x-test]=xxCambodiaxx
Name[zh_CN]=柬埔寨
Name[zh_TW]=柬埔寨
-Region=southeastasia
-Languages=km
-DecimalSymbol=,
-ThousandsSeparator=.
-#PositiveSign=
-#NegativeSign=-
-DateFormat[km]=%A ទី %d %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(P.O. Box %p\n)%z%w%L%0(\n%r)
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/ki/entry.desktop b/l10n/ki/entry.desktop
index e0ce3f3c..f6e44813 100644
--- a/l10n/ki/entry.desktop
+++ b/l10n/ki/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Kiribati
Name[x-test]=xxKiribatixx
Name[zh_CN]=基里巴斯
Name[zh_TW]=吉里巴斯
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/km/entry.desktop b/l10n/km/entry.desktop
index 78769003..77566159 100644
--- a/l10n/km/entry.desktop
+++ b/l10n/km/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Comores
Name[x-test]=xxComorosxx
Name[zh_CN]=科摩罗
Name[zh_TW]=葛摩
-Region=southafrica
-Languages=fr,ar
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/kn/entry.desktop b/l10n/kn/entry.desktop
index 29e8af00..5cc4ea26 100644
--- a/l10n/kn/entry.desktop
+++ b/l10n/kn/entry.desktop
@@ -90,16 +90,3 @@ Name[xh]=St. Kitts neNevis
Name[x-test]=xxSt. Kitts and Nevisxx
Name[zh_CN]=圣基茨和尼维斯
Name[zh_TW]=聖克理斯多福及尼維斯
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/kp/entry.desktop b/l10n/kp/entry.desktop
index 4afb8071..edf040dd 100644
--- a/l10n/kp/entry.desktop
+++ b/l10n/kp/entry.desktop
@@ -90,10 +90,3 @@ Name[xh]=Umntla Korea
Name[x-test]=xxNorth Koreaxx
Name[zh_CN]=朝鲜
Name[zh_TW]=北韓
-Region=eastasia
-Languages=ko
-DateFormat[ko]=%Y %B %e %A
-DateFormat[eo]=%A, la %ea de %B %Y
-#DateFormatShort=
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/kr/entry.desktop b/l10n/kr/entry.desktop
index 77e01f4a..01cf5237 100644
--- a/l10n/kr/entry.desktop
+++ b/l10n/kr/entry.desktop
@@ -90,13 +90,3 @@ Name[xh]=Umzantsi Korea
Name[x-test]=xxSouth Koreaxx
Name[zh_CN]=韩国
Name[zh_TW]=南韓
-Region=eastasia
-Languages=ko
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat=%Y년 %B %e일 %A
-DateFormatShort=%Y. %n. %e
-TimeFormat=%p %l:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/kw/entry.desktop b/l10n/kw/entry.desktop
index 5a5dec7c..4c2480e8 100644
--- a/l10n/kw/entry.desktop
+++ b/l10n/kw/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Kuwait
Name[x-test]=xxKuwaitxx
Name[zh_CN]=科威特
Name[zh_TW]=科威特
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/ky/entry.desktop b/l10n/ky/entry.desktop
index 2b274d51..75d35a8e 100644
--- a/l10n/ky/entry.desktop
+++ b/l10n/ky/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Cayman
Name[x-test]=xxCayman Islandsxx
Name[zh_CN]=开曼群岛
Name[zh_TW]=開曼群島
-Region=caribbean
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/kz/entry.desktop b/l10n/kz/entry.desktop
index 05068fb8..137b3608 100644
--- a/l10n/kz/entry.desktop
+++ b/l10n/kz/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Kazaxhtan
Name[x-test]=xxKazakhstanxx
Name[zh_CN]=哈萨克斯坦
Name[zh_TW]=哈薩克
-Region=centralasia
-Languages=kk,ru
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/la/entry.desktop b/l10n/la/entry.desktop
index 63df575c..4bdc9872 100644
--- a/l10n/la/entry.desktop
+++ b/l10n/la/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Lawosse
Name[x-test]=xxLaosxx
Name[zh_CN]=老挝
Name[zh_TW]=寮國
-Region=southeastasia
-Languages=fr,en
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/lb/entry.desktop b/l10n/lb/entry.desktop
index 712ff408..117c0835 100644
--- a/l10n/lb/entry.desktop
+++ b/l10n/lb/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Lebanon
Name[x-test]=xxLebanonxx
Name[zh_CN]=黎巴嫩
Name[zh_TW]=黎巴嫩
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/lc/entry.desktop b/l10n/lc/entry.desktop
index 415b0757..263c934f 100644
--- a/l10n/lc/entry.desktop
+++ b/l10n/lc/entry.desktop
@@ -91,16 +91,3 @@ Name[xh]=St. Lucia
Name[x-test]=xxSt. Luciaxx
Name[zh_CN]=圣卢西亚
Name[zh_TW]=聖露西亞
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/li/entry.desktop b/l10n/li/entry.desktop
index 85420257..98ca96e1 100644
--- a/l10n/li/entry.desktop
+++ b/l10n/li/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Lîchtensteyn
Name[x-test]=xxLiechtensteinxx
Name[zh_CN]=列支敦士登
Name[zh_TW]=列支敦斯登
-Region=centraleurope
-Languages=de
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/lk/entry.desktop b/l10n/lk/entry.desktop
index 221f4e49..486d1293 100644
--- a/l10n/lk/entry.desktop
+++ b/l10n/lk/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Sri Lanka
Name[x-test]=xxSri Lankaxx
Name[zh_CN]=斯里兰卡
Name[zh_TW]=斯里蘭卡
-Region=southasia
-Languages=ta,en_GB,en_US
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/lr/entry.desktop b/l10n/lr/entry.desktop
index 0729b0b2..c4f9e3ff 100644
--- a/l10n/lr/entry.desktop
+++ b/l10n/lr/entry.desktop
@@ -93,14 +93,3 @@ Name[zh_CN]=利比里亚
Name[zh_TW]=賴比瑞亞
Region=westafrica
Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ls/entry.desktop b/l10n/ls/entry.desktop
index c80ab433..05e2106f 100644
--- a/l10n/ls/entry.desktop
+++ b/l10n/ls/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Lessoto
Name[x-test]=xxLesothoxx
Name[zh_CN]=莱索托
Name[zh_TW]=賴索扥
-Region=southafrica
-Languages=en_GB,zu,xh,st
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/lt/entry.desktop b/l10n/lt/entry.desktop
index 6bed50ea..b576e928 100644
--- a/l10n/lt/entry.desktop
+++ b/l10n/lt/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Lithuania
Name[x-test]=xxLithuaniaxx
Name[zh_CN]=立陶宛
Name[zh_TW]=立陶宛
-Region=northeurope
-Languages=lt
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[lt]=%Y m. %B %e d., %A
-DateFormatShort=%Y-%m-%d
-TimeFormat=%H:%M:%S
-DateMonthNamePossessive=true
-#DecimalPlaces=2
diff --git a/l10n/lu/entry.desktop b/l10n/lu/entry.desktop
index d55d0667..3544e301 100644
--- a/l10n/lu/entry.desktop
+++ b/l10n/lu/entry.desktop
@@ -92,19 +92,3 @@ Name[xh]=Luxembourg
Name[x-test]=xxLuxembourgxx
Name[zh_CN]=卢森堡
Name[zh_TW]=盧森堡
-Region=westeurope
-Languages=de,fr
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[de]=%a %d %b %Y
-DateFormat[fr]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
-AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%z%w%L
-AddressFormat[fr]=%0(%n\n)%0(%cm\n)%0(BP %p\n)%0(%s\n)%z%w%L
-AddressFormat[de]=%0(%n\n)%0(%cm\n)%0(Postfach %p\n)%0(%s\n)%z%w%L
-AddressCountryPosition=BELOW
diff --git a/l10n/lv/entry.desktop b/l10n/lv/entry.desktop
index 31f25c92..02a07763 100644
--- a/l10n/lv/entry.desktop
+++ b/l10n/lv/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Latvia
Name[x-test]=xxLatviaxx
Name[zh_CN]=拉脱维亚
Name[zh_TW]=拉脫維亞
-Region=northeurope
-Languages=lv
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[lv]=%A, %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/ly/entry.desktop b/l10n/ly/entry.desktop
index 441ff159..988098a7 100644
--- a/l10n/ly/entry.desktop
+++ b/l10n/ly/entry.desktop
@@ -91,8 +91,3 @@ Name[xh]=Libya
Name[x-test]=xxLibyaxx
Name[zh_CN]=利比亚
Name[zh_TW]=利比亞
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/ma/entry.desktop b/l10n/ma/entry.desktop
index 6f57fd99..467e17e9 100644
--- a/l10n/ma/entry.desktop
+++ b/l10n/ma/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Morocco
Name[x-test]=xxMoroccoxx
Name[zh_CN]=摩洛哥
Name[zh_TW]=摩洛哥
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/mc/entry.desktop b/l10n/mc/entry.desktop
index 294db041..7c019741 100644
--- a/l10n/mc/entry.desktop
+++ b/l10n/mc/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Monaco
Name[x-test]=xxMonacoxx
Name[zh_CN]=摩纳哥
Name[zh_TW]=摩納哥
-Region=westeurope
-Languages=fr,en_GB,it
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/md/entry.desktop b/l10n/md/entry.desktop
index 559cce0f..d5e12ac4 100644
--- a/l10n/md/entry.desktop
+++ b/l10n/md/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Moldova
Name[x-test]=xxMoldovaxx
Name[zh_CN]=摩尔多瓦
Name[zh_TW]=摩爾多瓦
-Region=easteurope
-Languages=ro,ru
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/me/entry.desktop b/l10n/me/entry.desktop
index b10eb2bd..a72f7099 100644
--- a/l10n/me/entry.desktop
+++ b/l10n/me/entry.desktop
@@ -87,21 +87,3 @@ Name[wa]=Montenegro
Name[x-test]=xxMontenegroxx
Name[zh_CN]=塞尔维亚和黑山
Name[zh_TW]=蒙特內哥羅
-Region=southeurope
-Languages=sr
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat=%A %e. %B %Y.
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e.%m.%Y.
-TimeFormat=%k.%M:%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-CalendarSystem=gregorian
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(poštanski fah %p\n)%z%w%l
-AddressFormat[sr]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(поштански фах %p\n)%z%w%l
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/mf/entry.desktop b/l10n/mf/entry.desktop
index ff3cbccc..5faffa4f 100644
--- a/l10n/mf/entry.desktop
+++ b/l10n/mf/entry.desktop
@@ -66,18 +66,3 @@ Name[wa]=Sint Mårtén
Name[x-test]=xxSaint Martinxx
Name[zh_CN]=Saint Martin
Name[zh_TW]=法屬聖馬丁
-Region=caribbean
-Languages=fr,nl
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat=%A %e %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(BP %p\n)%z%w%L
-AddressCountryPosition=BELOW
-DecimalPlaces=2
diff --git a/l10n/mg/entry.desktop b/l10n/mg/entry.desktop
index 8d2556d8..e7a31e13 100644
--- a/l10n/mg/entry.desktop
+++ b/l10n/mg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Madagascar
Name[x-test]=xxMadagascarxx
Name[zh_CN]=马达加斯加
Name[zh_TW]=馬達加斯加
-Region=southafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mh/entry.desktop b/l10n/mh/entry.desktop
index b7d3150d..8b51f588 100644
--- a/l10n/mh/entry.desktop
+++ b/l10n/mh/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Marshall
Name[x-test]=xxMarshall Islandsxx
Name[zh_CN]=马绍群岛
Name[zh_TW]=馬紹爾群島
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mk/entry.desktop b/l10n/mk/entry.desktop
index 86d18fba..a28b7a31 100644
--- a/l10n/mk/entry.desktop
+++ b/l10n/mk/entry.desktop
@@ -93,13 +93,3 @@ Name[xh]=Macedonia
Name[x-test]=xxMacedoniaxx
Name[zh_CN]=马其顿
Name[zh_TW]=馬其頓
-Languages=mk
-Region=southeurope
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[mk]=%A %e. %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/ml/entry.desktop b/l10n/ml/entry.desktop
index 385cce94..aaceb884 100644
--- a/l10n/ml/entry.desktop
+++ b/l10n/ml/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Mali
Name[x-test]=xxMalixx
Name[zh_CN]=马里
Name[zh_TW]=馬利
-Region=westafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mm/entry.desktop b/l10n/mm/entry.desktop
index bb999df2..ebe76fd9 100644
--- a/l10n/mm/entry.desktop
+++ b/l10n/mm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Birmaneye
Name[x-test]=xxMyanmarxx
Name[zh_CN]=缅甸
Name[zh_TW]=緬甸
-Region=southeastasia
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mn/entry.desktop b/l10n/mn/entry.desktop
index bf716e75..37840e96 100644
--- a/l10n/mn/entry.desktop
+++ b/l10n/mn/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Mongoleye
Name[x-test]=xxMongoliaxx
Name[zh_CN]=蒙古
Name[zh_TW]=蒙古
-Region=eastasia
-Languages=mn
-#DecimalSymbol=,
-#ThousandsSeparator=.
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[mn]=%Y %B %e, %A
-#DateFormatShort=%Y/%m/%d
-#TimeFormat=%H:%M:%S
-#WeekStartDay=1
-#PageSize=0
-#MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/mo/entry.desktop b/l10n/mo/entry.desktop
index 6dd6b8c9..0a459940 100644
--- a/l10n/mo/entry.desktop
+++ b/l10n/mo/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Macawo
Name[x-test]=xxMacau SAR(China)xx
Name[zh_CN]=中国澳门特别行政区
Name[zh_TW]=澳門 SAR(中國)
-Region=eastasia
-Languages=pt_PT,zh_CN
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mp/entry.desktop b/l10n/mp/entry.desktop
index 1b2297d1..0779ac5f 100644
--- a/l10n/mp/entry.desktop
+++ b/l10n/mp/entry.desktop
@@ -66,18 +66,3 @@ Name[wa]=Iyes Mariana Bijhreces
Name[x-test]=xxNorthern Mariana Islandsxx
Name[zh_CN]=北马里亚纳群岛
Name[zh_TW]=北馬里亞納群島
-Region=oceania
-Languages=en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat=%A, %B %d, %Y
-DateFormatShort=%m/%d/%y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-PageSize=2
-MeasureSystem=1
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%l%,%w%r)%w%z
-AddressCountryPosition=BELOW
-DecimalPlaces=2
diff --git a/l10n/mq/entry.desktop b/l10n/mq/entry.desktop
index 0f1cf647..d16e5efd 100644
--- a/l10n/mq/entry.desktop
+++ b/l10n/mq/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Martinike
Name[x-test]=xxMartiniquexx
Name[zh_CN]=马提尼克
Name[zh_TW]=馬提尼克
-Region=caribbean
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mr/entry.desktop b/l10n/mr/entry.desktop
index bc275a29..b0596129 100644
--- a/l10n/mr/entry.desktop
+++ b/l10n/mr/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Moritanreye
Name[x-test]=xxMauritaniaxx
Name[zh_CN]=毛里塔尼亚
Name[zh_TW]=茅利塔尼亞
-Region=westafrica
-Languages=ar,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ms/entry.desktop b/l10n/ms/entry.desktop
index 173db905..1dd53790 100644
--- a/l10n/ms/entry.desktop
+++ b/l10n/ms/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Montserrat
Name[x-test]=xxMontserratxx
Name[zh_CN]=蒙特塞拉特
Name[zh_TW]=蒙的塞拉特
-Region=caribbean
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mt/entry.desktop b/l10n/mt/entry.desktop
index 8d4802ee..30088c79 100644
--- a/l10n/mt/entry.desktop
+++ b/l10n/mt/entry.desktop
@@ -93,16 +93,3 @@ Name[xh]=Malta
Name[x-test]=xxMaltaxx
Name[zh_CN]=马耳他
Name[zh_TW]=馬爾他
-Region=southeurope
-Languages=mt,en_GB,en
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[mt]=%A, %e ta' %B %Y
-DateFormat[en_GB]=%A %d %B %Y
-DateFormat[en]=%A %d %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-#DecimalPlaces=2
diff --git a/l10n/mu/entry.desktop b/l10n/mu/entry.desktop
index 6a9833c4..65f57855 100644
--- a/l10n/mu/entry.desktop
+++ b/l10n/mu/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Iye Môrice
Name[x-test]=xxMauritiusxx
Name[zh_CN]=毛里求斯
Name[zh_TW]=毛里求斯
-Region=southafrica
-Languages=en_GB,fr,hi
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mv/entry.desktop b/l10n/mv/entry.desktop
index 9eef1bba..006a08e2 100644
--- a/l10n/mv/entry.desktop
+++ b/l10n/mv/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Maldives
Name[x-test]=xxMaldivesxx
Name[zh_CN]=马尔代夫
Name[zh_TW]=馬爾地夫
-Region=southasia
-Languages=ar,hi,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mw/entry.desktop b/l10n/mw/entry.desktop
index eef5d4d4..c7e0ddba 100644
--- a/l10n/mw/entry.desktop
+++ b/l10n/mw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Malawi
Name[x-test]=xxMalawixx
Name[zh_CN]=马拉维
Name[zh_TW]=馬拉威
-Region=southafrica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mx/entry.desktop b/l10n/mx/entry.desktop
index 24683067..28583741 100644
--- a/l10n/mx/entry.desktop
+++ b/l10n/mx/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Mexico
Name[x-test]=xxMexicoxx
Name[zh_CN]=墨西哥
Name[zh_TW]=墨西哥
-Region=northamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/my/entry.desktop b/l10n/my/entry.desktop
index 41cbc75d..f54fbd02 100644
--- a/l10n/my/entry.desktop
+++ b/l10n/my/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Malaizeye
Name[x-test]=xxMalaysiaxx
Name[zh_CN]=马来西亚
Name[zh_TW]=馬來西亞
-Region=southeastasia
-Languages=my,zh_CN,ta,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/mz/entry.desktop b/l10n/mz/entry.desktop
index 917f4f8e..8ec17edf 100644
--- a/l10n/mz/entry.desktop
+++ b/l10n/mz/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Mozambike
Name[x-test]=xxMozambiquexx
Name[zh_CN]=莫桑比克
Name[zh_TW]=莫三比克
-Region=southafrica
-Languages=pt
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/na/entry.desktop b/l10n/na/entry.desktop
index 23615113..95811618 100644
--- a/l10n/na/entry.desktop
+++ b/l10n/na/entry.desktop
@@ -91,18 +91,3 @@ Name[wa]=Namibeye
Name[x-test]=xxNamibiaxx
Name[zh_CN]=利比里亚
Name[zh_TW]=那米比亞
-Region=southafrica
-Languages=af,de,en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat=%A %d %b %Y
-DateFormatShort=%d-%m-%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(P.O. Box %p\n)%l
-AddressCountrzPosition=below
-#DecimalPlaces=2
diff --git a/l10n/nc/entry.desktop b/l10n/nc/entry.desktop
index cd3dfb6f..2c380854 100644
--- a/l10n/nc/entry.desktop
+++ b/l10n/nc/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Nouve Caledonreye
Name[x-test]=xxNew Caledoniaxx
Name[zh_CN]=新喀里多尼亚
Name[zh_TW]=新喀里多尼亞
-Region=oceania
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ne/entry.desktop b/l10n/ne/entry.desktop
index 0a253924..68397372 100644
--- a/l10n/ne/entry.desktop
+++ b/l10n/ne/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Nidjer
Name[x-test]=xxNigerxx
Name[zh_CN]=尼日尔
Name[zh_TW]=尼日
-Region=westafrica
-Languages=fr,ar
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/nf/entry.desktop b/l10n/nf/entry.desktop
index 770deeac..3913f22a 100644
--- a/l10n/nf/entry.desktop
+++ b/l10n/nf/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Iye di Norfolk
Name[x-test]=xxNorfolk Islandxx
Name[zh_CN]=诺福克岛
Name[zh_TW]=諾福克島
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ng/entry.desktop b/l10n/ng/entry.desktop
index 35ee6aba..86d14845 100644
--- a/l10n/ng/entry.desktop
+++ b/l10n/ng/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Nidjeria
Name[x-test]=xxNigeriaxx
Name[zh_CN]=尼日利亚
Name[zh_TW]=奈及利亞
-Region=westafrica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ni/entry.desktop b/l10n/ni/entry.desktop
index 0d328631..8b4bf390 100644
--- a/l10n/ni/entry.desktop
+++ b/l10n/ni/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Nicaragua
Name[x-test]=xxNicaraguaxx
Name[zh_CN]=尼加拉瓜
Name[zh_TW]=尼加拉瓜
-Region=centralamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%A, %e de %B de %Y
-DateFormatShort=%d-%m-%y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=2
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/nl/README b/l10n/nl/README
deleted file mode 100644
index 28690009..00000000
--- a/l10n/nl/README
+++ /dev/null
@@ -1,30 +0,0 @@
-
- In case you'd want to know ...
-
- According to: 'Normblad NEN 3055. Kleuren voor textielgoederen.
- Vlaggekleuren. Rood en Blauw.,' the CIE XYZ values for the blue and
- the red are:
-
- CIE X Y Z
- --------------------
- Red: 18.3 10.0 3.0
- Blue: 7.5 6.6 25.3
-
- The red is "bright vermillion" while the blue is described as
- "a cobalt blue".
-
- When these are converted to RGB and scaled, one gets:
-
- RGB R G B
- --------------------
- Red: 228 8 12
- Blue: 5 30 141
-
- The information I used can be found on:
- 1. De Nederlandse Vlag,
- http://web.inter.nl.net/users/vanholstein/nic/vlag.htm
- 2. Charles Poynton's Color FAQ,
- http://www.inforamp.net/~poynton/ColorFAQ.html
-
- Geert Jansen,
- g.t.jansen@stud.tue.nl
diff --git a/l10n/nl/entry.desktop b/l10n/nl/entry.desktop
index 3848fd21..11e4f738 100644
--- a/l10n/nl/entry.desktop
+++ b/l10n/nl/entry.desktop
@@ -92,19 +92,3 @@ Name[xh]=Netherlands
Name[x-test]=xxNetherlandsxx
Name[zh_CN]=荷兰
Name[zh_TW]=荷蘭
-Region=westeurope
-Languages=nl
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[nl]=%A %e %B %Y
-DateFormatShort=%d/%m/%y
-DateFormat[eo]=%A, la %ea de %B %Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%n\n%0(%cm\n)%0(Postbus %p\n)%0(%s\n)%z%w%l
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/no/entry.desktop b/l10n/no/entry.desktop
index 4989d4b4..4a023093 100644
--- a/l10n/no/entry.desktop
+++ b/l10n/no/entry.desktop
@@ -93,25 +93,3 @@ Name[xh]=Norway
Name[x-test]=xxNorwayxx
Name[zh_CN]=挪威
Name[zh_TW]=挪威
-Region=northeurope
-Languages=nb,nn,se
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=−
-DateFormat=%A %e. %B %Y
-DateFormat[nb]=%A %e. %B %Y
-DateFormat[nn]=%A %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[se]=%A, %B %e. b. %Y
-DateFormatShort=%d.%m.%Y
-DateFormatShort[nb]=%d.%m.%Y
-DateFormatShort[nn]=%d.%m.%Y
-DateFormatShort[se]=%Y-%m-%d
-TimeFormat=%H.%M.%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%0(%cm\n)%0(%n\n)%0(Postboks %p\n)%0(%s\n)%z%w%w%L
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/np/entry.desktop b/l10n/np/entry.desktop
index 68455e02..a81d861e 100644
--- a/l10n/np/entry.desktop
+++ b/l10n/np/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Nepal
Name[x-test]=xxNepalxx
Name[zh_CN]=尼泊尔
Name[zh_TW]=尼泊爾
-Region=southasia
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/nr/entry.desktop b/l10n/nr/entry.desktop
index 9cf2ada5..4b465230 100644
--- a/l10n/nr/entry.desktop
+++ b/l10n/nr/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Nawouro
Name[x-test]=xxNauruxx
Name[zh_CN]=瑙鲁
Name[zh_TW]=諾魯
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/nu/entry.desktop b/l10n/nu/entry.desktop
index e71742a7..fc8c10ac 100644
--- a/l10n/nu/entry.desktop
+++ b/l10n/nu/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Niuwé
Name[x-test]=xxNiuexx
Name[zh_CN]=纽埃
Name[zh_TW]=紐鄂島
-Region=oceania
-Languages=es
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/nz/entry.desktop b/l10n/nz/entry.desktop
index f6b75fbb..fd045c5b 100644
--- a/l10n/nz/entry.desktop
+++ b/l10n/nz/entry.desktop
@@ -93,21 +93,3 @@ Name[xh]=New Zealand
Name[x-test]=xxNew Zealandxx
Name[zh_CN]=新西兰
Name[zh_TW]=紐西蘭
-Region=oceania
-Languages=en_GB,mi
-#DecimalSymbol=
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-DateFormat[en_GB]=%a, %d %b %Y
-DateFormat[en_US]=%a, %d %b %Y
-DateFormat[mi]=%a, %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
-AddressFormat=%0(%n\n)%0(%cm\n)%0(PO Box %p\n)%0(%s\n)%L%w%z
-AddressCountryPosition=BELOW
diff --git a/l10n/om/entry.desktop b/l10n/om/entry.desktop
index f5872d1f..26a75260 100644
--- a/l10n/om/entry.desktop
+++ b/l10n/om/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]= Oman
Name[x-test]=xxOmanxx
Name[zh_CN]=阿曼
Name[zh_TW]=阿曼
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/pa/entry.desktop b/l10n/pa/entry.desktop
index e58763a4..3f3271af 100644
--- a/l10n/pa/entry.desktop
+++ b/l10n/pa/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Panama
Name[x-test]=xxPanamaxx
Name[zh_CN]=巴拿马
Name[zh_TW]=巴拿馬
-Region=centralamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/pe/entry.desktop b/l10n/pe/entry.desktop
index 5c6c50fc..7ec68bcb 100644
--- a/l10n/pe/entry.desktop
+++ b/l10n/pe/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Peru
Name[x-test]=xxPeruxx
Name[zh_CN]=秘鲁
Name[zh_TW]=秘魯
-Region=southamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/pf/entry.desktop b/l10n/pf/entry.desktop
index ade0425e..6aaceccd 100644
--- a/l10n/pf/entry.desktop
+++ b/l10n/pf/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Polinezeye francesse
Name[x-test]=xxFrench Polynesiaxx
Name[zh_CN]=法属波利尼西亚
Name[zh_TW]=法屬波利尼西亞
-Region=oceania
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/pg/entry.desktop b/l10n/pg/entry.desktop
index 8cfa24e0..bc767a67 100644
--- a/l10n/pg/entry.desktop
+++ b/l10n/pg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Papouwazeye Nouve Guinêye
Name[x-test]=xxPapua New Guineaxx
Name[zh_CN]=巴布亚新几内亚
Name[zh_TW]=巴布紐幾內亞
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ph/entry.desktop b/l10n/ph/entry.desktop
index 0570aed6..7e848ec4 100644
--- a/l10n/ph/entry.desktop
+++ b/l10n/ph/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Filipenes
Name[x-test]=xxPhilippinesxx
Name[zh_CN]=菲律宾
Name[zh_TW]=菲律賓
-Region=southeastasia
-Languages=en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%A, %B %e, %Y
-DateFormatShort=%n/%e/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/pk/entry.desktop b/l10n/pk/entry.desktop
index c7c8815d..01b8c3db 100644
--- a/l10n/pk/entry.desktop
+++ b/l10n/pk/entry.desktop
@@ -91,11 +91,3 @@ Name[wa]=Pakistan
Name[x-test]=xxPakistanxx
Name[zh_CN]=巴基斯坦
Name[zh_TW]=巴基斯坦
-Region=southasia
-Languages=ur,en,en_GB,en_US
-DateFormat=%A %d %b %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%l:%M:%S %p
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/pl/entry.desktop b/l10n/pl/entry.desktop
index 2c39d5ed..3eecf7d7 100644
--- a/l10n/pl/entry.desktop
+++ b/l10n/pl/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Poland
Name[x-test]=xxPolandxx
Name[zh_CN]=波兰
Name[zh_TW]=波蘭
-Region=centraleurope
-Languages=pl
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[pl]=%A, %e %B %Y
-DateFormatShort=%d/%m/%Y
-DateFormat[eo]=%A, la %ea de %B %Y
-TimeFormat=%H:%M:%S
-DateMonthNamePossessive=true
-#DecimalPlaces=2
diff --git a/l10n/pm/entry.desktop b/l10n/pm/entry.desktop
index fa3b3594..7a32653a 100644
--- a/l10n/pm/entry.desktop
+++ b/l10n/pm/entry.desktop
@@ -89,17 +89,3 @@ Name[wa]=Sint Pire et Miquelon
Name[x-test]=xxSaint Pierre and Miquelonxx
Name[zh_CN]=圣皮埃尔和密克隆
Name[zh_TW]=聖皮埃爾島及密克隆島
-Region=northamerica
-Languages=es,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
-#DecimalPlaces=2
diff --git a/l10n/pn/entry.desktop b/l10n/pn/entry.desktop
index 2363ad7d..60badc4e 100644
--- a/l10n/pn/entry.desktop
+++ b/l10n/pn/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Pitcairn
Name[x-test]=xxPitcairnxx
Name[zh_CN]=皮特开恩
Name[zh_TW]=匹特開恩島
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/pr/entry.desktop b/l10n/pr/entry.desktop
index 24e6ca5e..214c185d 100644
--- a/l10n/pr/entry.desktop
+++ b/l10n/pr/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Porto Rico
Name[x-test]=xxPuerto Ricoxx
Name[zh_CN]=波多黎各
Name[zh_TW]=波多黎各
-Region=caribbean
-Languages=es,en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%A %e de %B de %Y
-DateFormatShort=%m/%d/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=1
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ps/entry.desktop b/l10n/ps/entry.desktop
index e6514701..cb5280ac 100644
--- a/l10n/ps/entry.desktop
+++ b/l10n/ps/entry.desktop
@@ -89,15 +89,3 @@ Name[xh]=Umhlaba wePalestina
Name[x-test]=xxPalestinian Territoryxx
Name[zh_CN]=巴勒斯坦地区
Name[zh_TW]=巴勒斯坦領地
-Region=middleeast
-Languages=ar
-ThousandsSeparator=.
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-DateFormatShort=%y/%m/%d
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/pt/entry.desktop b/l10n/pt/entry.desktop
index cbf4145b..fdb37657 100644
--- a/l10n/pt/entry.desktop
+++ b/l10n/pt/entry.desktop
@@ -93,17 +93,3 @@ Name[xh]=Portugal
Name[x-test]=xxPortugalxx
Name[zh_CN]=葡萄牙
Name[zh_TW]=葡萄牙
-Region=westeurope
-Languages=pt
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-TimeFormat=%H:%M:%S
-DateFormat[pt]=%A, %e de %B de %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%Y-%m-%d
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/pw/entry.desktop b/l10n/pw/entry.desktop
index 6bb2a875..a0d2dada 100644
--- a/l10n/pw/entry.desktop
+++ b/l10n/pw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Palawou
Name[x-test]=xxPalauxx
Name[zh_CN]=帕劳
Name[zh_TW]=帛琉
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/py/entry.desktop b/l10n/py/entry.desktop
index 61932165..5d0f1fa6 100644
--- a/l10n/py/entry.desktop
+++ b/l10n/py/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Paraguay
Name[x-test]=xxParaguayxx
Name[zh_CN]=巴拉圭
Name[zh_TW]=巴拉圭
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/qa/entry.desktop b/l10n/qa/entry.desktop
index b7cc949e..818518b4 100644
--- a/l10n/qa/entry.desktop
+++ b/l10n/qa/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Qatar
Name[x-test]=xxQatarxx
Name[zh_CN]=卡塔尔
Name[zh_TW]=卡達
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/re/entry.desktop b/l10n/re/entry.desktop
index 2c97bf32..b829385e 100644
--- a/l10n/re/entry.desktop
+++ b/l10n/re/entry.desktop
@@ -69,17 +69,3 @@ Name[wa]=Reyunion
Name[x-test]=xxRéunionxx
Name[zh_CN]=留尼汪
Name[zh_TW]=留尼旺群島
-
-Region=southafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ro/entry.desktop b/l10n/ro/entry.desktop
index 872c25f1..22232fa9 100644
--- a/l10n/ro/entry.desktop
+++ b/l10n/ro/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Romania
Name[x-test]=xxRomaniaxx
Name[zh_CN]=罗马尼亚
Name[zh_TW]=羅馬尼亞
-Region=easteurope
-Languages=ro
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[ro]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d %m %Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/rs/entry.desktop b/l10n/rs/entry.desktop
index 92b8bb73..e7894eb0 100644
--- a/l10n/rs/entry.desktop
+++ b/l10n/rs/entry.desktop
@@ -86,21 +86,3 @@ Name[wa]=Serbeye
Name[x-test]=xxSerbiaxx
Name[zh_CN]=塞尔维亚
Name[zh_TW]=塞爾維亞
-Region=southeurope
-Languages=sr
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat=%A, %e. %B %Y.
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%e. %n. %Y.
-TimeFormat=%k.%M.%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-CalendarSystem=gregorian
-AddressFormat=%0(%cm\n)%0(%n\n)%0(%s\n)%0(поштански фах %p\n)%z%w%l
-AddressFormat[sr@latin]=%0(%cm\n)%0(%n\n)%0(%s\n)%0(poštanski fah %p\n)%z%w%l
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/ru/entry.desktop b/l10n/ru/entry.desktop
index f05e6259..ae5e010a 100644
--- a/l10n/ru/entry.desktop
+++ b/l10n/ru/entry.desktop
@@ -93,17 +93,3 @@ Name[xh]=Rashiya
Name[x-test]=xxRussiaxx
Name[zh_CN]=俄罗斯
Name[zh_TW]=俄羅斯
-Region=easteurope
-Languages=ru
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[ru]=%e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%y
-TimeFormat=%H:%M:%S
-#WeekStartDay=
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/rw/entry.desktop b/l10n/rw/entry.desktop
index 58ce1252..9ea5c8e9 100644
--- a/l10n/rw/entry.desktop
+++ b/l10n/rw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Rwanda
Name[x-test]=xxRwandaxx
Name[zh_CN]=卢旺达
Name[zh_TW]=盧安達
-Region=centralafrica
-Languages=fr,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/sa/entry.desktop b/l10n/sa/entry.desktop
index dcdd7f13..5070e522 100644
--- a/l10n/sa/entry.desktop
+++ b/l10n/sa/entry.desktop
@@ -91,9 +91,3 @@ Name[xh]=Saudi Arabia
Name[x-test]=xxSaudi Arabiaxx
Name[zh_CN]=沙特阿拉伯
Name[zh_TW]=沙烏地阿拉伯
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#CalendarSystem=
-#DecimalPlaces=2
diff --git a/l10n/sb/entry.desktop b/l10n/sb/entry.desktop
index abdf6aec..d71a80f3 100644
--- a/l10n/sb/entry.desktop
+++ b/l10n/sb/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Salomon
Name[x-test]=xxSolomon Islandsxx
Name[zh_CN]=所罗门群岛
Name[zh_TW]=索羅門群島
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/sc/entry.desktop b/l10n/sc/entry.desktop
index 76d7980d..201b92fc 100644
--- a/l10n/sc/entry.desktop
+++ b/l10n/sc/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Seycheles
Name[x-test]=xxSeychellesxx
Name[zh_CN]=塞舌尔
Name[zh_TW]=塞席爾
-Region=southafrica
-Languages=en_GB,fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/sd/entry.desktop b/l10n/sd/entry.desktop
index 8b21fe65..eb056084 100644
--- a/l10n/sd/entry.desktop
+++ b/l10n/sd/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Sudan
Name[x-test]=xxSudanxx
Name[zh_CN]=苏丹
Name[zh_TW]=蘇丹
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/se/entry.desktop b/l10n/se/entry.desktop
index 524a1b23..840bb33f 100644
--- a/l10n/se/entry.desktop
+++ b/l10n/se/entry.desktop
@@ -92,20 +92,3 @@ Name[xh]=Sweden
Name[x-test]=xxSwedenxx
Name[zh_CN]=瑞典
Name[zh_TW]=瑞典
-Region=northeurope
-Languages=sv,se
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[sv]=%Aen den %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormat[se]=%A, %B %e. b. %Y
-DateFormatShort=%Y-%m-%d
-TimeFormat=%H.%M.%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-AddressFormat=%n\n%0(%cm\n)%0(Box %p\n)%0(%s\n)%z%w%w%L
-AddressCountryPosition=below
-#DecimalPlaces=2
diff --git a/l10n/sg/entry.desktop b/l10n/sg/entry.desktop
index c5d4d156..9655539e 100644
--- a/l10n/sg/entry.desktop
+++ b/l10n/sg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Singapour
Name[x-test]=xxSingaporexx
Name[zh_CN]=新加坡
Name[zh_TW]=新加坡
-Region=southeastasia
-Languages=ms,zh_CN,ta,en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat=%d %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%p %l:%M:%S
-WeekStartDay=7
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/sh/entry.desktop b/l10n/sh/entry.desktop
index 6090d556..03f37e04 100644
--- a/l10n/sh/entry.desktop
+++ b/l10n/sh/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Sint Elene
Name[x-test]=xxSaint Helenaxx
Name[zh_CN]=圣赫勒拿
Name[zh_TW]=聖赫勒拿島
-Region=southamerica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/si/entry.desktop b/l10n/si/entry.desktop
index 6cf5cdc8..e23476b4 100644
--- a/l10n/si/entry.desktop
+++ b/l10n/si/entry.desktop
@@ -1,4 +1,5 @@
[KCM Locale]
+Author=lugos-slo@lugos.si
Name=Slovenia
Name[af]=Slovenië
Name[ar]=سلوفينيا
@@ -92,17 +93,3 @@ Name[xh]=Slovenia
Name[x-test]=xxSloveniaxx
Name[zh_CN]=斯洛文尼亚
Name[zh_TW]=斯洛維尼亞
-Author=lugos-slo@lugos.si
-Region=centraleurope
-Languages=sl
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=−
-DateFormat[sl]=%A, %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d. %m. %y
-TimeFormat=%H:%M:%S
-DateMonthNamePossessive=true
-#DecimalPlaces=2
-AddressFormat=%n\n%s\n%0(p.p. %p\n)%z %l
diff --git a/l10n/sk/entry.desktop b/l10n/sk/entry.desktop
index 21690332..68625f92 100644
--- a/l10n/sk/entry.desktop
+++ b/l10n/sk/entry.desktop
@@ -92,15 +92,3 @@ Name[xh]=Slovakia
Name[x-test]=xxSlovakiaxx
Name[zh_CN]=斯洛伐克
Name[zh_TW]=斯洛伐克
-Region=centraleurope
-Languages=sk
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[sk]=%a %e. %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-#DecimalPlaces=2
diff --git a/l10n/sl/entry.desktop b/l10n/sl/entry.desktop
index 739bb879..a27edccc 100644
--- a/l10n/sl/entry.desktop
+++ b/l10n/sl/entry.desktop
@@ -79,12 +79,3 @@ Name[wa]=Siera Leyone
Name[x-test]=xxSierra Leonexx
Name[zh_CN]=塞拉利昂
Name[zh_TW]=Sierra Leone(獅子山)
-Region=westafrica
-Languages=en_GB,en
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[en]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-PageSize=0
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/sm/entry.desktop b/l10n/sm/entry.desktop
index c78464ea..8a5c8f4c 100644
--- a/l10n/sm/entry.desktop
+++ b/l10n/sm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Sint Marin
Name[x-test]=xxSan Marinoxx
Name[zh_CN]=圣马力诺
Name[zh_TW]=聖馬力諾
-Region=southeurope
-Languages=it
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/so/entry.desktop b/l10n/so/entry.desktop
index 0262ba6e..e5596828 100644
--- a/l10n/so/entry.desktop
+++ b/l10n/so/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Somalia
Name[x-test]=xxSomaliaxx
Name[zh_CN]=索马里
Name[zh_TW]=索馬利亞
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/sr/entry.desktop b/l10n/sr/entry.desktop
index bf7f6652..66dd04cf 100644
--- a/l10n/sr/entry.desktop
+++ b/l10n/sr/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Suriname
Name[x-test]=xxSurinamexx
Name[zh_CN]=苏里南
Name[zh_TW]=蘇利南
-Region=southamerica
-Languages=nl,en_GB
-#DecimalSymbol=
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ss/entry.desktop b/l10n/ss/entry.desktop
index 091bd4a4..9af39e5e 100644
--- a/l10n/ss/entry.desktop
+++ b/l10n/ss/entry.desktop
@@ -1,4 +1,5 @@
[KCM Locale]
+Author=John Layt
Name=South Sudan
Name[ar]=جنوب السودان
Name[ast]=Sur de Sudán
@@ -63,6 +64,3 @@ Name[wa]=Soudan Nonnrece
Name[x-test]=xxSouth Sudanxx
Name[zh_CN]=南苏丹
Name[zh_TW]=南蘇丹
-Region=eastafrica
-Languages=en_US
-Author=John Layt
diff --git a/l10n/st/entry.desktop b/l10n/st/entry.desktop
index 1d2c9190..936e19db 100644
--- a/l10n/st/entry.desktop
+++ b/l10n/st/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=São Tomé et Prince
Name[x-test]=xxSao Tome and Principexx
Name[zh_CN]=圣多美和普林西比
Name[zh_TW]=聖多美及普林西比
-Region=centralafrica
-Languages=pt
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/sv/entry.desktop b/l10n/sv/entry.desktop
index 6191a53d..5e4d8ce4 100644
--- a/l10n/sv/entry.desktop
+++ b/l10n/sv/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=El Salvador
Name[x-test]=xxEl Salvadorxx
Name[zh_CN]=萨尔瓦多
Name[zh_TW]=薩爾瓦多
-Region=centralamerica
-Languages=es
-DecimalSymbol=.
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/sy/entry.desktop b/l10n/sy/entry.desktop
index b49d8415..0ba6e1c9 100644
--- a/l10n/sy/entry.desktop
+++ b/l10n/sy/entry.desktop
@@ -91,8 +91,3 @@ Name[xh]=Syria
Name[x-test]=xxSyriaxx
Name[zh_CN]=叙利亚
Name[zh_TW]=敘利亞
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/sz/entry.desktop b/l10n/sz/entry.desktop
index bb98d772..7defe038 100644
--- a/l10n/sz/entry.desktop
+++ b/l10n/sz/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Suwazilande
Name[x-test]=xxSwazilandxx
Name[zh_CN]=斯威士兰
Name[zh_TW]=史瓦濟蘭
-Region=southafrica
-Languages=en_GB,ss
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tc/entry.desktop b/l10n/tc/entry.desktop
index 0e99dc8a..b6e6a094 100644
--- a/l10n/tc/entry.desktop
+++ b/l10n/tc/entry.desktop
@@ -88,16 +88,3 @@ Name[wa]=Iyes Turks et Caicos
Name[x-test]=xxTurks and Caicos Islandsxx
Name[zh_CN]=特克斯和凯科斯群岛
Name[zh_TW]=土克斯和開卡斯群島
-Region=caribbean
-Languages=ar,en_GB,hi
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/td/entry.desktop b/l10n/td/entry.desktop
index 203750be..2839e79f 100644
--- a/l10n/td/entry.desktop
+++ b/l10n/td/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Tchad
Name[x-test]=xxChadxx
Name[zh_CN]=乍得
Name[zh_TW]=查德
-Region=centralafrica
-Languages=fr,ar
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tg/entry.desktop b/l10n/tg/entry.desktop
index db6c3f33..320c2301 100644
--- a/l10n/tg/entry.desktop
+++ b/l10n/tg/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Togo
Name[x-test]=xxTogoxx
Name[zh_CN]=多哥
Name[zh_TW]=多哥
-Region=westafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/th/entry.desktop b/l10n/th/entry.desktop
index e802c34d..017aca04 100644
--- a/l10n/th/entry.desktop
+++ b/l10n/th/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Thailand
Name[x-test]=xxThailandxx
Name[zh_CN]=泰国
Name[zh_TW]=泰國
-Region=southeastasia
-Languages=th
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[th]=%a %e %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/tj/entry.desktop b/l10n/tj/entry.desktop
index 941748b6..f9e36520 100644
--- a/l10n/tj/entry.desktop
+++ b/l10n/tj/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Tadjikistan
Name[x-test]=xxTajikistanxx
Name[zh_CN]=塔吉克斯坦
Name[zh_TW]=塔吉克
-Region=centralasia
-Languages=tg
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tk/entry.desktop b/l10n/tk/entry.desktop
index 678bb0c1..f2ccc3f8 100644
--- a/l10n/tk/entry.desktop
+++ b/l10n/tk/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Tokelau
Name[x-test]=xxTokelauxx
Name[zh_CN]=托克劳
Name[zh_TW]=托克勞
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tl/entry.desktop b/l10n/tl/entry.desktop
index 76a75ac5..77ad0e27 100644
--- a/l10n/tl/entry.desktop
+++ b/l10n/tl/entry.desktop
@@ -79,16 +79,3 @@ Name[wa]=Timor Ess
Name[x-test]=xxTimor-Lestexx
Name[zh_CN]=东帝汶
Name[zh_TW]=Timor-Leste
-Region=southeastasia
-Languages=pt,en_GB,id
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tm/entry.desktop b/l10n/tm/entry.desktop
index 58e56d5c..e322c493 100644
--- a/l10n/tm/entry.desktop
+++ b/l10n/tm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Turcmenistan
Name[x-test]=xxTurkmenistanxx
Name[zh_CN]=土库曼斯坦
Name[zh_TW]=土庫曼
-Region=centralasia
-Languages=ru
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tn/entry.desktop b/l10n/tn/entry.desktop
index 5a654a45..7c1cc397 100644
--- a/l10n/tn/entry.desktop
+++ b/l10n/tn/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Tunisia
Name[x-test]=xxTunisiaxx
Name[zh_CN]=突尼斯
Name[zh_TW]=突尼西亞
-Region=northafrica
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/to/entry.desktop b/l10n/to/entry.desktop
index 0567062b..6e20c196 100644
--- a/l10n/to/entry.desktop
+++ b/l10n/to/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Tonga
Name[x-test]=xxTongaxx
Name[zh_CN]=汤加
Name[zh_TW]=東加
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tp/entry.desktop b/l10n/tp/entry.desktop
index d69480fd..93f4b83f 100644
--- a/l10n/tp/entry.desktop
+++ b/l10n/tp/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Timor Ess
Name[x-test]=xxEast Timorxx
Name[zh_CN]=东帝汶
Name[zh_TW]=東帝汶
-Region=southeastasia
-Languages=pt,en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tr/entry.desktop b/l10n/tr/entry.desktop
index ef6f207a..18071d1d 100644
--- a/l10n/tr/entry.desktop
+++ b/l10n/tr/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Turkey
Name[x-test]=xxTurkeyxx
Name[zh_CN]=土耳其
Name[zh_TW]=土耳其
-Region=southeurope
-Languages=tr
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[tr]=%d %B %Y %A
-DateFormat[eo]=%A,la %ea de %B %Y
-DateFormatShort=%d-%m-%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/tt/entry.desktop b/l10n/tt/entry.desktop
index a6c937d8..bda23f28 100644
--- a/l10n/tt/entry.desktop
+++ b/l10n/tt/entry.desktop
@@ -92,16 +92,3 @@ Name[xh]=Trinidad ne Tobago
Name[x-test]=xxTrinidad and Tobagoxx
Name[zh_CN]=特立尼达和多巴哥
Name[zh_TW]=千里達及托貝哥
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/tv/entry.desktop b/l10n/tv/entry.desktop
index e873c822..b585cad3 100644
--- a/l10n/tv/entry.desktop
+++ b/l10n/tv/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Touvalou
Name[x-test]=xxTuvaluxx
Name[zh_CN]=图瓦卢
Name[zh_TW]=吐瓦魯
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/tw/entry.desktop b/l10n/tw/entry.desktop
index 281b1f32..97d11e21 100644
--- a/l10n/tw/entry.desktop
+++ b/l10n/tw/entry.desktop
@@ -93,9 +93,3 @@ Name[xh]=Taiwan
Name[x-test]=xxTaiwanxx
Name[zh_CN]=中国台湾
Name[zh_TW]=台灣
-Region=eastasia
-Languages=zh_TW
-DateFormat[zh_TW]=%Y %B %e %A
-DateFormat[eo]=%A, la %ea de %B %Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/tz/entry.desktop b/l10n/tz/entry.desktop
index a2cc4fab..3ca0fbba 100644
--- a/l10n/tz/entry.desktop
+++ b/l10n/tz/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Tanzaneye
Name[x-test]=xxTanzania, United Republic ofxx
Name[zh_CN]=坦桑尼亚联合共和国
Name[zh_TW]=坦尚尼亞
-Region=eastafrica
-Languages=en_GB,sw
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-#DateFormat[??]=
-DateFormatShort=%n/%e/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ua/entry.desktop b/l10n/ua/entry.desktop
index 992518e6..7e60df3f 100644
--- a/l10n/ua/entry.desktop
+++ b/l10n/ua/entry.desktop
@@ -93,18 +93,3 @@ Name[xh]=Ukraine
Name[x-test]=xxUkrainexx
Name[zh_CN]=乌克兰
Name[zh_TW]=烏克蘭
-Region=easteurope
-Languages=uk
-DecimalSymbol=,
-ThousandsSeparator=$0 $0
-PositiveSign=
-NegativeSign=-
-DateFormat[uk]=%A, %d-%b-%Y
-DateFormat[ru]=%A, %d-%b-%Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-#DecimalPlaces=2
diff --git a/l10n/ug/entry.desktop b/l10n/ug/entry.desktop
index 463d1bb8..b4ef1804 100644
--- a/l10n/ug/entry.desktop
+++ b/l10n/ug/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Ouganda
Name[x-test]=xxUgandaxx
Name[zh_CN]=乌干达
Name[zh_TW]=烏干達
-Region=eastafrica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/us/entry.desktop b/l10n/us/entry.desktop
index 82518121..46d16a3d 100644
--- a/l10n/us/entry.desktop
+++ b/l10n/us/entry.desktop
@@ -92,20 +92,3 @@ Name[xh]=United States ye Melika
Name[x-test]=xxUnited States of Americaxx
Name[zh_CN]=美国
Name[zh_TW]=美利堅合眾國
-Region=northamerica
-Languages=en_US,es
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat=%A, %B %d, %Y
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%m/%d/%y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-PageSize=2
-MeasureSystem=1
-AddressFormat=%0(%n\n)%0(%cm\n)%0(%s\n)%0(PO BOX %p\n)%0(%l%,%w%r)%w%z
-AddressCountryPosition=BELOW
-#DecimalPlaces=2
diff --git a/l10n/uy/entry.desktop b/l10n/uy/entry.desktop
index 93b3ebcd..3972ac04 100644
--- a/l10n/uy/entry.desktop
+++ b/l10n/uy/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Uruguay
Name[x-test]=xxUruguayxx
Name[zh_CN]=乌拉圭
Name[zh_TW]=烏拉圭
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/uz/entry.desktop b/l10n/uz/entry.desktop
index ea5671a4..813e2da7 100644
--- a/l10n/uz/entry.desktop
+++ b/l10n/uz/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Ouzbekistan
Name[x-test]=xxUzbekistanxx
Name[zh_CN]=乌兹别克斯坦
Name[zh_TW]=烏茲別克
-Region=centralasia
-Languages=uz
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[uz]=%A %B %e %Y
-DateFormatShort=%d.%m.%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-PageSize=0
-MeasureSystem=0
-#DecimalPlaces=2
diff --git a/l10n/va/entry.desktop b/l10n/va/entry.desktop
index 3d7602e9..91721335 100644
--- a/l10n/va/entry.desktop
+++ b/l10n/va/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Vatican
Name[x-test]=xxVatican Cityxx
Name[zh_CN]=梵蒂冈
Name[zh_TW]=梵諦岡城
-Region=southeurope
-Languages=it
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/vc/entry.desktop b/l10n/vc/entry.desktop
index c6628af0..92f5e1aa 100644
--- a/l10n/vc/entry.desktop
+++ b/l10n/vc/entry.desktop
@@ -91,16 +91,3 @@ Name[xh]=St. Vincent ne Grenadines
Name[x-test]=xxSt. Vincent and the Grenadinesxx
Name[zh_CN]=圣文森特和格林纳丁斯
Name[zh_TW]=聖文森及格納那丁
-Region=caribbean
-Languages=en_GB,en_US
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_US]=%A %d %b %Y
-DateFormat[en_GB]=%A %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%I:%M:%S %p
-WeekStartDay=7
-#DecimalPlaces=2
diff --git a/l10n/ve/entry.desktop b/l10n/ve/entry.desktop
index c257381c..9ae2e574 100644
--- a/l10n/ve/entry.desktop
+++ b/l10n/ve/entry.desktop
@@ -92,14 +92,3 @@ Name[xh]=Venezuela
Name[x-test]=xxVenezuelaxx
Name[zh_CN]=委内瑞拉
Name[zh_TW]=委內瑞拉
-Region=southamerica
-Languages=es
-DecimalSymbol=,
-ThousandsSeparator=
-PositiveSign=
-NegativeSign=-
-DateFormat[es]=%a %d %b %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/vg/entry.desktop b/l10n/vg/entry.desktop
index 96d0e994..63a857bd 100644
--- a/l10n/vg/entry.desktop
+++ b/l10n/vg/entry.desktop
@@ -89,16 +89,3 @@ Name[wa]=Iyes Viedjes, britanikes
Name[x-test]=xxVirgin Islands, Britishxx
Name[zh_CN]=英属维京群岛
Name[zh_TW]=英屬維爾京群島
-Region=caribbean
-#Languages=
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/vi/entry.desktop b/l10n/vi/entry.desktop
index 3324641b..32e74980 100644
--- a/l10n/vi/entry.desktop
+++ b/l10n/vi/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Iyes Viedjes, etazunyinnes
Name[x-test]=xxVirgin Islands, U.S.xx
Name[zh_CN]=美属维京群岛
Name[zh_TW]=美屬維爾京群島
-Region=caribbean
-Languages=en_GB
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-DecimalPlaces=2
-DateFormat[en_US]=%A, %B %n, %Y
-DateFormatShort=%n/%e/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/vn/entry.desktop b/l10n/vn/entry.desktop
index 8769576e..29d31f95 100644
--- a/l10n/vn/entry.desktop
+++ b/l10n/vn/entry.desktop
@@ -92,13 +92,3 @@ Name[xh]=Vietnam
Name[x-test]=xxVietnamxx
Name[zh_CN]=越南
Name[zh_TW]=越南
-Region=southeastasia
-Languages=vi
-DecimalSymbol=,
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[vi]=%A %d %n %Y
-DateFormatShort=%d.%n.%Y
-TimeFormat=%H:%M:%S
-#DecimalPlaces=2
diff --git a/l10n/vu/entry.desktop b/l10n/vu/entry.desktop
index 2decc465..1a1d42a8 100644
--- a/l10n/vu/entry.desktop
+++ b/l10n/vu/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Vanuatu
Name[x-test]=xxVanuatuxx
Name[zh_CN]=瓦努阿图
Name[zh_TW]=萬那杜
-Region=oceania
-Languages=en_GB,fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/wf/entry.desktop b/l10n/wf/entry.desktop
index 9d9e3794..e2889111 100644
--- a/l10n/wf/entry.desktop
+++ b/l10n/wf/entry.desktop
@@ -90,16 +90,3 @@ Name[wa]=Wallis et Futuna
Name[x-test]=xxWallis and Futunaxx
Name[zh_CN]=瓦利斯和富图纳群岛
Name[zh_TW]=瓦利斯群島和富圖納群島
-Region=oceania
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ws/entry.desktop b/l10n/ws/entry.desktop
index 52ab96f4..c9ed943b 100644
--- a/l10n/ws/entry.desktop
+++ b/l10n/ws/entry.desktop
@@ -92,16 +92,3 @@ Name[wa]=Samowa
Name[x-test]=xxSamoaxx
Name[zh_CN]=萨摩亚群岛
Name[zh_TW]=薩摩亞
-Region=oceania
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/ye/entry.desktop b/l10n/ye/entry.desktop
index 8260a3fe..9c44c934 100644
--- a/l10n/ye/entry.desktop
+++ b/l10n/ye/entry.desktop
@@ -92,8 +92,3 @@ Name[xh]=Yemen
Name[x-test]=xxYemenxx
Name[zh_CN]=也门
Name[zh_TW]=葉門
-Region=middleeast
-Languages=ar
-DecimalSymbol=,
-DateFormatShort=%y/%m/%d
-#DecimalPlaces=2
diff --git a/l10n/yt/entry.desktop b/l10n/yt/entry.desktop
index 87b64c5f..702edc43 100644
--- a/l10n/yt/entry.desktop
+++ b/l10n/yt/entry.desktop
@@ -70,17 +70,3 @@ Name[wa]=Mayote
Name[x-test]=xxMayottexx
Name[zh_CN]=马约特
Name[zh_TW]=美亞特
-
-Region=southafrica
-Languages=fr
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/za/entry.desktop b/l10n/za/entry.desktop
index 803f9c75..60a14c26 100644
--- a/l10n/za/entry.desktop
+++ b/l10n/za/entry.desktop
@@ -93,19 +93,3 @@ Name[xh]=Mzantsi Afrika
Name[x-test]=xxSouth Africaxx
Name[zh_CN]=南非
Name[zh_TW]=南非
-Region=southafrica
-Languages=en_GB,af,nr,st,nso,ss,ts,tn,ven,xh,zu
-DecimalSymbol=.
-ThousandsSeparator=,
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%A, %e %B %Y
-DateFormat[af]=%a %d %b %y
-DateFormat[xh]=%A, %e %B %Y
-DateFormat[eo]=%A, la %ea de %B %Y
-DateFormatShort=%d/%m/%Y
-TimeFormat=%H:%M:%S
-WeekStartDay=1
-MeasureSystem=0
-PageSize=0
-#DecimalPlaces=2
diff --git a/l10n/zm/entry.desktop b/l10n/zm/entry.desktop
index a4967cc7..5d81d0ef 100644
--- a/l10n/zm/entry.desktop
+++ b/l10n/zm/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Zambeye
Name[x-test]=xxZambiaxx
Name[zh_CN]=赞比亚
Name[zh_TW]=尚比亞
-Region=southafrica
-Languages=en_GB
-#DecimalSymbol=,
-#ThousandsSeparator=
-#PositiveSign=
-#NegativeSign=-
-#DateFormat[??]=
-#DateFormatShort=
-#TimeFormat=
-#WeekStartDay=
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/l10n/zw/entry.desktop b/l10n/zw/entry.desktop
index ec0c2b00..9e55ab2b 100644
--- a/l10n/zw/entry.desktop
+++ b/l10n/zw/entry.desktop
@@ -91,16 +91,3 @@ Name[wa]=Zimbabwè
Name[x-test]=xxZimbabwexx
Name[zh_CN]=津巴布韦
Name[zh_TW]=辛巴威
-Region=southafrica
-Languages=en_GB
-DecimalSymbol=.
-ThousandsSeparator=.
-PositiveSign=
-NegativeSign=-
-DateFormat[en_GB]=%A %d %B %Y
-DateFormatShort=%e/%n/%Y
-TimeFormat=%l:%M:%S %p
-WeekStartDay=7
-#PageSize=
-#MeasureSystem=
-#DecimalPlaces=2
diff --git a/libs/plasmaclock/CMakeLists.txt b/libs/plasmaclock/CMakeLists.txt
index fc24c982..6f2ef176 100644
--- a/libs/plasmaclock/CMakeLists.txt
+++ b/libs/plasmaclock/CMakeLists.txt
@@ -3,7 +3,6 @@ set(plasmaclock_LIB_SRCS
calendar.cpp
wheelytoolbutton.cpp
timezonesConfig.ui
- calendarConfig.ui
)
add_library(plasmaclock SHARED ${plasmaclock_LIB_SRCS})
diff --git a/libs/plasmaclock/calendar.cpp b/libs/plasmaclock/calendar.cpp
index a1b3cddd..d8f8d015 100644
--- a/libs/plasmaclock/calendar.cpp
+++ b/libs/plasmaclock/calendar.cpp
@@ -36,7 +36,6 @@
#include
//KDECore
-#include
#include
#include
#include
@@ -58,7 +57,6 @@
#include
#include "wheelytoolbutton.h"
-#include "ui_calendarConfig.h"
namespace Plasma
{
@@ -72,7 +70,6 @@ class CalendarPrivate
: q(calendar),
calendarWidget(nullptr),
layout(nullptr),
- calendar(nullptr),
currentDate(QDate::currentDate()),
automaticUpdates(true)
{
@@ -85,10 +82,8 @@ class CalendarPrivate
Calendar *q;
Plasma::CalendarWidget *calendarWidget;
QGraphicsLinearLayout *layout;
- const KCalendarSystem *calendar;
QDate currentDate;
bool automaticUpdates;
- Ui::calendarConfig calendarConfigUi;
};
Calendar::Calendar(const QDate &date, QGraphicsWidget *parent)
@@ -141,25 +136,6 @@ void Calendar::focusInEvent(QFocusEvent* event)
d->calendarWidget->setFocus();
}
-void Calendar::setCalendar(int newCalendarType)
-{
- d->calendar = KCalendarSystem::create(static_cast(newCalendarType));
-}
-
-void Calendar::setCalendar(const KCalendarSystem *newCalendar)
-{
- d->calendar = newCalendar;
- d->calendarWidget->nativeWidget()->setCalendar(newCalendar);
-}
-
-const KCalendarSystem *Calendar::calendar() const
-{
- if (d->calendar) {
- return d->calendar;
- }
- return KGlobal::locale()->calendar();
-}
-
void Calendar::setAutomaticUpdateEnabled(bool automatic)
{
d->automaticUpdates = automatic;
@@ -172,8 +148,8 @@ bool Calendar::isAutomaticUpdateEnabled() const
void Calendar::setDate(const QDate &toDate)
{
- // New date must be valid in the current calendar system
- if (!calendar()->isValid(toDate)) {
+ // New date must be valid one
+ if (!toDate.isValid()) {
if (!toDate.isNull()) {
KNotification::beep();
}
@@ -204,36 +180,6 @@ QDate Calendar::currentDate() const
return d->currentDate;
}
-void Calendar::writeConfiguration(KConfigGroup cg)
-{
- const int calendarType = (d->calendar ? d->calendar->calendarSystem() : -1);
- cg.writeEntry("calendarType", calendarType);
-}
-
-void Calendar::createConfigurationInterface(KConfigDialog *parent)
-{
- QWidget *calendarConfigWidget = new QWidget();
- d->calendarConfigUi.setupUi(calendarConfigWidget);
- parent->addPage(calendarConfigWidget, i18n("Calendar"), "view-pim-calendar");
-
- const QList calendars = KCalendarSystem::calendarSystemsList();
- d->calendarConfigUi.calendarComboBox->addItem( i18n("Local"), QVariant( -1 ) );
- for (int i = 0; i < calendars.count(); ++i) {
- d->calendarConfigUi.calendarComboBox->addItem( KCalendarSystem::calendarLabel( calendars.at(i) ), QVariant( calendars.at(i) ) );
- }
- const int calendarType = (d->calendar ? d->calendar->calendarSystem() : -1);
- d->calendarConfigUi.calendarComboBox->setCurrentIndex(d->calendarConfigUi.calendarComboBox->findData( QVariant( calendarType ) ) );
-
- connect(d->calendarConfigUi.calendarComboBox, SIGNAL(activated(int)), parent, SLOT(settingsModified()));
-}
-
-void Calendar::configAccepted(KConfigGroup cg)
-{
- setCalendar(d->calendarConfigUi.calendarComboBox->itemData(d->calendarConfigUi.calendarComboBox->currentIndex()).toInt());
- writeConfiguration(cg);
- applyConfiguration(cg);
-}
-
void CalendarPrivate::updateSize()
{
QSize minSize = QSize(300, 250);
@@ -243,12 +189,6 @@ void CalendarPrivate::updateSize()
q->setPreferredSize(prefSize);
}
-void Calendar::applyConfiguration(KConfigGroup cg)
-{
- setCalendar(cg.readEntry("calendarType", -1));
- d->updateSize();
-}
-
void Calendar::dateUpdated()
{
emit dateChanged(date());
diff --git a/libs/plasmaclock/calendar.h b/libs/plasmaclock/calendar.h
index f92a6886..ae096dfe 100644
--- a/libs/plasmaclock/calendar.h
+++ b/libs/plasmaclock/calendar.h
@@ -25,7 +25,6 @@
#include "plasmaclock_export.h"
-class KCalendarSystem;
class KConfigDialog;
class KConfigGroup;
@@ -44,10 +43,6 @@ public:
explicit Calendar(const QDate &, QGraphicsWidget *parent = 0);
~Calendar();
- void setCalendar(int newCalendarType = -1);
- void setCalendar(const KCalendarSystem *calendar);
- const KCalendarSystem *calendar() const;
-
void setAutomaticUpdateEnabled(bool automatic);
bool isAutomaticUpdateEnabled() const;
@@ -57,11 +52,6 @@ public:
void setCurrentDate(const QDate &date);
QDate currentDate() const;
- void applyConfiguration(KConfigGroup cg);
- void writeConfiguration(KConfigGroup cg);
- void createConfigurationInterface(KConfigDialog *parent);
- void configAccepted(KConfigGroup cg);
-
Q_SIGNALS:
void dateChanged(const QDate &newDate, const QDate &oldDate);
void dateChanged(const QDate &newDate);
diff --git a/libs/plasmaclock/calendarConfig.ui b/libs/plasmaclock/calendarConfig.ui
deleted file mode 100644
index 5258d9e5..00000000
--- a/libs/plasmaclock/calendarConfig.ui
+++ /dev/null
@@ -1,96 +0,0 @@
-
-
- calendarConfig
-
-
-
- 0
- 0
- 319
- 45
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QSizePolicy::Fixed
-
-
-
- 20
- 20
-
-
-
-
- -
-
-
- Calendar system:
-
-
- Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter
-
-
- calendarComboBox
-
-
-
- -
-
-
-
-
-
- true
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 188
- 17
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
- KComboBox
- QComboBox
-
-
-
-
-
diff --git a/libs/plasmaclock/clockapplet.cpp b/libs/plasmaclock/clockapplet.cpp
index 721f4149..780026d0 100644
--- a/libs/plasmaclock/clockapplet.cpp
+++ b/libs/plasmaclock/clockapplet.cpp
@@ -50,7 +50,6 @@
#include
#include
#include
-#include
#include
#include
@@ -97,7 +96,7 @@ public:
if (date != prevDate) {
subText.append(" |
")
.append("")
- .append(q->calendar()->formatDate(data["Date"].toDate()).replace(' ', " "))
+ .append(KGlobal::locale()->formatDate(data["Date"].toDate()).replace(' ', " "))
.append(" |
");
}
@@ -112,7 +111,7 @@ public:
// now the time
subText.append("")
- .append(KGlobal::locale()->formatTime(data["Time"].toTime(), false).replace(' ', " "))
+ .append(KGlobal::locale()->formatTime(data["Time"].toTime()).replace(' ', " "))
.append(" | ");
// and close out the row.
@@ -288,10 +287,6 @@ void ClockApplet::createConfigurationInterface(KConfigDialog *parent)
{
createClockConfigurationInterface(parent);
- if (d->calendarWidget) {
- d->calendarWidget->createConfigurationInterface(parent);
- }
-
QWidget *widget = new QWidget();
d->timezonesUi.setupUi(widget);
d->timezonesUi.searchLine->addTreeWidget(d->timezonesUi.timeZones);
@@ -346,11 +341,9 @@ void ClockApplet::configChanged()
constraintsEvent(Plasma::SizeConstraint);
update();
} else if (d->calendarWidget) {
- // d->calendarWidget->configAccepted(cg); is called in configAccepted(),
- // as is setCurrentTimezone
+ // setCurrentTimezone() is called in configAccepted(),
// so we only need to do this in the case where the user hasn't been
// configuring things
- d->calendarWidget->applyConfiguration(cg);
Plasma::DataEngine::Data data = dataEngine("time")->query(d->timezone);
d->calendarWidget->setDate(data["Date"].toDate());
}
@@ -379,10 +372,6 @@ void ClockApplet::configAccepted()
setCurrentTimezone(d->defaultTimezone);
changeEngineTimezone(cur, d->defaultTimezone);
- if (d->calendarWidget) {
- d->calendarWidget->configAccepted(cg);
- }
-
clockConfigAccepted();
emit configNeedsSaving();
@@ -584,52 +573,27 @@ void ClockApplet::updateClipboardMenu()
Plasma::DataEngine::Data data = dataEngine("time")->query(currentTimezone());
QDateTime dateTime = QDateTime(data["Date"].toDate(), data["Time"].toTime());
- d->clipboardMenu->addAction(calendar()->formatDate(dateTime.date(), KLocale::LongDate));
- d->clipboardMenu->addAction(calendar()->formatDate(dateTime.date(), KLocale::ShortDate));
- // Display ISO Date format if not already displayed
- if (KGlobal::locale()->dateFormatShort() != "%Y-%m-%d") {
- d->clipboardMenu->addAction(calendar()->formatDate(dateTime.date(), "%Y-%m-%d"));
- }
+ d->clipboardMenu->addAction(KGlobal::locale()->formatDate(dateTime.date(), QLocale::LongFormat));
+ d->clipboardMenu->addAction(KGlobal::locale()->formatDate(dateTime.date(), QLocale::ShortFormat));
QAction *sep0 = new QAction(this);
sep0->setSeparator(true);
d->clipboardMenu->addAction(sep0);
- d->clipboardMenu->addAction(KGlobal::locale()->formatTime(dateTime.time(), false));
- d->clipboardMenu->addAction(KGlobal::locale()->formatTime(dateTime.time(), true));
+ d->clipboardMenu->addAction(KGlobal::locale()->formatTime(dateTime.time(), QLocale::LongFormat));
+ d->clipboardMenu->addAction(KGlobal::locale()->formatTime(dateTime.time(), QLocale::ShortFormat));
QAction *sep1 = new QAction(this);
sep1->setSeparator(true);
d->clipboardMenu->addAction(sep1);
- KLocale tempLocale(*KGlobal::locale());
- tempLocale.setCalendarSystem(calendar()->calendarSystem());
- d->clipboardMenu->addAction(tempLocale.formatDateTime(dateTime, KLocale::LongDate));
- d->clipboardMenu->addAction(tempLocale.formatDateTime(dateTime, KLocale::LongDate, true));
- d->clipboardMenu->addAction(tempLocale.formatDateTime(dateTime, KLocale::ShortDate));
- d->clipboardMenu->addAction(tempLocale.formatDateTime(dateTime, KLocale::ShortDate, true));
- // Display ISO DateTime format if not already displayed
- if (tempLocale.dateFormatShort() != "%Y-%m-%d") {
- tempLocale.setDateFormatShort("%Y-%m-%d");
- d->clipboardMenu->addAction(tempLocale.formatDateTime(dateTime, KLocale::ShortDate, true));
- }
+ d->clipboardMenu->addAction(KGlobal::locale()->formatDateTime(dateTime, QLocale::LongFormat));
+ d->clipboardMenu->addAction(KGlobal::locale()->formatDateTime(dateTime, QLocale::ShortFormat));
+ d->clipboardMenu->addAction(KGlobal::locale()->formatDateTime(dateTime, QLocale::NarrowFormat));
QAction *sep2 = new QAction(this);
sep2->setSeparator(true);
d->clipboardMenu->addAction(sep2);
-
- QMenu *calendarMenu = d->clipboardMenu->addMenu( i18nc( "@item:inmenu Submenu for alternative calendar dates", "Other Calendars" ) );
- QList calendars = KCalendarSystem::calendarSystemsList();
- foreach (const KLocale::CalendarSystem &cal, calendars) {
- if (cal != calendar()->calendarSystem()) {
- KCalendarSystem *tempCal = KCalendarSystem::create(cal);
- QString text = tempCal->formatDate(dateTime.date(), KLocale::LongDate) + " (" + KCalendarSystem::calendarLabel(cal) + ')';
- calendarMenu->addAction(text);
- text = tempCal->formatDate(dateTime.date(), KLocale::ShortDate) + " (" + KCalendarSystem::calendarLabel(cal) + ')';
- calendarMenu->addAction(text);
- delete tempCal;
- }
- }
}
void ClockApplet::copyToClipboard(QAction* action)
@@ -640,13 +604,4 @@ void ClockApplet::copyToClipboard(QAction* action)
QApplication::clipboard()->setText(text);
}
-const KCalendarSystem *ClockApplet::calendar() const
-{
- if (d->calendarWidget) {
- return d->calendarWidget->calendar();
- } else {
- return KGlobal::locale()->calendar();
- }
-}
-
#include "moc_clockapplet.cpp"
diff --git a/libs/plasmaclock/clockapplet.h b/libs/plasmaclock/clockapplet.h
index 9ed64705..cefa2b66 100644
--- a/libs/plasmaclock/clockapplet.h
+++ b/libs/plasmaclock/clockapplet.h
@@ -58,8 +58,6 @@ class PLASMACLOCK_EXPORT ClockApplet : public Plasma::PopupApplet
static QString localTimezone();
static QString localTimezoneUntranslated();
- const KCalendarSystem *calendar () const;
-
public Q_SLOTS:
void configChanged();
void toolTipAboutToShow();
diff --git a/plasma/applets/calendar/calendar.cpp b/plasma/applets/calendar/calendar.cpp
index 57844d9e..2cc5b6cb 100644
--- a/plasma/applets/calendar/calendar.cpp
+++ b/plasma/applets/calendar/calendar.cpp
@@ -28,7 +28,6 @@
#include
#include
#include
-#include
#include
#include
@@ -66,11 +65,6 @@ void CalendarApplet::focusInEvent(QFocusEvent* event)
m_calendarWidget->setFocus();
}
-void CalendarApplet::configChanged()
-{
- m_calendarWidget->applyConfiguration(config());
-}
-
QGraphicsWidget *CalendarApplet::graphicsWidget()
{
return m_calendarWidget;
@@ -110,18 +104,12 @@ void CalendarApplet::paintIcon()
font.setPixelSize(icon.size().height() / 2);
p.setFont(font);
p.drawText(icon.rect().adjusted(0, icon.size().height()/4, 0, 0), Qt::AlignCenter,
- QString::number(m_calendarWidget->calendar()->day(m_calendarWidget->date())));
+ QString::number(m_calendarWidget->date().day()));
m_theme->resize();
p.end();
setPopupIcon(icon);
}
-void CalendarApplet::configAccepted()
-{
- m_calendarWidget->configAccepted(config());
- update();
-}
-
void CalendarApplet::updateDate()
{
QDateTime now = QDateTime::currentDateTime();
@@ -143,12 +131,4 @@ void CalendarApplet::updateDate()
paintIcon();
}
-void CalendarApplet::createConfigurationInterface(KConfigDialog *parent)
-{
- m_calendarWidget->createConfigurationInterface(parent);
- parent->setButtons( KDialog::Ok | KDialog::Cancel | KDialog::Apply );
- connect(parent, SIGNAL(applyClicked()), this, SLOT(configAccepted()));
- connect(parent, SIGNAL(okClicked()), this, SLOT(configAccepted()));
-}
-
#include "moc_calendar.cpp"
diff --git a/plasma/applets/calendar/calendar.h b/plasma/applets/calendar/calendar.h
index e4d84f97..b34174ae 100644
--- a/plasma/applets/calendar/calendar.h
+++ b/plasma/applets/calendar/calendar.h
@@ -48,15 +48,10 @@ class CalendarApplet : public Plasma::PopupApplet
*/
QGraphicsWidget *graphicsWidget();
- public slots:
- void configChanged();
-
protected:
- void createConfigurationInterface(KConfigDialog *parent);
void focusInEvent(QFocusEvent * event);
protected slots:
- void configAccepted();
void updateDate();
void paintIcon();
diff --git a/plasma/applets/digital-clock/clock.cpp b/plasma/applets/digital-clock/clock.cpp
index e573ae9a..a29617b2 100644
--- a/plasma/applets/digital-clock/clock.cpp
+++ b/plasma/applets/digital-clock/clock.cpp
@@ -38,7 +38,6 @@
#include
#include
#include
-#include
#include
#include
#include
@@ -47,6 +46,12 @@
#include
#include
+// TODO: no AM/PM, no locale format awareness
+static QString makeTime(const KLocale* locale, const QTime &time, const bool seconds)
+{
+ const QLocale qlocale = locale->toLocale();
+ return (seconds ? qlocale.toString(time, "hh:mm:ss") : qlocale.toString(time, "hh:mm"));
+}
Clock::Clock(QObject *parent, const QVariantList &args)
: ClockApplet(parent, args),
@@ -115,7 +120,7 @@ void Clock::updateSize()
if (f != Plasma::Vertical && f != Plasma::Horizontal) {
const QFontMetricsF metrics(KGlobalSettings::smallestReadableFont());
// calculates based on size of "23:59"!
- const QString timeString = KGlobal::locale()->formatTime(QTime(23, 59), m_showSeconds);
+ const QString timeString = makeTime(KGlobal::locale(), QTime(23, 59), m_showSeconds);
setMinimumSize(metrics.size(Qt::TextSingleLine, timeString));
}
@@ -169,7 +174,7 @@ void Clock::updateSize()
//kDebug() << "minZize: " << minimumSize() << preferredSize();
if (m_isDefaultFont) {
- const QString fakeTimeString = KGlobal::locale()->formatTime(QTime(23,59,59), m_showSeconds);
+ const QString fakeTimeString = makeTime(KGlobal::locale(), QTime(23,59,59), m_showSeconds);
expandFontToMax(m_plainClockFont, fakeTimeString);
}
@@ -226,7 +231,7 @@ void Clock::clockConfigChanged()
}
const QFontMetricsF metrics(KGlobalSettings::smallestReadableFont());
- const QString timeString = KGlobal::locale()->formatTime(QTime(23, 59), m_showSeconds);
+ const QString timeString = makeTime(KGlobal::locale(), QTime(23, 59), m_showSeconds);
setMinimumSize(metrics.size(Qt::TextSingleLine, timeString));
if (isUserConfiguring()) {
@@ -277,8 +282,7 @@ void Clock::createClockConfigurationInterface(KConfigDialog *parent)
dateStyles << i18nc("A kind of date representation", "No date")
<< i18nc("A kind of date representation", "Compact date")
<< i18nc("A kind of date representation", "Short date")
- << i18nc("A kind of date representation", "Long date")
- << i18nc("A kind of date representation", "ISO date");
+ << i18nc("A kind of date representation", "Long date");
ui.dateStyle->addItems(dateStyles);
ui.dateStyle->setCurrentIndex(m_dateStyle);
@@ -455,8 +459,8 @@ void Clock::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option,
// Paint the date, conditionally, and let us know afterwards how much
// space is left for painting the time on top of it.
QRectF dateRect;
- const QString timeString = KGlobal::locale()->formatTime(m_time, m_showSeconds);
- const QString fakeTimeString = KGlobal::locale()->formatTime(QTime(23,59,59), m_showSeconds);
+ const QString timeString = makeTime(KGlobal::locale(), m_time, m_showSeconds);
+ const QString fakeTimeString = makeTime(KGlobal::locale(), QTime(23,59,59), m_showSeconds);
QFont smallFont = KGlobalSettings::smallestReadableFont();
//create the string for the date and/or the timezone
@@ -465,22 +469,14 @@ void Clock::paintInterface(QPainter *p, const QStyleOptionGraphicsItem *option,
//Create the localized date string if needed
if (m_dateStyle) {
- // JPL This needs a complete rewrite for l10n issues
- QString day = KGlobal::locale()->calendar()->formatDate(m_date, KLocale::Day, KLocale::ShortNumber);
- QString month = KGlobal::locale()->calendar()->formatDate(m_date, KLocale::Month, KLocale::LongNumber);
-
if (m_dateStyle == 1) { //compact date
- dateString = i18nc("@label Compact date: "
- "%1 day in the month, %2 month number",
- "%1/%2", day, month);
+ dateString = KGlobal::locale()->formatDate(m_date, QLocale::NarrowFormat);
} else if (m_dateStyle == 2) { //short date
- dateString = KGlobal::locale()->formatDate(m_date, KLocale::ShortDate);
+ dateString = KGlobal::locale()->formatDate(m_date, QLocale::ShortFormat);
} else if (m_dateStyle == 3) { //long date
- dateString = KGlobal::locale()->formatDate(m_date, KLocale::LongDate);
- } else if (m_dateStyle == 4) { //ISO date
- dateString = KGlobal::locale()->formatDate(m_date, KLocale::IsoDate);
+ dateString = KGlobal::locale()->formatDate(m_date, QLocale::LongFormat);
} else { //shouldn't happen
- dateString = KGlobal::locale()->formatDate(m_date, KLocale::ShortDate);
+ dateString = KGlobal::locale()->formatDate(m_date, QLocale::ShortFormat);
}
if (showTimezone()) {
@@ -666,8 +662,8 @@ void Clock::generatePixmap()
m_svg->setContainsMultipleImages(true);
}
- const QString fakeTimeString = KGlobal::locale()->formatTime(QTime(23,59,59), m_showSeconds);
- const QString timeString = KGlobal::locale()->formatTime(m_time, m_showSeconds);
+ const QString fakeTimeString = makeTime(KGlobal::locale(), QTime(23,59,59), m_showSeconds);
+ const QString timeString = makeTime(KGlobal::locale(), m_time, m_showSeconds);
QRect rect(contentsRect().toRect());
QFont font(m_plainClockFont);
diff --git a/plasma/applets/system-monitor/temperature.cpp b/plasma/applets/system-monitor/temperature.cpp
index 6924217e..f1872954 100644
--- a/plasma/applets/system-monitor/temperature.cpp
+++ b/plasma/applets/system-monitor/temperature.cpp
@@ -174,7 +174,7 @@ bool Temperature::addVisualization(const QString& source)
plotter->setTitle(temperatureTitle(source));
plotter->setAnalog(mode() != SM::Applet::Panel);
- if (KGlobal::locale()->measureSystem() == KLocale::Metric) {
+ if (KGlobal::locale()->measureSystem() == QLocale::MetricSystem) {
plotter->setMinMax(0, 110);
plotter->setUnit(QString::fromUtf8("°C"));
} else {
@@ -201,7 +201,7 @@ void Temperature::dataUpdated(const QString& source,
KTemperature value(doubleValue, unit);
QString stringValue;
- if (KGlobal::locale()->measureSystem() == KLocale::Metric) {
+ if (KGlobal::locale()->measureSystem() == QLocale::MetricSystem) {
doubleValue = value.convertTo(KTemperature::Celsius);
stringValue = KTemperature(doubleValue, KTemperature::Celsius).toString();
} else {
diff --git a/plasma/dataengines/weather/ions/noaa/ion_noaa.cpp b/plasma/dataengines/weather/ions/noaa/ion_noaa.cpp
index 91d6126d..71777e4e 100644
--- a/plasma/dataengines/weather/ions/noaa/ion_noaa.cpp
+++ b/plasma/dataengines/weather/ions/noaa/ion_noaa.cpp
@@ -22,7 +22,7 @@
#include "ion_noaa.h"
#include
-#include
+#include
#include
QMap NOAAIon::setupWindIconMappings(void) const
@@ -905,7 +905,7 @@ void NOAAIon::readForecast(const QString& source, QXmlStreamReader& xml)
QDateTime date = QDateTime::fromString(data, Qt::ISODate);
WeatherData::Forecast forecast;
- forecast.day = KGlobal::locale()->calendar()->weekDayName(date.date(), KCalendarSystem::ShortDayName);
+ forecast.day = KGlobal::locale()->toLocale().dayName(date.date().dayOfWeek(), QLocale::ShortFormat);
forecasts.append(forecast);
//kDebug() << forecast.day;
}
diff --git a/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp b/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp
index 0ed2a0db..6863e71f 100644
--- a/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp
+++ b/plasma/dataengines/weather/ions/wetter.com/ion_wettercom.cpp
@@ -30,7 +30,7 @@
#include
#include
-#include
+#include
#include
/*
@@ -713,7 +713,7 @@ void WetterComIon::updateWeather(const QString& source, bool parseError)
data.insert(QString::fromLatin1("Short Forecast Day %1").arg(i),
QString::fromLatin1("%1|%2|%3|%4|%5|%6")
- .arg(KGlobal::locale()->calendar()->weekDayName(weather.period.date(), KCalendarSystem::ShortDayName))
+ .arg(KGlobal::locale()->toLocale().dayName(weather.period.date().dayOfWeek(), QLocale::ShortFormat))
.arg(weather.iconName).arg(weather.summary)
.arg(weather.tempHigh).arg(weather.tempLow)
.arg(weather.probability));
diff --git a/plasma/declarativeimports/locale/CMakeLists.txt b/plasma/declarativeimports/locale/CMakeLists.txt
index aae48962..f669f672 100644
--- a/plasma/declarativeimports/locale/CMakeLists.txt
+++ b/plasma/declarativeimports/locale/CMakeLists.txt
@@ -3,7 +3,6 @@ project(localebindings)
set(localebindings_SRCS
locale.cpp
localebindingsplugin.cpp
- calendarsystem.cpp
)
INCLUDE_DIRECTORIES(
diff --git a/plasma/declarativeimports/locale/calendarsystem.cpp b/plasma/declarativeimports/locale/calendarsystem.cpp
deleted file mode 100644
index 7ae42ad7..00000000
--- a/plasma/declarativeimports/locale/calendarsystem.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
-/*
- Copyright (C) 2012 Giorgos Tsiapaliwkas
- Copyright (C) 2012 Antonis Tsiapaliokas
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-//own
-#include "calendarsystem.h"
-
-//KDE
-#include
-#include
-
-//Qt
-#include
-
-CalendarSystem::CalendarSystem(QObject* parent)
- : QObject(parent)
-{
- m_calendarSystem = KCalendarSystem::create(KGlobal::locale()->calendarSystem());
-}
-
-QList CalendarSystem::calendarSystemsList()
-{
- QList list;
-
- foreach(KLocale::CalendarSystem calendarSystem, KCalendarSystem::calendarSystemsList()) {
- list.append((int)calendarSystem);
- }
-
- return list;
-}
-
-Locale::CalendarSystem CalendarSystem::calendarSystem() const
-{
- return (Locale::CalendarSystem)m_calendarSystem->calendarSystem();
-}
-
-
-QString CalendarSystem::calendarLabel() const
-{
- return m_calendarSystem->calendarLabel();
-}
-
-QDate CalendarSystem::epoch() const
-{
- return m_calendarSystem->epoch();
-}
-
-QDate CalendarSystem::earliestValidDate() const
-{
- return epoch();
-}
-
-QDate CalendarSystem::latestValidDate() const
-{
- return m_calendarSystem->latestValidDate();
-}
-
-bool CalendarSystem::isValidIsoWeekDate(int year, int isoWeekNumber, int dayOfIsoWeek) const
-{
- return m_calendarSystem->isValidIsoWeekDate(year, isoWeekNumber, dayOfIsoWeek);
-}
-
-bool CalendarSystem::isValid(const QDate &date) const
-{
- return m_calendarSystem->isValid(date);
-}
-
-QVariantHash CalendarSystem::getDate(const QDate date) const
-{
- QVariantHash hash;
-
- int year;
- int month;
- int day;
-
- m_calendarSystem->getDate(date, &year, &month, &day);
-
- hash["year"] = year;
- hash["month"] = month;
- hash["day"] = day;
-
- return hash;
-}
-
-int CalendarSystem::year(const QDate &date) const
-{
- return m_calendarSystem->year(date);
-}
-
-int CalendarSystem::month(const QDate &date) const
-{
- return m_calendarSystem->month(date);
-}
-
-int CalendarSystem::day(const QDate &date) const
-{
- return m_calendarSystem->day(date);
-}
-
-QString CalendarSystem::eraName(const QDate &date, StringFormat format) const
-{
- return m_calendarSystem->eraName(date, (KCalendarSystem::StringFormat)format);
-}
-
-QString CalendarSystem::eraYear(const QDate &date, StringFormat format) const
-{
- return m_calendarSystem->eraYear(date, (KCalendarSystem::StringFormat)format);
-}
-
-
-int CalendarSystem::yearInEra(const QDate &date) const
-{
- return m_calendarSystem->yearInEra(date);
-}
-
-QDate CalendarSystem::addYears(const QDate &date, int numYears) const
-{
- return m_calendarSystem->addYears(date, numYears);
-}
-
-QDate CalendarSystem::addMonths(const QDate &date, int numMonths) const
-{
- return m_calendarSystem->addMonths(date, numMonths);
-}
-
-QDate CalendarSystem::addDays(const QDate &date, int numDays) const
-{
- return m_calendarSystem->addDays(date, numDays);
-}
-
-QVariantHash CalendarSystem::dateDifference(const QDate &fromDate, const QDate &toDate) const
-{
- QVariantHash hash;
-
- int yearsDiff;
- int monthsDiff;
- int daysDiff;
- int direction;
-
- m_calendarSystem->dateDifference(fromDate, toDate, &yearsDiff, &monthsDiff, &daysDiff, &direction);
-
- hash["years"] = yearsDiff;
- hash["months"] = monthsDiff;
- hash["days"] = daysDiff;
- hash["direction"] = direction;
-
- return hash;
-}
-
-int CalendarSystem::yearsDifference(const QDate &fromDate, const QDate &toDate) const
-{
- return m_calendarSystem->yearsDifference(fromDate, toDate);
-}
-
-int CalendarSystem::monthsDifference(const QDate &fromDate, const QDate &toDate) const
-{
- return m_calendarSystem->monthsDifference(fromDate, toDate);
-}
-
-int CalendarSystem::daysDifference(const QDate &fromDate, const QDate &toDate) const
-{
- return m_calendarSystem->daysDifference(fromDate, toDate);
-}
-
-int CalendarSystem::monthsInYear(int year) const
-{
- return m_calendarSystem->monthsInYear(year);
-}
-
-int CalendarSystem::weeksInYear(int year, WeekNumberSystem weekNumberSystem) const
-{
- return m_calendarSystem->weeksInYear(year, (KLocale::WeekNumberSystem)weekNumberSystem);
-}
-
-int CalendarSystem::daysInYear(int year) const
-{
- return m_calendarSystem->daysInYear(year);
-}
-
-int CalendarSystem::daysInMonth(int year, int month) const
-{
- return m_calendarSystem->daysInMonth(year, month);
-}
-
-int CalendarSystem::daysInWeek(const QDate &date) const
-{
- return m_calendarSystem->daysInWeek(date);
-}
-
-int CalendarSystem::dayOfYear(const QDate &date) const
-{
- return m_calendarSystem->dayOfYear(date);
-}
-
-int CalendarSystem::dayOfWeek(const QDate &date) const
-{
- return m_calendarSystem->dayOfWeek(date);
-}
-
-int CalendarSystem::week(const QDate &date, WeekNumberSystem weekNumberSystem) const
-{
- return m_calendarSystem->week(date, (KLocale::WeekNumberSystem)weekNumberSystem);
-}
-
-bool CalendarSystem::isLeapYear(int year) const
-{
- return m_calendarSystem->isLeapYear(year);
-}
-
-QDate CalendarSystem::firstDayOfYear(int year) const
-{
- return m_calendarSystem->firstDayOfYear(year);
-}
-
-QDate CalendarSystem::lastDayOfYear(int year) const
-{
- return m_calendarSystem->lastDayOfYear(year);
-}
-
-QDate CalendarSystem::firstDayOfMonth(int year, int month) const
-{
- return m_calendarSystem->firstDayOfMonth(year, month);
-}
-
-QDate CalendarSystem::lastDayOfMonth(int year, int month) const
-{
- return m_calendarSystem->lastDayOfMonth(year, month);
-}
-
-QString CalendarSystem::monthName(int month, int year, CalendarSystem::MonthNameFormat format) const
-{
- return m_calendarSystem->monthName(month, year, (KCalendarSystem::MonthNameFormat)format);
-}
-
-QString CalendarSystem::weekDayName(int weekDay, CalendarSystem::WeekDayNameFormat format) const
-{
- return m_calendarSystem->weekDayName(weekDay, (KCalendarSystem::WeekDayNameFormat)format);
-}
-
-QString CalendarSystem::formatDate(const QDate &date, DateTimeComponent component,
- DateTimeComponentFormat format,
- WeekNumberSystem weekNumberSystem) const
-{
- return m_calendarSystem->formatDate(date, (KLocale::DateTimeComponent)component,
- (KLocale::DateTimeComponentFormat)format,
- (KLocale::WeekNumberSystem)weekNumberSystem);
-}
-
-QDate CalendarSystem::readDate(const QString &str, ReadDateFlags flags) const
-{
- return m_calendarSystem->readDate(str, (KLocale::ReadDateFlags)flags);
-}
-
-int CalendarSystem::shortYearWindowStartYear() const
-{
- return m_calendarSystem->shortYearWindowStartYear();
-}
-
-int CalendarSystem::applyShortYearWindow(int inputYear) const
-{
- return m_calendarSystem->applyShortYearWindow(inputYear);
-}
-
-int CalendarSystem::weekStartDay() const
-{
- return m_calendarSystem->weekStartDay();
-}
-
-bool CalendarSystem::isSolar() const
-{
- return m_calendarSystem->isSolar();
-}
-
-bool CalendarSystem::isLunar() const
-{
- return m_calendarSystem->isLunar();
-}
-
-bool CalendarSystem::isLunisolar() const
-{
- return m_calendarSystem->isLunisolar();
-}
-
-bool CalendarSystem::isProleptic() const
-{
- return m_calendarSystem->isProleptic();
-}
diff --git a/plasma/declarativeimports/locale/calendarsystem.h b/plasma/declarativeimports/locale/calendarsystem.h
deleted file mode 100644
index c7298b57..00000000
--- a/plasma/declarativeimports/locale/calendarsystem.h
+++ /dev/null
@@ -1,697 +0,0 @@
-/*
- Copyright (C) 2012 Giorgos Tsiapaliwkas
- Copyright (C) 2012 Antonis Tsiapaliokas
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public License
- along with this library; see the file COPYING.LIB. If not, write to
- the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-*/
-
-#ifndef CALENDARSYSTEM_H
-#define CALENDARSYSTEM_H
-
-//own
-#include "locale_p.h" // needed for enums
-
-//Qt
-#include
-
-class KCalendarSystem;
-
-class CalendarSystem : public QObject
-{
-Q_OBJECT
-
-//enums
-Q_ENUMS(StringFormat)
-Q_ENUMS(MonthNameFormat)
-Q_ENUMS(WeekDayNameFormat)
-Q_ENUMS(WeekNumberSystem)
-Q_ENUMS(ReadDateFlags)
-Q_ENUMS(DateTimeComponent)
-Q_ENUMS(DateTimeComponentFormat)
-
-//properties
-Q_PROPERTY(QList calendarSystemsList READ calendarSystemsList CONSTANT) //read-only
-Q_PROPERTY(Locale::CalendarSystem calendarSystem READ calendarSystem CONSTANT)//read-only
-Q_PROPERTY(QString calendarLabel READ calendarLabel CONSTANT)//read-only
-Q_PROPERTY(QDate epoch READ epoch CONSTANT)//read-only
-Q_PROPERTY(QDate earliestValidDate READ earliestValidDate CONSTANT)//read-only
-Q_PROPERTY(QDate latestValidDate READ latestValidDate CONSTANT)//read-only
-Q_PROPERTY(int shortYearWindowStartYear READ shortYearWindowStartYear CONSTANT)
-Q_PROPERTY(int weekStartDay READ weekStartDay CONSTANT)//read-only
-Q_PROPERTY(bool isLunar READ isLunar CONSTANT)//read-only
-Q_PROPERTY(bool isLunisolar READ isLunisolar CONSTANT)//read-only
-Q_PROPERTY(bool isSolar READ isSolar CONSTANT)//read-only
-Q_PROPERTY(bool isProleptic READ isProleptic CONSTANT)//read-only
-
-public:
-
- //ctor
- CalendarSystem(QObject *parent = 0);
-
- //the above are enums which I borrow from the Locale class
- /**
- *
- * System used for Week Numbers
- */
- enum WeekNumberSystem {
- DefaultWeekNumber = 1000, /**< The system locale default */
- IsoWeekNumber = 0, /**< ISO Week Number */
- FirstFullWeek = 1, /**< Week 1 starts on the first Week Start Day in year ends after 7 days */
- FirstPartialWeek = 2, /**< Week 1 starts Jan 1st ends day before first Week Start Day in year */
- SimpleWeek = 3 /**< Week 1 starts Jan 1st ends after 7 days */
- };
-
- enum ReadDateFlags {
- NormalFormat = 1, /**< Only accept a date string in
- the locale LongDate format */
- shortFormat = 2, /**< Only accept a date string in
- the locale ShortDate format */
- IsoFormat = 4, /**< Only accept a date string in
- ISO date format (YYYY-MM-DD) */
- IsoWeekFormat = 8, /**< Only accept a date string in
- ISO Week date format (YYYY-Www-D) */
- IsoOrdinalFormat = 16 /**< Only accept a date string in
- ISO Week date format (YYYY-DDD) */
- };
-
- /**
- * The various Components that make up a Date / Time
- * In the future the Components may be combined as flags for dynamic
- * generation of Date Formats.
- */
- enum DateTimeComponent {
- Year = 0x1, /**< The Year portion of a date, may be number or name */
- YearName = 0x2, /**< The Year Name portion of a date */
- Month = 0x4, /**< The Month portion of a date, may be number or name */
- MonthName = 0x8, /**< The Month Name portion of a date */
- Day = 0x10, /**< The Day portion of a date, may be number or name */
- DayName = 0x20, /**< The Day Name portion of a date */
- JulianDay = 0x40, /**< The Julian Day of a date */
- EraName = 0x80, /**< The Era Name portion of a date */
- EraYear = 0x100, /**< The Era and Year portion of a date */
- YearInEra = 0x200, /**< The Year In Era portion of a date */
- DayOfYear = 0x400, /**< The Day Of Year portion of a date, may be number or name */
- DayOfYearName = 0x800, /**< The Day Of Year Name portion of a date */
- DayOfWeek = 0x1000, /**< The Day Of Week / Weekday portion of a date, may be number or name */
- DayOfWeekName = 0x2000, /**< The Day Of Week Name / Weekday Name portion of a date */
- Week = 0x4000, /**< The Week Number portion of a date */
- WeekYear = 0x8000, /**< The Week Year portion of a date */
- MonthsInYear = 0x10000, /**< The Months In Year portion of a date */
- WeeksInYear = 0x20000, /**< The Weeks In Year portion of a date */
- DaysInYear = 0x40000, /**< The Days In Year portion of a date */
- DaysInMonth = 0x80000, /**< The Days In Month portion of a date */
- DaysInWeek = 0x100000, /**< The Days In Week portion of a date */
- Hour = 0x200000, /**< The Hours portion of a date */
- Minute = 0x400000, /**< The Minutes portion of a date */
- Second = 0x800000, /**< The Seconds portion of a date */
- Millisecond = 0x1000000, /**< The Milliseconds portion of a date */
- DayPeriod = 0x2000000, /**< The Day Period portion of a date, e.g. AM/PM */
- DayPeriodHour = 0x4000000, /**< The Day Period Hour portion of a date */
- Timezone = 0x8000000, /**< The Time Zone portion of a date, may be offset or name */
- TimezoneName = 0x10000000, /**< The Time Zone Name portion of a date */
- UnixTime = 0x20000000 /**< The UNIX Time portion of a date */
- };
-
- enum DateTimeComponentFormat {
- DefaultComponentFormat = 1000, /**< The system locale default for the componant */
- ShortNumber = 0, /**< Number at its natural width, e.g. 2 for the 2nd*/
- LongNumber, /**< Number padded to a required width, e.g. 02 for the 2nd*/
- narrowName = 3, /**< Narrow text format, may not be unique, e.g. M for Monday */
- shortName, /**< Short text format, e.g. Mon for Monday */
- longName /**< Long text format, e.g. Monday for Monday */
- };
- //end of the borrowing enums
-
- /**
- * Format for returned year number / month number / day number as string.
- */
- enum StringFormat {
- ShortFormat, /**< Short string format, e.g. 2000 = "00" or 6 = "6" */
- LongFormat /**< Long string format, e.g. 2000 = "2000" or 6 = "06" */
- };
-
- /**
- * Format for returned month / day name.
- */
- enum MonthNameFormat {
- ShortName, /**< Short name format, e.g. "Dec" */
- LongName, /**< Long name format, e.g. "December" */
- ShortNamePossessive, /**< Short name possessive format, e.g. "of Dec" */
- LongNamePossessive, /**< Long name possessive format, e.g. "of December" */
- NarrowName /**< Narrow name format, e.g. "D" */
- };
-
- /**
- * Format for returned month / day name.
- */
- enum WeekDayNameFormat {
- ShortDayName, /**< Short name format, e.g. "Fri" */
- LongDayName, /**< Long name format, e.g. "Friday" */
- NarrowDayName /**< Narrow name format, e.g. "F" */
- };
-
- /**
- * Returns the list of currently supported Calendar Systems
- * @return list of Calendar Systems
- */
- QList calendarSystemsList();
-
- /**
- *
- * Returns the Calendar System type of the CalendarSystem object
- *
- * @return type of calendar system
- */
- Locale::CalendarSystem calendarSystem() const;
-
- /**
- *
- * Returns a localized label to display for the current Calendar System type.
- *
- * @return localized label for this Calendar System
- */
- QString calendarLabel() const; //TODO, it returns undefined
-
- /**
- * Returns a QDate holding the epoch of the calendar system. Usually YMD
- * of 1/1/1, access the returned QDates method toJulianDay() if you
- * require the actual Julian day number. Note: a particular calendar
- * system implementation may not include the epoch in its supported range,
- * or the calendar system may be proleptic in which case it supports dates
- * before the epoch.
- *
- * @see CalendarSystem::earliestValidDate
- * @see CalendarSystem::latestValidDate
- * @see CalendarSystem::isProleptic
- * @see CalendarSystem::isValid
- *
- * @return epoch of calendar system
- */
- QDate epoch() const;
-
- /**
- * Returns the earliest date valid in this calendar system implementation.
- *
- * If the calendar system is proleptic then this may be before epoch.
- *
- * @see CalendarSystem::epoch
- * @see CalendarSystem::latestValidDate
- *
- * @return date the earliest valid date
- */
- QDate earliestValidDate() const;
-
- /**
- * Returns the latest date valid in this calendar system implementation.
- *
- * @see CalendarSystem::epoch
- * @see CalendarSystem::earliestValidDate
- *
- * @return date the latest valid date
- */
- QDate latestValidDate() const;
-
- /**
- *
- * Returns whether a given date is valid in this calendar system.
- *
- * @param year the year portion of the date to check
- * @param isoWeekNumber the ISO week portion of the date to check
- * @param dayOfIsoWeek the day of week portion of the date to check
- * @return @c true if the date is valid, @c false otherwise
- */
- Q_INVOKABLE bool isValidIsoWeekDate(int year, int isoWeekNumber, int dayOfIsoWeek) const;
-
- /**
- * Returns whether a given date is valid in this calendar system.
- *
- * @param date the date to check
- * @return @c true if the date is valid, @c false otherwise
- */
- Q_INVOKABLE bool isValid(const QDate &date) const;
-
- /**
- *
- * Returns the year, month and day portion of a given date in the current calendar system
- * The values are returned in a hash, the available keys are,
- * ["year"] the year of the date
- * ["month"] the month of the date
- * ["day"] the day of the date
- * @param date date to get year, month and day for
- */
- Q_INVOKABLE QVariantHash getDate(const QDate date) const;
-
- /**
- * Returns the year portion of a given date in the current calendar system
- *
- * @param date date to return year for
- * @return year, 0 if input date is invalid
- */
- Q_INVOKABLE int year(const QDate &date) const;
-
- /**
- * Returns the month portion of a given date in the current calendar system
- *
- * @param date date to return month for
- * @return month of year, 0 if input date is invalid
- */
- Q_INVOKABLE int month(const QDate &date) const;
-
- /**
- * Returns the day portion of a given date in the current calendar system
- *
- * @param date date to return day for
- * @return day of the month, 0 if input date is invalid
- */
- Q_INVOKABLE int day(const QDate &date) const;
-
- /**
- *
- * Returns the Era Name portion of a given date in the current calendar system,
- * for example "AD" or "Anno Domini" for the Gregorian calendar and Christian Era.
- *
- * @param date date to return Era Name for
- * @param format format to return, either short or long
- * @return era name, empty string if input date is invalid
- */
- Q_INVOKABLE QString eraName(const QDate &date, StringFormat format = ShortFormat) const;
-
- /**
- *
- * Returns the Era Year portion of a given date in the current
- * calendar system, for example "2000 AD" or "Heisei 22".
- *
- * @param date date to return Era Year for
- * @param format format to return, either short or long
- * @return era name, empty string if input date is invalid
- */
- Q_INVOKABLE QString eraYear(const QDate &date, StringFormat format = ShortFormat) const;
-
- /**
- *
- * Returns the Year In Era portion of a given date in the current calendar
- * system, for example 1 for "1 BC".
- *
- * @param date date to return Year In Era for
- * @return Year In Era, -1 if input date is invalid
- */
- Q_INVOKABLE int yearInEra(const QDate &date) const;
-
- /**
- * Returns a QDate containing a date @p nyears years later.
- *
- * @param date The old date
- * @param nyears The number of years to add
- * @return The new date, null date if any errors
- */
- Q_INVOKABLE QDate addYears(const QDate &date, int nyears) const;
-
- /**
- * Returns a QDate containing a date @p nmonths months later.
- *
- * @param date The old date
- * @param nmonths number of months to add
- * @return The new date, null date if any errors
- */
- Q_INVOKABLE QDate addMonths(const QDate &date, int nmonths) const;
-
- /**
- * Returns a QDate containing a date @p ndays days later.
- *
- * @param date The old date
- * @param ndays number of days to add
- * @return The new date, null date if any errors
- */
- Q_INVOKABLE QDate addDays(const QDate &date, int ndays) const;
-
- /**
- * Returns the difference between two dates with a hash, the available keys are
- * ["years"] Returns number of years difference
- * ["months"] Returns number of months difference
- * ["days"] Returns number of days difference
- * ["direction"] Returns direction of difference, 1 if fromDate <= toDate, -1 otherwise
- * The difference is always caculated from the earlier date to the later
- * date in year, month and day order, with the @p direction parameter
- * indicating which direction the difference is applied from the @p toDate.
- *
- * For example, the difference between 2010-06-10 and 2012-09-5 is 2 years,
- * 2 months and 26 days. Note that the difference between two last days of
- * the month is always 1 month, e.g. 2010-01-31 to 2010-02-28 is 1 month
- * not 28 days.
- *
- * @param fromDate The date to start from
- * @param toDate The date to end at
- */
- Q_INVOKABLE QVariantHash dateDifference(const QDate &fromDate, const QDate &toDate)const;
-
- /**
- * Returns the difference between two dates in completed calendar years.
- * The returned value will be negative if @p fromDate > @p toDate.
- *
- * For example, the difference between 2010-06-10 and 2012-09-5 is 2 years.
- *
- * @param fromDate The date to start from
- * @param toDate The date to end at
- * @return The number of years difference
- */
- Q_INVOKABLE int yearsDifference(const QDate &fromDate, const QDate &toDate) const;
-
- /**
- * Returns the difference between two dates in completed calendar months
- * The returned value will be negative if @p fromDate > @p toDate.
- *
- * For example, the difference between 2010-06-10 and 2012-09-5 is 26 months.
- * Note that the difference between two last days of the month is always 1
- * month, e.g. 2010-01-31 to 2010-02-28 is 1 month not 28 days.
- *
- * @param fromDate The date to start from
- * @param toDate The date to end at
- * @return The number of months difference
- */
- Q_INVOKABLE int monthsDifference(const QDate &fromDate, const QDate &toDate) const;
-
- /**
- * Returns the difference between two dates in days
- * The returned value will be negative if @p fromDate > @p toDate.
- *
- * @param fromDate The date to start from
- * @param toDate The date to end at
- * @return The number of days difference
- */
- Q_INVOKABLE int daysDifference(const QDate &fromDate, const QDate &toDate) const;
-
- /**
- *
- * Returns number of months in the given year
- *
- * @param year the required year
- * @return number of months in the year, -1 if input date invalid
- */
- Q_INVOKABLE int monthsInYear(int year) const;
-
- /**
- *
- * Returns the number of Weeks in a year using the required Week Number System.
- *
- * Unless you specifically want a particular Week Number System (e.g. ISO Weeks)
- * you should use the localized number of weeks provided by weeksInYear().
- *
- * @see week()
- * @see formatDate()
- * @param year the year
- * @param weekNumberSystem the week number system to use
- * @return number of weeks in the year, -1 if date invalid
- */
- Q_INVOKABLE int weeksInYear(int year, WeekNumberSystem weekNumberSystem) const;
-
- /**
- *
- * Returns the number of days in the given year.
- *
- * @param year the year
- * @return number of days in year, -1 if input date invalid
- */
- Q_INVOKABLE int daysInYear(int year) const;
-
- /**
- *
- * Returns the number of days in the given month.
- *
- * @param year the year the month is in
- * @param month the month
- * @return number of days in month, -1 if input date invalid
- */
- Q_INVOKABLE int daysInMonth(int year, int month) const;
-
- /**
- * Returns the number of days in the given week.
- *
- * @param date the date to obtain week from
- * @return number of days in week, -1 if input date invalid
- */
- Q_INVOKABLE int daysInWeek(const QDate &date) const;
-
- /**
- * Returns the day number of year for the given date
- *
- * The days are numbered 1..daysInYear()
- *
- * @param date the date to obtain day from
- * @return day of year number, -1 if input date not valid
- */
- Q_INVOKABLE int dayOfYear(const QDate &date) const;
-
- /**
- * Returns the weekday number for the given date
- *
- * The weekdays are numbered 1..7 for Monday..Sunday.
- *
- * This value is @em not affected by the value of weekStartDay()
- *
- * @param date the date to obtain day from
- * @return day of week number, -1 if input date not valid
- */
- Q_INVOKABLE int dayOfWeek(const QDate &date) const;
-
- /**
- * Returns the Week Number for the date in the required Week Number System.
- *
- * Unless you want a specific Week Number System (e.g. ISO Week), you should
- * use the localized Week Number form of week().
- *
- * If the date falls in the last week of the previous year or the first
- * week of the following year, then the yearNum returned will be set to the
- * appropriate year.
- *
- * Technically, the ISO Week Number only applies to the ISO/Gregorian Calendar
- * System, but the same rules will be applied to the current Calendar System.
- *
- * @see weeksInYear()
- * @see formatDate()
- * @param date the date to obtain week from
- * @param weekNumberSystem the Week Number System to use
- * @param yearNum returns the year the date belongs to
- * @return week number, -1 if input date invalid
- */
- Q_INVOKABLE int week(const QDate &date, WeekNumberSystem weekNumberSystem) const;
-
- /**
- * Returns whether a given year is a leap year.
- *
- * Input year must be checked for validity in current Calendar System prior to calling, no
- * validity checking performed in this routine, behaviour is undefined in invalid case.
- *
- * @param year the year to check
- * @return @c true if the year is a leap year, @c false otherwise
- */
- Q_INVOKABLE bool isLeapYear(int year) const;
-
- /**
- *
- * Returns a QDate containing the first day of the year
- *
- * @param year The year to return the date for
- * @return The first day of the year
- */
- Q_INVOKABLE QDate firstDayOfYear(int year) const;
-
- /**
- *
- * Returns a QDate containing the last day of the year
- *
- * @param year The year to return the date for
- * @return The last day of the year
- */
- Q_INVOKABLE QDate lastDayOfYear(int year) const;
-
- /**
- *
- * Returns a QDate containing the first day of the month
- *
- * @param year The year to return the date for
- * @param month The month to return the date for
- * @return The first day of the month
- */
- Q_INVOKABLE QDate firstDayOfMonth(int year, int month) const;
-
- /**
- *
- * Returns a QDate containing the last day of the month
- *
- * @param year The year to return the date for
- * @param month The month to return the date for
- * @return The last day of the month
- */
- Q_INVOKABLE QDate lastDayOfMonth(int year, int month) const;
-
- /**
- * Gets specific calendar type month name for a given month number
- * If an invalid month is specified, QString() is returned.
- *
- * @param month the month number
- * @param year the year the month belongs to
- * @param format specifies whether the short month name or long month name should be used
- * @return name of the month, empty string if any error
- */
- Q_INVOKABLE QString monthName(int month, int year, MonthNameFormat format = LongName) const;
-
- /**
- * Gets specific calendar type week day name.
- * If an invalid week day is specified, QString() is returned.
- *
- * @param weekDay number of day in week (Monday = 1, ..., Sunday = 7)
- * @param format specifies whether the short month name or long month name should be used
- * @return day name, empty string if any error
- */
- Q_INVOKABLE QString weekDayName(int weekDay, WeekDayNameFormat format = LongDayName) const;
-
- /**
- *
- * Returns a Date Component as a localized string in the requested format.
- *
- * For example for 2010-01-01 the Locale::Month with en_US Locale and Gregorian calendar may return:
- * CalendarSystem::ShortNumber = "1"
- * CalendarSystem::LongNumber = "01"
- * CalendarSystem::NarrowName = "J"
- * CalendarSystem::ShortName = "Jan"
- * CalendarSystem::LongName = "January"
- *
- * @param date The date to format
- * @param component The date component to return
- * @param format The format to return the @p component in
- * @param weekNumberSystem To override the default Week Number System to use
- * @return The localized string form of the date component
- */
- Q_INVOKABLE QString formatDate(const QDate &date, DateTimeComponent component,
- DateTimeComponentFormat format, WeekNumberSystem weekNumberSystem) const;
-
- /**
- * Converts a localized date string to a QDate.
- * This method is stricter than readDate(str,&ok): it will either accept
- * a date in full format or a date in short format, depending on @p flags.
- *
- * Uses the calendar system's internal locale set when the instance was
- * created, which ensures that the correct calendar system and locale
- * settings are respected, which would not occur in some cases if using
- * the global locale. Defaults to global locale.
- *
- * @see Locale::readDate
- *
- * @param str the string to convert
- * @param flags whether the date string is to be in full format or in short format
- * @param ok if non-null, will be set to @c true if the date is valid, @c false if invalid
- *
- * @return the string converted to a QDate
- */
- Q_INVOKABLE QDate readDate(const QString &str, ReadDateFlags flags) const;
-
- /**
- *
- * Returns the Short Year Window Start Year for the current Calendar System.
- *
- * Use this function to get the Start Year for the Short Year Window to be
- * applied when 2 digit years are entered for a Short Year input format,
- * e.g. if the Short Year Window Start Year is 1930, then the input Short
- * Year value of 40 is interpreted as 1940 and the input Short Year value
- * of 10 is interpreted as 2010.
- *
- * The Short Year Window is only ever applied when reading the Short Year
- * format and not the Long Year format, i.e. Locale::ShortFormat or '%y'
- * only and not Locale::LongFormat or '%Y'.
- *
- * The Start Year 0 effectively means not to use a Short Year Window
- *
- * Each Calendar System requires a different Short Year Window as they have
- * different epochs. The Gregorian Short Year Window usually pivots around
- * the year 2000, whereas the Hebrew Short Year Window usually pivots around
- * the year 5000.
- *
- * This value must always be used when evaluating user input Short Year
- * strings.
- *
- * @see Locale::shortYearWindowStartYear
- * @see Locale::applyShortYearWindow
- * @return the short year window start year
- */
- int shortYearWindowStartYear() const;
-
- /**
- *
- * Returns the Year Number after applying the Year Window.
- *
- * If the @p inputYear is between 0 and 99, then apply the Year Window and
- * return the calculated Year Number.
- *
- * If the @p inputYear is not between 0 and 99, then the original Year Number
- * is returned.
- *
- * @see Locale::setYearWindowOffset
- * @see Locale::yearWindowOffset
- * @param inputYear the year number to apply the year window to
- * @return the year number after applying the year window
- */
- Q_INVOKABLE int applyShortYearWindow(int inputYear) const;
-
- /**
- * Use this to determine which day is the first day of the week.
- *
- * Uses the calendar system's internal locale set when the instance was
- * created, which ensures that the correct calendar system and locale
- * settings are respected, which would not occur in some cases if using
- * the global locale. Defaults to global locale.
- *
- * @see Locale::weekStartDay
- *
- * @return an integer (Monday = 1, ..., Sunday = 7)
- */
- int weekStartDay() const;
-
- /**
- * Returns whether the calendar is lunar based.
- *
- * @return @c true if the calendar is lunar based, @c false if not
- */
- bool isLunar() const;
-
- /**
- * Returns whether the calendar is lunisolar based.
- *
- * @return @c true if the calendar is lunisolar based, @c false if not
- */
- bool isLunisolar() const;
-
- /**
- * Returns whether the calendar is solar based.
- *
- * @return @c true if the calendar is solar based, @c false if not
- */
- bool isSolar() const;
-
- /**
- * Returns whether the calendar system is proleptic, i.e. whether dates
- * before the epoch are supported.
- *
- * @see CalendarSystem::epoch
- *
- * @return @c true if the calendar system is proleptic, @c false if not
- */
- bool isProleptic() const;
-
-private:
- KCalendarSystem *m_calendarSystem;
-};
-
-#endif
diff --git a/plasma/declarativeimports/locale/locale.cpp b/plasma/declarativeimports/locale/locale.cpp
index c082ce6e..3b3f2064 100644
--- a/plasma/declarativeimports/locale/locale.cpp
+++ b/plasma/declarativeimports/locale/locale.cpp
@@ -25,91 +25,34 @@
#include
Locale::Locale(QObject* parent)
- : QObject(parent)
+ : QObject(parent)
{
m_locale = KGlobal::locale();
}
-bool Locale::isApplicationTranslatedInto(const QString &lang)
+Locale::BinaryUnitDialect Locale::binaryUnitDialect() const
{
- return m_locale->isApplicationTranslatedInto(lang);
+ return (Locale::BinaryUnitDialect)m_locale->binaryUnitDialect();
}
-void Locale::splitLocale(const QString &locale, QString &language, QString &country, QString &modifier,
- QString &charset)
+QString Locale::dateFormat(QLocale::FormatType format) const
{
- m_locale->splitLocale(locale, language, country, modifier, charset);
+ return m_locale->dateFormat(format);
}
-QString Locale::language() const
+QString Locale::timeFormat(QLocale::FormatType format) const
{
- return m_locale->language();
+ return m_locale->timeFormat(format);
}
-QString Locale::country() const
+QString Locale::dateTimeFormat(QLocale::FormatType format) const
{
- return m_locale->country();
+ return m_locale->dateTimeFormat(format);
}
-QString Locale::translateQt(const char *context, const char *sourceText) const
+QLocale::MeasurementSystem Locale::measureSystem() const
{
- return m_locale->translateQt(context, sourceText);
-}
-
-QList Locale::allDigitSetsList() const
-{
- QList digitList;
-
- foreach(KLocale::DigitSet digit, m_locale->allDigitSetsList()) {
- digitList.append((int)digit);
- }
-
- return digitList;
-}
-
-QString Locale::digitSetToName(Locale::DigitSet digitSet, bool withDigits) const
-{
- return m_locale->digitSetToName((KLocale::DigitSet)digitSet, withDigits);
-}
-
-QString Locale::convertDigits(const QString &str, DigitSet digitSet, bool ignoreContext) const
-{
- return m_locale->convertDigits(str, (KLocale::DigitSet)digitSet, ignoreContext);
-}
-
-bool Locale::dateMonthNamePossessive() const
-{
- return m_locale->dateMonthNamePossessive();
-}
-
-int Locale::weekStartDay() const
-{
- return m_locale->weekStartDay();
-}
-
-int Locale::decimalPlaces() const
-{
- return m_locale->decimalPlaces();
-}
-
-QString Locale::decimalSymbol() const
-{
- return m_locale->decimalSymbol();
-}
-
-QString Locale::thousandsSeparator() const
-{
- return m_locale->thousandsSeparator();
-}
-
-QString Locale::positiveSign() const
-{
- return m_locale->positiveSign();
-}
-
-QString Locale::negativeSign() const
-{
- return m_locale->negativeSign();
+ return m_locale->measureSystem();
}
QString Locale::formatLong(long num) const
@@ -122,10 +65,10 @@ QString Locale::formatNumber(const QString &numStr, bool round, int precision) c
return m_locale->formatNumber(numStr, round, precision);
}
-QString Locale::formatByteSize(double size, int precision, Locale::BinaryUnitDialect dialect,
- Locale::BinarySizeUnits specificUnit) const
+QString Locale::formatByteSize(double size, int precision,
+ Locale::BinarySizeUnits specificUnit) const
{
- return m_locale->formatByteSize(size, precision, (KLocale::BinaryUnitDialect)dialect, (KLocale::BinarySizeUnits)specificUnit);
+ return m_locale->formatByteSize(size, precision, (KLocale::BinarySizeUnits)specificUnit);
}
QString Locale::formatByteSize(double size) const
@@ -133,177 +76,68 @@ QString Locale::formatByteSize(double size) const
return m_locale->formatByteSize(size);
}
-Locale::BinaryUnitDialect Locale::binaryUnitDialect() const
-{
- return (Locale::BinaryUnitDialect)m_locale->binaryUnitDialect();
-}
-
-void Locale::setBinaryUnitDialect(Locale::BinaryUnitDialect newDialect)
-{
- m_locale->setBinaryUnitDialect((KLocale::BinaryUnitDialect)newDialect);
- emit binaryUnitDialectChanged();
-}
-
QString Locale::formatDuration(unsigned long mSec) const
{
return m_locale->formatDuration(mSec);
}
-QString Locale::prettyFormatDuration(unsigned long mSec) const
+QString Locale::formatDate(const QDate &date, QLocale::FormatType format) const
{
- return m_locale->prettyFormatDuration(mSec);
+ return m_locale->formatDate(date, format);
}
-QString Locale::formatDate(const QDate &date, Locale::DateFormat format) const
+QString Locale::formatTime(const QTime &time, QLocale::FormatType format) const
{
- return m_locale->formatDate(date, (KLocale::DateFormat)format);
+ return m_locale->formatTime(time, format);
+}
+
+QString Locale::formatDateTime(const QDateTime &dateTime, QLocale::FormatType format) const
+{
+ return m_locale->formatDateTime(dateTime, format);
}
double Locale::readNumber(const QString &_str) const
{
- bool ok;
+ bool ok = false;
return m_locale->readNumber(_str, &ok);
}
-QDate Locale::readDate(const QString &intstr, ReadDateFlags flags) const
+QDate Locale::readDate(const QString &intstr) const
{
- bool ok;
- return m_locale->readDate(intstr, (KLocale::ReadDateFlags)flags, &ok);
+ bool ok = false;
+ return m_locale->readDate(intstr, &ok);
}
QTime Locale::readTime(const QString &intstr) const
{
- bool ok;
+ bool ok = false;
return m_locale->readTime(intstr, &ok);
}
-QTime Locale::readLocaleTime(const QString &intstr, TimeFormatOptions options,
- TimeProcessingOptions processing) const
-{
- bool ok;
- return m_locale->readLocaleTime(intstr, &ok, (KLocale::TimeFormatOptions)(int)options, (KLocale::TimeProcessingOptions)(int)processing);
-}
-
-QString Locale::formatLocaleTime(const QTime &time, TimeFormatOptions options) const
-{
- return m_locale->formatLocaleTime(time, (KLocale::TimeFormatOptions)(int)options);
-}
-
-bool Locale::use12Clock() const
-{
- return m_locale->use12Clock();
-}
-
-QString Locale::dayPeriodText(const QTime &time, DateTimeComponentFormat format) const
-{
- return m_locale->dayPeriodText(time, (KLocale::DateTimeComponentFormat)format);
-}
-
QStringList Locale::languageList() const
{
return m_locale->languageList();
}
-QString Locale::formatDateTime(const QDateTime &dateTime, Locale::DateFormat format, DateTimeFormatOptions options) const
+bool Locale::isApplicationTranslatedInto(const QString &lang)
{
- return m_locale->formatDateTime(dateTime, (KLocale::DateFormat)format, (KLocale::DateTimeFormatOptions)(int)options);
+ return KLocale::isApplicationTranslatedInto(lang);
}
-void Locale::setDateFormat(const QString &format)
+void Locale::splitLocale(const QString &locale, QString &language, QString &country, QString &modifier,
+ QString &charset)
{
- m_locale->setDateFormat(format);
- emit dateFormatChanged();
+ KLocale::splitLocale(locale, language, country, modifier, charset);
}
-void Locale::setDateFormatShort(const QString &format)
+QString Locale::language() const
{
- m_locale->setDateFormatShort(format);
- emit dateFormatShortChanged();
+ return m_locale->language();
}
-void Locale::setDateMonthNamePossessive(bool possessive)
+QString Locale::translateQt(const char *context, const char *sourceText) const
{
- m_locale->setDateMonthNamePossessive(possessive);
- emit dateMonthNamePossessiveChanged();
-}
-
-void Locale::setTimeFormat(const QString &format)
-{
- m_locale->setTimeFormat(format);
- emit timeFormatChanged();
-}
-
-void Locale::setWeekStartDay(int day)
-{
- m_locale->setWeekStartDay(day);
- emit weekStartDayChanged();
-}
-
-QString Locale::dateFormat() const
-{
- return m_locale->dateFormat();
-}
-
-QString Locale::dateFormatShort() const
-{
- return m_locale->dateFormatShort();
-}
-
-QString Locale::timeFormat() const
-{
- return m_locale->timeFormat();
-}
-
-void Locale::setDecimalPlaces(int digits)
-{
- m_locale->setDecimalPlaces(digits);
- emit decimalPlacesChanged();
-}
-
-void Locale::setDecimalSymbol(const QString &symbol)
-{
- m_locale->setDecimalSymbol(symbol);
- emit decimalSymbolChanged();
-}
-
-void Locale::setThousandsSeparator(const QString &separator)
-{
- m_locale->setThousandsSeparator(separator);
- emit thousandsSeparatorChanged();
-}
-
-void Locale::setPositiveSign(const QString &sign)
-{
- m_locale->setPositiveSign(sign);
- emit positiveSignChanged();
-}
-
-void Locale::setNegativeSign(const QString &sign)
-{
- m_locale->setNegativeSign(sign);
- emit negativeSignChanged();
-}
-
-int Locale::pageSize() const
-{
- return m_locale->pageSize();
-}
-
-void Locale::setPageSize(int size)
-{
- m_locale->setPageSize(size);
- emit pageSizeChanged();
-}
-
-Locale::MeasureSystem Locale::measureSystem() const
-{
- return (Locale::MeasureSystem)m_locale->measureSystem();
-}
-
-void Locale::setMeasureSystem(Locale::MeasureSystem value)
-{
- m_locale->setMeasureSystem((KLocale::MeasureSystem)value);
- emit measureSystemChanged();
+ return m_locale->translateQt(context, sourceText);
}
QString Locale::defaultLanguage()
@@ -311,19 +145,14 @@ QString Locale::defaultLanguage()
return KLocale::defaultLanguage();
}
-QString Locale::defaultCountry()
+QStringList Locale::allLanguagesList()
{
- return KLocale::defaultCountry();
+ return KLocale::allLanguagesList();
}
-QStringList Locale::allLanguagesList() const
+QStringList Locale::installedLanguages()
{
- return m_locale->allLanguagesList();
-}
-
-QStringList Locale::installedLanguages() const
-{
- return m_locale->installedLanguages();
+ return KLocale::installedLanguages();
}
QString Locale::languageCodeToName(const QString &language) const
@@ -331,65 +160,16 @@ QString Locale::languageCodeToName(const QString &language) const
return m_locale->languageCodeToName(language);
}
-QStringList Locale::allCountriesList() const
-{
- return m_locale->allCountriesList();
-}
-
QString Locale::countryCodeToName(const QString &country) const
{
return m_locale->countryCodeToName(country);
}
-void Locale::setCalendarSystem(Locale::CalendarSystem calendarSystem)
-{
- m_locale->setCalendarSystem((KLocale::CalendarSystem)calendarSystem);
- emit calendarSystemChanged();
-}
-
-Locale::CalendarSystem Locale::calendarSystem() const
-{
- return (Locale::CalendarSystem)m_locale->calendarSystem();
-}
-
-void Locale::setWeekNumberSystem(Locale::WeekNumberSystem weekNumberSystem)
-{
- m_locale->setWeekNumberSystem((KLocale::WeekNumberSystem)weekNumberSystem);
- emit WeekNumberSystemChanged();
-}
-
-Locale::WeekNumberSystem Locale::weekNumberSystem() const
-{
- return (Locale::WeekNumberSystem)m_locale->weekNumberSystem();
-}
-
QString Locale::removeAcceleratorMarker(const QString &label) const
{
return m_locale->removeAcceleratorMarker(label);
}
-void Locale::setDigitSet(Locale::DigitSet digitSet)
-{
- m_locale->setDigitSet((KLocale::DigitSet)digitSet);
- emit digitSetChanged();
-}
-
-Locale::DigitSet Locale::digitSet() const
-{
- return (Locale::DigitSet)m_locale->digitSet();
-}
-
-void Locale::setDateTimeDigitSet(Locale::DigitSet digitSet)
-{
- m_locale->setDateTimeDigitSet((KLocale::DigitSet)digitSet);
- emit dateTimeDigitSetChanged();
-}
-
-Locale::DigitSet Locale::dateTimeDigitSet() const
-{
- return (Locale::DigitSet)m_locale->dateTimeDigitSet();
-}
-
void Locale::reparseConfiguration()
{
m_locale->reparseConfiguration();
diff --git a/plasma/declarativeimports/locale/locale_p.h b/plasma/declarativeimports/locale/locale_p.h
index d4b504cc..d55c550e 100644
--- a/plasma/declarativeimports/locale/locale_p.h
+++ b/plasma/declarativeimports/locale/locale_p.h
@@ -22,17 +22,14 @@
//Qt
#include
-#include
-#include
-
-//KDE
-#include
-
#include
#include
#include
#include
+//KDE
+#include
+
/**
* \file klocale.h
*/
@@ -60,230 +57,26 @@
*/
class Locale : public QObject
{
-Q_OBJECT
+ Q_OBJECT
-//enuns
-Q_ENUMS(BinarySizeUnits)
-Q_ENUMS(BinaryUnitDialect)
-Q_ENUMS(CalendarSystem)
-Q_ENUMS(DateFormat)
-Q_ENUMS(DateTimeComponent)
-Q_ENUMS(DateTimeComponentFormat)
-Q_ENUMS(DateTimeFormatOption )
-Q_ENUMS(DigitSet)
-Q_ENUMS(MeasureSystem)
-Q_ENUMS(ReadDateFlags)
-Q_ENUMS(SignPosition)
-Q_ENUMS(TimeFormatOption)
-Q_ENUMS(TimeProcessingOption)
-Q_ENUMS(WeekNumberSystem)
+ // enums
+ Q_ENUMS(BinarySizeUnits)
+ Q_ENUMS(BinaryUnitDialect)
-//properties
-Q_PROPERTY(BinaryUnitDialect binaryUnitDialect READ binaryUnitDialect WRITE setBinaryUnitDialect NOTIFY binaryUnitDialectChanged)
-Q_PROPERTY(Locale::CalendarSystem calendarSystem READ calendarSystem WRITE setCalendarSystem NOTIFY calendarSystemChanged)
-Q_PROPERTY(QString country READ country CONSTANT) //read-only
-Q_PROPERTY(QString dateFormat READ dateFormat WRITE setDateFormat NOTIFY dateFormatChanged)
-Q_PROPERTY(QString dateFormatShort READ dateFormatShort WRITE setDateFormat NOTIFY dateFormatShortChanged)
-Q_PROPERTY(QString timeFormat READ timeFormat WRITE setTimeFormat NOTIFY timeFormatChanged)
-Q_PROPERTY(bool dateMonthNamePossessive READ dateMonthNamePossessive WRITE setDateMonthNamePossessive NOTIFY dateMonthNamePossessiveChanged)
-Q_PROPERTY(DigitSet dateTimeDigitSet READ dateTimeDigitSet WRITE setDateTimeDigitSet NOTIFY dateTimeDigitSetChanged)
-Q_PROPERTY(int decimalPlaces READ decimalPlaces WRITE setDecimalPlaces NOTIFY decimalPlacesChanged)
-Q_PROPERTY(QString decimalSymbol READ decimalSymbol WRITE setDecimalSymbol NOTIFY decimalSymbolChanged)
-Q_PROPERTY(DigitSet digitSet READ digitSet WRITE setDigitSet NOTIFY digitSetChanged)
-Q_PROPERTY(QString language READ language CONSTANT) //read-only
-Q_PROPERTY(MeasureSystem measureSystem READ measureSystem WRITE setMeasureSystem NOTIFY measureSystemChanged)
-Q_PROPERTY(QString negativeSign READ negativeSign WRITE setNegativeSign NOTIFY negativeSignChanged)
-Q_PROPERTY(int pageSize READ pageSize WRITE setPageSize NOTIFY pageSizeChanged)
-Q_PROPERTY(QString positiveSign READ positiveSign WRITE setPositiveSign NOTIFY positiveSignChanged)
-Q_PROPERTY(QString thousandsSeparator READ thousandsSeparator WRITE setThousandsSeparator NOTIFY thousandsSeparatorChanged)
-Q_PROPERTY(Locale::WeekNumberSystem weekNumberSystem READ weekNumberSystem WRITE setWeekNumberSystem NOTIFY WeekNumberSystemChanged)
-Q_PROPERTY(int weekStartDay READ weekStartDay WRITE setWeekStartDay NOTIFY weekStartDayChanged)
-Q_PROPERTY(bool use12Clock READ use12Clock CONSTANT)
-Q_PROPERTY(QString defaultLanguage READ defaultLanguage CONSTANT)//read-only
-Q_PROPERTY(QString defaultCountry READ defaultCountry CONSTANT)//read-only
-Q_PROPERTY(QStringList languageList READ languageList CONSTANT) //read-only
-Q_PROPERTY(QStringList allLanguagesList READ allLanguagesList CONSTANT) //read-only
-Q_PROPERTY(QStringList installedLanguages READ installedLanguages CONSTANT) //read-only
-Q_PROPERTY(QStringList allCountriesList READ allCountriesList CONSTANT) //read-only
-Q_PROPERTY(QList allDigitSetsList READ allDigitSetsList CONSTANT) //read-only
+ // properties
+ Q_PROPERTY(BinaryUnitDialect binaryUnitDialect READ binaryUnitDialect CONSTANT) //read-only
+ Q_PROPERTY(QString language READ language CONSTANT) //read-only
+ Q_PROPERTY(QString defaultLanguage READ defaultLanguage CONSTANT)//read-only
+ Q_PROPERTY(QStringList languageList READ languageList CONSTANT) //read-only
+ Q_PROPERTY(QStringList allLanguagesList READ allLanguagesList CONSTANT) //read-only
+ Q_PROPERTY(QStringList installedLanguages READ installedLanguages CONSTANT) //read-only
public:
- /**
- * ctor
- */
Locale(QObject *parent = 0);
- /**
- *
- * The set of digit characters used to display and enter numbers.
- */
- enum DigitSet {
- ArabicDigits, /**< 0123456789 (European and some Asian
- languages and western Arabic dialects) */
- ArabicIndicDigits, /**< ٠١٢٣٤٥٦٧٨٩ (eastern Arabic dialects) */
- EasternArabicIndicDigits, /**< ۰۱۲۳۴۵۶۷۸۹ (Persian and Urdu) */
- DevenagariDigits, /**< ०१२३४५६७८९ (Hindi) */
- BengaliDigits, /**< ০১২৩৪৫৬৭৮৯ (Bengali and Assamese) */
- GujaratiDigits, /**< ૦૧૨૩૪૫૬૭૮૯ (Gujarati) */
- GurmukhiDigits, /**< ੦੧੨੩੪੫੬੭੮੯ (Punjabi) */
- KannadaDigits, /**< ೦೧೨೩೪೫೬೭೮೯ (Kannada) */
- KhmerDigits, /**< ០១២៣៤៥៦៧៨៩ (Khmer) */
- MalayalamDigits, /**< ൦൧൨൩൪൫൬൭൮൯ (Malayalam) */
- OriyaDigits, /**< ୦୧୨୩୪୫୬୭୮୯ (Oriya) */
- TamilDigits, /**< ௦௧௨௩௪௫௬௭௮ (Tamil) */
- TeluguDigits, /**< ౦౧౨౩౪౫౬౭౯ (Telugu) */
- ThaiDigits /**< ๐๑๒๓๔๕๖๗๘๙ (Thai) */
- // The following Decimal Digit Sets are defined in Unicode but the associated
- // languages are not yet translated in KDE, so are not yet enabled.
- // The script names are taken from the Unicode standard, the associated
- // languages from Wikipedia.
- // BalineseDigits, /**< ᭐᭑᭒᭓᭔᭕᭖᭗᭘᭙ (Balinese) */
- // ChamDigits, /**< ꩐꩑꩒꩓꩔꩕꩖꩗꩘꩙ (Cham) */
- // JavaneseDigits, /**< ꧐꧑꧒꧓꧔꧕꧖꧗꧘꧙ (Javanese) */
- // KayahLiDigits, /**< ꤀꤁꤂꤃꤄꤅꤆꤇꤈꤉ (Kayah) */
- // LaoDigits, /**< ໐໑໒໓໔໕໖໗໘໙ (Lao) */
- // LepchaDigits, /**< ᱀᱁᱂᱃᱄᱅᱆᱇᱈᱉ (Lepcha) */
- // LimbuDigits, /**< ᥆᥇᥈᥉᥊᥋᥌᥍᥎᥏ (Limbu) */
- // MeeteiMayekDigits, /**< ꯰꯱꯲꯳꯴꯵꯶꯷꯸꯹ (Meitei) */
- // MongolianDigits, /**< ᠐᠑᠒᠓᠔᠕᠖᠗᠘᠙ (Mongolian) */
- // MyanmarDigits, /**< ၀၁၂၃၄၅၆၇၈၉ (Myanmar/Burmese ) */
- // MyanmarShanDigits, /**< ႐႑႒႓႔႕႖႗႘႙ (Shan) */
- // NewTaiLueDigits, /**< ᧐᧑᧒᧓᧔᧕᧖᧗᧘᧙ (Tai Lü) */
- // NKoDigits, /**< ߀߁߂߃߄߅߆߇߈߉ (Mande and N'Ko) */
- // OlChikiDigits, /**< ᱐᱑᱒᱓᱔᱕᱖᱗᱘᱙ (Santali) */
- // OsmanyaDigits, /**< ҠҡҢңҤҥҦҧҨҩ (Somali) */
- // SaurashtraDigits, /**< ꣐꣑꣒꣓꣔꣕꣖꣗꣘꣙ (Saurashtra) */
- // SundaneseDigits, /**< ᮰᮱᮲᮳᮴᮵᮶᮷᮸᮹ (Sundanese) */
- // TaiThamDigits, /**< ᪐᪑᪒᪓᪔᪕᪖᪗᪘᪙ (Tai Lü) */
- // TibetanDigits, /**< ༠༡༢༣༤༥༦༧༨༩ (Tibetan) */
- // VaiDigits, /**< ꘠꘡꘢꘣꘤꘥꘦꘧꘨꘩ (Vai) */
- };
-
- /**
- *
- * Convert a digit set identifier to a human readable, localized name.
- *
- * @param digitSet the digit set identifier
- * @param withDigits whether to add the digits themselves to the name
- *
- * @return the human readable and localized name of the digit set
- *
- * @see DigitSet
- */
- QString digitSetToName(DigitSet digitSet, bool withDigits = false) const;
-
- /**
- *
- * Provides list of all known digit set identifiers.
- *
- * @return list of all digit set identifiers
- * @see DigitSet
- * @see digitSetToName
- */
- QList allDigitSetsList() const;
-
- /**
- * Returns what a decimal point should look like ("." or "," etc.)
- * according to the current locale or user settings.
- *
- * @return The decimal symbol used by locale.
- */
- QString decimalSymbol() const;
-
- /**
- * Returns what the thousands separator should look
- * like ("," or "." etc.)
- * according to the current locale or user settings.
- *
- * @return The thousands separator used by locale.
- */
- QString thousandsSeparator() const;
-
- /**
- *
- * Returns the identifier of the digit set used to display numbers.
- *
- * @return the digit set identifier
- * @see DigitSet
- * @see digitSetToName
- */
- DigitSet digitSet() const;
-
- /**
- * Returns what a positive sign should look like ("+", " ", etc.)
- * according to the current locale or user settings.
- *
- * @return The positive sign used by locale.
- */
- QString positiveSign() const;
-
- /**
- * Returns what a negative sign should look like ("-", etc.)
- * according to the current locale or user settings.
- *
- * @return The negative sign used by locale.
- */
- QString negativeSign() const;
-
- /**
- *
- * The number of decimal places to include in numeric values (usually 2).
- *
- * @return Default number of numeric decimal places used by locale.
- */
- int decimalPlaces() const;
-
- /**
- * Given a string representing a number, converts that to a numeric
- * string containing the localized numeric equivalent.
- *
- * e.g. given 123456.78F, return "123,456.78" (for some European country).
- *
- * If precision isn't specified or is < 0, then the default decimalPlaces() is used.
- *
- * @param numStr The number to format, as a string.
- * @param round Round fractional digits. (default true)
- * @param precision Number of fractional digits used for rounding. Unused if round=false.
- *
- * @return The number as a localized string
- */
- Q_INVOKABLE QString formatNumber(const QString &numStr, bool round = true, int precision = -1) const;
-
- /**
- * Given an integer, converts that to a numeric string containing
- * the localized numeric equivalent.
- *
- * e.g. given 123456L, return "123,456" (for some European country).
- *
- * @param num The number to convert
- *
- * @return The number as a localized string
- */
- Q_INVOKABLE QString formatLong(long num) const;
-
- /**
- * These binary units are used in KDE by the formatByteSize()
- * functions.
- *
- * NOTE: There are several different units standards:
- * 1) SI (i.e. metric), powers-of-10.
- * 2) IEC, powers-of-2, with specific units KiB, MiB, etc.
- * 3) JEDEC, powers-of-2, used for solid state memory sizing which
- * is why you see flash cards labels as e.g. 4GB. These (ab)use
- * the metric units. Although JEDEC only defines KB, MB, GB, if
- * JEDEC is selected all units will be powers-of-2 with metric
- * prefixes for clarity in the event of sizes larger than 1024 GB.
- *
- * Although 3 different dialects are possible this enum only uses
- * metric names since adding all 3 different names of essentially the same
- * unit would be pointless. Use BinaryUnitDialect to control the exact
- * units returned.
- *
- * @see binaryUnitDialect
- */
enum BinarySizeUnits {
/// Auto-choose a unit such that the result is in the range [0, 1000 or 1024)
- DefaultBinaryUnits = 1000,
+ DefaultBinaryUnits = -1,
// The first real unit must be 0 for the current implementation!
UnitByte = 0, ///< B 1 byte
@@ -295,924 +88,58 @@ public:
UnitExaByte, ///< EiB/EB/EB 2^60/10^18 bytes.
UnitZettaByte, ///< ZiB/ZB/ZB 2^70/10^21 bytes.
UnitYottaByte, ///< YiB/YB/YB 2^80/10^24 bytes.
- UnitLastUnit = UnitYottaByte
+ LastBinaryUnit = UnitYottaByte
};
- /**
- * This enum chooses what dialect is used for binary units.
- *
- * Note: Although JEDEC abuses the metric prefixes and can therefore be
- * confusing, it has been used to describe *memory* sizes for quite some time
- * and programs should therefore use either Default, JEDEC, or IEC 60027-2
- * for memory sizes.
- *
- * On the other hand network transmission rates are typically in metric so
- * Default, Metric, or IEC (which is unambiguous) should be chosen.
- *
- * Normally choosing DefaultBinaryUnits is the best option as that uses
- * the user's selection for units.
- *
- * @see binaryUnitDialect
- * @see setBinaryUnitDialect
- */
enum BinaryUnitDialect {
- DefaultBinaryDialect = 1000, ///< Used if no specific preference
IECBinaryDialect = 0, ///< KDE Default, KiB, MiB, etc. 2^(10*n)
JEDECBinaryDialect, ///< KDE 3.5 default, KB, MB, etc. 2^(10*n)
MetricBinaryDialect, ///< SI Units, kB, MB, etc. 10^(3*n)
LastBinaryDialect = MetricBinaryDialect
};
- /**
- * Converts @p size from bytes to the string representation using the
- * user's default binary unit dialect. The default unit dialect is
- * IEC 60027-2.
- *
- * Example:
- * formatByteSize(1024) returns "1.0 KiB" by default.
- *
- * @param size size in bytes
- * @return converted size as a string - e.g. 123.4 KiB , 12.0 MiB
- * @see BinaryUnitDialect
- * @todo KDE 5: Remove in favor of overload added in KDE 4.4.
- */
- Q_INVOKABLE QString formatByteSize(double size) const;
+ BinaryUnitDialect binaryUnitDialect() const;
+ QString dateFormat(QLocale::FormatType format) const;
+ QString timeFormat(QLocale::FormatType format) const;
+ QString dateTimeFormat(QLocale::FormatType format) const;
+ QLocale::MeasurementSystem measureSystem() const;
- /**
- *
- * Converts @p size from bytes to the appropriate string representation
- * using the binary unit dialect @p dialect and the specific units @p specificUnit.
- *
- * Example:
- * formatByteSize(1000, unit, Locale::BinaryUnitKilo) returns:
- * for Locale::MetricBinaryUnits, "1.0 kB",
- * for Locale::IECBinaryUnits, "0.9 KiB",
- * for Locale::JEDECBinaryUnits, "0.9 KB".
- *
- * @param size size in bytes
- * @param precision number of places after the decimal point to use. KDE uses
- * 1 by default so when in doubt use 1.
- * @param dialect binary unit standard to use. Use DefaultBinaryUnits to
- * use the localized user selection unless you need to use a specific
- * unit type (such as displaying a flash memory size in JEDEC).
- * @param specificUnit specific unit size to use in result. Use
- * DefaultBinarySize to automatically select a unit that will return
- * a sanely-sized number.
- * @return converted size as a translated string including the units.
- * E.g. "1.23 KiB", "2 GB" (JEDEC), "4.2 kB" (Metric).
- * @see BinaryUnitDialect
- */
+ Q_INVOKABLE QString formatNumber(const QString &numStr, bool round = true, int precision = -1) const;
+ Q_INVOKABLE QString formatLong(long num) const;
+ Q_INVOKABLE QString formatByteSize(double size) const;
QString formatByteSize(double size, int precision,
- BinaryUnitDialect dialect = Locale::DefaultBinaryDialect,
BinarySizeUnits specificUnit = Locale::DefaultBinaryUnits) const;
- /**
- * Returns the user's configured binary unit dialect.
- * e.g. if MetricBinaryDialect is returned then the values
- * configured for how much a set of bytes are worth would
- * be 10^(3*n) and KB (1000 bytes == 1 KB), in this case.
- *
- * Will never return DefaultBinaryDialect.
- *
- * @return User's configured binary unit dialect
- * @see BinaryUnitDialect
- */
- BinaryUnitDialect binaryUnitDialect() const;
-
- /**
- * Sets @p newDialect to be the default dialect for this locale (and only
- * this locale). Newly created KLocale objects will continue to default
- * to the user's choice.
- *
- * @param newDialect the new dialect to set as default for this locale object.
- */
- void setBinaryUnitDialect(BinaryUnitDialect newDialect);
-
- /**
- * Given a number of milliseconds, converts that to a string containing
- * the localized equivalent
- *
- * e.g. given formatDuration(60000), returns "1.0 minutes"
- *
- * @param mSec Time duration in milliseconds
- * @return converted duration as a string - e.g. "5.5 seconds" "23.0 minutes"
- */
Q_INVOKABLE QString formatDuration(unsigned long mSec) const;
+ Q_INVOKABLE QString formatDate(const QDate &date, QLocale::FormatType format = QLocale::ShortFormat) const;
+ Q_INVOKABLE QString formatDateTime(const QDateTime &dateTime, QLocale::FormatType format = QLocale::ShortFormat) const;
+ Q_INVOKABLE QString formatTime(const QTime &time, QLocale::FormatType format = QLocale::ShortFormat) const;
- /**
- * Given a number of milliseconds, converts that to a pretty string containing
- * the localized equivalent.
- *
- * e.g. given prettyFormatDuration(60001) returns "1 minute"
- * given prettyFormatDuration(62005) returns "1 minute and 2 seconds"
- * given prettyFormatDuration(90060000) returns "1 day and 1 hour"
- *
- * @param mSec Time duration in milliseconds
- * @return converted duration as a string.
- * Units not interesting to the user, for example seconds or minutes when the first
- * unit is day, are not returned because they are irrelevant. The same applies for
- * seconds when the first unit is hour.
- */
- Q_INVOKABLE QString prettyFormatDuration(unsigned long mSec) const;
-
- /**
- *
- * Available Calendar Systems
- *
- * @see setCalendarSystem()
- * @see calendarSystem()
- */
- enum CalendarSystem {
- QDateCalendar = 1, /**< KDE Default, hybrid of Gregorian and Julian as used by QDate */
- //BahaiCalendar = 2, /**< Baha'i Calendar */
- //BuddhistLunarCalendar = 3, /**< Buddhist Lunar Calendar*/
- //ChineseCalendar = 4, /**< Chinese Calendar */
- CopticCalendar = 5, /**< Coptic Calendar as used Coptic Church and some parts of Egypt */
- EthiopianCalendar = 6, /**< Ethiopian Calendar, aka Ethiopic Calendar */
- //EthiopianAmeteAlemCalendar = 7, /**< Ethiopian Amete Alem version, aka Ethiopic Amete Alem */
- GregorianCalendar = 8, /**< Gregorian Calendar, pure proleptic implementation */
- HebrewCalendar = 9, /**< Hebrew Calendar, aka Jewish Calendar */
- //HinduCalendar = 10, /**< Hindu Lunar Calendar */
- //IslamicLunarCalendar = 11, /**< Islamic Lunar Calendar */
- IslamicCivilCalendar = 12, /**< Islamic Civil Calendar, aka Hijri, not the Lunar Calendar */
- //IslamicUmAlQuraCalendar = 13, /**< Islamic Lunar Calendar, Um Al Qura varient used in Saudi Arabia */
- IndianNationalCalendar = 14, /**< Indian National Calendar, not the Lunar Calendar */
- //Iso8601Calendar = 15, /**< ISO 8601 Standard Calendar */
- JalaliCalendar = 16, /**< Jalali Calendar, aka Persian or Iranian, also used in Afghanistan */
- //JalaliBirashkCalendar = 17, /**< Jalali Calendar, Birashk Algorythm variant */
- //Jalali33YearCalendar = 18, /**< Jalali Calendar, 33 Year cycle variant */
- JapaneseCalendar= 19, /**< Japanese Calendar, Gregorian calculation using Japanese Era (Nengô) */
- //JucheCalendar = 20, /**< Juche Calendar, used in North Korea */
- JulianCalendar = 21, /**< Julian Calendar, as used in Orthodox Churches */
- MinguoCalendar= 22, /**< Minguo Calendar, aka ROC, Republic of China or Taiwanese */
- ThaiCalendar = 23 /**< Thai Calendar, aka Buddhist or Thai Buddhist */
- };
-
- /**
- *
- * System used for Week Numbers
- *
- * @see setWeekNumberSystem()
- * @see weekNumberSystem()
- */
- enum WeekNumberSystem {
- DefaultWeekNumber = 1000, /**< The system locale default */
- IsoWeekNumber = 0, /**< ISO Week Number */
- FirstFullWeek = 1, /**< Week 1 starts on the first Week Start Day in year ends after 7 days */
- FirstPartialWeek = 2, /**< Week 1 starts Jan 1st ends day before first Week Start Day in year */
- SimpleWeek = 3 /**< Week 1 starts Jan 1st ends after 7 days */
- };
-
- /**
- *
- * The various Components that make up a Date / Time
- * In the future the Components may be combined as flags for dynamic
- * generation of Date Formats.
- *
- * @see CalendarSystem
- * @see DateTimeComponentFormat
- */
- enum DateTimeComponent {
- Year = 0x1, /**< The Year portion of a date, may be number or name */
- YearName = 0x2, /**< The Year Name portion of a date */
- Month = 0x4, /**< The Month portion of a date, may be number or name */
- MonthName = 0x8, /**< The Month Name portion of a date */
- Day = 0x10, /**< The Day portion of a date, may be number or name */
- DayName = 0x20, /**< The Day Name portion of a date */
- JulianDay = 0x40, /**< The Julian Day of a date */
- EraName = 0x80, /**< The Era Name portion of a date */
- EraYear = 0x100, /**< The Era and Year portion of a date */
- YearInEra = 0x200, /**< The Year In Era portion of a date */
- DayOfYear = 0x400, /**< The Day Of Year portion of a date, may be number or name */
- DayOfYearName = 0x800, /**< The Day Of Year Name portion of a date */
- DayOfWeek = 0x1000, /**< The Day Of Week / Weekday portion of a date, may be number or name */
- DayOfWeekName = 0x2000, /**< The Day Of Week Name / Weekday Name portion of a date */
- Week = 0x4000, /**< The Week Number portion of a date */
- WeekYear = 0x8000, /**< The Week Year portion of a date */
- MonthsInYear = 0x10000, /**< The Months In Year portion of a date */
- WeeksInYear = 0x20000, /**< The Weeks In Year portion of a date */
- DaysInYear = 0x40000, /**< The Days In Year portion of a date */
- DaysInMonth = 0x80000, /**< The Days In Month portion of a date */
- DaysInWeek = 0x100000, /**< The Days In Week portion of a date */
- Hour = 0x200000, /**< The Hours portion of a date */
- Minute = 0x400000, /**< The Minutes portion of a date */
- Second = 0x800000, /**< The Seconds portion of a date */
- Millisecond = 0x1000000, /**< The Milliseconds portion of a date */
- DayPeriod = 0x2000000, /**< The Day Period portion of a date, e.g. AM/PM */
- DayPeriodHour = 0x4000000, /**< The Day Period Hour portion of a date */
- Timezone = 0x8000000, /**< The Time Zone portion of a date, may be offset or name */
- TimezoneName = 0x10000000, /**< The Time Zone Name portion of a date */
- UnixTime = 0x20000000 /**< The UNIX Time portion of a date */
- };
-
- /**
- *
- * Format used for individual Date/Time Components when converted to/from a string
- * Largely equivalent to the UNICODE CLDR format width definitions 1..5
- *
- * @see DateTimeComponentFormat
- */
- enum DateTimeComponentFormat {
- DefaultComponentFormat = 1000, /**< The system locale default for the componant */
- ShortNumber = 0, /**< Number at its natural width, e.g. 2 for the 2nd*/
- LongNumber, /**< Number padded to a required width, e.g. 02 for the 2nd*/
- //OrdinalNumber /**< Ordinal number format, e.g. "2nd" for the 2nd */
- NarrowName = 3, /**< Narrow text format, may not be unique, e.g. M for Monday */
- ShortName, /**< Short text format, e.g. Mon for Monday */
- LongName /**< Long text format, e.g. Monday for Monday */
- };
-
- Q_DECLARE_FLAGS(DateTimeComponents, DateTimeComponent)
- Q_FLAGS(DateTimeComponents)
-
- /**
- * Format for date string.
- */
- enum DateFormat {
- ShortDate, /**< Locale Short date format, e.g. 08-04-2007 */
- LongDate, /**< Locale Long date format, e.g. Sunday 08 April 2007 */
- FancyShortDate, /**< Same as ShortDate for dates a week or more ago. For more
- recent dates, it is represented as Today, Yesterday, or
- the weekday name. */
- FancyLongDate, /**< Same as LongDate for dates a week or more ago. For more
- recent dates, it is represented as Today, Yesterday, or
- the weekday name. */
- IsoDate, /**< ISO-8601 Date format YYYY-MM-DD, e.g. 2009-12-31 */
- IsoWeekDate, /**< ISO-8601 Week Date format YYYY-Www-D, e.g. 2009-W01-1 */
- IsoOrdinalDate /**< ISO-8601 Ordinal Date format YYYY-DDD, e.g. 2009-001 */
- };
-
- /**
- * Returns a string formatted to the current locale's conventions
- * regarding dates.
- *
- * @param date the date to be formatted
- * @param format category of date format to use
- *
- * @return the date as a string
- */
- Q_INVOKABLE QString formatDate(const QDate &date, DateFormat format = LongDate) const;
-
- /**
- * Options for formatting date-time values.
- */
- enum DateTimeFormatOption {
- TimeZone = 0x01, /**< Include a time zone string */
- Seconds = 0x02 /**< Include the seconds value */
- };
-
- Q_DECLARE_FLAGS(DateTimeFormatOptions, DateTimeFormatOption)
- Q_FLAGS(DateTimeFormatOptions)
-
- /**
- * Returns a string formatted to the current locale's conventions
- * regarding both date and time.
- *
- * @param dateTime the date and time to be formatted
- * @param format category of date format to use
- * @param options additional output options
- *
- * @return The date and time as a string
- */
- Q_INVOKABLE QString formatDateTime(const QDateTime &dateTime, DateFormat format = ShortDate,
- DateTimeFormatOptions options = 0) const;
-
- /**
- * Use this to determine whether in dates a possessive form of month
- * name is preferred ("of January" rather than "January")
- *
- * @return If possessive form should be used
- */
- bool dateMonthNamePossessive() const;
-
- /**
- *
- * Format flags for readLocaleTime() and formatLocaleTime()
- */
- enum TimeFormatOption {
- TimeDefault = 0x0, ///< Default formatting using seconds and the format
- ///< as specified by the locale.
- TimeWithoutSeconds = 0x1, ///< Exclude the seconds part of the time from display
- TimeWithoutAmPm = 0x2, ///< Read/format time string without am/pm suffix but
- ///< keep the 12/24h format as specified by locale time
- ///< format, eg. "07.33.05" instead of "07.33.05 pm" for
- ///< time format "%I.%M.%S %p".
- TimeDuration = 0x6, ///< Read/format time string as duration. This will strip
- ///< the am/pm suffix and read/format times with an hour
- ///< value of 0-23 hours, eg. "19.33.05" instead of
- ///< "07.33.05 pm" for time format "%I.%M.%S %p".
- ///< This automatically implies @c TimeWithoutAmPm.
- TimeFoldHours = 0xE ///< Read/format time string as duration. This will not
- ///< not output the hours part of the duration but will
- ///< add the hours (times sixty) to the number of minutes,
- ///< eg. "70.23" instead of "01.10.23" for time format
- ///< "%I.%M.%S %p".
- };
-
- Q_DECLARE_FLAGS(TimeFormatOptions, TimeFormatOption)
- Q_FLAGS(TimeFormatOptions)
-
- /**
- *
- * Returns a string formatted to the current locale's conventions
- * regarding times.
- *
- * @param pTime the time to be formatted
- * @param options format option to use when formatting the time
- * @return The time as a string
- */
- Q_INVOKABLE QString formatLocaleTime(const QTime &pTime,
- TimeFormatOptions options = Locale::TimeDefault) const;
-
- /**
- *
- * Returns the identifier of the digit set used to display dates and time.
- *
- * @return the digit set identifier
- * @see DigitSet
- * @see digitSetToName
- */
- DigitSet dateTimeDigitSet() const;
-
- /**
- * Use this to determine if the user wants a 12 hour clock.
- *
- * @return If the user wants 12h clock
- */
- bool use12Clock() const;
-
- /**
- *
- * Returns the Day Period matching the time given
- *
- * @param time the time to return the day period for
- * @param format the format to return teh day period in
- * @return the Day Period for the given time
- */
- Q_INVOKABLE QString dayPeriodText(const QTime &time, DateTimeComponentFormat format = DefaultComponentFormat) const;
-
- /**
- * Use this to determine which day is the first day of the week.
- *
- * @return an integer (Monday=1..Sunday=7)
- */
- int weekStartDay() const;
-
- /**
- *
- * Returns the type of Calendar System used in this Locale
- *
- * @see Locale::CalendarSystem
- * @see CalendarSystem
- * @return the type of Calendar System
- */
- Locale::CalendarSystem calendarSystem() const;
-
- /**
- *
- * Sets the type of Calendar System to use in this Locale
- *
- * @see Locale::CalendarSystem
- * @see CalendarSystem
- * @param calendarSystem the Calendar System to use
- */
- void setCalendarSystem(Locale::CalendarSystem calendarSystem);
-
- /**
- *
- * Sets the type of Week Number System to use in this Locale
- *
- * @see Klocale::WeekNumberSystem
- * @see weekNumberSystem()
- * @param weekNumberSystem the Week Number System to use
- */
- void setWeekNumberSystem(Locale::WeekNumberSystem weekNumberSystem);
-
- /**
- *
- * Returns the type of Week Number System used in this Locale
- *
- * @see Klocale::WeekNumberSystem
- * @see setWeekNumberSystem()
- * @returns the Week Number System used
- */
- Locale::WeekNumberSystem weekNumberSystem() const;
-
- /**
- * Converts a localized numeric string to a double.
- *
- * @param numStr the string we want to convert.
- * @return The string converted to a double
- */
Q_INVOKABLE double readNumber(const QString &numStr) const;
-
- /**
- * Flags for readDate()
- */
- enum ReadDateFlags {
- NormalFormat = 1, /**< Only accept a date string in
- the locale LongDate format */
- ShortFormat = 2, /**< Only accept a date string in
- the locale ShortDate format */
- IsoFormat = 4, /**< Only accept a date string in
- ISO date format (YYYY-MM-DD) */
- IsoWeekFormat = 8, /**< Only accept a date string in
- ISO Week date format (YYYY-Www-D) */
- IsoOrdinalFormat = 16 /**< Only accept a date string in
- ISO Week date format (YYYY-DDD) */
- };
-
- /**
- * Converts a localized date string to a QDate.
- * This method is stricter than readDate(str,&ok): it will only accept
- * a date in a specific format, depending on @p flags.
- *
- * @param str the string we want to convert.
- * @param flags what format the the date string will be in
- * @return The string converted to a QDate
- * @see CalendarSystem::readDate()
- */
- Q_INVOKABLE QDate readDate(const QString &str, ReadDateFlags flags) const;
-
- /**
- * Converts a localized time string to a QTime.
- * This method will try to parse it with seconds, then without seconds.
- *
- * @param str the string we want to convert.
- *
- * @return The string converted to a QTime
- */
+ Q_INVOKABLE QDate readDate(const QString &str) const;
Q_INVOKABLE QTime readTime(const QString &str) const;
- /**
- * Additional processing options for readLocaleTime().
- *
- * @remarks This is currently used as an enum but declared as a flag
- * to be extensible
- */
- enum TimeProcessingOption {
- ProcessStrict = 0x1, ///< Process time in a strict manner, ie.
- ///< a read time string has to exactly match
- ///< the defined time format.
- ProcessNonStrict = 0x2 ///< Process time in a lax manner, ie.
- ///< allow spaces in the time-format to be
- ///< left out when entering a time string.
- };
+ Q_INVOKABLE QString language() const;
- Q_DECLARE_FLAGS(TimeProcessingOptions, TimeProcessingOption)
- Q_FLAGS(TimeProcessingOptions)
-
- /**
- *
- * Converts a localized time string to a QTime.
- * This method is stricter than readTime(str, &ok) in that it will either
- * accept a time with seconds or a time without seconds.
- *
- * @param str the string we want to convert
- * @param ok the boolean that is set to false if it's not a valid time.
- * If @p ok is 0, it will be ignored.
- * @param options format option to apply when formatting the time
- * @param processing if set to @c ProcessStrict, checking will be strict
- * and the read time string has to have the exact time format
- * specified. If set to @c ProcessNonStrict processing the time
- * is lax and spaces in the time string can be left out.
- *
- * @return The string converted to a QTime
- */
-
- Q_INVOKABLE QTime readLocaleTime(const QString &str,
- TimeFormatOptions options = Locale::TimeDefault,
- TimeProcessingOptions processing = ProcessNonStrict) const;
-
- /**
- * Returns the language code used by this object. The domain AND the
- * library translation must be available in this language.
- * defaultLanguage() is returned by default, if no other available.
- *
- * Use languageCodeToName(language) to get human readable, localized
- * language name.
- *
- * @return the currently used language code
- *
- * @see languageCodeToName
- */
- QString language() const;
-
- /**
- * Returns the country code of the country where the user lives.
- *
- * The returned code complies with the ISO 3166-1 alpha-2 standard,
- * except by KDE convention it is returned in lowercase whereas the
- * official standard is uppercase.
- * See http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 for details.
- *
- * defaultCountry() is returned by default, if no other available,
- * this will always be uppercase 'C'.
- *
- * Use countryCodeToName(country) to get human readable, localized
- * country names.
- *
- * @return the country code for the user
- *
- * @see countryCodeToName
- */
- QString country() const;
-
- /**
- * Returns the language codes selected by user, ordered by decreasing
- * priority.
- *
- * Use languageCodeToName(language) to get human readable, localized
- * language name.
- *
- * @return list of language codes
- *
- * @see languageCodeToName
- */
- QStringList languageList() const;
-
- /**
- * Changes the current date format.
- *
- * The format of the date is a string which contains variables that will
- * be replaced:
- * @li %Y with the whole year (e.g. "2004" for "2004")
- * @li %y with the lower 2 digits of the year (e.g. "04" for "2004")
- * @li %n with the month (January="1", December="12")
- * @li %m with the month with two digits (January="01", December="12")
- * @li %e with the day of the month (e.g. "1" on the first of march)
- * @li %d with the day of the month with two digits (e.g. "01" on the first of march)
- * @li %b with the short form of the month (e.g. "Jan" for January)
- * @li %B with the long form of the month (e.g. "January")
- * @li %a with the short form of the weekday (e.g. "Wed" for Wednesday)
- * @li %A with the long form of the weekday (e.g. "Wednesday" for Wednesday)
- *
- * Everything else in the format string will be taken as is.
- * For example, March 20th 1989 with the format "%y:%m:%d" results
- * in "89:03:20".
- *
- * @param format The new date format
- */
- void setDateFormat(const QString & format);
-
- /**
- * Changes the current short date format.
- *
- * The format of the date is a string which contains variables that will
- * be replaced:
- * @li %Y with the whole year (e.g. "1984" for "1984")
- * @li %y with the lower 2 digits of the year (e.g. "84" for "1984")
- * @li %n with the month (January="1", December="12")
- * @li %m with the month with two digits (January="01", December="12")
- * @li %e with the day of the month (e.g. "1" on the first of march)
- * @li %d with the day of the month with two digits(e.g. "01" on the first of march)
- * @li %b with the short form of the month (e.g. "Jan" for January)
- * @li %B with the long form of the month (e.g. "January")
- * @li %a with the short form of the weekday (e.g. "Wed" for Wednesday)
- * @li %A with the long form of the weekday (e.g. "Wednesday" for Wednesday)
- *
- * Everything else in the format string will be taken as is.
- * For example, March 20th 1989 with the format "%y:%m:%d" results
- * in "89:03:20".
- *
- * @param format The new short date format
- */
- void setDateFormatShort(const QString & format);
-
- /**
- * Changes the form of month name used in dates.
- *
- * @param possessive True if possessive forms should be used
- */
- void setDateMonthNamePossessive(bool possessive);
-
- /**
- * Changes the current time format.
- *
- * The format of the time is string a which contains variables that will
- * be replaced:
- * @li %H with the hour in 24h format and 2 digits (e.g. 5pm is "17", 5am is "05")
- * @li %k with the hour in 24h format and one digits (e.g. 5pm is "17", 5am is "5")
- * @li %I with the hour in 12h format and 2 digits (e.g. 5pm is "05", 5am is "05")
- * @li %l with the hour in 12h format and one digits (e.g. 5pm is "5", 5am is "5")
- * @li %M with the minute with 2 digits (e.g. the minute of 07:02:09 is "02")
- * @li %S with the seconds with 2 digits (e.g. the minute of 07:02:09 is "09")
- * @li %p with pm or am (e.g. 17.00 is "pm", 05.00 is "am")
- *
- * Everything else in the format string will be taken as is.
- * For example, 5.23pm with the format "%H:%M" results
- * in "17:23".
- *
- * @param format The new time format
- */
- void setTimeFormat(const QString & format);
-
- /**
- *
- * Set digit characters used to display dates and time.
- *
- * @param digitSet the digit set identifier
- * @see DigitSet
- */
- void setDateTimeDigitSet(DigitSet digitSet);
-
- /**
- * Changes how KLocale defines the first day in week.
- *
- * @param day first day of the week (Monday=1..Sunday=7) as integer
- */
- void setWeekStartDay(int day);
-
- /**
- * Returns the currently selected date format.
- *
- * @return Current date format.
- * @see setDateFormat()
- */
- QString dateFormat() const;
-
- /**
- * Returns the currently selected short date format.
- *
- * @return Current short date format.
- * @see setDateFormatShort()
- */
- QString dateFormatShort() const;
-
- /**
- * Returns the currently selected time format.
- *
- * @return Current time format.
- * @see setTimeFormat()
- */
- QString timeFormat() const;
-
- /**
- * Changes the symbol used to identify the decimal pointer.
- *
- * @param symbol The new decimal symbol.
- */
- void setDecimalSymbol(const QString & symbol);
-
- /**
- * Changes the separator used to group digits when formating numbers.
- *
- * @param separator The new thousands separator.
- */
- void setThousandsSeparator(const QString & separator);
-
- /**
- * Changes the sign used to identify a positive number. Normally this is
- * left blank.
- *
- * @param sign Sign used for positive numbers.
- */
- void setPositiveSign(const QString & sign);
-
- /**
- * Changes the sign used to identify a negative number.
- *
- * @param sign Sign used for negative numbers.
- */
- void setNegativeSign(const QString & sign);
-
- /**
- *
- * Changes the set of digit characters used to display numbers.
- *
- * @param digitSet the digit set identifier
- * @see DigitSet
- */
- void setDigitSet(DigitSet digitSet);
-
- /**
- *
- * Changes the number of decimal places used when formating numbers.
- *
- * @param digits The default number of digits to use.
- */
- void setDecimalPlaces(int digits);
-
- /**
- * Returns the preferred page size for printing.
- *
- * @return The preferred page size, cast it to QPrinter::PageSize
- */
- int pageSize() const;
-
- /**
- * Changes the preferred page size when printing.
- *
- * @param paperFormat the new preferred page size in the format QPrinter::PageSize
- */
- void setPageSize(int paperFormat);
-
- /**
- * The Metric system will give you information in mm, while the
- * Imperial system will give you information in inches.
- */
- enum MeasureSystem {
- Metric, ///< Metric system (used e.g. in Europe)
- Imperial ///< Imperial system (used e.g. in the United States)
- };
-
- /**
- * Returns which measuring system we use.
- *
- * @return The preferred measuring system
- */
- MeasureSystem measureSystem() const;
-
- /**
- * Changes the preferred measuring system.
- *
- * @return value The preferred measuring system
- */
- void setMeasureSystem(MeasureSystem value);
-
- /**
- * Translates a message as a QTranslator is supposed to.
- * The parameters are similar to i18n(), but the result
- * value has other semantics (it can be QString())
- */
+ Q_INVOKABLE QStringList languageList() const;
Q_INVOKABLE QString translateQt(const char *context, const char *sourceText) const;
-
- /**
- * Provides list of all known language codes.
- *
- * Use languageCodeToName(language) to get human readable, localized
- * language names.
- *
- * @return list of all language codes
- *
- * @see languageCodeToName
- * @see installedLanguages
- */
- QStringList allLanguagesList() const;
-
- /**
- *
- * Provides list of all installed KDE Language Translations.
- *
- * Use languageCodeToName(language) to get human readable, localized
- * language names.
- *
- * @return list of all installed language codes
- *
- * @see languageCodeToName
- */
- QStringList installedLanguages() const;
-
- /**
- * Convert a known language code to a human readable, localized form.
- * If an unknown language code is supplied, empty string is returned;
- * this will never happen if the code has been obtained by one of the
- * KLocale methods.
- *
- * @param language the language code
- *
- * @return the human readable and localized form if the code is known,
- * empty otherwise
- *
- * @see language
- * @see languageList
- * @see allLanguagesList
- * @see installedLanguages
- */
Q_INVOKABLE QString languageCodeToName(const QString &language) const;
-
- /**
- * Provides list of all known country codes.
- *
- * Use countryCodeToName(country) to get human readable, localized
- * country names.
- *
- * @return a list of all country codes
- *
- * @see countryCodeToName
- */
- QStringList allCountriesList() const;
-
- /**
- * Convert a known country code to a human readable, localized form.
- *
- * If an unknown country code is supplied, empty string is returned;
- * this will never happen if the code has been obtained by one of the
- * KLocale methods.
- *
- * @param country the country code
- *
- * @return the human readable and localized form of the country name
- *
- * @see country
- * @see allCountriesList
- */
Q_INVOKABLE QString countryCodeToName(const QString &country) const;
-
- /**
- * Parses locale string into distinct parts.
- * The format of locale is language_COUNTRY@modifier.CHARSET
- *
- * @param locale the locale string to split
- * @param language set to the language part of the locale
- * @param country set to the country part of the locale
- * @param modifier set to the modifer part of the locale
- * @param charset set to the charset part of the locale
- */
+ Q_INVOKABLE QStringList allLanguagesList();
+ Q_INVOKABLE QStringList installedLanguages();
+ Q_INVOKABLE bool isApplicationTranslatedInto(const QString &language);
Q_INVOKABLE void splitLocale(const QString &locale, QString &language, QString &country,
- QString &modifier, QString &charset);
-
- /**
- * Returns the name of the internal language.
- *
- * @return Name of the default language
- */
- QString defaultLanguage();
-
- /**
- * Returns the code of the default country, i.e. "C"
- *
- * This function will not provide a sensible value to use in your app,
- * please use country() instead.
- *
- * @see country
- *
- * @return Name of the default country
- */
- QString defaultCountry();
-
- /**
- * Checks whether or not the active catalog is found for the given language.
- *
- * @param language language to check
- */
- Q_INVOKABLE bool isApplicationTranslatedInto(const QString & language);
-
- /**
- *
- * Removes accelerator marker from a UI text label.
- *
- * Accelerator marker is not always a plain ampersand (&),
- * so it is not enough to just remove it by @c QString::remove().
- * The label may contain escaped markers ("&&") which must be resolved
- * and skipped, as well as CJK-style markers ("Foo (&F)") where
- * the whole parenthesis construct should be removed.
- * Therefore always use this function to remove accelerator marker
- * from UI labels.
- *
- * @param label UI label which may contain an accelerator marker
- * @return label without the accelerator marker
- */
+ QString &modifier, QString &charset);
+ Q_INVOKABLE QString defaultLanguage();
Q_INVOKABLE QString removeAcceleratorMarker(const QString &label) const;
- /**
- *
- * Convert all digits in the string to the given digit set.
- *
- * Conversion is normally not performed if the given digit set
- * is not appropriate in the current locale and language context.
- * Unconditional conversion may be requested by setting
- * @p ignoreContext to @c true.
- *
- * @param str the string to convert
- * @param digitSet the digit set identifier
- * @param ignoreContext unconditional conversion if @c true
- *
- * @return string with converted digits
- *
- * @see DigitSet
- */
- Q_INVOKABLE QString convertDigits(const QString &str, DigitSet digitSet,
- bool ignoreContext = false) const;
-
- /**
- *
- * Reparse locale configuration files for the current selected
- * language.
- */
Q_INVOKABLE void reparseConfiguration();
private:
KLocale *m_locale;
-
-Q_SIGNALS:
- void binaryUnitDialectChanged();
- void calendarSystemChanged();
- void decimalSymbolChanged();
- void dateFormatChanged();
- void dateFormatShortChanged();
- void dateMonthNamePossessiveChanged();
- void dateTimeDigitSetChanged();
- void decimalPlacesChanged();
- void digitSetChanged();
- void measureSystemChanged();
- void negativeSignChanged();
- void pageSizeChanged();
- void positiveSignChanged();
- void thousandsSeparatorChanged();
- void timeFormatChanged();
- void WeekNumberSystemChanged();
- void weekStartDayChanged();
};
+Q_DECLARE_METATYPE(QLocale::FormatType)
+Q_DECLARE_METATYPE(QLocale::MeasurementSystem)
+
#endif
diff --git a/plasma/declarativeimports/locale/localebindingsplugin.cpp b/plasma/declarativeimports/locale/localebindingsplugin.cpp
index f083ce9d..377513ce 100644
--- a/plasma/declarativeimports/locale/localebindingsplugin.cpp
+++ b/plasma/declarativeimports/locale/localebindingsplugin.cpp
@@ -21,14 +21,12 @@
#include "localebindingsplugin.h"
#include
#include "locale_p.h"
-#include "calendarsystem.h"
void LocaleBindingsPlugin::registerTypes(const char *uri)
{
Q_ASSERT(uri == QLatin1String("org.kde.locale"));
qmlRegisterType(uri, 0, 1, "Locale");
- qmlRegisterType(uri, 0, 1, "CalendarSystem");
}
#include "moc_localebindingsplugin.cpp"
diff --git a/plasma/runners/calculator/calculatorrunner.cpp b/plasma/runners/calculator/calculatorrunner.cpp
index c72960eb..d96430ec 100644
--- a/plasma/runners/calculator/calculatorrunner.cpp
+++ b/plasma/runners/calculator/calculatorrunner.cpp
@@ -80,7 +80,7 @@ void CalculatorRunner::powSubstitutions(QString& cmd)
int postIndex = where + 1;
int count = 0;
- QChar decimalSymbol = KGlobal::locale()->decimalSymbol().at(0);
+ QChar decimalSymbol = KGlobal::locale()->toLocale().decimalPoint();
//avoid out of range on weird commands
preIndex = qMax(0, preIndex);
postIndex = qMin(postIndex, cmd.length()-1);
@@ -175,8 +175,9 @@ void CalculatorRunner::hexSubstitutions(QString& cmd)
void CalculatorRunner::userFriendlySubstitutions(QString& cmd)
{
- if (cmd.contains(KGlobal::locale()->decimalSymbol(), Qt::CaseInsensitive)) {
- cmd=cmd.replace(KGlobal::locale()->decimalSymbol(), QChar('.'), Qt::CaseInsensitive);
+ const QChar decimalSymbol = KGlobal::locale()->toLocale().decimalPoint();
+ if (cmd.contains(decimalSymbol, Qt::CaseInsensitive)) {
+ cmd=cmd.replace(decimalSymbol, QChar('.'), Qt::CaseInsensitive);
}
// the following substitutions are not needed with libqalculate
@@ -260,9 +261,10 @@ void CalculatorRunner::match(Plasma::RunnerContext &context)
QString CalculatorRunner::calculate(const QString& term)
{
+ const QChar decimalSymbol = KGlobal::locale()->toLocale().decimalPoint();
#ifdef ENABLE_QALCULATE
QString result = m_engine->evaluate(term);
- return result.replace('.', KGlobal::locale()->decimalSymbol(), Qt::CaseInsensitive);
+ return result.replace('.', decimalSymbol, Qt::CaseInsensitive);
#else
//kDebug() << "calculating" << term;
QScriptEngine eng;
@@ -287,7 +289,7 @@ QString CalculatorRunner::calculate(const QString& term)
var order=Math.pow(10,exponent);\
(order > 0? Math.round(result*order)/order : 0)").toString();
- roundedResultString.replace('.', KGlobal::locale()->decimalSymbol(), Qt::CaseInsensitive);
+ roundedResultString.replace('.', decimalSymbol, Qt::CaseInsensitive);
return roundedResultString;
#endif // ENABLE_QALCULATE
diff --git a/plasma/shells/plasma-desktop/main.cpp b/plasma/shells/plasma-desktop/main.cpp
index ce2dd650..2dcc1a53 100644
--- a/plasma/shells/plasma-desktop/main.cpp
+++ b/plasma/shells/plasma-desktop/main.cpp
@@ -41,13 +41,11 @@
#include
static const char description[] = I18N_NOOP( "The KDE desktop, panels and widgets workspace application." );
-QString plasmaLocale;
int main(int argc, char **argv)
{
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "START" << "(line:" << __LINE__ << ")";
- plasmaLocale = KLocale("libplasma").language();
// dual head support
int associatedScreen = 0;
#ifdef Q_WS_X11
diff --git a/plasma/shells/plasma-desktop/plasmaapp.cpp b/plasma/shells/plasma-desktop/plasmaapp.cpp
index 1af14f9f..74975f57 100644
--- a/plasma/shells/plasma-desktop/plasmaapp.cpp
+++ b/plasma/shells/plasma-desktop/plasmaapp.cpp
@@ -70,8 +70,6 @@
#include
#endif
-extern QString plasmaLocale;
-
static void addInformationForApplet(QTextStream &stream, Plasma::Applet *applet)
{
if (applet->isContainment()) {
@@ -123,10 +121,6 @@ PlasmaApp::PlasmaApp()
kDebug() << "!!{} STARTUP TIME" << QTime().msecsTo(QTime::currentTime()) << "plasma app ctor start" << "(line:" << __LINE__ << ")";
suspendStartup(true);
- if (KGlobalSettings::isMultiHead()) {
- KGlobal::locale()->setLanguage(plasmaLocale, KGlobal::config().data());
- }
-
KGlobal::locale()->insertCatalog("libplasma");
KGlobal::locale()->insertCatalog("plasmagenericshell");
KCrash::setFlags(KCrash::AutoRestart);
diff --git a/solid-actions-kcm/DesktopFileGenerator.cpp b/solid-actions-kcm/DesktopFileGenerator.cpp
index 98e83bda..58ffeab0 100644
--- a/solid-actions-kcm/DesktopFileGenerator.cpp
+++ b/solid-actions-kcm/DesktopFileGenerator.cpp
@@ -32,13 +32,14 @@
int main( int argc, char *argv[] )
{
- KLocale::setMainCatalog("solid-action-desktop-gen");
// About data
KAboutData aboutData("solid-action-desktop-gen", 0, ki18n("Solid Action Desktop File Generator"), "0.4", ki18n("Tool to automatically generate Desktop Files from Solid DeviceInterface classes for translation"),
KAboutData::License_GPL, ki18n("(c) 2009, Ben Cooksley"));
aboutData.addAuthor(ki18n("Ben Cooksley"), ki18n("Maintainer"), "ben@eclipse.endoftheinternet.org");
KCmdLineArgs::init(argc, argv, &aboutData);
+ KGlobal::locale()->insertCatalog("solid-action-desktop-gen");
+
QCoreApplication application(argc, argv);
SolidActionData * availActions = SolidActionData::instance();
foreach( Solid::DeviceInterface::Type internalType, availActions->interfaceTypeList() ) {