Explorar o código

1.修改iOS Apex Drivers国际化。

Pen Li %!s(int64=7) %!d(string=hai) anos
pai
achega
6f6279a84a

+ 5 - 5
common/customUI/Refresh/Footer/JLRefreshFooter.m

@@ -49,11 +49,11 @@ CGFloat const JLRefreshFooterHeight = 30;
 - (NSMutableDictionary *)stateTitle {
     if (!_stateTitle) {
         _stateTitle = [@{
-                         @(JLRefreshStateIdle)          : @"pull to load more",
-                         @(JLRefreshStatePulling)       : @"will load more",
-                         @(JLRefreshStateWillRefresh)   : @"loosen to load more",
-                         @(JLRefreshStateRefreshing)    : @"loading...",
-                         @(JLRefreshStateNoMore)        : @"no more"
+                         @(JLRefreshStateIdle)          : NSLocalizedString(@"pull to load more", @"pull to load more"),
+                         @(JLRefreshStatePulling)       : NSLocalizedString(@"will load more", @"will load more"),
+                         @(JLRefreshStateWillRefresh)   : NSLocalizedString(@"loosen to load more", @"loosen to load more"),
+                         @(JLRefreshStateRefreshing)    : NSLocalizedString(@"loading...", @"loading..."),
+                         @(JLRefreshStateNoMore)        : NSLocalizedString(@"no more", @"no more")
                          } mutableCopy];
     }
     return _stateTitle;

+ 4 - 4
common/customUI/Refresh/Header/JLRefreshHeader.m

@@ -23,10 +23,10 @@
 - (NSMutableDictionary *)stateTitle {
     if (!_stateTitle) {
         _stateTitle = [@{
-                         @(JLRefreshStateIdle)          : @"pull to refresh",
-                         @(JLRefreshStatePulling)       : @"pull to refresh",
-                         @(JLRefreshStateWillRefresh)   : @"loosen to refresh",
-                         @(JLRefreshStateRefreshing)    : @"loading..."
+                         @(JLRefreshStateIdle)          : NSLocalizedString(@"pull to refresh", @"pull to refresh"),
+                         @(JLRefreshStatePulling)       : NSLocalizedString(@"pull to refresh", @"pull to refresh"),
+                         @(JLRefreshStateWillRefresh)   : NSLocalizedString(@"loosen to refresh", @"loosen to refresh"),
+                         @(JLRefreshStateRefreshing)    : NSLocalizedString(@"loading...", @"loading...")
                          } mutableCopy];
     }
     return _stateTitle;

+ 9 - 10
common/upload/RAUploadListViewController.m

@@ -30,8 +30,8 @@
                                    options:(NSKeyValueObservingOptionNew|NSKeyValueObservingOptionOld)
                                    context:@"arr_queue changed"];
     
-    self.title = @"Upload List";
-    UIBarButtonItem *uploadListItem = [[UIBarButtonItem alloc] initWithTitle:@"Clear" style:UIBarButtonItemStylePlain target:self action:@selector(clearList)];
+    self.title = NSLocalizedString(@"Upload List", nil);
+    UIBarButtonItem *uploadListItem = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Clear", nil) style:UIBarButtonItemStylePlain target:self action:@selector(clearList)];
     self.navigationItem.rightBarButtonItem = uploadListItem;
     
     
@@ -42,14 +42,13 @@
     AppDelegate* appdelegate = (AppDelegate* )[UIApplication sharedApplication].delegate;
     if(appdelegate.uploadManager.arr_queue.count==0)
     {
-        [RAUtils alert_view:nil title:@"Upload list is empty."];
+        [RAUtils alert_view:nil title:NSLocalizedString(@"Upload list is empty.", nil)];
         return;
     }
-    UIAlertController *alert = [UIAlertController alertControllerWithTitle:
-                                @"Clear upload list" message:@"Are you sure remove all error/finish task?" preferredStyle:UIAlertControllerStyleAlert];
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:NSLocalizedString(@"Clear upload list", nil) message:NSLocalizedString(@"Are you sure remove all error/finish task?", nil) preferredStyle:UIAlertControllerStyleAlert];
     
     
-    UIAlertAction *OK = [UIAlertAction actionWithTitle:@"YES" style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
+    UIAlertAction *OK = [UIAlertAction actionWithTitle:NSLocalizedString(@"YES", nil) style:UIAlertActionStyleDestructive handler:^(UIAlertAction * _Nonnull action) {
         
         NSMutableArray* arr_tasks =[NSMutableArray new];
         for(NSMutableDictionary* task in appdelegate.uploadManager.arr_queue)
@@ -63,7 +62,7 @@
     
     [alert addAction:OK];
     
-    UIAlertAction *CANCEL = [UIAlertAction actionWithTitle:@"NO" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+    UIAlertAction *CANCEL = [UIAlertAction actionWithTitle:NSLocalizedString(@"NO", nil) style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
         
     }];
     [alert addAction:CANCEL];
@@ -115,10 +114,10 @@
     
     
     __weak typeof(self) weakself = self;
-    UITableViewRowAction *startAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Restart"handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
+    UITableViewRowAction *startAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:NSLocalizedString(@"Restart", nil) handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
         if (Appdelegate.uploadManager.onlyWiFi && Appdelegate.uploadManager.reach.currentReachabilityStatus != ReachableViaWiFi) {
-            [weakself.view makeToast:@"Current Network is not WiFi" duration:3.0 position:CSToastPositionCenter];
+            [weakself.view makeToast:NSLocalizedString(@"Current Network is not WiFi", nil) duration:3.0 position:CSToastPositionCenter];
             [tableView reloadRowsAtIndexPaths:@[indexPath]withRowAnimation:UITableViewRowAnimationMiddle];
             return ;
         }
@@ -133,7 +132,7 @@
     startAction.backgroundColor = UIColorFromRGB(0xff9933);
     
     
-    UITableViewRowAction *removeAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:@"Remove" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
+    UITableViewRowAction *removeAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDestructive title:NSLocalizedString(@"Remove", nil) handler:^(UITableViewRowAction *action, NSIndexPath *indexPath) {
         
         
         [Appdelegate.uploadManager removeTask:task];