From 47103efa246f69bf1acbd6fc212a2202e7ba2c1c Mon Sep 17 00:00:00 2001
From: ABA2396 <2396806385@qq.com>
Date: Tue, 26 Jul 2022 14:54:56 +0800
Subject: [PATCH] feat: TrayIcon translation completed
---
src/MeoAsstGui/Helper/TrayIcon.cs | 6 +++---
src/MeoAsstGui/Resources/Localizations/en-us.xaml | 4 ++++
src/MeoAsstGui/Resources/Localizations/zh-cn.xaml | 4 ++++
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/MeoAsstGui/Helper/TrayIcon.cs b/src/MeoAsstGui/Helper/TrayIcon.cs
index 1bb67a79db..5e14b9ddae 100644
--- a/src/MeoAsstGui/Helper/TrayIcon.cs
+++ b/src/MeoAsstGui/Helper/TrayIcon.cs
@@ -40,9 +40,9 @@ namespace MeoAsstGui
notifyIcon.MouseDoubleClick += OnNotifyIconDoubleClick;
App.Current.MainWindow.StateChanged += MainWindow_StateChanged;
- MenuItem startMenu = new System.Windows.Forms.MenuItem("开始长草");
+ MenuItem startMenu = new System.Windows.Forms.MenuItem(Localization.GetString("Farming"));
startMenu.Click += StartTask;
- MenuItem stopMenu = new System.Windows.Forms.MenuItem("全部停止");
+ MenuItem stopMenu = new System.Windows.Forms.MenuItem(Localization.GetString("Stop"));
stopMenu.Click += StopTask;
MenuItem switchLangMenu = new System.Windows.Forms.MenuItem(Localization.GetString("SwitchLanguage"));
@@ -57,7 +57,7 @@ namespace MeoAsstGui
switchLangMenu.MenuItems.Add(langMenu);
}
- MenuItem exitMenu = new System.Windows.Forms.MenuItem("退出");
+ MenuItem exitMenu = new System.Windows.Forms.MenuItem(Localization.GetString("Exit"));
exitMenu.Click += App_exit;
System.Windows.Forms.MenuItem[] menuItems = new MenuItem[] { startMenu, stopMenu, switchLangMenu, exitMenu };
this.notifyIcon.ContextMenu = new System.Windows.Forms.ContextMenu(menuItems);
diff --git a/src/MeoAsstGui/Resources/Localizations/en-us.xaml b/src/MeoAsstGui/Resources/Localizations/en-us.xaml
index dacf1e13ba..8ce712365f 100644
--- a/src/MeoAsstGui/Resources/Localizations/en-us.xaml
+++ b/src/MeoAsstGui/Resources/Localizations/en-us.xaml
@@ -213,4 +213,8 @@
Trying to start the emulator
Please check the connection Settings or try to restart the computer
+
+
+ Exit
+
\ No newline at end of file
diff --git a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
index f000f437e2..b247584591 100644
--- a/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
+++ b/src/MeoAsstGui/Resources/Localizations/zh-cn.xaml
@@ -272,4 +272,8 @@
正在尝试启动模拟器
请检查连接设置或尝试重启电脑
+
+
+ 退出
+
\ No newline at end of file