From ccc91b364ed7253d0e265b54a56a0dbab7985602 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 7 Dec 2010 16:48:05 +0900 Subject: [PATCH] improve sync error messages --- ankiqt/ui/sync.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ankiqt/ui/sync.py b/ankiqt/ui/sync.py index b007dc91e..7cbfefb9a 100755 --- a/ankiqt/ui/sync.py +++ b/ankiqt/ui/sync.py @@ -73,6 +73,16 @@ class Sync(QThread): self.emit(SIGNAL("badUserPass")) elif error.data.get('status') == "oldVersion": msg=_("The sync protocol has changed. Please upgrade.") + elif error.data.get('type') == 'noResponse': + msg=_("""\ +The server didn't reply. Please try again shortly, and if the problem \ +persists, please report it on the forums.""") + elif error.data.get('type') == 'connectionError': + msg=_("""\ +There was a connection error. If it persists, please try disabing your +firewall software temporarily, or try again from a different network. + +Debugging info: %s""") % error.data.get("exc", "") else: tb = traceback.format_exc() if "missingFacts" in tb: