i18n for more mesages

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura 2015-06-12 01:39:29 +09:00
parent 7ff4c0b4ef
commit 44deb8a536

View file

@ -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 "
"<a href='{0}'>log in</a> and create a speaker profile "
"via the dashboard.".format(settings.LOGIN_URL))
messages.info(request, _("To submit a proposal, please "
"<a href='{0}'>log in</a> 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 "
"<a href='{0}'>create a speaker "
"profile</a>.".format(url))
messages.info(request, _("To submit a proposal, first "
"<a href='{0}'>create a speaker "
"profile</a>.".format(url)))
return redirect("dashboard")
kinds = []