From 2a1d917243eb89660c837cffc4dc4d59723a041c Mon Sep 17 00:00:00 2001 From: Vic <10308169+VictoriousRaptor@users.noreply.github.com> Date: Wed, 23 Nov 2022 20:01:48 +0800 Subject: [PATCH] Translate hard-coded English text in Pinyin dialog --- Flow.Launcher.Core/Resource/Internationalization.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Flow.Launcher.Core/Resource/Internationalization.cs b/Flow.Launcher.Core/Resource/Internationalization.cs index 5c99bc239..4568e92f3 100644 --- a/Flow.Launcher.Core/Resource/Internationalization.cs +++ b/Flow.Launcher.Core/Resource/Internationalization.cs @@ -115,7 +115,11 @@ namespace Flow.Launcher.Core.Resource if (languageToSet != AvailableLanguages.Chinese && languageToSet != AvailableLanguages.Chinese_TW) return false; - if (MessageBox.Show("Do you want to turn on search with Pinyin?", string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No) + // No other languages should show the following text so just make it hard-coded + // "Do you want to search with pinyin?" + string text = languageToSet == AvailableLanguages.Chinese ? "是否启用拼音搜索?" : "是否啓用拼音搜索?" ; + + if (MessageBox.Show(text, string.Empty, MessageBoxButton.YesNo) == MessageBoxResult.No) return false; return true; @@ -221,4 +225,4 @@ namespace Flow.Launcher.Core.Resource } } } -} \ No newline at end of file +}