Skip to content

Commit

Permalink
Merge pull request #609 from communitiesuk/FS-4309-research-survey-in…
Browse files Browse the repository at this point in the history
…-application-3

Add welsh translations for validation messages in ResearchContactDetails
  • Loading branch information
ksp37-dluhc authored Jun 17, 2024
2 parents b9683d0 + fcd1850 commit 63f006d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/forms/research.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()])
Binary file modified app/translations/cy/LC_MESSAGES/messages.mo
Binary file not shown.
8 changes: 8 additions & 0 deletions app/translations/cy/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 63f006d

Please sign in to comment.