Aleš Erjavec avatar Aleš Erjavec committed 2938d74

Fixed user error messages formating.

Comments (0)

Files changed (1)

Orange/OrangeCanvas/application/canvasmain.py

         document = self.current_document()
 
         selected = message_question(
-            self.tr("Do you want to save the changes you made to scheme %r?") \
+            self.tr('Do you want to save the changes you made to scheme "%s"?')
                     % document.scheme().title,
             self.tr("Save Changes?"),
             self.tr("If you do not save your changes will be lost"),
         """
         document = self.current_document()
         curr_scheme = document.scheme()
+        title = curr_scheme.title or "untitled"
 
         if document.path():
             start_dir = document.path()
                     QDesktopServices.DocumentsLocation
                 )
 
-            title = curr_scheme.title or "untitled"
             start_dir = os.path.join(unicode(start_dir), title + ".ows")
 
         filename = QFileDialog.getSaveFileName(
                 # TODO: should handle permission errors with a
                 # specialized messages.
                 message_critical(
-                     self.tr("An error occurred while trying to save the %r "
-                             "scheme to %r" % \
-                             (curr_scheme.title, basename)),
-                     title=self.tr("Error saving %r") % basename,
+                     self.tr('An error occurred while trying to save scheme '
+                             '"%s" to "%s"') % (title, basename),
+                     title=self.tr("Error saving %s") % basename,
                      exc_info=True,
                      parent=self)
                 return QFileDialog.Rejected
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.