I18n: translate node panel titles #112968

Merged
Bastien Montagne merged 1 commits from pioverfour/blender:dp_translate_node_panels into blender-v4.0-release 2023-10-03 18:24:27 +02:00
3 changed files with 6 additions and 2 deletions
Showing only changes of commit 6cb992c846 - Show all commits

View File

@ -276,6 +276,10 @@ PYGETTEXT_KEYWORDS = (() +
tuple((r"{}\(\s*[^,]+,\s*" + _msg_re + r"\s*\)").format(it)
for it in ("node_sock_label",)) +
# Node panel declarations
tuple((r"\.{}\(\s*" + _msg_re + r"\s*\)").format(it)
for it in ("add_panel",)) +
# Geometry Nodes field inputs
((r"FieldInput\(CPPType::get<.*?>\(\),\s*" + _msg_re + r"\s*\)"),) +

View File

@ -2104,7 +2104,7 @@ static void node_draw_panels(bNodeTree &ntree, const bNode &node, uiBlock &block
uiBut *but = uiDefBut(&block,
UI_BTYPE_LABEL,
0,
panel_decl->name.c_str(),
IFACE_(panel_decl->name.c_str()),
int(rct.xmin + NODE_MARGIN_X + 0.4f),
int(runtime.location_y - NODE_DYS),
short(rct.xmax - rct.xmin - (30.0f * UI_SCALE_FAC)),

View File

@ -795,7 +795,7 @@ static void ui_node_draw_panel(uiLayout &layout,
0,
panel_state.is_collapsed() ? ICON_DISCLOSURE_TRI_RIGHT :
ICON_DISCLOSURE_TRI_DOWN,
panel_decl.name.c_str(),
IFACE_(panel_decl.name.c_str()),
0,
0,
UI_UNIT_X * 4,