Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/python/intern/bpy_rna.c')
-rw-r--r--source/blender/python/intern/bpy_rna.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c
index a63cee4e505..013eac7fd58 100644
--- a/source/blender/python/intern/bpy_rna.c
+++ b/source/blender/python/intern/bpy_rna.c
@@ -73,6 +73,10 @@
#include "../generic/IDProp.h" /* for IDprop lookups */
#include "../generic/py_capi_utils.h"
+#ifdef INTERNATIONAL
+#include "UI_interface.h" /* bad level call into editors */
+#endif
+
#define USE_PEDANTIC_WRITE
#define USE_MATHUTILS
#define USE_STRING_COERCE
@@ -1519,6 +1523,12 @@ static int pyrna_py_to_prop(PointerRNA *ptr, PropertyRNA *prop, void *data, PyOb
}
else {
param= _PyUnicode_AsString(value);
+#ifdef INTERNATIONAL
+ if(subtype == PROP_TRANSLATE) {
+ param= UI_translate_do_iface(param);
+ }
+#endif // INTERNATIONAL
+
}
#else // USE_STRING_COERCE
param= _PyUnicode_AsString(value);