1
This commit is contained in:
@@ -33,7 +33,6 @@
|
|||||||
"We'll use Apple for a quick, secure sign-in" = "We'll use Apple for a quick, secure sign-in";
|
"We'll use Apple for a quick, secure sign-in" = "We'll use Apple for a quick, secure sign-in";
|
||||||
"Log In To Key Of Love" = "Log In To Key Of Love";
|
"Log In To Key Of Love" = "Log In To Key Of Love";
|
||||||
"Sign in with Apple requires iOS 13 or later" = "Sign in with Apple requires iOS 13 or later";
|
"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" = "Invalid login credential";
|
"Invalid login credential" = "Invalid login credential";
|
||||||
"No token returned" = "No token returned";
|
"No token returned" = "No token returned";
|
||||||
"Failed to save login state" = "Failed to save login state";
|
"Failed to save login state" = "Failed to save login state";
|
||||||
@@ -93,13 +92,11 @@
|
|||||||
"Failed to parse JSON" = "Failed to parse JSON";
|
"Failed to parse JSON" = "Failed to parse JSON";
|
||||||
"Parse failed" = "Parse failed";
|
"Parse failed" = "Parse failed";
|
||||||
"No data received" = "No data received";
|
"No data received" = "No data received";
|
||||||
"请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@" = "Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@";
|
"Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@" = "Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@";
|
||||||
"响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@";
|
"Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@" = "Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@";
|
||||||
"响应成功(Data)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "Response OK (Data)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@";
|
"Response decode failed (JSON)\nURL: %@\nError: %@" = "Response decode failed (JSON)\nURL: %@\nError: %@";
|
||||||
"响应解析失败(JSON)\nURL: %@\n错误: %@" = "Response decode failed (JSON)\nURL: %@\nError: %@";
|
"HTTP GET\nURL: %@\nHeaders: %@\nParams: %@" = "HTTP GET\nURL: %@\nHeaders: %@\nParams: %@";
|
||||||
"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@" = "HTTP GET\nURL: %@\nHeaders: %@\nParams: %@";
|
"Invalid response\nURL: %@\nReason: %@" = "Invalid response\nURL: %@\nReason: %@";
|
||||||
"无效响应\nURL: %@\n说明: %@" = "Invalid response\nURL: %@\nReason: %@";
|
|
||||||
"网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。" = "Network unavailable\nPlease 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." = "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." = "Please check this app's wireless-data permission or network connection in Settings.";
|
||||||
|
|
||||||
// Permission & guides
|
// Permission & guides
|
||||||
@@ -109,7 +106,7 @@
|
|||||||
"Go enable" = "Go enable";
|
"Go enable" = "Go enable";
|
||||||
"Open Settings" = "Open Settings";
|
"Open Settings" = "Open Settings";
|
||||||
"After pasting the conversation in the keyboard, choose a reply style" = "After pasting the conversation in the keyboard, choose a reply style";
|
"After pasting the conversation in the keyboard, choose a reply style" = "After pasting the conversation in the keyboard, choose a reply style";
|
||||||
"当前:%@" = "Current: %@";
|
"Current: %@" = "Current: %@";
|
||||||
|
|
||||||
// Home / Tab labels
|
// Home / Tab labels
|
||||||
"Home" = "Home";
|
"Home" = "Home";
|
||||||
|
|||||||
@@ -96,11 +96,9 @@
|
|||||||
"No data received" = "未获取到数据";
|
"No data received" = "未获取到数据";
|
||||||
"请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@" = "请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@";
|
"请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@" = "请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@";
|
||||||
"响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@";
|
"响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@";
|
||||||
"响应成功(Data)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "响应成功(Data)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@";
|
|
||||||
"响应解析失败(JSON)\nURL: %@\n错误: %@" = "响应解析失败(JSON)\nURL: %@\n错误: %@";
|
"响应解析失败(JSON)\nURL: %@\n错误: %@" = "响应解析失败(JSON)\nURL: %@\n错误: %@";
|
||||||
"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@" = "HTTP GET\nURL: %@\nHeaders: %@\n参数: %@";
|
"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@" = "HTTP GET\nURL: %@\nHeaders: %@\n参数: %@";
|
||||||
"无效响应\nURL: %@\n说明: %@" = "无效响应\nURL: %@\n说明: %@";
|
"无效响应\nURL: %@\n说明: %@" = "无效响应\nURL: %@\n说明: %@";
|
||||||
"网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。" = "网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。";
|
|
||||||
"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." = "请在“设置”中检查本应用的无线数据权限或网络连接。";
|
||||||
|
|
||||||
// 权限与引导(英文 key)
|
// 权限与引导(英文 key)
|
||||||
|
|||||||
@@ -46,7 +46,7 @@
|
|||||||
self.title = KBLocalized(@"lang_test_title");
|
self.title = KBLocalized(@"lang_test_title");
|
||||||
NSString *code = [KBLocalizationManager shared].currentLanguageCode ?: @"";
|
NSString *code = [KBLocalizationManager shared].currentLanguageCode ?: @"";
|
||||||
NSString *fmt = KBLocalized(@"current_lang");
|
NSString *fmt = KBLocalized(@"current_lang");
|
||||||
NSString *fallback = KBLocalized(@"当前:%@");
|
NSString *fallback = KBLocalized(@"Current: %@");
|
||||||
self.label.text = [NSString stringWithFormat:fmt.length ? fmt : fallback, code];
|
self.label.text = [NSString stringWithFormat:fmt.length ? fmt : fallback, code];
|
||||||
[self.toggleBtn setTitle:KBLocalized(@"lang_toggle") forState:UIControlStateNormal];
|
[self.toggleBtn setTitle:KBLocalized(@"lang_toggle") forState:UIControlStateNormal];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ NSErrorDomain const KBNetworkErrorDomain = @"com.company.keyboard.network";
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
// 打印请求信息(GET)
|
// 打印请求信息(GET)
|
||||||
NSString *paramStr = [self kb_prettyJSONStringFromObject:parameters] ?: @"(null)";
|
NSString *paramStr = [self kb_prettyJSONStringFromObject:parameters] ?: @"(null)";
|
||||||
KBLOG(@"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@",
|
KBLOG(@"HTTP GET\nURL: %@\nHeaders: %@\nParams: %@",
|
||||||
req.URL.absoluteString,
|
req.URL.absoluteString,
|
||||||
req.allHTTPHeaderFields ?: @{},
|
req.allHTTPHeaderFields ?: @{},
|
||||||
paramStr);
|
paramStr);
|
||||||
@@ -397,7 +397,7 @@ autoShowBusinessError:YES
|
|||||||
if (error) {
|
if (error) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
NSInteger status = [response isKindOfClass:NSHTTPURLResponse.class] ? ((NSHTTPURLResponse *)response).statusCode : 0;
|
NSInteger status = [response isKindOfClass:NSHTTPURLResponse.class] ? ((NSHTTPURLResponse *)response).statusCode : 0;
|
||||||
KBLOG(@"请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@",
|
KBLOG(@"Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@",
|
||||||
req.URL.absoluteString,
|
req.URL.absoluteString,
|
||||||
(long)status,
|
(long)status,
|
||||||
error.localizedDescription,
|
error.localizedDescription,
|
||||||
@@ -409,7 +409,7 @@ autoShowBusinessError:YES
|
|||||||
NSData *data = (NSData *)responseObject;
|
NSData *data = (NSData *)responseObject;
|
||||||
if (![data isKindOfClass:[NSData class]]) {
|
if (![data isKindOfClass:[NSData class]]) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
KBLOG(@"无效响应\nURL: %@\n说明: %@", req.URL.absoluteString, KBLocalized(@"No data received"));
|
KBLOG(@"Invalid response\nURL: %@\nReason: %@", req.URL.absoluteString, KBLocalized(@"No data received"));
|
||||||
#endif
|
#endif
|
||||||
if (completion) completion(nil, response, [NSError errorWithDomain:KBNetworkErrorDomain code:KBNetworkErrorInvalidResponse userInfo:@{NSLocalizedDescriptionKey:KBLocalized(@"No data")}]);
|
if (completion) completion(nil, response, [NSError errorWithDomain:KBNetworkErrorDomain code:KBNetworkErrorInvalidResponse userInfo:@{NSLocalizedDescriptionKey:KBLocalized(@"No data")}]);
|
||||||
return;
|
return;
|
||||||
@@ -436,7 +436,7 @@ autoShowBusinessError:YES
|
|||||||
id json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonErr];
|
id json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonErr];
|
||||||
if (jsonErr) {
|
if (jsonErr) {
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
KBLOG(@"响应解析失败(JSON)\nURL: %@\n错误: %@",
|
KBLOG(@"Response decode failed (JSON)\nURL: %@\nError: %@",
|
||||||
req.URL.absoluteString,
|
req.URL.absoluteString,
|
||||||
jsonErr.localizedDescription);
|
jsonErr.localizedDescription);
|
||||||
#endif
|
#endif
|
||||||
@@ -453,7 +453,7 @@ autoShowBusinessError:YES
|
|||||||
NSString *pretty = [self kb_prettyJSONStringFromObject:json] ?: @"(null)";
|
NSString *pretty = [self kb_prettyJSONStringFromObject:json] ?: @"(null)";
|
||||||
pretty = [self kb_trimmedString:pretty maxLength:4096];
|
pretty = [self kb_trimmedString:pretty maxLength:4096];
|
||||||
NSInteger status = [response isKindOfClass:NSHTTPURLResponse.class] ? ((NSHTTPURLResponse *)response).statusCode : 0;
|
NSInteger status = [response isKindOfClass:NSHTTPURLResponse.class] ? ((NSHTTPURLResponse *)response).statusCode : 0;
|
||||||
KBLOG(@"\n[KBNetwork] 响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@\n",
|
KBLOG(@"Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@",
|
||||||
req.URL.absoluteString,
|
req.URL.absoluteString,
|
||||||
(long)status,
|
(long)status,
|
||||||
ct ?: @"",
|
ct ?: @"",
|
||||||
|
|||||||
Reference in New Issue
Block a user