Use title case for Starter Pack (#11653)

This commit is contained in:
DS Boyce
2026-09-03 12:26:51 -07:00
committed by GitHub
parent 23d8fcf5ea
commit edcd363fcb
39 changed files with 295 additions and 393 deletions
@@ -75,7 +75,7 @@ export function StepFinished() {
})
starterPack = spRes.starterPack
} catch (e) {
logger.error('Failed to fetch starter pack', {safeMessage: e})
logger.error('Failed to fetch Starter Pack', {safeMessage: e})
// don't tell the user, just get them through onboarding.
}
const starterPackList = starterPack?.list
@@ -87,7 +87,7 @@ export function StepFinished() {
)
}
} catch (e) {
logger.error('Failed to fetch starter pack list items', {
logger.error('Failed to fetch Starter Pack list items', {
safeMessage: e,
})
// don't tell the user, just get them through onboarding.
@@ -132,7 +132,7 @@ export function StepFinished() {
},
]
// Any starter pack feeds will be pinned _after_ the defaults
// Any Starter Pack feeds will be pinned _after_ the defaults
if (starterPack && starterPack.feeds?.length) {
feedsToSave.push(
...starterPack.feeds.map(f => ({
@@ -55,7 +55,7 @@ export function StarterPackCard({
Toast.show(_(msg`An error occurred while trying to follow all`), {
type: 'error',
})
logger.error('Failed to get list members for starter pack', {
logger.error('Failed to get list members for Starter Pack', {
safeMessage: e,
})
return
@@ -40,7 +40,7 @@ export function StepSuggestedStarterpacks() {
<View style={[a.align_start, a.gap_sm]} testID="onboardingInterests">
<OnboardingPosition />
<OnboardingTitleText>
<Trans comment="Starter packs suggested to the user for them to follow">
<Trans comment="Starter Packs suggested to the user for them to follow">
Find people to follow
</Trans>
</OnboardingTitleText>
+1 -1
View File
@@ -38,7 +38,7 @@ export function Onboarding() {
return bcp47Match.basicFilter('en', contentLanguages).length > 0
}, [contentLanguages])
// starter packs screen is currently geared towards english-speaking accounts
// Starter Packs screen is currently geared towards english-speaking accounts
const showSuggestedStarterpacks = ENV !== 'e2e' && probablySpeaksEnglish
const findContactsEnabled =
@@ -1,6 +1,5 @@
import {AtUri} from '@atproto/syntax'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {useLingui} from '@lingui/react/macro'
import {Trans} from '@lingui/react/macro'
import {useNavigation} from '@react-navigation/native'
@@ -46,7 +45,7 @@ export function MoreOptionsMenu({
list: app.bsky.graph.defs.ListView
savedFeedConfig?: app.bsky.actor.defs.SavedFeed
}) {
const {_} = useLingui()
const {t: l} = useLingui()
const ax = useAnalytics()
const {currentAccount} = useSession()
const editListDialogControl = useDialogControl()
@@ -79,15 +78,15 @@ export function MoreOptionsMenu({
})
Toast.show(
action === 'optOut'
? _(msg`Opted out of starter pack`)
: _(msg`Opt-out undone`),
? l`Opted out of Starter Pack`
: l`Opt-out undone`,
)
},
onError: error => {
logger.error('Failed to update starter pack opt-out', {
logger.error('Failed to update Starter Pack opt-out', {
safeMessage: error,
})
Toast.show(_(msg`Failed to update starter pack opt-out`), {
Toast.show(l`Failed to update Starter Pack opt-out`, {
type: 'error',
})
},
@@ -96,16 +95,16 @@ export function MoreOptionsMenu({
const onPressShare = () => {
const {rkey} = new AtUri(list.uri)
const url = toShareUrl(`/profile/${list.creator.did}/lists/${rkey}`)
shareUrl(url)
void shareUrl(url)
}
const onRemoveFromSavedFeeds = async () => {
if (!savedFeedConfig) return
try {
await removeSavedFeed(savedFeedConfig)
Toast.show(_(msg`Removed from your feeds`))
Toast.show(l`Removed from your feeds`)
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`), {
Toast.show(l`There was an issue contacting the server`, {
type: 'error',
})
logger.error('Failed to remove pinned list', {message: e})
@@ -119,7 +118,7 @@ export function MoreOptionsMenu({
await removeSavedFeed(savedFeedConfig)
}
Toast.show(_(msg({message: 'List deleted', context: 'toast'})))
Toast.show(l({message: 'List deleted', context: 'toast'}))
if (navigation.canGoBack()) {
navigation.goBack()
} else {
@@ -131,9 +130,9 @@ export function MoreOptionsMenu({
try {
if (!savedFeedConfig) return
await removeSavedFeed(savedFeedConfig)
Toast.show(_(msg`Unpinned list`))
Toast.show(l`Unpinned list`)
} catch {
Toast.show(_(msg`Failed to unpin list`), {
Toast.show(l`Failed to unpin list`, {
type: 'error',
})
}
@@ -142,13 +141,11 @@ export function MoreOptionsMenu({
const onUnsubscribeMute = async () => {
try {
await muteList({uri: list.uri, mute: false})
Toast.show(_(msg({message: 'List unmuted', context: 'toast'})))
Toast.show(l({message: 'List unmuted', context: 'toast'}))
ax.metric('moderation:unsubscribedFromList', {listType: 'mute'})
} catch {
Toast.show(
_(
msg`There was an issue. Please check your internet connection and try again.`,
),
l`There was an issue. Please check your internet connection and try again.`,
)
}
}
@@ -156,13 +153,11 @@ export function MoreOptionsMenu({
const onUnsubscribeBlock = async () => {
try {
await blockList({uri: list.uri, block: false})
Toast.show(_(msg({message: 'List unblocked', context: 'toast'})))
Toast.show(l({message: 'List unblocked', context: 'toast'}))
ax.metric('moderation:unsubscribedFromList', {listType: 'block'})
} catch {
Toast.show(
_(
msg`There was an issue. Please check your internet connection and try again.`,
),
l`There was an issue. Please check your internet connection and try again.`,
)
}
}
@@ -170,7 +165,7 @@ export function MoreOptionsMenu({
return (
<>
<Menu.Root>
<Menu.Trigger label={_(msg`More options`)}>
<Menu.Trigger label={l`More options`}>
{({props}) => (
<Button
label={props.accessibilityLabel}
@@ -186,7 +181,7 @@ export function MoreOptionsMenu({
<Menu.Outer showCancel>
<Menu.Group>
<Menu.Item
label={IS_WEB ? _(msg`Copy link to list`) : _(msg`Share via...`)}
label={IS_WEB ? l`Copy link to list` : l`Share via...`}
onPress={onPressShare}>
<Menu.ItemText>
{IS_WEB ? (
@@ -202,8 +197,8 @@ export function MoreOptionsMenu({
</Menu.Item>
{savedFeedConfig && (
<Menu.Item
label={_(msg`Remove from my feeds`)}
onPress={onRemoveFromSavedFeeds}>
label={l`Remove from my feeds`}
onPress={() => void onRemoveFromSavedFeeds()}>
<Menu.ItemText>
<Trans>Remove from my feeds</Trans>
</Menu.ItemText>
@@ -217,7 +212,7 @@ export function MoreOptionsMenu({
{isOwner ? (
<Menu.Group>
<Menu.Item
label={_(msg`Edit list details`)}
label={l`Edit list details`}
onPress={editListDialogControl.open}>
<Menu.ItemText>
<Trans>Edit list details</Trans>
@@ -225,7 +220,7 @@ export function MoreOptionsMenu({
<Menu.ItemIcon position="right" icon={PencilLineIcon} />
</Menu.Item>
<Menu.Item
label={_(msg`Delete list`)}
label={l`Delete list`}
onPress={deleteListPromptControl.open}>
<Menu.ItemText>
<Trans>Delete list</Trans>
@@ -237,7 +232,7 @@ export function MoreOptionsMenu({
<>
<Menu.Group>
<Menu.Item
label={_(msg`Report list`)}
label={l`Report list`}
onPress={reportDialogControl.open}>
<Menu.ItemText>
<Trans>Report list</Trans>
@@ -252,8 +247,8 @@ export function MoreOptionsMenu({
<Menu.Item
label={
referenceListOptOut
? _(msg`Undo opt-out from starter pack`)
: _(msg`Opt out of starter pack`)
? l`Undo opt-out from Starter Pack`
: l`Opt out of Starter Pack`
}
disabled={isOptOutPending}
onPress={optOutDialogControl.open}>
@@ -261,7 +256,7 @@ export function MoreOptionsMenu({
{referenceListOptOut ? (
<Trans>Undo opt-out</Trans>
) : (
<Trans>Opt out of starter pack</Trans>
<Trans>Opt out of Starter Pack</Trans>
)}
</Menu.ItemText>
</Menu.Item>
@@ -276,8 +271,8 @@ export function MoreOptionsMenu({
<Menu.Divider />
<Menu.Group>
<Menu.Item
label={_(msg`Unpin moderation list`)}
onPress={onUnpinModList}>
label={l`Unpin moderation list`}
onPress={() => void onUnpinModList()}>
<Menu.ItemText>
<Trans>Unpin moderation list</Trans>
</Menu.ItemText>
@@ -293,8 +288,8 @@ export function MoreOptionsMenu({
<Menu.Group>
{isBlocking && (
<Menu.Item
label={_(msg`Unblock list`)}
onPress={onUnsubscribeBlock}>
label={l`Unblock list`}
onPress={() => void onUnsubscribeBlock()}>
<Menu.ItemText>
<Trans>Unblock list</Trans>
</Menu.ItemText>
@@ -303,8 +298,8 @@ export function MoreOptionsMenu({
)}
{isMuting && (
<Menu.Item
label={_(msg`Unmute list`)}
onPress={onUnsubscribeMute}>
label={l`Unmute list`}
onPress={() => void onUnsubscribeMute()}>
<Menu.ItemText>
<Trans>Unmute list</Trans>
</Menu.ItemText>
@@ -316,37 +311,32 @@ export function MoreOptionsMenu({
)}
</Menu.Outer>
</Menu.Root>
<CreateOrEditListDialog control={editListDialogControl} list={list} />
<Prompt.Basic
control={deleteListPromptControl}
title={_(msg`Delete this list?`)}
description={_(
msg`If you delete this list, you won't be able to recover it.`,
)}
onConfirm={onPressDelete}
confirmButtonCta={_(msg`Delete`)}
title={l`Delete this list?`}
description={l`If you delete this list, you won't be able to recover it.`}
onConfirm={() => void onPressDelete()}
confirmButtonCta={l`Delete`}
confirmButtonColor="negative"
/>
{isReferenceList ? (
<Prompt.Outer control={optOutDialogControl}>
<Prompt.TitleText>
{referenceListOptOut ? (
<Trans>Undo opt-out?</Trans>
) : (
<Trans>Opt out of this starter pack?</Trans>
<Trans>Opt out of this Starter Pack?</Trans>
)}
</Prompt.TitleText>
<Prompt.DescriptionText>
{referenceListOptOut ? (
<Trans>
You will be eligible to appear in this starter pack again.
You will be eligible to appear in this Starter Pack again.
</Trans>
) : (
<Trans>
You will no longer appear in this starter pack. The creator will
You will no longer appear in this Starter Pack. The creator will
be able to see that you've opted out and remove you if they
wish.
</Trans>
@@ -356,8 +346,8 @@ export function MoreOptionsMenu({
<Prompt.Action
cta={
referenceListOptOut
? _(msg`Undo opt-out`)
: _(msg`Opt out of starter pack`)
? l`Undo opt-out`
: l`Opt out of Starter Pack`
}
color={referenceListOptOut ? 'primary' : 'negative'}
disabled={isOptOutPending}
@@ -369,7 +359,6 @@ export function MoreOptionsMenu({
</Prompt.Actions>
</Prompt.Outer>
) : null}
<ReportDialog
control={reportDialogControl}
subject={{
+1 -1
View File
@@ -117,7 +117,7 @@ let SearchResults = ({
},
noFilters &&
isStarterPacksEnabled && {
title: l`Starter packs`,
title: l`Starter Packs`,
component: (
<SearchScreenStarterPackResults
query={query}
@@ -387,7 +387,7 @@ export function NotificationSettingsScreen({}: Props) {
titleText={<Trans>Everything else</Trans>}
subtitleText={
<Trans>
Get notifications for starter pack joins, verification, and other
Get notifications for Starter Pack joins, verification, and other
activity.
</Trans>
}
@@ -190,7 +190,7 @@ function LandingScreenLoaded({
a.text_md,
{color: 'white'},
]}>
Starter pack by {`@${creator.handle}`}
<Trans>Starter Pack by {`@${creator.handle}`}</Trans>
</Text>
</LinearGradientBackground>
<View style={[a.gap_2xl, a.mx_lg, a.my_2xl]}>
@@ -299,14 +299,14 @@ function LandingScreenLoaded({
) : null}
</View>
<Button
label={_(msg`Create an account without using this starter pack`)}
label={_(msg`Create an account without using this Starter Pack`)}
variant="solid"
color="secondary"
size="large"
style={[a.py_lg]}
onPress={onJoinWithoutPress}>
<ButtonText>
<Trans>Create an account without using this starter pack</Trans>
<Trans>Create an account without using this Starter Pack</Trans>
</ButtonText>
</Button>
</View>
@@ -396,7 +396,7 @@ export function AppClipOverlay({
Download Bluesky to get started!
</Text>
<Text style={[a.text_lg, {color: 'white'}]}>
We'll remember the starter pack you chose and use it when you create
Well remember the Starter Pack you chose and use it when you create
an account in the app.
</Text>
</View>
+56 -64
View File
@@ -4,9 +4,7 @@ import {Image} from 'expo-image'
import {AtUri} from '@atproto/syntax'
import {type ModerationOpts} from '@bsky/sdk/moderation'
import {RichText as RichTextAPI} from '@bsky/sdk/richtext'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Plural, Trans} from '@lingui/react/macro'
import {Plural, Trans, useLingui} from '@lingui/react/macro'
import {useNavigation} from '@react-navigation/native'
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
import {useQueryClient} from '@tanstack/react-query'
@@ -96,7 +94,7 @@ export function StarterPackScreen({route}: StarterPackScreeProps) {
}
export function StarterPackScreenShort({route}: StarterPackScreenShortProps) {
const {_} = useLingui()
const {t: l} = useLingui()
const {
data: resolvedStarterPack,
isLoading,
@@ -111,8 +109,8 @@ export function StarterPackScreenShort({route}: StarterPackScreenShortProps) {
<ListMaybePlaceholder
isLoading={isLoading}
isError={isError}
errorMessage={_(msg`That starter pack could not be found.`)}
emptyMessage={_(msg`That starter pack could not be found.`)}
errorMessage={l`That Starter Pack could not be found.`}
emptyMessage={l`That Starter Pack could not be found.`}
/>
</Layout.Screen>
)
@@ -130,7 +128,7 @@ export function StarterPackScreenInner({
routeParams: StarterPackScreeProps['route']['params']
}) {
const {name, rkey} = routeParams
const {_} = useLingui()
const {t: l} = useLingui()
const {currentAccount} = useSession()
const moderationOpts = useModerationOpts()
@@ -156,8 +154,8 @@ export function StarterPackScreenInner({
<ListMaybePlaceholder
isLoading={isLoadingDid || isLoadingStarterPack || !moderationOpts}
isError={isErrorDid || isErrorStarterPack || !isValid}
errorMessage={_(msg`That starter pack could not be found.`)}
emptyMessage={_(msg`That starter pack could not be found.`)}
errorMessage={l`That Starter Pack could not be found.`}
emptyMessage={l`That Starter Pack could not be found.`}
/>
)
}
@@ -187,13 +185,13 @@ function StarterPackScreenLoaded({
const showPeopleTab = Boolean(starterPack.list)
const showFeedsTab = Boolean(starterPack.feeds?.length)
const showPostsTab = Boolean(starterPack.list)
const {_} = useLingui()
const {t: l} = useLingui()
const ax = useAnalytics()
const tabs = [
...(showPeopleTab ? [_(msg`People`)] : []),
...(showFeedsTab ? [_(msg`Feeds`)] : []),
...(showPostsTab ? [_(msg`Posts`)] : []),
...(showPeopleTab ? [l`People`] : []),
...(showFeedsTab ? [l`Feeds`] : []),
...(showPostsTab ? [l`Posts`] : []),
]
const qrCodeDialogControl = useDialogControl()
@@ -211,7 +209,7 @@ function StarterPackScreenLoaded({
const onOpenShareDialog = useCallback(() => {
const rkey = new AtUri(starterPack.uri).rkey
shortenLink(makeStarterPackLink(starterPack.creator.did, rkey)).then(
void shortenLink(makeStarterPackLink(starterPack.creator.did, rkey)).then(
res => {
setLink(res.url)
},
@@ -301,7 +299,7 @@ function Header({
routeParams: StarterPackScreeProps['route']['params']
onOpenShareDialog: () => void
}) {
const {_} = useLingui()
const {t: l} = useLingui()
const t = useTheme()
const {currentAccount, hasSession} = useSession()
const appviewClient = useAppviewClient()
@@ -351,10 +349,10 @@ function Header({
listItems = await getAllListMembers(appviewClient, starterPack.list.uri)
} catch (e) {
setIsProcessing(false)
Toast.show(_(msg`An error occurred while trying to follow all`), {
Toast.show(l`An error occurred while trying to follow all`, {
type: 'error',
})
logger.error('Failed to get list members for starter pack', {
logger.error('Failed to get list members for Starter Pack', {
safeMessage: e,
})
return
@@ -378,7 +376,7 @@ function Header({
})
} catch (e) {
setIsProcessing(false)
Toast.show(_(msg`An error occurred while trying to follow all`), {
Toast.show(l`An error occurred while trying to follow all`, {
type: 'error',
})
logger.error('Failed to follow all accounts', {safeMessage: e})
@@ -392,7 +390,7 @@ function Header({
})
}
})
Toast.show(_(msg`All accounts have been followed!`))
Toast.show(l`All accounts have been followed!`)
captureAction(ProgressGuideAction.Follow, dids.length)
ax.metric('starterPack:followAll', {
logContext: 'StarterPackProfilesList',
@@ -427,7 +425,7 @@ function Header({
<View style={[a.flex_row, a.gap_sm, a.align_center]}>
{isOwn ? (
<Button
label={_(msg`Share this starter pack`)}
label={l`Share this Starter Pack`}
hitSlop={HITSLOP_20}
variant="solid"
color="primary"
@@ -439,7 +437,7 @@ function Header({
</Button>
) : (
<Button
label={_(msg`Follow all`)}
label={l`Follow all`}
variant="solid"
color="primary"
size="small"
@@ -465,7 +463,7 @@ function Header({
{richText ? <RichText value={richText} style={[a.text_md]} /> : null}
{!hasSession ? (
<Button
label={_(msg`Join Bluesky`)}
label={l`Join Bluesky`}
onPress={() => {
setActiveStarterPack({
uri: starterPack.uri,
@@ -491,12 +489,12 @@ function Header({
a.text_sm,
t.atoms.text_contrast_medium,
]}>
<Trans comment="Number of users (always at least 25) who have joined Bluesky using a specific starter pack">
<Trans comment="Number of users (always at least 25) who have joined Bluesky using a specific Starter Pack">
<Plural
value={starterPack.joinedAllTimeCount || 0}
other="# people have"
/>{' '}
joined Bluesky via this starter pack!
joined Bluesky via this Starter Pack!
</Trans>
</Text>
</View>
@@ -517,7 +515,7 @@ function OverflowMenu({
onOpenShareDialog: () => void
}) {
const t = useTheme()
const {_} = useLingui()
const {t: l} = useLingui()
const ax = useAnalytics()
const {gtMobile} = useBreakpoints()
const {currentAccount} = useSession()
@@ -543,7 +541,7 @@ function OverflowMenu({
})
},
onError: e => {
logger.error('Failed to delete starter pack', {safeMessage: e})
logger.error('Failed to delete Starter Pack', {safeMessage: e})
},
})
@@ -559,21 +557,21 @@ function OverflowMenu({
})
Toast.show(
action === 'optOut'
? _(msg`Opted out of starter pack`)
: _(msg`Opt-out undone`),
? l`Opted out of Starter Pack`
: l`Opt-out undone`,
)
},
onError: error => {
logger.error('Failed to update starter pack opt-out', {
logger.error('Failed to update Starter Pack opt-out', {
safeMessage: error,
})
Toast.show(_(msg`Failed to update starter pack opt-out`), {
Toast.show(l`Failed to update Starter Pack opt-out`, {
type: 'error',
})
},
})
const onDeleteStarterPack = async () => {
const onDeleteStarterPack = () => {
if (!starterPack.list) {
logger.error(`Unable to delete starterpack because list is missing`)
return
@@ -589,12 +587,12 @@ function OverflowMenu({
return (
<>
<Menu.Root>
<Menu.Trigger label={_(msg`Repost or quote post`)}>
<Menu.Trigger label={l`Repost or quote post`}>
{({props}) => (
<Button
{...props}
testID="headerDropdownBtn"
label={_(msg`Open starter pack menu`)}
label={l`Open Starter Pack menu`}
hitSlop={HITSLOP_20}
variant="solid"
color="secondary"
@@ -608,7 +606,7 @@ function OverflowMenu({
{isOwn ? (
<>
<Menu.Item
label={_(msg`Edit starter pack`)}
label={l`Edit Starter Pack`}
testID="editStarterPackLinkBtn"
onPress={() => {
navigation.navigate('StarterPackEdit', {
@@ -621,7 +619,7 @@ function OverflowMenu({
<Menu.ItemIcon icon={Pencil} position="right" />
</Menu.Item>
<Menu.Item
label={_(msg`Delete starter pack`)}
label={l`Delete Starter Pack`}
testID="deleteStarterPackBtn"
onPress={() => {
deleteDialogControl.open()
@@ -632,7 +630,7 @@ function OverflowMenu({
<Menu.ItemIcon icon={Trash} position="right" />
</Menu.Item>
<Menu.Item
label={_(msg`Create a list from this starter pack`)}
label={l`Create a list from this Starter Pack`}
testID="convertToListBtn"
onPress={() => {
convertToListDialogControl.open()
@@ -648,9 +646,7 @@ function OverflowMenu({
<Menu.Group>
<Menu.Item
label={
IS_WEB
? _(msg`Copy link to starter pack`)
: _(msg`Share via...`)
IS_WEB ? l`Copy link to Starter Pack` : l`Share via...`
}
testID="shareStarterPackLinkBtn"
onPress={onOpenShareDialog}>
@@ -669,10 +665,10 @@ function OverflowMenu({
</Menu.Group>
<Menu.Item
label={_(msg`Report starter pack`)}
label={l`Report Starter Pack`}
onPress={() => reportDialogControl.open()}>
<Menu.ItemText>
<Trans>Report starter pack</Trans>
<Trans>Report Starter Pack</Trans>
</Menu.ItemText>
<Menu.ItemIcon icon={CircleInfo} position="right" />
</Menu.Item>
@@ -680,8 +676,8 @@ function OverflowMenu({
<Menu.Item
label={
referenceListOptOut
? _(msg`Undo opt-out from starter pack`)
: _(msg`Opt out of starter pack`)
? l`Undo opt-out from Starter Pack`
: l`Opt out of Starter Pack`
}
disabled={isOptOutPending}
onPress={() => optOutDialogControl.open()}>
@@ -689,7 +685,7 @@ function OverflowMenu({
{referenceListOptOut ? (
<Trans>Undo opt-out</Trans>
) : (
<Trans>Opt out of starter pack</Trans>
<Trans>Opt out of Starter Pack</Trans>
)}
</Menu.ItemText>
</Menu.Item>
@@ -698,7 +694,6 @@ function OverflowMenu({
)}
</Menu.Outer>
</Menu.Root>
{starterPack.list && (
<ReportDialog
control={reportDialogControl}
@@ -708,13 +703,12 @@ function OverflowMenu({
}}
/>
)}
<Prompt.Outer control={deleteDialogControl}>
<Prompt.TitleText>
<Trans>Delete starter pack?</Trans>
<Trans>Delete Starter Pack?</Trans>
</Prompt.TitleText>
<Prompt.DescriptionText>
<Trans>Are you sure you want to delete this starter pack?</Trans>
<Trans>Are you sure you want to delete this Starter Pack?</Trans>
</Prompt.DescriptionText>
{deleteError && (
<View
@@ -742,7 +736,7 @@ function OverflowMenu({
variant="solid"
color="negative"
size={gtMobile ? 'small' : 'large'}
label={_(msg`Yes, delete this starter pack`)}
label={l`Yes, delete this Starter Pack`}
onPress={onDeleteStarterPack}>
<ButtonText>
<Trans>Delete</Trans>
@@ -752,24 +746,23 @@ function OverflowMenu({
<Prompt.Cancel />
</Prompt.Actions>
</Prompt.Outer>
{starterPack.list ? (
<Prompt.Outer control={optOutDialogControl}>
<Prompt.TitleText>
{referenceListOptOut ? (
<Trans>Undo opt-out?</Trans>
) : (
<Trans>Opt out of this starter pack?</Trans>
<Trans>Opt out of this Starter Pack?</Trans>
)}
</Prompt.TitleText>
<Prompt.DescriptionText>
{referenceListOptOut ? (
<Trans>
You will be eligible to appear in this starter pack again.
You will be eligible to appear in this Starter Pack again.
</Trans>
) : (
<Trans>
You will no longer appear in this starter pack. The creator will
You will no longer appear in this Starter Pack. The creator will
be able to see that you've opted out and remove you if they
wish.
</Trans>
@@ -782,8 +775,8 @@ function OverflowMenu({
size="large"
label={
referenceListOptOut
? _(msg`Undo opt-out`)
: _(msg`Opt out of starter pack`)
? l`Undo opt-out`
: l`Opt out of Starter Pack`
}
disabled={isOptOutPending}
onPress={() => {
@@ -804,7 +797,6 @@ function OverflowMenu({
</Prompt.Actions>
</Prompt.Outer>
) : null}
<CreateListFromStarterPackDialog
control={convertToListDialogControl}
starterPack={starterPack}
@@ -814,7 +806,7 @@ function OverflowMenu({
}
function InvalidStarterPack({rkey}: {rkey: string}) {
const {_} = useLingui()
const {t: l} = useLingui()
const t = useTheme()
const navigation = useNavigation<NavigationProp>()
const {gtMobile} = useBreakpoints()
@@ -835,8 +827,8 @@ function InvalidStarterPack({rkey}: {rkey: string}) {
},
onError: e => {
setIsProcessing(false)
logger.error('Failed to delete invalid starter pack', {safeMessage: e})
Toast.show(_(msg`Failed to delete starter pack`), {
logger.error('Failed to delete invalid Starter Pack', {safeMessage: e})
Toast.show(l`Failed to delete Starter Pack`, {
type: 'error',
})
},
@@ -847,7 +839,7 @@ function InvalidStarterPack({rkey}: {rkey: string}) {
<View style={[a.py_4xl, a.px_xl, a.align_center, a.gap_5xl]}>
<View style={[a.w_full, a.align_center, a.gap_lg]}>
<Text style={[a.font_semi_bold, a.text_3xl]}>
<Trans>Starter pack is invalid</Trans>
<Trans>Starter Pack is invalid</Trans>
</Text>
<Text
style={[
@@ -858,8 +850,8 @@ function InvalidStarterPack({rkey}: {rkey: string}) {
gtMobile ? {width: 450} : [a.w_full, a.px_lg],
]}>
<Trans>
The starter pack that you are trying to view is invalid. You may
delete this starter pack instead.
The Starter Pack that you are trying to view is invalid. You may
delete this Starter Pack instead.
</Trans>
</Text>
</View>
@@ -867,7 +859,7 @@ function InvalidStarterPack({rkey}: {rkey: string}) {
<Button
variant="solid"
color="primary"
label={_(msg`Delete starter pack`)}
label={l`Delete Starter Pack`}
size="large"
style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}
disabled={isProcessing}
@@ -883,7 +875,7 @@ function InvalidStarterPack({rkey}: {rkey: string}) {
<Button
variant="solid"
color="secondary"
label={_(msg`Return to previous page`)}
label={l`Return to previous page`}
size="large"
style={[a.rounded_sm, a.overflow_hidden, {paddingVertical: 10}]}
disabled={isProcessing}
@@ -41,12 +41,12 @@ export function StepDetails() {
</View>
<View>
<TextField.LabelText>
<Trans>What do you want to call your starter pack?</Trans>
<Trans>What do you want to call your Starter Pack?</Trans>
</TextField.LabelText>
<TextField.Root>
<TextField.Input
label={
name ? _(msg`${name}'s starter pack`) : _(msg`My starter pack`)
name ? _(msg`${name}s Starter Pack`) : _(msg`My Starter Pack`)
}
value={state.name}
onChangeText={text => dispatch({type: 'SetName', name: text})}
+31 -35
View File
@@ -5,9 +5,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context'
import {Image} from 'expo-image'
import {AtUri} from '@atproto/syntax'
import {type ModerationOpts} from '@bsky/sdk/moderation'
import {msg} from '@lingui/core/macro'
import {useLingui} from '@lingui/react'
import {Plural, Trans} from '@lingui/react/macro'
import {Plural, Trans, useLingui} from '@lingui/react/macro'
import {useNavigation} from '@react-navigation/native'
import {type NativeStackScreenProps} from '@react-navigation/native-stack'
@@ -71,7 +69,7 @@ export function Wizard({
const {currentAccount} = useSession()
const moderationOpts = useModerationOpts()
const {_} = useLingui()
const {t: l} = useLingui()
// Use targetDid if provided (from dialog), otherwise use current account
const profileDid = targetDid || currentAccount!.did
@@ -109,7 +107,7 @@ export function Wizard({
isLoadingStarterPack || isLoadingProfiles || isLoadingProfile
}
isError={isErrorStarterPack || isErrorProfiles || isErrorProfile}
errorMessage={_(msg`That starter pack could not be found.`)}
errorMessage={l`That Starter Pack could not be found.`}
/>
</Layout.Screen>
)
@@ -119,7 +117,7 @@ export function Wizard({
<ListMaybePlaceholder
isLoading={false}
isError={true}
errorMessage={_(msg`That starter pack could not be found.`)}
errorMessage={l`That Starter Pack could not be found.`}
/>
</Layout.Screen>
)
@@ -164,7 +162,7 @@ function WizardInner({
}) {
const navigation = useNavigation<NavigationProp>()
const ax = useAnalytics()
const {_} = useLingui()
const {t: l} = useLingui()
const [state, dispatch] = useWizardState()
const {currentAccount} = useSession()
@@ -182,7 +180,7 @@ function WizardInner({
const getDefaultName = () => {
const displayName = createSanitizedDisplayName(currentProfile!, true)
return _(msg`${displayName}'s Starter Pack`).slice(0, 50)
return l`${displayName}s Starter Pack`.slice(0, 50)
}
const wizardUiStrings: Record<
@@ -190,16 +188,16 @@ function WizardInner({
{header: string; nextBtn: string; subtitle?: string}
> = {
Details: {
header: _(msg`Starter Pack`),
nextBtn: _(msg`Next`),
header: l`Starter Pack`,
nextBtn: l`Next`,
},
Profiles: {
header: _(msg`Choose People`),
nextBtn: _(msg`Next`),
header: l`Choose People`,
nextBtn: l`Next`,
},
Feeds: {
header: _(msg`Choose Feeds`),
nextBtn: state.feeds.length === 0 ? _(msg`Skip`) : _(msg`Finish`),
header: l`Choose Feeds`,
nextBtn: state.feeds.length === 0 ? l`Skip` : l`Finish`,
},
}
const currUiStrings = wizardUiStrings[state.currentStep]
@@ -212,7 +210,7 @@ function WizardInner({
profilesCount: state.profiles.length,
feedsCount: state.feeds.length,
})
Image.prefetch([getStarterPackOgCard(currentProfile!.did, rkey)])
void Image.prefetch([getStarterPackOgCard(currentProfile!.did, rkey)])
dispatch({type: 'SetProcessing', processing: false})
if (fromDialog) {
@@ -241,9 +239,9 @@ function WizardInner({
const {mutate: createStarterPack} = useCreateStarterPackMutation({
onSuccess: onSuccessCreate,
onError: e => {
logger.error('Failed to create starter pack', {safeMessage: e})
logger.error('Failed to create Starter Pack', {safeMessage: e})
dispatch({type: 'SetProcessing', processing: false})
Toast.show(_(msg`Failed to create starter pack`), {
Toast.show(l`Failed to create Starter Pack`, {
type: 'error',
})
},
@@ -251,15 +249,15 @@ function WizardInner({
const {mutate: editStarterPack} = useEditStarterPackMutation({
onSuccess: onSuccessEdit,
onError: e => {
logger.error('Failed to edit starter pack', {safeMessage: e})
logger.error('Failed to edit Starter Pack', {safeMessage: e})
dispatch({type: 'SetProcessing', processing: false})
Toast.show(_(msg`Failed to create starter pack`), {
Toast.show(l`Failed to create Starter Pack`, {
type: 'error',
})
},
})
const submit = async () => {
const submit = () => {
dispatch({type: 'SetProcessing', processing: true})
if (currentStarterPack && currentListItems) {
editStarterPack({
@@ -308,8 +306,8 @@ function WizardInner({
<Layout.Center style={[a.flex_1]}>
<Layout.Header.Outer>
<Layout.Header.BackButton
label={_(msg`Back`)}
accessibilityHint={_(msg`Returns to the previous step`)}
label={l`Back`}
accessibilityHint={l`Returns to the previous step`}
onPress={evt => {
if (state.currentStep !== 'Details') {
evt.preventDefault()
@@ -324,7 +322,7 @@ function WizardInner({
</Layout.Header.Content>
{isEditEnabled ? (
<Button
label={_(msg`Edit`)}
label={l`Edit`}
color="secondary"
size="small"
onPress={editDialogControl.open}>
@@ -336,7 +334,6 @@ function WizardInner({
<Layout.Header.Slot />
)}
</Layout.Header.Outer>
<Container>
{state.currentStep === 'Details' ? (
<StepDetails />
@@ -355,7 +352,6 @@ function WizardInner({
<StepFeeds moderationOpts={moderationOpts} />
) : null}
</Container>
{state.currentStep !== 'Details' && (
<Footer onNext={onNext} nextBtnText={currUiStrings.nextBtn} />
)}
@@ -371,7 +367,7 @@ function WizardInner({
}
function Container({children}: {children: React.ReactNode}) {
const {_} = useLingui()
const {t: l} = useLingui()
const [state, dispatch] = useWizardState()
if (state.currentStep === 'Profiles' || state.currentStep === 'Feeds') {
@@ -386,7 +382,7 @@ function Container({children}: {children: React.ReactNode}) {
{state.currentStep === 'Details' && (
<>
<Button
label={_(msg`Next`)}
label={l`Next`}
variant="solid"
color="primary"
size="large"
@@ -490,7 +486,7 @@ function Footer({
<Text style={[a.font_semi_bold, textStyles]} emoji>
{getName(items[0])}{' '}
</Text>
right now! Add more people to your starter pack by searching
right now! Add more people to your Starter Pack by searching
above.
</Trans>
)
@@ -502,7 +498,7 @@ function Footer({
<Text style={[a.font_semi_bold, textStyles]} emoji>
{getName(items[1] /* [0] is self, skip it */)}{' '}
</Text>
are included in your starter pack
are included in your Starter Pack
</Trans>
) : (
<Trans>
@@ -514,7 +510,7 @@ function Footer({
<Text style={[a.font_semi_bold, textStyles]} emoji>
{getName(items[1] /* [0] is self, skip it */)}{' '}
</Text>
are included in your starter pack
are included in your Starter Pack
</Trans>
)
) : items.length > 2 ? (
@@ -531,7 +527,7 @@ function Footer({
one="# other"
other="# others"
/>{' '}
are included in your starter pack
are included in your Starter Pack
</Trans>
) : null /* Should not happen. */
}
@@ -540,7 +536,7 @@ function Footer({
items.length === 0 ? (
<View style={[a.gap_sm]}>
<Text style={[a.font_semi_bold, a.text_center, textStyles]}>
<Trans>Add some feeds to your starter pack!</Trans>
<Trans>Add some feeds to your Starter Pack!</Trans>
</Text>
<Text style={[a.text_center, textStyles]}>
<Trans>
@@ -556,7 +552,7 @@ function Footer({
<Text style={[a.font_semi_bold, textStyles]} emoji>
{getName(items[0])}
</Text>{' '}
is included in your starter pack
is included in your Starter Pack
</Trans>
) : items.length === 2 ? (
<Trans>
@@ -568,7 +564,7 @@ function Footer({
<Text style={[a.font_semi_bold, textStyles]} emoji>
{getName(items[1])}{' '}
</Text>
are included in your starter pack
are included in your Starter Pack
</Trans>
) : items.length > 2 ? (
<Trans context="feeds">
@@ -584,7 +580,7 @@ function Footer({
one="# other"
other="# others"
/>{' '}
are included in your starter pack
are included in your Starter Pack
</Trans>
) : null /* Should not happen. */
}