Skip to content

Commit

Permalink
<fix> fix unable to remember source/target language when the config d…
Browse files Browse the repository at this point in the history
…oes not exist
  • Loading branch information
anonymousException committed Jun 10, 2024
1 parent a25318e commit dba9887
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,15 @@ def get_default_langauge():
if __name__ == "__main__":
multiprocessing.freeze_support()
app = QApplication(sys.argv)

if not os.path.isfile('engine.txt'):
f = io.open('engine.txt', 'w', encoding='utf-8')
data = {"engine": engineList[0], "key": '',
"secret": '',
engineList[0] + '_key': '',
engineList[0] + '_secret': '',
}
json.dump(data, f)
f.close()
if os.path.isfile('language.txt'):
f = io.open('language.txt', 'r', encoding='utf-8')
lan = f.read()
Expand Down

0 comments on commit dba9887

Please sign in to comment.