Wrap interaction counts with Trans to add translation flexibility (#9036)
This commit is contained in:
@@ -452,14 +452,16 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
|||||||
<Text
|
<Text
|
||||||
testID="repostCount-expanded"
|
testID="repostCount-expanded"
|
||||||
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
||||||
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
<Trans comment="Repost count display, the <0> tags enclose the number of reposts in bold (will never be 0)">
|
||||||
{formatPostStatCount(post.repostCount)}
|
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
||||||
</Text>{' '}
|
{formatPostStatCount(post.repostCount)}
|
||||||
<Plural
|
</Text>{' '}
|
||||||
value={post.repostCount}
|
<Plural
|
||||||
one="repost"
|
value={post.repostCount}
|
||||||
other="reposts"
|
one="repost"
|
||||||
/>
|
other="reposts"
|
||||||
|
/>
|
||||||
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -470,14 +472,16 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
|||||||
<Text
|
<Text
|
||||||
testID="quoteCount-expanded"
|
testID="quoteCount-expanded"
|
||||||
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
||||||
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
<Trans comment="Quote count display, the <0> tags enclose the number of quotes in bold (will never be 0)">
|
||||||
{formatPostStatCount(post.quoteCount)}
|
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
||||||
</Text>{' '}
|
{formatPostStatCount(post.quoteCount)}
|
||||||
<Plural
|
</Text>{' '}
|
||||||
value={post.quoteCount}
|
<Plural
|
||||||
one="quote"
|
value={post.quoteCount}
|
||||||
other="quotes"
|
one="quote"
|
||||||
/>
|
other="quotes"
|
||||||
|
/>
|
||||||
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -486,10 +490,12 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
|||||||
<Text
|
<Text
|
||||||
testID="likeCount-expanded"
|
testID="likeCount-expanded"
|
||||||
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
||||||
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
<Trans comment="Like count display, the <0> tags enclose the number of likes in bold (will never be 0)">
|
||||||
{formatPostStatCount(post.likeCount)}
|
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
||||||
</Text>{' '}
|
{formatPostStatCount(post.likeCount)}
|
||||||
<Plural value={post.likeCount} one="like" other="likes" />
|
</Text>{' '}
|
||||||
|
<Plural value={post.likeCount} one="like" other="likes" />
|
||||||
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
</Link>
|
</Link>
|
||||||
) : null}
|
) : null}
|
||||||
@@ -497,10 +503,16 @@ const ThreadItemAnchorInner = memo(function ThreadItemAnchorInner({
|
|||||||
<Text
|
<Text
|
||||||
testID="bookmarkCount-expanded"
|
testID="bookmarkCount-expanded"
|
||||||
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
style={[a.text_md, t.atoms.text_contrast_medium]}>
|
||||||
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
<Trans comment="Save count display, the <0> tags enclose the number of saves in bold (will never be 0)">
|
||||||
{formatPostStatCount(post.bookmarkCount)}
|
<Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}>
|
||||||
</Text>{' '}
|
{formatPostStatCount(post.bookmarkCount)}
|
||||||
<Plural value={post.bookmarkCount} one="save" other="saves" />
|
</Text>{' '}
|
||||||
|
<Plural
|
||||||
|
value={post.bookmarkCount}
|
||||||
|
one="save"
|
||||||
|
other="saves"
|
||||||
|
/>
|
||||||
|
</Trans>
|
||||||
</Text>
|
</Text>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user