Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mobile): choose the dictation language for voice input #29689

Openjokaperes(GitHub profile, opens in a new tab)wants to merge 16 commits intomain fromrefs/pull/29689/headopened View on GitHub

Showing 21 changed files with 58 additions and 10 deletions (loading 18).

x
0 of 21 viewed, 21 left
33 additions and 0 deletionsapps/mobile/src/features/settings/SettingsVoiceRouteScreen.tsxModified
View file
@@ -11,6 +11,7 @@
import { type AppSymbolName } from "../../components/ui/AppSymbol";
import { AppText as Text } from "../../components/ui/AppText";
import { cn } from "../../lib/cn";
+import { DICTATION_LANGUAGES } from "../../lib/dictationLanguage";
import { m } from "../../i18n/messages";
import { makePermissionStatusAtom } from "../../lib/permissionStatusAtom";
import {
@@ -38,6 +39,7 @@
import type { EnvironmentId } from "@t3tools/contracts";
import { ThreadSwipeable } from "../home/thread-swipe-actions";
import { ListActionRow as SettingsActionRow } from "../../components/ui/ListActionRow";
+import { ListChoiceRow as SettingsChoiceRow } from "../../components/ui/ListChoiceRow";
import { SettingsDragHandle } from "./components/SettingsDragHandle";
import { SettingsScreen } from "./components/SettingsScreen";
import { SettingsSection } from "./components/SettingsSection";
@@ -246,6 +248,9 @@
const entries = deviceMicrophoneOrder(
AsyncResult.isSuccess(preferencesResult) ? preferencesResult.value.microphones : undefined,
+ const dictationLocale = AsyncResult.isSuccess(preferencesResult)
+ ? (preferencesResult.value.dictationLocale ?? null)
+ : null;
const { permission, request: requestPermission } = useMicrophonePermission();
const [drag, setDrag] = useState<{ readonly key: string; readonly translation: number } | null>(
null,
@@ -406,6 +411,34 @@