Revision: 53999
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=53999
Author: mont29
Date: 2013-01-22 14:55:34 +0000 (Tue, 22 Jan 2013)
Log Message:
-----------
Fix for build with scons whithout i18n support.
This should not be needed, I really see no reason for this linking error, but
I'd rather use this hack than wasting more time over this issue. When will we
get rid of this "two build systems to maintain" time-wasting situation?
Modified Paths:
--------------
trunk/blender/source/blender/blenfont/SConscript
trunk/blender/source/blender/python/intern/bpy_app_translations.c
Modified: trunk/blender/source/blender/blenfont/SConscript
===================================================================
--- trunk/blender/source/blender/blenfont/SConscript 2013-01-22 14:49:52 UTC
(rev 53998)
+++ trunk/blender/source/blender/blenfont/SConscript 2013-01-22 14:55:34 UTC
(rev 53999)
@@ -43,4 +43,4 @@
if env['WITH_BF_INTERNATIONAL']:
defs.append('WITH_INTERNATIONAL')
-env.BlenderLib ( 'bf_blenfont', sources, Split(incs), Split(defs),
libtype=['core','player'], priority=[210,210] )
+env.BlenderLib ( 'bf_blenfont', sources, Split(incs), defines=defs,
libtype=['core','player'], priority=[210,210] )
Modified: trunk/blender/source/blender/python/intern/bpy_app_translations.c
===================================================================
--- trunk/blender/source/blender/python/intern/bpy_app_translations.c
2013-01-22 14:49:52 UTC (rev 53998)
+++ trunk/blender/source/blender/python/intern/bpy_app_translations.c
2013-01-22 14:55:34 UTC (rev 53999)
@@ -516,7 +516,10 @@
/* Note we could optimize this a bit when WITH_INTERNATIONAL is not
defined, but don't think "code complexity" would
* be worth it, as this func should not often be used!
*/
- static const char *kwlist[] = {"msgid", "msgctxt", NULL};
+ /* XXX This code fails with scons when WITH_INTERNATIONAL is not
defined, at link time, stating that BLF_pgettext
+ * is undefined... So using #ifdef after all, rather than removing
scons from blender trunk!
+ */
+ static const char *kwlist[] = {"msgid", "msgctxt", NULL};
char *msgid, *msgctxt = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kw,
"s|z:bpy.app.translations.pgettext", (char **)kwlist,
@@ -525,7 +528,11 @@
return NULL;
}
+#ifdef WITH_INTERNATIONAL
return PyUnicode_FromString(BLF_pgettext(msgctxt ? msgctxt :
BLF_I18NCONTEXT_DEFAULT, msgid));
+#else
+ return PyUnicode_FromString(msgid);
+#endif
}
PyDoc_STRVAR(app_translations_locale_explode_doc,
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs