diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-23 19:33:44 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2012-11-23 19:33:44 +0400 |
commit | 00b1d50532f4f1be1fcb310cefbbe8b285fd17ee (patch) | |
tree | a2c81acb2f70950ff3800e3b010f39765dac329b /source/blender/blenfont | |
parent | 69b88cf719c7aa9e28e28063557c8fe6f4963327 (diff) |
Basic work to solve "New" translation mismatch (this is an adjective, which often takes several forms depending on its related noun's gender, in non-english languages). Note though this does not completly solve the problem (python "New" is still uncontextual).
Moved AUDIO context to ID_SOUND (let's try to keep this as simple as possible!).
Also done some cleanup. Relevant i18n tools edits will follow.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r-- | source/blender/blenfont/BLF_translation.h | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/source/blender/blenfont/BLF_translation.h b/source/blender/blenfont/BLF_translation.h index d0b5d824bb3..918bcc5bf75 100644 --- a/source/blender/blenfont/BLF_translation.h +++ b/source/blender/blenfont/BLF_translation.h @@ -73,6 +73,7 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, 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) */ @@ -88,6 +89,13 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); #define CTX_TIP_(context, msgid) msgid #endif +/* Helper macro, when we want to define a same msgid for multiple msgctxt... + * Does nothing in C, but is "parsed" by our i18n py tools. + * XXX Currently limited to at most 16 contexts at most + * (but you can call it several times with the same msgid, should you need more contexts!). + */ +#define BLF_I18N_MSGID_MULTI_CTXT(msgid, ...) + /****************************************************************************** * All i18n contexts must be defined here. * This is a nice way to be sure not to use a context twice for different @@ -100,8 +108,39 @@ const char *BLF_translate_do_tooltip(const char *msgctxt, const char *msgid); /* Default context for operator names/labels. */ #define BLF_I18NCONTEXT_OPERATOR_DEFAULT "Operator" -/* Audio disambiguation context. */ -#define BLF_I18NCONTEXT_AUDIO "Audio" - +/* ID-types contexts. */ +/* WARNING! Keep it in sync with idtypes in blenkernel/intern/idcode.c */ +#define BLF_I18NCONTEXT_ID_ACTION "Action" +#define BLF_I18NCONTEXT_ID_ARMATURE "Armature" +#define BLF_I18NCONTEXT_ID_BRUSH "Brush" +#define BLF_I18NCONTEXT_ID_CAMERA "Camera" +#define BLF_I18NCONTEXT_ID_CURVE "Curve" +#define BLF_I18NCONTEXT_ID_GPENCIL "GPencil" +#define BLF_I18NCONTEXT_ID_GROUP "Group" +#define BLF_I18NCONTEXT_ID_ID "ID" +#define BLF_I18NCONTEXT_ID_IMAGE "Image" +/*#define BLF_I18NCONTEXT_ID_IPO "Ipo"*/ /* Deprecated */ +#define BLF_I18NCONTEXT_ID_SHAPEKEY "Key" +#define BLF_I18NCONTEXT_ID_LAMP "Lamp" +#define BLF_I18NCONTEXT_ID_LIBRARY "Library" +#define BLF_I18NCONTEXT_ID_LATTICE "Lattice" +#define BLF_I18NCONTEXT_ID_MATERIAL "Material" +#define BLF_I18NCONTEXT_ID_METABALL "Metaball" +#define BLF_I18NCONTEXT_ID_MESH "Mesh" +#define BLF_I18NCONTEXT_ID_NODETREE "NodeTree" +#define BLF_I18NCONTEXT_ID_OBJECT "Object" +#define BLF_I18NCONTEXT_ID_PARTICLESETTINGS "ParticleSettings" +#define BLF_I18NCONTEXT_ID_SCENE "Scene" +#define BLF_I18NCONTEXT_ID_SCREEN "Screen" +#define BLF_I18NCONTEXT_ID_SEQUENCE "Sequence" +#define BLF_I18NCONTEXT_ID_SPEAKER "Speaker" +#define BLF_I18NCONTEXT_ID_SOUND "Sound" +#define BLF_I18NCONTEXT_ID_TEXTURE "Texture" +#define BLF_I18NCONTEXT_ID_TEXT "Text" +#define BLF_I18NCONTEXT_ID_VFONT "VFont" +#define BLF_I18NCONTEXT_ID_WORLD "World" +#define BLF_I18NCONTEXT_ID_WINDOWMANAGER "WindowManager" +#define BLF_I18NCONTEXT_ID_MOVIECLIP "MovieClip" +#define BLF_I18NCONTEXT_ID_MASK "Mask" #endif /* __BLF_TRANSLATION_H__ */ |