i18n tts error message
This commit is contained in:
parent
28f830730e
commit
1ee4385fcf
@ -40,3 +40,4 @@ errors-unable-open-collection =
|
||||
Anki was unable to open your collection file. If problems persist after restarting your computer, please use the Open Backup button in the profile manager.
|
||||
|
||||
Debug info:
|
||||
errors-windows-tts-runtime-error = The TTS service failed. Please ensure Windows updates are installed, try restarting your computer, and try using a different voice.
|
||||
|
@ -41,7 +41,7 @@ from anki.sound import AVTag, TTSTag
|
||||
from anki.utils import checksum, isWin, tmpdir
|
||||
from aqt import gui_hooks
|
||||
from aqt.sound import OnDoneCallback, SimpleProcessPlayer
|
||||
from aqt.utils import tooltip
|
||||
from aqt.utils import tooltip, tr
|
||||
|
||||
|
||||
@dataclass
|
||||
@ -569,10 +569,7 @@ if isWin:
|
||||
try:
|
||||
ret.result()
|
||||
except RuntimeError:
|
||||
# fixme: i18n if this turns out to happen frequently
|
||||
tooltip(
|
||||
"TTS failed to play. Please check available languages in system settings."
|
||||
)
|
||||
tooltip(tr.errors_windows_tts_runtime_error())
|
||||
return
|
||||
|
||||
# inject file into the top of the audio queue
|
||||
|
Loading…
Reference in New Issue
Block a user