From 723a8402ab209e881d2e7fac91d3da54096a83f8 Mon Sep 17 00:00:00 2001 From: zonble Date: Thu, 11 Nov 2021 00:14:49 +0800 Subject: [PATCH] Fixes typos. --- Source/InputMethodController.h | 4 ++-- Source/InputMethodController.mm | 18 +++++++++--------- Source/en.lproj/Localizable.strings | 2 ++ Source/zh-Hant.lproj/Localizable.strings | 2 ++ 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/Source/InputMethodController.h b/Source/InputMethodController.h index e3f3e57b..8741cbed 100644 --- a/Source/InputMethodController.h +++ b/Source/InputMethodController.h @@ -69,8 +69,8 @@ // current input mode NSString *_inputMode; - // if Chinese convertion is enabled - BOOL _chineseConvertionEnabled; + // if Chinese conversion is enabled + BOOL _chineseConversionEnabled; } @end diff --git a/Source/InputMethodController.mm b/Source/InputMethodController.mm index 081a5647..7d664553 100644 --- a/Source/InputMethodController.mm +++ b/Source/InputMethodController.mm @@ -78,7 +78,7 @@ static NSString *const kUseHorizontalCandidateListPreferenceKey = @"UseHorizonta static NSString *const kComposingBufferSizePreferenceKey = @"ComposingBufferSize"; static NSString *const kDisableUserCandidateSelectionLearning = @"DisableUserCandidateSelectionLearning"; static NSString *const kChooseCandidateUsingSpaceKey = @"ChooseCandidateUsingSpaceKey"; -static NSString *const kChineseConvertionEnanledKey = @"ChineseConvertionEnanledKey"; +static NSString *const kChineseConversionEnabledKey = @"ChineseConversionEnabledKey"; // advanced (usually optional) settings static NSString *const kCandidateTextFontName = @"CandidateTextFontName"; @@ -195,7 +195,7 @@ public: } _inputMode = kBopomofoModeIdentifier; - _chineseConvertionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:kChineseConvertionEnanledKey]; + _chineseConversionEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:kChineseConversionEnabledKey]; } return self; @@ -232,10 +232,10 @@ public: } #endif //DEBUG - NSMenuItem *chineseConvertionMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Chinese Convertion", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"G"]; - chineseConvertionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand | NSEventModifierFlagControl; - chineseConvertionMenuItem.state = _chineseConvertionEnabled ? NSControlStateValueOn : NSControlStateValueOff; - [menu addItem:chineseConvertionMenuItem]; + NSMenuItem *chineseConversionMenuItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Chinese Conversion", @"") action:@selector(toggleChineseConverter:) keyEquivalent:@"G"]; + chineseConversionMenuItem.keyEquivalentModifierMask = NSEventModifierFlagCommand | NSEventModifierFlagControl; + chineseConversionMenuItem.state = _chineseConversionEnabled ? NSControlStateValueOn : NSControlStateValueOff; + [menu addItem:chineseConversionMenuItem]; NSMenuItem *updateCheckItem = [[NSMenuItem alloc] initWithTitle:NSLocalizedString(@"Check for Updates…", @"") action:@selector(checkForUpdate:) keyEquivalent:@""]; [menu addItem:updateCheckItem]; @@ -395,7 +395,7 @@ public: } NSString *buffer = _composingBuffer; - if (_chineseConvertionEnabled) { + if (_chineseConversionEnabled) { buffer = [OpenCCBridge convert:_composingBuffer]; } @@ -1441,8 +1441,8 @@ public: - (void)toggleChineseConverter:(id)sender { - _chineseConvertionEnabled = !_chineseConvertionEnabled; - [[NSUserDefaults standardUserDefaults] setBool:_chineseConvertionEnabled forKey:kChineseConvertionEnanledKey]; + _chineseConversionEnabled = !_chineseConversionEnabled; + [[NSUserDefaults standardUserDefaults] setBool:_chineseConversionEnabled forKey:kChineseConversionEnabledKey]; } - (void)clearLearningDictionary:(id)sender diff --git a/Source/en.lproj/Localizable.strings b/Source/en.lproj/Localizable.strings index ed0452a5..0acd9b67 100644 --- a/Source/en.lproj/Localizable.strings +++ b/Source/en.lproj/Localizable.strings @@ -48,3 +48,5 @@ /* No comment provided by engineer. */ "You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@"; + +"Chinese Conversion" = "Chinese Conversion"; diff --git a/Source/zh-Hant.lproj/Localizable.strings b/Source/zh-Hant.lproj/Localizable.strings index 791d39d1..4ac965ae 100644 --- a/Source/zh-Hant.lproj/Localizable.strings +++ b/Source/zh-Hant.lproj/Localizable.strings @@ -48,3 +48,5 @@ /* No comment provided by engineer. */ "You're currently using McBopomofo %@ (%@), a new version %@ (%@) is now available. Do you want to visit McBopomofo's website to download the version?%@" = "目前使用的小麥注音版本是 %1$@ (%2$@),網路上有更新版本 %3$@ (%4$@) 可供下載。是否要前往小麥注音網站下載新版來安裝?%5$@"; + +"Chinese Conversion" = "簡繁轉換";