hex/ios/HEXMobile
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ryan Vogel aed71be5d5 iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself
TestFlight build 56 testers saw translation stop "after a while" with no sign of why
(a Chinese tester: "翻译功能突然没办法用了,一开始可以"; another lost the Hex key menu's
Paste in Hindi / Paste in English pair and had to re-enable translation in Settings).
Every failure path in DictationTranslator returned nil, so the transcript went in as
spoken with nothing said: no language pack (never downloaded, removed in iOS Settings,
or still downloading), a pair Apple can't translate, a TranslationSession whose
translate() threw (internalError, as when Apple's Translate app is missing), and
build 56's "Paste in <source>" choice, which left pastesTranslation false while
Settings' switch still read on.

What changed:
- DictationTranslator.translate returns a TranslationOutcome (skipped, translated, or
  failed with a TranslationFailure: notDownloaded, unsupported, failed, plus Apple's
  error code, never the text). A failed translate() is tried once more in a new
  TranslationSession; a missing pack or unsupported pair isn't retried. Sessions are
  never kept. Apple's framework sits behind TranslationEngine so tests stand in for it.
- The failure rides DictationPipeline.Stages, KeyboardSnapshot (optional, old snapshots
  still decode) and in-keyboard dictation's finished phase. When the keyboard inserts
  such a dictation, both keyboards show "Couldn't translate, pasted as spoken" over the
  fix ("Download Chinese in Settings") for 8 s: the full keyboard's strip in the Full
  Access hint's shape with Open Hex, the dictation bar as a tappable two-line note.
  Both open hex-dictation://keyboard/translation (KeyboardLaunchRequest.translationSettings),
  which opens Settings › Dictation. VoiceOver announces it.
- Settings keeps the last failure (experiments.translateDictation.lastFailure) until a
  dictation translates, checks status for the pair that failed, refreshes it on
  foreground (packs can be removed meanwhile), and its Download button invalidates a
  repeated TranslationSession.Configuration, which translationTask otherwise never
  runs again after a cancelled download.
- One switch: removed the pastesTranslation setting, Settings' "Paste in English"
  toggle and KeyboardViewModel.pastesTranslation/isTranslating's paste half. A stored
  pastesTranslation=false from build 56 reads as off in Settings and the keyboard alike,
  and the next switch removes it, so the two never disagree again.
- zh-Hans strings for the new copy.

Verified: xcodebuild test on an iPhone 17 simulator (iOS 27.2), 515 tests, 0 failures,
new cases in HexKeyGestureTests (missing pack zh->en and en->zh, unsupported pair,
retry in a new session, 30 dictations with intermittent failures never sticking,
build 56's stored "as spoken", the pipeline both ways, the strip's note) and
KeyboardBridgeTests (snapshot round trip and old JSON, the launch URL). Screenshots of
both keyboards' notes in English and Chinese. The simulator reports Apple translation
unsupported on the device, so real downloads and sessions need an iPhone.
2026-11-21 06:29:59 -05:00
..
Assets.xcassets iOS: onboarding follows the desktop flow (#2136) 2026-11-21 03:27:38 +00:00
zh-Hans.lproj iOS: Simplified Chinese interface for the app, widgets and permission prompts (#2083) 2026-11-20 18:15:44 +00:00
AcknowledgementsView.swift iOS: German autocorrect capitalises common nouns (haus, auto, zeit) (#2169) 2026-11-21 05:30:03 -05:00
AppleSpeechTranscriber.swift iOS: never ask for Speech Recognition, and slides from 123 show the key preview (#2109) 2026-11-20 23:04:26 +00:00
AppShortcuts.xcstrings iOS: Simplified Chinese interface for the app, widgets and permission prompts (#2083) 2026-11-20 18:15:44 +00:00
AudioBackend.swift iOS: recording leaves the hardware sample rate alone, and the keepalive backs off (#2160) 2026-11-21 07:55:13 +00:00
ContentView.swift iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
CustomVocabularyEditor.swift iOS: Simplified Chinese interface for the app, widgets and permission prompts (#2083) 2026-11-20 18:15:44 +00:00
DictationController+LaunchFixtures.swift iOS: split DictationController so dev passes the size check (#2066) 2026-11-20 11:42:45 -05:00
DictationController.swift iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
EmojiSemanticIndex.swift iOS: emoji panel with on-device suggestions (Experiments › Emoji) (#2051) 2026-11-20 15:53:24 +00:00
FullKeyboardSnapshotStage.swift iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
HexIntents.swift feat(ios): polish iPhone keyboard dictation, warm sessions, and Live Activity (#574) 2026-10-30 23:35:45 -07:00
HexLinks.swift iOS: privacy and support links in the app, Continue before the mic prompt, typing logs consent (#2063) 2026-11-20 16:23:37 +00:00
HEXMobile.entitlements Set up Hex Mobile internal TestFlight releases (#1997) 2026-11-19 11:48:49 -05:00
HEXMobileApp.swift iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
Info.plist iOS: plain permission prompts and no pre-prompt Allow button, for App Review (#2058) 2026-11-20 16:13:36 +00:00
KeyboardPreviewHost.swift iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
KeyboardSetup.swift iOS: Full Access confirms on its own, and shows Off after a revoke (#2154) 2026-11-21 07:25:50 +00:00
KeyboardSpeechPreparation.swift iOS: onboarding follows the desktop flow (#2136) 2026-11-21 03:27:38 +00:00
LanguageSettingsRows.swift iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
LiveActivityCoordinator.swift iOS: fix six TestFlight tester issues (audio error, leaked error text, Live Activity, haptics, capitals, push to talk) (#2035) 2026-11-20 13:21:16 +00:00
Localizable.xcstrings iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
Onboarding.swift iOS: model preparation loads once, keeps moving, and survives the background (#2171) 2026-11-21 10:39:38 +00:00
OnboardingPieces.swift iOS: onboarding follows the desktop flow (#2136) 2026-11-21 03:27:38 +00:00
OnboardingProgress.swift iOS: onboarding follows the desktop flow (#2136) 2026-11-21 03:27:38 +00:00
ParakeetTranscriber.swift iOS: model preparation loads once, keeps moving, and survives the background (#2171) 2026-11-21 10:39:38 +00:00
PrivacyInfo.xcprivacy iOS: version 1.0, iPhone only, privacy manifests (#2052) 2026-11-20 15:54:01 +00:00
SettingsComponents.swift iOS: choose QWERTY, QWERTZ, AZERTY or Dvorak per keyboard language (#2172) 2026-11-21 10:41:12 +00:00
SettingsPages.swift iOS: German spatial autocorrect behind an experiment (#2161) 2026-11-21 03:10:49 -05:00
TranscriptCleanup.swift iOS: Simplified Chinese interface for the app, widgets and permission prompts (#2083) 2026-11-20 18:15:44 +00:00
TranslateDictationRow.swift iOS: Translate what I say says when it pastes as spoken, and nothing turns it off by itself 2026-11-21 06:29:59 -05:00
TypingInsightsView.swift iOS: Adaptive touch, personal key centres learned on device (Experiment, off by default) (#2146) 2026-11-21 06:13:04 +00:00
TypingLogsView.swift iOS: Simplified Chinese interface for the app, widgets and permission prompts (#2083) 2026-11-20 18:15:44 +00:00