Statistics
| Branch: | Tag: | Revision:

root / snf-astakos-app / astakos / im / messages.py @ e24d0e0d

History | View | Annotate | Download (13.7 kB)

1 ae497612 Olga Brani
# Copyright 2011-2012 GRNET S.A. All rights reserved.
2 ae497612 Olga Brani
#
3 ae497612 Olga Brani
# Redistribution and use in source and binary forms, with or
4 ae497612 Olga Brani
# without modification, are permitted provided that the following
5 ae497612 Olga Brani
# conditions are met:
6 ae497612 Olga Brani
#
7 ae497612 Olga Brani
#   1. Redistributions of source code must retain the above
8 ae497612 Olga Brani
#      copyright notice, this list of conditions and the following
9 ae497612 Olga Brani
#      disclaimer.
10 ae497612 Olga Brani
#
11 ae497612 Olga Brani
#   2. Redistributions in binary form must reproduce the above
12 ae497612 Olga Brani
#      copyright notice, this list of conditions and the following
13 ae497612 Olga Brani
#      disclaimer in the documentation and/or other materials
14 ae497612 Olga Brani
#      provided with the distribution.
15 ae497612 Olga Brani
#
16 ae497612 Olga Brani
# THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
17 ae497612 Olga Brani
# OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 ae497612 Olga Brani
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 ae497612 Olga Brani
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
20 ae497612 Olga Brani
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 ae497612 Olga Brani
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 ae497612 Olga Brani
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
23 ae497612 Olga Brani
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION HOWEVER CAUSED
24 ae497612 Olga Brani
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 ae497612 Olga Brani
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE ARISING IN
26 ae497612 Olga Brani
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 ae497612 Olga Brani
# POSSIBILITY OF SUCH DAMAGE.
28 ae497612 Olga Brani
#
29 ae497612 Olga Brani
# The views and conclusions contained in the software and
30 ae497612 Olga Brani
# documentation are those of the authors and should not be
31 ae497612 Olga Brani
# interpreted as representing official policies, either expressed
32 ae497612 Olga Brani
# or implied, of GRNET S.A.
33 ae497612 Olga Brani
34 450093ec Kostas Papadimitriou
from django.conf import settings
35 450093ec Kostas Papadimitriou
36 ae497612 Olga Brani
ACCOUNT_AUTHENTICATION_FAILED           =   'Cannot authenticate account.'
37 ae497612 Olga Brani
ACCOUNT_ALREADY_ACTIVE                  =   'Account is already active.'
38 c0b26605 Sofia Papagiannaki
ACCOUNT_PENDING_ACTIVATION              =   'Your request is pending activation.'
39 c4b1a172 Kostas Papadimitriou
ACCOUNT_PENDING_MODERATION              =   'Your request is pending moderation.'
40 c4b1a172 Kostas Papadimitriou
ACCOUNT_INACTIVE                        =   'Your account is disabled.'
41 c0b26605 Sofia Papagiannaki
ACCOUNT_RESEND_ACTIVATION               =   'You have not followed the activation link. <a href="%(send_activation_url)s">Resend activation email?</a>'
42 c0b26605 Sofia Papagiannaki
INACTIVE_ACCOUNT_CHANGE_EMAIL           =   ''.join([ACCOUNT_RESEND_ACTIVATION, ' or <a href="%(signup_url)s">Provide new email?</a>'])
43 c0b26605 Sofia Papagiannaki
44 c4b1a172 Kostas Papadimitriou
ACCOUNT_PENDING_ACTIVATION_HELP         =   'If you haven\'t received activation email, be sure to check your spam folder.'
45 54831252 Kostas Papadimitriou
46 54831252 Kostas Papadimitriou
ACCOUNT_ACTIVATED                       =   'Congratulations. Your account has' + \
47 54831252 Kostas Papadimitriou
                                            ' been activated and you have been' + \
48 54831252 Kostas Papadimitriou
                                            ' automatically signed in to your account.'
