Bluesky app fork with some witchin' additions 💫 witchsky.app
bluesky fork client

Wrap interaction counts with `Trans` to add translation flexibility (#9036)

authored by

surfdude29 and committed by
GitHub
82f42e73 3b9f0b0a

+36 -24
+36 -24
src/screens/PostThread/components/ThreadItemAnchor.tsx
··· 452 452 <Text 453 453 testID="repostCount-expanded" 454 454 style={[a.text_md, t.atoms.text_contrast_medium]}> 455 - <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 456 - {formatPostStatCount(post.repostCount)} 457 - </Text>{' '} 458 - <Plural 459 - value={post.repostCount} 460 - one="repost" 461 - other="reposts" 462 - /> 455 + <Trans comment="Repost count display, the <0> tags enclose the number of reposts in bold (will never be 0)"> 456 + <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 457 + {formatPostStatCount(post.repostCount)} 458 + </Text>{' '} 459 + <Plural 460 + value={post.repostCount} 461 + one="repost" 462 + other="reposts" 463 + /> 464 + </Trans> 463 465 </Text> 464 466 </Link> 465 467 ) : null} ··· 470 472 <Text 471 473 testID="quoteCount-expanded" 472 474 style={[a.text_md, t.atoms.text_contrast_medium]}> 473 - <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 474 - {formatPostStatCount(post.quoteCount)} 475 - </Text>{' '} 476 - <Plural 477 - value={post.quoteCount} 478 - one="quote" 479 - other="quotes" 480 - /> 475 + <Trans comment="Quote count display, the <0> tags enclose the number of quotes in bold (will never be 0)"> 476 + <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 477 + {formatPostStatCount(post.quoteCount)} 478 + </Text>{' '} 479 + <Plural 480 + value={post.quoteCount} 481 + one="quote" 482 + other="quotes" 483 + /> 484 + </Trans> 481 485 </Text> 482 486 </Link> 483 487 ) : null} ··· 486 490 <Text 487 491 testID="likeCount-expanded" 488 492 style={[a.text_md, t.atoms.text_contrast_medium]}> 489 - <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 490 - {formatPostStatCount(post.likeCount)} 491 - </Text>{' '} 492 - <Plural value={post.likeCount} one="like" other="likes" /> 493 + <Trans comment="Like count display, the <0> tags enclose the number of likes in bold (will never be 0)"> 494 + <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 495 + {formatPostStatCount(post.likeCount)} 496 + </Text>{' '} 497 + <Plural value={post.likeCount} one="like" other="likes" /> 498 + </Trans> 493 499 </Text> 494 500 </Link> 495 501 ) : null} ··· 497 503 <Text 498 504 testID="bookmarkCount-expanded" 499 505 style={[a.text_md, t.atoms.text_contrast_medium]}> 500 - <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 501 - {formatPostStatCount(post.bookmarkCount)} 502 - </Text>{' '} 503 - <Plural value={post.bookmarkCount} one="save" other="saves" /> 506 + <Trans comment="Save count display, the <0> tags enclose the number of saves in bold (will never be 0)"> 507 + <Text style={[a.text_md, a.font_semi_bold, t.atoms.text]}> 508 + {formatPostStatCount(post.bookmarkCount)} 509 + </Text>{' '} 510 + <Plural 511 + value={post.bookmarkCount} 512 + one="save" 513 + other="saves" 514 + /> 515 + </Trans> 504 516 </Text> 505 517 ) : null} 506 518 </View>