File tree Expand file tree Collapse file tree
src/server/plugins/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,13 +178,13 @@ function ItemRepeat(
178178 const { name, title } = repeat . options
179179
180180 const values = page . getListFromState ( state )
181- const unit = values . length === 1 ? title : ` ${ title } s`
181+ const unit = values . length === 1 ? 'answer' : 'answers'
182182
183183 return {
184184 name,
185185 label : title ,
186- title : values . length ? ` ${ unit } added` : unit ,
187- value : values . length ? `You added ${ values . length } ${ unit } ` : '' ,
186+ title,
187+ value : `You have added ${ values . length } ${ unit } ` ,
188188 href : getPageHref ( page , options . path , {
189189 returnUrl : getPageHref ( page , page . getSummaryPath ( ) )
190190 } ) ,
Original file line number Diff line number Diff line change @@ -295,9 +295,9 @@ export class RepeatPageController extends QuestionPageController {
295295 ...viewModel ,
296296 context,
297297 backLink : this . getBackLink ( request , context ) ,
298- pageTitle : ` Are you sure you want to remove this ${ title } ?` ,
298+ pageTitle : ' Are you sure you want to remove this answer?' ,
299299 itemTitle : `${ title } ${ list . indexOf ( item ) + 1 } ` ,
300- buttonConfirm : { text : ` Remove ${ title } ` } ,
300+ buttonConfirm : { text : ' Remove' } ,
301301 buttonCancel : { text : 'Cancel' }
302302 } satisfies ItemDeletePageViewModel )
303303 }
@@ -431,11 +431,13 @@ export class RepeatPageController extends QuestionPageController {
431431 } )
432432 }
433433
434+ const unit = count === 1 ? 'answer' : 'answers'
435+
434436 return {
435437 ...this . viewModel ,
436438 backLink : this . getBackLink ( request , context ) ,
437439 repeatTitle : title ,
438- pageTitle : `You have added ${ count } ${ title } ${ count === 1 ? '' : 's' } ` ,
440+ pageTitle : `You have added ${ count } ${ unit } ` ,
439441 showTitle : true ,
440442 context,
441443 errors,
Original file line number Diff line number Diff line change 3636 }) }}
3737
3838 {{ govukButton({
39- text: "Add another " + repeatTitle ,
39+ text: "Add another" ,
4040 name: "action",
4141 value: "add-another",
4242 classes: "govuk-button--secondary",
You can’t perform that action at this time.
0 commit comments