Skip to content

Commit 7a041da

Browse files
authored
Add plural formatting for STARTER_PACK_MAX_SIZE toast (#8000)
* add plural formatting for starter pack max size toast * tweak * try again
1 parent ffbcbf8 commit 7a041da

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/screens/StarterPack/Wizard/State.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react'
22
import {AppBskyGraphDefs, AppBskyGraphStarterpack} from '@atproto/api'
33
import {GeneratorView} from '@atproto/api/dist/client/types/app/bsky/feed/defs'
4-
import {msg} from '@lingui/macro'
4+
import {msg, plural} from '@lingui/macro'
55

66
import {STARTER_PACK_MAX_SIZE} from '#/lib/constants'
77
import {useSession} from '#/state/session'
@@ -73,8 +73,9 @@ function reducer(state: State, action: Action): State {
7373
case 'AddProfile':
7474
if (state.profiles.length > STARTER_PACK_MAX_SIZE) {
7575
Toast.show(
76-
msg`You may only add up to ${STARTER_PACK_MAX_SIZE} profiles`
77-
.message ?? '',
76+
msg`You may only add up to ${plural(STARTER_PACK_MAX_SIZE, {
77+
other: `${STARTER_PACK_MAX_SIZE} profiles`,
78+
})}`.message ?? '',
7879
'info',
7980
)
8081
} else {

0 commit comments

Comments
 (0)