Update i18n

This commit is contained in:
Yann Diorcet 2012-08-08 18:01:21 +02:00
parent 85b809f2c5
commit bd7c9e9cae
7 changed files with 26 additions and 33 deletions

View file

@ -408,10 +408,10 @@
[cell.detailTextField setText:value];
if ([indexPath section] == 0) {
[cell.detailTextField setKeyboardType:UIKeyboardTypePhonePad];
[cell.detailTextField setPlaceholder:@"Phone number"];
[cell.detailTextField setPlaceholder:NSLocalizedString(@"Phone number", nil)];
} else {
[cell.detailTextField setKeyboardType:UIKeyboardTypeASCIICapable];
[cell.detailTextField setPlaceholder:@"SIP address"];
[cell.detailTextField setPlaceholder:NSLocalizedString(@"SIP address", nil)];
}
return cell;
}
@ -567,9 +567,9 @@
- (NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
if(section == 0) {
return nil;
return NSLocalizedString(@"Phone number", nil);
} else {
return @"SIP";
return NSLocalizedString(@"SIP", nil);
}
}

View file

@ -135,15 +135,7 @@ static UICompositeViewDescription *compositeDescription = nil;
}
case LinphoneRegistrationFailed: {
[waitView setHidden:true];
//default behavior if no registration delegates
/*UIAlertView* error = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"Registration failure for user %@", usernameField.text]
message:[notif.userInfo objectForKey: @"message"]
delegate:nil
cancelButtonTitle:@"Continue"
otherButtonTitles:nil,nil];
[error show];
[error release];*/
//erase uername passwd
[[LinphoneManager instance].settingsStore setObject:Nil forKey:@"username_preference"];
[[LinphoneManager instance].settingsStore setObject:Nil forKey:@"password_preference"];

View file

@ -186,7 +186,7 @@ static UICompositeViewDescription *compositeDescription = nil;
// Set Address
if(address == nil) {
address = @"Unknown";
address = NSLocalizedString(@"Unknown", nil);
}
[addressLabel setText:address];
@ -200,21 +200,21 @@ static UICompositeViewDescription *compositeDescription = nil;
// State
NSMutableString *state = [NSMutableString string];
if (callLog->dir == LinphoneCallIncoming) {
[state setString:@"Incoming call"];
[state setString:NSLocalizedString(@"Incoming call", nil)];
} else {
[state setString:@"Outgoing call"];
[state setString:NSLocalizedString(@"Outgoing call", nil)];
}
switch (callLog->status) {
case LinphoneCallSuccess:
break;
case LinphoneCallAborted:
[state appendString:@" (Aborted)"];
[state appendString:NSLocalizedString(@" (Aborted)", nil)];
break;
case LinphoneCallMissed:
[state appendString:@" (Missed)"];
[state appendString:NSLocalizedString(@" (Missed)", nil)];
break;
case LinphoneCallDeclined :
[state appendString:@" (Declined)"];
case LinphoneCallDeclined:
[state appendString:NSLocalizedString(@" (Declined)", nil)];
break;
}
[typeLabel setText:state];

View file

@ -362,6 +362,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
for(int i = 0; i < [tokenData length]; ++i) {
[tokenString appendFormat:@"%02X", (unsigned int)tokenBuffer[i]];
}
// NSLocalizedString(@"IC_MSG", nil); // Fake
NSString *params = [NSString stringWithFormat:@"APN-TOK=%@;APN-MSG=IC_MSG;APN-SND=oldphone-mono-30s.caf", tokenString];
linphone_proxy_config_set_contact_parameters(proxyCfg, [params UTF8String]);
}

View file

