Skip to content

Commit 664e6ea

Browse files
authored
Merge pull request #7247 from Sage/FE-7111
fix(form): correct pluralisation on form summary when single error and warning
2 parents ef41bcc + c3d3fd4 commit 664e6ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/form/form-test.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,7 @@ export const FullWidthWithLeftAndRight = () => {
527527
Other
528528
</Button>
529529
}
530-
errorCount={3}
530+
errorCount={1}
531531
warningCount={2}
532532
>
533533
<Textbox label="Textbox" />

src/locales/en-gb.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const enGB: Locale = {
7171
(errors, warnings, type) => {
7272
const errorPlural = isSingular(errors) ? "error" : "errors";
7373
const warningPlural = isSingular(warnings) ? "warning" : "warnings";
74-
const isErrorPlural = isSingular(errors) && !warnings ? "is" : "are";
74+
const isErrorPlural = isSingular(errors) ? "is" : "are";
7575
const isWarningPlural = isSingular(warnings) ? "is" : "are";
7676

7777
if (errors && warnings && type === "warning") {

0 commit comments

Comments
 (0)