Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Picard <pioverfour>2022-09-05 16:25:34 +0300
committerBastien Montagne <bastien@blender.org>2022-09-05 16:29:20 +0300
commitdead26b5778b8bebd642884f11a254edd31c11bc (patch)
treeda0ff617e2bb2968b930a79501e9917d6ad0741f /source/blender/blenkernel
parentf70cf451edf23a608c09a8b4ed0cabdc3360e00c (diff)
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
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/image_save.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/image_save.cc b/source/blender/blenkernel/intern/image_save.cc
index 5ee1258c512..e65a94d5301 100644
--- a/source/blender/blenkernel/intern/image_save.cc
+++ b/source/blender/blenkernel/intern/image_save.cc
@@ -13,6 +13,8 @@
#include "BLI_string.h"
#include "BLI_vector.hh"
+#include "BLT_translation.h"
+
#include "DNA_image_types.h"
#include "MEM_guardedalloc.h"
@@ -173,7 +175,7 @@ bool BKE_image_save_options_init(ImageSaveOptions *opts,
BLI_strncpy(opts->filepath, G.ima, sizeof(opts->filepath));
}
else {
- BLI_strncpy(opts->filepath, "//untitled", sizeof(opts->filepath));
+ BLI_snprintf(opts->filepath, sizeof(opts->filepath), "//%s", DATA_("untitled"));
BLI_path_abs(opts->filepath, BKE_main_blendfile_path(bmain));
}
}