Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > 00483d81de16d6155bb71015324df6f6 > files > 9

kdebase4-workspace-4.6.5-1.3.mga1.src.rpm

Index: plasma/generic/applets/icon/icon.cpp
===================================================================
--- plasma/generic/applets/icon/icon.cpp
+++ plasma/generic/applets/icon/icon.cpp	2010-02-09 13:28:31.000000000 +0100
@@ -151,6 +151,12 @@
     if (m_url.isLocalFile() && KDesktopFile::isDesktopFile(m_url.toLocalFile())) {
         KDesktopFile f(m_url.toLocalFile());
         m_text = f.readName();
+        
+        QString translated_text = i18n( m_text.toUtf8() );
+
+        if ( ! m_text.isEmpty() && ! translated_text.isEmpty() && m_text != translated_text ) {
+            m_text = translated_text ;
+        }
         //corrupted desktop file?
         if (m_text.isNull()) {
             m_text = m_url.fileName();
@@ -159,6 +165,11 @@
 
         m_genericName = f.readGenericName();
 
+        QString translated_genericName = i18n( m_genericName.toUtf8() );
+        if ( ! m_genericName.isEmpty() && ! translated_genericName.isEmpty() && m_genericName != translated_genericName ) {
+            m_genericName = translated_genericName ;
+        }
+
         connect(m_watcher, SIGNAL(dirty(const QString &)), this, SLOT(updateDesktopFile()));
     } else {
         m_text = m_url.fileName();