forked from mirrors/linphone-iphone
Merge branch 'master' into tunnel
Conflicts: linphone.xcodeproj/project.pbxproj
This commit is contained in:
commit
15914c5bd3
5 changed files with 44 additions and 28 deletions
|
|
@ -53,7 +53,7 @@ extern void libmsamr_init();
|
|||
|
||||
-(void) onCall:(LinphoneCall*) currentCall StateChanged: (LinphoneCallState) new_state withMessage: (const char *) message {
|
||||
const char* lUserNameChars=linphone_address_get_username(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithCString:lUserNameChars]:@"Unknown";
|
||||
NSString* lUserName = lUserNameChars?[[NSString alloc] initWithCString:lUserNameChars]:NSLocalizedString(@"Unknown",nil);
|
||||
const char* lDisplayNameChars = linphone_address_get_display_name(linphone_call_get_remote_address(currentCall));
|
||||
NSString* lDisplayName = lDisplayNameChars?[[NSString alloc] initWithCString:lDisplayNameChars]:@"";
|
||||
|
||||
|
|
@ -88,21 +88,21 @@ extern void libmsamr_init();
|
|||
//get default proxy
|
||||
linphone_core_get_default_proxy([LinphoneManager getLc],&proxyCfg);
|
||||
if (proxyCfg == nil) {
|
||||
lMessage=@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.";
|
||||
lMessage=NSLocalizedString(@"Please make sure your device is connected to the internet and double check your SIP account configuration in the settings.",nil);
|
||||
} else {
|
||||
lMessage=[NSString stringWithFormat : @"Cannot call %@",lUserName];
|
||||
lMessage=[NSString stringWithFormat : NSLocalizedString(@"Cannot call %@",nil),lUserName];
|
||||
|
||||
}
|
||||
|
||||
if (message!=nil){
|
||||
lMessage=[NSString stringWithFormat : @"%@\nReason was: %s",lMessage, message];
|
||||
lMessage=[NSString stringWithFormat : NSLocalizedString(@"%@\nReason was: %s",nil),lMessage, message];
|
||||
}
|
||||
lTitle=@"Call failed";
|
||||
lTitle=NSLocalizedString(@"Call failed",nil);
|
||||
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:lTitle
|
||||
message:lMessage
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"Dismiss"
|
||||
cancelButtonTitle:NSLocalizedString(@"Dismiss",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
[callDelegate displayDialerFromUI:mCurrentViewController
|
||||
|
|
@ -201,9 +201,9 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin
|
|||
} else if (state == LinphoneRegistrationFailed ) {
|
||||
NSString* lErrorMessage=nil;
|
||||
if (linphone_proxy_config_get_error(cfg) == LinphoneReasonBadCredentials) {
|
||||
lErrorMessage = @"Bad credentials, check your account settings";
|
||||
lErrorMessage = NSLocalizedString(@"Bad credentials, check your account settings",nil);
|
||||
} else if (linphone_proxy_config_get_error(cfg) == LinphoneReasonNoResponse) {
|
||||
lErrorMessage = @"SIP server unreachable";
|
||||
lErrorMessage = NSLocalizedString(@"SIP server unreachable",nil);
|
||||
}
|
||||
[registrationDelegate displayRegistrationFailedFromUI:mCurrentViewController
|
||||
forUser:lUserName
|
||||
|
|
@ -216,10 +216,10 @@ static void linphone_iphone_call_state(LinphoneCore *lc, LinphoneCall* call, Lin
|
|||
&& linphone_proxy_config_get_error(cfg) != LinphoneReasonNoResponse) { //do not report network connection issue on registration
|
||||
//default behavior if no registration delegates
|
||||
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Registration failure"
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Registration failure",nil)
|
||||
message:lErrorMessage
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"Continue"
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[error show];
|
||||
}
|
||||
|
|
@ -390,11 +390,11 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
|
||||
} else {
|
||||
if (configCheckDisable == false ) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Warning"
|
||||
message:@"It seems you have not configured any proxy server from settings"
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Warning",nil)
|
||||
message:NSLocalizedString(@"It seems you have not configured any proxy server from settings",nil)
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Continue"
|
||||
otherButtonTitles:@"Never remind",nil];
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:NSLocalizedString(@"Never remind",nil),nil];
|
||||
[error show];
|
||||
}
|
||||
}
|
||||
|
|
@ -639,10 +639,10 @@ void networkReachabilityCallBack(SCNetworkReachabilityRef target, SCNetworkReach
|
|||
BOOL bAudioInputAvailable= [audioSession inputIsAvailable];
|
||||
|
||||
if(!bAudioInputAvailable){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"No microphone"
|
||||
message:@"You need to plug a microphone to your device to use this application."
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"No microphone",nil)
|
||||
message:NSLocalizedString(@"You need to plug a microphone to your device to use this application.",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"Ok"
|
||||
cancelButtonTitle:NSLocalizedString(@"Ok",nil)
|
||||
otherButtonTitles:nil ,nil];
|
||||
[error show];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,10 +24,10 @@
|
|||
@implementation UICallButton
|
||||
-(void) touchUp:(id) sender {
|
||||
if (!linphone_core_is_network_reachabled([LinphoneManager getLc])) {
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Network Error"
|
||||
message:@"There is no network connection available, enable WIFI or WWAN prior to place a call"
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Network Error",nil)
|
||||
message:NSLocalizedString(@"There is no network connection available, enable WIFI or WWAN prior to place a call",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"Continue"
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
return;
|
||||
|
|
@ -41,10 +41,10 @@
|
|||
if ([mAddress.text hasPrefix:@"sip:"]) {
|
||||
linphone_core_invite([LinphoneManager getLc], [mAddress.text cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
} else if ( proxyCfg==nil){
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:@"Invalid sip address"
|
||||
message:@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)"
|
||||
UIAlertView* error = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Invalid sip address",nil)
|
||||
message:NSLocalizedString(@"Either configure a SIP proxy server from settings prior to place a call or use a valid sip address (I.E sip:john@example.net)",nil)
|
||||
delegate:nil
|
||||
cancelButtonTitle:@"Continue"
|
||||
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
|
||||
otherButtonTitles:nil];
|
||||
[error show];
|
||||
|
||||
|
|
|
|||
|
|
@ -215,7 +215,7 @@
|
|||
[self displayIncalViewforUser:username
|
||||
withDisplayName:displayName];
|
||||
[call setEnabled:false];
|
||||
[callDuration setText:@"Calling..."];
|
||||
[callDuration setText:NSLocalizedString(@"Calling...",nil)];
|
||||
[speaker reset];
|
||||
}
|
||||
|
||||
|
|
@ -244,17 +244,17 @@
|
|||
if (notif)
|
||||
{
|
||||
notif.repeatInterval = 0;
|
||||
notif.alertBody =[NSString stringWithFormat:@" %@ is calling you",username];
|
||||
notif.alertBody =[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),username];
|
||||
notif.alertAction = @"Answer";
|
||||
notif.soundName = @"oldphone-mono-30s.caf";
|
||||
|
||||
[[UIApplication sharedApplication] presentLocalNotificationNow:notif];
|
||||
}
|
||||
} else {
|
||||
mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:@" %@ is calling you",username]
|
||||
mIncomingCallActionSheet = [[UIActionSheet alloc] initWithTitle:[NSString stringWithFormat:NSLocalizedString(@" %@ is calling you",nil),username]
|
||||
delegate:self
|
||||
cancelButtonTitle:@"Decline"
|
||||
destructiveButtonTitle:@"Answer"
|
||||
cancelButtonTitle:NSLocalizedString(@"Decline",nil)
|
||||
destructiveButtonTitle:NSLocalizedString(@"Answer",nil)
|
||||
otherButtonTitles:nil];
|
||||
mIncomingCallActionSheet.actionSheetStyle = UIActionSheetStyleDefault;
|
||||
[mIncomingCallActionSheet showInView:self.view];
|
||||
|
|
|
|||
BIN
Resources/en.lproj/Localizable.strings
Normal file
BIN
Resources/en.lproj/Localizable.strings
Normal file
Binary file not shown.
|
|
@ -78,6 +78,7 @@
|
|||
22E0A822111C44E100B04932 /* MoreViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81C111C44E100B04932 /* MoreViewController.m */; };
|
||||
22E0A823111C44E100B04932 /* ConsoleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22E0A81E111C44E100B04932 /* ConsoleViewController.xib */; };
|
||||
22E0A824111C44E100B04932 /* ConsoleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22E0A81F111C44E100B04932 /* ConsoleViewController.m */; };
|
||||
22E19E1E1386AFB900FBFE87 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 22E19E1C1386AFB900FBFE87 /* Localizable.strings */; };
|
||||
22F2508E107141E100AC9B3F /* PhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 22F2508C107141E100AC9B3F /* PhoneViewController.m */; };
|
||||
22F2508F107141E100AC9B3F /* PhoneViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 22F2508D107141E100AC9B3F /* PhoneViewController.xib */; };
|
||||
22F254811073D99800AC9B3F /* ringback.wav in Resources */ = {isa = PBXBuildFile; fileRef = 22F254801073D99800AC9B3F /* ringback.wav */; };
|
||||
|
|
@ -389,6 +390,7 @@
|
|||
22E0A81E111C44E100B04932 /* ConsoleViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ConsoleViewController.xib; sourceTree = "<group>"; };
|
||||
22E0A81F111C44E100B04932 /* ConsoleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ConsoleViewController.m; sourceTree = "<group>"; };
|
||||
22E0A820111C44E100B04932 /* ConsoleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ConsoleViewController.h; sourceTree = "<group>"; };
|
||||
22E19E1D1386AFB900FBFE87 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = Resources/en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
22F2508B107141E100AC9B3F /* PhoneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhoneViewController.h; sourceTree = "<group>"; };
|
||||
22F2508C107141E100AC9B3F /* PhoneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PhoneViewController.m; sourceTree = "<group>"; };
|
||||
22F2508D107141E100AC9B3F /* PhoneViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = PhoneViewController.xib; sourceTree = "<group>"; };
|
||||
|
|
@ -808,6 +810,7 @@
|
|||
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
22E19E1C1386AFB900FBFE87 /* Localizable.strings */,
|
||||
22BFFF79134F6AEA00997020 /* libssl.a */,
|
||||
22BFFF7A134F6AEA00997020 /* libcrypto.a */,
|
||||
22323023132A286700F10886 /* src */,
|
||||
|
|
@ -930,6 +933,7 @@
|
|||
Japanese,
|
||||
French,
|
||||
German,
|
||||
en,
|
||||
);
|
||||
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
|
||||
projectDirPath = "";
|
||||
|
|
@ -993,6 +997,7 @@
|
|||
228B19AF130290C500F154D3 /* iTunesArtwork in Resources */,
|
||||
22DA443F1354B3B6002CB522 /* Makefile.am in Resources */,
|
||||
22DA44401354B3B6002CB522 /* Makefile.in in Resources */,
|
||||
22E19E1E1386AFB900FBFE87 /* Localizable.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
|
@ -1028,6 +1033,17 @@
|
|||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
22E19E1C1386AFB900FBFE87 /* Localizable.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
22E19E1D1386AFB900FBFE87 /* en */,
|
||||
);
|
||||
name = Localizable.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
1D6058940D05DD3E006BFB54 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue