Fix localization for Following and Discover feed names (#11572)
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import {Pressable, View} from 'react-native'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {useLingui} from '@lingui/react/macro'
|
||||
import {useNavigation, useNavigationState} from '@react-navigation/native'
|
||||
|
||||
import {getCurrentRoute} from '#/lib/routes/helpers'
|
||||
import {type NavigationProp} from '#/lib/routes/types'
|
||||
import {getLocalizedFeedName} from '#/lib/strings/feed-names'
|
||||
import {emitSoftReset} from '#/state/events'
|
||||
import {
|
||||
type SavedFeedSourceInfo,
|
||||
@@ -22,7 +22,7 @@ import {useAnalytics} from '#/analytics'
|
||||
|
||||
export function DesktopFeeds() {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
const ax = useAnalytics()
|
||||
const {data: pinnedFeedInfos, error, isLoading} = usePinnedFeedsInfos()
|
||||
const selectedFeed = useSelectedFeed()
|
||||
@@ -100,10 +100,9 @@ export function DesktopFeeds() {
|
||||
/>
|
||||
)
|
||||
})}
|
||||
|
||||
<Link
|
||||
to="/feeds"
|
||||
label={_(msg`More feeds`)}
|
||||
label={l`More feeds`}
|
||||
style={[
|
||||
a.flex_row,
|
||||
a.align_center,
|
||||
@@ -150,7 +149,7 @@ export function DesktopFeeds() {
|
||||
: t.atoms.text_contrast_medium,
|
||||
]}
|
||||
numberOfLines={1}>
|
||||
{_(msg`More feeds`)}
|
||||
{l`More feeds`}
|
||||
</Text>
|
||||
</>
|
||||
)
|
||||
@@ -170,19 +169,20 @@ function FeedItem({
|
||||
onPress: () => void
|
||||
}) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const {t: l, i18n} = useLingui()
|
||||
const {
|
||||
state: hovered,
|
||||
onIn: onHoverIn,
|
||||
onOut: onHoverOut,
|
||||
} = useInteractionState()
|
||||
const isFollowing = feedInfo.feedDescriptor === 'following'
|
||||
const displayName = getLocalizedFeedName(feedInfo, i18n)
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
accessibilityRole="link"
|
||||
accessibilityLabel={feedInfo.displayName}
|
||||
accessibilityHint={_(msg`Opens ${feedInfo.displayName} feed`)}
|
||||
accessibilityLabel={displayName}
|
||||
accessibilityHint={l`Opens ${displayName} feed`}
|
||||
onPress={onPress}
|
||||
onHoverIn={onHoverIn}
|
||||
onHoverOut={onHoverOut}
|
||||
@@ -231,7 +231,7 @@ function FeedItem({
|
||||
: t.atoms.text_contrast_medium,
|
||||
]}
|
||||
numberOfLines={1}>
|
||||
{feedInfo.displayName}
|
||||
{displayName}
|
||||
</Text>
|
||||
</Pressable>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user