diff options
author | Ajay Garg <ajay@activitycentral.com> | 2012-10-12 13:32:53 (GMT) |
---|---|---|
committer | Ajay Garg <ajay@activitycentral.com> | 2012-10-12 13:32:53 (GMT) |
commit | 8432ac96fa2de8bb01f322cd7e36e382bdad074d (patch) | |
tree | dfa9f52cf64bf6ed7a81efa8813547cfb0a0fb7b | |
parent | 5d195e1f60c4a926d01dc540693f7837021fb5a0 (diff) |
sdxo#2431-PART-1: Simplify all connection errors to a single-message, so as to aid string-translation, and show the user the simplest of information.
-rw-r--r-- | rpms/sugar/0154-sdxo-2431-PART-1-Simplify-all-connection-errors-to-a-single.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/rpms/sugar/0154-sdxo-2431-PART-1-Simplify-all-connection-errors-to-a-single.patch b/rpms/sugar/0154-sdxo-2431-PART-1-Simplify-all-connection-errors-to-a-single.patch new file mode 100644 index 0000000..df15e13 --- /dev/null +++ b/rpms/sugar/0154-sdxo-2431-PART-1-Simplify-all-connection-errors-to-a-single.patch @@ -0,0 +1,65 @@ +From 1a31d5a02a934c328ca8b77342c1ac54a8119f55 Mon Sep 17 00:00:00 2001 +From: Ajay Garg <ajay@activitycentral.com> +Date: Fri, 12 Oct 2012 00:07:57 +0530 +Subject: [PATCH] sdxo#2431-PART-1: Simplify all connection errors to a single-message, so as to aid string-translation, and show the user the simplest of information. +Organization: Sugar Labs Foundation +Signed-off-by: Ajay Garg <ajay@activitycentral.com> +--- + src/jarabe/journal/palettes.py | 7 ++++--- + src/jarabe/journal/webdavmanager.py | 3 ++- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/jarabe/journal/palettes.py b/src/jarabe/journal/palettes.py +index ed05fad..a754857 100644 +--- a/src/jarabe/journal/palettes.py ++++ b/src/jarabe/journal/palettes.py +@@ -53,12 +53,13 @@ from jarabe.journal.journalwindow import freeze_ui, \ + + from webdav.Connection import WebdavError + +- + friends_model = friends.get_model() + + _copy_menu_helper = None + _current_action_item = None + ++USER_FRIENDLY_GENERIC_WEBDAV_ERROR_MESSAGE = _('Cannot perform request. Connection failed.') ++ + + class PassphraseDialog(gtk.Dialog): + def __init__(self, callback, metadata): +@@ -713,7 +714,7 @@ class ActionItem(gobject.GObject): + show_progress=False, + filesize=0) + except (WebdavError, socket.error), e: +- error_message = e ++ error_message = USER_FRIENDLY_GENERIC_WEBDAV_ERROR_MESSAGE + logging.warn(error_message) + if self._batch_mode: + self._handle_error_alert(error_message, metadata) +@@ -736,7 +737,7 @@ class ActionItem(gobject.GObject): + if os.path.exists(preview_path): + os.unlink(preview_path) + +- error_message = e ++ error_message = USER_FRIENDLY_GENERIC_WEBDAV_ERROR_MESSAGE + logging.warn(error_message) + if self._batch_mode: + self._handle_error_alert(error_message, metadata) +diff --git a/src/jarabe/journal/webdavmanager.py b/src/jarabe/journal/webdavmanager.py +index 3ff9990..d026fe5 100644 +--- a/src/jarabe/journal/webdavmanager.py ++++ b/src/jarabe/journal/webdavmanager.py +@@ -111,7 +111,8 @@ class WebDavUrlManager(gobject.GObject): + if not type(e) == AuthorizationError: + from jarabe.journal.journalactivity import get_journal + +- error_message = e ++ from jarabe.journal.palettes import USER_FRIENDLY_GENERIC_WEBDAV_ERROR_MESSAGE ++ error_message = USER_FRIENDLY_GENERIC_WEBDAV_ERROR_MESSAGE + get_journal()._volume_error_cb(None, error_message,_('Error')) + + # Re-raise this error. +-- +1.7.4.4 + |