diff src/browser/register.py @ 464:bea9788f3170

browser and server sides: don't handle the "connectionError" signal anymore, we now use asyncConnect errback: - TODO: allow the user to set another XMPP password with the stdui action CHANGE_XMPP_PASSWD_ID
author souliane <souliane@mailoo.org>
date Fri, 23 May 2014 10:00:16 +0200
parents 1a0cec9b0f1e
children
line wrap: on
line diff
--- a/src/browser/register.py	Wed Jun 04 01:27:11 2014 +0200
+++ b/src/browser/register.py	Fri May 23 10:00:16 2014 +0200
@@ -208,17 +208,20 @@
 
     def onSubmitComplete(self, event):
         result = event.getResults()
-        if result == "AUTH ERROR":
-            Window.alert('Your login and/or password is incorrect. Please try again')
+        if result == "PROFILE AUTH ERROR":
+            Window.alert(_('Your login and/or password is incorrect. Please try again'))
+        elif result == "XMPP AUTH ERROR":
+            # TODO: call stdui action CHANGE_XMPP_PASSWD_ID as it's done in primitivus
+            Window.alert(_(u'Your SàT profile has been authenticated but the associated XMPP account failed to connect. Please use another SàT frontend to set another XMPP password.'))
         elif result == "LOGGED":
             self.callback()
         elif result == "SESSION_ACTIVE":
-            Window.alert('Session already active, this should not happen, please contact the author to fix it')
+            Window.alert(_('Session already active, this should not happen, please contact the author to fix it'))
         elif result == "ALREADY EXISTS":
-            self.register_warning_msg.setHTML('This login already exists,<br>please choose another one')
+            self.register_warning_msg.setHTML(_('This login already exists,<br>please choose another one'))
             self.register_warning_msg.setVisible(True)
         elif result == "INTERNAL":
-            self.register_warning_msg.setHTML('SERVER ERROR: something went wrong during registration process, please contact the server administrator')
+            self.register_warning_msg.setHTML(_('SERVER ERROR: something went wrong during registration process, please contact the server administrator'))
             self.register_warning_msg.setVisible(True)
         elif result == "REGISTRATION":
             self.login_warning_msg.setVisible(False)
@@ -230,9 +233,9 @@
             self.email_box.setText('')
             self.right_side.selectTab(0)
             self.login_pass_box.setFocus(True)
-            Window.alert('An email has been sent to you with your login informations\nPlease remember that this is ONLY A TECHNICAL DEMO')
+            Window.alert(_('An email has been sent to you with your login informations\nPlease remember that this is ONLY A TECHNICAL DEMO'))
         else:
-            Window.alert('Submit error: %s' % result)
+            Window.alert(_('Submit error: %s' % result))
 
 
 class RegisterBox(PopupPanel):