From 9319cfad8e6f9f747377fe87acdae60d13a2d28e Mon Sep 17 00:00:00 2001 From: trbKnl Date: Thu, 7 Mar 2024 10:46:30 +0100 Subject: [PATCH] added lables for questionnaire.tsx --- .../react/ui/prompts/questionnaire.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/framework/visualisation/react/ui/prompts/questionnaire.tsx b/src/framework/visualisation/react/ui/prompts/questionnaire.tsx index a68727d9..7fd9171e 100644 --- a/src/framework/visualisation/react/ui/prompts/questionnaire.tsx +++ b/src/framework/visualisation/react/ui/prompts/questionnaire.tsx @@ -1,7 +1,8 @@ import React from 'react'; import { ReactFactoryContext } from '../../factory' import { Weak } from '../../../../helpers' -import { LabelButton, PrimaryButton } from '../elements/button' +import TextBundle from '../../../../text_bundle' +import { PrimaryButton } from '../elements/button' import { PropsUIPromptQuestionnaire } from '../../../../types/prompts' import { Translator } from '../../../../translator' import { isPropsUIQuestionMultipleChoice } from '../../../../types/elements' @@ -74,15 +75,16 @@ export const Questionnaire = (props: Props): JSX.Element => { {renderQuestions()}
- - +
); + function prepareCopy (locale: string): Copy { return { - description: Translator.translate(description, locale) + description: Translator.translate(description, locale), + continueLabel: Translator.translate(continueLabel, locale) } } }; @@ -90,4 +92,10 @@ export const Questionnaire = (props: Props): JSX.Element => { interface Copy { description: string + continueLabel: string } + + +const continueLabel = new TextBundle() + .add('en', 'Continue') + .add('nl', 'Verder')