diff options
| author | Mark Walker <mark@marksweb.co.uk> | 2024-11-17 20:40:28 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-17 21:40:28 +0100 |
| commit | 8790d59361d0d7147ea0c631d44e37d6336b9396 (patch) | |
| tree | 9ea3170caa1b68939ca52967b625506eb6cb7a0c /contact | |
| parent | 910e7c862c4e3863024b94d6746b3ce4e0a47050 (diff) | |
[contact] Marked all user-facing strings for translation
Refs #1648
Diffstat (limited to 'contact')
| -rw-r--r-- | contact/forms.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contact/forms.py b/contact/forms.py index ccdd056c..b6821160 100644 --- a/contact/forms.py +++ b/contact/forms.py @@ -5,6 +5,7 @@ from django import forms from django.conf import settings from django.contrib.sites.models import Site from django.utils.encoding import force_bytes +from django.utils.translation import gettext_lazy as _ from django_contact_form.forms import ContactForm from django_recaptcha.fields import ReCaptchaField from django_recaptcha.widgets import ReCaptchaV3 @@ -17,19 +18,19 @@ class BaseContactForm(ContactForm): message_subject = forms.CharField( max_length=100, widget=forms.TextInput( - attrs={"class": "required", "placeholder": "Message subject"} + attrs={"class": "required", "placeholder": _("Message subject")} ), - label="Message subject", + label=_("Message subject"), ) email = forms.EmailField( - widget=forms.TextInput(attrs={"class": "required", "placeholder": "E-mail"}) + widget=forms.TextInput(attrs={"class": "required", "placeholder": _("E-mail")}) ) name = forms.CharField( - widget=forms.TextInput(attrs={"class": "required", "placeholder": "Name"}) + widget=forms.TextInput(attrs={"class": "required", "placeholder": _("Name")}) ) body = forms.CharField( widget=forms.Textarea( - attrs={"class": "required", "placeholder": "Your message"} + attrs={"class": "required", "placeholder": _("Your message")} ) ) captcha = ReCaptchaField(widget=ReCaptchaV3) |
