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 various translations #1997

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

amazingphilippe
Copy link
Contributor

Summary | Résumé

This fixes missing translatiosn identified here

A few techniques used based on context:

  • remove translation when not needed. Ex we dont need to translate a "value" attribute, or html strings
  • add translation
  • edit the translation reference in the code.

Test instructions | Instructions pour tester la modification

I need to provide a list of pages to look at. Most is visible text, some are hidden aria attributes.

Copy link

Copy link
Member

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work, thank you for this!

There are still 4 missing, I'll see if I can fix them up:

missing from fr.csv : app/templates/components/remaining-messages-summary.html:87 : "Below limit: "
missing from fr.csv : app/templates/components/remaining-messages-summary.html:85 : "Near limit: "
missing from fr.csv : app/templates/components/remaining-messages-summary.html:83 : "At limit: "
missing from fr.csv : app/templates/views/service-settings/email_from.html:26 : "Maximum 64 characters with no spaces. Characters can include letters, numbers, dots, dashes, and

@andrewleith
Copy link
Member

Updating the branch should fix that test failure, trying now...

Copy link
Member

@andrewleith andrewleith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think we are all set now!

@@ -104,9 +104,9 @@

{%- if session["userlang"] == "fr" -%}
{%- if count <= 1 -%}
{{ _('addresse courriel problématique') }}
addresse courriel problématique
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, works as expected

@@ -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 %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works as expected

@@ -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>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, link still works

@@ -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">{{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested, link still works

@@ -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.') %}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove this one and replace it with the "fiscal year" equivalent above

@@ -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 {}"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷

@@ -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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -1716,6 +1724,7 @@
"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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

"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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -1766,8 +1775,9 @@
"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 these messages after {} Eastern Time. Check your {}.","Vous pourrez envoyer ces messages après {} heures, heure de l’Est. Comparez {}."
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove the ones with "Check your {}". We use the one with just "Check {}"
Otherwise these work

Comment on lines 1789 to 1791
"Below limit: ","En dessous de la limite : "
"Near limit: ","Limite presqu’atteinte : "
"At limit: ","Limite atteinte : "
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

@@ -2004,3 +2018,5 @@
"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"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works

Copy link
Contributor Author

@amazingphilippe amazingphilippe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Went through all instances of missing strings. Looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants