diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index 44335a86..89f64271 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -138,9 +138,11 @@ static double FindHighestScore(const vector& nodes, double epsilon) [menu addItemWithTitle:NSLocalizedString(@"vChewing Preferences", @"") action:@selector(showPreferences:) keyEquivalent:@""]; - NSMenuItem *chineseConversionMenuItem = [menu addItemWithTitle:NSLocalizedString(@"Chinese Conversion", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"K"]; - chineseConversionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand | NSEventModifierFlagControl; - chineseConversionMenuItem.state = Preferences.chineseConversionEnabled ? NSControlStateValueOn : NSControlStateValueOff; + if ((_inputMode == kBopomofoModeIdentifierCHT) && optionKeyPressed) { + NSMenuItem *chineseConversionMenuItem = [menu addItemWithTitle:NSLocalizedString(@"Force KangXi Writing", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"K"]; + chineseConversionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand | NSEventModifierFlagControl; + chineseConversionMenuItem.state = Preferences.chineseConversionEnabled ? NSControlStateValueOn : NSControlStateValueOff; + } NSMenuItem *halfWidthPunctuationMenuItem = [menu addItemWithTitle:NSLocalizedString(@"Use Half-Width Punctuations", @"") action:@selector(toggleHalfWidthPunctuation:) keyEquivalent:@""]; halfWidthPunctuationMenuItem.state = Preferences.halfWidthPunctuationEnabled ? NSControlStateValueOn : NSControlStateValueOff; @@ -1477,8 +1479,10 @@ NS_INLINE size_t max(size_t a, size_t b) { return a > b ? a : b; } - (void)toggleChineseConverter:(id)sender { - BOOL chineseConversionEnabled = [Preferences toggleChineseConversionEnabled]; - [NotifierController notifyWithMessage:[NSString stringWithFormat:@"%@%@%@", NSLocalizedString(@"Chinese Conversion", @""), @"\n", chineseConversionEnabled ? NSLocalizedString(@"NotificationSwitchON", @"") : NSLocalizedString(@"NotificationSwitchOFF", @"")] stay:NO]; + if (_inputMode == kBopomofoModeIdentifierCHT) { + BOOL chineseConversionEnabled = [Preferences toggleChineseConversionEnabled]; + [NotifierController notifyWithMessage:[NSString stringWithFormat:@"%@%@%@", NSLocalizedString(@"Force KangXi Writing", @""), @"\n", chineseConversionEnabled ? NSLocalizedString(@"NotificationSwitchON", @"") : NSLocalizedString(@"NotificationSwitchOFF", @"")] stay:NO]; + } } - (void)toggleHalfWidthPunctuation:(id)sender diff --git a/Source/en.lproj/Localizable.strings b/Source/en.lproj/Localizable.strings index 31e4e6b3..98c255ef 100644 --- a/Source/en.lproj/Localizable.strings +++ b/Source/en.lproj/Localizable.strings @@ -16,7 +16,7 @@ "Not Now" = "Not Now"; "Visit Website" = "Visit Website"; "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@"; -"Chinese Conversion" = "Convert zh-TW Kanji to KangXi Variants"; +"Force KangXi Writing" = "Force KangXi Writing"; "NotificationSwitchON" = "✔ ON"; "NotificationSwitchOFF" = "✘ OFF"; "Edit User Phrases" = "Edit User Phrases"; diff --git a/Source/zh-Hans.lproj/Localizable.strings b/Source/zh-Hans.lproj/Localizable.strings index ed319283..a21f485e 100644 --- a/Source/zh-Hans.lproj/Localizable.strings +++ b/Source/zh-Hans.lproj/Localizable.strings @@ -16,7 +16,7 @@ "Not Now" = "以后再说"; "Visit Website" = "前往网站"; "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音官方版本是 %1$@ (%2$@),网路上有更新版本 %3$@ (%4$@) 可供下载。是否要前往威注音网站下载新版来安装?%5$@"; -"Chinese Conversion" = "优先使用康熙繁体字"; +"Force KangXi Writing" = "康熙繁体字模式"; "NotificationSwitchON" = "✔ 已启用"; "NotificationSwitchOFF" = "✘ 已停用"; "Edit User Phrases" = "编辑自订语汇"; diff --git a/Source/zh-Hant.lproj/Localizable.strings b/Source/zh-Hant.lproj/Localizable.strings index 1cdb5d72..906b742b 100644 --- a/Source/zh-Hant.lproj/Localizable.strings +++ b/Source/zh-Hant.lproj/Localizable.strings @@ -16,7 +16,7 @@ "Not Now" = "以後再說"; "Visit Website" = "前往網站"; "You're currently using vChewing %@ (%@), a new version %@ (%@) is now available. Do you want to visit vChewing's website to download the version?%@" = "目前使用的威注音官方版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往威注音網站下載新版來安裝?%5$@"; -"Chinese Conversion" = "優先使用康熙繁體字"; +"Force KangXi Writing" = "康熙繁體字模式"; "NotificationSwitchON" = "✔ 已啟用"; "NotificationSwitchOFF" = "✘ 已停用"; "Edit User Phrases" = "編輯自訂語彙";