Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

refine plural marks (#7065)

authored by

Minseo Lee and committed by
GitHub
084905c1 ddeadc21

+83 -54
+4 -5
src/components/FeedCard.tsx
··· 7 7 AtUri, 8 8 RichText as RichTextApi, 9 9 } from '@atproto/api' 10 - import {msg, plural, Trans} from '@lingui/macro' 10 + import {msg, Plural, Trans} from '@lingui/macro' 11 11 import {useLingui} from '@lingui/react' 12 12 import {useQueryClient} from '@tanstack/react-query' 13 13 ··· 210 210 const t = useTheme() 211 211 return ( 212 212 <Text style={[a.text_sm, t.atoms.text_contrast_medium]}> 213 - {plural(count || 0, { 214 - one: 'Liked by # user', 215 - other: 'Liked by # users', 216 - })} 213 + <Trans> 214 + Liked by <Plural value={count || 0} one="# user" other="# users" /> 215 + </Trans> 217 216 </Text> 218 217 ) 219 218 }
+5 -3
src/components/LabelingServiceCard/index.tsx
··· 83 83 ) 84 84 } 85 85 86 - export function LikeCount({count}: {count: number}) { 86 + export function LikeCount({likeCount}: {likeCount: number}) { 87 87 const t = useTheme() 88 88 return ( 89 89 <Text ··· 93 93 t.atoms.text_contrast_medium, 94 94 {fontWeight: '600'}, 95 95 ]}> 96 - <Plural value={count} one="Liked by # user" other="Liked by # users" /> 96 + <Trans> 97 + Liked by <Plural value={likeCount} one="# user" other="# users" /> 98 + </Trans> 97 99 </Text> 98 100 ) 99 101 } ··· 138 140 value={labeler.creator.description} 139 141 handle={labeler.creator.handle} 140 142 /> 141 - {labeler.likeCount ? <LikeCount count={labeler.likeCount} /> : null} 143 + {labeler.likeCount ? <LikeCount likeCount={labeler.likeCount} /> : null} 142 144 </Content> 143 145 </Outer> 144 146 )
+17 -11
src/components/moderation/LabelsOnMe.tsx
··· 1 1 import {StyleProp, View, ViewStyle} from 'react-native' 2 2 import {AppBskyFeedDefs, ComAtprotoLabelDefs} from '@atproto/api' 3 - import {msg, Plural} from '@lingui/macro' 3 + import {msg, Plural, Trans} from '@lingui/macro' 4 4 import {useLingui} from '@lingui/react' 5 5 6 6 import {useSession} from '#/state/session' ··· 50 50 <ButtonIcon position="left" icon={CircleInfo} /> 51 51 <ButtonText style={[a.leading_snug]}> 52 52 {type === 'account' ? ( 53 - <Plural 54 - value={labels.length} 55 - one="# label has been placed on this account" 56 - other="# labels have been placed on this account" 57 - /> 53 + <Trans> 54 + <Plural 55 + value={labels.length} 56 + one="# label has" 57 + other="# labels have" 58 + />{' '} 59 + been placed on this account 60 + </Trans> 58 61 ) : ( 59 - <Plural 60 - value={labels.length} 61 - one="# label has been placed on this content" 62 - other="# labels have been placed on this content" 63 - /> 62 + <Trans> 63 + <Plural 64 + value={labels.length} 65 + one="# label has" 66 + other="# labels have" 67 + />{' '} 68 + been placed on this content 69 + </Trans> 64 70 )} 65 71 </ButtonText> 66 72 </Button>
+14 -9
src/screens/Profile/Header/ProfileHeaderLabeler.tsx
··· 291 291 }, 292 292 }} 293 293 size="tiny" 294 - label={plural(likeCount, { 295 - one: 'Liked by # user', 296 - other: 'Liked by # users', 297 - })}> 294 + label={_( 295 + msg`Liked by ${plural(likeCount, { 296 + one: '# user', 297 + other: '# users', 298 + })}`, 299 + )}> 298 300 {({hovered, focused, pressed}) => ( 299 301 <Text 300 302 style={[ ··· 304 306 (hovered || focused || pressed) && 305 307 t.atoms.text_contrast_high, 306 308 ]}> 307 - <Plural 308 - value={likeCount} 309 - one="Liked by # user" 310 - other="Liked by # users" 311 - /> 309 + <Trans> 310 + Liked by{' '} 311 + <Plural 312 + value={likeCount} 313 + one="# user" 314 + other="# users" 315 + /> 316 + </Trans> 312 317 </Text> 313 318 )} 314 319 </Link>
+8 -5
src/view/com/feeds/FeedSourceCard.tsx
··· 300 300 301 301 {showLikes && feed.type === 'feed' ? ( 302 302 <Text type="sm-medium" style={[pal.text, pal.textLight]}> 303 - <Plural 304 - value={feed.likeCount || 0} 305 - one="Liked by # user" 306 - other="Liked by # users" 307 - /> 303 + <Trans> 304 + Liked by{' '} 305 + <Plural 306 + value={feed.likeCount || 0} 307 + one="# user" 308 + other="# users" 309 + /> 310 + </Trans> 308 311 </Text> 309 312 ) : null} 310 313 </Pressable>
+18 -12
src/view/com/util/post-ctrls/PostCtrls.tsx
··· 258 258 } 259 259 }} 260 260 accessibilityRole="button" 261 - accessibilityLabel={plural(post.replyCount || 0, { 262 - one: 'Reply (# reply)', 263 - other: 'Reply (# replies)', 264 - })} 261 + accessibilityLabel={_( 262 + msg`Reply (${plural(post.replyCount || 0, { 263 + one: '# reply', 264 + other: '# replies', 265 + })})`, 266 + )} 265 267 accessibilityHint="" 266 268 hitSlop={POST_CTRL_HITSLOP}> 267 269 <Bubble ··· 298 300 accessibilityRole="button" 299 301 accessibilityLabel={ 300 302 post.viewer?.like 301 - ? plural(post.likeCount || 0, { 302 - one: 'Unlike (# like)', 303 - other: 'Unlike (# likes)', 304 - }) 305 - : plural(post.likeCount || 0, { 306 - one: 'Like (# like)', 307 - other: 'Like (# likes)', 308 - }) 303 + ? _( 304 + msg`Unlike (${plural(post.likeCount || 0, { 305 + one: '# like', 306 + other: '# likes', 307 + })})`, 308 + ) 309 + : _( 310 + msg`Like (${plural(post.likeCount || 0, { 311 + one: '# like', 312 + other: '# likes', 313 + })})`, 314 + ) 309 315 } 310 316 accessibilityHint="" 311 317 hitSlop={POST_CTRL_HITSLOP}>
+14 -4
src/view/com/util/post-ctrls/RepostButton.tsx
··· 62 62 {padding: 5}, 63 63 ]} 64 64 hoverStyle={t.atoms.bg_contrast_25} 65 - label={`${ 65 + label={ 66 66 isReposted 67 - ? _(msg`Undo repost`) 68 - : _(msg({message: 'Repost', context: 'action'})) 69 - } (${plural(repostCount || 0, {one: '# repost', other: '# reposts'})})`} 67 + ? _( 68 + msg`Undo repost (${plural(repostCount || 0, { 69 + one: '# repost', 70 + other: '# reposts', 71 + })})`, 72 + ) 73 + : _( 74 + msg`Repost (${plural(repostCount || 0, { 75 + one: '# repost', 76 + other: '# reposts', 77 + })})`, 78 + ) 79 + } 70 80 shape="round" 71 81 variant="ghost" 72 82 color="secondary"
+3 -5
src/view/screens/ProfileFeed.tsx
··· 587 587 label={_(msg`View users who like this feed`)} 588 588 to={makeCustomFeedLink(feedOwnerDid, feedRkey, 'liked-by')} 589 589 style={[t.atoms.text_contrast_medium, a.font_bold]}> 590 - <Plural 591 - value={likeCount} 592 - one="Liked by # user" 593 - other="Liked by # users" 594 - /> 590 + <Trans> 591 + Liked by <Plural value={likeCount} one="# user" other="# users" /> 592 + </Trans> 595 593 </InlineLinkText> 596 594 )} 597 595 </View>