diff options
author | Damien Picard <pioverfour> | 2022-09-05 16:25:34 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-09-05 16:29:20 +0300 |
commit | dead26b5778b8bebd642884f11a254edd31c11bc (patch) | |
tree | da0ff617e2bb2968b930a79501e9917d6ad0741f /release/scripts/modules | |
parent | f70cf451edf23a608c09a8b4ed0cabdc3360e00c (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 'release/scripts/modules')
-rw-r--r-- | release/scripts/modules/bpy_extras/io_utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
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] |