提交 1cbd55d9 编写于 作者: Y yixiangboy

sdk en optimization

上级 a137dfb1
......@@ -50,6 +50,8 @@
"提交" = "Submit";
"取消" = "Cancel";
"丢弃" = "Discard";
"数据上传成功" = "data upload successfully";
"数据上传失败" = "data upload failed";
//应用设置
"应用设置" = "App Settings";
......@@ -105,6 +107,9 @@
"点击跳转" = "Click to jump";
"Doraemon内置浏览器" = "Doraemon Built-in browser";
"链接不能为空" = "url can not be nil";
"设备无相机——设备无相机功能,无法进行扫描" = "Device without camera";
"设备相机错误——无法启用相机,请检查" = "Device camera error";
"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机" = "Camera permission is not open";
//清除本地数据
"清理缓存" = "Clear Sanbox";
......@@ -249,6 +254,7 @@
"内存泄漏检测开关" = "Memory Leak Switch";
"内存泄漏检测弹框提醒" = "Memory Leak Alert Warning";
"内存泄漏检测结果" = "Memory Leak Result";
"内存泄漏详情" = "Memory Leak Detail";
//取色器
"取色器" = "Color Picker";
......
......@@ -50,6 +50,8 @@
"提交" = "提交";
"取消" = "取消";
"丢弃" = "丢弃";
"数据上传成功" = "数据上传成功";
"数据上传失败" = "数据上传失败";
//应用设置
"应用设置" = "应用设置";
......@@ -105,6 +107,9 @@
"点击跳转" = "点击跳转";
"Doraemon内置浏览器" = "Doraemon内置浏览器";
"链接不能为空" = "链接不能为空";
"设备无相机——设备无相机功能,无法进行扫描" = "设备无相机——设备无相机功能,无法进行扫描";
"设备相机错误——无法启用相机,请检查" = "设备相机错误——无法启用相机,请检查";
"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机" = "相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机";
//清除本地数据
"清理缓存" = "清理缓存";
......@@ -247,6 +252,7 @@
"内存泄漏检测开关" = "内存泄漏检测开关";
"内存泄漏检测弹框提醒" = "内存泄漏检测弹框提醒";
"内存泄漏检测结果" = "内存泄漏检测结果";
"内存泄漏详情" = "内存泄漏详情";
//取色器
"取色器" = "取色器";
......
......@@ -415,7 +415,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
NSArray *dataArray = @{
@(DoraemonManagerPluginType_DoraemonWeexLogPlugin) : @[
@{kTitle:DoraemonLocalizedString(@"日志")},
@{kDesc:@"Weex日志显示"},
@{kDesc:@"Weex log"},
@{kIcon:@"doraemon_log"},
@{kPluginName:@"DoraemonWeexLogPlugin"},
@{kAtModule:@"Weex"},
......@@ -423,7 +423,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
],
@(DoraemonManagerPluginType_DoraemonWeexStoragePlugin) : @[
@{kTitle:DoraemonLocalizedString(@"缓存")},
@{kDesc:@"weex storage 查看"},
@{kDesc:@"weex storage"},
@{kIcon:@"doraemon_file"},
@{kPluginName:@"DoraemonWeexStoragePlugin"},
@{kAtModule:@"Weex"},
......@@ -431,7 +431,7 @@ typedef void (^DoraemonPerformanceBlock)(NSDictionary *);
],
@(DoraemonManagerPluginType_DoraemonWeexInfoPlugin) : @[
@{kTitle:DoraemonLocalizedString(@"信息")},
@{kDesc:@"weex 信息查看"},
@{kDesc:@"weex info"},
@{kIcon:@"doraemon_app_info"},
@{kPluginName:@"DoraemonWeexInfoPlugin"},
@{kAtModule:@"Weex"},
......
......@@ -298,7 +298,7 @@
- (NSArray<UITableViewRowAction *> *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath{
__weak typeof(self) weakSelf = self;
UITableViewRowAction *action0 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"复制" handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
UITableViewRowAction *action0 = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:DoraemonLocalizedString(@"复制") handler:^(UITableViewRowAction * _Nonnull action, NSIndexPath * _Nonnull indexPath) {
NSString *value = weakSelf.dataArray[indexPath.section][@"array"][indexPath.row][@"value"];
UIPasteboard *pboard = [UIPasteboard generalPasteboard];
pboard.string = value;
......
......@@ -172,7 +172,7 @@
if (self.dataSource.count > indexPath.row) {
cell.textLabel.text = self.dataSource[indexPath.row];
} else {
cell.textLabel.text = @"默认值";
cell.textLabel.text = @"default value";
}
cell.textLabel.textColor = [UIColor doraemon_colorWithHex:0x333333 andAlpha:1];
cell.textLabel.font = [UIFont systemFontOfSize:kDoraemonSizeFrom750_Landscape(30)];
......
......@@ -33,7 +33,7 @@
#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0)
}
#endif
self.title = @"二维码扫描";
self.title = @"QR Scanning";
}
......
......@@ -135,21 +135,21 @@ static NSString *const scanLineAnimationName = @"scanLineAnimation";
- (BOOL)statusCheck{
if (![DoraemonQRScanView isCameraAvailable]){
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:@"设备无相机——设备无相机功能,无法进行扫描" okBlock:^{
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:DoraemonLocalizedString(@"设备无相机——设备无相机功能,无法进行扫描") okBlock:^{
}];
return NO;
}
if (![DoraemonQRScanView isRearCameraAvailable] && ![DoraemonQRScanView isFrontCameraAvailable]) {
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:@"设备相机错误——无法启用相机,请检查" okBlock:^{
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:DoraemonLocalizedString(@"设备相机错误——无法启用相机,请检查") okBlock:^{
}];
return NO;
}
if (![self isCameraAuthStatusCorrect]) {
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:@"相机权限未开启,请到「设置-隐私-相机」中允许滴滴访问您的相机" okBlock:^{
[DoraemonAlertUtil handleAlertActionWithVC:[self viewController] text:DoraemonLocalizedString(@"相机权限未开启,请到「设置-隐私-相机」中允许DoKit访问您的相机") okBlock:^{
[DoraemonUtil openAppSetting];
} cancleBlock:^{
if(self.unopenCameraAuth){
......
......@@ -39,7 +39,7 @@
_anrTimeLabel = [[UILabel alloc] init];
_anrTimeLabel.textColor = [UIColor doraemon_black_1];
_anrTimeLabel.font = [UIFont systemFontOfSize:kDoraemonSizeFrom750_Landscape(16)];
_anrTimeLabel.text = [NSString stringWithFormat:@"卡顿耗时 : %@ms",_anrInfo[@"duration"]];
_anrTimeLabel.text = [NSString stringWithFormat:@"anr time : %@ms",_anrInfo[@"duration"]];
[_anrTimeLabel sizeToFit];
_anrTimeLabel.frame = CGRectMake(20, _contentLabel.doraemon_bottom+20, _anrTimeLabel.doraemon_width, _anrTimeLabel.doraemon_height);
[self.view addSubview:_anrTimeLabel];
......
......@@ -35,11 +35,7 @@ static void doraemon_vc_profiler_viewDidLoad(UIViewController *kvo_self, SEL _se
[[DoraemonHealthManager sharedInstance] startEnterPage:origin_cls];
void (*func)(UIViewController *, SEL) = (void (*)(UIViewController *, SEL))origin_imp;
//DoKitLog(@"VC: %p -viewDidLoad \t\tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
//DoKitLog(@"yixiang class = %@ viewDidLoad",origin_cls);
func(kvo_self, _sel);
//DoKitLog(@"VC: %p -viewDidLoad \t\tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static void doraemon_vc_profiler_viewWillAppear(UIViewController *kvo_self, SEL _sel, BOOL animated) {
......@@ -50,11 +46,7 @@ static void doraemon_vc_profiler_viewWillAppear(UIViewController *kvo_self, SEL
assert(origin_imp != NULL);
void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp;
//DoKitLog(@"yixiang class = %@ viewWillAppear",origin_cls);
//DoKitLog(@"VC: %p -viewWillAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func(kvo_self, _sel, animated);
//DoKitLog(@"VC: %p -viewWillAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static void doraemon_vc_profiler_viewDidAppear(UIViewController *kvo_self, SEL _sel, BOOL animated) {
......@@ -64,11 +56,8 @@ static void doraemon_vc_profiler_viewDidAppear(UIViewController *kvo_self, SEL _
assert(origin_imp != NULL);
void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp;
//DoKitLog(@"yixiang class = %@ viewDidAppear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func(kvo_self, _sel, animated);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
[[DoraemonHealthManager sharedInstance] enterPage:origin_cls];
}
......@@ -80,10 +69,7 @@ static void doraemon_vc_profiler_viewWillDisAppear(UIViewController *kvo_self, S
void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp;
//DoKitLog(@"yixiang class = %@ viewWillDisAppear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func(kvo_self, _sel, animated);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
}
static void doraemon_vc_profiler_viewDidDisappear(UIViewController *kvo_self, SEL _sel, BOOL animated) {
......@@ -94,10 +80,7 @@ static void doraemon_vc_profiler_viewDidDisappear(UIViewController *kvo_self, SE
void (*func)(UIViewController *, SEL, BOOL) = (void (*)(UIViewController *, SEL, BOOL))origin_imp;
//DoKitLog(@"yixiang class = %@ viewDidDisappear",origin_cls);
//DoKitLog(@"VC: %p -viewDidAppear \tbegin at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
func(kvo_self, _sel, animated);
//DoKitLog(@"VC: %p -viewDidAppear \tfinish at CF time:\t%lf", kvo_self, CFAbsoluteTimeGetCurrent());
[[DoraemonHealthManager sharedInstance] leavePage:origin_cls];
}
......
......@@ -249,16 +249,16 @@
}
};
DoKitLog(@"上传信息 == %@",dic);
DoKitLog(@"upload info == %@",dic);
if (![DoraemonManager shareInstance].pId) {
DoKitLog(@"dokik pId 为空");
DoKitLog(@"dokik pId empty");
}
[DoraemonNetworkUtil postWithUrlString:@"https://www.dokit.cn/healthCheck/addCheckData" params:dic success:^(NSDictionary * _Nonnull result) {
NSInteger code = [result[@"code"] integerValue];
if (code == 200) {
[DoraemonToastUtil showToastBlack:@"数据上传成功" inView:[UIViewController rootViewControllerForDoraemonHomeWindow].view];
[DoraemonToastUtil showToastBlack:DoraemonLocalizedString(@"数据上传成功") inView:[UIViewController rootViewControllerForDoraemonHomeWindow].view];
}else{
NSString *msg = result[@"msg"];
if (msg) {
......@@ -267,7 +267,7 @@
}
} error:^(NSError * _Nonnull error) {
[DoraemonToastUtil showToastBlack:@"数据上传失败" inView:[UIViewController rootViewControllerForDoraemonHomeWindow].view];
[DoraemonToastUtil showToastBlack:DoraemonLocalizedString(@"数据上传失败") inView:[UIViewController rootViewControllerForDoraemonHomeWindow].view];
}];
}
......
......@@ -125,7 +125,7 @@
block(2);
}];
}else{
DoKitLog(@"请求接口列表必须保证pId不为空");
DoKitLog(@"Request interface list must ensure that pId is not empty");
block(3);
}
......@@ -342,13 +342,13 @@
};
[DoraemonNetworkUtil patchWithUrlString:@"https://mock.dokit.cn/api/app/interface" params:params success:^(NSDictionary * _Nonnull result) {
[self showToast:@"上传成功" atView:view];
[self showToast:DoraemonLocalizedString(@"上传成功") atView:view];
} error:^(NSError * _Nonnull error) {
DoKitLog(@"error == %@",error);
[self showToast:@"上传失败" atView:view];
[self showToast:DoraemonLocalizedString(@"上传失败") atView:view];
}];
}else{
DoKitLog(@"上传模版接口必须要传pid");
DoKitLog(@"Upload template must has pid");
}
}
......
......@@ -82,7 +82,7 @@
NSString *text = data;
BOOL writeSuccess = [text writeToFile:path atomically:YES encoding:NSUTF8StringEncoding error:nil];
if (writeSuccess) {
DoKitLog(@"写入成功");
DoKitLog(@"write success");
}
}
......@@ -97,7 +97,7 @@
options:NSJSONReadingMutableContainers
error:&err];
if(err) {
DoKitLog(@"json解析失败:%@",err);
DoKitLog(@"json read error:%@",err);
return nil;
}
return dic;
......@@ -114,7 +114,7 @@
options:NSJSONReadingMutableContainers
error:&err];
if(err) {
DoKitLog(@"json解析失败:%@",err);
DoKitLog(@"json read error:%@",err);
return nil;
}
return array;
......@@ -200,7 +200,7 @@
}
}else{
//不存在该文件path
DoKitLog(@"不存在该文件");
DoKitLog(@"file not exist");
}
return nil;
......
......@@ -18,7 +18,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.title = @"内存泄漏详情";
self.title = DoraemonLocalizedString(@"内存泄漏详情");
_contentLabel = [[UILabel alloc] init];
_contentLabel.textColor = [UIColor doraemon_black_2];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册