Translate number joined starter pack string and add plural formatting (#7984)
* translate number joined starter pack string * also add plural formatting in StarterPackScreen.tsx * import Plural * tweak * tweak
This commit is contained in:
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
import {View} from 'react-native'
|
import {View} from 'react-native'
|
||||||
import {Image} from 'expo-image'
|
import {Image} from 'expo-image'
|
||||||
import {AppBskyGraphStarterpack, AtUri} from '@atproto/api'
|
import {AppBskyGraphStarterpack, AtUri} from '@atproto/api'
|
||||||
import {msg} from '@lingui/macro'
|
import {msg, Plural, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useQueryClient} from '@tanstack/react-query'
|
import {useQueryClient} from '@tanstack/react-query'
|
||||||
|
|
||||||
@@ -95,7 +95,9 @@ export function Card({
|
|||||||
) : null}
|
) : null}
|
||||||
{!!joinedAllTimeCount && joinedAllTimeCount >= 50 && (
|
{!!joinedAllTimeCount && joinedAllTimeCount >= 50 && (
|
||||||
<Text style={[a.font_bold, t.atoms.text_contrast_medium]}>
|
<Text style={[a.font_bold, t.atoms.text_contrast_medium]}>
|
||||||
{joinedAllTimeCount} users have joined!
|
<Trans comment="Number of users (always at least 50) who have joined Bluesky using a specific starter pack">
|
||||||
|
<Plural value={joinedAllTimeCount} other="# users have" /> joined!
|
||||||
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import {
|
|||||||
RichText as RichTextAPI,
|
RichText as RichTextAPI,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||||
import {msg, Trans} from '@lingui/macro'
|
import {msg, Plural, Trans} from '@lingui/macro'
|
||||||
import {useLingui} from '@lingui/react'
|
import {useLingui} from '@lingui/react'
|
||||||
import {useNavigation} from '@react-navigation/native'
|
import {useNavigation} from '@react-navigation/native'
|
||||||
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
import {NativeStackScreenProps} from '@react-navigation/native-stack'
|
||||||
@@ -482,9 +482,12 @@ function Header({
|
|||||||
/>
|
/>
|
||||||
<Text
|
<Text
|
||||||
style={[a.font_bold, a.text_sm, t.atoms.text_contrast_medium]}>
|
style={[a.font_bold, a.text_sm, t.atoms.text_contrast_medium]}>
|
||||||
<Trans>
|
<Trans comment="Number of users (always at least 25) who have joined Bluesky using a specific starter pack">
|
||||||
{starterPack.joinedAllTimeCount || 0} people have used this
|
<Plural
|
||||||
starter pack!
|
value={starterPack.joinedAllTimeCount || 0}
|
||||||
|
other="# people have"
|
||||||
|
/>{' '}
|
||||||
|
used this starter pack!
|
||||||
</Trans>
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user