From c3320bb1a46681025307379949ca8297c749a055 Mon Sep 17 00:00:00 2001 From: Jack Ha Date: Wed, 23 Nov 2016 13:33:12 +0100 Subject: [PATCH] Change settings to settings/overrides in selected messages. CURA-2898 --- cura/Settings/MachineManager.py | 23 +++++++++++++--------- resources/qml/Actions.qml | 4 ++-- resources/qml/Preferences/ProfilesPage.qml | 4 ++-- resources/qml/SidebarHeader.qml | 2 +- 4 files changed, 19 insertions(+), 14 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index fce82212cd..f0aa79541e 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -871,7 +871,7 @@ class MachineManager(QObject): def _askUserToKeepOrClearCurrentSettings(self): # Ask the user if the user profile should be cleared or not (discarding the current settings) # In Simple Mode we assume the user always wants to keep the (limited) current settings - details_text = catalog.i18nc("@label", "You made changes to the following setting(s):") + details_text = catalog.i18nc("@label", "You made changes to the following setting(s)/override(s):") # user changes in global stack details_list = [setting.definition.label for setting in self._global_container_stack.getTop().findInstances(**{})] @@ -886,14 +886,19 @@ class MachineManager(QObject): # Format to output string details = "\n ".join([details_text, ] + details_list) - Application.getInstance().messageBox(catalog.i18nc("@window:title", "Switched profiles"), - catalog.i18nc("@label", - "Do you want to transfer your changed settings to this profile?"), - catalog.i18nc("@label", - "If you transfer your settings they will override settings in the profile."), - details, - buttons=QMessageBox.Yes + QMessageBox.No, icon=QMessageBox.Question, - callback=self._keepUserSettingsDialogCallback) + num_changed_settings = len(details_list) + Application.getInstance().messageBox( + catalog.i18nc("@window:title", "Switched profiles"), + catalog.i18nc( + "@label", + "Do you want to transfer your %d changed setting(s)/override(s) to this profile?") % num_changed_settings, + catalog.i18nc( + "@label", + "If you transfer your settings they will override settings in the profile."), + details, + buttons=QMessageBox.Yes + QMessageBox.No, + icon=QMessageBox.Question, + callback=self._keepUserSettingsDialogCallback) def _keepUserSettingsDialogCallback(self, button): if button == QMessageBox.Yes: diff --git a/resources/qml/Actions.qml b/resources/qml/Actions.qml index 043552d768..23fb452605 100644 --- a/resources/qml/Actions.qml +++ b/resources/qml/Actions.qml @@ -122,7 +122,7 @@ Item { id: updateProfileAction; enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId) - text: catalog.i18nc("@action:inmenu menubar:profile","&Update profile with current settings"); + text: catalog.i18nc("@action:inmenu menubar:profile","&Update profile with current settings/overrides"); onTriggered: Cura.ContainerManager.updateQualityChanges(); } @@ -142,7 +142,7 @@ Item { id: addProfileAction; enabled: !Cura.MachineManager.stacksHaveErrors && Cura.MachineManager.hasUserSettings - text: catalog.i18nc("@action:inmenu menubar:profile","&Create profile from current settings..."); + text: catalog.i18nc("@action:inmenu menubar:profile","&Create profile from current settings/overrides..."); } Action diff --git a/resources/qml/Preferences/ProfilesPage.qml b/resources/qml/Preferences/ProfilesPage.qml index b1f06af3a9..521145f872 100644 --- a/resources/qml/Preferences/ProfilesPage.qml +++ b/resources/qml/Preferences/ProfilesPage.qml @@ -162,7 +162,7 @@ UM.ManagementPage Button { text: { - return catalog.i18nc("@action:button", "Update profile with current settings"); + return catalog.i18nc("@action:button", "Update profile with current settings/overrides"); } enabled: Cura.MachineManager.hasUserSettings && !Cura.MachineManager.isReadOnly(Cura.MachineManager.activeQualityId) onClicked: Cura.ContainerManager.updateQualityChanges() @@ -187,7 +187,7 @@ UM.ManagementPage Label { id: defaultsMessage visible: false - text: catalog.i18nc("@action:label", "This profile uses the defaults specified by the printer, so it has no settings in the list below.") + text: catalog.i18nc("@action:label", "This profile uses the defaults specified by the printer, so it has no settings/overrides in the list below.") wrapMode: Text.WordWrap width: parent.width } diff --git a/resources/qml/SidebarHeader.qml b/resources/qml/SidebarHeader.qml index 700384c394..e894392b06 100644 --- a/resources/qml/SidebarHeader.qml +++ b/resources/qml/SidebarHeader.qml @@ -329,7 +329,7 @@ Column } onEntered: { - var content = catalog.i18nc("@tooltip","Some setting values are different from the values stored in the profile.\n\nClick to open the profile manager.") + var content = catalog.i18nc("@tooltip","Some setting/override values are different from the values stored in the profile.\n\nClick to open the profile manager.") base.showTooltip(globalProfileRow, Qt.point(0, globalProfileRow.height / 2), content) } onExited: base.hideTooltip()