@@ -35,51 +35,51 @@ def zip_pack(self):
3535 QMessageBox .warning (self , "Packing failed" , "Please select the 7z.exe path first!" , QMessageBox .Ok )
3636 return
3737 elif len (self .serval_dict .keys ())<= 1 :
38- QMessageBox .warning (self , "Packing failed" , "请先打开有效的serval文件! " , QMessageBox .Ok )
38+ QMessageBox .warning (self , "Packing failed" , "Please open the serval file first! " , QMessageBox .Ok )
3939 return
4040 ZP = Ziputil (self .ziptool_Path , self .zip_Path )
4141 temp_path = os .path .splitext (self .zip_Path )[0 ]+ "_folder"
42- self .txt_display += "正在复制文件,操作时间可能较长,请耐心等待 " + '\n '
42+ self .txt_display += "Copying files, it may takes a long time, please wait. " + '\n '
4343 self .updatingTxtDisplay .emit ()
4444 ls = write_folder_from_dict (temp_path ,self .serval_dict )
4545 if len (ls )== 0 :
46- self .txt_display += "复制完成 " + '\n '
46+ self .txt_display += "Copying complete! " + '\n '
4747 else :
48- self .txt_display += "以下文件没有找到 :\n "
48+ self .txt_display += "The following files missing :\n "
4949 for item in ls :
5050 self .txt_display += item
5151 self .txt_display += '\n '
5252 self .updatingTxtDisplay .emit ()
53- self .txt_display += "正在执行压缩,操作时间可能较长,请耐心等待 " + '\n '
53+ self .txt_display += "Compressing files, it may takes a long time, please wait. " + '\n '
5454 self .updatingTxtDisplay .emit ()
5555 code = ZP .genzipfile (temp_path )
5656 if code == 0 :
57- self .txt_display += "压缩完成,文件已保存到 :" + self .zip_Path + '\n '
57+ self .txt_display += "Compressing complete! Saved 7z file to :" + self .zip_Path + '\n '
5858 self .updatingTxtDisplay .emit ()
5959 else :
60- self .txt_display += "压缩出错,请确保7z.exe正常工作 " + '\n '
60+ self .txt_display += "Compressing failed! Please make sure 7z.exe works as expected. " + '\n '
6161 self .updatingTxtDisplay .emit ()
6262
6363 def updateTxtDisplay (self ):
6464 self .txtOut .setPlainText (self .txt_display )
6565 def select_serval (self ):
66- file_path_diag = QFileDialog .getOpenFileName (self , "打开文件 " , "C:/Users/" ,
66+ file_path_diag = QFileDialog .getOpenFileName (self , "Open File " , "C:/Users/" ,
6767 "serval files (*.serval);;all files(*.*)" )
6868 file_path = file_path_diag [0 ]
6969 print (file_path )
7070 try :
7171 with open (file_path , encoding = 'utf-8' ) as f :
7272 file_read = f .read ()
7373 except Exception as e :
74- QMessageBox .warning (self , "打开文件失败 " , "无法打开文件 :" + file_path , QMessageBox .Ok )
74+ QMessageBox .warning (self , "Opening File Failed " , "Cannot open the file :" + file_path , QMessageBox .Ok )
7575 return False
7676 serval_decrypt = decrypt (DEF .ENCRYPT_KEY ,file_read )
7777 if validateHeader (serval_decrypt )!= 0 :
78- QMessageBox .warning (self , "文件校验失败 " , "以下文件不是合法的serval文件 :" + file_path , QMessageBox .Ok )
78+ QMessageBox .warning (self , "Validation Failed " , "Serval file illegal :" + file_path , QMessageBox .Ok )
7979 return False
8080 self .serval_dict = load_serval (decrypt (DEF .ENCRYPT_KEY ,file_read ))
81- self .txt_display += "已打开serval文件 :" + file_path + '\n '
82- self .txt_display += "将打包以下文件 :" + '\n '
81+ self .txt_display += "Serval file opened :" + file_path + '\n '
82+ self .txt_display += "Compressing the following files :" + '\n '
8383 for key in self .serval_dict .keys ():
8484 if key != 'label_line' :
8585 path = self .serval_dict [key ]['path' ]
@@ -88,12 +88,12 @@ def select_serval(self):
8888 self .updatingTxtDisplay .emit ()
8989 return True
9090 def select_zip (self ):
91- file_path_diag = QFileDialog .getOpenFileName (self , "打开文件 " , "C:/Users/" ,
91+ file_path_diag = QFileDialog .getOpenFileName (self , "Open File " , "C:/Users/" ,
9292 "exe files (*.exe);;all files(*.*)" )
9393 file_path = file_path_diag [0 ]
9494 if file_path != "" :
9595 self .ziptool_Path = file_path
96- self .txt_display += "将使用以下位置的7z工具 :" + file_path + '\n '
96+ self .txt_display += "Using the following 7z.exe file :" + file_path + '\n '
9797 self .updatingTxtDisplay .emit ()
9898
9999
0 commit comments