|
|
@@ -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];
|