diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-09 15:57:29 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-06-09 16:00:56 +0300 |
commit | 3092e1031d2194e9d6fcc8f157a6e0fcb5d1e45a (patch) | |
tree | 3a3319641de3e0781a3bb6242ff3bd561446f5da /source/blender/editors/interface/interface_eyedropper.c | |
parent | af980a20a46c9c865418cf60ddaf669e37587bfb (diff) |
Fix T45003: some UI/i18n issues.
* Do not translate renderlayers' names, those are data, not UI (defined by user).
* Translate passes' names, even in button itself (menu items were already translated).
* Translate 'ID type' in ID eyedropper helper message.
Also, added i18n context to IDType private struct, and `BKE_idcode_to_translation_context()`
helper, much more generic and easy to maintain than the private util in interface_template.c.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index 4f77185fb8f..97aa865c287 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -36,6 +36,8 @@ #include "BLI_blenlib.h" #include "BLI_math_vector.h" +#include "BLF_translation.h" + #include "BKE_context.h" #include "BKE_screen.h" #include "BKE_report.h" @@ -435,7 +437,8 @@ static int datadropper_init(bContext *C, wmOperator *op) type = RNA_property_pointer_type(&ddr->ptr, ddr->prop); ddr->idcode = RNA_type_to_ID_code(type); BLI_assert(ddr->idcode != 0); - ddr->idcode_name = BKE_idcode_to_name(ddr->idcode); + /* Note we can translate here (instead of on draw time), because this struct has very short lifetime. */ + ddr->idcode_name = TIP_(BKE_idcode_to_name(ddr->idcode)); return true; } |