Skip to content

Commit

Permalink
Fixed language change bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengwoody committed Jan 30, 2022
1 parent 3636470 commit 510682e
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions addon/installTasks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import os
from zipfile import ZipFile

import globalVars
import gui
import wx

def onInstall():
for path, import_path in [
(os.path.join(os.path.dirname(__file__), "core", "VE.zip"), os.path.join(globalVars.appArgs.configPath, "WorldVoice-workspace", "VE")),
(os.path.join(os.path.dirname(__file__), "core", "aisound.zip"), os.path.join(globalVars.appArgs.configPath, "WorldVoice-workspace", "aisound")),
(os.path.join(os.path.dirname(__file__), "voice", "voice.zip"), os.path.join(globalVars.appArgs.configPath, "WorldVoice-workspace")),
]:
try:
with ZipFile(path, 'r') as core_file:
core_file.testzip()
core_file.extractall(import_path)
os.remove(path)
except:
pass
else:
pass
1 change: 1 addition & 0 deletions addon/synthDrivers/WorldVoice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ def speak(self, speechSequence):
if isinstance(command, LangChangeCommand) or isinstance(command, WVLangChangeCommand):
unstables.insert(0, command)
stables.extend(unstables)
unstables.clear()
elif isinstance(command, str):
unstables.append(command)
stables.extend(unstables)
Expand Down

0 comments on commit 510682e

Please sign in to comment.