From 26ef29ac4e6f80938febd53e59da88b5b65a307e Mon Sep 17 00:00:00 2001 From: CodeST <694468528@qq.com> Date: Mon, 17 Nov 2025 20:26:39 +0800 Subject: [PATCH] 1 --- Shared/Localization/en.lproj/Localizable.strings | 7 +++---- Shared/Localization/zh-Hans.lproj/Localizable.strings | 3 +++ keyBoard/Class/Guard/VC/KBGuideVC.m | 1 - keyBoard/Class/Login/VM/KBLoginVM.m | 6 +++--- keyBoard/Class/Search/VC/KBSearchVC.m | 1 + 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Shared/Localization/en.lproj/Localizable.strings b/Shared/Localization/en.lproj/Localizable.strings index cb83fc8..5cbdda9 100644 --- a/Shared/Localization/en.lproj/Localizable.strings +++ b/Shared/Localization/en.lproj/Localizable.strings @@ -27,9 +27,9 @@ "We'll use Apple for a quick, secure sign-in" = "We'll use Apple for a quick, secure sign-in"; "Sign in with Apple requires iOS 13 or later" = "Sign in with Apple requires iOS 13 or later"; "需要 iOS13+ 才能使用 Apple 登录" = "Sign in with Apple requires iOS 13 or later"; -"无效的登录凭证" = "Invalid login credential"; -"未返回 token" = "No token returned"; -"保存登录态失败" = "Failed to save login state"; +"Invalid login credential" = "Invalid login credential"; +"No token returned" = "No token returned"; +"Failed to save login state" = "Failed to save login state"; "请切换到主App完成登录" = "Please switch to the main app to finish signing in"; // Generic buttons & tips @@ -67,7 +67,6 @@ "Please check this app's wireless-data permission or network connection in Settings." = "Please check this app's wireless-data permission or network connection in Settings."; // Permission & guides -"使用引导" = "Usage Guide"; "Turn on Allow Full Access to experience all features" = "Turn on Allow Full Access to experience all features"; "Allow Full Access" = "Allow Full Access"; "Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access" = "Follow: Settings → General → Keyboard → Keyboards → %@ → Allow Full Access"; diff --git a/Shared/Localization/zh-Hans.lproj/Localizable.strings b/Shared/Localization/zh-Hans.lproj/Localizable.strings index ed41ebe..0e9f743 100644 --- a/Shared/Localization/zh-Hans.lproj/Localizable.strings +++ b/Shared/Localization/zh-Hans.lproj/Localizable.strings @@ -32,6 +32,9 @@ "保存登录态失败" = "保存登录态失败"; "请切换到主App完成登录" = "请切换到主App完成登录"; +// 英文 key 映射(用于代码中直接使用英文 key) +"Failed to save login state" = "保存登录态失败"; + // 通用按钮与提示 "好" = "好"; "确定" = "确定"; diff --git a/keyBoard/Class/Guard/VC/KBGuideVC.m b/keyBoard/Class/Guard/VC/KBGuideVC.m index 2e11c65..72e44c9 100644 --- a/keyBoard/Class/Guard/VC/KBGuideVC.m +++ b/keyBoard/Class/Guard/VC/KBGuideVC.m @@ -39,7 +39,6 @@ typedef NS_ENUM(NSInteger, KBGuideItemType) { - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor colorWithWhite:0.96 alpha:1.0]; -// self.title = KBLocalized(@"使用引导"); [self.view addSubview:self.tableView]; [self.view addSubview:self.inputBar]; diff --git a/keyBoard/Class/Login/VM/KBLoginVM.m b/keyBoard/Class/Login/VM/KBLoginVM.m index ab4f287..b67ed0d 100644 --- a/keyBoard/Class/Login/VM/KBLoginVM.m +++ b/keyBoard/Class/Login/VM/KBLoginVM.m @@ -30,7 +30,7 @@ [[AppleSignInManager shared] signInFromViewController:presenter completion:^(ASAuthorizationAppleIDCredential * _Nullable credential, NSError * _Nullable error) { if (error) { if (completion) completion(NO, error); return; } if (![credential isKindOfClass:[ASAuthorizationAppleIDCredential class]]) { - if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-1 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"无效的登录凭证")}]); + if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-1 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Invalid login credential")}]); return; } @@ -54,7 +54,7 @@ self.currentUser = user; NSString *token = user.token ?: [self.class tokenFromResponseObject:jsonOrData]; if (token.length == 0) { - if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-2 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"未返回 token")}]); + if (completion) completion(NO, [NSError errorWithDomain:@"KBLogin" code:-2 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"No token returned")}]); return; } @@ -63,7 +63,7 @@ refreshToken:nil expiryDate:nil userIdentifier:cred.user]; - if (completion) completion(ok, ok ? nil : [NSError errorWithDomain:@"KBLogin" code:-3 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"保存登录态失败")}]); + if (completion) completion(ok, ok ? nil : [NSError errorWithDomain:@"KBLogin" code:-3 userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Failed to save login state")}]); }]; }]; } diff --git a/keyBoard/Class/Search/VC/KBSearchVC.m b/keyBoard/Class/Search/VC/KBSearchVC.m index f4b9d28..787181a 100644 --- a/keyBoard/Class/Search/VC/KBSearchVC.m +++ b/keyBoard/Class/Search/VC/KBSearchVC.m @@ -413,6 +413,7 @@ typedef NS_ENUM(NSInteger, KBSearchSection) { _collectionView.backgroundColor = [UIColor whiteColor]; _collectionView.dataSource = self; _collectionView.delegate = self; + _collectionView.keyboardDismissMode = UIScrollViewKeyboardDismissModeOnDrag; // 注册 cell & header [_collectionView registerClass:KBTagCell.class forCellWithReuseIdentifier:kTagCellId]; [_collectionView registerClass:KBSkinCardCell.class forCellWithReuseIdentifier:kSkinCellId];