diff --git a/Shared/Localization/en.lproj/Localizable.strings b/Shared/Localization/en.lproj/Localizable.strings index d5255a5..ae2849d 100644 --- a/Shared/Localization/en.lproj/Localizable.strings +++ b/Shared/Localization/en.lproj/Localizable.strings @@ -33,7 +33,6 @@ "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"; "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"; "No token returned" = "No token returned"; "Failed to save login state" = "Failed to save login state"; @@ -93,13 +92,11 @@ "Failed to parse JSON" = "Failed to parse JSON"; "Parse failed" = "Parse failed"; "No data received" = "No data received"; -"请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@" = "Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@"; -"响应成功(JSON)\nURL: %@\n状态: %ld\nContent-Type: %@\n数据: %@" = "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: %@"; -"响应解析失败(JSON)\nURL: %@\n错误: %@" = "Response decode failed (JSON)\nURL: %@\nError: %@"; -"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@" = "HTTP GET\nURL: %@\nHeaders: %@\nParams: %@"; -"无效响应\nURL: %@\n说明: %@" = "Invalid response\nURL: %@\nReason: %@"; -"网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。" = "Network unavailable\nPlease check this app's wireless-data permission or network connection in Settings."; +"Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@" = "Request failed\nURL: %@\nStatus: %ld\nError: %@\nUserInfo: %@"; +"Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@" = "Response OK (JSON)\nURL: %@\nStatus: %ld\nContent-Type: %@\nData: %@"; +"Response decode failed (JSON)\nURL: %@\nError: %@" = "Response decode failed (JSON)\nURL: %@\nError: %@"; +"HTTP GET\nURL: %@\nHeaders: %@\nParams: %@" = "HTTP GET\nURL: %@\nHeaders: %@\nParams: %@"; +"Invalid response\nURL: %@\nReason: %@" = "Invalid response\nURL: %@\nReason: %@"; "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 @@ -109,7 +106,7 @@ "Go enable" = "Go enable"; "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"; -"当前:%@" = "Current: %@"; +"Current: %@" = "Current: %@"; // Home / Tab labels "Home" = "Home"; diff --git a/Shared/Localization/zh-Hans.lproj/Localizable.strings b/Shared/Localization/zh-Hans.lproj/Localizable.strings index 9be29eb..660d936 100644 --- a/Shared/Localization/zh-Hans.lproj/Localizable.strings +++ b/Shared/Localization/zh-Hans.lproj/Localizable.strings @@ -96,11 +96,9 @@ "No data received" = "未获取到数据"; "请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@" = "请求失败\nURL: %@\n状态: %ld\n错误: %@\nUserInfo: %@"; "响应成功(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错误: %@"; "HTTP GET\nURL: %@\nHeaders: %@\n参数: %@" = "HTTP GET\nURL: %@\nHeaders: %@\n参数: %@"; "无效响应\nURL: %@\n说明: %@" = "无效响应\nURL: %@\n说明: %@"; -"网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。" = "网络不可用\n请在“设置”中检查本应用的无线数据权限或网络连接。"; "Please check this app's wireless-data permission or network connection in Settings." = "请在“设置”中检查本应用的无线数据权限或网络连接。"; // 权限与引导(英文 key) diff --git a/keyBoard/Class/Home/VC/FunctionTest/KBLangTestVC.m b/keyBoard/Class/Home/VC/FunctionTest/KBLangTestVC.m index 7c578a5..6b0291e 100644 --- a/keyBoard/Class/Home/VC/FunctionTest/KBLangTestVC.m +++ b/keyBoard/Class/Home/VC/FunctionTest/KBLangTestVC.m @@ -46,7 +46,7 @@ self.title = KBLocalized(@"lang_test_title"); NSString *code = [KBLocalizationManager shared].currentLanguageCode ?: @""; NSString *fmt = KBLocalized(@"current_lang"); - NSString *fallback = KBLocalized(@"当前:%@"); + NSString *fallback = KBLocalized(@"Current: %@"); self.label.text = [NSString stringWithFormat:fmt.length ? fmt : fallback, code]; [self.toggleBtn setTitle:KBLocalized(@"lang_toggle") forState:UIControlStateNormal]; } diff --git a/keyBoard/Class/Network/KBNetworkManager.m b/keyBoard/Class/Network/KBNetworkManager.m index 69467c4..58a9b86 100644 --- a/keyBoard/Class/Network/KBNetworkManager.m +++ b/keyBoard/Class/Network/KBNetworkManager.m @@ -100,7 +100,7 @@ NSErrorDomain const KBNetworkErrorDomain = @"com.company.keyboard.network"; #if DEBUG // 打印请求信息(GET) NSString *paramStr = [self kb_prettyJSONStringFromObject:parameters] ?: @"(null)"; - KBLOG(@"HTTP GET\nURL: %@\nHeaders: %@\n参数: %@", + KBLOG(@"HTTP GET\nURL: %@\nHeaders: %@\nParams: %@", req.URL.absoluteString, req.allHTTPHeaderFields ?: @{}, paramStr); @@ -397,7 +397,7 @@ autoShowBusinessError:YES if (error) { #if DEBUG 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, (long)status, error.localizedDescription, @@ -409,7 +409,7 @@ autoShowBusinessError:YES NSData *data = (NSData *)responseObject; if (![data isKindOfClass:[NSData class]]) { #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 if (completion) completion(nil, response, [NSError errorWithDomain:KBNetworkErrorDomain code:KBNetworkErrorInvalidResponse userInfo:@{NSLocalizedDescriptionKey:KBLocalized(@"No data")}]); return; @@ -436,7 +436,7 @@ autoShowBusinessError:YES id json = [NSJSONSerialization JSONObjectWithData:data options:0 error:&jsonErr]; if (jsonErr) { #if DEBUG - KBLOG(@"响应解析失败(JSON)\nURL: %@\n错误: %@", + KBLOG(@"Response decode failed (JSON)\nURL: %@\nError: %@", req.URL.absoluteString, jsonErr.localizedDescription); #endif @@ -453,7 +453,7 @@ autoShowBusinessError:YES NSString *pretty = [self kb_prettyJSONStringFromObject:json] ?: @"(null)"; pretty = [self kb_trimmedString:pretty maxLength:4096]; 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, (long)status, ct ?: @"",