Skip to content

Commit 08888a3

Browse files
committed
feat: 自动更新切换中文
1 parent d673349 commit 08888a3

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

tray/systray.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,17 @@ func (m *Manager) onReady() {
222222
// dialog.Message("Failed to open control panel: %v", err).Title("Error").Error()
223223
// }
224224
case <-m.mRestartUpdate.ClickedCh:
225-
msg := "This will stop all servers and install the update. Continue?"
226-
title := "Confirm Update"
225+
var msg, title string
226+
if runtime.GOOS == "windows" {
227+
msg = "这将停止所有服务并安装更新,是否继续?"
228+
title = "Confirm Update"
229+
} else if runtime.GOOS == "darwin" {
230+
msg = "将停止所有服务并打开新版本安装包目录,请手动双击安装包完成升级。是否继续?"
231+
title = "Confirm Update"
232+
} else {
233+
msg = "这将停止所有服务并安装更新,是否继续?"
234+
title = "Confirm Update"
235+
}
227236
if confirmed := dialog.Message(msg).Title(title).YesNo(); confirmed {
228237
if err := m.performUpdate(); err != nil {
229238
dialog.Message("Failed to perform update: %v", err).Title("Error").Error()

0 commit comments

Comments
 (0)