Skip to content

Commit

Permalink
fix various translations (#1997)
Browse files Browse the repository at this point in the history
* fix various translations

* fix: update translation strings to include space

* fix: remove line break from text

* fix: update `make test-translations` to look for translations inside of `.html` files and not just `.py` files

* chore: add missing translation

* update settings page title

* remove redundant translations

* add missing translation

* csv lint

---------

Co-authored-by: Andrew Leith <[email protected]>
  • Loading branch information
amazingphilippe and andrewleith authored Nov 25, 2024
1 parent f538332 commit 5748737
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 23 deletions.
4 changes: 2 additions & 2 deletions app/templates/components/message-count-label.html
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@

{%- if session["userlang"] == "fr" -%}
{%- if count <= 1 -%}
{{ _('addresse courriel problématique') }}
addresse courriel problématique
{%- else -%}
{{ _('addresses courriel problématiques') }}
addresses courriel problématiques
{%- endif %}
{{" "}}
{%- endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ <h2 class="heading-small">
autocomplete='new-password'
) }}
{% set test_response_txt = _('Test response time') if has_callback_config else None %}
{% set test_response_value = _('test_response_time') if has_callback_config else None %}
{% set test_response_value = 'test_response_time' if has_callback_config else None %}
{% set display_footer = is_deleting if is_deleting else False %}
{% set delete_link = url_for('.delete_delivery_status_callback', service_id=current_service.id) if has_callback_config else None%}
{% if not display_footer %}
{{ sticky_page_footer_two_submit_buttons_and_delete_link(
button1_text=_('Save'),
button1_value=_('save'),
button1_value='save',
button2_text=test_response_txt,
button2_value=test_response_value,
delete_link=delete_link,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ <h2 class="heading-small">
autocomplete='new-password'
) }}
{% set test_response_txt = _('Test response time') if has_callback_config else None %}
{% set test_response_value = _('test_response_time') if has_callback_config else None %}
{% set test_response_value = 'test_response_time' if has_callback_config else None %}
{% set display_footer = is_deleting if is_deleting else False %}
{% set delete_link = url_for('.delete_received_text_messages_callback', service_id=current_service.id) if has_callback_config else None%}
{% set delete_link_text = _('Delete') if has_callback_config else None %}
{% if not display_footer %}
{{ sticky_page_footer_two_submit_buttons_and_delete_link(
button1_text=_('Save'),
button1_value=_('save'),
button1_value='save',
button2_text=test_response_txt,
button2_value=test_response_value,
delete_link=delete_link,
Expand Down
6 changes: 4 additions & 2 deletions app/templates/views/check/column-errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ <h2 class='banner-title' data-module="track-error" data-error-type="Missing plac
{% endcall %}
<h2 class="heading-medium">{{ _('You cannot send all these text messages today') }}</h2>
<p>
{{ _("You can try sending these messages after {} Eastern Time. Check {}.").format(time_to_reset[current_lang], content_link(_("your current local time"), 'https://nrc.canada.ca/en/web-clock/', is_external_link=true))}}
{{ _("You can try sending these messages after {} Eastern Time. Check {}.").format(time_to_reset[current_lang],
content_link(_("your current local time"), _('https://nrc.canada.ca/en/web-clock/'), is_external_link=true))}}
</p>
{% elif recipients.more_rows_than_can_send and false %}
{% call banner_wrapper(type='dangerous') %}
Expand All @@ -173,7 +174,8 @@ <h2 class="heading-medium">{{ _('You cannot send all these text messages today')
{% endcall %}
<h2 class="heading-medium">{{ _('You cannot send all these email messages today') }}</h2>
<p>
{{ _("You can try sending these messages after {} Eastern Time. Check {}.").format(time_to_reset[current_lang], content_link(_("your current local time"), 'https://nrc.canada.ca/en/web-clock/', is_external_link=true))}}
{{ _("You can try sending these messages after {} Eastern Time. Check {}.").format(time_to_reset[current_lang],
content_link(_("your current local time"), _('https://nrc.canada.ca/en/web-clock/'), is_external_link=true))}}
</p>


Expand Down
3 changes: 2 additions & 1 deletion app/templates/views/email-branding/branding-goc.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ <h2 class="heading-small" id="goc_branding-label">{{ _('Change the default langu
{% call form_wrapper() %}
{{ radios(form.goc_branding, hide_legend=True, testid="goc_branding") }}

{{ _('<a class="-mt-12 block" data-testid="goto-pool" href="{}">{}</a>').format(url_for('main.review_branding_pool', service_id=current_service.id), _('Select alternate logo')) }}
<a class="-mt-12 block" data-testid="goto-pool"
href="{{ url_for('main.review_branding_pool', service_id=current_service.id) }}">{{ _('Select alternate logo') }}</a>

<div class="mt-10">
{{ page_footer(
Expand Down
3 changes: 2 additions & 1 deletion app/templates/views/email-branding/branding-pool.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
<div class="js-stick-at-bottom-when-scrolling">
<div class="flex flex-row-reverse justify-end items-center">
<div class="ml-10">
{{ _('<a href="{}" data-testid="goto-request">{}</a>').format(url_for('main.create_branding_request', service_id=current_service.id), _('Request a new logo')) }}
<a href="{{ url_for('main.create_branding_request', service_id=current_service.id) }}" data-testid="goto-request">{{
_('Request a new logo') }}</a>
</div>
<div class="">
{{ page_footer(_('Preview'), testid="preview") }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{{ task_shortcut(
description=_("Explore other settings"),
link_url=url_for('main.service_settings', service_id=current_service.id),
link_text=_("Go to your Settings"),
link_text=_("Go to your settings"),
icon="arrow-right"
)}}
</div>
Expand Down
6 changes: 4 additions & 2 deletions app/templates/views/notifications/check.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
{% endcall %}
<h2 class="heading-medium">{{_('You cannot send this text message today') }}</h2>
<p class="mb-12">
{{ _("You can try sending this message after {} Eastern Time. Check {}.").format(time_to_reset[current_lang], content_link(_("your current local time"), 'https://nrc.canada.ca/en/web-clock/', is_external_link=true))}}
{{ _("You can try sending this message after {} Eastern Time. Check {}.").format(time_to_reset[current_lang],
content_link(_("your current local time"), _('https://nrc.canada.ca/en/web-clock/'), is_external_link=true))}}
</p>
</div>
{% elif error == 'too-many-messages' %}
Expand All @@ -61,7 +62,8 @@ <h2 class="heading-medium">{{_('You cannot send this text message today') }}</h2
{% endcall %}
<h2 class="heading-medium">{{_('You cannot send this email message today') }}</h2>
<p class="mb-12">
{{ _("You can try sending this message after {} Eastern Time. Check {}.").format(time_to_reset[current_lang], content_link(_("your current local time"), 'https://nrc.canada.ca/en/web-clock/', is_external_link=true))}}
{{ _("You can try sending this message after {} Eastern Time. Check {}.").format(time_to_reset[current_lang],
content_link(_("your current local time"), _('https://nrc.canada.ca/en/web-clock/'), is_external_link=true))}}
</p>
</div>
{% elif error == 'message-too-long' %}
Expand Down
3 changes: 1 addition & 2 deletions app/templates/views/service-settings/email_from.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

{% call form_wrapper() %}
{% set save_txt = _('Save') %}
{% set hint_txt = _('Maximum 64 characters with no spaces. Characters can include letters, numbers, dots, dashes, and
underscores.') %}
{% set hint_txt = _('Maximum 64 characters with no spaces. Characters can include letters, numbers, dots, dashes, and underscores.') %}
{{ textbox(form.email_from, hint=hint_txt) }}
<div id="preview" class="focus:outline-yellow mb-gutter" tabindex="0">
{% call confirmation_preview() %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

{% call form_wrapper() %}
{{ page_header(
_('Free text messages per year'),
_('Free text messages per fiscal year'),
back_link=url_for('.service_settings', service_id=current_service.id)
) }}
{{ textbox(form.free_sms_allowance) }}
Expand Down
38 changes: 31 additions & 7 deletions app/translations/csv/fr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"source","target"
"\!/\!/ HELLO DEVS, READ THIS FOR DOCUMENTATION \!/\!/","Read more about how translations work in scripts/generate_en_translations.py"
":"," :"
": "," : "
"English","Anglais"
"French","Français"
"Your account and language","Votre compte et langue"
Expand Down Expand Up @@ -56,6 +56,7 @@
"Who runs this service?","Qui assure la gestion du service?"
"What’s your key called?","Quel est le nom de votre clé?"
"Numbers of text messages per fiscal year","Nombre de messages texte par exercice financier"
"Free text messages per fiscal year","Messages texte gratuits par exercice financier"
"Enter password","Entrez votre mot de passe"
"Invalid password","Mot de passe non valide"
"Template name","Nom du gabarit"
Expand Down Expand Up @@ -127,6 +128,7 @@
"Text message","Message texte"
"Choose a folder","Choisissez un dossier"
"Create template","Créer un gabarit"
"Create category","Créer une catégorie"
"Will you send the message by email or text?","Enverrez-vous le message par courriel ou par texte?"
"What’s their name?","Quel est son nom?"
"What’s their email address?","Quelle est son adresse courriel?"
Expand Down Expand Up @@ -653,6 +655,7 @@
"Count in list of live services","Compte dans la liste de services activés"
"Organisation","Organisation"
"Free text message allowance","Nombre de messages texte gratuits"
"Free text messages per year","Nombre de messages texte gratuits par année"
"text messages per fiscal year","Allocation de messages texte par exercice financier"
"Letter branding","Image de marque de la lettre"
"Data retention","Rétention des données"
Expand Down Expand Up @@ -1080,6 +1083,7 @@
"Daily text message limit","Limite quotidienne de message texte"
"Last edited","Dernière modification&nbsp;: "
"See previous versions","Voir les versions précédentes"
"Version {}","Version {}"
"Delete this template","Supprimer ce gabarit"
"Redact personalised variable content after sending","Masquer le contenu variable personnalisé après l’envoi"
"Personalised variable content redacted after sending","Le contenu variable personnalisé masqué après l’envoi"
Expand Down Expand Up @@ -1426,6 +1430,7 @@
"Filter by year","Filtrer par année"
"Filter by status","Filtrer par état de livraison"
"Filter by template type","Filtrer par type de gabarit"
"Filter by template type and category","Filtrer par type et catégorie de gabarit"
"Top of page","Haut de page"
"Your service is in trial mode. Trial mode limits your service to sending notifications to yourself and to your team members within GC Notify.","Votre service est en mode d’essai. Le mode d’essai limite l’envoi de notifications à vous-même et aux autres membres de votre équipe sur Notification GC."
"Complete the following steps to go live and send notifications to more people.","Complétez les étapes suivantes pour activer votre service et envoyer des messages à d’autres personnes."
Expand Down Expand Up @@ -1637,6 +1642,8 @@
"Back to template {}","Retour au gabarit {}"
"Previewing template {}","Aperçu du gabarit {}"
"You need a new password","Vous devez créer un nouveau mot de passe"
"You need to create a new password","Vous devez créer un nouveau mot de passe"
"GC Notify needs you to create a new password for this account.","Notification GC vous demande de créer un nouveau mot de passe pour ce compte."
"As a security precaution, all users of GC Notify must change their password.","Par mesure de sécurité, tou·te·s les utilisateur·rice·s de Notification GC doivent changer leur mot de passe."
"Check your email. If you did not receive the link,","Nous vous avons envoyé un courriel contenant un lien de réinitialisation. Si vous ne l’avez pas reçu,"
"contact support.","veuillez contacter notre équipe de soutien."
Expand All @@ -1650,7 +1657,7 @@
"The link in the email we sent you has expired","Le lien que nous vous avons envoyé par courriel a expiré."
"Check your email. We sent you a password reset link.","Vérifiez votre courriel. Nous vous avons envoyé un lien pour réinitialiser votre mot de passe."
"Why we are asking you to create a new password","Pourquoi nous vous demandons de créer un nouveau mot de passe."
"GC Notify has expired all user passwords out of an abundance of caution following the discovery of a potential security risk on March 29, 2022.", Notification GC a expiré le mot de passe de tous les utilisateurs par excès de prudence, suivant la découverte d’une faille potentielle le 29 mars 2022."
"GC Notify has expired all user passwords out of an abundance of caution following the discovery of a potential security risk on March 29, 2022.","Notification GC a expiré le mot de passe de tous les utilisateurs par excès de prudence, suivant la découverte d’une faille potentielle le 29 mars 2022."
"If you don't receive a password reset link in your inbox,","Si vous ne recevez pas de courriel pour réinitialiser votre mot de passe,"
"please contact our support team.","contactez notre équipe de soutien technique."
"A password that is hard to guess contains:","Un mot de passe difficile à deviner contient les caractéristiques suivantes:"
Expand Down Expand Up @@ -1705,7 +1712,8 @@
"This message exceeds your daily email limit","Ce message dépasse votre limite quotidienne d'envoi de courriels"
"You’ve sent too many text messages.","Vous avez envoyé trop de messages texte."
"You can send more text messages after {} Eastern Time. To raise your daily limit, {contact_us}.","Vous pourrez envoyer d’autres messages texte après {} heures, heure de l’Est. Pour augmenter votre limite d’envoi quotidienne, {contact_us}."
"You can try sending these messages after {} Eastern Time. Check <a href="https://nrc.canada.ca/en/web-clock/" target="_blank">your current local time</a>.","Vous pourrez envoyer ces messages après {} heures, heure de l’Est. Comparez <a href="https://nrc.canada.ca/fr/horloge-web/" target="_blank">les heures officielles au Canada</a>."
"You can try sending these messages after {} Eastern Time. Check {}.","Vous pourrez envoyer ces messages après {} heures, heure de l’Est. Comparez {}."
"https://nrc.canada.ca/en/web-clock/","https://nrc.canada.ca/fr/horloge-web/"
"Attachment has virus","La pièce jointe contient un virus"
"Review reports","Examiner les rapports"
"Enter name of your group","Saisissez le nom de votre groupe"
Expand All @@ -1716,8 +1724,9 @@
"For example: Treasury Board of Canada Secretariat","Par exemple&nbsp;: Secrétariat du Conseil du Trésor du Canada"
"For example: Canadian Digital Service","Par exemple&nbsp;: Service numérique canadien"
"Not on list?","Vous ne trouvez pas?"
"Not on the list? Add your organization","Vous ne trouvez pas? Ajoutez votre organisation"
"Choose name from drop-down menu","Choisissez un nom dans le menu déroulant"
"Tech issue","Problème technique",
"Tech issue","Problème technique"
"Content or inbox issue","Problème de contenu ou de boîte de réception"
"In transit","Envoi en cours"
"Exceeds Protected A","Niveau supérieur à Protégé A"
Expand Down Expand Up @@ -1766,8 +1775,7 @@
"Annual maximum</br>(April 1 to March 31)","Maximum par exercice financier"
"To request a daily limit above {} emails, {}","Si vous désirez obtenir une limite quotidienne supérieure à {} courriels, veuillez {}"
"To request a daily limit above {} text messages, {}","Si vous désirez obtenir une limite quotidienne supérieure à {} messages texte, veuillez {}"
"You can try sending these messages after {} Eastern Time. Check your {}.","Vous pourrez envoyer ces messages après {} heures, heure de l’Est. Comparez {}"
"You can try sending this message after {} Eastern Time. Check your {}.","Vous pourrez envoyer ce message après {} heures, heure de l’Est. Comparez {}"
"You can try sending this message after {} Eastern Time. Check {}.","Vous pourrez envoyer ce message après {} heures, heure de l’Est. Comparez {}."
"your current local time","les heures officielles au Canada"
"You cannot send this email message today","Vous ne pouvez pas envoyer ce courriel aujourd’hui."
"You cannot send this text message today","Vous ne pouvez pas envoyer ce message texte aujourd’hui."
Expand All @@ -1776,12 +1784,16 @@
"of","de"
"Sent since 7 pm Eastern Time","Envoyé depuis 19 h, heure de l'Est"
"You are nearing the daily {} limit","Vous approchez de la limite quotidienne de {}"
"Below limit: ","Vous êtes en dessous de votre limite : "
"Near limit: ","Vous approchez de votre limite : "
"At limit: ","Vous avez atteint votre limite : "
"Daily usage","Utilisation quotidienne"
"Message limits reset each night at 7pm Eastern Time","Les limites d’envoi sont réinitialisées chaque soir à 19 h, heure de l’Est"
"Maximum 612 characters. Some messages may be too long due to custom content.","612 caractères au maximum. Certains messages peuvent être trop longs en raison de leur contenu personnalisé."
"Too many characters","Limite de caractère atteinte"
"New features","Nouvelles fonctionnalités"
"Your","Votre"
"your","votre"
"You are browsing templates. Create and copy template or add new folder.","Vous explorez les gabarits. Créer et copier un gabarit ou créer un nouveau dossier."
"Move templates to a new or existing folder","Déplacer les gabarits dans un dossier"
"You are selecting templates. Move templates into a new or existing folder.","Vous sélectionnez les gabarits. Déplacer les gabarits dans un dossier."
Expand Down Expand Up @@ -1918,7 +1930,7 @@
"Read and agree to the terms of use","Lisez et acceptez les conditions d’utilisation"
"Read and agree to continue","Lisez et acceptez les conditions d’utilisation"
"Agree follows terms of use","Accepter suite aux conditions d'utilisation"
"Priority","Envoi prioritaire",
"Priority","Envoi prioritaire"
"Bulk","Envoi de masse"
"Text message priority","Niveau de priorité des messages texte"
"Hide category","Visibilité de la catégorie"
Expand Down Expand Up @@ -2004,3 +2016,15 @@
"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"
"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 "
"Annual limit overview","Aperçu de la limite annuelle"
"Annual overview","Aperçu annuel"
"Usage report","Rapport d’utilisation"
"Fiscal year begins April 1, ","Réinitialisation le 1<sup>er</sup> avril "
"resets on April 1, ","Réinitialisation le 1<sup>er</sup> avril "
"Annual usage","Utilisation annuelle"
"resets at 7pm Eastern Time","Réinitialisation à 19 h, heure de l’Est"
"Visit usage report","Consulter le rapport d’utilisation"
"Month by month totals","Totaux mensuels"
1 change: 1 addition & 0 deletions babel.cfg
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[python: app/**.py]
[jinja2: app/templates/**.html]

0 comments on commit 5748737

Please sign in to comment.