key缺少,添加权限多语言

This commit is contained in:
2026-03-07 13:29:29 +08:00
parent e03287605c
commit cbcf8c4197
47 changed files with 986 additions and 225 deletions

View File

@@ -157,7 +157,7 @@ static id KBKeyboardSubscriptionSanitizeJSON(id obj) {
- (void)setupFeatureItems {
NSArray *titles = @[
KBLocalized(@"Wireless Sub-ai\nDialogue"),
KBLocalized(@"Wireless Sub-ai Dialogue"),
KBLocalized(@"Personalized\nKeyboard"),
KBLocalized(@"Chat\nPersona"),
KBLocalized(@"Emotional\nCounseling")
@@ -200,7 +200,7 @@ static id KBKeyboardSubscriptionSanitizeJSON(id obj) {
- (void)fetchProducts {
if (self.isLoading) { return; }
if (![[KBFullAccessManager shared] hasFullAccess]) {
[KBHUD showInfo:KBLocalized(@"Enable Full Access to continue")];
[KBHUD showInfo:KBLocalized(@"Please enable Full Access to continue")];
return;
}
self.loading = YES;
@@ -405,7 +405,7 @@ static id KBKeyboardSubscriptionSanitizeJSON(id obj) {
- (UILabel *)agreementLabel {
if (!_agreementLabel) {
_agreementLabel = [[UILabel alloc] init];
_agreementLabel.text = KBLocalized(@"By clicking \"pay\", you agree to the");
_agreementLabel.text = KBLocalized(@"By clicking Pay, you indicate your agreement to the");
_agreementLabel.font = [UIFont systemFontOfSize:11];
_agreementLabel.textColor = [UIColor colorWithHex:0x4A4A4A];
}

View File

@@ -118,7 +118,7 @@ static const NSUInteger kKBChatMessageLimit = 10;
// AI
KBChatMessage *msg = [KBChatMessage assistantMessageWithText:text audioId:audioId];
msg.displayName = KBLocalized(@"AI助手");
msg.displayName = KBLocalized(@"AI Assistant");
NSLog(@"[Panel] 创建 AI 消息needsTypewriter: %d", msg.needsTypewriterEffect);
// 使
@@ -323,7 +323,7 @@ static const NSUInteger kKBChatMessageLimit = 10;
_titleLabel.textColor =
[UIColor kb_dynamicColorWithLightColor:[UIColor colorWithHex:0x1B1F1A]
darkColor:[UIColor whiteColor]];
_titleLabel.text = KBLocalized(@"AI对话");
_titleLabel.text = KBLocalized(@"AI Chat");
}
return _titleLabel;
}

View File

@@ -79,7 +79,7 @@
self.audioLabel.textColor = textColor;
self.audioIconView.tintColor = textColor;
self.audioLabel.text =
(message.text.length > 0) ? message.text : KBLocalized(@"语音回复");
(message.text.length > 0) ? message.text : KBLocalized(@"Voice reply");
self.messageLabel.hidden = audioMessage;
self.audioIconView.hidden = !audioMessage;
self.audioLabel.hidden = !audioMessage;
@@ -94,7 +94,7 @@
self.nameLabel.hidden = outgoing;
self.nameLabel.textColor = nameColor;
self.nameLabel.text =
(message.displayName.length > 0) ? message.displayName : KBLocalized(@"AI助手");
(message.displayName.length > 0) ? message.displayName : KBLocalized(@"AI Assistant");
// loading
if (message.isLoading && !outgoing) {

View File

@@ -161,7 +161,7 @@
- (void)onTapGoEnable {
UIInputViewController *ivc = self.ivc ?: KBFindInputViewController(self);
if (!ivc) {
NSString *showInfo = [NSString stringWithFormat:KBLocalized(@"Follow: Settings General Keyboard Keyboards %@ Allow Full Access"), AppName];
NSString *showInfo = [NSString stringWithFormat:KBLocalized(@"Follow: Settings -> General -> Keyboard -> Keyboards -> %@ -> Allow Full Access"), AppName];
[KBHUD showInfo:showInfo];
return;
}
@@ -183,7 +183,7 @@
if (success) {
[self dismiss];
} else {
NSString *showInfo = [NSString stringWithFormat:KBLocalized(@"Follow: Settings General Keyboard Keyboards %@ Allow Full Access"), AppName];
NSString *showInfo = [NSString stringWithFormat:KBLocalized(@"Follow: Settings -> General -> Keyboard -> Keyboards -> %@ -> Allow Full Access"), AppName];
[KBHUD showInfo:showInfo];
}
});

View File

@@ -60,7 +60,6 @@
// if (!_placeholderLabelInternal) {
// _placeholderLabelInternal = [[UILabel alloc] init];
// // 稿
// _placeholderLabelInternal.text = KBLocalized(@"Paste Ta's Words");
// _placeholderLabelInternal.textColor = [UIColor colorWithRed:0.20 green:0.64 blue:0.54 alpha:1.0];
// _placeholderLabelInternal.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
// }

View File

@@ -277,13 +277,8 @@
// self.itemsInternal = @[KBLocalized(@"Warm hearted man"),
// KBLocalized(@"Warm2 hearted man"),
// KBLocalized(@"Warm3 hearted man"),
// KBLocalized(@"撩女生啊u发顺丰大师傅"),
// KBLocalized(@"Warm = man"),
// KBLocalized(@"Warm hearted man"),
// KBLocalized(@"一枚暖男发放"),
// KBLocalized(@"聊天搭子"),
// KBLocalized(@"表达爱意"),
// KBLocalized(@"更多话术")];
// [self.tagListView setItems:self.itemsInternal];
//}
@@ -516,7 +511,7 @@
}
BOOL shouldShowError = (error != nil);
if (shouldShowError) {
[KBHUD showInfo:error.localizedDescription ?: KBLocalized(@"拉取失败")];
[KBHUD showInfo:error.localizedDescription ?: KBLocalized(@"Fetch failed")];
}
if (self.streamOverlay) {
[self.streamOverlay finish];
@@ -533,7 +528,7 @@
BOOL needSubscriptionGuide = (code == KBBizCodeQuotaExhausted);
NSString *msg = KBBizMessageFromJSONObject(payload);
if (msg.length == 0) {
msg = KBLocalized(@"拉取失败");
msg = KBLocalized(@"Fetch failed");
}
NSError *bizError =
[NSError errorWithDomain:@"KBStreamBizError"
@@ -721,7 +716,7 @@
// 1) 访
if (![[KBFullAccessManager shared] hasFullAccess]) {
// 访
[KBHUD showInfo:KBLocalized(@"处理中…")];
[KBHUD showInfo:KBLocalized(@"Processing...")];
[[KBFullAccessManager shared] ensureFullAccessOrGuideInView:self];
return;
}
@@ -732,7 +727,7 @@
UIInputViewController *ivc = KBFindInputViewController(self);
if (!ivc) {
[KBHUD showInfo:KBLocalized(@"请回到桌面手动打开App登录")];
[KBHUD showInfo:KBLocalized(@"Please return to the Home screen and open the app to sign in")];
return;
}
@@ -749,7 +744,7 @@
return;
}
dispatch_async(dispatch_get_main_queue(), ^{
[KBHUD showInfo:KBLocalized(@"请回到桌面手动打开App登录")];
[KBHUD showInfo:KBLocalized(@"Please return to the Home screen and open the app to sign in")];
});
}];
return;
@@ -781,7 +776,6 @@
// [ivc dismissKeyboard];
// BOOL ok = [KBHostAppLauncher openHostAppURL:scheme
// fromResponder:start]; if (!ok) {
// [KBHUD showInfo:KBLocalized(@"请切换到主App完成登录")];
// }else{
//
// }
@@ -829,7 +823,7 @@ static void KBULDarwinCallback(CFNotificationCenterRef center, void *observer,
return;
}
[KBHUD showInfo:KBLocalized(@"处理中…")];
[KBHUD showInfo:KBLocalized(@"Processing...")];
UIInputViewController *ivc = KBFindInputViewController(self);
if (!ivc)