diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Info.plist b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Info.plist
index 8780742648a14..4fc2479c3de20 100644
--- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Info.plist
+++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Info.plist
@@ -31,7 +31,7 @@
Label
NSStringFormat
- Always keep downloaded
+ Always Keep Downloaded
@@ -43,7 +43,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.KeepDownloadedAction
NSExtensionFileProviderActionName
- Always keep downloaded
+ Always Keep Downloaded
NSExtensionFileProviderActionActivationRule
@@ -51,7 +51,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.AutoEvictAction
NSExtensionFileProviderActionName
- Allow automatic freeing up space
+ Allow Automatic Freeing Up Space
NSExtensionFileProviderActionActivationRule
@@ -59,7 +59,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.EvictAction
NSExtensionFileProviderActionName
- Remove download
+ Remove Download
NSExtensionFileProviderActionActivationRule
@@ -67,7 +67,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.EvictDescendantsAction
NSExtensionFileProviderActionName
- Remove downloaded items
+ Remove Downloaded Items
NSExtensionFileProviderActionActivationRule
@@ -75,7 +75,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.FileActionsAction
NSExtensionFileProviderActionName
- File actions
+ File Actions
NSExtensionFileProviderActionActivationRule
@@ -83,7 +83,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.OpenInBrowserAction
NSExtensionFileProviderActionName
- Open in browser
+ Open in Browser
NSExtensionFileProviderActionActivationRule
@@ -91,7 +91,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderExt.CopyInternalLinkAction
NSExtensionFileProviderActionName
- Copy internal link
+ Copy Internal Link
NSExtensionFileProviderAllowsContextualMenuDownloadEntry
diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Localizable.xcstrings b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Localizable.xcstrings
index 71ef1bc5ad240..c3b58a818c7a8 100644
--- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Localizable.xcstrings
+++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderExt/Localizable.xcstrings
@@ -1,7 +1,7 @@
{
"sourceLanguage" : "en",
"strings" : {
- "Allow automatic freeing up space" : {
+ "Allow Automatic Freeing Up Space" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -26,13 +26,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Allow automatic freeing up space"
+ "value" : "Allow Automatic Freeing Up Space"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Allow automatic freeing up space"
+ "value" : "Allow Automatic Freeing Up Space"
}
},
"es" : {
@@ -139,7 +139,7 @@
}
}
},
- "Always keep downloaded" : {
+ "Always Keep Downloaded" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -164,13 +164,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Always keep downloaded"
+ "value" : "Always Keep Downloaded"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Always keep downloaded"
+ "value" : "Always Keep Downloaded"
}
},
"es" : {
@@ -415,7 +415,7 @@
}
}
},
- "Copy internal link" : {
+ "Copy Internal Link" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -476,13 +476,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Copy internal link"
+ "value" : "Copy Internal Link"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Copy internal link"
+ "value" : "Copy Internal Link"
}
},
"es" : {
@@ -775,7 +775,7 @@
}
}
},
- "File actions" : {
+ "File Actions" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -836,13 +836,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "File actions"
+ "value" : "File Actions"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "File actions"
+ "value" : "File Actions"
}
},
"es" : {
@@ -1063,7 +1063,7 @@
}
}
},
- "Open in browser" : {
+ "Open in Browser" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -1142,13 +1142,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Open in browser"
+ "value" : "Open in Browser"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Open in browser"
+ "value" : "Open in Browser"
}
},
"eo" : {
@@ -1477,7 +1477,7 @@
}
}
},
- "Remove download" : {
+ "Remove Download" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -1496,13 +1496,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Remove download"
+ "value" : "Remove Download"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Remove download"
+ "value" : "Remove Download"
}
},
"et_EE" : {
@@ -1555,7 +1555,7 @@
}
}
},
- "Remove downloaded items" : {
+ "Remove Downloaded Items" : {
"comment" : "Context menu item label.",
"extractionState" : "manual",
"localizations" : {
@@ -1574,13 +1574,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Remove downloaded items"
+ "value" : "Remove Downloaded Items"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Remove downloaded items"
+ "value" : "Remove Downloaded Items"
}
},
"et_EE" : {
diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Info.plist b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Info.plist
index dbb88fab631c8..23fe6945332bc 100644
--- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Info.plist
+++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Info.plist
@@ -27,7 +27,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderUIExt.UnlockFileAction
NSExtensionFileProviderActionName
- Unlock file
+ Unlock File
NSExtensionFileProviderActionActivationRule
@@ -35,7 +35,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderUIExt.LockFileAction
NSExtensionFileProviderActionName
- Lock file
+ Lock File
NSExtensionFileProviderActionActivationRule
@@ -43,7 +43,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderUIExt.ShareAction
NSExtensionFileProviderActionName
- Share options
+ Share Options
NSExtensionFileProviderActionActivationRule
@@ -51,7 +51,7 @@
NSExtensionFileProviderActionIdentifier
com.nextcloud.desktopclient.FileProviderUIExt.EvictAction
NSExtensionFileProviderActionName
- Free up space
+ Free Up Space
NSExtensionPointIdentifier
diff --git a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Localizable.xcstrings b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Localizable.xcstrings
index 5455b21c6cdc4..a5356112b7f8d 100644
--- a/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Localizable.xcstrings
+++ b/shell_integration/MacOSX/NextcloudIntegration/FileProviderUIExt/Localizable.xcstrings
@@ -4278,7 +4278,7 @@
}
}
},
- "Free up space" : {
+ "Free Up Space" : {
"comment" : "Context menu item label",
"extractionState" : "manual",
"localizations" : {
@@ -4309,13 +4309,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Free up space"
+ "value" : "Free Up Space"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Free up space"
+ "value" : "Free Up Space"
}
},
"et_EE" : {
@@ -5324,7 +5324,7 @@
}
}
},
- "Lock file" : {
+ "Lock File" : {
"comment" : "Context menu item label",
"extractionState" : "manual",
"localizations" : {
@@ -5349,13 +5349,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Lock file"
+ "value" : "Lock File"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Lock file"
+ "value" : "Lock File"
}
},
"et_EE" : {
@@ -6926,6 +6926,145 @@
}
}
},
+ "Share Options" : {
+ "comment" : "Context menu item label",
+ "extractionState" : "manual",
+ "generatesSymbol": false,
+ "localizations" : {
+ "cs_CZ" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Předvolby pro sdílení"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Freigabeoptionen"
+ }
+ },
+ "de_DE" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Freigabeoptionen"
+ }
+ },
+ "en" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Share Options"
+ }
+ },
+ "en_GB" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Share Options"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Opciones del recurso compartido"
+ }
+ },
+ "et_EE" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Jagamise valikud"
+ }
+ },
+ "fa" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "گزینههای اشتراکگذاری"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Options de partage"
+ }
+ },
+ "ga" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Roghanna comhroinnte"
+ }
+ },
+ "gl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Opcións da compartición"
+ }
+ },
+ "ja_JP" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "共有オプション"
+ }
+ },
+ "kab" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tixtiṛiyin n beṭṭu"
+ }
+ },
+ "lt_LT" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bendrinimo parinktys"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Opcje udostępniania"
+ }
+ },
+ "pt_BR" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Opções de compartilhamento"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Delningsalternativ"
+ }
+ },
+ "sw" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Shiriki chaguzi"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Paylaşım seçenekleri"
+ }
+ },
+ "uz" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Ulashish imkoniyatlari"
+ }
+ },
+ "zh_HK" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "共享選項"
+ }
+ },
+ "zh_TW" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "分享選項"
+ }
+ }
+ }
+ },
"Share options" : {
"comment" : "Text label; Context menu item label",
"extractionState" : "manual",
@@ -8664,7 +8803,7 @@
}
}
},
- "Unlock file" : {
+ "Unlock File" : {
"comment" : "Context menu item label",
"extractionState" : "manual",
"localizations" : {
@@ -8689,13 +8828,13 @@
"en" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unlock file"
+ "value" : "Unlock File"
}
},
"en_GB" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Unlock file"
+ "value" : "Unlock File"
}
},
"es" : {
diff --git a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m
index bc5ac53df2d5b..74021fda8ad89 100644
--- a/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m
+++ b/shell_integration/MacOSX/NextcloudIntegration/FinderSyncExt/FinderSync.m
@@ -38,6 +38,33 @@ static os_log_t getFinderSyncLogger(void) {
return logger;
}
+static NSString *titleCaseMenuItem(NSString *title)
+{
+ static NSDictionary *titleCaseTitles;
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ titleCaseTitles = @{
+ @"Leave this share": @"Leave This Share",
+ @"Share options": @"Share Options",
+ @"Copy internal link": @"Copy Internal Link",
+ @"File actions": @"File Actions",
+ @"Lock file": @"Lock File",
+ @"Unlock file": @"Unlock File",
+ @"Apply labels": @"Apply Labels",
+ @"Open in browser": @"Open in Browser",
+ @"Resolve conflict …": @"Resolve Conflict …",
+ @"Move and rename …": @"Move and Rename …",
+ @"Move, rename and upload …": @"Move, Rename and Upload …",
+ @"Delete local changes": @"Delete Local Changes",
+ @"Move and upload …": @"Move and Upload …",
+ @"Make always available locally": @"Make Always Available Locally",
+ @"Free up local space": @"Free Up Local Space",
+ };
+ });
+
+ return titleCaseTitles[title] ?: title;
+}
+
@implementation FinderSync
- (instancetype)init
@@ -223,7 +250,7 @@ - (NSMenu *)menuForMenuKind:(FIMenuKind)whichMenu
int idx = 0;
for (NSArray* item in menuItems) {
- NSMenuItem *actionItem = [subMenu addItemWithTitle:[item valueForKey:@"text"]
+ NSMenuItem *actionItem = [subMenu addItemWithTitle:titleCaseMenuItem([item valueForKey:@"text"])
action:@selector(subMenuActionClicked:)
keyEquivalent:@""];
diff --git a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp
index 1d8e509639380..849f1f40e647e 100644
--- a/shell_integration/dolphin/ownclouddolphinactionplugin.cpp
+++ b/shell_integration/dolphin/ownclouddolphinactionplugin.cpp
@@ -14,8 +14,36 @@
#include
#include
#include
+#include
#include "ownclouddolphinpluginhelper.h"
+namespace {
+QString titleCaseMenuItem(const QString &title)
+{
+ static const QHash titleCaseTitles = {
+ { QStringLiteral("Leave this share"), QStringLiteral("Leave This Share") },
+ { QStringLiteral("Share options"), QStringLiteral("Share Options") },
+ { QStringLiteral("Copy internal link"), QStringLiteral("Copy Internal Link") },
+ { QStringLiteral("File actions"), QStringLiteral("File Actions") },
+ { QStringLiteral("Lock file"), QStringLiteral("Lock File") },
+ { QStringLiteral("Unlock file"), QStringLiteral("Unlock File") },
+ { QStringLiteral("Apply labels"), QStringLiteral("Apply Labels") },
+ { QStringLiteral("Open in browser"), QStringLiteral("Open in Browser") },
+ { QStringLiteral("Resolve conflict …"), QStringLiteral("Resolve Conflict …") },
+ { QStringLiteral("Move and rename …"), QStringLiteral("Move and Rename …") },
+ { QStringLiteral("Move, rename and upload …"), QStringLiteral("Move, Rename and Upload …") },
+ { QStringLiteral("Delete local changes"), QStringLiteral("Delete Local Changes") },
+ { QStringLiteral("Move and upload …"), QStringLiteral("Move and Upload …") },
+ { QStringLiteral("Make always available locally"), QStringLiteral("Make Always Available Locally") },
+ { QStringLiteral("Free up local space"), QStringLiteral("Free Up Local Space") },
+ { QStringLiteral("Copy private link to clipboard"), QStringLiteral("Copy Private Link to Clipboard") },
+ { QStringLiteral("Send private link by email …"), QStringLiteral("Send Private Link by Email …") },
+ };
+
+ return titleCaseTitles.value(title, title);
+}
+}
+
class OwncloudDolphinPluginAction : public KAbstractFileItemActionPlugin
{
Q_OBJECT
@@ -59,7 +87,7 @@ class OwncloudDolphinPluginAction : public KAbstractFileItemActionPlugin
auto args = QString::fromUtf8(cmd).split(QLatin1Char(':'));
if (args.size() < 4)
return;
- auto action = menu->addAction(args.mid(3).join(QLatin1Char(':')));
+ auto action = menu->addAction(titleCaseMenuItem(args.mid(3).join(QLatin1Char(':'))));
if (args.value(2).contains(QLatin1Char('d')))
action->setDisabled(true);
auto call = args.value(1).toLatin1();
@@ -96,20 +124,20 @@ class OwncloudDolphinPluginAction : public KAbstractFileItemActionPlugin
auto menu = new QMenu(parentWidget);
menuaction->setMenu(menu);
- auto shareAction = menu->addAction(helper->shareActionTitle());
+ auto shareAction = menu->addAction(titleCaseMenuItem(helper->shareActionTitle()));
connect(shareAction, &QAction::triggered, this, [localFile, helper] {
helper->sendCommand(QByteArray("SHARE:" + localFile.toUtf8() + "\n").constData());
});
if (!helper->copyPrivateLinkTitle().isEmpty()) {
- auto copyPrivateLinkAction = menu->addAction(helper->copyPrivateLinkTitle());
+ auto copyPrivateLinkAction = menu->addAction(titleCaseMenuItem(helper->copyPrivateLinkTitle()));
connect(copyPrivateLinkAction, &QAction::triggered, this, [localFile, helper] {
helper->sendCommand(QByteArray("COPY_PRIVATE_LINK:" + localFile.toUtf8() + "\n").constData());
});
}
if (!helper->emailPrivateLinkTitle().isEmpty()) {
- auto emailPrivateLinkAction = menu->addAction(helper->emailPrivateLinkTitle());
+ auto emailPrivateLinkAction = menu->addAction(titleCaseMenuItem(helper->emailPrivateLinkTitle()));
connect(emailPrivateLinkAction, &QAction::triggered, this, [localFile, helper] {
helper->sendCommand(QByteArray("EMAIL_PRIVATE_LINK:" + localFile.toUtf8() + "\n").constData());
});
diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py
index 7463bfbf16cff..b329d7cfed35b 100644
--- a/shell_integration/nautilus/syncstate.py
+++ b/shell_integration/nautilus/syncstate.py
@@ -44,6 +44,34 @@ def get_runtime_dir():
return fallback
+def title_case_menu_item(title):
+ if not python3 and isinstance(title, str):
+ title = title.decode('utf-8')
+
+ title_case_titles = {
+ u'Leave this share': u'Leave This Share',
+ u'Share options': u'Share Options',
+ u'Copy internal link': u'Copy Internal Link',
+ u'File actions': u'File Actions',
+ u'Lock file': u'Lock File',
+ u'Unlock file': u'Unlock File',
+ u'Apply labels': u'Apply Labels',
+ u'Open in browser': u'Open in Browser',
+ u'Resolve conflict \u2026': u'Resolve Conflict \u2026',
+ u'Move and rename \u2026': u'Move and Rename \u2026',
+ u'Move, rename and upload \u2026': u'Move, Rename and Upload \u2026',
+ u'Delete local changes': u'Delete Local Changes',
+ u'Move and upload \u2026': u'Move and Upload \u2026',
+ u'Make always available locally': u'Make Always Available Locally',
+ u'Free up local space': u'Free Up Local Space',
+ u'Copy private link to clipboard': u'Copy Private Link to Clipboard',
+ u'Send private link by email \u2026': u'Send Private Link by Email \u2026',
+ u'Send private link by email...': u'Send Private Link by Email...',
+ }
+
+ return title_case_titles.get(title, title)
+
+
class SocketConnect(GObject.GObject):
def __init__(self):
GObject.GObject.__init__(self)
@@ -268,7 +296,7 @@ def ask_for_menu_items(self, files):
item_nextcloud.set_submenu(menu)
for action, enabled, label in menu_items:
- item = Nautilus.MenuItem(name=action, label=label, sensitive=enabled)
+ item = Nautilus.MenuItem(name=action, label=title_case_menu_item(label), sensitive=enabled)
item.connect("activate", self.context_menu_action, action, filesstring)
menu.append_item(item)
@@ -315,7 +343,7 @@ def legacy_menu_items(self, files):
# Add share menu option
item = Nautilus.MenuItem(
name='NautilusPython::ShareItem',
- label=self.strings.get('SHARE_MENU_TITLE', 'Share...'))
+ label=title_case_menu_item(self.strings.get('SHARE_MENU_TITLE', 'Share...')))
item.connect("activate", self.context_menu_action, 'SHARE', filename)
menu.append_item(item)
@@ -323,13 +351,13 @@ def legacy_menu_items(self, files):
# that don't have these actions.
if 'COPY_PRIVATE_LINK_MENU_TITLE' in self.strings:
item_copyprivatelink = Nautilus.MenuItem(
- name='CopyPrivateLink', label=self.strings.get('COPY_PRIVATE_LINK_MENU_TITLE', 'Copy private link to clipboard'))
+ name='CopyPrivateLink', label=title_case_menu_item(self.strings.get('COPY_PRIVATE_LINK_MENU_TITLE', 'Copy private link to clipboard')))
item_copyprivatelink.connect("activate", self.context_menu_action, 'COPY_PRIVATE_LINK', filename)
menu.append_item(item_copyprivatelink)
if 'EMAIL_PRIVATE_LINK_MENU_TITLE' in self.strings:
item_emailprivatelink = Nautilus.MenuItem(
- name='EmailPrivateLink', label=self.strings.get('EMAIL_PRIVATE_LINK_MENU_TITLE', 'Send private link by email...'))
+ name='EmailPrivateLink', label=title_case_menu_item(self.strings.get('EMAIL_PRIVATE_LINK_MENU_TITLE', 'Send private link by email...')))
item_emailprivatelink.connect("activate", self.context_menu_action, 'EMAIL_PRIVATE_LINK', filename)
menu.append_item(item_emailprivatelink)