Update lingui UI

This commit is contained in:
Eric Bailey
2026-03-10 13:22:13 -05:00
parent d88c1191fe
commit 56c8207cec
2 changed files with 7 additions and 10 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
import {View} from 'react-native' import {View} from 'react-native'
import {type ComAtprotoLabelDefs} from '@atproto/api' import {type ComAtprotoLabelDefs} from '@atproto/api'
import {msg} from '@lingui/core/macro' import {useLingui} from '@lingui/react/macro'
import {useLingui} from '@lingui/react'
import {atoms as a, useTheme} from '#/alf' import {atoms as a, useTheme} from '#/alf'
import {BotAccountAlert} from '#/components/BotAccountAlert' import {BotAccountAlert} from '#/components/BotAccountAlert'
@@ -51,7 +50,7 @@ export function BotBadgeButton({
}) { }) {
const t = useTheme() const t = useTheme()
const ax = useAnalytics() const ax = useAnalytics()
const {_} = useLingui() const {t: l} = useLingui()
const control = useDialogControl() const control = useDialogControl()
if (!isBotAccount(profile)) { if (!isBotAccount(profile)) {
@@ -61,7 +60,7 @@ export function BotBadgeButton({
return ( return (
<> <>
<Button <Button
label={_(msg`Automated account`)} label={l`Automated account`}
hitSlop={20} hitSlop={20}
onPress={evt => { onPress={evt => {
evt.preventDefault() evt.preventDefault()
@@ -1,8 +1,6 @@
import {View} from 'react-native' import {View} from 'react-native'
import {type $Typed, ComAtprotoLabelDefs} from '@atproto/api' import {type $Typed, ComAtprotoLabelDefs} from '@atproto/api'
import {msg} from '@lingui/core/macro' import {Trans, useLingui} from '@lingui/react/macro'
import {useLingui} from '@lingui/react'
import {Trans} from '@lingui/react/macro'
import {type NativeStackScreenProps} from '@react-navigation/native-stack' import {type NativeStackScreenProps} from '@react-navigation/native-stack'
import {useQueryClient} from '@tanstack/react-query' import {useQueryClient} from '@tanstack/react-query'
@@ -33,7 +31,7 @@ type Props = NativeStackScreenProps<
export function AutomationLabelSettingsScreen({}: Props) { export function AutomationLabelSettingsScreen({}: Props) {
const t = useTheme() const t = useTheme()
const ax = useAnalytics() const ax = useAnalytics()
const {_} = useLingui() const {t: l} = useLingui()
const queryClient = useQueryClient() const queryClient = useQueryClient()
const {currentAccount} = useSession() const {currentAccount} = useSession()
const {data: profile} = useProfileQuery({did: currentAccount?.did}) const {data: profile} = useProfileQuery({did: currentAccount?.did})
@@ -147,7 +145,7 @@ export function AutomationLabelSettingsScreen({}: Props) {
/> />
)} )}
<View style={{top: platform({ios: -1})}}> <View style={{top: platform({ios: -1})}}>
<BotBadge profile={profile} alwaysShow size={17} /> <BotBadge profile={profile} alwaysShow width={17} />
</View> </View>
</View> </View>
</View> </View>
@@ -180,7 +178,7 @@ export function AutomationLabelSettingsScreen({}: Props) {
disabled={!canToggle || updateProfile.isPending} disabled={!canToggle || updateProfile.isPending}
value={isBotLabeled} value={isBotLabeled}
onChange={onToggle} onChange={onToggle}
label={_(msg`Show automation label`)} label={l`Show automation label`}
style={[ style={[
a.w_full, a.w_full,
a.p_md, a.p_md,