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-13 23:59:29 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2012-04-13 23:59:29 +0400
commit4c1c092fb95f1ee8edf05e91280e0ac71521ccd1 (patch)
tree4daf9b26b2218a0663106b8a36d54aaa640d6ae2 /source/blender/editors/util/undo.c
parent455b8212b6f64184979a292247bebd081a1e75d9 (diff)
Fixed (or partly fixed) various missing UI translations, mainly with some specific ops invocations (popup menus…), and (to some extent) with the undo/redo stuff.
Diffstat (limited to 'source/blender/editors/util/undo.c')
-rw-r--r--source/blender/editors/util/undo.c8
1 files changed, 6 insertions, 2 deletions
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;