From c9f31d1ae8b661c7bad2d8e172c5ac6249ecb29c Mon Sep 17 00:00:00 2001 From: Philippe Caron Date: Thu, 19 Dec 2024 15:58:07 +0000 Subject: [PATCH 01/12] add translation keys + format --- app/main/forms.py | 20 ++++----- .../organisations/organisation/index.html | 4 +- .../organisation/settings/edit-agreement.html | 40 ++++++++--------- .../settings/edit-crown-status.html | 26 +++++------ .../settings/edit-go-live-notes.html | 23 ++++++---- .../organisation/settings/edit-type.html | 4 +- .../organisation/settings/index.html | 42 +++++++++--------- .../settings/preview-email-branding.html | 29 +++++++------ .../settings/set-email-branding.html | 43 ++++++++++--------- 9 files changed, 120 insertions(+), 111 deletions(-) diff --git a/app/main/forms.py b/app/main/forms.py index 0d6761f7d7..d206d0a59d 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -558,33 +558,33 @@ class SendingDomainForm(StripWhitespaceForm): class RenameOrganisationForm(StripWhitespaceForm): name = StringField( - "Organisation name", + _l("Organisation name"), validators=[DataRequired(message=_l("This cannot be empty"))], ) class OrganisationOrganisationTypeForm(StripWhitespaceForm): - org_type = OrganisationTypeField("What type of organisation is this?") + org_type = OrganisationTypeField(_l("What type of organisation is this?")) class OrganisationCrownStatusForm(StripWhitespaceForm): crown_status = RadioField( - ("Is this organisation a crown body?"), + _l("Is this organisation a crown body?"), choices=[ - ("crown", "Yes"), - ("non-crown", "No"), - ("unknown", "Not sure"), + ("crown", _l("Yes")), + ("non-crown", _l("No")), + ("unknown", _l("Not sure")), ], ) class OrganisationAgreementSignedForm(StripWhitespaceForm): agreement_signed = RadioField( - ("Has this organisation signed the agreement?"), + _l("Has this organisation signed the agreement?"), choices=[ - ("yes", "Yes"), - ("no", "No"), - ("unknown", "No (but we have some service-specific agreements in place)"), + ("yes", _l("Yes")), + ("no", _l("No")), + ("unknown", _l("No (but we have some service-specific agreements in place)")), ], ) diff --git a/app/templates/views/organisations/organisation/index.html b/app/templates/views/organisations/organisation/index.html index 45472d30c3..c3c3536c34 100644 --- a/app/templates/views/organisations/organisation/index.html +++ b/app/templates/views/organisations/organisation/index.html @@ -1,13 +1,13 @@ {% extends "org_template.html" %} {% block org_page_title %} - Usage + {{_("Usage")}} {% endblock %} {% block org_content %}

- Usage + {{_("Usage")}}