diff --git a/contact/forms.py b/contact/forms.py index ccdd056c2..b68211608 100644 --- a/contact/forms.py +++ b/contact/forms.py @@ -5,6 +5,7 @@ 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) diff --git a/djangoproject/templates/contact/coc.html b/djangoproject/templates/contact/coc.html index 482eb540e..db307a7f8 100644 --- a/djangoproject/templates/contact/coc.html +++ b/djangoproject/templates/contact/coc.html @@ -1,8 +1,9 @@ {% extends "base_3col.html" %} +{% load i18n %} -{% block title %}Django Code of Conduct Feedback{% endblock %} +{% block title %}{% translate "Django Code of Conduct Feedback" %}{% endblock %} {% block content %} -
This contact form is for the Django Software Foundation - the legal and - fundraising arm of the Django project.
-If you want to report a bug, feature request, or documentation issue in Django, - use the ticket tracker.
-If you want to report a problem with this website, use the - GitHub repo.
-If you've got questions about how to use Django, use the - django-users mailing list.
++ {% blocktranslate trimmed %} + This contact form is for the Django Software Foundation - the legal and + fundraising arm of the Django project. + {% endblocktranslate %} +
++ {% blocktranslate trimmed %} + If you want to report a bug, feature request, or documentation issue in Django, + use the ticket tracker. + {% endblocktranslate %} +
++ {% blocktranslate trimmed %} + If you want to report a problem with this website, use the + GitHub repo. + {% endblocktranslate %} +
++ {% blocktranslate trimmed %} + If you've got questions about how to use Django, use the + django-users mailing list. + {% endblocktranslate %} +
{% endblock %} diff --git a/djangoproject/templates/contact/sent.html b/djangoproject/templates/contact/sent.html index 7706e7c80..9cc57be47 100644 --- a/djangoproject/templates/contact/sent.html +++ b/djangoproject/templates/contact/sent.html @@ -1,18 +1,23 @@ {% extends "base_foundation.html" %} +{% load i18n %} -{% block title %}Message sent{% endblock %} +{% block title %}{% translate "Message sent" %}{% endblock %} {% block content %} -- Your mail will be read by a real, live human being. We can't - guarantee when or whether you'll get a reply, but your message - will be read, generally within the next couple of days. + {% blocktranslate trimmed %} + Your mail will be read by a real, live human being. We can't + guarantee when or whether you'll get a reply, but your message + will be read, generally within the next couple of days. + {% endblocktranslate %}
- If you're expecting a reply and don't get one, please feel free - to send a reminder. Please wait a few days, however, unless - it's an emergency. + {% blocktranslate trimmed %} + If you're expecting a reply and don't get one, please feel free + to send a reminder. Please wait a few days, however, unless + it's an emergency. + {% endblocktranslate %}
{% endblock %}