49 badcb2a9 Kostas Papadimitriou
ALREADY_LOGGED_IN                       =   'You are already signed in to your account.'
50 af15e964 Kostas Papadimitriou
PASSWORD_RESET_DONE                     =   'A mail with details on how to change your password was sent.'
51 af15e964 Kostas Papadimitriou
PASSWORD_RESET_CONFIRM_DONE             =   'Password changed. You can now login using your new password.'
52 c4b1a172 Kostas Papadimitriou
53 c4b1a172 Kostas Papadimitriou
ACCOUNT_RESEND_ACTIVATION_PROMPT        =   'Resend activation mail'
54 c4b1a172 Kostas Papadimitriou
ACCOUNT_USER_ACTIVATION_PENDING         =   'You have not followed the activation link'
55 c4b1a172 Kostas Papadimitriou
56 c0b26605 Sofia Papagiannaki
ACCOUNT_UNKNOWN                         =   'There is no such account.'
57 ae497612 Olga Brani
TOKEN_UNKNOWN                           =   'There is no user matching this token.'
58 ae497612 Olga Brani
59 ae497612 Olga Brani
PROFILE_UPDATED                         =   'Profile has been updated successfully.'
60 ae497612 Olga Brani
FEEDBACK_SENT                           =   'Feedback successfully sent.'
61 ae497612 Olga Brani
EMAIL_CHANGED                           =   'Account email has been changed successfully.'
62 ae497612 Olga Brani
EMAIL_CHANGE_REGISTERED                 =   'Change email request has been registered succefully. \
63 ae497612 Olga Brani
                                               You are going to receive a verification email in the new address.'
64 ae497612 Olga Brani
65 ca7eb408 Olga Brani
OBJECT_CREATED                          =   'The %(verbose_name)s was created successfully.'
66 bfe23b13 Sofia Papagiannaki
USER_JOINED_GROUP                       =   '%(realname)s has been successfully joined the group.'
67 bfe23b13 Sofia Papagiannaki
USER_LEFT_GROUP                         =   '%(realname)s has been successfully left the group.'
68 bfe23b13 Sofia Papagiannaki
USER_MEMBERSHIP_REJECTED                =   '%(realname)s\'s request to join the group has been rejected.'
69 3cbd5e47 Olga Brani
MEMBER_REMOVED                          =   '%(realname)s has been successfully removed from the group.'
70 c4b1a172 Kostas Papadimitriou
BILLING_ERROR                           =   'Service response status: %(status)d'
71 ae497612 Olga Brani
LOGOUT_SUCCESS                          =   'You have successfully logged out.'
72 af15e964 Kostas Papadimitriou
LOGIN_SUCCESS                           =   'You have successfully logged in.'
73 ae497612 Olga Brani
74 ae497612 Olga Brani
GENERIC_ERROR                           =   'Something wrong has happened. \
75 ae497612 Olga Brani
                                               Please contact the administrators for more details.'
76 ae497612 Olga Brani
77 ae497612 Olga Brani
MAX_INVITATION_NUMBER_REACHED   =           'There are no invitations left.'
78 ae497612 Olga Brani
GROUP_MAX_PARTICIPANT_NUMBER_REACHED    =   'Group maximum participant number has been reached.'
79 bfe23b13 Sofia Papagiannaki
PROJECT_MAX_PARTICIPANT_NUMBER_REACHED  =   'Project maximum participant number has been reached.'
80 ae497612 Olga Brani
NO_APPROVAL_TERMS                       =   'There are no approval terms.'
81 34a76cdb Kostas Papadimitriou
PENDING_EMAIL_CHANGE_REQUEST            =   'There is already a pending change email request. ' + \
82 34a76cdb Kostas Papadimitriou
                                            'Submiting a new email will cancel any previous requests.'
83 3cbd5e47 Olga Brani
OBJECT_CREATED_FAILED                   =   'The %(verbose_name)s creation failed: %(reason)s.'
84 ae497612 Olga Brani
GROUP_JOIN_FAILURE                      =   'Failed to join group.'
85 bfe23b13 Sofia Papagiannaki
PROJECT_JOIN_FAILURE                    =   'Failed to join project.'
86 ae497612 Olga Brani
GROUPKIND_UNKNOWN                       =   'There is no such a group kind'
87 ae497612 Olga Brani
NOT_MEMBER                              =   'User is not member of the group.'
88 ae497612 Olga Brani
NOT_OWNER                               =   'User is not a group owner.'
89 ae497612 Olga Brani
OWNER_CANNOT_LEAVE_GROUP                =   'Owner cannot leave the group.'
90 ae497612 Olga Brani
91 ae497612 Olga Brani
# Field validation fields
92 ae497612 Olga Brani
REQUIRED_FIELD                          =   'This field is required.'
93 ae497612 Olga Brani
EMAIL_USED                              =   'This email address is already in use. Please supply a different email address.'
94 ae497612 Olga Brani
SHIBBOLETH_EMAIL_USED                   =   'This email is already associated with another shibboleth account.'
95 ae497612 Olga Brani
SHIBBOLETH_INACTIVE_ACC                 =   'This email is already associated with an inactive account. \
96 c4b1a172 Kostas Papadimitriou
                                               You need to wait to be activated before being able to switch to a shibboleth account.'
