Closed lulumuts closed 3 years ago
Shouldn't your strings be _('Your Details')
instead of ('Your Details')
?
Hi my mistake, this is the way the code actually looks, can't say why it copied without the underscore.
named_formwizardforms = ( (('Your Details'), FormStepOne), (('Residence Preference'), FormStepTwo), (('Immigration & Schooling'), FormStepThree), (('Mobility Expenses'), FormStepFour), (('Living Expenses'), FormStepFive),
) urlpatterns = [ path(('form/'), FormWizardView.as_view(named_formwizard_forms),name="form"), ]
Any idea why it shows up in my .po file but doesnt translate? I suspect formtools only translates from the django formtools LOCALE folder?
Your are aliasing _
to gettext_lazy
not gettext
, right?
yes exactly
In fact, I dont think the form step name is supposed to be translated, as it is forced to a string soon in its processing. It is just a step name that should be used in the code, not a string to be presented to the user. You can probably store user-visible strings inside the form themselves.
Hi all, I'm trying to translate my django app, and all aspects work except for the formtools wizard, specifically the strings assigned to my multistep forms. In Urls.py I have:
named_formwizardforms = ( (('Your Details'), FormStepOne), (('Residence Preference'), FormStepTwo), (('Immigration & Schooling'), FormStepThree), (('Mobility Expenses'), FormStepFour), (('Living Expenses'), FormStepFive), ) urlpatterns = [ path(_('form/'), FormWizardView.as_view(named_formwizard_forms),name="form"), ] When I makemessages, the strings show up in my django.po, and while i have translated them to french, they either do not compile or there is some format I am missing in the template. Please advise.
Thanks