changeset 5408:f6fcfc84f30c

spelling: unify messages for repository locking Normalize phrasing and capitalization of repository locking messages. This also avoids the piecing together of sentence fragments in a way that can cause i18n headaches.
author Søren Løvborg <sorenl@unity3d.com>
date Tue, 18 Aug 2015 11:47:18 +0200
parents 475e35aa98af
children 5bfeada59776
files kallithea/controllers/admin/repos.py
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/controllers/admin/repos.py	Fri Aug 14 17:07:49 2015 +0200
+++ b/kallithea/controllers/admin/repos.py	Tue Aug 18 11:47:18 2015 +0200
@@ -534,10 +534,10 @@
             repo = Repository.get_by_repo_name(repo_name)
             if request.POST.get('set_lock'):
                 Repository.lock(repo, c.authuser.user_id)
-                h.flash(_('Locked repository'), category='success')
+                h.flash(_('Repository has been locked'), category='success')
             elif request.POST.get('set_unlock'):
                 Repository.unlock(repo)
-                h.flash(_('Unlocked repository'), category='success')
+                h.flash(_('Repository has been unlocked'), category='success')
         except Exception as e:
             log.error(traceback.format_exc())
             h.flash(_('An error occurred during unlocking'),
@@ -558,13 +558,11 @@
             if repo.enable_locking:
                 if repo.locked[0]:
                     Repository.unlock(repo)
-                    action = _('Unlocked')
+                    h.flash(_('Repository has been unlocked'), category='success')
                 else:
                     Repository.lock(repo, c.authuser.user_id)
-                    action = _('Locked')
+                    h.flash(_('Repository has been locked'), category='success')
 
-                h.flash(_('Repository has been %s') % action,
-                        category='success')
         except Exception as e:
             log.error(traceback.format_exc())
             h.flash(_('An error occurred during unlocking'),