Suggest post language correction (#2486)

* feat: suggested language

* fix: wording correction

* Factor out SuggestedLanguage into a separate component

* Tighten the language-suggestion confidence to avoid false positives

* Tweak the copy and UI

* Add function fallbacks for safari

---------

Co-authored-by: Mary <pineapplecreamcheese@skiff.com>
This commit is contained in:
Paul Frazee 2024-01-12 10:20:17 -08:00 committed by GitHub
parent 998ee29986
commit 95d771b3a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 111 additions and 0 deletions

View file

@ -45,6 +45,7 @@ import {Gallery} from './photos/Gallery'
import {MAX_GRAPHEME_LENGTH} from 'lib/constants'
import {LabelsBtn} from './labels/LabelsBtn'
import {SelectLangBtn} from './select-language/SelectLangBtn'
import {SuggestedLanguage} from './select-language/SuggestedLanguage'
import {insertMentionAt} from 'lib/strings/mention-manip'
import {Trans, msg} from '@lingui/macro'
import {useLingui} from '@lingui/react'
@ -454,6 +455,7 @@ export const ComposePost = observer(function ComposePost({
))}
</View>
) : null}
<SuggestedLanguage text={richtext.text} />
<View style={[pal.border, styles.bottomBar]}>
{canSelectImages ? (
<>