Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfig.cpp
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kconfig.cpp	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfig.cpp	2020-07-09 21:59:31.144977640 +0200
@@ -1001,6 +1001,19 @@
     return it->mValue;
 }
 
+QByteArray KConfigPrivate::lookupExactData(const QByteArray &group, const char *key,
+                                      KEntryMap::SearchFlags flags) const
+{
+    if (bReadDefaults) {
+        flags |= KEntryMap::SearchDefaults;
+    }
+    const KEntryMapConstIterator it = entryMap.findExactEntry(group, key, flags);
+    if (it == entryMap.constEnd()) {
+        return QByteArray();
+    }
+    return it->mValue;
+}
+
 QString KConfigPrivate::lookupData(const QByteArray &group, const char *key,
                                    KEntryMap::SearchFlags flags, bool *expand) const
 {
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfig_p.h
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kconfig_p.h	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfig_p.h	2020-07-09 21:59:31.144977640 +0200
@@ -34,6 +34,7 @@
     QString lookupData(const QByteArray &group, const char *key, KEntryMap::SearchFlags flags,
                        bool *expand) const;
     QByteArray lookupData(const QByteArray &group, const char *key, KEntryMap::SearchFlags flags) const;
+    QByteArray lookupExactData(const QByteArray &group, const char *key, KEntryMap::SearchFlags flags) const;
 
     void putData(const QByteArray &group, const char *key, const QByteArray &value,
                  KConfigBase::WriteConfigFlags flags, bool expand = false);
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfigdata.h
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kconfigdata.h	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfigdata.h	2020-07-09 21:59:31.144977640 +0200
@@ -175,6 +175,19 @@
     Iterator findExactEntry(const QByteArray &group, const QByteArray &key = QByteArray(),
                             SearchFlags flags = SearchFlags());
 
+    ConstIterator findExactEntry(const QByteArray &group, const QByteArray &key = QByteArray(),
+                            SearchFlags flags = SearchFlags()) const
+    {
+        KEntryKey theKey(group, key, false, bool(flags & SearchDefaults));
+
+        // try the localized key first
+        if (flags & SearchLocalized) {
+            theKey.bLocal = true;
+            return find(theKey);
+        }
+        return find(theKey);
+    }
+
     Iterator findEntry(const QByteArray &group, const QByteArray &key = QByteArray(),
                        SearchFlags flags = SearchFlags());
 
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfiggroup.cpp
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kconfiggroup.cpp	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfiggroup.cpp	2020-07-09 21:59:31.144977640 +0200
@@ -1199,6 +1199,18 @@
     return !config()->d_func()->lookupData(d->fullName(), key, flags).isNull();
 }
 
+bool KConfigGroup::hasTranslatedKey(const char *key) const
+{
+    Q_ASSERT_X(isValid(), "KConfigGroup::hasTranslatedKey", "accessing an invalid group");
+
+    KEntryMap::SearchFlags flags = KEntryMap::SearchLocalized;
+    if (config()->readDefaults()) {
+        flags |= KEntryMap::SearchDefaults;
+    }
+
+    return !config()->d_func()->lookupExactData(d->fullName(), key, flags).isNull();
+}
+
 bool KConfigGroup::hasKey(const QString &key) const
 {
     return hasKey(key.toUtf8().constData());
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfiggroup.h
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kconfiggroup.h	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kconfiggroup.h	2020-07-09 21:59:31.144977640 +0200
@@ -618,6 +618,11 @@
      */
     QMap<QString, QString> entryMap() const;
 
+    /**
+     * @internal
+     */
+    bool hasTranslatedKey(const char *key) const;
+
 protected:
     bool hasGroupImpl(const QByteArray &group) const override;
     KConfigGroup groupImpl(const QByteArray &b) override;
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kdesktopfile.cpp
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kdesktopfile.cpp	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kdesktopfile.cpp	2020-07-09 22:00:19.867388971 +0200
@@ -16,6 +16,7 @@
 #include <QFileInfo>
 #include <QUrl>
 #include <QStandardPaths>
+#include <libintl.h>
 
 #include "kauthorized.h"
 #include "kconfig_p.h"
@@ -161,6 +162,33 @@
     return false;
 }
 
+QString KDesktopFile::translatedEntry(const char *key) const
+{
+  Q_D(const KDesktopFile);
+  if (d->desktopGroup.hasTranslatedKey(key)) {
+    return d->desktopGroup.readEntry(key);
+  }
+
+  if (d->desktopGroup.hasKey(key)) {
+    QString value = d->desktopGroup.readEntryUntranslated(key);
+    QString fName = fileName();
+    fName = fName.mid(fName.lastIndexOf(QLatin1Char('/'))+1);
+    QString po_lookup_key = QString::fromLatin1(key) + QStringLiteral("(") + fName + QStringLiteral("): ") + value;
+    char *msgid = strdup(po_lookup_key.toUtf8().constData());
+    const char *po_value = dgettext("desktop_translations", msgid);
+
+    if (po_value == msgid) {
+      free(msgid);
+      return value;
+    }
+
+    free(msgid);
+    return QString::fromUtf8(po_value);
+  }
+
+  return QString();
+}
+
 QString KDesktopFile::readType() const
 {
     Q_D(const KDesktopFile);
@@ -175,20 +203,17 @@
 
 QString KDesktopFile::readName() const
 {
-    Q_D(const KDesktopFile);
-    return d->desktopGroup.readEntry("Name", QString());
+    return translatedEntry("Name");
 }
 
 QString KDesktopFile::readComment() const
 {
-    Q_D(const KDesktopFile);
-    return d->desktopGroup.readEntry("Comment", QString());
+    return translatedEntry("Comment");
 }
 
 QString KDesktopFile::readGenericName() const
 {
-    Q_D(const KDesktopFile);
-    return d->desktopGroup.readEntry("GenericName", QString());
+    return translatedEntry("GenericName");
 }
 
 QString KDesktopFile::readPath() const
Index: kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kdesktopfile.h
===================================================================
--- kconfig-5.56.0git.20200707T205951~5d73eed.orig/src/core/kdesktopfile.h	2020-07-09 21:59:24.050802383 +0200
+++ kconfig-5.56.0git.20200707T205951~5d73eed/src/core/kdesktopfile.h	2020-07-09 21:59:31.144977640 +0200
@@ -244,6 +244,8 @@
 //  virtual void virtual_hook( int id, void* data );
 private:
 
+    QString translatedEntry(const char *) const;
+
     Q_DISABLE_COPY(KDesktopFile)
 
     Q_DECLARE_PRIVATE(KDesktopFile)
