Ticket #8617: wizardtrans.diff

File wizardtrans.diff, 1.2 KB (added by Bob Thomas, 16 years ago)

Mark wizard_error message for translation

  • django/contrib/formtools/wizard.py

     
    1212from django.shortcuts import render_to_response
    1313from django.template.context import RequestContext
    1414from django.utils.hashcompat import md5_constructor
     15from django.utils.translation import ugettext_lazy as _
    1516from django.contrib.formtools.utils import security_hash
    1617
    1718class FormWizard(object):
     
    126127        This default implementation simply renders the form for the given step,
    127128        but subclasses may want to display an error message, etc.
    128129        """
    129         return self.render(self.get_form(step), request, step, context={'wizard_error': 'We apologize, but your form has expired. Please continue filling out the form from this page.'})
     130        return self.render(self.get_form(step), request, step, context={'wizard_error': _('We apologize, but your form has expired. Please continue filling out the form from this page.')})
    130131
    131132    def render_revalidation_failure(self, request, step, form):
    132133        """
Back to Top