diff --git a/Riot/Assets/en.lproj/Vector.strings b/Riot/Assets/en.lproj/Vector.strings index 6a7f09c6e9..68f6a055a7 100644 --- a/Riot/Assets/en.lproj/Vector.strings +++ b/Riot/Assets/en.lproj/Vector.strings @@ -1715,6 +1715,8 @@ Tap the + to start adding people."; // MARK: File upload "file_upload_error_title" = "File upload"; "file_upload_error_unsupported_file_type_message" = "File type not supported."; +"file_upload_error_too_large_title" = "File too large"; +"file_upload_error_too_large_message" = "Maximum supported file size is %@MB"; // MARK: Emoji picker "emoji_picker_title" = "Reactions"; diff --git a/Riot/Assets/fr.lproj/Vector.strings b/Riot/Assets/fr.lproj/Vector.strings index ee14358945..2c247b4769 100644 --- a/Riot/Assets/fr.lproj/Vector.strings +++ b/Riot/Assets/fr.lproj/Vector.strings @@ -778,6 +778,9 @@ // MARK: File upload "file_upload_error_title" = "Envoi de fichier"; "file_upload_error_unsupported_file_type_message" = "Type de fichier non pris en charge."; +"file_upload_error_too_large_title" = "Fichier trop lourd"; +"file_upload_error_too_large_message" = "La taille maximum autorisée est %@Mo"; + "auth_softlogout_signed_out" = "Vous êtes déconnecté"; "auth_softlogout_sign_in" = "Se connecter"; "auth_softlogout_reason" = "L’administrateur de votre serveur d’accueil (%1$@) vous a déconnecté de votre compte %2$@ (%3$@)."; diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index ffc4b5184e..c94b41bedb 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -7725,8 +7725,8 @@ - (void)documentPickerPresenter:(MXKDocumentPickerPresenter *)presenter didPickD NSUInteger maxUploadFileSize = self.roomDataSource.mxSession.maxUploadSize; NSDictionary *fileAttributes = [NSFileManager.defaultManager attributesOfItemAtPath:url.path error:nil]; if (fileAttributes && fileAttributes.fileSize > maxUploadFileSize) { - [self showAlertWithTitle:@"The file you want to upload is too big." - message:[NSString stringWithFormat:@"\nThe file you want to upload is too big.\n\nIt mustn't weight more than %ldMB", maxUploadFileSize/(1024*1024)]]; + [self showAlertWithTitle:[VectorL10n fileUploadErrorTooLargeTitle] + message:[VectorL10n fileUploadErrorTooLargeMessage:[NSByteCountFormatter stringFromByteCount:maxUploadFileSize countStyle:NSByteCountFormatterCountStyleFile]]]; return; }