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/blenfont
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/blenfont')
-rw-r--r--source/blender/blenfont/BLF_translation.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h
index 5e2fee36af0..2c786f87521 100644
--- a/source/blender/blenfont/BLF_translation.h
+++ b/source/blender/blenfont/BLF_translation.h
@@ -67,6 +67,7 @@ const char *BLF_translate_do_tooltip(const char *contex, const char *msgid);
/* The "translation-marker" macro. */
#define N_(msgid) msgid
+#define CTX_N_(context, msgid) msgid
/* Those macros should be used everywhere in UI code. */
#ifdef WITH_INTERNATIONAL
/* #define _(msgid) BLF_gettext(msgid) */
@@ -82,4 +83,18 @@ const char *BLF_translate_do_tooltip(const char *contex, const char *msgid);
#define CTX_TIP_(context, msgid) msgid
#endif
+/******************************************************************************
+ * All i18n contexts must be defined here.
+ * This is a nice way to be sure not to use a context twice for different
+ * things, and limit the number of existing contexts!
+ */
+
+/* Default, void context. Just in case... */
+#define BLF_I18NCONTEXT_DEFAULT ""
+
+/* Default context for operator names/labels. */
+#define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator"
+
+
+
#endif /* __BLF_TRANSLATION_H__ */