From 98b9ed185febdfcde5286850b12af4bb44baedd8 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 15 Feb 2013 08:31:00 +0000 Subject: Translate "Set Parent To" menu (ctrl-P), reported on bf-translations ML by Satoshi Yamasaki, thanks! --- source/blender/editors/object/CMakeLists.txt | 5 +++++ source/blender/editors/object/SConscript | 5 ++++- source/blender/editors/object/object_relations.c | 9 ++++++--- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt index 05c042a4182..a92b25c6c85 100644 --- a/source/blender/editors/object/CMakeLists.txt +++ b/source/blender/editors/object/CMakeLists.txt @@ -20,6 +20,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader @@ -66,4 +67,8 @@ if(WITH_GAMEENGINE) add_definitions(-DWITH_GAMEENGINE) endif() +if(WITH_INTERNATIONAL) + add_definitions(-DWITH_INTERNATIONAL) +endif() + blender_add_lib(bf_editor_object "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/object/SConscript b/source/blender/editors/object/SConscript index df51198df92..203d7dff768 100644 --- a/source/blender/editors/object/SConscript +++ b/source/blender/editors/object/SConscript @@ -29,7 +29,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc ../../blenloader' incs += ' ../../makesrna ../../python ../../ikplugin ../../bmesh' incs += ' ../../render/extern/include ../../gpu' # for object_bake.c @@ -50,4 +50,7 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_GAMEENGINE']: defs.append('WITH_GAMEENGINE') +if env['WITH_BF_INTERNATIONAL']: + defs.append('WITH_INTERNATIONAL') + env.BlenderLib ( 'bf_editors_object', sources, Split(incs), defs, libtype=['core'], priority=[35] ) diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index ce37fd79d55..629dba465bc 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -56,6 +56,8 @@ #include "BLI_string.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "BKE_action.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -801,7 +803,7 @@ static int parent_set_exec(bContext *C, wmOperator *op) static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event)) { Object *ob = ED_object_active_context(C); - uiPopupMenu *pup = uiPupMenuBegin(C, "Set Parent To", ICON_NONE); + uiPopupMenu *pup = uiPupMenuBegin(C, IFACE_("Set Parent To"), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); wmOperatorType *ot = WM_operatortype_find("OBJECT_OT_parent_set", TRUE); @@ -810,11 +812,12 @@ static int parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSE #if 0 uiItemEnumO_ptr(layout, ot, NULL, 0, "type", PAR_OBJECT); #else - opptr = uiItemFullO_ptr(layout, ot, "Object", ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); RNA_boolean_set(&opptr, "keep_transform", FALSE); - opptr = uiItemFullO_ptr(layout, ot, "Object (Keep Transform)", ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, UI_ITEM_O_RETURN_PROPS); + opptr = uiItemFullO_ptr(layout, ot, IFACE_("Object (Keep Transform)"), ICON_NONE, NULL, WM_OP_EXEC_DEFAULT, + UI_ITEM_O_RETURN_PROPS); RNA_enum_set(&opptr, "type", PAR_OBJECT); RNA_boolean_set(&opptr, "keep_transform", TRUE); #endif -- cgit v1.2.3