[TTS] Detect the content language for translation.
Detects the language of the selection whenever it is set instead of waiting for the resolve request to return. This allows the translation to be done during the Resolve request for the ContextualSearchTranslations experiment. Also update the logic for detecting the language. Try to detect the language of the selection first, and if that's not reliable then run the detector on the whole context. BUG=952401 Change-Id: I17886528f8b4c3468762fb1bcde0c27b234549d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2029262 Auto-Submit: Donn Denman <donnd@chromium.org> Commit-Queue: Theresa <twellington@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Reviewed-by:
Jinsuk Kim <jinsukkim@chromium.org> Cr-Commit-Position: refs/heads/master@{#738566}
Showing
Please register or sign in to comment