Skip to content

Commit

Permalink
fix: Change "sections" to "pages" throughout (#3980)
Browse files Browse the repository at this point in the history
pages rather than sections for user comprehension
  • Loading branch information
anikbrazeau authored Jul 10, 2024
1 parent 74c33e4 commit 4d27c99
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export const ConfirmationTitle = ({ language }: { language: Language }) => {

{getGroupsEnabled() && (
<div className="mb-2 inline-block rounded-md border-1 border-slate-500 bg-slate-50 px-2 py-1 text-slate-500">
{t("confirmation.sectionTitle")}
{t("confirmation.pageTitle")}
</div>
)}
<h2 className="mt-0 text-2xl text-slate-500 laptop:mt-0">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ export const SectionTitle = ({ groupTitle, groupId }: { groupTitle: string; grou
ref={groupNameRef}
wrapperClassName="w-full mr-5 mt-2 laptop:mt-0 font-bold laptop:text-3xl"
className="font-bold placeholder:text-slate-500 laptop:text-3xl"
placeholder={t("groups.sectionTitle")}
placeholder={t("groups.pageTitle")}
value={groupTitle}
onBlur={handleOnBlur}
onChange={handleChange}
{...getLocalizationAttribute()}
ariaLabel={t("groups.sectionTitle")}
ariaLabel={t("groups.pageTitle")}
/>
);
};
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const GroupNode = (node: NodeProps) => {
"absolute right-[-20px] top-[-20px] cursor-pointer outline-offset-8 outline-slate-800 hover:scale-125 rounded-full"
)}
>
<QuestionRuleSvg title={t("groups.editSection", { name: node.data.label.name })} />
<QuestionRuleSvg title={t("groups.editPage", { name: node.data.label.name })} />
</button>
)}
{!node.data.children.length && <div className="min-h-[50px] min-w-[200px]"></div>}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const Legend = async ({ lang }: { lang: Language }) => {
<span className="inline-block pr-4">
<LogicSectionArrowIcon />
</span>
{t("logic.legend.section")}
{t("logic.legend.page")}
</div>
<div className="text-base italic">
<span className="inline-block pr-4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const TranslateWithGroups = () => {

<div>
<SectionTitle>
{t("logic.sectionTitle")} <em>{t("logic.start")}</em>
{t("logic.pageTitle")} <em>{t("logic.start")}</em>
</SectionTitle>
</div>

Expand Down Expand Up @@ -411,7 +411,7 @@ export const TranslateWithGroups = () => {
return (
<div key={groupKey}>
<SectionTitle>
{t("logic.sectionTitle")} <em>{groupName}</em>
{t("logic.pageTitle")} <em>{groupName}</em>
</SectionTitle>
<GroupSection
group={thisGroup}
Expand Down Expand Up @@ -439,7 +439,7 @@ export const TranslateWithGroups = () => {
{/* CONFIRMATION */}
<section>
<SectionTitle>
{t("logic.sectionTitle")} <em>{t("logic.end")}</em>
{t("logic.pageTitle")} <em>{t("logic.end")}</em>
</SectionTitle>
<fieldset>
<FieldsetLegend>{t("confirmationMessage")}</FieldsetLegend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ export const SectionNameInput = React.forwardRef<Ref, Props>((props, ref) => {
disabled && "!bg-gray-soft cursor-default",
!disabled && "border-1 border-[#1B00C2] hover:border-1 hover:border-gray-default"
)}
aria-label={t("groups.sectionNameInput", { ns: "form-builder" })}
aria-label={t("groups.pageNameInput", { ns: "form-builder" })}
value={value}
placeholder={t("groups.newSection", { ns: "form-builder" })}
placeholder={t("groups.newPage", { ns: "form-builder" })}
onChange={(e) => {
const val = e.target.value;
tree?.current?.renameItem(groupId, e.target.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const GroupSelect = ({
<div className="mb-4">
<label className="mb-2 block text-sm" id={labelId}>
{selected === "exit" && <span className="sr-only">{t("disabled")}</span>}{" "}
{t("logic.gotoSection")}
{t("logic.gotoPage")}
</label>
<select
disabled={selected === "exit"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const SectionName = ({

return sectionName ? (
<h3 className="mb-0 ml-2 block text-sm font-normal">
{t("logic.sectionTitle", { ns: "form-builder" })} <strong> {sectionName}</strong>
{t("logic.pageTitle", { ns: "form-builder" })} <strong> {sectionName}</strong>
</h3>
) : null;
};
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const EditableInput = ({
<input
{...context.interactiveElementProps}
type="text"
placeholder={isSection ? t("groups.addSectionPlaceholder") : ""}
placeholder={isSection ? t("groups.addPagePlaceholder") : ""}
autoFocus
className="ml-12 w-5/6 rounded-md border-2 border-slate-950 p-2"
value={name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const ControlledTree: ForwardRefRenderFunction<unknown, TreeDataProviderProps> =
const { getTitle } = useElementTitle();
const { autoFlowAll } = useAutoFlowIfNoCustomRules();

const newSectionText = t("groups.newSection");
const newSectionText = t("groups.newPage");

const addSection = () => {
const id = uuid();
Expand Down Expand Up @@ -295,7 +295,7 @@ const ControlledTree: ForwardRefRenderFunction<unknown, TreeDataProviderProps> =
>
<AddIcon
className="hover:fill-white focus:fill-white"
title={t("groups.addSection")}
title={t("groups.addPage")}
/>
</Button>
</label>
Expand Down
58 changes: 29 additions & 29 deletions i18n/translations/en/form-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -865,63 +865,63 @@
"logic": "Logic",
"translation": "Translations",
"treeView": {
"addSection": "New section"
"addPage": "New page"
},
"loadTab": "Loaded {{tabPanelLabel}} editor"
},
"logic": {
"heading": "Logic",
"description": "Apply conditional rules to sections with radio buttons, checkboxes, or a dropdown.",
"description": "Apply branching logic between form pages with questions that have radio buttons, checkboxes, or a dropdown.",
"clear": "Remove",
"gotoSection": "Go to section",
"gotoPage": "Go to page",
"questionTitle": "Question:",
"sectionTitle": "Section:",
"translateTitle": "Section title",
"pageTitle": "Page:",
"translateTitle": "Page title",
"addRule": "Add rule",
"saveRule": "Save",
"saveNote": "Adding and saving a rule, turns off linear autoflow between sections.",
"saveNote": "Adding branching turns off linear autoflow between form pages.",
"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.",
"resetRulesDescription": "This will remove logic and reset the progression between pages to a simple linear flow, overriding any existing branching that were applied.",
"toastSuccess": "Linear flow applied",
"multiRulesWarning": {
"text1": "The order and flow is set based on the rules applied.",
"text2": "Linking the sections:",
"text3": "To link the sections, you must remove the rules applied to form elements."
"text2": "Connecting pages:",
"text3": "To connect these pages, you must remove the rules applied to form elements."
},
"choiceSelect": {
"selectOption": "Select an option",
"catchAllOption": "For any other value"
},
"groupSelect": {
"default": "Select a section",
"catchAllGroup": "Pour toute autre valeur"
"default": "Select a page",
"catchAllGroup": "For remaining values"
},
"actionsSaved": "Actions saved",
"legend": {
"section": "Apply a branching rule to a section",
"option": "Apply conditional rules to questions with selectable options"
"page": "Apply branching rules to pages",
"option": "Apply display rules to questions with selectable options"
},
"exit": {
"convertText": "Convert section",
"convertText": "Convert page",
"checkboxLabel": "Exit the form",
"nodeIconLabel": "Exit",
"offboardNodeContent": {
"content": "<Content>",
"exitButton": "Back to the start"
},
"exitPanel": {
"title1": "Exit section",
"title1": "Exit page",
"title2": "Ineligible to continue filling out the form",
"description": "Exit sections link users back to the start of the form.",
"description": "Exit pages link people filling out the form back to the start of the form.",
"buttonLabel": "Remove"
}
},
"exitBadge": "Exit",
"exitButtonElement": {
"description": "Help people exiting your form have a path forward.",
"list": {
"title": "What to include in the exit section",
"title": "What to include in an exit page",
"item1": "Links to other relevant forms or web pages",
"item2": "Next steps in the process or guidance on form requirements",
"item3": "Contact information to follow up or learn more about the form"
Expand All @@ -931,21 +931,21 @@
}
},
"groups": {
"newSection": "New section",
"sectionNameInput": "Section name",
"addSection": "Add section",
"addSectionPlaceholder": "Add a section name",
"treeAriaLabel": "GC Forms sections",
"newPage": "New page",
"pageNameInput": "Page name",
"addPage": "Add page",
"addPagePlaceholder": "Add a page name",
"treeAriaLabel": "GC Forms pages",
"addElement": {
"empty": {
"title": "Empty section",
"title": "Empty page",
"text1": "No form elements have been added."
}
},
"sectionTitle": "Section title",
"groupDeleted": "Section deleted",
"editSection": "Edit section {{name}}",
"editRules": "Edit rules for section {{name}}",
"pageTitle": "Page title",
"groupDeleted": "Page deleted",
"editPage": "Edit page {{name}}",
"editRules": "Edit rules for page {{name}}",
"groupSuccessfullyDeleted": "{{group}} successfully deleted",
"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>",
Expand All @@ -964,13 +964,13 @@
"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 an 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 pages 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>"
}
}
},
"confirmation": {
"title": "Your form has been submitted",
"sectionTitle": "Section title"
"pageTitle": "Page title"
},
"next": "Continue",
"skipLink": {
Expand Down
58 changes: 29 additions & 29 deletions i18n/translations/fr/form-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -865,63 +865,63 @@
"logic": "Logique",
"translation": "Traductions",
"treeView": {
"addSection": "Nouvelle section"
"addPage": "Nouvelle page"
},
"loadTab": "Éditeur de {{tabPanelLabel}}"
},
"logic": {
"heading": "Logique",
"description": "Appliquer des règles conditionnelles aux sections comportant des boutons radio, des cases à cocher ou une liste déroulante.",
"description": "Appliquer de la logic d'embranchement entre les pages du formulaire ayant des questions avec des boutons radio, des cases à cocher ou une liste déroulante.",
"clear": "Enlever",
"gotoSection": "Aller à la section",
"gotoPage": "Aller à la page",
"questionTitle": "Question :",
"sectionTitle": "Section :",
"translateTitle": "Titre de section",
"pageTitle": "Page :",
"translateTitle": "Titre de la page",
"addRule": "Ajouter une régle",
"saveRule": "Enregistrer",
"saveNote": "Ajouter et enregistrer une règle, désactive la fonction de flux linéaire automatique entre les sections.",
"saveNote": "Ajouter des embranchements désactive la fonction de flux linéaire automatique entre les pages du formulaire.",
"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.",
"resetRulesDescription": "Cette fonction réinitialisera la progression entre les pages en un flux linéaire simple, remplaçant ainsi tous les 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 :",
"text3": "Pour relier les section, vous devez enlever les règles appliquées aux éléments du formulaire."
"text2": "Relier les pages :",
"text3": "Pour relier ces pages, vous devez enlever les règles appliquées aux éléments du formulaire."
},
"choiceSelect": {
"selectOption": "Sélectionner une option",
"catchAllOption": "Pour toute autre option"
"catchAllOption": "Pour les valeurs restantes"
},
"groupSelect": {
"default": "Sélectionner une section",
"default": "Sélectionner une page",
"catchAllGroup": "Pour toute autre valeur"
},
"actionsSaved": "Actions enregistrées",
"legend": {
"section": "Appliquer une règle d'embranchement à une section",
"option": "Appliquer des règles conditionnelles aux questions ayant des options à sélectionner"
"page": "Appliquer les règles d'embranchement aux pages",
"option": "Appliquer les règles d'affichage aux questions ayant des options à sélectionner"
},
"exit": {
"convertText": "Convertir la section",
"convertText": "Convertir la page",
"checkboxLabel": "Quitter le formulaire",
"nodeIconLabel": "Sortie",
"offboardNodeContent": {
"content": "<Content>",
"exitButton": "Retourner au départ"
},
"exitPanel": {
"title1": "Section de sortie",
"title1": "Page de sortie",
"title2": "Inadmissible de continuer à remplir le formulaire",
"description": "Les sections de sortie renvoient les utilisateurs au début du formulaire.",
"description": "Les pages de sortie renvoient les personnes qui remplissent le formulaire au début du formulaire.",
"buttonLabel": "Supprimer"
}
},
"exitBadge": "Sortie",
"exitButtonElement": {
"description": "Aidez les personnes qui quittent votre formulaires à avoir un moyen d'aller de l'avant.",
"list": {
"title": "Ce que vous pouvez inclure dans la section de sortie",
"title": "Ce que vous pouvez inclure dans une page de sortie",
"item1": "Liens vers d'autres formulaires ou pages Web pertinents",
"item2": "Prochaines étapes du processus ou conseils sur les exigences du formulaire",
"item3": "Informations de contact pour un suivi ou pour en savoir plus sur le formulaire"
Expand All @@ -931,22 +931,22 @@
}
},
"groups": {
"newSection": "Nouvelle section",
"sectionNameInput": "Nom de la section",
"addSection": "Ajouter une section",
"treeAriaLabel": "Sections Formulaires GC",
"addSectionPlaceholder": "Ajouter un nom à la section",
"newPage": "Nouvelle page",
"pageNameInput": "Nom de la page",
"addPage": "Ajouter une page",
"treeAriaLabel": "Pages Formulaires GC",
"addPagePlaceholder": "Ajouter un nom à la page",
"addElement": {
"empty": {
"title": "Section vide",
"title": "Page vide",
"text1": "Aucun élément de formulaire n'a été ajouté."
}
},
"sectionTitle": "Titre de la section",
"groupDeleted": "Section supprimée",
"pageTitle": "Titre de la page",
"groupDeleted": "Page supprimée",
"groupSuccessfullyDeleted": "{{group}} a été supprimé",
"editSection": "Modifier la section {{name}}",
"editRules": "Modifier les règles de la section {{name}}",
"editPage": "Modifier la page {{name}}",
"editRules": "Modifier les règles de la page {{name}}",
"privacy": {
"beforeText": "<p>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 <a href=\"https://www.tbs-sct.canada.ca/ap/atip-aiprp/coord-fra.asp\" target=\"_blank\">coordinateur·rice de l'accès à l'information et de la protection de la vie privée</a>.</p>",
"body": "<p className=\"mb-4\">Aidez les personnes qui remplissent le formulaire à comprendre comment vous traitez leurs renseignements personnels, comme énoncé à la section 4.2.10 de la <a href=\"https://www.tbs-sct.canada.ca/pol/doc-fra.aspx?id=18309\" target=\"_blank\">Directive sur les pratiques relatives à la protection de la vie privée</a>.</p><p><strong>Ce qu'il faut préciser dans un avis de confidentialité</strong></p><ul><li>Les renseignements personnels qui sont recueillis et les fins de la collecte.</li><li>Les autorisations légales ou de programmes dont vous disposez.</li><li>Les façons dont les reseignements seront utilisés, partagés, stockés et conservés.</li><li>Les droits d’accès ou de correction des renseignements personnels et les droits de déposer une plainte.</li></ul>",
Expand All @@ -964,13 +964,13 @@
"emptyFormElement": "Élément de question sans contenu",
"keyboardNav": {
"label": "Raccourcis clavier",
"body": "<p className=\"mb-4\">Naviguer les questions et les sections à l'aide des touches fléchées.</p><p><strong>Glisser-déposer :</strong></p>\n<ul><li>Contrôle + D pour prendre un élément</li><li>touches fléchées pour faire glisser l'élément</li><li>Appuyer Entrée pour déposer l'élément</li></ul>"
"body": "<p className=\"mb-4\">Naviguer les questions et les pages à l'aide des touches fléchées.</p><p><strong>Glisser-déposer :</strong></p>\n<ul><li>Contrôle + D pour prendre un élément</li><li>touches fléchées pour faire glisser l'élément</li><li>Appuyer Entrée pour déposer l'élément</li></ul>"
}
}
},
"confirmation": {
"title": "Votre formulaire a été soumis",
"sectionTitle": "Titre de la section"
"pageTitle": "Titre de la page"
},
"next": "Continuer",
"skipLink": {
Expand Down

0 comments on commit 4d27c99

Please sign in to comment.