# HG changeset patch # User Søren Løvborg # Date 1439891238 -7200 # Node ID f6fcfc84f30cd5b22397c5d0347987b2433b1d37 # Parent 475e35aa98af0de15053f71a1c64cb173b2d7443 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. diff -r 475e35aa98af -r f6fcfc84f30c kallithea/controllers/admin/repos.py --- 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'),