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/windowmanager/intern/wm_dragdrop.c
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/windowmanager/intern/wm_dragdrop.c')
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 5283bc0a7a5..bbb2a54887e 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -36,6 +36,8 @@
#include "MEM_guardedalloc.h"
+#include "BLF_translation.h"
+
#include "BLI_blenlib.h"
#include "BIF_gl.h"
@@ -55,6 +57,8 @@
#include "UI_interface.h"
#include "UI_interface_icons.h"
+#include "RNA_access.h"
+
#include "WM_api.h"
#include "WM_types.h"
#include "wm_event_system.h"
@@ -179,8 +183,10 @@ static const char *dropbox_active(bContext *C, ListBase *handlers, wmDrag *drag,
if (handler->dropboxes) {
wmDropBox *drop = handler->dropboxes->first;
for (; drop; drop = drop->next) {
- if (drop->poll(C, drag, event))
- return drop->ot->name;
+ if (drop->poll(C, drag, event))
+ /* XXX Doing translation here might not be ideal, but later we have no more
+ * access to ot (and hence op context)... */
+ return RNA_struct_ui_name(drop->ot->srna);
}
}
}
@@ -220,7 +226,7 @@ static void wm_drop_operator_options(bContext *C, wmDrag *drag, wmEvent *event)
/* check buttons (XXX todo rna and value) */
if (UI_but_active_drop_name(C) ) {
- strcpy(drag->opname, "Paste name");
+ strcpy(drag->opname, IFACE_("Paste name"));
}
else {
const char *opname = wm_dropbox_active(C, drag, event);