97 e24d0e0d Kostas Papadimitriou
SHIBBOLETH_MISSING_EPPN = 'Your request is missing a unique ' + \
98 e24d0e0d Kostas Papadimitriou
                          'token. This means your academic ' + \
99 e24d0e0d Kostas Papadimitriou
                          'institution does not yet allow its users to log ' + \
100 e24d0e0d Kostas Papadimitriou
                          'into %(domain)s with their academic ' + \
101 e24d0e0d Kostas Papadimitriou
                          'credentials. Please contact %(contact_email)s' + \
102 e24d0e0d Kostas Papadimitriou
                          ' for more information.'
103 c0b26605 Sofia Papagiannaki
SHIBBOLETH_MISSING_NAME                 =   'Missing user name in request.'
104 ae497612 Olga Brani
105 ae497612 Olga Brani
SIGN_TERMS                              =   'You have to agree with the terms.'
106 ae497612 Olga Brani
CAPTCHA_VALIDATION_ERR                  =   'You have not entered the correct words.'
107 ae497612 Olga Brani
SUSPENDED_LOCAL_ACC                     =   'Local login is not the current authentication method for this account.'
108 ae497612 Olga Brani
UNUSABLE_PASSWORD                       =   'This account has not a usable password.'
109 ae497612 Olga Brani
EMAIL_UNKNOWN                           =   'That e-mail address doesn\'t have an associated user account. \
110 ae497612 Olga Brani
                                               Are you sure you\'ve registered?'
111 ae497612 Olga Brani
INVITATION_EMAIL_EXISTS                 =   'There is already invitation for this email.'
112 ae497612 Olga Brani
INVITATION_CONSUMED_ERR                 =   'Invitation is used.'
113 ae497612 Olga Brani
UNKNOWN_USERS                           =   'Unknown users: %s'
114 ae497612 Olga Brani
UNIQUE_EMAIL_IS_ACTIVE_CONSTRAIN_ERR    =   'Another account with the same email & is_active combination found.'
115 ae497612 Olga Brani
INVALID_ACTIVATION_KEY                  =   'Invalid activation key.'
116 ae497612 Olga Brani
NEW_EMAIL_ADDR_RESERVED                 =   'The new email address is reserved.'
117 ae497612 Olga Brani
EMAIL_RESERVED                          =   'Email: %(email)s is reserved'
118 c0b26605 Sofia Papagiannaki
NO_LOCAL_AUTH                           =   'Local login is not the current authentication method for this account.'
119 c0b26605 Sofia Papagiannaki
SWITCH_ACCOUNT_FAILURE                  =   'Account failed to switch. Invalid parameters.'
120 c4b1a172 Kostas Papadimitriou
SWITCH_ACCOUNT_SUCCESS_WITH_PROVIDER    =   'Account failed to switch to %(provider)s.'
121 c0b26605 Sofia Papagiannaki
SWITCH_ACCOUNT_SUCCESS                  =   'Account successfully switched to %(provider)s.'
122 ae497612 Olga Brani
123 ae497612 Olga Brani
# Field help text
124 ae497612 Olga Brani
ADD_GROUP_MEMBERS_Q_HELP                =   'Add comma separated user emails, eg. user1@user.com, user2@user.com'
125 ae497612 Olga Brani
ASTAKOSUSER_GROUPS_HELP                 =   'In addition to the permissions manually assigned, \
126 ae497612 Olga Brani
                                               this user will also get all permissions granted to each group he/she is in.'
