Skip to content

Commit

Permalink
Use/Select content changes (#1829)
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbahrai authored May 1, 2024
1 parent 5d10861 commit ead6596
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 18 deletions.
6 changes: 3 additions & 3 deletions app/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ def __init__(self, *args, **kwargs):
self.default_branding.choices = self._getSelectBilingualChoices()

default_branding = RadioField(
_l("Choose which language shows first <span class='sr-only'>&nbsp;used in the Government of Canada signature</span>"),
_l("Select which language shows first <span class='sr-only'>&nbsp;used in the Government of Canada signature</span>"),
choices=[ # Choices by default, override to get more refined options.
(FieldWithLanguageOptions.ENGLISH_OPTION_VALUE, _l("English-first")),
(FieldWithLanguageOptions.FRENCH_OPTION_VALUE, _l("French-first")),
Expand Down Expand Up @@ -767,7 +767,7 @@ class BaseTemplateForm(StripWhitespaceForm):
],
)
process_type = RadioField(
_l("Choose a priority queue"),
_l("Select a priority queue"),
choices=[
("bulk", _l("Bulk — Not time-sensitive")),
("normal", _l("Normal")),
Expand Down Expand Up @@ -1601,7 +1601,7 @@ def get_folder_name(self):
# this means '__NONE__' (self.ALL_TEMPLATES option) is selected when no form data has been submitted
# set default to empty string so process_data method doesn't perform any transformation
move_to = NestedRadioField(
_l("Choose a folder"),
_l("Select a folder"),
default="",
validators=[required_for_ops("move-to-existing-folder"), Optional()],
)
Expand Down
2 changes: 1 addition & 1 deletion app/templates/main_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"selection_of_total_team member": "{{ _('{selection} of {total} team members').format(selection='%{smart_count}',total='%{total}') }} |||| {{ _('many {selection} of {total} team members').format(selection='%{smart_count}',total='%{total}') }}",
no_fields: "{{ _('No {field}s').format(field='%{field}') }}",
"all_team members": "{{ _('All team members') }}",
"choose_team members": "{{ _('Choose team members') }}",
"choose_team members": "{{ _('Select team members') }}",
"cancel_upload": "{{ _('Cancel upload') }}",
"choose_arbitrary things": "{{ _('Choose arbitrary things') }}",
never: "{{ _('Never') }}",
Expand Down
2 changes: 1 addition & 1 deletion app/templates/views/dashboard/task-shortcuts.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h2 class="heading-medium">{{ _("Start sending messages")}}</h2>
{{ task_shortcut(
description=_("Edit and send a message you’ve already created. You can also share templates with your team. "),
link_url=url_for('.choose_template', service_id=current_service.id, view="sending"),
link_text=_("Choose template"),
link_text=_("Select template"),
icon="arrow-right"
)
}}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/views/edit-email-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

<div class="grid-row contain-floats">
<div class="md:w-2/3 px-gutterHalf">
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Choose a name that helps you find the template when you need to reuse it.'), rows=10) }}
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Use a name that helps you find the template when you need it.'), rows=10) }}

{{ textbox(form.subject, width='w-full', highlight_tags=True, rows=2, hint=_("Tell recipients what the email is about. Try to use less than 10 words.")) }}

Expand Down
2 changes: 1 addition & 1 deletion app/templates/views/edit-letter-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
{% set txt = _('Save') %}
<div class="grid-row contain-floats">
<div class="md:w-5/6 float-left py-0 px-0 px-gutterHalf box-border">
{{ textbox(form.name, width='w-full', hint='This will not show in the message. Choose a name that helps you find the template when you need to reuse it.', rows=10) }}
{{ textbox(form.name, width='w-full', hint='This will not show in the message. Use a name that helps you find the template when you need it.', rows=10) }}
{{ textbox(form.subject, width='w-full', highlight_tags=True, rows=2) }}
{{ textbox(form.template_content, highlight_tags=True, width='w-full', rows=8) }}
{{ sticky_page_footer(
Expand Down
2 changes: 1 addition & 1 deletion app/templates/views/edit-sms-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<div class="grid-row contain-floats">
<div class="md:w-2/3 px-gutterHalf">
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Choose a name that helps you find the template when you need to reuse it.')) }}
{{ textbox(form.name, width='w-full', hint=_('This will not show in the message. Use a name that helps you find the template when you need it.')) }}
</div>
<div class="md:w-2/3 px-gutterHalf">
{{ textbox(form.template_content, highlight_tags=True, width='w-full', rows=5, hint=_('Maximum 612 characters. Some messages may be too long due to custom content.')) }}
Expand Down
7 changes: 6 additions & 1 deletion app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@
"No team members (only you)","Aucun membre de l'équipe (vous seulement)"
"No {field}s","Aucun {field}"
"Choose team members","Choisir des membres de l'équipe"
"Select team members","Sélectionner des membres de l'équipe"
"Cancel upload","Annuler le téléversement"
"Choose arbitrary things",""
"Send all now","Envoyer tout maintenant"
Expand Down Expand Up @@ -476,7 +477,7 @@
"New email template","Nouveau gabarit de courriel"
"New text message template","Nouveau gabarit de message texte"
"Create reusable template","Créer un message réutilisable"
"This will not show in the message. Choose a name that helps you find the template when you need to reuse it.","Vos destinataires ne verront pas le nom du gabarit. Le nom devrait vous aider à retrouver le gabarit plus tard"
"This will not show in the message. Use a name that helps you find the template when you need it.","Vos destinataires ne verront pas le nom du gabarit. Le nom devrait vous aider à retrouver le gabarit plus tard"
"Save","Enregistrer"
"Save template","Enregistrer le gabarit"
"loading...","chargement en cours..."
Expand Down Expand Up @@ -1652,6 +1653,7 @@
"You can change the name and email address later in Settings.","Vous pourrez changer le nom et l’adresse courriel ultérieurement via les paramètres."
"Create service name and email address","Créez le nom de service et l’adresse courriel"
"Choose which language shows first <span class='sr-only'>&nbsp;used in the Government of Canada signature</span>","Choisissez la langue à afficher en premier <span class='sr-only'>&nbsp;dans la signature du gouvernement du Canada</span>"
"Select which language shows first <span class='sr-only'>&nbsp;used in the Government of Canada signature</span>","Sélectionnez la langue à afficher en premier <span class='sr-only'>&nbsp;dans la signature du gouvernement du Canada</span>"
"When GC Notify sends your emails, the ‘From’ field shows the name followed by the email address.","Lorsque Notification GC envoie vos courriels, le champ « De » indique le nom suivi de l’adresse courriel."
"Learn more about the ‘From’ field","En savoir plus sur le champ « De »"
"Recipients can check the name and email address to confirm the message comes from your service.","Les destinataires peuvent vérifier le nom et l’adresse courriel pour confirmer que le message provient bel et bien de votre service."
Expand Down Expand Up @@ -1853,3 +1855,6 @@
"Email preview","Aperçu du courriel"
"navigation","la navigation"
"No results found","Aucun résultat trouvé"
"Select a priority queue","Sélectionnez une file de sécurité"
"Select a folder","Sélectionnez un dossier"
"Select template","Sélectionner un gabarit"
8 changes: 4 additions & 4 deletions tests/app/main/views/test_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ def test_redirect_caseworkers_to_templates(
@pytest.mark.parametrize(
"permissions, text_in_page, text_not_in_page",
[
(["view_activity", "manage_templates"], ["Create template"], ["Choose template"]),
(["view_activity", "send_messages"], ["Choose template"], ["Create template"]),
(["view_activity"], [], ["Create template", "Choose template"]),
(["view_activity", "manage_templates", "send_messages"], ["Create template", "Choose template"], []),
(["view_activity", "manage_templates"], ["Create template"], ["Select template"]),
(["view_activity", "send_messages"], ["Select template"], ["Create template"]),
(["view_activity"], [], ["Create template", "Select template"]),
(["view_activity", "manage_templates", "send_messages"], ["Create template", "Select template"], []),
],
)
def test_task_shortcuts_are_visible_based_on_permissions(
Expand Down
2 changes: 1 addition & 1 deletion tests/app/main/views/test_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def test_should_show_page_template_with_priority_select_if_platform_admin(

assert page.select_one("input[type=text]")["value"] == "Two week reminder"
assert "Template &lt;em&gt;content&lt;/em&gt; with &amp; entity" in str(page.select_one("textarea"))
assert "Choose a priority queue" in str(page.select_one("main"))
assert "Select a priority queue" in str(page.select_one("main"))
mock_get_service_template.assert_called_with(SERVICE_ONE_ID, template_id, None)


Expand Down
6 changes: 3 additions & 3 deletions tests/javascripts/support/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ window.APP_PHRASES = {
all_folders: "All folders",
choose_folders: "Choose folders",
all_teams: "All team members",
choose_team: "Choose team members",
choose_team: "Select team members",
"all_team members": "All team members",
"choose_team members": "Choose team members",
"choose_team members": "Select team members",
"all_team members": "All team members",
"choose_team members": "Choose team members",
"choose_team members": "Select team members",
"choosing folders": "choosing folders",
"choosing team members": "choosing team members",
no_folders_only_outside_folder:
Expand Down
2 changes: 1 addition & 1 deletion tests_cypress/cypress/e2e/admin/a11y/app_pages.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const pages = [
{ name: "Dashboard > Monthly usage", route: `/services/${config.Services.Cypress}/monthly` },
{ name: "Dashboard > Template usage", route: `/services/${config.Services.Cypress}/template-usage` },
{ name: "Dashboard > Create template", route: `/services/${config.Services.Cypress}/templates/create?source=dashboard` },
{ name: "Dashboard > Choose template", route: `/services/${config.Services.Cypress}/templates?view=sending` },
{ name: "Dashboard > Select template", route: `/services/${config.Services.Cypress}/templates?view=sending` },
{ name: "API", route: `/services/${config.Services.Cypress}/api` },
{ name: "API > Keys", route: `/services/${config.Services.Cypress}/api/keys` },
{ name: "API > Keys > Create", route: `/services/${config.Services.Cypress}/api/keys/create` },
Expand Down

0 comments on commit ead6596

Please sign in to comment.