From f57398568a326dcbc69900d2c21b96abca14429b Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 10 Mar 2013 14:57:19 +0000 Subject: More UI message i18n fixes and improvements... --- source/blender/editors/animation/anim_channels_defines.c | 6 +++--- source/blender/editors/animation/anim_ipo_utils.c | 6 ++++-- source/blender/editors/object/object_add.c | 3 +++ source/blender/makesrna/intern/rna_lamp.c | 3 +++ 4 files changed, 13 insertions(+), 5 deletions(-) (limited to 'source') diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 3ae8ae8a777..235cfd3b23b 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -422,7 +422,7 @@ static void acf_summary_backdrop(bAnimContext *ac, bAnimListElem *ale, float ymi static void acf_summary_name(bAnimListElem *UNUSED(ale), char *name) { if (name) - BLI_strncpy(name, "DopeSheet Summary", ANIM_CHAN_NAME_SIZE); + BLI_strncpy(name, IFACE_("DopeSheet Summary"), ANIM_CHAN_NAME_SIZE); } // FIXME: this is really a temp icon I think @@ -1088,7 +1088,7 @@ static int acf_filldrivers_icon(bAnimListElem *UNUSED(ale)) static void acf_filldrivers_name(bAnimListElem *UNUSED(ale), char *name) { - BLI_strncpy(name, "Drivers", ANIM_CHAN_NAME_SIZE); + BLI_strncpy(name, IFACE_("Drivers"), ANIM_CHAN_NAME_SIZE); } /* check if some setting exists for this channel */ @@ -2277,7 +2277,7 @@ static void acf_shapekey_name(bAnimListElem *ale, char *name) if (kb->name[0]) BLI_strncpy(name, kb->name, ANIM_CHAN_NAME_SIZE); else - BLI_snprintf(name, ANIM_CHAN_NAME_SIZE, "Key %d", ale->index); + BLI_snprintf(name, ANIM_CHAN_NAME_SIZE, IFACE_("Key %d"), ale->index); } } diff --git a/source/blender/editors/animation/anim_ipo_utils.c b/source/blender/editors/animation/anim_ipo_utils.c index b6d24e21057..2352cad0cbc 100644 --- a/source/blender/editors/animation/anim_ipo_utils.c +++ b/source/blender/editors/animation/anim_ipo_utils.c @@ -42,6 +42,8 @@ #include "BLI_math.h" #include "BLI_utildefines.h" +#include "BLF_translation.h" + #include "DNA_anim_types.h" #include "RNA_access.h" @@ -63,9 +65,9 @@ int getname_anim_fcurve(char *name, ID *id, FCurve *fcu) return icon; else if (ELEM3(NULL, id, fcu, fcu->rna_path)) { if (fcu == NULL) - strcpy(name, ""); + strcpy(name, IFACE_("")); else if (fcu->rna_path == NULL) - strcpy(name, ""); + strcpy(name, IFACE_("")); else /* id == NULL */ BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index); } diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index bdd5db37b47..3016f627a81 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -55,6 +55,8 @@ #include "BLI_math.h" #include "BLI_string.h" +#include "BLF_translation.h" + #include "BKE_anim.h" #include "BKE_animsys.h" #include "BKE_armature.h" @@ -874,6 +876,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot) /* properties */ ot->prop = RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", ""); + RNA_def_property_translation_context(ot->prop, BLF_I18NCONTEXT_ID_LAMP); ED_object_add_generic_props(ot, FALSE); } diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c index 7b55671e4ed..912f4d914cb 100644 --- a/source/blender/makesrna/intern/rna_lamp.c +++ b/source/blender/makesrna/intern/rna_lamp.c @@ -28,6 +28,8 @@ #include "BLI_math_base.h" +#include "BLF_translation.h" + #include "RNA_define.h" #include "RNA_enum_types.h" #include "rna_internal.h" @@ -362,6 +364,7 @@ static void rna_def_lamp(BlenderRNA *brna) prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, lamp_type_items); RNA_def_property_ui_text(prop, "Type", "Type of Lamp"); + RNA_def_property_translation_context(prop, BLF_I18NCONTEXT_ID_LAMP); RNA_def_property_update(prop, 0, "rna_Lamp_draw_update"); prop = RNA_def_property(srna, "distance", PROP_FLOAT, PROP_DISTANCE); -- cgit v1.2.3