返回 DeepSeek-Reasonix
tray_common.go
根目录 / desktop / tray_common.go
1 package main
2
3 func (a *App) trayLocale() string {
4 cfg, _, err := a.loadDesktopUserConfigForView()
5 if err != nil {
6 return ""
7 }
8 return cfg.DesktopLanguage()
9 }
10
11 func (a *App) showFromTray() {
12 a.showMainWindowFrom("tray")
13 }
14
15 func (a *App) quitFromTray() {
16 a.quitApp()
17 }
18
19 type trayLabels struct {
20 openTitle string
21 openTooltip string
22 quitTitle string
23 quitTooltip string
24 }
25
26 func trayMenuLabels(locale string) trayLabels {
27 if locale == "zh" {
28 return trayLabels{
29 openTitle: "打开",
30 openTooltip: "打开 Reasonix 窗口",
31 quitTitle: "退出",
32 quitTooltip: "退出 Reasonix",
33 }
34 }
35 return trayLabels{
36 openTitle: "Open",
37 openTooltip: "Open the Reasonix window",
38 quitTitle: "Quit",
39 quitTooltip: "Quit Reasonix",
40 }
41 }
42
42 lines GO