aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/moderation
diff options
context:
space:
mode:
authorLaura Arjona Reina <larjona99@gmail.com>2014-07-26 00:50:39 +0200
committerChristopher Allan Webber <cwebber@dustycloud.org>2014-07-29 11:00:37 -0500
commita463fe06ed8087e04096627fc6f160bff45c3e0b (patch)
tree19151d49234e3a5c154b82e790c60de377e1663f /mediagoblin/moderation
parent7f50ae1656a569ae2f7f0367f9c34752e2d5257a (diff)
downloadmediagoblin-a463fe06ed8087e04096627fc6f160bff45c3e0b.tar.lz
mediagoblin-a463fe06ed8087e04096627fc6f160bff45c3e0b.tar.xz
mediagoblin-a463fe06ed8087e04096627fc6f160bff45c3e0b.zip
Make translatable takeaway privileges actions
Diffstat (limited to 'mediagoblin/moderation')
-rw-r--r--mediagoblin/moderation/tools.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/mediagoblin/moderation/tools.py b/mediagoblin/moderation/tools.py
index e0337536..8d758f18 100644
--- a/mediagoblin/moderation/tools.py
+++ b/mediagoblin/moderation/tools.py
@@ -31,7 +31,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)
@@ -44,13 +44,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")
)
)
@@ -59,7 +59,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)
@@ -68,14 +68,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,