From e4aa0b7a1180cbef20dd36767146675259ac49f4 Mon Sep 17 00:00:00 2001
From: uye <99072975+ABA2396@users.noreply.github.com>
Date: Tue, 20 May 2025 16:55:19 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20Placeholder=20?=
=?UTF-8?q?=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/MaaWpfGui/Res/Localizations/en-us.xaml | 1 +
src/MaaWpfGui/Res/Localizations/ja-jp.xaml | 1 +
src/MaaWpfGui/Res/Localizations/ko-kr.xaml | 1 +
src/MaaWpfGui/Res/Localizations/zh-cn.xaml | 1 +
src/MaaWpfGui/Res/Localizations/zh-tw.xaml | 1 +
.../Settings/VersionUpdateSettingsUserControlModel.cs | 6 ++++++
.../Settings/VersionUpdateSettingsUserControl.xaml | 2 +-
7 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/MaaWpfGui/Res/Localizations/en-us.xaml b/src/MaaWpfGui/Res/Localizations/en-us.xaml
index 5387ab509d..ed855e1301 100644
--- a/src/MaaWpfGui/Res/Localizations/en-us.xaml
+++ b/src/MaaWpfGui/Res/Localizations/en-us.xaml
@@ -286,6 +286,7 @@ You can cancel this popup by clicking the Settings - Issue Report link. Thank yo
Force using GitHub
MirrorChyan
Fill after switching source
+ Please enter CDK
Please go to 「Settings - Update Settings」 to configure MirrorChyan CDK or switch to Global Source.
Resource update {0} detected. Please go to 「Settings- Update Settings - Resource Update」 to update manually, or fill in MirrorChayn CDK to update automatically.
Resource update {0} detected
diff --git a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
index f74b869f83..beb4d033c6 100644
--- a/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ja-jp.xaml
@@ -287,6 +287,7 @@
GitHub を強制使用
MirrorChyan
更新ソース切替後入力
+ CDKを入力してください
「設定 - 更新設定」 に移動して MirrorChyan CDK を設定するか、グローバル ソースに切り替えてください。
リソース更新 {0} が検出されました。「設定 - 更新設定 - リソース更新」 に移動して手動で更新するか、MirrorChayn CDK を入力して自動的に更新してください。
リソース更新 {0} が検出されました
diff --git a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
index 8f4fa06667..5186f63ae5 100644
--- a/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
+++ b/src/MaaWpfGui/Res/Localizations/ko-kr.xaml
@@ -286,6 +286,7 @@
GitHub 강제 사용
MirrorChyan
소스 전환 후 입력
+ CDK를 입력해 주세요
「설정 - 업데이트 설정」 으로 이동하여 MirrorChyan CDK를 구성하거나 글로벌 소스로 전환하세요.
리소스 업데이트 {0}이 감지되었습니다. 「설정 - 업데이트 설정 - 리소스 업데이트」 로 이동하여 수동으로 업데이트하거나, MirrorChyan CDK를 입력하여 자동으로 업데이트하세요.
리소스 업데이트 {0}이 감지되었습니다
diff --git a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
index 0faa7dd71f..111a7bdb3d 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-cn.xaml
@@ -287,6 +287,7 @@
强制使用 GitHub
Mirror酱
切换更新源后填写
+ 请输入 CDK
请前往 「设置-更新设置」 配置 Mirror酱 CDK 或切换海外源。
检测到资源更新: {0}。请前往 「设置-更新设置-资源更新」 手动更新,或配置 Mirror酱 CDK 以自动更新。
检测到资源更新: {0}
diff --git a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
index 1d4b3c2893..43339ab1d5 100644
--- a/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
+++ b/src/MaaWpfGui/Res/Localizations/zh-tw.xaml
@@ -286,6 +286,7 @@
強制使用 GitHub
MirrorChyan
切換更新源後填寫
+ 請輸入 CDK
請前往 「設定-更新設定」 設定 MirrorChyan CDK 或切換到全域來源。
偵測到資源更新: {0}。請前往 「設定-更新設定-資源更新」 手動更新,或設定 MirrorChayn CDK 以自動更新。
偵測到資源更新: {0}
diff --git a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs
index dc7d9ac0b8..34de451398 100644
--- a/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs
+++ b/src/MaaWpfGui/ViewModels/UserControl/Settings/VersionUpdateSettingsUserControlModel.cs
@@ -272,6 +272,7 @@ public class VersionUpdateSettingsUserControlModel : PropertyChangedBase
{
SetAndNotify(ref _updateSource, value);
ConfigurationHelper.SetGlobalValue(ConfigurationKeys.UpdateSource, value);
+ NotifyOfPropertyChange(nameof(MirrorChyanCdkPlaceholder));
}
}
@@ -313,6 +314,11 @@ public class VersionUpdateSettingsUserControlModel : PropertyChangedBase
}
}
+ public string MirrorChyanCdkPlaceholder =>
+ UpdateSource != "MirrorChyan"
+ ? LocalizationHelper.GetString("MirrorChyanCdkPlaceholder")
+ : LocalizationHelper.GetString("MirrorChyanCdkPlaceholder2");
+
private bool _startupUpdateCheck = Convert.ToBoolean(ConfigurationHelper.GetGlobalValue(ConfigurationKeys.StartupUpdateCheck, bool.TrueString));
///
diff --git a/src/MaaWpfGui/Views/UserControl/Settings/VersionUpdateSettingsUserControl.xaml b/src/MaaWpfGui/Views/UserControl/Settings/VersionUpdateSettingsUserControl.xaml
index a8623b02bc..f76cebdaa2 100644
--- a/src/MaaWpfGui/Views/UserControl/Settings/VersionUpdateSettingsUserControl.xaml
+++ b/src/MaaWpfGui/Views/UserControl/Settings/VersionUpdateSettingsUserControl.xaml
@@ -137,7 +137,7 @@
Width="150"
HorizontalAlignment="Left"
VerticalAlignment="Center"
- hc:InfoElement.Placeholder="{DynamicResource MirrorChyanCdkPlaceholder}"
+ hc:InfoElement.Placeholder="{Binding MirrorChyanCdkPlaceholder}"
IsEnabled="{c:Binding 'UpdateSource == "MirrorChyan"'}"
IsSafeEnabled="False"
ShowEyeButton="True"