diff options
author | Ansh <anshnanda10@gmail.com> | 2023-11-20 13:29:27 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-20 13:29:27 -0800 |
commit | c5b6f88e9a694d79126af4f742e66833dfd528bd (patch) | |
tree | 0bfdc49ace558adc3d9d5a76fc4726f16f853d4e /src/view/com/util/forms | |
parent | 019aae5f01cb7b503d242917ae0092c2818f3b71 (diff) | |
download | voidsky-c5b6f88e9a694d79126af4f742e66833dfd528bd.tar.zst |
Hindi Internationalization (#1914)
* get basic hindi support to work * get web app language switcher in * Refactor i18n implementation and remove unused code * add missing strings * add dropdowns and modals missing strings * complete all hindi translations * fix merge conflicts * fix legeacy persisted state * fix data in RecommendedFeeds * fix lint
Diffstat (limited to 'src/view/com/util/forms')
-rw-r--r-- | src/view/com/util/forms/PostDropdownBtn.tsx | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/view/com/util/forms/PostDropdownBtn.tsx b/src/view/com/util/forms/PostDropdownBtn.tsx index 90a165ce7..889839d07 100644 --- a/src/view/com/util/forms/PostDropdownBtn.tsx +++ b/src/view/com/util/forms/PostDropdownBtn.tsx @@ -20,6 +20,8 @@ import {useMutedThreads, useToggleThreadMute} from '#/state/muted-threads' import {useLanguagePrefs} from '#/state/preferences' import {logger} from '#/logger' import {Shadow} from '#/state/cache/types' +import {msg} from '@lingui/macro' +import {useLingui} from '@lingui/react' import {useSession} from '#/state/session' export function PostDropdownBtn({ @@ -35,6 +37,7 @@ export function PostDropdownBtn({ }) { const {currentAccount} = useSession() const theme = useTheme() + const {_} = useLingui() const defaultCtrlColor = theme.palette.default.postCtrl const {openModal} = useModalControls() const langPrefs = useLanguagePrefs() @@ -91,7 +94,7 @@ export function PostDropdownBtn({ const dropdownItems: NativeDropdownItem[] = [ { - label: 'Translate', + label: _(msg`Translate`), onPress() { onOpenTranslate() }, @@ -105,7 +108,7 @@ export function PostDropdownBtn({ }, }, { - label: 'Copy post text', + label: _(msg`Copy post text`), onPress() { onCopyPostText() }, @@ -119,7 +122,7 @@ export function PostDropdownBtn({ }, }, { - label: 'Share', + label: _(msg`Share`), onPress() { const url = toShareUrl(href) shareUrl(url) @@ -137,7 +140,7 @@ export function PostDropdownBtn({ label: 'separator', }, { - label: isThreadMuted ? 'Unmute thread' : 'Mute thread', + label: isThreadMuted ? _(msg`Unmute thread`) : _(msg`Mute thread`), onPress() { onToggleThreadMute() }, @@ -154,7 +157,7 @@ export function PostDropdownBtn({ label: 'separator', }, !isAuthor && { - label: 'Report post', + label: _(msg`Report post`), onPress() { openModal({ name: 'report', @@ -175,12 +178,12 @@ export function PostDropdownBtn({ label: 'separator', }, isAuthor && { - label: 'Delete post', + label: _(msg`Delete post`), onPress() { openModal({ name: 'confirm', - title: 'Delete this post?', - message: 'Are you sure? This can not be undone.', + title: _(msg`Delete this post?`), + message: _(msg`Are you sure? This cannot be undone.`), onPressConfirm: onDeletePost, }) }, |