diff options
author | Stanislas Signoud <signez@stanisoft.net> | 2024-01-09 23:37:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-09 14:37:15 -0800 |
commit | 008893b911c354ea70fbb4ceacefe2dafc7567b9 (patch) | |
tree | 817a76b7a5a3b324db025b0d9c9c2647bde5ce6e /src/view/com/util/forms/PostDropdownBtn.tsx | |
parent | aeeacd10d322a6e599631c500de03172d69984de (diff) | |
download | voidsky-008893b911c354ea70fbb4ceacefe2dafc7567b9.tar.zst |
Internationalize more strings (#2440)
Co-authored-by: Ansh <anshnanda10@gmail.com>
Diffstat (limited to 'src/view/com/util/forms/PostDropdownBtn.tsx')
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 1f2e067c2..82373822e 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -71,32 +71,34 @@ let PostDropdownBtn = ({ const onDeletePost = React.useCallback(() => { postDeleteMutation.mutateAsync({uri: postUri}).then( () => { - Toast.show('Post deleted') + Toast.show(_(msg`Post deleted`)) }, e => { logger.error('Failed to delete post', {error: e}) - Toast.show('Failed to delete post, please try again') + Toast.show(_(msg`Failed to delete post, please try again`)) }, ) - }, [postUri, postDeleteMutation]) + }, [postUri, postDeleteMutation, _]) const onToggleThreadMute = React.useCallback(() => { try { const muted = toggleThreadMute(rootUri) if (muted) { - Toast.show('You will no longer receive notifications for this thread') + Toast.show( + _(msg`You will no longer receive notifications for this thread`), + ) } else { - Toast.show('You will now receive notifications for this thread') + Toast.show(_(msg`You will now receive notifications for this thread`)) } } catch (e) { logger.error('Failed to toggle thread mute', {error: e}) } - }, [rootUri, toggleThreadMute]) + }, [rootUri, toggleThreadMute, _]) const onCopyPostText = React.useCallback(() => { Clipboard.setString(record?.text || '') - Toast.show('Copied to clipboard') - }, [record]) + Toast.show(_(msg`Copied to clipboard`)) + }, [record, _]) const onOpenTranslate = React.useCallback(() => { Linking.openURL(translatorUrl) @@ -253,7 +255,7 @@ let PostDropdownBtn = ({ <NativeDropdown testID={testID} items={dropdownItems} - accessibilityLabel="More post options" + accessibilityLabel={_(msg`More post options`)} accessibilityHint=""> <View style={style}> <FontAwesomeIcon icon="ellipsis" size={20} color={defaultCtrlColor} /> |