Chinese Localization
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#import "TemporaryApp.h"
|
||||
#import "IdManager.h"
|
||||
#import "ConnectionHelper.h"
|
||||
#import "LocalizationHelper.h"
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
#import "SettingsViewController.h"
|
||||
@@ -63,10 +64,10 @@ static NSMutableSet* hostList;
|
||||
// Needs to be synchronous to ensure the alert is shown before any potential
|
||||
// failure callback could be invoked.
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
self->_pairAlert = [UIAlertController alertControllerWithTitle:@"Pairing"
|
||||
message:[NSString stringWithFormat:@"Enter the following PIN on the host machine: %@\n\nIf your host PC is running Sunshine, navigate to the Sunshine web UI to enter the PIN.", PIN]
|
||||
self->_pairAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Pairing"]
|
||||
message:[LocalizationHelper localizedStringForKey:@"Enter_PIN_Msg", PIN]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[self->_pairAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action) {
|
||||
[self->_pairAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Cancel"] style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action) {
|
||||
self->_pairAlert = nil;
|
||||
[self->_discMan startDiscovery];
|
||||
[self hideLoadingFrame: ^{
|
||||
@@ -78,11 +79,11 @@ static NSMutableSet* hostList;
|
||||
}
|
||||
|
||||
- (void)displayPairingFailureDialog:(NSString *)message {
|
||||
UIAlertController* failedDialog = [UIAlertController alertControllerWithTitle:@"Pairing Failed"
|
||||
UIAlertController* failedDialog = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Pairing Failed"]
|
||||
message:message
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[Utils addHelpOptionToDialog:failedDialog];
|
||||
[failedDialog addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[failedDialog addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
|
||||
[_discMan startDiscovery];
|
||||
|
||||
@@ -124,7 +125,7 @@ static NSMutableSet* hostList;
|
||||
|
||||
- (void)enableUpButton {
|
||||
#if !TARGET_OS_TV
|
||||
[self->_upButton setTitle:@"Select New Host"];
|
||||
[self->_upButton setTitle: [LocalizationHelper localizedStringForKey: @"Select New Host"]];
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -133,10 +134,10 @@ static NSMutableSet* hostList;
|
||||
self.title = _selectedHost.name;
|
||||
}
|
||||
else if ([hostList count] == 0) {
|
||||
self.title = @"Searching for PCs on your network...";
|
||||
self.title = [LocalizationHelper localizedStringForKey: @"Searching for PCs on your network..."] ;
|
||||
}
|
||||
else {
|
||||
self.title = @"Select Host";
|
||||
self.title = [LocalizationHelper localizedStringForKey: @"Select Host" ];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,11 +181,11 @@ static NSMutableSet* hostList;
|
||||
return;
|
||||
}
|
||||
|
||||
UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:@"Connection Interrupted"
|
||||
UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Connection Interrupted"]
|
||||
message:appListResp.statusMessage
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[Utils addHelpOptionToDialog:applistAlert];
|
||||
[applistAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[applistAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
[self hideLoadingFrame: ^{
|
||||
[self showHostSelectionView];
|
||||
[[self activeViewController] presentViewController:applistAlert animated:YES completion:nil];
|
||||
@@ -317,11 +318,11 @@ static NSMutableSet* hostList;
|
||||
}
|
||||
|
||||
- (void)displayDnsFailedDialog {
|
||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Network Error"
|
||||
message:@"Failed to resolve host."
|
||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Network Error"]
|
||||
message:[LocalizationHelper localizedStringForKey:@"Failed to resolve host."]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[Utils addHelpOptionToDialog:alert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
[[self activeViewController] presentViewController:alert animated:YES completion:nil];
|
||||
}
|
||||
|
||||
@@ -390,11 +391,11 @@ static NSMutableSet* hostList;
|
||||
return;
|
||||
}
|
||||
|
||||
UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:@"Connection Failed"
|
||||
UIAlertController* applistAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Connection Failed"]
|
||||
message:serverInfoResp.statusMessage
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[Utils addHelpOptionToDialog:applistAlert];
|
||||
[applistAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[applistAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
|
||||
// Only display an alert if this was the result of a real
|
||||
// user action, not just passively entering the foreground again
|
||||
@@ -456,15 +457,15 @@ static NSMutableSet* hostList;
|
||||
|
||||
case StateOnline:
|
||||
if (host.pairState == PairStatePaired) {
|
||||
message = @"Online - Paired";
|
||||
message = [LocalizationHelper localizedStringForKey:@"Online - Paired"];
|
||||
}
|
||||
else {
|
||||
message = @"Online - Not Paired";
|
||||
message = [LocalizationHelper localizedStringForKey:@"Online - Not Paired"];
|
||||
}
|
||||
break;
|
||||
|
||||
case StateUnknown:
|
||||
message = @"Connecting";
|
||||
message = [LocalizationHelper localizedStringForKey:@"Connecting"];
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -473,35 +474,35 @@ static NSMutableSet* hostList;
|
||||
|
||||
UIAlertController* longClickAlert = [UIAlertController alertControllerWithTitle:host.name message:message preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
if (host.state != StateOnline) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Wake PC" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
UIAlertController* wolAlert = [UIAlertController alertControllerWithTitle:@"Wake-On-LAN" message:@"" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[wolAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Wake PC"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
UIAlertController* wolAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Wake-On-LAN"] message:@"" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[wolAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
if (host.mac == nil || [host.mac isEqualToString:@"00:00:00:00:00:00"]) {
|
||||
wolAlert.message = @"Host MAC unknown, unable to send WOL Packet";
|
||||
wolAlert.message = [LocalizationHelper localizedStringForKey: @"Host MAC unknown, unable to send WOL Packet"];
|
||||
} else {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
[WakeOnLanManager wakeHost:host];
|
||||
});
|
||||
wolAlert.message = @"Successfully sent wake-up request. It may take a few moments for the PC to wake. If it never wakes up, ensure it's properly configured for Wake-on-LAN.";
|
||||
wolAlert.message = [LocalizationHelper localizedStringForKey:@"Successfully sent wake-up request. It may take a few moments for the PC to wake. If it never wakes up, ensure it's properly configured for Wake-on-LAN."];
|
||||
}
|
||||
[[self activeViewController] presentViewController:wolAlert animated:YES completion:nil];
|
||||
}]];
|
||||
}
|
||||
else if (host.pairState == PairStatePaired) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"View All Apps" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"View All Apps"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
self->_showHiddenApps = YES;
|
||||
[self hostClicked:host view:view];
|
||||
}]];
|
||||
|
||||
#if !TARGET_OS_TV
|
||||
if (host.isNvidiaServerSoftware) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"NVIDIA GameStream End-of-Service" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"NVIDIA GameStream End-of-Service"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[Utils launchUrl:@"https://github.com/moonlight-stream/moonlight-docs/wiki/NVIDIA-GameStream-End-Of-Service-Announcement-FAQ"];
|
||||
}]];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Test Network" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Test Network"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action) {
|
||||
[self showLoadingFrame:^{
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
// Perform the network test on a GCD worker thread. It may take a while.
|
||||
@@ -511,19 +512,19 @@ static NSMutableSet* hostList;
|
||||
NSString* message;
|
||||
|
||||
if (portTestResult == 0) {
|
||||
message = @"This network does not appear to be blocking Moonlight. If you still have trouble connecting, check your PC's firewall settings.\n\nVisit the Moonlight Setup Guide on GitHub for additional setup help and troubleshooting steps.";
|
||||
message = [LocalizationHelper localizedStringForKey:@"NetTestOK"];
|
||||
}
|
||||
else if (portTestResult == ML_TEST_RESULT_INCONCLUSIVE) {
|
||||
message = @"The network test could not be performed because none of Moonlight's connection testing servers were reachable. Check your Internet connection or try again later.";
|
||||
message = [LocalizationHelper localizedStringForKey:@"ML_TEST_RESULT_INCONCLUSIVE"];
|
||||
}
|
||||
else {
|
||||
char blockedPorts[512];
|
||||
LiStringifyPortFlags(portTestResult, "\n", blockedPorts, sizeof(blockedPorts));
|
||||
message = [NSString stringWithFormat:@"Your current network connection seems to be blocking Moonlight. Streaming may not work while connected to this network.\n\nThe following network ports were blocked:\n%s", blockedPorts];
|
||||
message = [LocalizationHelper localizedStringForKey:@"NetTestFailed", blockedPorts];
|
||||
}
|
||||
|
||||
UIAlertController* netTestAlert = [UIAlertController alertControllerWithTitle:@"Network Test Complete" message:message preferredStyle:UIAlertControllerStyleAlert];
|
||||
[netTestAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
UIAlertController* netTestAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Network Test Complete"] message:message preferredStyle:UIAlertControllerStyleAlert];
|
||||
[netTestAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
[[self activeViewController] presentViewController:netTestAlert animated:YES completion:nil];
|
||||
}];
|
||||
});
|
||||
@@ -532,15 +533,15 @@ static NSMutableSet* hostList;
|
||||
}]];
|
||||
#if !TARGET_OS_TV
|
||||
if (host.state != StateOnline) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"NVIDIA GameStream End-of-Service" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"NVIDIA GameStream End-of-Service"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[Utils launchUrl:@"https://github.com/moonlight-stream/moonlight-docs/wiki/NVIDIA-GameStream-End-Of-Service-Announcement-FAQ"];
|
||||
}]];
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Connection Help" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Connection Help"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
[Utils launchUrl:@"https://github.com/moonlight-stream/moonlight-docs/wiki/Troubleshooting"];
|
||||
}]];
|
||||
}
|
||||
#endif
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Remove Host" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action) {
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Remove Host"] style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action) {
|
||||
[self->_discMan removeHostFromDiscovery:host];
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
[dataMan removeHost:host];
|
||||
@@ -550,7 +551,7 @@ static NSMutableSet* hostList;
|
||||
}
|
||||
|
||||
}]];
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[longClickAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Cancel"] style:UIAlertActionStyleCancel handler:nil]];
|
||||
|
||||
// these two lines are required for iPad support of UIAlertSheet
|
||||
longClickAlert.popoverPresentationController.sourceView = view;
|
||||
@@ -561,9 +562,9 @@ static NSMutableSet* hostList;
|
||||
|
||||
- (void) addHostClicked {
|
||||
Log(LOG_D, @"Clicked add host");
|
||||
UIAlertController* alertController = [UIAlertController alertControllerWithTitle:@"Add Host Manually" message:@"If Moonlight doesn't find your local gaming PC automatically,\nenter the IP address of your PC" preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
UIAlertController* alertController = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Add Host Manually"] message:[LocalizationHelper localizedStringForKey:@"If Moonlight doesn't find your local gaming PC automatically, enter the IP address of your PC"] preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Cancel"] style:UIAlertActionStyleCancel handler:nil]];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
NSString* hostAddress = [((UITextField*)[[alertController textFields] objectAtIndex:0]).text trim];
|
||||
[self showLoadingFrame:^{
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{
|
||||
@@ -581,12 +582,12 @@ static NSMutableSet* hostList;
|
||||
unsigned int portTestResults = LiTestClientConnectivity(CONN_TEST_SERVER, 443,
|
||||
ML_PORT_FLAG_TCP_47984 | ML_PORT_FLAG_TCP_47989);
|
||||
if (portTestResults != ML_TEST_RESULT_INCONCLUSIVE && portTestResults != 0) {
|
||||
error = [error stringByAppendingString:@"\n\nYour device's network connection is blocking Moonlight. Streaming may not work while connected to this network."];
|
||||
error = [error stringByAppendingString:[LocalizationHelper localizedStringForKey:@"!ML_TEST_RESULT_INCONCLUSIVE"]];
|
||||
}
|
||||
|
||||
UIAlertController* hostNotFoundAlert = [UIAlertController alertControllerWithTitle:@"Add Host Manually" message:error preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertController* hostNotFoundAlert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Add Host Manually"] message:error preferredStyle:UIAlertControllerStyleAlert];
|
||||
[Utils addHelpOptionToDialog:hostNotFoundAlert];
|
||||
[hostNotFoundAlert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[hostNotFoundAlert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self hideLoadingFrame:^{
|
||||
[[self activeViewController] presentViewController:hostNotFoundAlert animated:YES completion:nil];
|
||||
@@ -729,7 +730,7 @@ static NSMutableSet* hostList;
|
||||
}
|
||||
}
|
||||
else {
|
||||
message = [NSString stringWithFormat:@"%@ is currently running", currentApp.name];
|
||||
message = [LocalizationHelper localizedStringForKey:@"%@ is currently running", currentApp.name];
|
||||
}
|
||||
|
||||
UIAlertController* alertController = [UIAlertController
|
||||
@@ -738,7 +739,7 @@ static NSMutableSet* hostList;
|
||||
preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
|
||||
[alertController addAction:[UIAlertAction
|
||||
actionWithTitle:currentApp == nil ? @"Launch App" : ([app.id isEqualToString:currentApp.id] ? @"Resume App" : @"Resume Running App") style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
actionWithTitle:currentApp == nil ? [LocalizationHelper localizedStringForKey:@"Launch App"] : ([app.id isEqualToString:currentApp.id] ? [LocalizationHelper localizedStringForKey: @"Resume App"] : [LocalizationHelper localizedStringForKey: @"Resume Running App"]) style:UIAlertActionStyleDefault handler:^(UIAlertAction* action){
|
||||
if (currentApp != nil) {
|
||||
Log(LOG_I, @"Resuming application: %@", currentApp.name);
|
||||
[self prepareToStreamApp:currentApp];
|
||||
@@ -753,7 +754,7 @@ static NSMutableSet* hostList;
|
||||
|
||||
if (currentApp != nil) {
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:
|
||||
[app.id isEqualToString:currentApp.id] ? @"Quit App" : @"Quit Running App and Start" style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
[app.id isEqualToString:currentApp.id] ? [LocalizationHelper localizedStringForKey:@"Quit App"] : [LocalizationHelper localizedStringForKey:@"Quit Running App and Start"] style:UIAlertActionStyleDestructive handler:^(UIAlertAction* action){
|
||||
Log(LOG_I, @"Quitting application: %@", currentApp.name);
|
||||
[self showLoadingFrame: ^{
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
||||
@@ -783,11 +784,10 @@ static NSMutableSet* hostList;
|
||||
|
||||
// If it fails, display an error and stop the current operation
|
||||
if (quitResponse.statusCode != 200) {
|
||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Quitting App Failed"
|
||||
message:@"Failed to quit app. If this app was started by "
|
||||
"another device, you'll need to quit from that device."
|
||||
UIAlertController* alert = [UIAlertController alertControllerWithTitle:[LocalizationHelper localizedStringForKey:@"Quitting App Failed"]
|
||||
message:[LocalizationHelper localizedStringForKey:@"Failed to quit app. If this app was started by another device, you'll need to quit from that device."]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:nil]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Ok"] style:UIAlertActionStyleDefault handler:nil]];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[self updateAppsForHost:app.host];
|
||||
[self hideLoadingFrame: ^{
|
||||
@@ -818,7 +818,7 @@ static NSMutableSet* hostList;
|
||||
}
|
||||
|
||||
if (currentApp == nil || ![app.id isEqualToString:currentApp.id] || app.hidden) {
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:app.hidden ? @"Show App" : @"Hide App"
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:app.hidden ? [LocalizationHelper localizedStringForKey: @"Show App"] : [LocalizationHelper localizedStringForKey: @"Hide App"]
|
||||
style:app.hidden ? UIAlertActionStyleDefault : UIAlertActionStyleDestructive
|
||||
handler:^(UIAlertAction* action) {
|
||||
app.hidden = !app.hidden;
|
||||
@@ -829,7 +829,7 @@ static NSMutableSet* hostList;
|
||||
}]];
|
||||
}
|
||||
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:nil]];
|
||||
[alertController addAction:[UIAlertAction actionWithTitle:[LocalizationHelper localizedStringForKey:@"Cancel"] style:UIAlertActionStyleCancel handler:nil]];
|
||||
|
||||
// these two lines are required for iPad support of UIAlertSheet
|
||||
alertController.popoverPresentationController.sourceView = view;
|
||||
|
||||
Reference in New Issue
Block a user