diff --git a/ios/.DS_Store b/ios/.DS_Store index 6ebde5e66f1f..8f456fbba6e4 100644 Binary files a/ios/.DS_Store and b/ios/.DS_Store differ diff --git a/ios/iosremote/UIBarButtonItem+Theme.h b/ios/iosremote/UIBarButtonItem+Theme.h index 5fa5b74dd181..70935f9c30c2 100644 --- a/ios/iosremote/UIBarButtonItem+Theme.h +++ b/ios/iosremote/UIBarButtonItem+Theme.h @@ -1,12 +1,11 @@ -// -// UIBarButtonItem+Theme.h -// VLC for iOS -// -// Created by Romain Goyet on 14/06/13. -// Copyright (c) 2013 Applidium. All rights reserved. -// -// Refer to the COPYING file of the official project for license. -// +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + #import diff --git a/ios/iosremote/UIBarButtonItem+Theme.m b/ios/iosremote/UIBarButtonItem+Theme.m index 4f125fc477ee..ccc64150eef6 100644 --- a/ios/iosremote/UIBarButtonItem+Theme.m +++ b/ios/iosremote/UIBarButtonItem+Theme.m @@ -1,12 +1,11 @@ -// -// UIBarButtonItem+Theme.m -// VLC for iOS -// -// Created by Romain Goyet on 14/06/13. -// Copyright (c) 2013 Applidium. All rights reserved. -// -// Refer to the COPYING file of the official project for license. -// +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + #import "UIBarButtonItem+Theme.h" diff --git a/ios/iosremote/iPad_autosize.storyboard b/ios/iosremote/en.lproj/iPad_autosize.storyboard similarity index 88% rename from ios/iosremote/iPad_autosize.storyboard rename to ios/iosremote/en.lproj/iPad_autosize.storyboard index 1c261b3c8202..fae43a059d9a 100644 --- a/ios/iosremote/iPad_autosize.storyboard +++ b/ios/iosremote/en.lproj/iPad_autosize.storyboard @@ -1,6 +1,7 @@ + @@ -17,7 +18,7 @@ - + \ No newline at end of file diff --git a/ios/iosremote/iosremote/newServer_vc.m b/ios/iosremote/iosremote/newServer_vc.m index eb02ebd5a12b..6c534a475378 100644 --- a/ios/iosremote/iosremote/newServer_vc.m +++ b/ios/iosremote/iosremote/newServer_vc.m @@ -34,17 +34,17 @@ NSString *serverName = [self.nameCell.textField text]; NSString *serverAddr = [self.addrCell.textField text]; if ([serverAddr isValidIPAddress]) { - if (!serverName) { + if (!serverName || [serverName isEqualToString:@""]) { serverName = [[self fetchSSIDInfo] valueForKey:@"SSID"]; } NSLog(@"New server name:%@ ip:%@", serverName, serverAddr); [self.comManager addServersWithName:serverName AtAddress:serverAddr]; [self.navigationController popViewControllerAnimated:YES]; } else { - UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Invalid IP Address" - message:@"A valid IP address should be like this: \"192.168.1.1\"" + UIAlertView *message = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid IP Address", @"Invalid IP Address Alert title") + message:NSLocalizedString(@"Invalid IP Address Msg", @"Invalid IP Address Alert message") delegate:nil - cancelButtonTitle:@"OK" + cancelButtonTitle:NSLocalizedString(@"OK", @"OK Button on Alert view") otherButtonTitles:nil]; [message show]; } @@ -66,7 +66,6 @@ - (id)fetchSSIDInfo { NSArray *ifs = (__bridge_transfer id)CNCopySupportedInterfaces(); id info = nil; - NSLog(@"Obtaining Wifi SSID"); for (NSString *ifnam in ifs) { info = (__bridge_transfer id)CNCopyCurrentNetworkInfo((__bridge CFStringRef)ifnam); NSLog(@"%@ => %@", ifnam, info); @@ -83,12 +82,12 @@ - (void)viewDidLoad { self.comManager = [CommunicationManager sharedComManager]; - [self setNameCell: [self newDetailCellWithTag:ServerName]]; - [self setAddrCell: [self newDetailCellWithTag:ServerAddr]]; + [self setNameCell:[self newDetailCellWithTag:ServerName]]; + [self setAddrCell:[self newDetailCellWithTag:ServerAddr]]; [self setTitle:@"New Server"]; - UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Cancel" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; + UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Cancel", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; self.navigationItem.leftBarButtonItem = backButton; @@ -238,14 +237,14 @@ { cell = [self nameCell]; text = [self.server serverName]; - placeholder = @"Name (optional)"; + placeholder = NSLocalizedString(@"Name (optional)", @"EditableTableViewCell placeholder"); keyboardType = UIKeyboardTypeDefault; } else { cell = [self addrCell]; text = [self.server serverAddress]; - placeholder = @"IP Address"; + placeholder = NSLocalizedString(@"IP Address", @"EditableTableViewCell placeholder"); keyboardType = UIKeyboardTypeNumbersAndPunctuation; } break; diff --git a/ios/iosremote/iosremote/serverList_vc.m b/ios/iosremote/iosremote/serverList_vc.m index 8f4bb9d166bc..445e31afda9f 100644 --- a/ios/iosremote/iosremote/serverList_vc.m +++ b/ios/iosremote/iosremote/serverList_vc.m @@ -54,10 +54,10 @@ -(void) netService:(NSNetService *)sender didNotResolve:(NSDictionary *)errorDict { NSLog(@"Failed to resolve"); - UIAlertView *message = [[UIAlertView alloc] initWithTitle:@"Failed to reach the computer" - message:@"Please restart your application or wait the application to refresh. " + UIAlertView *message = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Failed to reach your computer", nil) + message:NSLocalizedString(@"Please consider restart LibreOffice Impress on your computer.", nil) delegate:self - cancelButtonTitle:@"OK" + cancelButtonTitle:NSLocalizedString(@"OK", nil) otherButtonTitles:nil]; [self disableSpinner]; [message show]; @@ -158,7 +158,7 @@ self.serverTable.dataSource = self; self.serverTable.delegate = self; - [self setTitle:@"Impress Remote"]; + [self setTitle:NSLocalizedString(@"Impress Remote", @"App name displayed on navbar")]; } @@ -185,6 +185,7 @@ }]; NSLog(@"Clear auto discovered servers"); [self.comManager.autoDiscoveryServers removeAllObjects]; + [self.serverTable reloadData]; self.serviceBrowser = [[NSNetServiceBrowser alloc] init]; [self.serviceBrowser setDelegate:self]; [self.serviceBrowser searchForServicesOfType:@"_impressremote._tcp" inDomain:@"local"]; @@ -272,10 +273,10 @@ switch (section) { case 0: - sectionName = [NSString stringWithFormat:@"Detected connections"]; + sectionName = [NSString stringWithFormat:NSLocalizedString(@"Detected Connections", @"Server list section title")]; break; case 1: - sectionName = [NSString stringWithFormat:@"Custom connections"]; + sectionName = [NSString stringWithFormat:NSLocalizedString(@"Custom Connections", @"Server list section title")]; break; } UILabel *sectionHeader; @@ -302,7 +303,7 @@ sectionFooter.backgroundColor = [UIColor clearColor]; sectionFooter.font = kAppSmallTextFont; sectionFooter.textColor = kTintColor; - sectionFooter.text = @"In case your computer does not appear in the section above, manually add a computer with its IP address."; + sectionFooter.text = NSLocalizedString(@"Customize server config instruction", @"Displayed when no customized server is available"); UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tableView.bounds.size.width, [self tableView:tableView heightForHeaderInSection:section])]; [view addSubview:sectionFooter]; diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m index c39e449d2ffc..f181b313f4aa 100644 --- a/ios/iosremote/iosremote/slideShowPreviewTable_vc.m +++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc.m @@ -114,7 +114,7 @@ self.modalViewController.view.backgroundColor = [UIColor clearColor]; _startButton.frame = CGRectMake(30.0, 50.0, 470.0, 50.0); } - [_startButton setTitle:@"Start Presentation" forState:UIControlStateNormal]; + [_startButton setTitle:NSLocalizedString(@"Start Presentation", nil) forState:UIControlStateNormal]; [_startButton setTitleColor:kTintColor forState:UIControlStateNormal]; [_startButton setTitleColor:[UIColor lightGrayColor] forState:UIControlStateHighlighted]; [_startButton addTarget:self action:@selector(startPresentationAction:) forControlEvents:UIControlEventTouchUpInside]; diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m index 3787c29b2360..ca09716fc721 100644 --- a/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m +++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc_ipad.m @@ -58,7 +58,7 @@ NSLog(@"Received: %@", self.comManager.interpreter.slideShow.title); }]; - UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Connect" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; + UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Connect", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; self.navigationItem.leftBarButtonItem = backButton; } diff --git a/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m b/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m index 3f44b7f4a521..e1cf5089fb7d 100644 --- a/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m +++ b/ios/iosremote/iosremote/slideShowPreviewTable_vc_iphone.m @@ -31,7 +31,7 @@ NSLog(@"Received: %@", self.comManager.interpreter.slideShow.title); }]; - UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:@"Connect" style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; + UIBarButtonItem *backButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Connect", nil) style:UIBarButtonItemStyleBordered target:self action:@selector(handleBack)]; [backButton setBackgroundImage:[UIImage imageNamed:@"backButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; self.navigationItem.leftBarButtonItem = backButton; } diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m b/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m index 7b3d56b7877e..753dbb6352e5 100644 --- a/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m +++ b/ios/iosremote/iosremote/slideShowSwipeInList_ipad.m @@ -122,12 +122,6 @@ dispatch_queue_t backgroundQueue; return [self.slideshow size]; } -- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section -{ - return @"Slides"; -} - - - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"slide"; diff --git a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m index 28a00a7be4a6..6de77bc75289 100644 --- a/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m +++ b/ios/iosremote/iosremote/slideShowSwipeInList_iphone.m @@ -46,7 +46,7 @@ dispatch_queue_t backgroundQueue; [self.stopWatch start]; } - UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"slideshowRail.png"]]; + UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"slideshowRail"]]; [tempImageView setFrame:self.tableView.frame]; self.tableView.backgroundView = tempImageView; @@ -112,10 +112,10 @@ dispatch_queue_t backgroundQueue; { switch (section) { case 0: - return @"Stop Watch"; + return NSLocalizedString(@"Stop Watch", @"Sidebar section header"); break; case 1: - return @"Slides"; + return NSLocalizedString(@"Slides", @"Sidebar section header"); default: break; } diff --git a/ios/iosremote/iosremote/slideShow_vc_iphone.m b/ios/iosremote/iosremote/slideShow_vc_iphone.m index b53be8715bab..87cedecbe986 100644 --- a/ios/iosremote/iosremote/slideShow_vc_iphone.m +++ b/ios/iosremote/iosremote/slideShow_vc_iphone.m @@ -132,6 +132,7 @@ } } +// Not localized for now since this is subject to fundemental changes - (IBAction)pointerAction:(id)sender { if (self.count == 0 || self.count == 1){ CGPoint p; @@ -292,7 +293,7 @@ self.revealViewController.navigationItem.rightBarButtonItem = backButton; - self.revealButtonItem = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed:@"more_icon.png"] + self.revealButtonItem = [[UIBarButtonItem alloc] initWithImage: [UIImage imageNamed:@"more_icon"] style:UIBarButtonItemStyleBordered target:self.revealViewController action:@selector( revealToggle: )]; @@ -316,9 +317,17 @@ - (void) popOverStart:(id)sender { if (!isBlank) { - [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) inView:self.view withTitle:@"More" withStringArray:[NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Blank Screen", nil] delegate:self]; + [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) + inView:self.view + withTitle:NSLocalizedString(@"More", @"Popover title") + withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Blank Screen", nil), nil] + delegate:self]; } else { - [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) inView:self.view withTitle:@"More" withStringArray:[NSArray arrayWithObjects:@"Stop Presentation", @"Restart", @"Resume from blank screen", nil] delegate:self]; + [PopoverView showPopoverAtPoint: CGPointMake(self.navigationController.view.frame.size.width - 20, 0) + inView:self.view + withTitle:@"More" + withStringArray:[NSArray arrayWithObjects:NSLocalizedString(@"Stop Presentation", nil), NSLocalizedString(@"Restart", nil), NSLocalizedString(@"Resume from blank screen", nil), nil] + delegate:self]; } } diff --git a/ios/iosremote/iosremote/timer_clear_btn.png b/ios/iosremote/iosremote/timer_clear_btn.png index 2c74717cadd5..92d5e54bce64 100644 Binary files a/ios/iosremote/iosremote/timer_clear_btn.png and b/ios/iosremote/iosremote/timer_clear_btn.png differ diff --git a/ios/iosremote/iosremote/timer_clear_btn@2x.png b/ios/iosremote/iosremote/timer_clear_btn@2x.png new file mode 100644 index 000000000000..eb41194fb16a Binary files /dev/null and b/ios/iosremote/iosremote/timer_clear_btn@2x.png differ diff --git a/ios/iosremote/iosremote/timer_pause_btn.png b/ios/iosremote/iosremote/timer_pause_btn.png index c2829d5f06a5..ff155abfc58a 100644 Binary files a/ios/iosremote/iosremote/timer_pause_btn.png and b/ios/iosremote/iosremote/timer_pause_btn.png differ diff --git a/ios/iosremote/iosremote/timer_pause_btn@2x.png b/ios/iosremote/iosremote/timer_pause_btn@2x.png new file mode 100644 index 000000000000..cdcc54375e29 Binary files /dev/null and b/ios/iosremote/iosremote/timer_pause_btn@2x.png differ diff --git a/ios/iosremote/iosremote/timer_resume_btn.png b/ios/iosremote/iosremote/timer_resume_btn.png index fc980b11b71f..1ff1681093d3 100644 Binary files a/ios/iosremote/iosremote/timer_resume_btn.png and b/ios/iosremote/iosremote/timer_resume_btn.png differ diff --git a/ios/iosremote/iosremote/timer_resume_btn@2x.png b/ios/iosremote/iosremote/timer_resume_btn@2x.png new file mode 100644 index 000000000000..47dc5597c4cd Binary files /dev/null and b/ios/iosremote/iosremote/timer_resume_btn@2x.png differ diff --git a/ios/iosremote/iosremote/timer_start_btn.png b/ios/iosremote/iosremote/timer_start_btn.png index 6253566730d8..0ba1051da474 100644 Binary files a/ios/iosremote/iosremote/timer_start_btn.png and b/ios/iosremote/iosremote/timer_start_btn.png differ diff --git a/ios/iosremote/iosremote/timer_start_btn@2x.png b/ios/iosremote/iosremote/timer_start_btn@2x.png new file mode 100644 index 000000000000..9164857d24b3 Binary files /dev/null and b/ios/iosremote/iosremote/timer_start_btn@2x.png differ diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/InfoPlist.strings b/ios/iosremote/iosremote/zh-Hans.lproj/InfoPlist.strings new file mode 100644 index 000000000000..477b28ff8f86 --- /dev/null +++ b/ios/iosremote/iosremote/zh-Hans.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard new file mode 100644 index 000000000000..b061c5090799 --- /dev/null +++ b/ios/iosremote/iosremote/zh-Hans.lproj/iPhone_autoSize.storyboard @@ -0,0 +1,546 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ios/iosremote/zh-Hans.lproj/Localizable.strings b/ios/iosremote/zh-Hans.lproj/Localizable.strings new file mode 100644 index 000000000000..43c53679a0a8 Binary files /dev/null and b/ios/iosremote/zh-Hans.lproj/Localizable.strings differ diff --git a/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard new file mode 100644 index 000000000000..fae43a059d9a --- /dev/null +++ b/ios/iosremote/zh-Hans.lproj/iPad_autosize.storyboard @@ -0,0 +1,553 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file