3
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
if (completion) {
|
||||
KBChatResponse *response = [[KBChatResponse alloc] init];
|
||||
response.success = NO;
|
||||
response.message = @"内容为空";
|
||||
response.message = KBLocalized(@"Content is empty");
|
||||
completion(response);
|
||||
}
|
||||
return;
|
||||
@@ -101,7 +101,7 @@
|
||||
if (completion) {
|
||||
KBAudioResponse *response = [[KBAudioResponse alloc] init];
|
||||
response.success = NO;
|
||||
response.errorMessage = @"audioId 为空";
|
||||
response.errorMessage = KBLocalized(@"audioId is empty");
|
||||
completion(response);
|
||||
}
|
||||
return;
|
||||
@@ -171,7 +171,7 @@
|
||||
// 达到最大重试次数
|
||||
KBAudioResponse *failResponse = [[KBAudioResponse alloc] init];
|
||||
failResponse.success = NO;
|
||||
failResponse.errorMessage = [NSString stringWithFormat:@"轮询失败,已重试 %ld 次", (long)maxRetries];
|
||||
failResponse.errorMessage = [NSString stringWithFormat:KBLocalized(@"Polling failed after %ld retries"), (long)maxRetries];
|
||||
if (completion) completion(failResponse);
|
||||
}
|
||||
}];
|
||||
@@ -183,7 +183,7 @@
|
||||
if (completion) {
|
||||
KBAudioResponse *response = [[KBAudioResponse alloc] init];
|
||||
response.success = NO;
|
||||
response.errorMessage = @"URL 为空";
|
||||
response.errorMessage = KBLocalized(@"URL is empty");
|
||||
completion(response);
|
||||
}
|
||||
return;
|
||||
@@ -198,7 +198,7 @@
|
||||
|
||||
if (error || !data || data.length == 0) {
|
||||
audioResponse.success = NO;
|
||||
audioResponse.errorMessage = error.localizedDescription ?: @"下载失败";
|
||||
audioResponse.errorMessage = error.localizedDescription ?: KBLocalized(@"Download failed");
|
||||
if (completion) completion(audioResponse);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user