From 6d76b8b27b119c6c20d51b0a972f5296458c95ee Mon Sep 17 00:00:00 2001 From: Frederic Jacobs Date: Thu, 3 Jul 2014 15:00:59 +0200 Subject: [PATCH] Localized challenge alertview --- Signal/src/environment/LocalizableText.h | 5 +++++ Signal/src/view controllers/RegisterViewController.m | 3 +-- Signal/translations/en.lproj/Localizable.strings | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Signal/src/environment/LocalizableText.h b/Signal/src/environment/LocalizableText.h index 162141c13..9074438ca 100644 --- a/Signal/src/environment/LocalizableText.h +++ b/Signal/src/environment/LocalizableText.h @@ -132,6 +132,11 @@ #define REGISTER_ERROR_ALERT_VIEW_BODY NSLocalizedString(@"REGISTRATION_BODY", @"") #define REGISTER_ERROR_ALERT_VIEW_DISMISS NSLocalizedString(@"OK", @"") +#define REGISTER_CHALLENGE_ALERT_VIEW_TITLE NSLocalizedString(@" REGISTER_CHALLENGE_ALERT_VIEW_TITLE", @"") +#define REGISTER_CHALLENGE_ALERT_VIEW_BODY NSLocalizedString(@"REGISTER_CHALLENGE_ALERT_VIEW_BODY", @"") + +#define REGISTER_CHALLENGE_ALERT_DISMISS NSLocalizedString(@"OK", @"") + #pragma mark - Invite Users #define INVITE_USERS_ACTION_SHEET_TITLE NSLocalizedString(@"INVITE_USERS_ACTION_SHEET_TITLE", @""); diff --git a/Signal/src/view controllers/RegisterViewController.m b/Signal/src/view controllers/RegisterViewController.m index 6defab2a5..1bc4d3262 100644 --- a/Signal/src/view controllers/RegisterViewController.m +++ b/Signal/src/view controllers/RegisterViewController.m @@ -201,8 +201,7 @@ if ([error isKindOfClass:[HttpResponse class]]) { HttpResponse* badResponse = error; if ([badResponse getStatusCode] == 401) { -#warning localize this alert - UIAlertView *incorrectChallengeCodeAV = [[UIAlertView alloc]initWithTitle:@"Registration error" message:@"The challenge code you entered is incorrect." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; + UIAlertView *incorrectChallengeCodeAV = [[UIAlertView alloc]initWithTitle:REGISTER_CHALLENGE_ALERT_VIEW_TITLE message:REGISTER_CHALLENGE_ALERT_VIEW_BODY delegate:nil cancelButtonTitle:REGISTER_CHALLENGE_ALERT_DISMISS otherButtonTitles:nil, nil]; [incorrectChallengeCodeAV show]; return; } diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index a8054ae34..6e1c51ce4 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -94,12 +94,15 @@ "REGISTER_CHALLENGE_TEXTBLOCK_PART1" = "Let’s make sure you’re real. We've sent you a SMS with a six digit code to:"; "REGISTER_CHALLENGE_TEXTBLOCK_PART2" = "To complete your phone number verification, please enter the code below."; "REGISTER_CHALLENGE_VOICECALL_TEXT" = "If you are unable to recieve an SMS, we will call you in"; +"REGISTER_CHALLENGE_ALERT_VIEW_TITLE" = "Incorrect code"; +"REGISTER_CHALLENGE_ALERT_VIEW_BODY" = "Please verify the code and try again"; "REGISTER_ENTER_COUNTRY_CODE" = "Your number's country code"; "REGISTER_ENTER_NUMBER" = "Your phone number"; "REGISTER_SUCCESS_TEXTBLOCK" = "Congratulations! Your registration was successful. You may start using Signal to make secure phone calls."; "REGISTER_TEXTBLOCK" = "To get started making secure calls, please confirm your country code and enter your device's phone number."; "REGISTER_VALIDATION_ENTER_CODE" = "Validation Code"; "REGISTER_VALIDATION_SENT" = "We sent your validation code"; + "REGISTER_WELCOME_TEXT" = "Welcome to Signal"; "REGISTRATION_ERROR" = "Registration Error"; "REGISTRATION_BODY" = "We couldn't reach the Signal server. Please try again.";