File kdebase-workspace-4.3.1-menu-translation.patch of Package kdebase4-workspace
Index: plasma/desktop/applets/kickoff/core/applicationmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/applicationmodel.cpp
+++ plasma/desktop/applets/kickoff/core/applicationmodel.cpp 2009-11-07 01:00:57.000000000 +0100
@@ -226,6 +226,13 @@
icon = iconNameMap().value(icon);
}
+ QString fromCustom = i18n( appName.toUtf8() );
+ if( ! fromCustom.isEmpty() && appName != fromCustom )
+ appName = fromCustom;
+ fromCustom = i18n( genericName.toUtf8() );
+ if( ! fromCustom.isEmpty() && genericName != fromCustom )
+ genericName = fromCustom;
+
desktopEntry = serviceGroup->entryPath();
genericName = serviceGroup->caption();
relPath = serviceGroup->relPath();
Index: plasma/desktop/applets/kickoff/core/models.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/models.cpp
+++ plasma/desktop/applets/kickoff/core/models.cpp 2009-11-07 01:02:03.000000000 +0100
@@ -144,6 +144,19 @@
QString genericName = service->genericName();
QString appName = service->name();
+
+ QString fromCustom = i18n( appName.toUtf8() );
+ if( ! fromCustom.isEmpty() && appName != fromCustom )
+ appName = fromCustom;
+ if( ! genericName.isEmpty() )
+ {
+ fromCustom = i18n( genericName.toUtf8() );
+ if( ! fromCustom.isEmpty() && genericName != fromCustom )
+ genericName = fromCustom;
+ }
+
+ QString teste = genericName.isEmpty() ? appName : genericName;
+
bool nameFirst = displayOrder == NameBeforeDescription;
appItem->setText(nameFirst || genericName.isEmpty() ? appName : genericName);
appItem->setIcon(KIcon(service->icon()));