mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
feature/3074_password_change_wording
This commit is contained in:
@@ -4568,6 +4568,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;
|
||||
@@ -4581,7 +4601,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
|
||||
|
||||
Reference in New Issue
Block a user