[gnome-shell/gnome-3-28] Revert "appDisplay: use ShellAppCache to translate folder names"



commit 2040c380bdc70e95b1ea7890e01352c50c45f098
Author: Christian Hergert <chergert redhat com>
Date:   Wed Feb 26 23:43:10 2020 -0800

    Revert "appDisplay: use ShellAppCache to translate folder names"
    
    This reverts commit f87b9f374ad8c87957cb9c4e99e89efa79661e54.

 js/ui/appDisplay.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 18bad24310..74c772d504 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -93,7 +93,15 @@ function _getFolderName(folder) {
     let name = folder.get_string('name');
 
     if (folder.get_boolean('translate')) {
-        return Shell.AppCache.get_default().translate_folder(name);
+        let keyfile = new GLib.KeyFile();
+        let path = 'desktop-directories/' + name;
+
+        try {
+            keyfile.load_from_data_dirs(path, GLib.KeyFileFlags.NONE);
+            name = keyfile.get_locale_string('Desktop Entry', 'Name', null);
+        } catch(e) {
+            return name;
+        }
     }
 
     return name;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]