Przeglądaj źródła

Fix nautilus and nemo plugin branding strings. (#4780)

* Fix nautilus and nemo plugin branding strings.

Fix for owncloud/enterprise#1314

* nautilus plugin: Add a comment why the line needs to stay unchanged.
Klaas Freitag 9 lat temu
rodzic
commit
641125eac1
1 zmienionych plików z 9 dodań i 5 usunięć
  1. 9 5
      shell_integration/nautilus/syncstate.py

+ 9 - 5
shell_integration/nautilus/syncstate.py

@@ -21,11 +21,15 @@ import socket
 
 from gi.repository import GObject, Nautilus
 
-print("Initializing owncloud-client-nautilus extension")
-
-# Do not touch the following line.
+# Please do not touch the following line.
+# The reason is that we use a script to adopt this file for branding
+# by replacing this line with the branding app name. If the following
+# line is changed, the script can not match the pattern and fails.
 appname = 'ownCloud'
 
+print("Initializing "+appname+"-client-nautilus extension")
+
+
 def get_local_path(url):
     if url[0:7] == 'file://':
         url = url[7:]
@@ -181,10 +185,10 @@ class MenuExtension(GObject.GObject, Nautilus.MenuProvider):
         if not syncedFile:
             return items
 
-        # Create an menu item
+        # Create a menu item
         labelStr = "Share with " + appname + "..."
         item = Nautilus.MenuItem(name='NautilusPython::ShareItem', label=labelStr,
-                tip='Share file %s through ownCloud' % file.get_name())
+                tip='Share file {} through {}'.format(file.get_name(), appname) )
         item.connect("activate", self.menu_share, file)
         items.append(item)