##// END OF EJS Templates
consistently capitalize initial letter in flash messages
Mads Kiilerich -
r3565:a8f2d78d beta
parent child Browse files
Show More
@@ -107,7 +107,7 b' class DefaultsController(BaseController)'
107 107 encoding="UTF-8")
108 108 except Exception:
109 109 log.error(traceback.format_exc())
110 h.flash(_('error occurred during update of defaults'),
110 h.flash(_('Error occurred during update of defaults'),
111 111 category='error')
112 112
113 113 return redirect(url('defaults'))
@@ -123,7 +123,7 b' class LdapSettingsController(BaseControl'
123 123 Session().add(setting)
124 124
125 125 Session().commit()
126 h.flash(_('Ldap settings updated successfully'),
126 h.flash(_('LDAP settings updated successfully'),
127 127 category='success')
128 128 if not ldap_active:
129 129 #if ldap is missing send an info to user
@@ -144,7 +144,7 b' class LdapSettingsController(BaseControl'
144 144 encoding="UTF-8")
145 145 except Exception:
146 146 log.error(traceback.format_exc())
147 h.flash(_('error occurred during update of ldap settings'),
147 h.flash(_('Error occurred during update of ldap settings'),
148 148 category='error')
149 149
150 150 return redirect(url('ldap_home'))
@@ -139,7 +139,7 b' class PermissionsController(BaseControll'
139 139 encoding="UTF-8")
140 140 except Exception:
141 141 log.error(traceback.format_exc())
142 h.flash(_('error occurred during update of permissions'),
142 h.flash(_('Error occurred during update of permissions'),
143 143 category='error')
144 144
145 145 return redirect(url('edit_permission', id=id))
@@ -164,13 +164,13 b' class ReposController(BaseRepoController'
164 164 new_repo = RepoModel().create(form_result,
165 165 self.rhodecode_user.user_id)
166 166 if form_result['clone_uri']:
167 h.flash(_('created repository %s from %s') \
167 h.flash(_('Created repository %s from %s') \
168 168 % (form_result['repo_name'], form_result['clone_uri']),
169 169 category='success')
170 170 else:
171 171 repo_url = h.link_to(form_result['repo_name'],
172 172 h.url('summary_home', repo_name=form_result['repo_name']))
173 h.flash(h.literal(_('created repository %s') % repo_url),
173 h.flash(h.literal(_('Created repository %s') % repo_url),
174 174 category='success')
175 175
176 176 if request.POST.get('user_created'):
@@ -269,7 +269,7 b' class ReposController(BaseRepoController'
269 269
270 270 except Exception:
271 271 log.error(traceback.format_exc())
272 h.flash(_('error occurred during update of repository %s') \
272 h.flash(_('Error occurred during update of repository %s') \
273 273 % repo_name, category='error')
274 274 return redirect(url('edit_repo', repo_name=changed_name))
275 275
@@ -298,17 +298,17 b' class ReposController(BaseRepoController'
298 298 log.debug('Detaching fork %s from repo %s' % (r, repo))
299 299 r.fork = None
300 300 Session().add(r)
301 h.flash(_('detached %s forks') % _forks, category='success')
301 h.flash(_('Detached %s forks') % _forks, category='success')
302 302 elif do == 'delete_forks':
303 303 for r in repo.forks:
304 304 log.debug('Deleting fork %s of repo %s' % (r, repo))
305 305 repo_model.delete(r)
306 h.flash(_('deleted %s forks') % _forks, category='success')
306 h.flash(_('Deleted %s forks') % _forks, category='success')
307 307 action_logger(self.rhodecode_user, 'admin_deleted_repo',
308 308 repo_name, self.ip_addr, self.sa)
309 309 repo_model.delete(repo)
310 310 invalidate_cache('get_repo_cached_%s' % repo_name)
311 h.flash(_('deleted repository %s') % repo_name, category='success')
311 h.flash(_('Deleted repository %s') % repo_name, category='success')
312 312 Session().commit()
313 313 except IntegrityError, e:
314 314 if e.message.find('repositories_fork_id_fkey') != -1:
@@ -142,7 +142,7 b' class ReposGroupsController(BaseControll'
142 142 owner=self.rhodecode_user.user_id
143 143 )
144 144 Session().commit()
145 h.flash(_('created repos group %s') \
145 h.flash(_('Created repos group %s') \
146 146 % form_result['group_name'], category='success')
147 147 #TODO: in futureaction_logger(, '', '', '', self.sa)
148 148 except formencode.Invalid, errors:
@@ -154,7 +154,7 b' class ReposGroupsController(BaseControll'
154 154 encoding="UTF-8")
155 155 except Exception:
156 156 log.error(traceback.format_exc())
157 h.flash(_('error occurred during creation of repos group %s') \
157 h.flash(_('Error occurred during creation of repos group %s') \
158 158 % request.POST.get('group_name'), category='error')
159 159 parent_group_id = form_result['group_parent_id']
160 160 #TODO: maybe we should get back to the main view, not the admin one
@@ -217,7 +217,7 b' class ReposGroupsController(BaseControll'
217 217
218 218 new_gr = ReposGroupModel().update(group_name, form_result)
219 219 Session().commit()
220 h.flash(_('updated repos group %s') \
220 h.flash(_('Updated repos group %s') \
221 221 % form_result['group_name'], category='success')
222 222 # we now have new name !
223 223 group_name = new_gr.group_name
@@ -232,7 +232,7 b' class ReposGroupsController(BaseControll'
232 232 encoding="UTF-8")
233 233 except Exception:
234 234 log.error(traceback.format_exc())
235 h.flash(_('error occurred during update of repos group %s') \
235 h.flash(_('Error occurred during update of repos group %s') \
236 236 % request.POST.get('group_name'), category='error')
237 237
238 238 return redirect(url('edit_repos_group', group_name=group_name))
@@ -263,12 +263,12 b' class ReposGroupsController(BaseControll'
263 263 try:
264 264 ReposGroupModel().delete(group_name)
265 265 Session().commit()
266 h.flash(_('removed repos group %s') % group_name,
266 h.flash(_('Removed repos group %s') % group_name,
267 267 category='success')
268 268 #TODO: in future action_logger(, '', '', '', self.sa)
269 269 except Exception:
270 270 log.error(traceback.format_exc())
271 h.flash(_('error occurred during deletion of repos '
271 h.flash(_('Error occurred during deletion of repos '
272 272 'group %s') % group_name, category='error')
273 273
274 274 return redirect(url('repos_groups'))
@@ -167,7 +167,7 b' class SettingsController(BaseController)'
167 167
168 168 except Exception:
169 169 log.error(traceback.format_exc())
170 h.flash(_('error occurred during updating '
170 h.flash(_('Error occurred during updating '
171 171 'application settings'),
172 172 category='error')
173 173
@@ -218,7 +218,7 b' class SettingsController(BaseController)'
218 218
219 219 except Exception:
220 220 log.error(traceback.format_exc())
221 h.flash(_('error occurred during updating '
221 h.flash(_('Error occurred during updating '
222 222 'visualisation settings'),
223 223 category='error')
224 224
@@ -305,7 +305,7 b' class SettingsController(BaseController)'
305 305
306 306 except Exception:
307 307 log.error(traceback.format_exc())
308 h.flash(_('error occurred during updating '
308 h.flash(_('Error occurred during updating '
309 309 'application settings'), category='error')
310 310
311 311 if setting_id == 'hooks':
@@ -331,7 +331,7 b' class SettingsController(BaseController)'
331 331 Session().commit()
332 332 except Exception:
333 333 log.error(traceback.format_exc())
334 h.flash(_('error occurred during hook creation'),
334 h.flash(_('Error occurred during hook creation'),
335 335 category='error')
336 336
337 337 return redirect(url('admin_edit_setting', setting_id='hooks'))
@@ -471,7 +471,7 b' class SettingsController(BaseController)'
471 471 return render('admin/users/user_edit_my_account.html')
472 472 except Exception:
473 473 log.error(traceback.format_exc())
474 h.flash(_('error occurred during update of user %s') \
474 h.flash(_('Error occurred during update of user %s') \
475 475 % form_result.get('username'), category='error')
476 476
477 477 return redirect(url('my_account'))
@@ -127,7 +127,7 b' class UsersController(BaseController):'
127 127 usr = form_result['username']
128 128 action_logger(self.rhodecode_user, 'admin_created_user:%s' % usr,
129 129 None, self.ip_addr, self.sa)
130 h.flash(_('created user %s') % usr,
130 h.flash(_('Created user %s') % usr,
131 131 category='success')
132 132 Session().commit()
133 133 except formencode.Invalid, errors:
@@ -139,7 +139,7 b' class UsersController(BaseController):'
139 139 encoding="UTF-8")
140 140 except Exception:
141 141 log.error(traceback.format_exc())
142 h.flash(_('error occurred during creation of user %s') \
142 h.flash(_('Error occurred during creation of user %s') \
143 143 % request.POST.get('username'), category='error')
144 144 return redirect(url('users'))
145 145
@@ -195,7 +195,7 b' class UsersController(BaseController):'
195 195 encoding="UTF-8")
196 196 except Exception:
197 197 log.error(traceback.format_exc())
198 h.flash(_('error occurred during update of user %s') \
198 h.flash(_('Error occurred during update of user %s') \
199 199 % form_result.get('username'), category='error')
200 200 return redirect(url('edit_user', id=id))
201 201
@@ -211,7 +211,7 b' class UsersController(BaseController):'
211 211 try:
212 212 UserModel().delete(usr)
213 213 Session().commit()
214 h.flash(_('successfully deleted user'), category='success')
214 h.flash(_('Successfully deleted user'), category='success')
215 215 except (UserOwnsReposException, DefaultUserException), e:
216 216 h.flash(e, category='warning')
217 217 except Exception:
@@ -83,7 +83,7 b' class UsersGroupsController(BaseControll'
83 83 action_logger(self.rhodecode_user,
84 84 'admin_created_users_group:%s' % gr,
85 85 None, self.ip_addr, self.sa)
86 h.flash(_('created user group %s') % gr, category='success')
86 h.flash(_('Created user group %s') % gr, category='success')
87 87 Session().commit()
88 88 except formencode.Invalid, errors:
89 89 return htmlfill.render(
@@ -94,7 +94,7 b' class UsersGroupsController(BaseControll'
94 94 encoding="UTF-8")
95 95 except Exception:
96 96 log.error(traceback.format_exc())
97 h.flash(_('error occurred during creation of user group %s') \
97 h.flash(_('Error occurred during creation of user group %s') \
98 98 % request.POST.get('users_group_name'), category='error')
99 99
100 100 return redirect(url('users_groups'))
@@ -161,7 +161,7 b' class UsersGroupsController(BaseControll'
161 161 action_logger(self.rhodecode_user,
162 162 'admin_updated_users_group:%s' % gr,
163 163 None, self.ip_addr, self.sa)
164 h.flash(_('updated user group %s') % gr, category='success')
164 h.flash(_('Updated user group %s') % gr, category='success')
165 165 Session().commit()
166 166 except formencode.Invalid, errors:
167 167 ug_model = UserGroupModel()
@@ -183,7 +183,7 b' class UsersGroupsController(BaseControll'
183 183 encoding="UTF-8")
184 184 except Exception:
185 185 log.error(traceback.format_exc())
186 h.flash(_('error occurred during update of user group %s') \
186 h.flash(_('Error occurred during update of user group %s') \
187 187 % request.POST.get('users_group_name'), category='error')
188 188
189 189 return redirect(url('edit_users_group', id=id))
@@ -200,7 +200,7 b' class UsersGroupsController(BaseControll'
200 200 try:
201 201 UserGroupModel().delete(usr_gr)
202 202 Session().commit()
203 h.flash(_('successfully deleted user group'), category='success')
203 h.flash(_('Successfully deleted user group'), category='success')
204 204 except UserGroupsAssignedException, e:
205 205 h.flash(e, category='error')
206 206 except Exception:
@@ -165,7 +165,7 b' class ForksController(BaseRepoController'
165 165 fork_url = h.link_to(form_result['repo_name'],
166 166 h.url('summary_home', repo_name=form_result['repo_name_full']))
167 167
168 h.flash(h.literal(_('forked repository %s as %s') \
168 h.flash(h.literal(_('Forked repository %s as %s') \
169 169 % (repo_name, fork_url)),
170 170 category='success')
171 171 except formencode.Invalid, errors:
@@ -138,7 +138,7 b' class SettingsController(BaseRepoControl'
138 138
139 139 except Exception:
140 140 log.error(traceback.format_exc())
141 h.flash(_('error occurred during update of repository %s') \
141 h.flash(_('Error occurred during update of repository %s') \
142 142 % repo_name, category='error')
143 143
144 144 return redirect(url('repo_settings_home', repo_name=changed_name))
@@ -163,7 +163,7 b' class SettingsController(BaseRepoControl'
163 163 repo_name, self.ip_addr, self.sa)
164 164 repo_model.delete(repo)
165 165 invalidate_cache('get_repo_cached_%s' % repo_name)
166 h.flash(_('deleted repository %s') % repo_name, category='success')
166 h.flash(_('Deleted repository %s') % repo_name, category='success')
167 167 Session().commit()
168 168 except Exception:
169 169 log.error(traceback.format_exc())
1 NO CONTENT: modified file, binary diff hidden
@@ -362,7 +362,7 b' msgid "START_TLS on LDAP connection"'
362 362 msgstr ""
363 363
364 364 #: rhodecode/controllers/admin/ldap_settings.py:126
365 msgid "Ldap settings updated successfully"
365 msgid "LDAP settings updated successfully"
366 366 msgstr ""
367 367
368 368 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -376,7 +376,7 b' msgid "START_TLS on LDAP connection"'
376 376 msgstr "START_TLS à la connexion"
377 377
378 378 #: rhodecode/controllers/admin/ldap_settings.py:126
379 msgid "Ldap settings updated successfully"
379 msgid "LDAP settings updated successfully"
380 380 msgstr "Mise à jour réussie des réglages LDAP"
381 381
382 382 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -368,7 +368,7 b' msgid "START_TLS on LDAP connection"'
368 368 msgstr "LDAP接続でSTART_TLSを使用"
369 369
370 370 #: rhodecode/controllers/admin/ldap_settings.py:126
371 msgid "Ldap settings updated successfully"
371 msgid "LDAP settings updated successfully"
372 372 msgstr "LDAP設定を更新しました"
373 373
374 374 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -374,7 +374,7 b' msgid "START_TLS on LDAP connection"'
374 374 msgstr "START_TLS dla połączenia LDAP"
375 375
376 376 #: rhodecode/controllers/admin/ldap_settings.py:126
377 msgid "Ldap settings updated successfully"
377 msgid "LDAP settings updated successfully"
378 378 msgstr "Ustawienia LDAP zostały zaktualizowane"
379 379
380 380 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -382,7 +382,7 b' msgid "START_TLS on LDAP connection"'
382 382 msgstr "START_TLS na conexão LDAP"
383 383
384 384 #: rhodecode/controllers/admin/ldap_settings.py:126
385 msgid "Ldap settings updated successfully"
385 msgid "LDAP settings updated successfully"
386 386 msgstr "Configurações de LDAP atualizadas com sucesso"
387 387
388 388 #: rhodecode/controllers/admin/ldap_settings.py:130
@@ -353,7 +353,7 b' msgid "START_TLS on LDAP connection"'
353 353 msgstr ""
354 354
355 355 #: rhodecode/controllers/admin/ldap_settings.py:126
356 msgid "Ldap settings updated successfully"
356 msgid "LDAP settings updated successfully"
357 357 msgstr ""
358 358
359 359 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -365,7 +365,7 b' msgid "START_TLS on LDAP connection"'
365 365 msgstr "LDAP连接上的START_TLS"
366 366
367 367 #: rhodecode/controllers/admin/ldap_settings.py:126
368 msgid "Ldap settings updated successfully"
368 msgid "LDAP settings updated successfully"
369 369 msgstr "LDAP设置已经成功更新"
370 370
371 371 #: rhodecode/controllers/admin/ldap_settings.py:130
1 NO CONTENT: modified file, binary diff hidden
@@ -376,7 +376,7 b' msgid "START_TLS on LDAP connection"'
376 376 msgstr ""
377 377
378 378 #: rhodecode/controllers/admin/ldap_settings.py:126
379 msgid "Ldap settings updated successfully"
379 msgid "LDAP settings updated successfully"
380 380 msgstr "LDAP設定更新完成"
381 381
382 382 #: rhodecode/controllers/admin/ldap_settings.py:130
@@ -91,7 +91,7 b''
91 91 </div>
92 92 </div>
93 93 <div class="buttons">
94 ${h.submit('',_('fork this repository'),class_="ui-btn large")}
94 ${h.submit('',_('Fork this repository'),class_="ui-btn large")}
95 95 </div>
96 96 </div>
97 97 </div>
@@ -47,7 +47,7 b' class TestLdapSettingsController(TestCon'
47 47 'fail db write compare')
48 48
49 49 self.checkSessionFlash(response,
50 'Ldap settings updated successfully')
50 'LDAP settings updated successfully')
51 51
52 52 def test_ldap_error_form(self):
53 53 self.log_user()
@@ -32,7 +32,7 b' class TestAdminReposController(TestContr'
32 32 repo_name=repo_name,
33 33 repo_description=description))
34 34 self.checkSessionFlash(response,
35 'created repository <a href="/%s">%s</a>'
35 'Created repository <a href="/%s">%s</a>'
36 36 % (repo_name, repo_name))
37 37
38 38 #test if the repo was created in the database
@@ -66,7 +66,7 b' class TestAdminReposController(TestContr'
66 66 repo_name=repo_name,
67 67 repo_description=description))
68 68 self.checkSessionFlash(response,
69 u'created repository <a href="/%s">%s</a>'
69 u'Created repository <a href="/%s">%s</a>'
70 70 % (urllib.quote(repo_name), repo_name_unicode))
71 71 #test if the repo was created in the database
72 72 new_repo = self.Session().query(Repository)\
@@ -106,7 +106,7 b' class TestAdminReposController(TestContr'
106 106 repo_group=gr.group_id,))
107 107
108 108 self.checkSessionFlash(response,
109 'created repository <a href="/%s">%s</a>'
109 'Created repository <a href="/%s">%s</a>'
110 110 % (repo_name, repo_name))
111 111 #test if the repo was created in the database
112 112 new_repo = self.Session().query(Repository)\
@@ -143,7 +143,7 b' class TestAdminReposController(TestContr'
143 143 repo_name=repo_name,
144 144 repo_description=description))
145 145 self.checkSessionFlash(response,
146 'created repository <a href="/%s">%s</a>'
146 'Created repository <a href="/%s">%s</a>'
147 147 % (repo_name, repo_name))
148 148
149 149 #test if the repo was created in the database
@@ -179,7 +179,7 b' class TestAdminReposController(TestContr'
179 179 repo_description=description))
180 180
181 181 self.checkSessionFlash(response,
182 u'created repository <a href="/%s">%s</a>'
182 u'Created repository <a href="/%s">%s</a>'
183 183 % (urllib.quote(repo_name), repo_name_unicode))
184 184
185 185 #test if the repo was created in the database
@@ -225,7 +225,7 b' class TestAdminReposController(TestContr'
225 225 repo_description=description))
226 226
227 227 self.checkSessionFlash(response,
228 'created repository <a href="/%s">%s</a>'
228 'Created repository <a href="/%s">%s</a>'
229 229 % (repo_name, repo_name))
230 230 #test if the repo was created in the database
231 231 new_repo = self.Session().query(Repository)\
@@ -247,7 +247,7 b' class TestAdminReposController(TestContr'
247 247
248 248 response = self.app.delete(url('repo', repo_name=repo_name))
249 249
250 self.assertTrue('''deleted repository %s''' % (repo_name) in
250 self.assertTrue('''Deleted repository %s''' % (repo_name) in
251 251 response.session['flash'][0])
252 252
253 253 response.follow()
@@ -273,7 +273,7 b' class TestAdminReposController(TestContr'
273 273 repo_description=description))
274 274
275 275 self.checkSessionFlash(response,
276 'created repository <a href="/%s">%s</a>'
276 'Created repository <a href="/%s">%s</a>'
277 277 % (repo_name, repo_name))
278 278 #test if the repo was created in the database
279 279 new_repo = self.Session().query(Repository)\
@@ -295,7 +295,7 b' class TestAdminReposController(TestContr'
295 295
296 296 response = self.app.delete(url('repo', repo_name=repo_name))
297 297
298 self.assertTrue('''deleted repository %s''' % (repo_name) in
298 self.assertTrue('''Deleted repository %s''' % (repo_name) in
299 299 response.session['flash'][0])
300 300
301 301 response.follow()
@@ -37,7 +37,7 b' class TestAdminUsersController(TestContr'
37 37 'lastname': lastname,
38 38 'email': email})
39 39
40 self.checkSessionFlash(response, '''created user %s''' % (username))
40 self.checkSessionFlash(response, '''Created user %s''' % (username))
41 41
42 42 new_user = self.Session.query(User).\
43 43 filter(User.username == username).one()
@@ -150,7 +150,7 b' class TestAdminUsersController(TestContr'
150 150 .filter(User.username == username).one()
151 151 response = self.app.delete(url('user', id=new_user.user_id))
152 152
153 self.assertTrue("""successfully deleted user""" in
153 self.assertTrue("""Successfully deleted user""" in
154 154 response.session['flash'][0])
155 155
156 156 def test_delete_browser_fakeout(self):
@@ -22,7 +22,7 b' class TestAdminUsersGroupsController(Tes'
22 22 response.follow()
23 23
24 24 self.checkSessionFlash(response,
25 'created user group %s' % TEST_USER_GROUP)
25 'Created user group %s' % TEST_USER_GROUP)
26 26
27 27 def test_new(self):
28 28 response = self.app.get(url('new_users_group'))
@@ -46,7 +46,7 b' class TestAdminUsersGroupsController(Tes'
46 46 response.follow()
47 47
48 48 self.checkSessionFlash(response,
49 'created user group %s' % users_group_name)
49 'Created user group %s' % users_group_name)
50 50
51 51 gr = self.Session.query(UserGroup)\
52 52 .filter(UserGroup.users_group_name ==
@@ -70,7 +70,7 b' class TestAdminUsersGroupsController(Tes'
70 70
71 71 ug = UserGroup.get_by_group_name(users_group_name)
72 72 self.checkSessionFlash(response,
73 'created user group %s' % users_group_name)
73 'Created user group %s' % users_group_name)
74 74 ## ENABLE REPO CREATE ON A GROUP
75 75 response = self.app.put(url('users_group_perm', id=ug.users_group_id),
76 76 {'create_repo_perm': True})
@@ -139,7 +139,7 b' class TestAdminUsersGroupsController(Tes'
139 139
140 140 ug = UserGroup.get_by_group_name(users_group_name)
141 141 self.checkSessionFlash(response,
142 'created user group %s' % users_group_name)
142 'Created user group %s' % users_group_name)
143 143 ## ENABLE REPO CREATE ON A GROUP
144 144 response = self.app.put(url('users_group_perm', id=ug.users_group_id),
145 145 {'fork_repo_perm': True})
@@ -119,7 +119,7 b' class TestForksController(TestController'
119 119
120 120 #test if we have a message that fork is ok
121 121 self.checkSessionFlash(response,
122 'forked repository %s as <a href="/%s">%s</a>'
122 'Forked repository %s as <a href="/%s">%s</a>'
123 123 % (repo_name, fork_name, fork_name))
124 124
125 125 #test if the fork was created in the database
General Comments 0
You need to be logged in to leave comments. Login now