diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-21 17:53:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-21 17:53:35 +0400 |
commit | 943a026c6011faa7dbdc1a4c640c2f0f25196d96 (patch) | |
tree | 34c2d84376a2bdba338e8e8fd85550b74315d8d7 /source/blender/makesrna/intern/rna_ui_api.c | |
parent | f56759bb208b989749ed3f578a7d8ef4faa394f1 (diff) |
py/rna string subtypes for strings which should be automatically translated:
layout.prop("blah", text="Translate Me!")
Diffstat (limited to 'source/blender/makesrna/intern/rna_ui_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_ui_api.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index 84568d914af..816a7ba9cd4 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -84,7 +84,7 @@ static void api_ui_item_common(FunctionRNA *func) { PropertyRNA *prop; - RNA_def_string(func, "text", "", 0, "", "Override automatic text of the item"); + prop= RNA_def_string_translate(func, "text", "", 0, "", "Override automatic text of the item"); prop= RNA_def_property(func, "icon", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, icon_items); @@ -309,7 +309,7 @@ void RNA_api_ui_layout(StructRNA *srna) parm= RNA_def_string(func, "type_property", "", 0, "", "Identifier of property in data giving the type of the ID-blocks to use"); RNA_def_property_flag(parm, PROP_REQUIRED); - RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI"); + RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI"); func= RNA_def_function(srna, "template_path_builder", "uiTemplatePathBuilder"); parm= RNA_def_pointer(func, "data", "AnyType", "", "Data from which to take property"); @@ -318,7 +318,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_property_flag(parm, PROP_REQUIRED); parm= RNA_def_pointer(func, "root", "ID", "", "ID-block from which path is evaluated from"); RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); - RNA_def_string(func, "text", "", 0, "", "Custom label to display in UI"); + RNA_def_string_translate(func, "text", "", 0, "", "Custom label to display in UI"); func= RNA_def_function(srna, "template_modifier", "uiTemplateModifier"); RNA_def_function_flag(func, FUNC_USE_CONTEXT); |