Merge branch 'blender-v3.4-release'
This commit is contained in:
commit
d95216b94c
|
@ -548,6 +548,7 @@ CUSTOM_PY_UI_FILES = [
|
|||
os.path.join("scripts", "startup", "bl_ui"),
|
||||
os.path.join("scripts", "startup", "bl_operators"),
|
||||
os.path.join("scripts", "modules", "rna_prop_ui.py"),
|
||||
os.path.join("scripts", "modules", "rna_keymap_ui.py"),
|
||||
os.path.join("scripts", "presets", "keyconfig"),
|
||||
]
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ def draw_km(display_keymaps, kc, km, children, layout, level):
|
|||
subcol = _indented_layout(col, level + 1)
|
||||
subrow = subcol.row(align=True)
|
||||
subrow.prop(km, "show_expanded_items", text="", emboss=False)
|
||||
subrow.label(text=iface_("%s (Global)") % km.name, translate=False)
|
||||
subrow.label(text=iface_("%s (Global)") % iface_(km.name, i18n_contexts.id_windowmanager), translate=False)
|
||||
else:
|
||||
km.show_expanded_items = True
|
||||
|
||||
|
@ -335,7 +335,8 @@ def draw_filtered(display_keymaps, filter_type, filter_text, layout):
|
|||
col = layout.column()
|
||||
|
||||
row = col.row()
|
||||
row.label(text=km.name, icon='DOT')
|
||||
row.label(text=km.name, icon='DOT',
|
||||
text_ctxt=i18n_contexts.id_windowmanager)
|
||||
|
||||
row.label()
|
||||
row.label()
|
||||
|
|
|
@ -17,8 +17,11 @@ from bpy.props import (
|
|||
IntVectorProperty,
|
||||
FloatVectorProperty,
|
||||
)
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
from bpy.app.translations import pgettext_tip as tip_
|
||||
from bpy.app.translations import (
|
||||
pgettext_iface as iface_,
|
||||
pgettext_tip as tip_,
|
||||
contexts as i18n_contexts,
|
||||
)
|
||||
|
||||
|
||||
def _rna_path_prop_search_for_context_impl(context, edit_text, unique_attrs):
|
||||
|
@ -200,9 +203,9 @@ def description_from_data_path(base, data_path, *, prefix, value=Ellipsis):
|
|||
|
||||
if (
|
||||
(rna_prop := context_path_to_rna_property(base, data_path)) and
|
||||
(description := rna_prop.description)
|
||||
(description := iface_(rna_prop.description))
|
||||
):
|
||||
description = "%s: %s" % (prefix, description)
|
||||
description = iface_("%s: %s") % (prefix, description)
|
||||
if value != Ellipsis:
|
||||
description = "%s\n%s: %s" % (description, iface_("Value"), str(value))
|
||||
return description
|
||||
|
@ -302,7 +305,7 @@ class WM_OT_context_set_int(Operator): # same as enum
|
|||
|
||||
@classmethod
|
||||
def description(cls, context, props):
|
||||
return description_from_data_path(context, props.data_path, prefix="Assign", value=props.value)
|
||||
return description_from_data_path(context, props.data_path, prefix=iface_("Assign"), value=props.value)
|
||||
|
||||
execute = execute_context_assign
|
||||
|
||||
|
@ -403,7 +406,7 @@ class WM_OT_context_set_float(Operator): # same as enum
|
|||
|
||||
@classmethod
|
||||
def description(cls, context, props):
|
||||
return description_from_data_path(context, props.data_path, prefix="Assign", value=props.value)
|
||||
return description_from_data_path(context, props.data_path, prefix=iface_("Assign"), value=props.value)
|
||||
|
||||
execute = execute_context_assign
|
||||
|
||||
|
@ -2402,7 +2405,9 @@ class WM_OT_toolbar_prompt(Operator):
|
|||
flow = layout.grid_flow(columns=len(status_items), align=True, row_major=True)
|
||||
for _, name, item in status_items:
|
||||
row = flow.row(align=True)
|
||||
row.template_event_from_keymap_item(item, text=name)
|
||||
row.template_event_from_keymap_item(
|
||||
item, text=name, text_ctxt=i18n_contexts.operator_default
|
||||
)
|
||||
|
||||
self._keymap = keymap
|
||||
|
||||
|
|
|
@ -2807,6 +2807,7 @@ static void rna_def_keyconfig(BlenderRNA *brna)
|
|||
RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_KeyMapItem_propvalue_itemf");
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Property Value", "The value this event translates to in a modal keymap");
|
||||
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_WINDOWMANAGER);
|
||||
RNA_def_property_update(prop, 0, "rna_KeyMapItem_update");
|
||||
|
||||
prop = RNA_def_property(srna, "active", PROP_BOOLEAN, PROP_NONE);
|
||||
|
|
Loading…
Reference in New Issue