返回 DeepSeek-Reasonix
tray_test.go
根目录 / desktop / tray_test.go
1 package main
2
3 import "testing"
4
5 func TestTrayMenuLabelsFollowLocale(t *testing.T) {
6 zh := trayMenuLabels("zh")
7 if zh.openTitle != "打开" || zh.quitTitle != "退出" {
8 t.Fatalf("zh labels = %#v", zh)
9 }
10
11 en := trayMenuLabels("en")
12 if en.openTitle != "Open" || en.quitTitle != "Quit" {
13 t.Fatalf("en labels = %#v", en)
14 }
15
16 other := trayMenuLabels("fr")
17 if other.openTitle != en.openTitle || other.quitTitle != en.quitTitle {
18 t.Fatalf("unknown locale should fall back to English, got %#v", other)
19 }
20 }
21
21 lines GO