From fe4e2851f7cf91a3f2681b81b8c28555ac9dedf0 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 3 Jul 2026 22:28:35 -0300 Subject: [PATCH] fix: refresh recognition.lang before dictation start After a runtime locale change (setLocale from Settings), the cached recognition object retains its boot-time lang, causing dictation to run in the wrong language. Set lang immediately before .start() at the plain dictation path in _startMicCapture, matching the pattern already used in _ensureSpeechRecognition(). Closes #5483 --- static/boot.js | 1 + 1 file changed, 1 insertion(+) diff --git a/static/boot.js b/static/boot.js index 529b12d6..d1f71deb 100644 --- a/static/boot.js +++ b/static/boot.js @@ -930,6 +930,7 @@ function _micToastKeyForRecognitionError(error){ } if(recognition && !_forceMediaRecorder && !_rawAudioMode){ _activeCaptureMode='speech'; + recognition.lang=(typeof _locale!=='undefined'&&_locale._speech)||'en-US'; recognition.start(); _setRecording(true); return;