I18n: Do not translate Python template menu entries
This commit is contained in:
committed by
Bastien Montagne
parent
ba71402e24
commit
d1fdc7a0ce
@@ -1200,7 +1200,7 @@ class Menu(_StructRNA, _GenericUI, metaclass=_RNAMeta):
|
|||||||
def path_menu(self, searchpaths, operator, *,
|
def path_menu(self, searchpaths, operator, *,
|
||||||
props_default=None, prop_filepath="filepath",
|
props_default=None, prop_filepath="filepath",
|
||||||
filter_ext=None, filter_path=None, display_name=None,
|
filter_ext=None, filter_path=None, display_name=None,
|
||||||
add_operator=None, add_operator_props=None):
|
add_operator=None, add_operator_props=None, translate=True):
|
||||||
"""
|
"""
|
||||||
Populate a menu from a list of paths.
|
Populate a menu from a list of paths.
|
||||||
|
|
||||||
@@ -1261,7 +1261,7 @@ class Menu(_StructRNA, _GenericUI, metaclass=_RNAMeta):
|
|||||||
name = display_name(filepath) if display_name else bpy.path.display_name(f)
|
name = display_name(filepath) if display_name else bpy.path.display_name(f)
|
||||||
props = row.operator(
|
props = row.operator(
|
||||||
operator,
|
operator,
|
||||||
text=iface_(name),
|
text=(iface_(name) if translate else name),
|
||||||
translate=False,
|
translate=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ class TEXT_MT_templates_py(Menu):
|
|||||||
"text.open",
|
"text.open",
|
||||||
props_default={"internal": True},
|
props_default={"internal": True},
|
||||||
filter_ext=lambda ext: (ext.lower() == ".py"),
|
filter_ext=lambda ext: (ext.lower() == ".py"),
|
||||||
|
translate=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user