Skip to content

Commit

Permalink
Move hard-coded strings to strings files (only EN and FR)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Buquet committed May 15, 2024
1 parent d24c084 commit f16203a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Riot/Assets/en.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
3 changes: 3 additions & 0 deletions Riot/Assets/fr.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -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$@).";
Expand Down
4 changes: 2 additions & 2 deletions Riot/Modules/Room/RoomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit f16203a

Please sign in to comment.