diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-16 14:01:43 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2014-09-16 14:01:43 -0500 |
commit | f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d (patch) | |
tree | 0ca05e7a95cfb30d8b286f3ec72e8c95e212511b /mediagoblin/moderation/tools.py | |
parent | 5b64c92e0816e733c2f88b88ddc0aec070cdc0d3 (diff) | |
parent | 1b4e199668ada5c2ec47df7432ab69e315dc0601 (diff) | |
download | mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.tar.lz mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.tar.xz mediagoblin-f6bad0eb26fa7e092570afe1fb7f38b3d1a1941d.zip |
Merge branch 'master' into merge-python3-port
Has some issues, will iteratively fix!
Conflicts:
mediagoblin/gmg_commands/__init__.py
mediagoblin/gmg_commands/deletemedia.py
mediagoblin/gmg_commands/users.py
mediagoblin/oauth/views.py
mediagoblin/plugins/api/views.py
mediagoblin/tests/test_api.py
mediagoblin/tests/test_edit.py
mediagoblin/tests/test_oauth1.py
mediagoblin/tests/test_util.py
mediagoblin/tools/mail.py
mediagoblin/webfinger/views.py
setup.py
Diffstat (limited to 'mediagoblin/moderation/tools.py')
-rw-r--r-- | mediagoblin/moderation/tools.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mediagoblin/moderation/tools.py b/mediagoblin/moderation/tools.py index edee42ef..0bcd8762 100644 --- a/mediagoblin/moderation/tools.py +++ b/mediagoblin/moderation/tools.py @@ -34,7 +34,7 @@ def take_punitive_actions(request, form, report, user): for privilege_name in form.take_away_privileges.data: take_away_privileges(user.username, privilege_name) form.resolution_content.data += \ - u"\n{mod} took away {user}\'s {privilege} privileges.".format( + _(u"\n{mod} took away {user}\'s {privilege} privileges.").format( mod=request.user.username, user=user.username, privilege=privilege_name) @@ -47,13 +47,13 @@ def take_punitive_actions(request, form, report, user): reason=form.why_user_was_banned.data) Session.add(user_ban) form.resolution_content.data += \ - u"\n{mod} banned user {user} {expiration_date}.".format( + _(u"\n{mod} banned user {user} {expiration_date}.").format( mod=request.user.username, user=user.username, expiration_date = ( - "until {date}".format(date=form.user_banned_until.data) + _("until {date}").format(date=form.user_banned_until.data) if form.user_banned_until.data - else "indefinitely" + else _("indefinitely") ) ) @@ -62,7 +62,7 @@ def take_punitive_actions(request, form, report, user): if u'sendmessage' in form.action_to_resolve.data: message_body = form.message_to_user.data form.resolution_content.data += \ - u"\n{mod} sent a warning email to the {user}.".format( + _(u"\n{mod} sent a warning email to the {user}.").format( mod=request.user.username, user=user.username) @@ -71,14 +71,14 @@ def take_punitive_actions(request, form, report, user): deleted_comment = report.comment Session.delete(deleted_comment) form.resolution_content.data += \ - u"\n{mod} deleted the comment.".format( + _(u"\n{mod} deleted the comment.").format( mod=request.user.username) elif u'delete' in form.action_to_resolve.data and \ report.is_media_entry_report(): deleted_media = report.media_entry deleted_media.delete() form.resolution_content.data += \ - u"\n{mod} deleted the media entry.".format( + _(u"\n{mod} deleted the media entry.").format( mod=request.user.username) report.archive( resolver_id=request.user.id, |