[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49072] trunk/blender/source/blender/ editors/space_image/image_buttons.c: quiet formatting warnings when international was enabled.

Campbell Barton ideasman42 at gmail.com
Thu Jul 19 23:55:17 CEST 2012


Revision: 49072
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49072
Author:   campbellbarton
Date:     2012-07-19 21:55:16 +0000 (Thu, 19 Jul 2012)
Log Message:
-----------
quiet formatting warnings when international was enabled.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_image/image_buttons.c

Modified: trunk/blender/source/blender/editors/space_image/image_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_image/image_buttons.c	2012-07-19 20:46:48 UTC (rev 49071)
+++ trunk/blender/source/blender/editors/space_image/image_buttons.c	2012-07-19 21:55:16 UTC (rev 49072)
@@ -106,36 +106,36 @@
 	if (ima == NULL) return;
 
 	if (ibuf == NULL) {
-		ofs += sprintf(str, IFACE_("Can't Load Image"));
+		ofs += sprintf(str, "%s", IFACE_("Can't Load Image"));
 	}
 	else {
 		if (ima->source == IMA_SRC_MOVIE) {
-			ofs += sprintf(str, IFACE_("Movie"));
+			ofs += sprintf(str, "%s", IFACE_("Movie"));
 			if (ima->anim)
 				ofs += sprintf(str + ofs, IFACE_("%d frs"), IMB_anim_get_duration(ima->anim, IMB_TC_RECORD_RUN));
 		}
 		else
-			ofs += sprintf(str, IFACE_("Image"));
+			ofs += sprintf(str, "%s", IFACE_("Image"));
 
-		ofs += sprintf(str + ofs, IFACE_(": size %d x %d,"), ibuf->x, ibuf->y);
+		ofs += sprintf(str + ofs, ": %s %d x %d,", IFACE_("size"), ibuf->x, ibuf->y);
 
 		if (ibuf->rect_float) {
 			if (ibuf->channels != 4) {
-				ofs += sprintf(str + ofs, IFACE_("%d float channel(s)"), ibuf->channels);
+				ofs += sprintf(str + ofs, "%d %s", ibuf->channels, IFACE_("float channel(s)"));
 			}
 			else if (ibuf->planes == R_IMF_PLANES_RGBA)
-				ofs += sprintf(str + ofs, IFACE_(" RGBA float"));
+				ofs += sprintf(str + ofs, "%s", IFACE_(" RGBA float"));
 			else
-				ofs += sprintf(str + ofs, IFACE_(" RGB float"));
+				ofs += sprintf(str + ofs, "%s", IFACE_(" RGB float"));
 		}
 		else {
 			if (ibuf->planes == R_IMF_PLANES_RGBA)
-				ofs += sprintf(str + ofs, IFACE_(" RGBA byte"));
+				ofs += sprintf(str + ofs, "%s", IFACE_(" RGBA byte"));
 			else
-				ofs += sprintf(str + ofs, IFACE_(" RGB byte"));
+				ofs += sprintf(str + ofs, "%s", IFACE_(" RGB byte"));
 		}
 		if (ibuf->zbuf || ibuf->zbuf_float)
-			ofs += sprintf(str + ofs, IFACE_(" + Z"));
+			ofs += sprintf(str + ofs, "%s", IFACE_(" + Z"));
 
 		if (ima->source == IMA_SRC_SEQUENCE) {
 			char *file = BLI_last_slash(ibuf->name);
@@ -381,11 +381,11 @@
 	
 	/* compo result */
 	if (rr->rectf) {
-		a += sprintf(str + a, IFACE_("|Composite %%x0"));
+		a += sprintf(str + a, "|%s %%x0", IFACE_("Composite"));
 		nr = 1;
 	}
 	else if (rr->rect32) {
-		a += sprintf(str + a, IFACE_("|Sequence %%x0"));
+		a += sprintf(str + a, "|%s %%x0", IFACE_("Sequence"));
 		nr = 1;
 	}
 	for (rl = rr->layers.first; rl; rl = rl->next, nr++) {
@@ -410,7 +410,7 @@
 	
 	/* rendered results don't have a Combined pass */
 	if (rl == NULL || rl->rectf) {
-		a += sprintf(str + a, IFACE_("|Combined %%x0"));
+		a += sprintf(str + a, "|%s %%x0", IFACE_("Combined"));
 		nr = 1;
 	}
 	




More information about the Bf-blender-cvs mailing list