Skip to content

Commit

Permalink
feat: add restart tip after changing language
Browse files Browse the repository at this point in the history
  • Loading branch information
hank9999 committed Mar 4, 2024
1 parent e5b7a6c commit 8684060
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import os
import sys
import tkinter as tk
from tkinter import messagebox

import ttkbootstrap as ttk
import configparser
from const_vars import FIRMWARE_VERSION_LIST, EEPROM_SIZE, FontType, LanguageType
Expand Down Expand Up @@ -142,6 +144,16 @@ def change_theme(_, theme_combo: ttk.Combobox):
def change_language(_, language_combo: ttk.Combobox):
global language
language = LanguageType.find_value(language_combo.get())
if language == LanguageType.SIMPLIFIED_CHINESE:
log('语言已更改为简体中文\n请重启程序以应用更改\n')
messagebox.showinfo('提示', '语言已更改为简体中文\n请重启程序以应用更改')
else:
log('Language has been changed to English\nPlease restart the program to apply the changes')
messagebox.showinfo(
'Prompt',
'Language has been changed to English\nPlease restart the program to apply the changes'
)



def main():
Expand Down

0 comments on commit 8684060

Please sign in to comment.