diff options
author | Bastien Montagne <bastien@blender.org> | 2022-08-22 16:44:44 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2022-08-22 16:44:44 +0300 |
commit | 500e4d540a97ccbd8374f5596f74fc1e9ff65f08 (patch) | |
tree | 3f3012fdac442d85c4b06d9d187b1dfe30d24038 /release | |
parent | ba74704c9acec7b0791a28fa7d1627cf1321ec5d (diff) | |
parent | 0b2be4fbc348c22fe4140ee8517892c44996da34 (diff) |
Merge branch 'blender-v3.3-release'
Conflicts:
release/scripts/startup/bl_ui/space_userpref.py
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_particle.py | 3 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 9 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_outliner.py | 7 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 14 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_time.py | 2 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_userpref.py | 15 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 9 |
7 files changed, 47 insertions, 12 deletions
diff --git a/release/scripts/startup/bl_ui/properties_particle.py b/release/scripts/startup/bl_ui/properties_particle.py index 0cef14d6a5d..080c8ca5726 100644 --- a/release/scripts/startup/bl_ui/properties_particle.py +++ b/release/scripts/startup/bl_ui/properties_particle.py @@ -1656,6 +1656,7 @@ class PARTICLE_PT_children_clumping_noise(ParticleButtonsPanel, Panel): class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): bl_label = "Roughness" + bl_translation_context = i18n_contexts.id_particlesettings bl_parent_id = "PARTICLE_PT_children" bl_options = {'DEFAULT_CLOSED'} COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_EEVEE_NEXT', 'BLENDER_WORKBENCH'} @@ -1678,7 +1679,7 @@ class PARTICLE_PT_children_roughness(ParticleButtonsPanel, Panel): if part.use_roughness_curve: sub = col.column() sub.template_curve_mapping(part, "roughness_curve") - sub.prop(part, "roughness_1", text="Roughness") + sub.prop(part, "roughness_1", text=iface_("Roughness", i18n_contexts.id_particlesettings)) sub.prop(part, "roughness_1_size", text="Size") else: sub = col.column(align=True) diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index ab3c863ea2d..6a231c74cd9 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -29,8 +29,10 @@ from bl_ui.space_toolsystem_common import ( ToolActivePanelHelper, ) -from bpy.app.translations import pgettext_iface as iface_ - +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) class ImagePaintPanel: bl_space_type = 'IMAGE_EDITOR' @@ -187,7 +189,8 @@ class IMAGE_MT_image(Menu): ima = sima.image show_render = sima.show_render - layout.operator("image.new", text="New") + layout.operator("image.new", text="New", + text_ctxt=i18n_contexts.id_image) layout.operator("image.open", text="Open...", icon='FILE_FOLDER') layout.operator("image.read_viewlayers") diff --git a/release/scripts/startup/bl_ui/space_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py index 4867237f353..2a2d67d78a4 100644 --- a/release/scripts/startup/bl_ui/space_outliner.py +++ b/release/scripts/startup/bl_ui/space_outliner.py @@ -2,6 +2,10 @@ import bpy from bpy.types import Header, Menu, Panel +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) class OUTLINER_HT_header(Header): bl_space_type = 'OUTLINER' @@ -211,7 +215,8 @@ class OUTLINER_MT_collection(Menu): space = context.space_data - layout.operator("outliner.collection_new", text="New").nested = True + layout.operator("outliner.collection_new", text="New", + text_ctxt=i18n_contexts.id_collection).nested = True layout.operator("outliner.collection_duplicate", text="Duplicate Collection") layout.operator("outliner.collection_duplicate_linked", text="Duplicate Linked") layout.operator("outliner.id_copy", text="Copy", icon='COPYDOWN') diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index 52d66e48d1c..d2db6ca8308 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -1,7 +1,10 @@ # SPDX-License-Identifier: GPL-2.0-or-later import bpy from bpy.types import Header, Menu, Panel -from bpy.app.translations import pgettext_iface as iface_ +from bpy.app.translations import ( + contexts as i18n_contexts, + pgettext_iface as iface_, +) class TEXT_HT_header(Header): @@ -167,8 +170,10 @@ class TEXT_PT_find(Panel): row = layout.row(align=True) if not st.text: row.active = False - row.prop(st, "use_match_case", text="Case", toggle=True) - row.prop(st, "use_find_wrap", text="Wrap", toggle=True) + row.prop(st, "use_match_case", text="Case", + text_ctxt=i18n_contexts.id_text, toggle=True) + row.prop(st, "use_find_wrap", text="Wrap", + text_ctxt=i18n_contexts.id_text, toggle=True) row.prop(st, "use_find_all", text="All", toggle=True) @@ -234,7 +239,8 @@ class TEXT_MT_text(Menu): st = context.space_data text = st.text - layout.operator("text.new", text="New", icon='FILE_NEW') + layout.operator("text.new", text="New", + text_ctxt=i18n_contexts.id_text, icon='FILE_NEW') layout.operator("text.open", text="Open...", icon='FILE_FOLDER') if text: diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py index 115f61a7c19..d948ea09a74 100644 --- a/release/scripts/startup/bl_ui/space_time.py +++ b/release/scripts/startup/bl_ui/space_time.py @@ -1,6 +1,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later import bpy from bpy.types import Menu, Panel +from bpy.app.translations import contexts as i18n_contexts # Header buttons for timeline header (play, etc.) @@ -87,6 +88,7 @@ class TIME_MT_editor_menus(Menu): sub.popover( panel="TIME_PT_keyframing_settings", text="Keying", + text_ctxt=i18n_contexts.id_windowmanager, ) # Add a separator to keep the popover button from aligning with the menu button. diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index ba8608c4e28..1b155d22bdf 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -8,6 +8,7 @@ from bpy.types import ( from bpy.app.translations import ( contexts as i18n_contexts, pgettext_iface as iface_, + pgettext_tip as tip_, ) @@ -2092,7 +2093,10 @@ class StudioLightPanelMixin: for studio_light in lights: self.draw_studio_light(flow, studio_light) else: - layout.label(text=iface_("No custom %s configured") % self.bl_label) + layout.label(text=self.get_error_message()) + + def get_error_message(self): + return tip_("No custom %s configured") % self.bl_label def draw_studio_light(self, layout, studio_light): box = layout.box() @@ -2119,6 +2123,9 @@ class USERPREF_PT_studiolight_matcaps(StudioLightPanel, StudioLightPanelMixin, P layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'MATCAP' layout.separator() + def get_error_message(self): + return tip_("No custom MatCaps configured") + class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Panel): bl_label = "HDRIs" @@ -2129,6 +2136,9 @@ class USERPREF_PT_studiolight_world(StudioLightPanel, StudioLightPanelMixin, Pan layout.operator("preferences.studiolight_install", icon='IMPORT', text="Install...").type = 'WORLD' layout.separator() + def get_error_message(self): + return tip_("No custom HDRIs configured") + class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Panel): bl_label = "Studio Lights" @@ -2141,6 +2151,9 @@ class USERPREF_PT_studiolight_lights(StudioLightPanel, StudioLightPanelMixin, Pa op.filter_glob = ".sl" layout.separator() + def get_error_message(self): + return tip_("No custom Studio Lights configured") + class USERPREF_PT_studiolight_light_editor(StudioLightPanel, Panel): bl_label = "Editor" diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 1c661cf75ec..b1b5738aecd 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -2212,6 +2212,7 @@ class VIEW3D_MT_armature_add(Menu): class VIEW3D_MT_light_add(Menu): bl_idname = "VIEW3D_MT_light_add" + bl_context = i18n_contexts.id_light bl_label = "Light" def draw(self, _context): @@ -2249,7 +2250,9 @@ class VIEW3D_MT_volume_add(Menu): def draw(self, _context): layout = self.layout layout.operator("object.volume_import", text="Import OpenVDB...", icon='OUTLINER_DATA_VOLUME') - layout.operator("object.volume_add", text="Empty", icon='OUTLINER_DATA_VOLUME') + layout.operator("object.volume_add", text="Empty", + text_ctxt=i18n_contexts.id_volume, + icon='OUTLINER_DATA_VOLUME') class VIEW3D_MT_add(Menu): @@ -2290,7 +2293,9 @@ class VIEW3D_MT_add(Menu): layout.separator() - layout.operator_menu_enum("object.empty_add", "type", text="Empty", icon='OUTLINER_OB_EMPTY') + layout.operator_menu_enum("object.empty_add", "type", text="Empty", + text_ctxt=i18n_contexts.id_id, + icon='OUTLINER_OB_EMPTY') layout.menu("VIEW3D_MT_image_add", text="Image", icon='OUTLINER_OB_IMAGE') layout.separator() |