Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the translations #2020

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/main/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,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 @@ -1160,7 +1160,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
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>
17 changes: 11 additions & 6 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 @@ -2013,9 +2014,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 @@ -2029,6 +2029,11 @@
"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"
"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 {}."
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
Loading