One-liner fix for part of regression of nodes UI translation (since new pynodes): add menu entries are translated again.

The sockets' names remain untranslated currently, investigating whether this can safely be fixed at this stage too...
This commit is contained in:
Bastien Montagne 2013-05-03 12:37:45 +00:00
parent 0e27e71962
commit 95271e248a

@ -68,8 +68,9 @@ def register_node_categories(identifier, cat_list):
def draw_node_item(self, context):
layout = self.layout
col = layout.column()
default_context = bpy.app.translations.contexts.default
for item in self.category.items:
op = col.operator("node.add_node", text=item.label)
op = col.operator("node.add_node", text=item.label, text_ctxt=default_context)
op.type = item.nodetype
op.use_transform = True