From bd7c9e9cae0f990a623adcae1bab30b07424a87c Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Wed, 8 Aug 2012 18:01:21 +0200 Subject: [PATCH] Update i18n --- Classes/ContactDetailsTableViewController.m | 8 +++---- Classes/FirstLoginViewController.m | 8 ------- Classes/HistoryDetailsViewController.m | 14 ++++++------ Classes/LinphoneCoreSettingsStore.m | 1 + Classes/LinphoneUI/UIContactDetailsHeader.m | 4 ++-- Classes/WizardViewController.m | 24 ++++++++++---------- Resources/en.lproj/Localizable.strings | Bin 5782 -> 13084 bytes 7 files changed, 26 insertions(+), 33 deletions(-) diff --git a/Classes/ContactDetailsTableViewController.m b/Classes/ContactDetailsTableViewController.m index cc6f57bc8..ecc513ff6 100644 --- a/Classes/ContactDetailsTableViewController.m +++ b/Classes/ContactDetailsTableViewController.m @@ -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); } } diff --git a/Classes/FirstLoginViewController.m b/Classes/FirstLoginViewController.m index c5c02ef0f..38f93cf6a 100644 --- a/Classes/FirstLoginViewController.m +++ b/Classes/FirstLoginViewController.m @@ -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"]; diff --git a/Classes/HistoryDetailsViewController.m b/Classes/HistoryDetailsViewController.m index bc171e708..56941f55a 100644 --- a/Classes/HistoryDetailsViewController.m +++ b/Classes/HistoryDetailsViewController.m @@ -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]; diff --git a/Classes/LinphoneCoreSettingsStore.m b/Classes/LinphoneCoreSettingsStore.m index dc3e2be4c..2931fba38 100644 --- a/Classes/LinphoneCoreSettingsStore.m +++ b/Classes/LinphoneCoreSettingsStore.m @@ -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]); } diff --git a/Classes/LinphoneUI/UIContactDetailsHeader.m b/Classes/LinphoneUI/UIContactDetailsHeader.m index 48ead3574..10650d957 100644 --- a/Classes/LinphoneUI/UIContactDetailsHeader.m +++ b/Classes/LinphoneUI/UIContactDetailsHeader.m @@ -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) { diff --git a/Classes/WizardViewController.m b/Classes/WizardViewController.m index 82defa8c5..3049e127f 100644 --- a/Classes/WizardViewController.m +++ b/Classes/WizardViewController.m @@ -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]; diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index a0682f3c400d9daceb885ea83bc2c69efcdc0ab2..8c5c5114be1d1bac0b3d5bc25f3e5a50adbed8ae 100644 GIT binary patch literal 13084 zcmd^GZBHCG5ccQ%ic{1G5>-U)$5c^6DTz=DL?KaBsZw>hBXAA(qP@Eu{Q0)eGlTK0 z*Bh3?T%tyZW!LuFkLTSp%RhfV4v#`F9E2&Z16;@WIS!Ms!1F9rX!#UIVTiUNTHc2X zT-kqu)(P&8F=h*GkHX_{FWkr7gYXR3QJCX82>oz|AC5i2^9ANx%B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