@ -177,9 +177,9 @@
ABPropertyID property = [[propertyList objectAtIndex:[indexPath row]] intValue];
if(property == kABPersonFirstNameProperty) {
[cell.detailTextField setPlaceholder:@"First name"];
[cell.detailTextField setPlaceholder:NSLocalizedString(@"First name", nil)];
} else if (property == kABPersonLastNameProperty) {
[cell.detailTextField setPlaceholder:@"Last name"];
[cell.detailTextField setPlaceholder:NSLocalizedString(@"Last name", nil)];
}
[cell.detailTextField setKeyboardType:UIKeyboardTypeDefault];
if(contact) {

View file

@ -313,7 +313,6 @@ static UICompositeViewDescription *compositeDescription = nil;
- (void)registrationUpdate:(LinphoneRegistrationState)state {
switch (state) {
case LinphoneRegistrationOk: {
[[LinphoneManager instance].settingsStore setBool:false forKey:@"enable_first_login_view_preference"];
[waitView setHidden:true];
[[PhoneMainView instance] changeCurrentView:[DialerViewController compositeViewDescription]];
break;
@ -407,20 +406,21 @@ static UICompositeViewDescription *compositeDescription = nil;
NSMutableString *errors = [NSMutableString string];
if ([username length] < LINPHONE_WIZARD_MIN_USERNAME_LENGTH) {
[errors appendString:[NSString stringWithFormat:@"The username is too short (minimum %d characters).\n", LINPHONE_WIZARD_MIN_USERNAME_LENGTH]];
[errors appendString:[NSString stringWithFormat:NSLocalizedString(@"The username is too short (minimum %d characters).\n", nil), LINPHONE_WIZARD_MIN_USERNAME_LENGTH]];
}
if ([password length] < LINPHONE_WIZARD_MIN_PASSWORD_LENGTH) {
[errors appendString:[NSString stringWithFormat:@"The password is too short (minimum %d characters).\n", LINPHONE_WIZARD_MIN_PASSWORD_LENGTH]];
[errors appendString:[NSString stringWithFormat:NSLocalizedString(@"The password is too short (minimum %d characters).\n", nil), LINPHONE_WIZARD_MIN_PASSWORD_LENGTH]];
}
if (![password2 isEqualToString:password]) {
[errors appendString:@"The passwords are different.\n"];
[errors appendString:NSLocalizedString(@"The passwords are different.\n", nil)];
}
NSPredicate *emailTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", @".+@.+\\.[A-Za-z]{2}[A-Za-z]*"];
if(![emailTest evaluateWithObject:email]) {
[errors appendString:@"The email is invalid.\n"];
[errors appendString:NSLocalizedString(@"The email is invalid.\n", nil)];
}
if([errors length]) {
@ -507,7 +507,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[LinphoneLogger log:LinphoneLoggerDebug format:@"XMLRPC %@: %@", [request method], [response body]];
[waitView setHidden:true];
if ([response isFault]) {
NSString *errorString = [NSString stringWithFormat:@"Can't create account: Communication issue (%@)", [response faultString]];
NSString *errorString = [NSString stringWithFormat:NSLocalizedString(@"Can't create account: Communication issue (%@)", nil), [response faultString]];
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Communication issue",nil)
message:errorString
delegate:nil
@ -519,7 +519,7 @@ static UICompositeViewDescription *compositeDescription = nil;
if([[request method] isEqualToString:@"check_account"]) {
if([response object] == [NSNumber numberWithInt:1]) {
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Check issue",nil)
message:@"Username already exists"
message:NSLocalizedString(@"Username already exists", nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:nil,nil];
@ -540,7 +540,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[self findTextField:ViewElement_Password].text = password;
} else {
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Account creation issue",nil)
message:@"Can't create the account. Please try again."
message:NSLocalizedString(@"Can't create the account. Please try again.", nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:nil,nil];
@ -554,7 +554,7 @@ static UICompositeViewDescription *compositeDescription = nil;
[self addProxyConfig:username password:password domain:LINPHONE_WIZARD_DOMAIN];
} else {
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Account validation issue",nil)
message:@"Your account is not validate yet."
message:NSLocalizedString(@"Your account is not validate yet.", nil)
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
otherButtonTitles:nil,nil];
@ -566,11 +566,11 @@ static UICompositeViewDescription *compositeDescription = nil;
}
- (void)request: (XMLRPCRequest *)request didFailWithError: (NSError *)error {
NSString *errorString = [NSString stringWithFormat:@"Can't create account: Communication issue (%@)", [error localizedDescription]];
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Communication issue",nil)
NSString *errorString = [NSString stringWithFormat:NSLocalizedString(@"Can't create account: Communication issue (%@)", nil), [error localizedDescription]];
UIAlertView* errorView = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Communication issue", nil)
message:errorString
delegate:nil
cancelButtonTitle:NSLocalizedString(@"Continue",nil)
cancelButtonTitle:NSLocalizedString(@"Continue", nil)
otherButtonTitles:nil,nil];
[errorView show];
[errorView release];