From 75bbff4c9a175496b8771465287e06c46a805b7a Mon Sep 17 00:00:00 2001 From: Anik Brazeau <38330843+anikbrazeau@users.noreply.github.com> Date: Mon, 17 Jun 2024 14:25:24 -0400 Subject: [PATCH] fix: content for conditional logic feature (#3818) * missing translations CL * update translation of searchable list * missing translations * missing translations skip and update expandable text * update branchement to embranchement in fr * typo * clarify autoflow attempt * missing translation key for toast * switch declaration to avis and add missing translations * avis instead of declaration consistently * section name in french * fix expandable * colon --- __fixtures__/accessibilityTestForm.json | 2 +- __fixtures__/attestationTestForm.json | 2 +- __fixtures__/cdsIntakeTestForm.json | 2 +- __fixtures__/dynamicRowsTestForm.json | 2 +- __fixtures__/platformIntakeTestForm.json | 2 +- __fixtures__/testData.json | 2 +- __fixtures__/testDataWithGroups.json | 2 +- __fixtures__/textFieldTestForm.json | 2 +- __fixtures__/tsbContactTestForm.json | 2 +- __fixtures__/tsbDisableFooterGCBranding.json | 2 +- __fixtures__/validFormTemplate.json | 2 +- ...validFormTemplateWithHTMLInDynamicRow.json | 2 +- .../edit/logic/components/LogicNavigation.tsx | 2 +- .../edit/translate/components/DownloadCSV.tsx | 2 +- .../components/DownloadCSVWithGroups.tsx | 2 +- .../treeview/util/groupsToTreeData.ts | 2 +- .../treeview/util/initializeGroups.ts | 8 +-- i18n/translations/en/form-builder.json | 41 +++++++------ i18n/translations/fr/form-builder.json | 61 ++++++++++--------- 19 files changed, 72 insertions(+), 70 deletions(-) diff --git a/__fixtures__/accessibilityTestForm.json b/__fixtures__/accessibilityTestForm.json index 79f91ff80b..83272f9dba 100644 --- a/__fixtures__/accessibilityTestForm.json +++ b/__fixtures__/accessibilityTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14], "elements": [ diff --git a/__fixtures__/attestationTestForm.json b/__fixtures__/attestationTestForm.json index 49f1f226dd..7df6694f02 100644 --- a/__fixtures__/attestationTestForm.json +++ b/__fixtures__/attestationTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1], "elements": [ diff --git a/__fixtures__/cdsIntakeTestForm.json b/__fixtures__/cdsIntakeTestForm.json index 8536a107d7..9c21288cd4 100644 --- a/__fixtures__/cdsIntakeTestForm.json +++ b/__fixtures__/cdsIntakeTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2, 3, 4, 5, 6, 7], "elements": [ diff --git a/__fixtures__/dynamicRowsTestForm.json b/__fixtures__/dynamicRowsTestForm.json index 508e4fdec0..c23e4a3bb6 100644 --- a/__fixtures__/dynamicRowsTestForm.json +++ b/__fixtures__/dynamicRowsTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2, 3], "elements": [ diff --git a/__fixtures__/platformIntakeTestForm.json b/__fixtures__/platformIntakeTestForm.json index d065ee1f4c..590171d760 100644 --- a/__fixtures__/platformIntakeTestForm.json +++ b/__fixtures__/platformIntakeTestForm.json @@ -13,7 +13,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2, 3, 4, 5, 6, 7], "elements": [ diff --git a/__fixtures__/testData.json b/__fixtures__/testData.json index 25dcdf820e..728730cc87 100644 --- a/__fixtures__/testData.json +++ b/__fixtures__/testData.json @@ -10,7 +10,7 @@ "layout": [1, 2, 3, 4, 5, 6, 7, 8], "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "elements": [ { diff --git a/__fixtures__/testDataWithGroups.json b/__fixtures__/testDataWithGroups.json index 4bd2dda9fb..427a22ba8f 100644 --- a/__fixtures__/testDataWithGroups.json +++ b/__fixtures__/testDataWithGroups.json @@ -7,7 +7,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "confirmation": { "descriptionEn": "", diff --git a/__fixtures__/textFieldTestForm.json b/__fixtures__/textFieldTestForm.json index db222fe1b7..8941a6eaf2 100644 --- a/__fixtures__/textFieldTestForm.json +++ b/__fixtures__/textFieldTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2], "elements": [ diff --git a/__fixtures__/tsbContactTestForm.json b/__fixtures__/tsbContactTestForm.json index a2915c045a..9523ec58ff 100644 --- a/__fixtures__/tsbContactTestForm.json +++ b/__fixtures__/tsbContactTestForm.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1, 2, 3, 4, 5, 6, 7], "elements": [ diff --git a/__fixtures__/tsbDisableFooterGCBranding.json b/__fixtures__/tsbDisableFooterGCBranding.json index ffff3bd3ed..e39a4bdc15 100644 --- a/__fixtures__/tsbDisableFooterGCBranding.json +++ b/__fixtures__/tsbDisableFooterGCBranding.json @@ -9,7 +9,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "layout": [1], "elements": [ diff --git a/__fixtures__/validFormTemplate.json b/__fixtures__/validFormTemplate.json index 9ef5b307eb..68d7717d57 100644 --- a/__fixtures__/validFormTemplate.json +++ b/__fixtures__/validFormTemplate.json @@ -7,7 +7,7 @@ }, "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "confirmation": { "descriptionEn": "Confirmed", diff --git a/__fixtures__/validFormTemplateWithHTMLInDynamicRow.json b/__fixtures__/validFormTemplateWithHTMLInDynamicRow.json index 4fcdfecc42..6979465670 100644 --- a/__fixtures__/validFormTemplateWithHTMLInDynamicRow.json +++ b/__fixtures__/validFormTemplateWithHTMLInDynamicRow.json @@ -7,7 +7,7 @@ ], "privacyPolicy": { "descriptionEn": "Privacy statement", - "descriptionFr": "Déclaration de confidentialité" + "descriptionFr": "Avis de confidentialité" }, "elements": [ { diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/LogicNavigation.tsx b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/LogicNavigation.tsx index db57fbe8e7..551a419f0a 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/LogicNavigation.tsx +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/logic/components/LogicNavigation.tsx @@ -25,7 +25,7 @@ export const LogicNavigation = () => { const newGroups = autoFlowAllNextActions({ ...groups }, true); // forces overwrite of existing next actions replaceGroups(newGroups); flow.current?.redraw(); - toast.success("Auto flow applied"); + toast.success(t("logic.toastSuccess")); }; return ( diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSV.tsx b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSV.tsx index b083026a32..467fd1da20 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSV.tsx +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSV.tsx @@ -80,7 +80,7 @@ export const DownloadCSV = () => { if (form.privacyPolicy?.descriptionEn || form.privacyPolicy?.descriptionFr) { data.push([ - formatText("Privacy statement/Déclaration de confidentialité"), + formatText("Privacy statement/Avis de confidentialité"), formatText(form.privacyPolicy.descriptionEn), formatText(form.privacyPolicy.descriptionFr), ]); diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSVWithGroups.tsx b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSVWithGroups.tsx index f5cb6b84d6..4b6c22af15 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSVWithGroups.tsx +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/[id]/edit/translate/components/DownloadCSVWithGroups.tsx @@ -96,7 +96,7 @@ export const DownloadCSVWithGroups = () => { if (form.privacyPolicy?.descriptionEn || form.privacyPolicy?.descriptionFr) { data.push([ - formatText("Privacy statement/Déclaration de confidentialité"), + formatText("Privacy statement/Avis de confidentialité"), formatText(form.privacyPolicy.descriptionEn), formatText(form.privacyPolicy.descriptionFr), ]); diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/groupsToTreeData.ts b/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/groupsToTreeData.ts index 34313cccd1..e245f953d8 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/groupsToTreeData.ts +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/groupsToTreeData.ts @@ -63,7 +63,7 @@ export const groupsToTreeData = ( canMove: false, data: { titleEn: formGroups[key].titleEn || "Section title", - titleFr: formGroups[key].titleFr || "Section title", + titleFr: formGroups[key].titleFr || "Titre de section", descriptionEn: "", descriptionFr: "", }, diff --git a/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/initializeGroups.ts b/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/initializeGroups.ts index d0c248774b..56941f56e2 100644 --- a/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/initializeGroups.ts +++ b/app/(gcforms)/[locale]/(form administration)/form-builder/components/shared/right-panel/treeview/util/initializeGroups.ts @@ -33,8 +33,8 @@ export const initializeGroups = (form: FormProperties, allowGroups: boolean): Fo if (!form.groups.review) { form.groups.review = { name: "Review", - titleEn: "", - titleFr: "", + titleEn: "Review", + titleFr: "Révision", elements: [], nextAction: "end", }; @@ -43,8 +43,8 @@ export const initializeGroups = (form: FormProperties, allowGroups: boolean): Fo if (!form.groups.end) { form.groups.end = { name: "End", - titleEn: "", - titleFr: "", + titleEn: "End", + titleFr: "Fin", elements: [], }; } diff --git a/i18n/translations/en/form-builder.json b/i18n/translations/en/form-builder.json index 26d85d39aa..21a89d88b6 100644 --- a/i18n/translations/en/form-builder.json +++ b/i18n/translations/en/form-builder.json @@ -453,7 +453,7 @@ "paragraph": "Long answer", "phoneNumber": "Phone number", "placeHolderFormTitle": "Form title", - "previewingIn": "Previewing in", + "previewingIn": "Previewing in:", "previewDisabledForPublishedForm": "Preview and testing is disabled for published forms.", "privacyNoticeDescription": "
Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the Directive on privacy practices.
What to include in a privacy notice
You’re responsible for understanding your department or agency's responsibilities related to personal information. If you’re unsure how to proceed, we recommend contacting your access to information and privacy coordinator.
", "privacyStatement": "Privacy statement", @@ -674,7 +674,7 @@ "singleChoice": "Radio buttons", "start": "Start", "startErrorParse": "Failed to read form file", - "startFormIntro": "Add a description to your form to set expectations for those filling it out.", + "startFormIntro": "Add a description to your form to help set expectations", "startH2": "Design a form", "startH3": "Open a form file", "startP1": "Start with a blank form.", @@ -814,7 +814,7 @@ "addConditionalRules": { "modalTitle": "Add a rule to a question", "modalTitleEdit": "Edit rules", - "modalDescription": "Display additional input fields depending on the selection of a specific option. This applies to single choice, multiple choice, or dropdown list questions.", + "modalDescription": "Display additional input fields depending on the selection of a specific option. This applies to questions with radio buttons, checkboxes or dropdown options.", "optionTitle": "If option selected is:", "questionTitle": "Show question:", "addCustomRules": "Add a rule", @@ -828,8 +828,8 @@ "saved": "Saved", "opensInNewTab": "opens in a new tab", "rightPanel": { - "title": "Right Panel", - "openPanel": "Set up your form", + "title": "Right panel", + "openPanel": "Form set-up", "closePanel": "Close panel", "questions": "Questions", "logic": "Logic", @@ -845,13 +845,14 @@ "gotoSection": "Go to section", "questionTitle": "Question:", "sectionTitle": "Section:", - "translateTitle": "Section Title", + "translateTitle": "Section title", "addRule": "Add rule", "saveRule": "Save", - "saveNote": "Adding and saving a rule, turns off Auto-flow sections", - "resetRules": "Reset all rules", - "resetRulesHelp": "Reset all rules help", - "resetRulesDescription": "The autoflow feature will reset the progression between sections into a simple linear flow, overriding any existing branching rules that were applied.", + "saveNote": "Adding and saving a rule, turns off linear autoflow between sections.", + "resetRules": "Reset to linear flow", + "resetRulesHelp": "Reset help", + "resetRulesDescription": "This will remove logic and reset the progression between sections to a simple linear flow, overriding any existing branching rules that were applied.", + "toastSuccess": "Linear flow applied", "multiRulesWarning": { "text1": "The order and flow is set based on the rules applied.", "text2": "Linking the sections:", @@ -887,21 +888,21 @@ "privacy": { "beforeText": "You’re responsible for understanding your department or agency's responsibilities related to personal information. If you’re unsure how to proceed, we recommend contacting your access to information and privacy coordinator.
", "body": "Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the Directive on privacy practices.
What to include in a privacy notice
Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the Directive on privacy practices.
What to include in a privacy notice
Navigate the questions and sections using the arrow keys.
Drag and drop:
\nNavigate the questions and sections using the arrow keys.
Drag and drop:
\nAidez les personnes qui remplissent le formulaire à comprendre comment vous traitez leurs renseignements personnels, comme énoncé à la section 4.2.10 de la Directive sur les pratiques relatives à la protection de la vie privée.
Ce qu'il faut préciser dans un avis de confidentialité
C’est votre responsabilité de bien connaître les exigences de votre ministère ou organisme en matière de renseignements personnels. Si vous ne savez pas comment procéder, nous vous recommandons de contacter votre coordinateur·rice de l'accès à l'information et de la protection de la vie privée.
", - "privacyStatement": "Déclaration de confidentialité ", + "privacyStatement": "Avis de confidentialité ", "provideFeedback": "Aidez-nous à nous améliorer", "publish": "Publier", "published": "Publié", @@ -510,7 +510,7 @@ "richTextConfirmationTitle": "Message de confirmation", "richTextEditor": "Éditeur de texte enrichi", "richTextIntroTitle": "Introduction au formulaire", - "richTextPrivacyTitle": "Déclaration de confidentialité", + "richTextPrivacyTitle": "Avis de confidentialité", "save": "Enregistrer", "saveAndRequest": "Demander la capacité de publier", "saveDraft": "Enregistrer l’ébauche", @@ -674,7 +674,7 @@ "singleChoice": "Boutons radio", "start": "Commencer", "startErrorParse": "L’ouverture du fichier de formulaire a échoué", - "startFormIntro": "Ajoutez une description à votre formulaire pour définir les attentes des personnes qui le remplissent.", + "startFormIntro": "Ajoutez une description à votre formulaire pour aider à définir les attentes", "startH2": "Créer un formulaire", "startH3": "Ouvrir un formulaire", "startP1": "Commencez à partir de zéro.", @@ -814,7 +814,7 @@ "addConditionalRules": { "modalTitle": "Ajouter une règle à une question", "modalTitleEdit": "Modifier les règles", - "modalDescription": "Afficher des champs de saisie supplémentaires en fonction de la sélection d'une option spécifique. Ceci s'applique aux questions à choix unique, à choix multiples ou à liste déroulante.", + "modalDescription": "Afficher des champs de saisie supplémentaires en fonction de la sélection d'une option spécifique. Ceci s'applique aux questions avec boutons radio, cases à cocher ou liste déroulante.", "optionTitle": "Si l'option sélectionnée est :", "questionTitle": "Afficher la question :", "addCustomRules": "Ajouter une règle", @@ -828,8 +828,8 @@ "saved": "Enregistré", "opensInNewTab": "ouvre un nouvel onglet", "rightPanel": { - "title": "[FR]Right Panel", - "openPanel": "[FR]Set up your form", + "title": "Panneau de droite", + "openPanel": "Configuration du formulaire", "closePanel": "Fermer le panneau", "questions": "Questions", "logic": "Logique", @@ -845,13 +845,14 @@ "gotoSection": "Aller à la section", "questionTitle": "Question :", "sectionTitle": "Section :", - "translateTitle": "Section Titre", + "translateTitle": "Titre de section", "addRule": "Ajouter une régle", - "resetRules": "Réinitialiser toutes les règles", - "resetRulesHelp": "[FR]Reset all rules help", - "resetRulesDescription": "La fonction de flux automatique réinitialise la progression entre les sections en un flux linéaire simple, remplaçant ainsi toutes les règles de logique de branchement qui s'appliquent.", "saveRule": "Enregistrer", - "saveNote": "Ajouter et enregistrer une règle, désactive le ", + "saveNote": "Ajouter et enregistrer une règle, désactive la fonction de flux linéaire automatique entre les sections.", + "resetRules": "Réinitialisation au flux linéaire", + "resetRulesHelp": "Aide pour la réinitialisation", + "resetRulesDescription": "Cette fonction réinitialisera la progression entre les sections en un flux linéaire simple, remplaçant ainsi toutes les règles d'embranchements qui s'appliquent.", + "toastSuccess": "Flux linéaire appliqué", "multiRulesWarning": { "text1": "L'ordre et le flux sont définis en fonction des règles appliquées.", "text2": "Relier les sections :", @@ -869,7 +870,7 @@ }, "groups": { "newSection": "Nouvelle section", - "sectionNameInput": "Section name [FR]", + "sectionNameInput": "Nom de ela section", "addSection": "Ajouter une section", "treeAriaLabel": "Sections Formulaires GC", "addSectionPlaceholder": "Ajouter un nom à la section", @@ -882,19 +883,19 @@ "sectionTitle": "Titre de la section", "groupDeleted": "Section supprimée", "groupSuccessfullyDeleted": "{{group}} a été supprimé", - "editSection": "[FR]Edit section {{name}}", - "editRules": "[FR]Edit rules for section {{name}}", + "editSection": "Modifier la section {{name}}", + "editRules": "Modifier les règles de la section {{name}}", "privacy": { "beforeText": "C’est votre responsabilité de bien connaître les exigences de votre ministère ou organisme en matière de renseignements personnels. Si vous ne savez pas comment procéder, nous vous recommandons de contacter votre coordinateur·rice de l'accès à l'information et de la protection de la vie privée.
", "body": "Aidez les personnes qui remplissent le formulaire à comprendre comment vous traitez leurs renseignements personnels, comme énoncé à la section 4.2.10 de la Directive sur les pratiques relatives à la protection de la vie privée.
Ce qu'il faut préciser dans un avis de confidentialité
Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the Directive on privacy practices.
What to include in a privacy notice