diff --git a/app/forms/research.py b/app/forms/research.py index 1104006a..418a4626 100644 --- a/app/forms/research.py +++ b/app/forms/research.py @@ -1,5 +1,6 @@ from app.forms.base import PrepopulatedForm from flask_babel import gettext +from flask_babel import lazy_gettext from wtforms import RadioField from wtforms import StringField from wtforms.validators import Email @@ -20,7 +21,7 @@ def __init__(self, *args, **kwargs): class ResearchContactDetailsForm(PrepopulatedForm): - contact_name = StringField(label="Full name", validators=[InputRequired(message="Name of contact is required")]) - contact_email = StringField( - label="Email", validators=[InputRequired(message="Contact email address is required"), Email()] - ) + contact_email_input_message = lazy_gettext("Contact email address is required") + contact_name_input_message = lazy_gettext("Name of contact is required") + contact_name = StringField(label="Full name", validators=[InputRequired(message=contact_name_input_message)]) + contact_email = StringField(label="Email", validators=[InputRequired(message=contact_email_input_message), Email()]) diff --git a/app/translations/cy/LC_MESSAGES/messages.mo b/app/translations/cy/LC_MESSAGES/messages.mo index 7af7084a..e0ba3e0c 100644 Binary files a/app/translations/cy/LC_MESSAGES/messages.mo and b/app/translations/cy/LC_MESSAGES/messages.mo differ diff --git a/app/translations/cy/LC_MESSAGES/messages.po b/app/translations/cy/LC_MESSAGES/messages.po index c05c85d5..84dbb91c 100644 --- a/app/translations/cy/LC_MESSAGES/messages.po +++ b/app/translations/cy/LC_MESSAGES/messages.po @@ -131,6 +131,14 @@ msgstr "Rwy'n cytuno i chi gysylltu â mi at ddibenion ymchwil" msgid "I do not want to be contacted for research purposes" msgstr "Nid wyf eisiau i chi gysylltu â mi at ddibenion ymchwil" +#: app/forms/research.py:24 +msgid "Name of contact is required" +msgstr "Mae angen enw’r cyswllt" + +#: app/forms/research.py:23 +msgid "Contact email address is required" +msgstr "Mae angen cyfeiriad e-bost y cyswllt" + #: app/models/language.py:5 msgid "English" msgstr "Saesneg"