Skip to content

Commit

Permalink
Fix unicode issues.
Browse files Browse the repository at this point in the history
fix #26
  • Loading branch information
tonioo committed Jun 6, 2016
1 parent e511ffb commit 9047519
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modoboa_webmail/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def empty(request):
if name != parameters.get_user(request.user, "TRASH_FOLDER"):
raise BadRequest(_("Invalid request"))
get_imapconnector(request).empty(name)
content = "<div class='alert alert-info'>%s</div>" % _("Empty mailbox")
content = u"<div class='alert alert-info'>%s</div>" % _("Empty mailbox")
return render_to_json_response({
'listing': content, 'mailbox': name, 'pages': [1]
})
Expand Down Expand Up @@ -274,8 +274,9 @@ def attachments(request, tplname="modoboa_webmail/attachments.html"):
error = _("Failed to save attachment: ") + str(inst)

if csuploader.toobig:
error = _("Attachment is too big (limit: %s)"
% parameters.get_admin("MAX_ATTACHMENT_SIZE"))
error = (
_("Attachment is too big (limit: %s)") %
parameters.get_admin("MAX_ATTACHMENT_SIZE"))
return render(request, "modoboa_webmail/upload_done.html", {
"status": "ko", "error": error
})
Expand Down Expand Up @@ -372,7 +373,7 @@ def listmailbox(request, defmailbox="INBOX", update_session=True):
length = len(content)
else:
if page_id == 1:
content = "<div class='alert alert-info'>{0}</div>".format(
content = u"<div class='alert alert-info'>{0}</div>".format(
_("Empty mailbox")
)
length = 0
Expand Down

0 comments on commit 9047519

Please sign in to comment.