127 ae497612 Olga Brani
EMAIL_CHANGE_NEW_ADDR_HELP              =   'Your old email address will be used until you verify your new one.'
128 ae497612 Olga Brani
129 ae497612 Olga Brani
EMAIL_SEND_ERR                          =   'Failed to send %s.'
130 ae497612 Olga Brani
ADMIN_NOTIFICATION_SEND_ERR             =   EMAIL_SEND_ERR % 'admin notification'
131 ae497612 Olga Brani
VERIFICATION_SEND_ERR                   =   EMAIL_SEND_ERR % 'verification'
132 ae497612 Olga Brani
INVITATION_SEND_ERR                     =   EMAIL_SEND_ERR % 'invitation'
133 ae497612 Olga Brani
GREETING_SEND_ERR                       =   EMAIL_SEND_ERR % 'greeting'
134 ae497612 Olga Brani
FEEDBACK_SEND_ERR                       =   EMAIL_SEND_ERR % 'feedback'
135 ae497612 Olga Brani
CHANGE_EMAIL_SEND_ERR                   =   EMAIL_SEND_ERR % 'feedback'
136 ae497612 Olga Brani
NOTIFICATION_SEND_ERR                   =   EMAIL_SEND_ERR % 'notification'
137 b8f05f8d Sofia Papagiannaki
DETAILED_NOTIFICATION_SEND_ERR          =   'Failed to send %(subject)s notification to %(recipients)s.'
138 ae497612 Olga Brani
139 ae497612 Olga Brani
MISSING_NEXT_PARAMETER                  =   'No next parameter'
140 ae497612 Olga Brani
141 c0b26605 Sofia Papagiannaki
INVITATION_SENT                         =   'Invitation sent to %(email)s.'
142 5e992f29 Kostas Papadimitriou
VERIFICATION_SENT                       =   'Registration completed but account is not active yet. Account activation link was sent to your email address.'
143 ae497612 Olga Brani
SWITCH_ACCOUNT_LINK_SENT                =   'This email is already associated with another local account. \
144 e1a80257 Sofia Papagiannaki
                                             To change this account to a shibboleth one follow the link in the verification email sent to %(email)s. \
145 e1a80257 Sofia Papagiannaki
                                             Otherwise just ignore it.'
146 c0b26605 Sofia Papagiannaki
NOTIFICATION_SENT                       =   'Your request for an account was successfully received and is now pending approval. \
147 ae497612 Olga Brani
                                               You will be notified by email in the next few days. \
148 ae497612 Olga Brani
                                               Thanks for your interest in ~okeanos! The GRNET team.'
