MESSENGER-4857 translate invalid password message

This commit is contained in:
JanNiklas Grabowski
2023-09-15 11:35:08 +02:00
parent 5e6c4811fe
commit 0f3a48e414
3 changed files with 10 additions and 2 deletions

View File

@@ -506,6 +506,7 @@
"bwi_error_invite_banned_in_room" = "%@ ist vom Raum gebannt.";
"bwi_error_invite_general" = "%@ konnte nicht eingeladen werden.";
"bwi_error_logout_offline" = "Abmelden ist ohne Internetverbindung nicht möglich.";
"bwi_error_invalid_password" = "Falsches Passwort";
// MARK: - Matomo

View File

@@ -415,6 +415,7 @@
"bwi_error_invite_banned_in_room" = "%@ is banned from the room.";
"bwi_error_invite_general" = "%@ could not be invited.";
"bwi_error_logout_offline" = "Logout not possible without internet connection.";
"bwi_error_invalid_password" = "Invalid password";
// MARK: - Matomo

View File

@@ -41,8 +41,14 @@
}
else
{
title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
message = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
// bwi: #4857 translate invalid password error message
if ([error.domain isEqualToString:kMXNSErrorDomain] && [[error.userInfo valueForKey:NSLocalizedDescriptionKey] isEqualToString: @"Invalid username or password"]) {
title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
message = [BWIL10n bwiErrorInvalidPassword];
} else {
title = [error.userInfo valueForKey:NSLocalizedFailureReasonErrorKey];
message = [error.userInfo valueForKey:NSLocalizedDescriptionKey];
}
if (!title)
{