Merge branch 'feature/3074_password_change_wording' into 'develop'

feature/3074_password_change_wording

See merge request bwmessenger/bundesmessenger/bundesmessenger-ios!20
This commit is contained in:
Arnfried Griesert
2022-06-29 11:17:05 +00:00
3 changed files with 32 additions and 1 deletions
+21 -1
View File
@@ -4593,6 +4593,26 @@ ThreadsBetaCoordinatorBridgePresenterDelegate>
} failure:^(NSError *error) {
NSString *serverResponse = [error localizedDescription];
NSString *alertMessage;
if ([serverResponse isEqualToString: @"The password must be at least 8 characters long"]) {
alertMessage = [VectorL10n settingsPasswordTooShortMessage];
}
else if ([serverResponse isEqualToString: @"The password must include at least one digit"]) {
alertMessage = [VectorL10n settingsPasswordHasNoDigit];
}
else if ([serverResponse isEqualToString: @"The password must include at least one symbol"]) {
alertMessage = [VectorL10n settingsPasswordHasNoSymbol];
}
else if ([serverResponse isEqualToString: @"The password must include at least one uppercase letter"]) {
alertMessage = [VectorL10n settingsPasswordHasNoUppercaseLetter];
}
else if ([serverResponse isEqualToString: @"The password must include at least one lowercase letter"]) {
alertMessage = [VectorL10n settingsPasswordHasNoLowercaseLetter];
} else {
alertMessage = [VectorL10n settingsFailToUpdatePassword];
}
if (weakSelf)
{
typeof(self) self = weakSelf;
@@ -4606,7 +4626,7 @@ ThreadsBetaCoordinatorBridgePresenterDelegate>
{
[self->currentAlert dismissViewControllerAnimated:NO completion:nil];
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:nil message:[VectorL10n settingsFailToUpdatePassword] preferredStyle:UIAlertControllerStyleAlert];
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:nil message:alertMessage preferredStyle:UIAlertControllerStyleAlert];
[errorAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok]
style:UIAlertActionStyleDefault