Add missing msg macro calls for i18n

This commit is contained in:
Stanislas Signoud (Signez)
2025-03-05 14:17:59 +01:00
parent 01a51c3275
commit cefce58351
8 changed files with 27 additions and 25 deletions
@@ -49,18 +49,18 @@ export function RejectMenu({
}
},
onError: () => {
Toast.show(_('Failed to delete chat'), 'xmark')
Toast.show(_(msg`Failed to delete chat`), 'xmark')
},
})
const [queueBlock] = useProfileBlockMutationQueue(shadowedProfile)
const onPressDelete = useCallback(() => {
Toast.show(_('Chat deleted'), 'check')
Toast.show(_(msg`Chat deleted`), 'check')
leaveConvo()
}, [leaveConvo, _])
const onPressBlock = useCallback(() => {
Toast.show(_('Account blocked'), 'check')
Toast.show(_(msg`Account blocked`), 'check')
// block and also delete convo
queueBlock()
leaveConvo()
@@ -179,7 +179,7 @@ export function AcceptChatButton({
// no difference if the request failed - when they send a message, the convo will be accepted
// automatically. The only difference is that when they back out of the convo (without sending a message), the conversation will be rejected.
// the list will still have this chat in it -sfn
Toast.show(_('Failed to accept chat'), 'xmark')
Toast.show(_(msg`Failed to accept chat`), 'xmark')
},
})
@@ -230,12 +230,12 @@ export function DeleteChatButton({
}
},
onError: () => {
Toast.show(_('Failed to delete chat'), 'xmark')
Toast.show(_(msg`Failed to delete chat`), 'xmark')
},
})
const onPressDelete = useCallback(() => {
Toast.show(_('Chat deleted'), 'check')
Toast.show(_(msg`Chat deleted`), 'check')
leaveConvo()
}, [leaveConvo, _])
@@ -1,4 +1,5 @@
import {useMemo} from 'react'
import {msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
import {AppIconSet} from '#/screens/Settings/AppIconSettings/types'
@@ -10,7 +11,7 @@ export function useAppIconSets() {
const defaults = [
{
id: 'default_light',
name: _('Light'),
name: _(msg`Light`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_default_light.png`)
},
@@ -20,7 +21,7 @@ export function useAppIconSets() {
},
{
id: 'default_dark',
name: _('Dark'),
name: _(msg`Dark`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_default_dark.png`)
},
@@ -36,7 +37,7 @@ export function useAppIconSets() {
const core = [
{
id: 'core_aurora',
name: _('Aurora'),
name: _(msg`Aurora`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_aurora.png`)
},
@@ -46,7 +47,7 @@ export function useAppIconSets() {
},
// {
// id: 'core_bonfire',
// name: _('Bonfire'),
// name: _(msg`Bonfire`),
// iosImage: () => {
// return require(`../../../../assets/app-icons/ios_icon_core_bonfire.png`)
// },
@@ -56,7 +57,7 @@ export function useAppIconSets() {
// },
{
id: 'core_sunrise',
name: _('Sunrise'),
name: _(msg`Sunrise`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_sunrise.png`)
},
@@ -66,7 +67,7 @@ export function useAppIconSets() {
},
{
id: 'core_sunset',
name: _('Sunset'),
name: _(msg`Sunset`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_sunset.png`)
},
@@ -76,7 +77,7 @@ export function useAppIconSets() {
},
{
id: 'core_midnight',
name: _('Midnight'),
name: _(msg`Midnight`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_midnight.png`)
},
@@ -86,7 +87,7 @@ export function useAppIconSets() {
},
{
id: 'core_flat_blue',
name: _('Flat Blue'),
name: _(msg`Flat Blue`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_flat_blue.png`)
},
@@ -96,7 +97,7 @@ export function useAppIconSets() {
},
{
id: 'core_flat_white',
name: _('Flat White'),
name: _(msg`Flat White`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_flat_white.png`)
},
@@ -106,7 +107,7 @@ export function useAppIconSets() {
},
{
id: 'core_flat_black',
name: _('Flat Black'),
name: _(msg`Flat Black`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_flat_black.png`)
},
@@ -116,7 +117,7 @@ export function useAppIconSets() {
},
{
id: 'core_classic',
name: _('Bluesky Classic™'),
name: _(msg`Bluesky Classic™`),
iosImage: () => {
return require(`../../../../assets/app-icons/ios_icon_core_classic.png`)
},
@@ -50,7 +50,8 @@ export function StepDetails() {
value={state.name}
onChangeText={text => dispatch({type: 'SetName', name: text})}
/>
<TextField.SuffixText label={_(`${state.name?.length} out of 50`)}>
<TextField.SuffixText
label={_(msg`${state.name?.length} out of 50`)}>
<Text style={[t.atoms.text_contrast_medium]}>
{state.name?.length ?? 0}/50
</Text>
@@ -38,11 +38,11 @@ export function SubtitleDialogBtn(props: Props) {
return (
<View style={[a.flex_row, a.my_xs]}>
<Button
label={isWeb ? _('Captions & alt text') : _('Alt text')}
label={isWeb ? _(msg`Captions & alt text`) : _(msg`Alt text`)}
accessibilityHint={
isWeb
? _('Opens captions and alt text dialog')
: _('Opens alt text dialog')
? _(msg`Opens captions and alt text dialog`)
: _(msg`Opens alt text dialog`)
}
size="small"
color="secondary"
@@ -56,7 +56,7 @@ export function SubtitleFilePicker({
<View style={a.flex_row}>
<Button
onPress={handleClick}
label={_('Select subtitle file (.vtt)')}
label={_(msg`Select subtitle file (.vtt)`)}
size="large"
color="primary"
variant="solid"
+1 -1
View File
@@ -191,7 +191,7 @@ let ProfileMenu = ({
return (
<EventStopper onKeyDown={false}>
<Menu.Root>
<Menu.Trigger label={_(`More options`)}>
<Menu.Trigger label={_(msg`More options`)}>
{({props}) => {
return (
<Button
+1 -1
View File
@@ -413,7 +413,7 @@ let EditableUserAvatar = ({
<Menu.Group>
<Menu.Item
testID="changeAvatarRemoveBtn"
label={_(`Remove Avatar`)}
label={_(msg`Remove Avatar`)}
onPress={onRemoveAvatar}>
<Menu.ItemText>
<Trans>Remove Avatar</Trans>
+1 -1
View File
@@ -149,7 +149,7 @@ export function UserBanner({
<Menu.Group>
<Menu.Item
testID="changeBannerRemoveBtn"
label={_(`Remove Banner`)}
label={_(msg`Remove Banner`)}
onPress={onRemoveBanner}>
<Menu.ItemText>
<Trans>Remove Banner</Trans>