diff --git a/Shared/Localization/en.lproj/Localizable.strings b/Shared/Localization/en.lproj/Localizable.strings index a2a45a1..8eb0220 100644 --- a/Shared/Localization/en.lproj/Localizable.strings +++ b/Shared/Localization/en.lproj/Localizable.strings @@ -19,6 +19,12 @@ "current_lang" = "Current: %@"; "common_back" = "Back"; +// search +"Recommended Skin" = "Recommended Skin"; +"Historical Search" = "Historical Search"; +"Search Themes" = "Search Themes"; +"Search" = "Search"; + // Login & account "Log In" = "Log In"; "Signed in successfully" = "Signed in successfully"; @@ -31,8 +37,8 @@ "Invalid login credential" = "Invalid login credential"; "No token returned" = "No token returned"; "Failed to save login state" = "Failed to save login state"; -"登录已取消" = "Sign-in canceled"; -"请切换到主App完成登录" = "Please switch to the main app to finish signing in"; +"Sign-in canceled" = "Sign-in canceled"; +"Please switch to the key of love app to finish signing in" = "Please switch to the key of love app to finish signing in"; "Continue Via Email" = "Continue Via Email"; "Login With Email Password" = "Login With Email Password"; "Enter Email Address" = "Enter Email Address"; @@ -165,30 +171,6 @@ "Persona circle" = "Persona circle"; "Clear" = "Clear"; - -// Skin sample names -"极光" = "Aurora"; -"雪山" = "Snow Mountain"; -"湖面" = "Lake"; - -// Sample tags & copy -"高情商" = "High EQ"; -"暖味拉扯" = "Ambiguous flirting"; -"风趣幽默" = "Witty & humorous"; -"撩女生" = "Flirt with girls"; -"社交惬匿" = "Relaxed socializing"; -"情场高手" = "Dating expert"; -"一枚暖男" = "Warm-hearted guy"; -"聊天搭子" = "Chat buddy"; -"表达爱意" = "Express love"; -"更多话术" = "More prompts"; -"Tap to paste their message" = "Tap to paste their message"; -"Tap any conversation to paste, then try any reply style~" = "Tap any conversation to paste, then try any reply style~"; -"What are you doing?" = "What are you doing?"; -"I'm going to take a shower." = "I'm going to take a shower."; -"Welcome to use the [key of love] keyboard" = "Welcome to use the [key of love] keyboard"; -"👋 Welcome to Key of Love Keyboard" = "👋 Welcome to Key of Love Keyboard"; - // Payment & IAP "Payment successful" = "Payment successful"; "Payment failed" = "Payment failed"; diff --git a/Shared/Localization/zh-Hans.lproj/Localizable.strings b/Shared/Localization/zh-Hans.lproj/Localizable.strings index 2a630bd..dc4c1d6 100644 --- a/Shared/Localization/zh-Hans.lproj/Localizable.strings +++ b/Shared/Localization/zh-Hans.lproj/Localizable.strings @@ -19,6 +19,13 @@ "current_lang" = "当前:%@"; "common_back" = "返回"; +// search +"Recommended Skin" = "推荐皮肤"; +"Historical Search" = "历史搜索"; +"Search Themes" = "搜索主题"; +"Search" = "搜索"; + + // 登录与账号(以英文 key 为准) "Log In" = "登录"; "Signed in successfully" = "登录成功"; @@ -31,8 +38,8 @@ "Invalid login credential" = "无效的登录凭证"; "No token returned" = "未返回 token"; "Failed to save login state" = "保存登录态失败"; -"登录已取消" = "登录已取消"; -"请切换到主App完成登录" = "请切换到主App完成登录"; +"Sign-in canceled" = "登录已取消"; +"Please switch to the key of love app to finish signing in" = "请切换到Key of Love App完成登录"; "Continue Via Email" = "通过邮箱登录"; "Login With Email Password" = "使用邮箱密码登录"; "Enter Email Address" = "请输入邮箱地址"; @@ -166,27 +173,6 @@ "Clear" = "立刻清空"; // 皮肤示例名称 -"极光" = "极光"; -"雪山" = "雪山"; -"湖面" = "湖面"; - -// 示例标签与文案 -"高情商" = "高情商"; -"暖味拉扯" = "暖味拉扯"; -"风趣幽默" = "风趣幽默"; -"撩女生" = "撩女生"; -"社交惬匿" = "社交惬匿"; -"情场高手" = "情场高手"; -"一枚暖男" = "一枚暖男"; -"聊天搭子" = "聊天搭子"; -"表达爱意" = "表达爱意"; -"更多话术" = "更多话术"; -"点击粘贴TA的话" = "点击粘贴TA的话"; -"点击任一对话去粘贴,选择任意回复方式去试用吧~" = "点击任一对话去粘贴,选择任意回复方式去试用吧~"; -"在干嘛?" = "在干嘛?"; -"我去洗澡了" = "我去洗澡了"; -"🎉 如您遇到其他问题,可点击在线客服帮您解决~" = "🎉 如您遇到其他问题,可点击在线客服帮您解决~"; -"👋 欢迎使用『Lovekey 键盘』" = "👋 欢迎使用『Lovekey 键盘』"; // 支付与内购(英文 key) "Payment successful" = "支付成功"; diff --git a/keyBoard/Class/Manager/AppleSignInManager.m b/keyBoard/Class/Manager/AppleSignInManager.m index 34856e5..11a8a46 100644 --- a/keyBoard/Class/Manager/AppleSignInManager.m +++ b/keyBoard/Class/Manager/AppleSignInManager.m @@ -111,7 +111,7 @@ static NSString * const kKBAppleUserIdentifierKey = @"com.company.keyboard.apple if ([error.domain isEqualToString:ASAuthorizationErrorDomain] && error.code == ASAuthorizationErrorCanceled) { finalError = [NSError errorWithDomain:error.domain code:error.code - userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"登录已取消") + userInfo:@{NSLocalizedDescriptionKey: KBLocalized(@"Sign-in canceled") }]; } } diff --git a/keyBoard/Class/Search/V/KBSearchBarView.h b/keyBoard/Class/Search/V/KBSearchBarView.h index f0710c1..f62a2e8 100644 --- a/keyBoard/Class/Search/V/KBSearchBarView.h +++ b/keyBoard/Class/Search/V/KBSearchBarView.h @@ -22,8 +22,8 @@ NS_ASSUME_NONNULL_BEGIN /// 点击键盘 return 或右侧按钮时回调 @property (nonatomic, copy) void(^onSearch)(NSString *keyword); -/// 占位文字,默认“Themes” -@property (nonatomic, copy) NSString *placeholder; +///// 占位文字,默认“Themes” +//@property (nonatomic, copy) NSString *placeholder; /// 外部可设置关键字 - (void)updateKeyword:(NSString *)keyword; diff --git a/keyBoard/Class/Search/V/KBSearchBarView.m b/keyBoard/Class/Search/V/KBSearchBarView.m index c941dc3..ed8d367 100644 --- a/keyBoard/Class/Search/V/KBSearchBarView.m +++ b/keyBoard/Class/Search/V/KBSearchBarView.m @@ -9,7 +9,7 @@ @interface KBSearchBarView () @property (nonatomic, strong) UIView *bgView; // 圆角背景 -@property (nonatomic, strong, readwrite) UITextField *textField; // 输入框 +@property (nonatomic, strong) UITextField *textField; // 输入框 @property (nonatomic, strong) UIButton *searchButton; // 右侧搜索按钮 @end @@ -90,7 +90,7 @@ _textField.textColor = [UIColor colorWithHex:0x1B1F1A]; _textField.clearButtonMode = UITextFieldViewModeWhileEditing; _textField.returnKeyType = UIReturnKeySearch; - _textField.placeholder = @"Themes"; // 默认占位 + _textField.placeholder = KBLocalized(@"Search Themes"); // 左侧占位图标 UIView *pad = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 8, 8)]; @@ -105,7 +105,7 @@ if (!_searchButton) { _searchButton = [UIButton buttonWithType:UIButtonTypeSystem]; _searchButton.titleLabel.font = [KBFont regular:14]; - [_searchButton setTitle:@"Search" forState:UIControlStateNormal]; + [_searchButton setTitle:KBLocalized(@"Search") forState:UIControlStateNormal]; // 绿色样式 [_searchButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; _searchButton.backgroundColor = [UIColor colorWithRed:0.15 green:0.72 blue:0.62 alpha:1.0]; @@ -118,10 +118,10 @@ #pragma mark - Public -- (void)setPlaceholder:(NSString *)placeholder { - _placeholder = [placeholder copy]; - self.textField.placeholder = placeholder; -} +//- (void)setPlaceholder:(NSString *)placeholder { +// _placeholder = [placeholder copy]; +// self.textField.placeholder = placeholder; +//} - (void)setBgCornerRadius:(CGFloat)bgCornerRadius { _bgCornerRadius = bgCornerRadius; diff --git a/keyBoard/Class/Search/VC/KBSearchResultVC.m b/keyBoard/Class/Search/VC/KBSearchResultVC.m index a8934e7..d85738a 100644 --- a/keyBoard/Class/Search/VC/KBSearchResultVC.m +++ b/keyBoard/Class/Search/VC/KBSearchResultVC.m @@ -154,7 +154,7 @@ static NSString * const kResultCellId = @"KBSkinCardCell"; - (KBSearchBarView *)searchBarView { if (!_searchBarView) { _searchBarView = [[KBSearchBarView alloc] init]; - _searchBarView.placeholder = @"Themes"; +// _searchBarView.placeholder = @"Themes"; KBWeakSelf _searchBarView.onSearch = ^(NSString * _Nonnull keyword) { [weakSelf performSearch:keyword]; diff --git a/keyBoard/Class/Search/VC/KBSearchVC.m b/keyBoard/Class/Search/VC/KBSearchVC.m index a95a0b0..87f5f40 100644 --- a/keyBoard/Class/Search/VC/KBSearchVC.m +++ b/keyBoard/Class/Search/VC/KBSearchVC.m @@ -307,11 +307,11 @@ typedef NS_ENUM(NSInteger, KBSearchSection) { KBSearchSectionHeader *header = [collectionView dequeueReusableSupplementaryViewOfKind:kind withReuseIdentifier:kHeaderId forIndexPath:indexPath]; if (indexPath.section == KBSearchSectionHistory) { // 当没有历史时,外部通过 sizeForHeader 返回 0,这里仍设置但不会显示 - [header configWithTitle:@"Historical Search" showTrash:self.historyWords.count > 0]; + [header configWithTitle:KBLocalized(@"Historical Search") showTrash:self.historyWords.count > 0]; KBWeakSelf header.onTapTrash = ^{ [weakSelf clearHistory]; }; } else { - [header configWithTitle:@"Recommended Skin" showTrash:NO]; + [header configWithTitle:KBLocalized(@"Recommended Skin") showTrash:NO]; } return header; } @@ -391,7 +391,7 @@ typedef NS_ENUM(NSInteger, KBSearchSection) { if (!_searchBarView) { _searchBarView = [[KBSearchBarView alloc] init]; _searchBarView.bgCornerRadius = 18; - _searchBarView.placeholder = @"Themes"; +// _searchBarView.placeholder = @"Themes"; KBWeakSelf _searchBarView.onSearch = ^(NSString * _Nonnull keyword) { // 置顶到历史 + 打开结果页