Commit 633d52b5 authored by Carola Nitz's avatar Carola Nitz Committed by Felix Paul Kühne

Localization: Added localization for several strings

Signed-off-by: Felix Paul Kühne's avatarFelix Paul Kühne <fkuehne@videolan.org>
parent 1e045b51
B/* A single strings file, whose title is specified in your preferences schema. The strings files provide the localized content to display to the user for each of your preferences. */
......
B"CHOOSE_AUDIO_TRACK"="Choose Audio Track";
......
......@@ -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];
......
......@@ -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];
}
......
......@@ -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];
}
......
......@@ -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];
......
......@@ -341,7 +341,7 @@
}
} else {
media = [VLCMedia mediaWithURL:self.url];
self.title = @"Network Stream";
self.title = NSLocalizedString(@"NETWORK_TITLE",nil);
}
[media addOptions:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment