Skip to content

Commit

Permalink
Welsh translation: WF - Where did the discrimination occur? (#167)
Browse files Browse the repository at this point in the history
* Add in welsh translations

* Add Or to translations

* Recompile
  • Loading branch information
TawneeOwl authored Feb 28, 2025
1 parent c86e969 commit 88fc51d
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 12 deletions.
29 changes: 18 additions & 11 deletions app/categories/discrimination/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
from wtforms.validators import InputRequired
from app.categories.x_cat.forms import AreYouUnder18Form
from app.categories.constants import DISCRIMINATION
from flask_babel import lazy_gettext as _


class DiscriminationQuestionForm(QuestionForm):
category = DISCRIMINATION


class DiscriminationWhereForm(DiscriminationQuestionForm):
title = "Where did the discrimination happen?"
title = _("Where did the discrimination happen?")

next_step_mapping = {
"*": "categories.discrimination.why",
Expand All @@ -22,25 +23,31 @@ class DiscriminationWhereForm(DiscriminationQuestionForm):
question = SelectMultipleField(
title,
widget=CategoryCheckboxInput(
show_divider=True, hint_text="You can select more than one."
show_divider=True, hint_text=_("You can select more than one.")
),
validators=[InputRequired(message="Select where the discrimination happened")],
validators=[
InputRequired(message=_("Select where the discrimination happened"))
],
choices=[
("work", "Work - including colleagues, employer or employment agency"),
("school", "School, college, university or other education setting"),
("work", _("Work - including colleagues, employer or employment agency")),
("school", _("School, college, university or other education setting")),
(
"business",
"Businesses or services - such as a shop, restaurant, train, hotel, bank, law firm",
_(
"Businesses or services - such as a shop, restaurant, train, hotel, bank, law firm"
),
),
("healthcare", "Health or care - such as a hospital or care home"),
("housing", "Housing - such as a landlord or estate agent"),
("healthcare", _("Health or care - such as a hospital or care home")),
("housing", _("Housing - such as a landlord or estate agent")),
(
"public",
"Public services and authorities - such as the police, social services, council or local authority, jobcentre, government",
_(
"Public services and authorities - such as the police, social services, council or local authority, jobcentre, government"
),
),
("club", "Clubs and associations - such as a sports club"),
("club", _("Clubs and associations - such as a sports club")),
("", ""),
("notsure", "I’m not sure"),
("notsure", _("I’m not sure")),
],
)

Expand Down
3 changes: 2 additions & 1 deletion app/categories/widgets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from govuk_frontend_wtf.wtforms_widgets import GovRadioInput, GovCheckboxesInput
from flask_babel import lazy_gettext as _


class CategoryInputField:
Expand Down Expand Up @@ -38,7 +39,7 @@ def map_gov_params(self, field, **kwargs):

# Add divider if enabled and there are enough items
if self.show_divider and len(items) >= 2:
items[-2]["divider"] = "or"
items[-2]["divider"] = _("or")

# Handle pre-selected answer if present
if field.data:
Expand Down
Binary file modified app/translations/cy/LC_MESSAGES/messages.mo
Binary file not shown.
45 changes: 45 additions & 0 deletions app/translations/cy/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,9 @@ msgstr ""
msgid "Select if the child is or has been in care"
msgstr ""

msgid "or"
msgstr "neu"

msgid "Where will the appeal be held?"
msgstr "Ble fydd yr apêl yn cael ei chynnal?"

Expand All @@ -457,6 +460,48 @@ msgstr "Llys Apêl"
msgid "None of these"
msgstr "Dim un o'r rhain"

msgid "Where did the discrimination happen?"
msgstr "Ble digwyddodd y gwahaniaethu?"

msgid "You can select more than one."
msgstr "Gallwch ddewis mwy nag un."

msgid "Select where the discrimination happened"
msgstr "Dewiswch ble y digwyddodd y gwahaniaethu"

msgid "Work - including colleagues, employer or employment agency"
msgstr "Yn y gwaith – gan gynnwys cydweithwyr, cyflogwr neu asiantaeth gyflogi"

msgid "School, college, university or other education setting"
msgstr "Yn yr ysgol, coleg, prifysgol neu leoliad addysg arall"

msgid ""
"Businesses or services - such as a shop, restaurant, train, hotel, bank, "
"law firm"
msgstr ""
"Busnesau neu wasanaethau – fel siop, bwyty, trên, gwesty, banc, cwmni "
"cyfreithiol"

msgid "Health or care - such as a hospital or care home"
msgstr "Iechyd neu ofal – fel ysbyty neu gartref gofal"

msgid "Housing - such as a landlord or estate agent"
msgstr "Tai – fel landlord neu asiant tai"

msgid ""
"Public services and authorities - such as the police, social services, "
"council or local authority, jobcentre, government"
msgstr ""
"Gwasanaethau cyhoeddus ac awdurdodau – fel yr heddlu, gwasanaethau "
"cymdeithasol, cynghorau neu awdurdodau lleol, canolfannau gwaith, y "
"llywodraeth"

msgid "Clubs and associations - such as a sports club"
msgstr "Clybiau a chymdeithasau – fel clwb chwaraeon"

msgid "I’m not sure"
msgstr "Dydw i ddim yn siŵr"

msgid "Is this to do with police, prisons or detention centres?"
msgstr "A yw hyn yn ymwneud â’r heddlu, carchardai neu ganolfannau cadw?"

Expand Down
44 changes: 44 additions & 0 deletions app/translations/en/LC_MESSAGES/messages.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
<<<<<<< HEAD
"POT-Creation-Date: 2025-02-27 12:09+0000\n"
=======
"POT-Creation-Date: 2025-02-27 13:01+0000\n"
>>>>>>> ed98cb08 (Add in welsh translations)
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down Expand Up @@ -449,6 +453,9 @@ msgstr ""
msgid "Select if the child is or has been in care"
msgstr ""

msgid "or"
msgstr ""

msgid "Where will the appeal be held?"
msgstr ""

Expand All @@ -467,6 +474,43 @@ msgstr ""
msgid "None of these"
msgstr ""

msgid "Where did the discrimination happen?"
msgstr ""

msgid "You can select more than one."
msgstr ""

msgid "Select where the discrimination happened"
msgstr ""

msgid "Work - including colleagues, employer or employment agency"
msgstr ""

msgid "School, college, university or other education setting"
msgstr ""

msgid ""
"Businesses or services - such as a shop, restaurant, train, hotel, bank, "
"law firm"
msgstr ""

msgid "Health or care - such as a hospital or care home"
msgstr ""

msgid "Housing - such as a landlord or estate agent"
msgstr ""

msgid ""
"Public services and authorities - such as the police, social services, "
"council or local authority, jobcentre, government"
msgstr ""

msgid "Clubs and associations - such as a sports club"
msgstr ""

msgid "I’m not sure"
msgstr ""

msgid "Is this to do with police, prisons or detention centres?"
msgstr ""

Expand Down

0 comments on commit 88fc51d

Please sign in to comment.