SV: Patch: Language selection broken in HEAD

Hans Petter Bieker bieker at itk.ntnu.no
Wed Sep 10 07:35:27 BST 2003


-    QString str = locate("locale",
QString::fromLatin1("%1/entry.desktop")
+    QString str = locate("locale",
QString::fromLatin1("l10n/%1/entry.desktop")
                          .arg(*it));

No, don't do that.

+  QString m_path = path;
+  if (path != "en_US") m_path = "l10n/" + path;
+
   QString filepath = QString::fromLatin1("%1%2/entry.desktop")
     .arg(sub)
-    .arg(path);
+    .arg(m_path);

??? Why?

I guess it could be that the kde-i18n module is broken. When I tried to
install it on Nove Hardy it didn't install the desktop.entry file

-----Opprinnelig melding-----
Fra: kde-core-devel-bounces-+bieker=stud.ntnu.no at mail.kde.org
[mailto:kde-core-devel-bounces-+bieker=stud.ntnu.no at mail.kde.org] På
vegne av Michael v.Ostheim
Sendt: 6. september 2003 21:28
Til: kde-core-devel at kde.org
Emne: Patch: Language selection broken in HEAD

Hi,
with a fresh install from HEAD, I was no longer able to select installed

language packages from Control Center. I know it's planned to move some
of 
the widgets to kdelibs, but nevertheless, this patch fix it for me.

Best regards, Michael v.Ostheim

===================================================================
RCS file: /home/kde/kdebase/kcontrol/locale/kcmlocale.cpp,v
retrieving revision 1.112
diff -u -p -r1.112 kcmlocale.cpp
--- kcmlocale.cpp       28 Jun 2003 10:31:35 -0000      1.112
+++ kcmlocale.cpp       6 Sep 2003 19:05:39 -0000
@@ -209,7 +209,7 @@ void KLocaleConfig::loadLanguageList()
         it != first.end();
         ++it )
   {
-    QString str = locate("locale",
QString::fromLatin1("%1/entry.desktop")
+    QString str = locate("locale", 
QString::fromLatin1("l10n/%1/entry.desktop")
                          .arg(*it));
     if (!str.isNull())
       prilang << str;
@@ -336,9 +336,12 @@ void KLocaleConfig::readLocale(const QSt
   KGlobal::_locale = m_locale;

   // read the name
+  QString m_path = path;
+  if (path != "en_US") m_path = "l10n/" + path;
+
   QString filepath = QString::fromLatin1("%1%2/entry.desktop")
     .arg(sub)
-    .arg(path);
+    .arg(m_path);

   KSimpleConfig entry(locate("locale", filepath));
   entry.setGroup("KCM Locale");





More information about the kde-core-devel mailing list