This repository was archived by the owner on Mar 13, 2025. It is now read-only.
File tree 1 file changed +9
-5
lines changed
src/routes/WorkPeriods/components/PeriodsSelectionMessage
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
11
11
} from "store/selectors/workPeriods" ;
12
12
import { toggleWorkingPeriodsAll } from "store/actions/workPeriods" ;
13
13
import styles from "./styles.module.scss" ;
14
+ import { formatPlural } from "utils/formatters" ;
14
15
15
16
/**
16
17
* Displays messages about the number of selected periods and selection controls.
@@ -36,17 +37,20 @@ const PeriodsSelectionMessage = ({ className }) => {
36
37
{ isSelectedVisible && totalCount > pageSize && (
37
38
< span className = { styles . message } >
38
39
{ isSelectedAll
39
- ? `All ${ totalCount } Records are selected. `
40
- : selectedCount < pageSize
41
- ? `${ selectedCount } Records on this page are selected. `
42
- : `All ${ pageSize } Records on this page are selected. ` }
40
+ ? `All ${ formatPlural ( totalCount , "record" ) } are selected. `
41
+ : `${ selectedCount < pageSize ? "" : "All" } ${ formatPlural (
42
+ selectedCount ,
43
+ "record"
44
+ ) } on this page are selected. `}
43
45
< span
44
46
className = { styles . button }
45
47
onClick = { onBtnClick }
46
48
role = "button"
47
49
tabIndex = { 0 }
48
50
>
49
- { isSelectedAll ? "Deselect" : `Select all ${ totalCount } Records` }
51
+ { isSelectedAll
52
+ ? "Deselect"
53
+ : `Select all ${ formatPlural ( totalCount , "record" ) } ` }
50
54
</ span >
51
55
</ span >
52
56
) }
You can’t perform that action at this time.
0 commit comments