Sophie

Sophie

distrib > Mandriva > 2009.0 > x86_64 > by-pkgid > a4e51422fe1b8d073f47c12205a319a3 > files > 12

kdelibs-3.5.10-4.4mdv2009.0.src.rpm

--- kdelibs-3.5.4/kdecore/kdesktopfile.cpp.fix_translate_menu	2005-10-10 12:06:03.000000000 -0300
+++ kdelibs-3.5.4/kdecore/kdesktopfile.cpp	2006-09-19 10:16:10.000000000 -0300
@@ -34,6 +34,7 @@
 #include "kapplication.h"
 #include "kstandarddirs.h"
 #include "kmountpoint.h"
+#include "klocale.h"
 
 #include "kdesktopfile.h"
 #include "kdesktopfile.moc"
@@ -157,7 +158,16 @@
 
 QString KDesktopFile::readName() const
 {
-  return readEntry("Name");
+  QString englishName = readEntryUntranslated("Name");
+  QString translateName = readEntry("Name");
+  if(englishName == translateName)
+  {
+	KGlobal::locale()->insertCatalogue("menu-messages");
+	QString newName = i18n(englishName.utf8());
+	return newName;
+  }
+  else
+  	return translateName;
 }
 
 QString KDesktopFile::readComment() const