| @@ -25,9 +25,9 @@ | ||
| 25 | 25 | $uploadedImage = FileSystem::setSubDir(strtolower($type).'_avatars')->put($file); |
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | if ( !$uploadedImage ) { |
| 29 | - throw new Exception('Something went wrong while updating the profile picture', 403); | |
| 29 | + throw new Exception(esc_html__('Something went wrong while updating the profile picture', 'fluent-support'), 403); | |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | $user->avatar = $uploadedImage[0]['url']; |
| 33 | 33 | $user->save(); |
| @@ -58,8 +58,9 @@ | ||
| 58 | 58 | |
| 59 | 59 | if( !in_array($ext, $allowedExtension) ) { |
| 60 | 60 | throw new Exception( |
| 61 | 61 | sprintf( |
| 62 | + // translators: %s is a comma-separated list of allowed file extensions (e.g., "jpg, png, gif") | |
| 62 | 63 | esc_html__('Unsupported file submitted, allowed image file types are: %s', 'fluent-support'), |
| 63 | 64 | esc_html(implode(", ", $allowedExtension)) |
| 64 | 65 | ), 403 |
| 65 | 66 | ); |