Fix invalid zero plural category and add plural formatting (#10722)

This commit is contained in:
surfdude29
2026-06-04 07:50:56 +01:00
committed by GitHub
parent ad4591eb29
commit a19d652a39
+6 -7
View File
@@ -411,7 +411,6 @@ function Header({
count?: number
hasMoreRequests?: boolean
}) {
const {t: l} = useLingui()
return (
<Layout.Header.Outer>
<Layout.Header.BackButton />
@@ -420,15 +419,15 @@ function Header({
{count === undefined ? (
<Trans>Requests to join</Trans>
) : hasMoreRequests ? (
l({
message: `${count}+ requests to join`,
comment:
'Displayed when there are more requests to join a group chat than have been loaded',
})
<Plural
value={count}
other="#+ requests to join"
comment="Displayed when there are more requests to join a group chat than have been loaded"
/>
) : (
<Plural
value={count}
zero="No requests to join"
_0="No requests to join"
one="# request to join"
other="# requests to join"
/>