From 093667368964e9c6339cd3c38ca08c41b6b82e18 Mon Sep 17 00:00:00 2001 From: HinGwenWoong Date: Wed, 19 Jan 2022 10:20:56 +0800 Subject: [PATCH] Optimize discardChangesDialog attention message when using chinese as language. --- PPOCRLabel/PPOCRLabel.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PPOCRLabel/PPOCRLabel.py b/PPOCRLabel/PPOCRLabel.py index 98e2b1ef..ee8baeb7 100644 --- a/PPOCRLabel/PPOCRLabel.py +++ b/PPOCRLabel/PPOCRLabel.py @@ -1790,7 +1790,10 @@ class MainWindow(QMainWindow, WindowMixin): def discardChangesDialog(self): yes, no, cancel = QMessageBox.Yes, QMessageBox.No, QMessageBox.Cancel - msg = u'You have unsaved changes, would you like to save them and proceed?\nClick "No" to undo all changes.' + if self.lang == 'ch': + msg = u'您有未保存的变更, 您想保存再继续吗?\n点击 "No" 丢弃所有未保存的变更.' + else: + msg = u'You have unsaved changes, would you like to save them and proceed?\nClick "No" to undo all changes.' return QMessageBox.warning(self, u'Attention', msg, yes | no | cancel) def errorMessage(self, title, message): -- GitLab