Make Posts and People tabs translatable for user lists (#7982)
* mark Posts and People as translatable in lists * tweak labels
This commit is contained in:
@@ -82,8 +82,6 @@ import {
|
|||||||
import * as Prompt from '#/components/Prompt'
|
import * as Prompt from '#/components/Prompt'
|
||||||
import {RichText} from '#/components/RichText'
|
import {RichText} from '#/components/RichText'
|
||||||
|
|
||||||
const SECTION_TITLES_CURATE = ['Posts', 'People']
|
|
||||||
|
|
||||||
interface SectionRef {
|
interface SectionRef {
|
||||||
scrollToTop: () => void
|
scrollToTop: () => void
|
||||||
}
|
}
|
||||||
@@ -165,6 +163,7 @@ function ProfileListScreenLoaded({
|
|||||||
const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1
|
const isHidden = list.labels?.findIndex(l => l.val === '!hide') !== -1
|
||||||
const isOwner = currentAccount?.did === list.creator.did
|
const isOwner = currentAccount?.did === list.creator.did
|
||||||
const scrollElRef = useAnimatedRef()
|
const scrollElRef = useAnimatedRef()
|
||||||
|
const sectionTitlesCurate = [_(msg`Posts`), _(msg`People`)]
|
||||||
|
|
||||||
const moderation = React.useMemo(() => {
|
const moderation = React.useMemo(() => {
|
||||||
return moderateUserList(list, moderationOpts)
|
return moderateUserList(list, moderationOpts)
|
||||||
@@ -214,7 +213,7 @@ function ProfileListScreenLoaded({
|
|||||||
<Hider.Content>
|
<Hider.Content>
|
||||||
<View style={s.hContentRegion}>
|
<View style={s.hContentRegion}>
|
||||||
<PagerWithHeader
|
<PagerWithHeader
|
||||||
items={SECTION_TITLES_CURATE}
|
items={sectionTitlesCurate}
|
||||||
isHeaderReady={true}
|
isHeaderReady={true}
|
||||||
renderHeader={renderHeader}
|
renderHeader={renderHeader}
|
||||||
onCurrentPageSelected={onCurrentPageSelected}>
|
onCurrentPageSelected={onCurrentPageSelected}>
|
||||||
@@ -546,7 +545,7 @@ function Header({
|
|||||||
})
|
})
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownDeleteBtn',
|
testID: 'listHeaderDropdownDeleteBtn',
|
||||||
label: _(msg`Delete List`),
|
label: _(msg`Delete list`),
|
||||||
onPress: deleteListPromptControl.open,
|
onPress: deleteListPromptControl.open,
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
@@ -560,7 +559,7 @@ function Header({
|
|||||||
items.push({label: 'separator'})
|
items.push({label: 'separator'})
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownReportBtn',
|
testID: 'listHeaderDropdownReportBtn',
|
||||||
label: _(msg`Report List`),
|
label: _(msg`Report list`),
|
||||||
onPress: onPressReport,
|
onPress: onPressReport,
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
@@ -595,7 +594,7 @@ function Header({
|
|||||||
if (isMuting) {
|
if (isMuting) {
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownMuteBtn',
|
testID: 'listHeaderDropdownMuteBtn',
|
||||||
label: _(msg`Un-mute list`),
|
label: _(msg`Unmute list`),
|
||||||
onPress: onUnsubscribeMute,
|
onPress: onUnsubscribeMute,
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
@@ -610,7 +609,7 @@ function Header({
|
|||||||
if (isBlocking) {
|
if (isBlocking) {
|
||||||
items.push({
|
items.push({
|
||||||
testID: 'listHeaderDropdownBlockBtn',
|
testID: 'listHeaderDropdownBlockBtn',
|
||||||
label: _(msg`Un-block list`),
|
label: _(msg`Unblock list`),
|
||||||
onPress: onUnsubscribeBlock,
|
onPress: onUnsubscribeBlock,
|
||||||
icon: {
|
icon: {
|
||||||
ios: {
|
ios: {
|
||||||
|
|||||||
Reference in New Issue
Block a user