From 44deb8a5363435abef524547c799c72fcbfd67b8 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 12 Jun 2015 01:39:29 +0900 Subject: [PATCH] i18n for more mesages Signed-off-by: Hiroshi Miura --- symposion/proposals/views.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/symposion/proposals/views.py b/symposion/proposals/views.py index fe146c9b..46c3c1c6 100644 --- a/symposion/proposals/views.py +++ b/symposion/proposals/views.py @@ -14,6 +14,8 @@ from django.contrib import messages from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required +from django.utils.translation import ugettext_lazy as _ + from account.models import EmailAddress from symposion.proposals.models import ( ProposalBase, ProposalSection, ProposalKind @@ -36,18 +38,18 @@ def get_form(name): def proposal_submit(request): if not request.user.is_authenticated(): - messages.info(request, "To submit a proposal, please " - "log in and create a speaker profile " - "via the dashboard.".format(settings.LOGIN_URL)) + messages.info(request, _("To submit a proposal, please " + "log in and create a speaker profile " + "via the dashboard.".format(settings.LOGIN_URL))) return redirect("home") # @@@ unauth'd speaker info page? else: try: request.user.speaker_profile except ObjectDoesNotExist: url = reverse("speaker_create") - messages.info(request, "To submit a proposal, first " - "create a speaker " - "profile.".format(url)) + messages.info(request, _("To submit a proposal, first " + "create a speaker " + "profile.".format(url))) return redirect("dashboard") kinds = []