From dead26b5778b8bebd642884f11a254edd31c11bc Mon Sep 17 00:00:00 2001 From: Damien Picard Date: Mon, 5 Sep 2022 15:25:34 +0200 Subject: 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 --- release/scripts/modules/bpy_extras/io_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/modules/bpy_extras/io_utils.py') diff --git a/release/scripts/modules/bpy_extras/io_utils.py b/release/scripts/modules/bpy_extras/io_utils.py index 0497d69162e..cc6aa6b9afa 100644 --- a/release/scripts/modules/bpy_extras/io_utils.py +++ b/release/scripts/modules/bpy_extras/io_utils.py @@ -21,7 +21,7 @@ from bpy.props import ( EnumProperty, StringProperty, ) - +from bpy.app.translations import pgettext_data as data_ def _check_axis_conversion(op): if hasattr(op, "axis_forward") and hasattr(op, "axis_up"): @@ -56,7 +56,7 @@ class ExportHelper: if not self.filepath: blend_filepath = context.blend_data.filepath if not blend_filepath: - blend_filepath = "untitled" + blend_filepath = data_("untitled") else: blend_filepath = os.path.splitext(blend_filepath)[0] -- cgit v1.2.3