Statistics
| Branch: | Tag: | Revision:

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

History | View | Annotate | Download (17.3 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 cfb7dd4f Giorgos Korfiatis
import astakos.im.settings as astakos_settings
36 450093ec Kostas Papadimitriou
37 450093ec Kostas Papadimitriou
38 8fb8d0cf Giorgos Korfiatis
LOGGED_IN_WARNING = 'It seems that you are already logged in.'
39 8fb8d0cf Giorgos Korfiatis
ACCOUNT_ALREADY_VERIFIED = 'This account is already verified.'
40 8fb8d0cf Giorgos Korfiatis
ACCOUNT_ALREADY_MODERATED = 'This account is already moderated.'
41 8fb8d0cf Giorgos Korfiatis
ACCOUNT_ALREADY_ACTIVE = 'This account is already active.'
42 8fb8d0cf Giorgos Korfiatis
ACCOUNT_REJECTED = 'This account has been rejected.'
43 8fb8d0cf Giorgos Korfiatis
ACCOUNT_NOT_ACTIVE = 'User account is not active.'
44 8fb8d0cf Giorgos Korfiatis
ACCOUNT_NOT_MODERATED = 'User account is not moderated.'
45 8fb8d0cf Giorgos Korfiatis
ACCOUNT_NOT_VERIFIED = 'User account does not have a verified email address.'
46 8fb8d0cf Giorgos Korfiatis
ACCOUNT_RESEND_ACTIVATION = (
47 8fb8d0cf Giorgos Korfiatis
    'It seems that an activation email has been sent to you, but you have '
48 8fb8d0cf Giorgos Korfiatis
    'not followed the activation link. '
49 8fb8d0cf Giorgos Korfiatis
    '<a href="%(send_activation_url)s">Resend activation email.</a>')
50 8fb8d0cf Giorgos Korfiatis
INACTIVE_ACCOUNT_CHANGE_EMAIL = ''.join(
51 8fb8d0cf Giorgos Korfiatis
    [ACCOUNT_RESEND_ACTIVATION,
52 8fb8d0cf Giorgos Korfiatis
     ' Or <a href="%(signup_url)s">Send activation to a new email.</a>'])
53 c0b26605 Sofia Papagiannaki
54 8fb8d0cf Giorgos Korfiatis
ACCOUNT_PENDING_ACTIVATION_HELP = (
55 8fb8d0cf Giorgos Korfiatis
    'An activation email has been sent to you. Make sure you check your '
56 8fb8d0cf Giorgos Korfiatis
    'spam folder, too.')
57 54831252 Kostas Papadimitriou
58 8fb8d0cf Giorgos Korfiatis
ACCOUNT_ACTIVATED = 'Congratulations. Your account has' + \
59 8fb8d0cf Giorgos Korfiatis
    ' been activated. You are now logged in.'
60 8fb8d0cf Giorgos Korfiatis
ACCOUNT_DEACTIVATED = 'Your account is inactive'
61 8fb8d0cf Giorgos Korfiatis
PASSWORD_RESET_DONE = (
62 8fb8d0cf Giorgos Korfiatis
    'An email with details on how to change your password has been sent. '
63 8fb8d0cf Giorgos Korfiatis
    'Please check your Inbox.')
64 8fb8d0cf Giorgos Korfiatis
PASSWORD_RESET_CONFIRM_DONE = (
65 8fb8d0cf Giorgos Korfiatis
    'Your password has changed successfully. You '
66 8fb8d0cf Giorgos Korfiatis
    'can now login using your new password.')
67 8fb8d0cf Giorgos Korfiatis
PASSWORD_CHANGED = 'Your new password was set successfully.'
68 c4b1a172 Kostas Papadimitriou
69 8fb8d0cf Giorgos Korfiatis
ACCOUNT_RESEND_ACTIVATION = 'Resend activation email'
70 8fb8d0cf Giorgos Korfiatis
ACCOUNT_USER_ACTIVATION_PENDING = 'You have not followed the activation link'
71 c4b1a172 Kostas Papadimitriou
72 8fb8d0cf Giorgos Korfiatis
ACCOUNT_UNKNOWN = 'There is no such account.'
73 8fb8d0cf Giorgos Korfiatis
TOKEN_UNKNOWN = 'There is no user matching this authentication token.'
74 8fb8d0cf Giorgos Korfiatis
TOKEN_UPDATED = 'Your authentication token has been updated successfully.'
75 ae497612 Olga Brani
76 8fb8d0cf Giorgos Korfiatis
PROFILE_UPDATED = 'Your profile has been updated successfully.'
77 8fb8d0cf Giorgos Korfiatis
FEEDBACK_SENT = (
78 8fb8d0cf Giorgos Korfiatis
    'Thank you for contacting us. We will process your message carefully '
79 8fb8d0cf Giorgos Korfiatis
    'and get back to you.')
80 8fb8d0cf Giorgos Korfiatis
EMAIL_CHANGED = 'The email of your account changed successfully.'
81 8fb8d0cf Giorgos Korfiatis
EMAIL_CHANGE_REGISTERED = (
82 8fb8d0cf Giorgos Korfiatis
    'Your request for changing your email has been registered successfully. '
83 8fb8d0cf Giorgos Korfiatis
    'A verification email will be sent to your new address.')
84 ae497612 Olga Brani
85 8fb8d0cf Giorgos Korfiatis
OBJECT_CREATED = 'The %(verbose_name)s was created successfully.'
86 8fb8d0cf Giorgos Korfiatis
USER_MEMBERSHIP_REJECTED = (
87 8fb8d0cf Giorgos Korfiatis
    'Request by %s to join the project has been rejected.')
88 8fb8d0cf Giorgos Korfiatis
BILLING_ERROR = 'Service response status: %(status)d'
89 11a71057 Kostas Papadimitriou
90 8fb8d0cf Giorgos Korfiatis
GENERIC_ERROR = (
91 8fb8d0cf Giorgos Korfiatis
    'Hmm... It seems something bad has happened, and we don\'t know the '
92 8fb8d0cf Giorgos Korfiatis
    'details right now. Please contact the administrators by email for '
93 8fb8d0cf Giorgos Korfiatis
    'more details.')
94 11a71057 Kostas Papadimitriou
95 8fb8d0cf Giorgos Korfiatis
MAX_INVITATION_NUMBER_REACHED = (
96 8fb8d0cf Giorgos Korfiatis
    'You have reached the maximum amount of invitations for your account. '
97 8fb8d0cf Giorgos Korfiatis
    'No invitations left.')
98 8fb8d0cf Giorgos Korfiatis
GROUP_MAX_PARTICIPANT_NUMBER_REACHED = (
99 8fb8d0cf Giorgos Korfiatis
    'This Group reached its maximum number of members. No other member can '
100 8fb8d0cf Giorgos Korfiatis
    'be added.')
101 8fb8d0cf Giorgos Korfiatis
PROJECT_MAX_PARTICIPANT_NUMBER_REACHED = (
102 8fb8d0cf Giorgos Korfiatis
    'This Project reached its maximum number of members. No other member '
103 8fb8d0cf Giorgos Korfiatis
    'can be added.')
104 8fb8d0cf Giorgos Korfiatis
NO_APPROVAL_TERMS = 'There are no terms of service to approve.'
105 8fb8d0cf Giorgos Korfiatis
PENDING_EMAIL_CHANGE_REQUEST = (
106 8fb8d0cf Giorgos Korfiatis
    'It seems there is already a pending request for an email change. '
107 8fb8d0cf Giorgos Korfiatis
    'Submitting a new request to change your email will cancel all previous '
108 8fb8d0cf Giorgos Korfiatis
    'requests.')
109 8fb8d0cf Giorgos Korfiatis
OBJECT_CREATED_FAILED = 'The %(verbose_name)s creation failed: %(reason)s.'
110 8fb8d0cf Giorgos Korfiatis
GROUP_JOIN_FAILURE = 'Failed to join this Group.'
111 8fb8d0cf Giorgos Korfiatis
PROJECT_JOIN_FAILURE = 'Failed to join this Project.'
112 8fb8d0cf Giorgos Korfiatis
GROUPKIND_UNKNOWN = 'The kind of Project you specified does not exist.'
113 8fb8d0cf Giorgos Korfiatis
NOT_MEMBER = 'User is not a member of the Project.'
114 8fb8d0cf Giorgos Korfiatis
NOT_OWNER = 'User is not the Project\'s owner.'
115 8fb8d0cf Giorgos Korfiatis
OWNER_CANNOT_LEAVE_GROUP = (
116 8fb8d0cf Giorgos Korfiatis
    'You are the owner of this Project. Owners can not leave their Projects.')
117 ae497612 Olga Brani
118 ae497612 Olga Brani
# Field validation fields
119 8fb8d0cf Giorgos Korfiatis
REQUIRED_FIELD = 'This field is required.'
120 8fb8d0cf Giorgos Korfiatis
EMAIL_USED = 'There is already an account with this email address.'
121 8fb8d0cf Giorgos Korfiatis
SHIBBOLETH_EMAIL_USED = (
122 8fb8d0cf Giorgos Korfiatis
    'This email is already associated with another shibboleth account.')
123 8fb8d0cf Giorgos Korfiatis
SHIBBOLETH_INACTIVE_ACC = (
124 8fb8d0cf Giorgos Korfiatis
    'This email is already associated with an account that is not '
125 8fb8d0cf Giorgos Korfiatis
    'yet activated. '
126 8fb8d0cf Giorgos Korfiatis
    'If that is your account, you need to activate it before being able to '
127 8fb8d0cf Giorgos Korfiatis
    'associate it with this shibboleth account.')
128 8fb8d0cf Giorgos Korfiatis
SHIBBOLETH_MISSING_EPPN = (
129 8fb8d0cf Giorgos Korfiatis
    'Your request is missing a unique ' +
130 8fb8d0cf Giorgos Korfiatis
    'token. This means your academic ' +
131 8fb8d0cf Giorgos Korfiatis
    'institution does not yet allow its users to log ' +
132 8fb8d0cf Giorgos Korfiatis
    'into %(domain)s with their academic ' +
133 8fb8d0cf Giorgos Korfiatis
    'account. Please contact %(contact_email)s' +
134 8fb8d0cf Giorgos Korfiatis
    ' for more information.')
135 8fb8d0cf Giorgos Korfiatis
SHIBBOLETH_MISSING_NAME = 'This request is missing the user name.'
136 11a71057 Kostas Papadimitriou
137 c09cb651 Georgios D. Tsoukalas
SIGN_TERMS = "Please, you need to 'Agree with the terms' before proceeding."
138 0f433ce2 Giorgos Korfiatis
CAPTCHA_VALIDATION_ERR = (
139 0f433ce2 Giorgos Korfiatis
    "You have not entered the correct words. Please try again."
140 0f433ce2 Giorgos Korfiatis
)
141 8fb8d0cf Giorgos Korfiatis
SUSPENDED_LOCAL_ACC = (
142 c09cb651 Georgios D. Tsoukalas
    "This account does not have a local password. "
143 c09cb651 Georgios D. Tsoukalas
    "Please try logging in using an external login provider (e.g.: twitter)"
144 c09cb651 Georgios D. Tsoukalas
)
145 8fb8d0cf Giorgos Korfiatis
EMAIL_UNKNOWN = (
146 c09cb651 Georgios D. Tsoukalas
    "This email address doesn't have an associated user account. "
147 c09cb651 Georgios D. Tsoukalas
    "Please make sure you have registered, before proceeding."
148 c09cb651 Georgios D. Tsoukalas
)
149 c09cb651 Georgios D. Tsoukalas
INVITATION_EMAIL_EXISTS = "An invitation has already been sent to this email."
150 c09cb651 Georgios D. Tsoukalas
INVITATION_CONSUMED_ERR = "The invitation has already been used."
151 c09cb651 Georgios D. Tsoukalas
UNKNOWN_USERS = "Unknown users: %s"
152 8fb8d0cf Giorgos Korfiatis
UNIQUE_EMAIL_IS_ACTIVE_CONSTRAIN_ERR = (
153 c09cb651 Georgios D. Tsoukalas
    "More than one account with the same email & 'is_active' field. Error."
154 c09cb651 Georgios D. Tsoukalas
)
155 0f433ce2 Giorgos Korfiatis
INVALID_ACTIVATION_KEY = "Invalid activation key."
156 8fb8d0cf Giorgos Korfiatis
NEW_EMAIL_ADDR_RESERVED = (
157 c09cb651 Georgios D. Tsoukalas
    "The new email address you requested is already used by another account. "
158 c09cb651 Georgios D. Tsoukalas
    "Please provide a different one."
159 c09cb651 Georgios D. Tsoukalas
)
160 c09cb651 Georgios D. Tsoukalas
EMAIL_RESERVED = "Email: %(email)s is already reserved."
161 8fb8d0cf Giorgos Korfiatis
NO_LOCAL_AUTH = (
162 c09cb651 Georgios D. Tsoukalas
    "Only external login providers are enabled for this account. "
163 c09cb651 Georgios D. Tsoukalas
    "You can not login with a local password."
164 c09cb651 Georgios D. Tsoukalas
)
165 c09cb651 Georgios D. Tsoukalas
SWITCH_ACCOUNT_FAILURE = "Account failed to switch. Invalid parameters."
166 8fb8d0cf Giorgos Korfiatis
SWITCH_ACCOUNT_SUCCESS_WITH_PROVIDER = (
167 c09cb651 Georgios D. Tsoukalas
    "Account failed to switch to %(provider)s."
168 c09cb651 Georgios D. Tsoukalas
)
169 c09cb651 Georgios D. Tsoukalas
SWITCH_ACCOUNT_SUCCESS = (
170 c09cb651 Georgios D. Tsoukalas
    "Account successfully switched to %(provider)s."
171 c09cb651 Georgios D. Tsoukalas
)
172 ae497612 Olga Brani
173 ae497612 Olga Brani
# Field help text
174 8fb8d0cf Giorgos Korfiatis
ADD_GROUP_MEMBERS_Q_HELP = (
175 8fb8d0cf Giorgos Korfiatis
    'Add a comma separated list of user emails, eg. user1@user.com, '
176 8fb8d0cf Giorgos Korfiatis
    'user2@user.com')
177 8fb8d0cf Giorgos Korfiatis
ASTAKOSUSER_GROUPS_HELP = (
178 8fb8d0cf Giorgos Korfiatis
    'In addition to the permissions assigned manually, '
179 8fb8d0cf Giorgos Korfiatis
    'this user will also get all permissions coming from his/her groups.')
180 ae497612 Olga Brani
181 8fb8d0cf Giorgos Korfiatis
EMAIL_SEND_ERR = 'Failed to send %s.'
182 8fb8d0cf Giorgos Korfiatis
ADMIN_NOTIFICATION_SEND_ERR = EMAIL_SEND_ERR % 'admin notification'
183 8fb8d0cf Giorgos Korfiatis
VERIFICATION_SEND_ERR = EMAIL_SEND_ERR % 'verification'
184 8fb8d0cf Giorgos Korfiatis
INVITATION_SEND_ERR = EMAIL_SEND_ERR % 'invitation'
185 8fb8d0cf Giorgos Korfiatis
GREETING_SEND_ERR = EMAIL_SEND_ERR % 'greeting'
186 8fb8d0cf Giorgos Korfiatis
FEEDBACK_SEND_ERR = EMAIL_SEND_ERR % 'feedback'
187 8fb8d0cf Giorgos Korfiatis
CHANGE_EMAIL_SEND_ERR = EMAIL_SEND_ERR % 'email change'
188 8fb8d0cf Giorgos Korfiatis
NOTIFICATION_SEND_ERR = EMAIL_SEND_ERR % 'notification'
189 8fb8d0cf Giorgos Korfiatis
DETAILED_NOTIFICATION_SEND_ERR = (
190 8fb8d0cf Giorgos Korfiatis
    'Failed to send %(subject)s notification to %(recipients)s.')
191 ae497612 Olga Brani
192 8fb8d0cf Giorgos Korfiatis
MISSING_NEXT_PARAMETER = 'The next parameter is missing.'
193 ae497612 Olga Brani
194 8fb8d0cf Giorgos Korfiatis
INVITATION_SENT = 'Invitation sent to %(email)s.'
195 8fb8d0cf Giorgos Korfiatis
VERIFICATION_SENT = (
196 fbc82ad1 Constantinos Venetsanopoulos
    'Your information has been submitted successfully. An email, containing a '
197 fbc82ad1 Constantinos Venetsanopoulos
    'verification link has been sent to the email address you provided. '
198 fbc82ad1 Constantinos Venetsanopoulos
    'Please follow the verification link on this email to continue with the '
199 8fb8d0cf Giorgos Korfiatis
    'registration process.')
200 8fb8d0cf Giorgos Korfiatis
VERIFICATION_FAILED = 'Email verification process failed.'
201 8fb8d0cf Giorgos Korfiatis
SWITCH_ACCOUNT_LINK_SENT = (
202 8fb8d0cf Giorgos Korfiatis
    'This email is already associated with a local account, '
203 8fb8d0cf Giorgos Korfiatis
    'and a verification email has been sent to %(email)s. To complete '
204 8fb8d0cf Giorgos Korfiatis
    'the association process, go back to your Inbox and follow the link '
205 8fb8d0cf Giorgos Korfiatis
    'inside the verification email.')
206 8fb8d0cf Giorgos Korfiatis
NOTIFICATION_SENT = (
207 8fb8d0cf Giorgos Korfiatis
    'Your request for an account has been submitted successfully, and is '
208 8fb8d0cf Giorgos Korfiatis
    'now pending approval. You will be notified by email in the next few '
209 8fb8d0cf Giorgos Korfiatis
    'days. Thanks for your interest!')
210 8fb8d0cf Giorgos Korfiatis
ACTIVATION_SENT = (
211 8fb8d0cf Giorgos Korfiatis
    'An email containing your activation link has been sent to your '
212 8fb8d0cf Giorgos Korfiatis
    'email address.')
213 c0b26605 Sofia Papagiannaki
214 8fb8d0cf Giorgos Korfiatis
REGISTRATION_COMPLETED = (
215 8fb8d0cf Giorgos Korfiatis
    'Your registration completed successfully. You can now login to your '
216 8fb8d0cf Giorgos Korfiatis
    'new account!')
217 c0b26605 Sofia Papagiannaki
218 8fb8d0cf Giorgos Korfiatis
NO_RESPONSE = 'There is no response.'
219 8fb8d0cf Giorgos Korfiatis
NOT_ALLOWED_NEXT_PARAM = 'Not allowed next parameter.'
220 8fb8d0cf Giorgos Korfiatis
MISSING_KEY_PARAMETER = 'Missing key parameter.'
221 8fb8d0cf Giorgos Korfiatis
INVALID_KEY_PARAMETER = 'Invalid key.'
222 8fb8d0cf Giorgos Korfiatis
DOMAIN_VALUE_ERR = 'Enter a valid domain.'
223 8fb8d0cf Giorgos Korfiatis
QH_SYNC_ERROR = 'Failed to get synchronized with quotaholder.'
224 8fb8d0cf Giorgos Korfiatis
UNIQUE_PROJECT_NAME_CONSTRAIN_ERR = (
225 8fb8d0cf Giorgos Korfiatis
    'The project name (as specified in its application\'s definition) must '
226 8fb8d0cf Giorgos Korfiatis
    'be unique among all active projects.')
227 d4e4e501 Christos Stavrakakis
NOT_ALIVE_PROJECT = 'Project %s is not alive.'
228 d4e4e501 Christos Stavrakakis
NOT_SUSPENDED_PROJECT = 'Project %s is not suspended.'
229 e872c133 Giorgos Korfiatis
NOT_TERMINATED_PROJECT = 'Project %s is not terminated.'
230 8fb8d0cf Giorgos Korfiatis
NOT_ALLOWED = 'You do not have the permissions to perform this action.'
231 8fb8d0cf Giorgos Korfiatis
MEMBER_NUMBER_LIMIT_REACHED = (
232 8fb8d0cf Giorgos Korfiatis
    'You have reached the maximum number of members for this Project.')
233 8fb8d0cf Giorgos Korfiatis
MEMBER_JOIN_POLICY_CLOSED = 'The Project\'s member join policy is closed.'
234 8fb8d0cf Giorgos Korfiatis
MEMBER_LEAVE_POLICY_CLOSED = 'The project\'s member leave policy is closed.'
235 8fb8d0cf Giorgos Korfiatis
NOT_MEMBERSHIP_REQUEST = 'This is not a valid membership request.'
236 8fb8d0cf Giorgos Korfiatis
NOT_ACCEPTED_MEMBERSHIP = 'This is not an accepted membership.'
237 1a14083b Giorgos Korfiatis
MEMBERSHIP_ACCEPTED = 'Membership already exists.'
238 866e5768 Giorgos Korfiatis
MEMBERSHIP_ASSOCIATED = 'Request or membership already exists.'
239 8fb8d0cf Giorgos Korfiatis
NO_APPLICANT = (
240 8fb8d0cf Giorgos Korfiatis
    'Project application requires at least one applicant. None found.')
241 8fb8d0cf Giorgos Korfiatis
INVALID_PROJECT_START_DATE = (
242 8fb8d0cf Giorgos Korfiatis
    'Project start date should be equal or greater than the current date.')
243 8fb8d0cf Giorgos Korfiatis
INVALID_PROJECT_END_DATE = (
244 8fb8d0cf Giorgos Korfiatis
    'Project end date should be equal or greater than than the current date.')
245 8fb8d0cf Giorgos Korfiatis
INCONSISTENT_PROJECT_DATES = (
246 8fb8d0cf Giorgos Korfiatis
    'Project end date should be greater than the project start date.')
247 8fb8d0cf Giorgos Korfiatis
ADD_PROJECT_MEMBERS_Q_HELP = (
248 8fb8d0cf Giorgos Korfiatis
    'Add a comma separated list of user emails, eg. user1@user.com, '
249 8fb8d0cf Giorgos Korfiatis
    'user2@user.com')
250 8fb8d0cf Giorgos Korfiatis
ADD_PROJECT_MEMBERS_Q_PLACEHOLDER = 'user1@user.com, user2@user.com'
251 8fb8d0cf Giorgos Korfiatis
MISSING_IDENTIFIER = 'Missing identifier.'
252 8fb8d0cf Giorgos Korfiatis
UNKNOWN_USER_ID = 'There is no user identified by %s.'
253 8fb8d0cf Giorgos Korfiatis
UNKNOWN_PROJECT_APPLICATION_ID = (
254 8fb8d0cf Giorgos Korfiatis
    'There is no project application identified by %s.')
255 8fb8d0cf Giorgos Korfiatis
UNKNOWN_PROJECT_ID = 'There is no project identified by %s.'
256 8fb8d0cf Giorgos Korfiatis
UNKNOWN_IDENTIFIER = 'Unknown identifier.'
257 8fb8d0cf Giorgos Korfiatis
PENDING_MEMBERSHIP_LEAVE = (
258 8fb8d0cf Giorgos Korfiatis
    'Your request is pending moderation by the Project owner.')
259 8fb8d0cf Giorgos Korfiatis
USER_MEMBERSHIP_ACCEPTED = '%s has been accepted in the project.'
260 8fb8d0cf Giorgos Korfiatis
USER_MEMBERSHIP_REMOVED = '%s has been removed from the project.'
261 8fb8d0cf Giorgos Korfiatis
USER_LEFT_PROJECT = 'You have left the project.'
262 8fb8d0cf Giorgos Korfiatis
USER_LEAVE_REQUEST_SUBMITTED = (
263 8fb8d0cf Giorgos Korfiatis
    'Your request to leave the project has been submitted successfully.')
264 8fb8d0cf Giorgos Korfiatis
USER_JOIN_REQUEST_SUBMITTED = (
265 8fb8d0cf Giorgos Korfiatis
    'Your request to join the project has been submitted successfully.')
266 8fb8d0cf Giorgos Korfiatis
USER_JOINED_PROJECT = 'You have joined the project.'
267 8fb8d0cf Giorgos Korfiatis
USER_REQUEST_CANCELLED = 'Your request to join the project has been cancelled.'
268 8fb8d0cf Giorgos Korfiatis
APPLICATION_CANNOT_APPROVE = "Cannot approve application %s in state '%s'"
269 8fb8d0cf Giorgos Korfiatis
APPLICATION_CANNOT_DENY = "Cannot deny application %s in state '%s'"
270 8fb8d0cf Giorgos Korfiatis
APPLICATION_CANNOT_DISMISS = "Cannot dismiss application %s in state '%s'"
271 8fb8d0cf Giorgos Korfiatis
APPLICATION_CANNOT_CANCEL = "Cannot cancel application %s in state '%s'"
272 8fb8d0cf Giorgos Korfiatis
APPLICATION_CANCELLED = "Your project application has been cancelled."
273 c7c0ec58 Giorgos Korfiatis
REACHED_PENDING_APPLICATION_LIMIT = ("You have reached the maximum number "
274 c7c0ec58 Giorgos Korfiatis
                                     "of pending project applications: %s.")
275 c7c0ec58 Giorgos Korfiatis
276 c7c0ec58 Giorgos Korfiatis
PENDING_APPLICATION_LIMIT_ADD = \
277 c7c0ec58 Giorgos Korfiatis
    ("You are not allowed to create a new project "
278 c7c0ec58 Giorgos Korfiatis
     "because you have reached the maximum [%s] for "
279 c7c0ec58 Giorgos Korfiatis
     "pending project applications. "
280 c7c0ec58 Giorgos Korfiatis
     "Consider cancelling any unnecessary ones.")
281 c7c0ec58 Giorgos Korfiatis
282 c7c0ec58 Giorgos Korfiatis
PENDING_APPLICATION_LIMIT_MODIFY = \
283 c7c0ec58 Giorgos Korfiatis
    ("You are not allowed to modify this project "
284 c7c0ec58 Giorgos Korfiatis
     "because you have reached the maximum [%s] for "
285 c7c0ec58 Giorgos Korfiatis
     "pending project applications. "
286 c7c0ec58 Giorgos Korfiatis
     "Consider cancelling any unnecessary ones.")
287 01bdbd17 Giorgos Korfiatis
288 c4b1a172 Kostas Papadimitriou
# Auth providers messages
289 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_LOGIN_SUCCESS = "Logged in successfully, using {method_prompt}."
290 890f3d4c Christos Stavrakakis
AUTH_PROVIDER_LOGOUT_SUCCESS = "Logged out successfully from {service_name}."
291 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_LOGOUT_SUCCESS_EXTRA = (
292 8fb8d0cf Giorgos Korfiatis
    "You may still be logged in at {title} though. "
293 8fb8d0cf Giorgos Korfiatis
    "Consider logging out from there too.")
294 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_NOT_ACTIVE = "'{method_prompt}' is disabled."
295 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ADD_DISABLED = "{method_prompt} is disabled for your account."
296 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_NOT_ACTIVE_FOR_USER = "You cannot login using '{method_prompt}'."
297 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_NOT_ACTIVE_FOR_CREATE = (
298 8fb8d0cf Giorgos Korfiatis
    "Sign up using '{method_prompt}' is disabled.")
299 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_NOT_ACTIVE_FOR_ADD = "You cannot add {method_prompt}."
300 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ADDED = "{method_prompt} enabled for this account."
301 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_SWITCHED = "{method_prompt} changed for this account."
302 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_REMOVED = "{method_prompt} removed for this account."
303 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ADD_FAILED = "Failed to add {method_prompt}."
304 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ADD_EXISTS = (
305 8fb8d0cf Giorgos Korfiatis
    "It seems that this '{method_prompt}' is already in use by "
306 8fb8d0cf Giorgos Korfiatis
    "another account.")
307 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_LOGIN_TO_ADD = (
308 8fb8d0cf Giorgos Korfiatis
    "The new login method will be assigned once you login to your account.")
309 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_INVALID_LOGIN = "No account exists."
310 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_REQUIRED = (
311 8fb8d0cf Giorgos Korfiatis
    "{method_prompt} is required. Add one from your profile page.")
312 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_CANNOT_CHANGE_PASSWORD = "Changing password is not supported."
313 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_SIGNUP_FROM_LOGIN = None
314 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_UNUSABLE_PASSWORD = (
315 8fb8d0cf Giorgos Korfiatis
    '{method_prompt} is not enabled'
316 8fb8d0cf Giorgos Korfiatis
    ' for your account. You can access your account by logging in with'
317 8fb8d0cf Giorgos Korfiatis
    ' {available_methods_links}.')
318 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_LOGIN_DISABLED = AUTH_PROVIDER_UNUSABLE_PASSWORD
319 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_SIGNUP_FROM_LOGIN = ''
320 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_AUTHENTICATION_FAILED = (
321 8fb8d0cf Giorgos Korfiatis
    'Authentication with this account failed.')
322 9d20fe23 Kostas Papadimitriou
323 9d20fe23 Kostas Papadimitriou
324 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_PENDING_REGISTRATION = '''A pending registration exists for
325 9d20fe23 Kostas Papadimitriou
{title} account {username}. The email used for the registration is
326 9d20fe23 Kostas Papadimitriou
{user_email}. If you decide to procceed with the signup process once again,
327 9d20fe23 Kostas Papadimitriou
all pending registrations will be deleted.'''
328 9d20fe23 Kostas Papadimitriou
329 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_PENDING_RESEND_ACTIVATION = (
330 8fb8d0cf Giorgos Korfiatis
    '<a href="{resend_activation_url}">Click here to resend activation '
331 8fb8d0cf Giorgos Korfiatis
    'email.</a>')
332 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_PENDING_MODERATION = (
333 8fb8d0cf Giorgos Korfiatis
    'Your account request is pending moderation.')
334 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_PENDING_ACTIVATION = (
335 8fb8d0cf Giorgos Korfiatis
    'Your account request is pending activation.')
336 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ACCOUNT_INACTIVE = 'Your account is disabled.'
337 450093ec Kostas Papadimitriou
338 8fb8d0cf Giorgos Korfiatis
AUTH_PROVIDER_ADD_TO_EXISTING_ACCOUNT = (
339 8fb8d0cf Giorgos Korfiatis
    "You can add {method_prompt} to your existing account from your "
340 8fb8d0cf Giorgos Korfiatis
    " <a href='{profile_url}'>profile page</a>")
341 564a2292 Kostas Papadimitriou
342 cfb7dd4f Giorgos Korfiatis
# Email subjects
343 cfb7dd4f Giorgos Korfiatis
_SITENAME = astakos_settings.SITENAME
344 cfb7dd4f Giorgos Korfiatis
INVITATION_EMAIL_SUBJECT = 'Invitation to %s' % _SITENAME
345 cfb7dd4f Giorgos Korfiatis
GREETING_EMAIL_SUBJECT = 'Welcome to %s' % _SITENAME
346 cfb7dd4f Giorgos Korfiatis
FEEDBACK_EMAIL_SUBJECT = 'Feedback from %s' % _SITENAME
347 cfb7dd4f Giorgos Korfiatis
VERIFICATION_EMAIL_SUBJECT = '%s account activation is needed' % _SITENAME
348 cfb7dd4f Giorgos Korfiatis
ACCOUNT_CREATION_SUBJECT = '%s account created (%%(user)s)' % _SITENAME
349 cfb7dd4f Giorgos Korfiatis
HELPDESK_NOTIFICATION_EMAIL_SUBJECT = \
350 cfb7dd4f Giorgos Korfiatis
    '%s account activated (%%(user)s)' % _SITENAME
351 cfb7dd4f Giorgos Korfiatis
EMAIL_CHANGE_EMAIL_SUBJECT = 'Email change on %s ' % _SITENAME
352 cfb7dd4f Giorgos Korfiatis
PASSWORD_RESET_EMAIL_SUBJECT = 'Password reset on %s ' % _SITENAME
353 cfb7dd4f Giorgos Korfiatis
PROJECT_CREATION_SUBJECT = \
354 cfb7dd4f Giorgos Korfiatis
    '%s project application created (%%(name)s)' % _SITENAME
355 cfb7dd4f Giorgos Korfiatis
PROJECT_APPROVED_SUBJECT = \
356 cfb7dd4f Giorgos Korfiatis
    '%s project application approved (%%(name)s)' % _SITENAME
357 cfb7dd4f Giorgos Korfiatis
PROJECT_DENIED_SUBJECT = \
358 cfb7dd4f Giorgos Korfiatis
    '%s project application denied (%%(name)s)' % _SITENAME
359 cfb7dd4f Giorgos Korfiatis
PROJECT_TERMINATION_SUBJECT = \
360 cfb7dd4f Giorgos Korfiatis
    '%s project terminated (%%(name)s)' % _SITENAME
361 cfb7dd4f Giorgos Korfiatis
PROJECT_SUSPENSION_SUBJECT = \
362 cfb7dd4f Giorgos Korfiatis
    '%s project suspended (%%(name)s)' % _SITENAME
363 e872c133 Giorgos Korfiatis
PROJECT_UNSUSPENSION_SUBJECT = \
364 e872c133 Giorgos Korfiatis
    '%s project resumed (%%(name)s)' % _SITENAME
365 e872c133 Giorgos Korfiatis
PROJECT_REINSTATEMENT_SUBJECT = \
366 e872c133 Giorgos Korfiatis
    '%s project reinstated (%%(name)s)' % _SITENAME
367 cfb7dd4f Giorgos Korfiatis
PROJECT_MEMBERSHIP_CHANGE_SUBJECT = \
368 cfb7dd4f Giorgos Korfiatis
    '%s project membership changed (%%(name)s)' % _SITENAME
369 cfb7dd4f Giorgos Korfiatis
PROJECT_MEMBERSHIP_ENROLL_SUBJECT = \
370 cfb7dd4f Giorgos Korfiatis
    '%s project enrollment (%%(name)s)' % _SITENAME
371 cfb7dd4f Giorgos Korfiatis
PROJECT_MEMBERSHIP_REQUEST_SUBJECT = \
372 cfb7dd4f Giorgos Korfiatis
    '%s project membership request (%%(name)s)' % _SITENAME
373 cfb7dd4f Giorgos Korfiatis
PROJECT_MEMBERSHIP_LEAVE_REQUEST_SUBJECT = \
374 cfb7dd4f Giorgos Korfiatis
    '%s project membership leave request (%%(name)s)' % _SITENAME
375 cfb7dd4f Giorgos Korfiatis
376 cfb7dd4f Giorgos Korfiatis
377 450093ec Kostas Papadimitriou
messages = locals().keys()
378 450093ec Kostas Papadimitriou
for msg in messages:
379 450093ec Kostas Papadimitriou
    if msg == msg.upper():
380 450093ec Kostas Papadimitriou
        attr = "ASTAKOS_%s_MESSAGE" % msg
381 450093ec Kostas Papadimitriou
        settings_value = getattr(settings, attr, None)
382 450093ec Kostas Papadimitriou
        if settings_value:
383 badcb2a9 Kostas Papadimitriou
            locals()[msg] = settings_value