Browse Source

Change settings to settings/overrides in selected messages. CURA-2898

Jack Ha 8 years ago
parent
commit
c3320bb1a4

+ 14 - 9
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:

+ 2 - 2
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

+ 2 - 2
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
             }

+ 1 - 1
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()