Browse Source

Localization: Added localization for several strings

Signed-off-by: Felix Paul Kühne <fkuehne@videolan.org>
Carola Nitz 11 years ago
parent
commit
633d52b575

BIN
Resources/Settings.bundle/en.lproj/Root.strings


BIN
Resources/en.lproj/Localizable.strings


+ 4 - 6
Sources/VLCGoogleDriveController.m

@@ -132,8 +132,7 @@
                                   _fileListTicket = nil;
                                   [self _listOfGoodFiles];
                               } else {
-                                  //TODO: localize
-                                  [self showAlert:@"Fetching Files Error" message:error.localizedDescription];
+                                  [self showAlert:NSLocalizedString(@"GDRIVE_ERROR_FETCHING_FILES",nil) message:error.localizedDescription];
                               }
                           }];
 }
@@ -229,12 +228,11 @@
         };
 
         [fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
-            //TODO:localize Strings
             if (error == nil) {
-                [self showAlert:@"Downloaded" message:@"Your file has been sucessfully downloaded"];
+                [self showAlert:NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL_TITLE",nil) message:NSLocalizedString(@"GDRIVE_DOWNLOAD_SUCCESSFUL",nil)];
                 [self downloadSucessfull];
             } else {
-                [self showAlert:@"Error" message:@"An Error occured while downloading"];
+                [self showAlert:NSLocalizedString(@"GDRIVE_ERROR_DOWNLOADING_FILE_TITLE",nil) message:NSLocalizedString(@"GDRIVE_ERROR_DOWNLOADING_FILE",nil)];
                 [self downloadFailedWithError:error];
             }
         }];
@@ -244,7 +242,7 @@
 - (void)downloadSucessfull
 {
     /* update library now that we got a file */
-    APLog(@"DriveFile download was sucessful");
+    APLog(@"DriveFile download was successful");
     VLCAppDelegate *appDelegate = [UIApplication sharedApplication].delegate;
     [appDelegate updateMediaList];
 

+ 2 - 3
Sources/VLCGoogleDriveTableViewController.m

@@ -117,8 +117,7 @@
 {
     _authorizationInProgress = NO;
     if (error != nil) {
-        //TODO:Localize
-        [self showAlert:@"Authentication Error" message:error.localizedDescription];
+        [self showAlert:NSLocalizedString(@"GDRIVE_AUTHENTICATION_ERROR",nil) message:error.localizedDescription];
         _googleDriveController.driveService.authorizer = nil;
     } else {
         _googleDriveController.driveService.authorizer = authResult;
@@ -264,7 +263,7 @@
     _selectedFile = _googleDriveController.currentListFiles[[self.tableView indexPathForCell:cell].row];
 
     /* selected item is a proper file, ask the user if s/he wants to download it */
-    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"GOOGLEDRIVE_DOWNLOAD", @"") message:[NSString stringWithFormat:NSLocalizedString(@"GOOGLEDRIVE_DL_LONG", @""), _selectedFile.title, [[UIDevice currentDevice] model]] delegate:self cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", @"") otherButtonTitles:NSLocalizedString(@"BUTTON_DOWNLOAD", @""), nil];
+    UIAlertView * alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"DROPBOX_DOWNLOAD", @"") message:[NSString stringWithFormat:NSLocalizedString(@"DROPBOX_DL_LONG", @""), _selectedFile.title, [[UIDevice currentDevice] model]] delegate:self cancelButtonTitle:NSLocalizedString(@"BUTTON_CANCEL", @"") otherButtonTitles:NSLocalizedString(@"BUTTON_DOWNLOAD", @""), nil];
     [alert show];
 }
 

+ 3 - 3
Sources/VLCHTTPFileDownloader.m

@@ -78,7 +78,7 @@
     } else {
         APLog(@"unhandled status code %i", statusCode);
         if ([self.delegate respondsToSelector:@selector(downloadFailedWithErrorDescription:)])
-            [self.delegate downloadFailedWithErrorDescription:[NSString stringWithFormat:@"Download failed with HTTP code %i", statusCode]];
+            [self.delegate downloadFailedWithErrorDescription:[NSString stringWithFormat:NSLocalizedString(@"HTTP_DOWNLOAD_FAILED",nil), statusCode]];
     }
 }
 
@@ -93,7 +93,7 @@
         if (!fileHandle) {
             APLog(@"file creation failed, no data was saved");
             if ([self.delegate respondsToSelector:@selector(downloadFailedWithErrorDescription:)])
-                [self.delegate downloadFailedWithErrorDescription:@"File creation failed"];
+                [self.delegate downloadFailedWithErrorDescription:NSLocalizedString(@"HTTP_FILE_CREATION_FAILED",nil)];
             return;
         }
     }
@@ -140,7 +140,7 @@
         [fileManager removeItemAtPath:_filePath error:nil];
 
     if ([self.delegate respondsToSelector:@selector(downloadFailedWithErrorDescription:)])
-        [self.delegate downloadFailedWithErrorDescription:@"Download canceled by user"];
+        [self.delegate downloadFailedWithErrorDescription:NSLocalizedString(@"HTTP_DOWNLOAD_CANCELLED",nil)];
 
     [self _downloadEnded];
 }

+ 2 - 2
Sources/VLCLocalServerListViewController.m

@@ -264,11 +264,11 @@
     [[managerInstance SSDP] stopSSDP];
 
     //set the title while refreshing
-    _refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:@"Refresh"];
+    _refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:NSLocalizedString(@"LOCAL_SERVER_REFRESH",nil)];
     //set the date and time of refreshing
     NSDateFormatter *formattedDate = [[NSDateFormatter alloc]init];
     [formattedDate setDateFormat:@"MMM d, h:mm a"];
-    NSString *lastupdated = [NSString stringWithFormat:@"Last Updated on %@",[formattedDate stringFromDate:[NSDate date]]];
+    NSString *lastupdated = [NSString stringWithFormat:NSLocalizedString(@"LOCAL_SERVER_LAST_UPDATE",nil),[formattedDate stringFromDate:[NSDate date]]];
     _refreshControl.attributedTitle = [[NSAttributedString alloc]initWithString:lastupdated];
     //end the refreshing
     [_refreshControl endRefreshing];

+ 1 - 1
Sources/VLCMovieViewController.m

@@ -341,7 +341,7 @@
         }
     } else {
         media = [VLCMedia mediaWithURL:self.url];
-        self.title = @"Network Stream";
+        self.title = NSLocalizedString(@"NETWORK_TITLE",nil);
     }
 
     [media addOptions: