app/soc/logic/helper/notifications.py
changeset 970 8b5611d5b053
parent 930 7e88fba647b1
child 1059 17221b578fe7
equal deleted inserted replaced
969:b12de918d660 970:8b5611d5b053
    27 
    27 
    28 from google.appengine.api import users
    28 from google.appengine.api import users
    29 
    29 
    30 from django.template import loader
    30 from django.template import loader
    31 from django.utils.encoding import force_unicode
    31 from django.utils.encoding import force_unicode
    32 from django.utils.translation import ugettext_lazy
    32 from django.utils.translation import ugettext
    33 
    33 
    34 # We cannot import soc.logic.models notification nor user here
    34 # We cannot import soc.logic.models notification nor user here
    35 # due to cyclic imports
    35 # due to cyclic imports
    36 from soc.logic import dicts
    36 from soc.logic import dicts
    37 from soc.logic import mail_dispatcher
    37 from soc.logic import mail_dispatcher
    39 
    39 
    40 import soc.views.models as model_view
    40 import soc.views.models as model_view
    41 import soc.logic.models as model_logic
    41 import soc.logic.models as model_logic
    42 
    42 
    43 
    43 
    44 DEF_NEW_NOTIFICATION_MSG = ugettext_lazy(
    44 DEF_NEW_NOTIFICATION_MSG = ugettext(
    45   "You have received a new Notification.")
    45   "You have received a new Notification.")
    46 
    46 
    47 DEF_INVITATION_MSG_FMT = ugettext_lazy(
    47 DEF_INVITATION_MSG_FMT = ugettext(
    48     "Invitation to become a %(role_verbose)s for %(group)s.")
    48     "Invitation to become a %(role_verbose)s for %(group)s.")
    49 
    49 
    50 DEF_NEW_CLUB_MSG_FMT = ugettext_lazy(
    50 DEF_NEW_CLUB_MSG_FMT = ugettext(
    51     "Your club application for %(name)s has been accepted.")
    51     "Your club application for %(name)s has been accepted.")
    52 
    52 
    53 DEF_WELCOME_MSG_FMT = ugettext_lazy("Welcome to Melange %(name)s,")
    53 DEF_WELCOME_MSG_FMT = ugettext("Welcome to Melange %(name)s,")
    54 
    54 
    55 DEF_GROUP_INVITE_NOTIFICATION_TEMPLATE = 'soc/notification/messages/invitation.html'
    55 DEF_GROUP_INVITE_NOTIFICATION_TEMPLATE = 'soc/notification/messages/invitation.html'
    56 
    56 
    57 DEF_NEW_CLUB_TEMPLATE = 'soc/club/messages/accepted.html'
    57 DEF_NEW_CLUB_TEMPLATE = 'soc/club/messages/accepted.html'
    58 
    58