Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-template-link-delivery-report
Browse files Browse the repository at this point in the history
  • Loading branch information
smcmurtry authored Jan 6, 2025
2 parents e27f6e7 + c1adf96 commit a248d44
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion app/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ class SMSAnnualMessageLimit(StripWhitespaceForm):

class EmailAnnualMessageLimit(StripWhitespaceForm):
message_limit = IntegerField(
_l("Annual email message limit"),
_l("Annual email limit"),
validators=[
DataRequired(message=_l("This cannot be empty")),
validators.NumberRange(min=1),
Expand Down
2 changes: 1 addition & 1 deletion app/main/views/service_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,7 +1161,7 @@ def set_email_annual_limit(service_id):
return render_template(
"views/service-settings/set-message-limit.html",
form=form,
heading=_("Annual email message limit"),
heading=_("Annual email limit"),
)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2 class="heading-medium">{{ _("Email address") }}</h2>

<div id="preview" class="focus:outline-yellow" style="display: none" tabindex="0" >
{% call confirmation_preview() %}
<p class="m-0">{{_("Make sure we have formatted your email address correctly.")}}</p>
<p class="m-0">{{_("Check that your email address is formatted correctly.")}}</p>
<p class="m-0">
{{_("Your service’s email address will be: ")}}
<b><span id='fixed-email-address'></span>@{{sending_domain}}</b>
Expand Down
14 changes: 7 additions & 7 deletions app/templates/partials/check/too-many-messages-annual.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
{% set units = _('text messages') %}
{% endif %}

<p data-testid="exceeds-annual">
<div data-testid="exceeds-annual">
{%- if current_service.trial_mode %}
{{ _("Your service is in trial mode. To send more messages, <a href='{}'>request to go live</a>").format(url_for('main.request_to_go_live', service_id=current_service.id)) }}
{% else %}
{% if recipients_remaining_messages > 0 %}
<p>{{ _('<strong>{}</strong> can only send <strong>{}</strong> more {} until annual limit resets'.format(current_service.name, recipients_remaining_messages, units)) }}</p>
<p class="text-title">{{ _('<strong>{}</strong> can only send <strong>{}</strong> more {} until annual limit resets').format(current_service.name, recipients_remaining_messages, units) }}</p>
<p>
{{ _('To send some of these messages now, edit the spreadsheet to <strong>{}</strong> recipients maximum. '.format(recipients_remaining_messages)) }}
{{ _('To send to recipients you removed, wait until <strong>April 1, {}</strong> or contact them some other way.'.format(now().year)) }}
{{ _('To send some of these messages now, edit the spreadsheet to <strong>{}</strong> recipients maximum. ').format(recipients_remaining_messages) }}
{{ _('To send to recipients you removed, wait until <strong>April 1, {}</strong> or contact them some other way.').format(now().year) }}
</p>
{% else %}
<p>{{ _('<strong>{}</strong> cannot send any more {} until <strong>April 1, {}</strong>'.format(current_service.name, units, now().year)) }}</p>
<p>{{ _('For more information, visit the <a href={}>usage report for {}</a>.'.format(url_for('.monthly', service_id=current_service.id), current_service.name)) }}</p>
<p class="text-title">{{ _('{} cannot send any more {} until April 1, {}').format(current_service.name, units, now().year) }}</p>
<p>{{ _('For more information, visit <a href={}>usage reports</a>.').format(url_for('.monthly', service_id=current_service.id)) }}</p>
{% endif %}
{%- endif -%}
</p>
</div>
2 changes: 1 addition & 1 deletion app/templates/views/service-settings/email_from.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{{ textbox(form.email_from, hint=hint_txt) }}
<div id="preview" class="focus:outline-yellow mb-gutter" tabindex="0">
{% call confirmation_preview() %}
<p class="m-0">{{_("Make sure we have formatted your email address correctly.")}}</p>
<p class="m-0">{{_("Check that your email address is formatted correctly.")}}</p>
<p class="m-0">
{{_("Your service’s email address will be: ")}}
<b><span id='fixed-email-address'>{{form.email_from.data}}</span>@{{sending_domain}}</b>
Expand Down
21 changes: 13 additions & 8 deletions app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"Message has been accepted by phone","Le numéro de téléphone a accepté le message"
"Phone number not accepting messages right now","Le numéro de téléphone n’accepte pas de messages à l’heure actuelle"
"Phone carrier is currently unreachable/unavailable","Le fournisseur téléphonique ne peut pas être rejoint ou est indisponible"
"Phone is currently unreachable/unavailable","Le téléphone ne peut pas être joint ou est indisponible"
"Sent","Envoyé"
"Email address","Adresse courriel"
"email address","adresse courriel"
Expand Down Expand Up @@ -1900,7 +1901,7 @@
"Using a spreadsheet","Utiliser une feuille de calcul"
"Your GC Notify","Votre Notification GC"
"Policy","Politique"
"Make sure we have formatted your email address correctly.","Assurez-vous que nous avons correctement formaté votre courriel."
"Check that your email address is formatted correctly.","Veuillez vérifier que votre adresse courriel est correctement formatée."
"GC Notify service level agreement","Accord sur les niveaux de service de Notification GC"
"Service level objectives: What to expect from GC Notify","Objectifs de niveau de service&nbsp;: qu’attendre de Notification GC"
"Integrate the API","Intégrer l’API"
Expand Down Expand Up @@ -2014,9 +2015,8 @@
"Email content","Message du courriel"
"right to left","de droite à gauche"
"warning","avertissement"
"Annual text message limit","(FR) Limite maximale de messages texte par exercice financier"
"Annual email message limit","(FR) Limite maximale de messages électroniques par exercice financier"
"Annual email limit","(FR) Limite maximale de courriels par exercice financier"
"Annual text message limit","Limite maximale de messages texte par exercice financier"
"Annual email limit","Limite maximale de courriels par exercice financier"
"Test response time","Tester le temps de réponse"
"No records found.","Aucun enregistrement trouvé."
" and ends March 31, "," et se termine le 31 mars "
Expand All @@ -2030,7 +2030,12 @@
"Visit usage report","Consulter le rapport d’utilisation"
"Month by month totals","Totaux mensuels"
"email messages","courriels"
"Sending paused until 7pm ET. You can schedule more messages to send later.","FR: Sending paused until 7pm ET. You can schedule more messages to send later."
"Sending paused until annual limit resets","FR: Sending paused until annual limit resets"
"These messages exceed the annual limit","FR: These messages exceed the annual limit"
"You cannot send messages from this service. Only team members can send messages.","Vous ne pouvez pas envoyer de messages à partir de ce service. Seuls les membres de l’équipe peuvent envoyer des messages."
"Sending paused until 7pm ET. You can schedule more messages to send later.","Envois suspendus jusqu’à 19 h HE. Vous pouvez programmer l’envoi de messages supplémentaires pour plus tard."
"Sending paused until annual limit resets","Envois suspendus jusqu’à la réinitialisation de la limite annuelle"
"These messages exceed the annual limit","Votre limite annuelle ne vous permet pas d’envoyer ces messages."
"To send some of these messages now, edit the spreadsheet to <strong>{}</strong> recipients maximum. ","Pour envoyer certains de ces courriels maintenant, modifiez la feuille de calcul pour n’inclure que <strong>{}</strong> destinataires au maximum."
"<strong>{}</strong> can only send <strong>{}</strong> more {} until annual limit resets","<strong>{}</strong> ne peut envoyer que <strong>{}</strong> {} d'ici la réinitialisation de la limite annuelle"
"To send to recipients you removed, wait until <strong>April 1, {}</strong> or contact them some other way.","Pour envoyer des messages aux destinataires, attendez <strong> le 1er avril {}</strong> ou optez pour une autre méthode de contact."
"For more information, visit <a href={}>usage reports</a>.","Pour plus de détails, <a href={}>consulter les rapports d’utilisation</a>."
"{} cannot send any more {} until April 1, {}","{} ne peut plus envoyer de {} d’ici le 1<sup>er</sup> avril {}."
"You cannot send messages from this service. Only team members can send messages.","Vous ne pouvez pas envoyer de messages à partir de ce service. Seuls les membres de l’équipe peuvent envoyer des messages."
2 changes: 1 addition & 1 deletion tests_cypress/cypress/e2e/admin/service-settings.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Platform Admin Service Settings", () => {

it("Saves and displays new email annual limit", () => {
ServiceSettingsPage.ClickChangeEmailAnnualLimitLink();
cy.get("h1").contains("Annual email message limit").should("be.visible");
cy.get("h1").contains("Annual email limit").should("be.visible");
ServiceSettingsPage.SetMessageLimit(250000);
ServiceSettingsPage.Submit();
ServiceSettingsPage.Components.EmailAnnualLimit().contains(
Expand Down

0 comments on commit a248d44

Please sign in to comment.