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:
authorBastien Montagne <bastien@blender.org>2022-05-09 13:36:56 +0300
committerBastien Montagne <bastien@blender.org>2022-05-09 13:36:56 +0300
commit025959da23c6acb06182e775a39e839a74cac8e8 (patch)
tree25b5ba5013ab1fe8cce3745e6feffe09f8ed0e4c /release/scripts/startup/bl_ui
parentcc3c15fbddc78bb5377571125cccf57ba7ec3b9a (diff)
Fix T97915: Regression: Blender doesn't translate viewpoint menu items.
Another mistake in rBdb3f5ae48aca.
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py28
1 files changed, 13 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 3b966a28d33..a8624030564 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -1231,24 +1231,23 @@ class VIEW3D_MT_view_viewpoint(Menu):
def draw(self, _context):
layout = self.layout
- i18n_text_ctxt = bpy.app.translations.contexts_C_to_py['BLT_I18NCONTEXT_EDITOR_VIEW3D']
- layout.operator("view3d.view_camera", text="Camera", text_ctxt=i18n_text_ctxt)
+ layout.operator("view3d.view_camera", text="Camera", text_ctxt=i18n_contexts.editor_view3d)
layout.separator()
- layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_text_ctxt).type = 'TOP'
- layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_text_ctxt).type = 'BOTTOM'
+ layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_contexts.editor_view3d).type = 'TOP'
+ layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_contexts.editor_view3d).type = 'BOTTOM'
layout.separator()
- layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_text_ctxt).type = 'FRONT'
- layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_text_ctxt).type = 'BACK'
+ layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_contexts.editor_view3d).type = 'FRONT'
+ layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_contexts.editor_view3d).type = 'BACK'
layout.separator()
- layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_text_ctxt).type = 'RIGHT'
- layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_text_ctxt).type = 'LEFT'
+ layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_contexts.editor_view3d).type = 'RIGHT'
+ layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_contexts.editor_view3d).type = 'LEFT'
class VIEW3D_MT_view_navigation(Menu):
@@ -1315,33 +1314,32 @@ class VIEW3D_MT_view_align_selected(Menu):
def draw(self, _context):
layout = self.layout
- i18n_text_ctxt = bpy.app.translations.contexts_C_to_py['BLT_I18NCONTEXT_EDITOR_VIEW3D']
- props = layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Top", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'TOP'
- props = layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Bottom", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'BOTTOM'
layout.separator()
- props = layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Front", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'FRONT'
- props = layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Back", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'BACK'
layout.separator()
- props = layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Right", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'RIGHT'
- props = layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_text_ctxt)
+ props = layout.operator("view3d.view_axis", text="Left", text_ctxt=i18n_contexts.editor_view3d)
props.align_active = True
props.type = 'LEFT'