changeset 3638:715c0a9e4840

jabber/email new user notification: use english language if user did not specify language
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Fri, 23 May 2008 23:45:02 +0200
parents 92d08c1975b0
children 776b338ccc2d
files MoinMoin/events/emailnotify.py MoinMoin/events/jabbernotify.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/emailnotify.py	Fri May 23 23:16:39 2008 +0200
+++ b/MoinMoin/events/emailnotify.py	Fri May 23 23:45:02 2008 +0200
@@ -116,7 +116,7 @@
         usr = User(request, id=usr_id)
         # Currently send this only to super users
         if usr.isSuperUser() and event_name in usr.email_subscribed_events:
-            _ = lambda text: request.getText(text, lang=usr.language)
+            _ = lambda text: request.getText(text, lang=usr.language or 'en')
             data = notification.user_created_message(request, _, sitename, username, email)
             send_notification(request, from_address, [usr.email], data)
 
--- a/MoinMoin/events/jabbernotify.py	Fri May 23 23:16:39 2008 +0200
+++ b/MoinMoin/events/jabbernotify.py	Fri May 23 23:45:02 2008 +0200
@@ -143,7 +143,7 @@
         usr = User(request, id=id)
         # Currently send this only to super users
         if usr.isSuperUser() and usr.jid and event_name in usr.jabber_subscribed_events:
-            _ = lambda text: request.getText(text, lang=usr.language)
+            _ = lambda text: request.getText(text, lang=usr.language or 'en')
             msg = notification.user_created_message(request, _, sitename, username, email)
             data = {'action': "user_created", 'subject': msg['subject'], 'text': msg['text'],
                     'url_list': []}