149 c063d1c3 Kostas Papadimitriou
ACTIVATION_SENT                         =   'An email containing your activation link was sent to your email address.'
150 c0b26605 Sofia Papagiannaki
151 5e992f29 Kostas Papadimitriou
REGISTRATION_COMPLETED                  =   'Registration completed you can now login to your account.'
152 c0b26605 Sofia Papagiannaki
153 c0b26605 Sofia Papagiannaki
NO_RESPONSE                             =   'There is no response.'
154 c0b26605 Sofia Papagiannaki
NOT_ALLOWED_NEXT_PARAM                  =   'Not allowed next parameter.'
155 c0b26605 Sofia Papagiannaki
MISSING_KEY_PARAMETER                   =   'Missing key parameter.'
156 c0b26605 Sofia Papagiannaki
INVALID_KEY_PARAMETER                   =   'Invalid key.'
157 e1a80257 Sofia Papagiannaki
DOMAIN_VALUE_ERR                        =   'Enter a valid domain.'
158 e1a80257 Sofia Papagiannaki
QH_SYNC_ERROR                           =   'Failed to get synchronized with quotaholder.'
159 e1a80257 Sofia Papagiannaki
UNIQUE_PROJECT_NAME_CONSTRAIN_ERR       =   'The project name (as specified in its application\'s definition) must be unique among all active projects.'
160 ccab6eb5 Sofia Papagiannaki
INVALID_PROJECT                         =   'Project %(id)s is invalid.'
161 ccab6eb5 Sofia Papagiannaki
NOT_ALIVE_PROJECT                       =   'Project %(id)s is not alive.'
162 2a965273 Sofia Papagiannaki
NOT_ALLOWED                             =   'You do not have the permissions to perform this action.'
163 e1a80257 Sofia Papagiannaki
MEMBER_NUMBER_LIMIT_REACHED             =   'Maximum participant number has been reached.'
164 b8f05f8d Sofia Papagiannaki
MEMBER_JOIN_POLICY_CLOSED               =   'The project member join policy is closed.'
165 529f3c49 Sofia Papagiannaki
MEMBER_LEAVE_POLICY_CLOSED              =   'The project member leave policy is closed.'
166 ccab6eb5 Sofia Papagiannaki
NOT_MEMBERSHIP_REQUEST                  =   'There is no such a membership request.'
167 bfe23b13 Sofia Papagiannaki
MEMBERSHIP_REQUEST_EXISTS               =   'There is alreary such a membership request.'
168 ccab6eb5 Sofia Papagiannaki
NO_APPLICANT                            =   'Project application requires an applicant. None found.'
169 bfe23b13 Sofia Papagiannaki
ADD_PROJECT_MEMBERS_Q_HELP              =   'Add comma separated user emails, eg. user1@user.com, user2@user.com'
170 bfe23b13 Sofia Papagiannaki
MISSING_IDENTIFIER                      =   'Missing identifier.'
171 73fbaec4 Sofia Papagiannaki
UNKNOWN_USER_ID                         =   'There is no user identified by %s.'
172 73fbaec4 Sofia Papagiannaki
UNKNOWN_PROJECT_APPLICATION_ID          =   'There is no project application identified by %s.'
173 bfe23b13 Sofia Papagiannaki
UNKNOWN_IDENTIFIER                      =   'Unknown identidier.'
174 73fbaec4 Sofia Papagiannaki
PENDING_MEMBERSHIP_LEAVE                =   'Your request is pending acception.'
175 73fbaec4 Sofia Papagiannaki
USER_JOINED_PROJECT                     =   '%(realname)s has been successfully joined the project.'
176 73fbaec4 Sofia Papagiannaki
USER_LEFT_PROJECT                       =   '%(realname)s has been successfully left the project.'
177 c4b1a172 Kostas Papadimitriou
178 c4b1a172 Kostas Papadimitriou
# Auth providers messages
179 c4b1a172 Kostas Papadimitriou
AUTH_PROVIDER_NOT_ACTIVE                     =   "'%(provider)s' is disabled"
180 c4b1a172 Kostas Papadimitriou
AUTH_PROVIDER_NOT_ACTIVE_FOR_LOGIN           =   "Login using '%(provider)s' is disabled"
181 450093ec Kostas Papadimitriou
AUTH_PROVIDER_NOT_ACTIVE_FOR_USER            =   "You cannot login using '%(provider)s'"
182 450093ec Kostas Papadimitriou
AUTH_PROVIDER_NOT_ACTIVE_FOR_CREATE          =   "Signup using '%(provider)s' is disabled."
183 450093ec Kostas Papadimitriou
AUTH_PROVIDER_NOT_ACTIVE_FOR_ADD             =   "You cannot add %(provider)s login method."
184 16f89c1f Kostas Papadimitriou
AUTH_PROVIDER_ADDED                          =   "New login method added."
185 16f89c1f Kostas Papadimitriou
AUTH_PROVIDER_ADD_FAILED                     =   "Failed to add new login method."
186 4a1e3e53 Kostas Papadimitriou
AUTH_PROVIDER_ADD_EXISTS                     =   "Account already assigned to another user."
187 450093ec Kostas Papadimitriou
AUTH_PROVIDER_LOGIN_TO_ADD                   =   "The new login method will be assigned once you login to your account."
188 450093ec Kostas Papadimitriou
AUTH_PROVIDER_INVALID_LOGIN                  =   "No account exists."
189 badcb2a9 Kostas Papadimitriou
AUTH_PROVIDER_REQUIRED                       =   "%(provider)s login method is required. Add one from your profile page."
190 450093ec Kostas Papadimitriou
191 450093ec Kostas Papadimitriou
192 450093ec Kostas Papadimitriou
messages = locals().keys()
193 450093ec Kostas Papadimitriou
for msg in messages:
194 450093ec Kostas Papadimitriou
    if msg == msg.upper():
195 450093ec Kostas Papadimitriou
        attr = "ASTAKOS_%s_MESSAGE" % msg
196 450093ec Kostas Papadimitriou
        settings_value = getattr(settings, attr, None)
197 450093ec Kostas Papadimitriou
        if settings_value:
198 badcb2a9 Kostas Papadimitriou
            locals()[msg] = settings_value