Skip to content

Commit

Permalink
Merge pull request #435 from communitiesuk/FS-3849-OptionalTextSummaries
Browse files Browse the repository at this point in the history
Optional text for welsh in summary
  • Loading branch information
AbuNavsa authored Dec 5, 2023
2 parents 847b5ae + f5e8510 commit 28e5e73
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions runner/src/server/plugins/engine/models/viewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,15 @@ function Item(
let componentLabel = component.localisedString(component.title);

if (
component.options.required == false &&
!componentLabel.toLowerCase().endsWith("(optional)")
component.options.required === false &&
!componentLabel.toLowerCase().endsWith("(optional)") &&
!componentLabel.toLowerCase().endsWith("(dewisol)")
) {
componentLabel += " (optional)";
if (model?.def?.metadata?.isWelsh) {
componentLabel += " (dewisol)";
} else {
componentLabel += " (optional)";
}
}

return {
Expand Down

0 comments on commit 28e5e73

Please sign in to comment.