I18n: translate untitled file names
When saving, the default file name is "untitled" regardless of selected language. This can be translated, like many graphical applications do. This applies to: - blend file - alembic file - collada file - obj file - usd file - rendered image - grease pencil export - subtitles export - other Python exports through ExportHelper Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15868
This commit is contained in:
@@ -3019,7 +3019,9 @@ void WM_OT_recover_auto_save(wmOperatorType *ot)
|
||||
static void wm_filepath_default(const Main *bmain, char *filepath)
|
||||
{
|
||||
if (bmain->filepath[0] == '\0') {
|
||||
BLI_path_filename_ensure(filepath, FILE_MAX, "untitled.blend");
|
||||
char filename_untitled[FILE_MAXFILE];
|
||||
SNPRINTF(filename_untitled, "%s.blend", DATA_("untitled"));
|
||||
BLI_path_filename_ensure(filepath, FILE_MAX, filename_untitled);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3652,7 +3654,7 @@ static uiBlock *block_create__close_file_dialog(struct bContext *C,
|
||||
BLI_split_file_part(blendfile_path, filename, sizeof(filename));
|
||||
}
|
||||
else {
|
||||
STRNCPY(filename, "untitled.blend");
|
||||
SNPRINTF(filename, "%s.blend", DATA_("untitled"));
|
||||
}
|
||||
uiItemL(layout, filename, ICON_NONE);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user