I18n: make screen capture image name translatable

The default name when saving a screen capture in an unsaved .blend
file is "screen.<ext>". This can be translated.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D16486
This commit is contained in:
Damien Picard 2022-11-16 12:02:50 +01:00 committed by Bastien Montagne
parent 33fa053fe8
commit 2683b74cb3
1 changed files with 4 additions and 1 deletions

View File

@ -29,6 +29,8 @@
#include "BKE_report.h"
#include "BKE_screen.h"
#include "BLT_translation.h"
#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_prototypes.h"
@ -164,7 +166,8 @@ static int screenshot_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
/* extension is added by 'screenshot_check' after */
char filepath[FILE_MAX] = "//screen";
char filepath[FILE_MAX];
BLI_snprintf(filepath, FILE_MAX, "//%s", DATA_("screen"));
const char *blendfile_path = BKE_main_blendfile_path_from_global();
if (blendfile_path[0] != '\0') {
BLI_strncpy(filepath, blendfile_path, sizeof(filepath));