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:
authorBastien Montagne <montagne29@wanadoo.fr>2012-04-14 19:06:41 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-04-14 19:06:41 +0400
commit310c0b9f100bbaf0c51888808fcb9fbf11ea27f9 (patch)
treef20f590aea7163dfb3d5535d7ba3515513b0a2d8 /source/blender/editors/space_outliner
parent513f363ea05e9c9cf77588eb86dd4984f8aad60d (diff)
Fixed another bunch of i18n bugs (thx to Leon Cheung for spotting them), among which:
* Drag'n'drop translation in Outliner * "Execute" button in file window * "Labels" of spacing elements, in multi-column enums * A glitch with nodes "Value to RGB", they where called "ColorRamp" in node_type_base() call. This is not definitive, though, as it appears that UI node names are determined by this call, while it should be by "defines" in rna_nodetrre_types.h, I guess... Anyway, not good to have such things in two different places! Also moved default context name under BLF_translation.h, much better to have those all in one place, accessible from whole Blender code!
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/CMakeLists.txt5
-rw-r--r--source/blender/editors/space_outliner/SConscript8
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c33
3 files changed, 33 insertions, 13 deletions
diff --git a/source/blender/editors/space_outliner/CMakeLists.txt b/source/blender/editors/space_outliner/CMakeLists.txt
index 27b4a568860..5a7bbc21934 100644
--- a/source/blender/editors/space_outliner/CMakeLists.txt
+++ b/source/blender/editors/space_outliner/CMakeLists.txt
@@ -22,6 +22,7 @@ set(INC
../include
../../blenkernel
../../blenlib
+ ../../blenfont
../../blenloader
../../imbuf
../../makesdna
@@ -47,4 +48,8 @@ set(SRC
outliner_intern.h
)
+if(WITH_INTERNATIONAL)
+ add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
blender_add_lib(bf_editor_space_outliner "${SRC}" "${INC}" "${INC_SYS}")
diff --git a/source/blender/editors/space_outliner/SConscript b/source/blender/editors/space_outliner/SConscript
index ab0b8582d33..a6f2e3c2a5d 100644
--- a/source/blender/editors/space_outliner/SConscript
+++ b/source/blender/editors/space_outliner/SConscript
@@ -2,9 +2,13 @@
Import ('env')
sources = env.Glob('*.c')
+defs = []
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc ../../makesrna ../../blenloader'
incs += ' #/extern/glew/include'
-env.BlenderLib ( 'bf_editors_space_outliner', sources, Split(incs), [], libtype=['core'], priority=[60] )
+if env['WITH_BF_INTERNATIONAL']:
+ defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_space_outliner', sources, Split(incs), defines=defs, libtype=['core'], priority=[60] )
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index c59cd626a93..981c4a5d867 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -65,6 +65,7 @@
# include <fnmatch.h>
#endif
+#include "BLF_translation.h"
#include "BKE_animsys.h"
#include "BKE_context.h"
@@ -1538,7 +1539,7 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* Menu creation */
- uiPopupMenu *pup= uiPupMenuBegin(C, "Set Parent To", ICON_NONE);
+ uiPopupMenu *pup= uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE);
uiLayout *layout= uiPupMenuLayout(pup);
PointerRNA ptr;
@@ -1548,7 +1549,8 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_OBJECT);
/* Cannot use uiItemEnumO()... have multiple properties to set. */
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Object", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Object"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
/* par becomes parent, make the associated menus */
if (par->type==OB_ARMATURE) {
@@ -1556,57 +1558,66 @@ static int parent_drop_invoke(bContext *C, wmOperator *op, wmEvent *event)
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_ARMATURE);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Armature Deform", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Armature Deform"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_ARMATURE_NAME);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", " With Empty Groups", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_(" With Empty Groups"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_ARMATURE_ENVELOPE);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", " With Envelope Weights", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_(" With Envelope Weights"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_ARMATURE_AUTO);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", " With Automatic Weights", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_(" With Automatic Weights"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_BONE);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Bone", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Bone"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
}
else if (par->type==OB_CURVE) {
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_CURVE);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Curve Deform", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Curve Deform"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_FOLLOW);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Follow Path", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Follow Path"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_PATH_CONST);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Path Constraint", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Path Constraint"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
}
else if (par->type == OB_LATTICE) {
WM_operator_properties_create(&ptr, "OUTLINER_OT_parent_drop");
RNA_string_set(&ptr, "parent", parname);
RNA_string_set(&ptr, "child", childname);
RNA_enum_set(&ptr, "type", PAR_LATTICE);
- uiItemFullO(layout, "OUTLINER_OT_parent_drop", "Lattice Deform", 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
+ uiItemFullO(layout, "OUTLINER_OT_parent_drop", IFACE_("Lattice Deform"),
+ 0, ptr.data, WM_OP_EXEC_DEFAULT, 0);
}
uiPupMenuEnd(C, pup);