Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 7c105dc6f7ab15715a4d45d1b5feab77 > files > 16

kdebase4-workspace-4.11.12-1.mga4.src.rpm

Index: plasma/generic/applets/icon/icon.cpp
===================================================================
--- a/plasma/generic/applets/icon/icon.cpp
+++ b/plasma/generic/applets/icon/icon.cpp	2011-12-12 11:46:34.126061458 -0300
@@ -182,6 +182,12 @@
     if (m_hasDesktopFile) {
         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();
@@ -190,6 +196,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(QString)), this, SLOT(updateDesktopFile()));
     } else {
         m_text = m_url.fileName();