I18n: make several parts of the UI translatable
- batch rename - keyframe settings - tool name in Tool properties header - tool name in Tool properties Drag (fake) enum - new file templates - new preset - new text datablock - new collection datablock - new geometry nodes (modifier and node group) - new grease pencil data (layers and materials) Ref. T43295 Reviewed By: mont29 Differential Revision: https://developer.blender.org/D15533
This commit is contained in:
@@ -5,6 +5,7 @@ from bpy.types import (
|
||||
)
|
||||
|
||||
from bpy.app.translations import pgettext_tip as tip_
|
||||
from bpy.app.translations import pgettext_iface as iface_
|
||||
|
||||
__all__ = (
|
||||
"ToolDef",
|
||||
@@ -794,7 +795,7 @@ class ToolSelectPanelHelper:
|
||||
# Note: we could show 'item.text' here but it makes the layout jitter when switching tools.
|
||||
# Add some spacing since the icon is currently assuming regular small icon size.
|
||||
if show_tool_icon_always:
|
||||
layout.label(text=" " + item.label, icon_value=icon_value)
|
||||
layout.label(text=" " + iface_(item.label, "Operator"), icon_value=icon_value)
|
||||
layout.separator()
|
||||
else:
|
||||
if context.space_data.show_region_toolbar:
|
||||
@@ -825,7 +826,7 @@ class ToolSelectPanelHelper:
|
||||
row.label(text="Drag:")
|
||||
row = split.row()
|
||||
row.context_pointer_set("tool", tool)
|
||||
row.popover(panel="TOPBAR_PT_tool_fallback", text=label)
|
||||
row.popover(panel="TOPBAR_PT_tool_fallback", text=iface_(label, "Operator"))
|
||||
|
||||
return tool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user