From 641125eac162a0dbd3bcf2ee792688bb7349ad93 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 3 May 2016 11:36:56 +0200 Subject: [PATCH] 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. --- shell_integration/nautilus/syncstate.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py index ca74ed038..f4e790836 100644 --- a/shell_integration/nautilus/syncstate.py +++ b/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)