From 4c1c092fb95f1ee8edf05e91280e0ac71521ccd1 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Fri, 13 Apr 2012 19:59:29 +0000 Subject: =?UTF-8?q?Fixed=20(or=20partly=20fixed)=20various=20missing=20UI?= =?UTF-8?q?=20translations,=20mainly=20with=20some=20specific=20ops=20invo?= =?UTF-8?q?cations=20(popup=20menus=E2=80=A6),=20and=20(to=20some=20extent?= =?UTF-8?q?)=20with=20the=20undo/redo=20stuff.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/blender/editors/util/CMakeLists.txt | 1 + source/blender/editors/util/SConscript | 2 +- source/blender/editors/util/undo.c | 8 ++++++-- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/util') diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt index eb0286716f3..8eab2fda545 100644 --- a/source/blender/editors/util/CMakeLists.txt +++ b/source/blender/editors/util/CMakeLists.txt @@ -20,6 +20,7 @@ set(INC ../include + ../../blenfont ../../blenkernel ../../blenlib ../../blenloader diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript index 16501c59551..0a49c9c24a6 100644 --- a/source/blender/editors/util/SConscript +++ b/source/blender/editors/util/SConscript @@ -3,7 +3,7 @@ Import ('env') sources = env.Glob('*.c') -incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' +incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf' incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include' incs += ' ../../makesrna ../../bmesh' incs += ' ../../blenloader' diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c index ac264c1a6af..5f0fc9d105c 100644 --- a/source/blender/editors/util/undo.c +++ b/source/blender/editors/util/undo.c @@ -44,6 +44,8 @@ #include "BLI_dynstr.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "BKE_blender.h" #include "BKE_context.h" #include "BKE_global.h" @@ -456,7 +458,9 @@ static EnumPropertyItem *rna_undo_itemf(bContext *C, int undosys, int *totitem) } if (name) { - item_tmp.identifier = item_tmp.name = name; + item_tmp.identifier = name; + /* XXX This won’t work with non-default contexts (e.g. operators) :/ */ + item_tmp.name = IFACE_(name); if (active) item_tmp.icon = ICON_RESTRICT_VIEW_OFF; else @@ -484,7 +488,7 @@ static int undo_history_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even EnumPropertyItem *item = rna_undo_itemf(C, undosys, &totitem); if (totitem > 0) { - uiPopupMenu *pup = uiPupMenuBegin(C, op->type->name, ICON_NONE); + uiPopupMenu *pup = uiPupMenuBegin(C, RNA_struct_ui_name(op->type->srna), ICON_NONE); uiLayout *layout = uiPupMenuLayout(pup); uiLayout *split = uiLayoutSplit(layout, 0, 0), *column = NULL; int i, c; -- cgit v1.2.3