[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55165] trunk/blender/source/blender: More UI message i18n fixes and improvements...

Bastien Montagne montagne29 at wanadoo.fr
Sun Mar 10 15:57:20 CET 2013


Revision: 55165
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55165
Author:   mont29
Date:     2013-03-10 14:57:19 +0000 (Sun, 10 Mar 2013)
Log Message:
-----------
More UI message i18n fixes and improvements...

Modified Paths:
--------------
    trunk/blender/source/blender/editors/animation/anim_channels_defines.c
    trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
    trunk/blender/source/blender/editors/object/object_add.c
    trunk/blender/source/blender/makesrna/intern/rna_lamp.c

Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2013-03-10 14:44:16 UTC (rev 55164)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2013-03-10 14:57:19 UTC (rev 55165)
@@ -422,7 +422,7 @@
 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 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 @@
 		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);
 	}
 }
 

Modified: trunk/blender/source/blender/editors/animation/anim_ipo_utils.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_ipo_utils.c	2013-03-10 14:44:16 UTC (rev 55164)
+++ trunk/blender/source/blender/editors/animation/anim_ipo_utils.c	2013-03-10 14:57:19 UTC (rev 55165)
@@ -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 @@
 		return icon;
 	else if (ELEM3(NULL, id, fcu, fcu->rna_path)) {
 		if (fcu == NULL)
-			strcpy(name, "<invalid>");
+			strcpy(name, IFACE_("<invalid>"));
 		else if (fcu->rna_path == NULL)
-			strcpy(name, "<no path>");
+			strcpy(name, IFACE_("<no path>"));
 		else /* id == NULL */
 			BLI_snprintf(name, 256, "%s[%d]", fcu->rna_path, fcu->array_index);
 	}

Modified: trunk/blender/source/blender/editors/object/object_add.c
===================================================================
--- trunk/blender/source/blender/editors/object/object_add.c	2013-03-10 14:44:16 UTC (rev 55164)
+++ trunk/blender/source/blender/editors/object/object_add.c	2013-03-10 14:57:19 UTC (rev 55165)
@@ -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 @@
 
 	/* 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);
 }

Modified: trunk/blender/source/blender/makesrna/intern/rna_lamp.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_lamp.c	2013-03-10 14:44:16 UTC (rev 55164)
+++ trunk/blender/source/blender/makesrna/intern/rna_lamp.c	2013-03-10 14:57:19 UTC (rev 55165)
@@ -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 @@
 	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);




More information about the Bf-blender-cvs mailing list