Skip to content

Commit

Permalink
fix: content for conditional logic feature (#3818)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
anikbrazeau authored Jun 17, 2024
1 parent 745f222 commit 75bbff4
Show file tree
Hide file tree
Showing 19 changed files with 72 additions and 70 deletions.
2 changes: 1 addition & 1 deletion __fixtures__/accessibilityTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/attestationTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"layout": [1],
"elements": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/cdsIntakeTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/dynamicRowsTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"layout": [1, 2, 3],
"elements": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/platformIntakeTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/testData.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/testDataWithGroups.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"confirmation": {
"descriptionEn": "",
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/textFieldTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"layout": [1, 2],
"elements": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/tsbContactTestForm.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/tsbDisableFooterGCBranding.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"layout": [1],
"elements": [
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/validFormTemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"confirmation": {
"descriptionEn": "Confirmed",
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/validFormTemplateWithHTMLInDynamicRow.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"privacyPolicy": {
"descriptionEn": "Privacy statement",
"descriptionFr": "Déclaration de confidentialité"
"descriptionFr": "Avis de confidentialité"
},
"elements": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: "",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
};
Expand All @@ -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: [],
};
}
Expand Down
41 changes: 21 additions & 20 deletions i18n/translations/en/form-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "<p className=\"mb-4\">Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the <a href=\"https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=18309\" target=\"_blank\">Directive on privacy practices</a>.</p><p><strong>What to include in a privacy notice</strong></p><ul><li>What personal information is being collected and why.</li><li>What legal or program authorities you have to collect information.</li><li>How their information will be used, shared, stored, and retained.</li><li>How people can access or change their personal information and file complaints.</li></ul><p>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 <a href=\"https://www.tbs-sct.canada.ca/ap/atip-aiprp/coord-eng.asp\" target=\"_blank\">access to information and privacy coordinator.</a></p>",
"privacyStatement": "Privacy statement",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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:",
Expand Down Expand Up @@ -887,21 +888,21 @@
"privacy": {
"beforeText": "<p>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 <a href=\"https://www.tbs-sct.canada.ca/ap/atip-aiprp/coord-eng.asp\" target=\"_blank\">access to information and privacy coordinator.</a></p>",
"body": "<p className=\"mb-4\">Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the <a href=\"https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=18309\" target=\"_blank\">Directive on privacy practices</a>.</p><p><strong>What to include in a privacy notice</strong></p><ul><li>What personal information is being collected and why.</li><li>What legal or program authorities you have to collect information.</li><li>How their information will be used, shared, stored, and retained.</li><li>How people can access or change their personal information and file complaints.</li></ul>",
"description": "Add a privacy notice to your form to inform users how you handle their personal information.",
"summary": "What to include in a privacy notice"
"description": " What to include in a privacy notice",
"summary": "Add a privacy statement to outline how you handle personal information"
},
"confirmation": {
"beforeText": "The confirmation message will appear on a new page once the form has been submitted.",
"body": "<p className=\"mb-4\">Help people filling out the form understand how you’re handling their personal information, as outlined in Section 4.2.10 of the <a href=\"https://www.tbs-sct.canada.ca/pol/doc-eng.aspx?id=18309\" target=\"_blank\">Directive on privacy practices</a>.</p><p><strong>What to include in a privacy notice</strong></p><ul><li>What personal information is being collected and why.</li><li>What legal or program authorities you have to collect information.</li><li>How their information will be used, shared, stored, and retained.</li><li>How people can access or change their personal information and file complaints.</li></ul>",
"description": "Add a privacy notice to your form to inform users how you handle their personal information.",
"summary": "What to include in a confirmation message"
"body": "Some useful things you can add to the confirmation are:",
"description": "Add a confirmation message",
"summary": "Add a confirmation message"
},
"treeView": {
"emptyPageTextElement": "Empty page text",
"emptyFormElement": "Empty form queston element",
"emptyFormElement": "Empty form question element",
"keyboardNav": {
"label": "Keyboard shortcuts",
"body": "<p className=\"mb-4\">Navigate the questions and sections using the arrow keys.</p><p><strong>Drag and drop:</strong></p>\n<ul><li>control + D to pick up and item</li><li>arrow keys to drag the item</li><li>enter key to drop the item</li></ul>"
"body": "<p className=\"mb-4\">Navigate the questions and sections using the arrow keys.</p><p><strong>Drag and drop:</strong></p>\n<ul><li>control + D to pick up an item</li><li>arrow keys to drag the item</li><li>enter key to drop the item</li></ul>"
}
}
},
Expand All @@ -914,8 +915,8 @@
"questions": "Skip to Questions editor",
"translate": "Skip to Translations editor",
"logic": "Skip to Logic editor",
"questionsSetup": "Skip to Questions setup",
"translateSetup": "Skip to Translations setup",
"logicSetup": "Skip to Logic setup"
"questionsSetup": "Skip to Questions set-up",
"translateSetup": "Skip to Translations set-up",
"logicSetup": "Skip to Logic set-up"
}
}
Loading

0 comments on commit 75bbff4

Please sign in to comment.