[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [51427] trunk/blender/source/blender: More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...

Bastien Montagne montagne29 at wanadoo.fr
Fri Oct 19 18:43:11 CEST 2012


Revision: 51427
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=51427
Author:   mont29
Date:     2012-10-19 16:43:10 +0000 (Fri, 19 Oct 2012)
Log Message:
-----------
More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate...

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/CMakeLists.txt
    trunk/blender/source/blender/blenloader/SConscript
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/blenloader/intern/runtime.c
    trunk/blender/source/blender/blenloader/intern/writefile.c
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/armature/poselib.c
    trunk/blender/source/blender/editors/armature/poseobject.c
    trunk/blender/source/blender/editors/mesh/CMakeLists.txt
    trunk/blender/source/blender/editors/mesh/SConscript
    trunk/blender/source/blender/editors/mesh/editmesh_slide.c
    trunk/blender/source/blender/editors/mesh/editmesh_tools.c
    trunk/blender/source/blender/editors/uvedit/uvedit_ops.c
    trunk/blender/source/blender/editors/uvedit/uvedit_unwrap_ops.c
    trunk/blender/source/blender/quicktime/apple/quicktime_export.c
    trunk/blender/source/blender/windowmanager/intern/wm_files.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/blenloader/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/blenloader/CMakeLists.txt	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/blenloader/CMakeLists.txt	2012-10-19 16:43:10 UTC (rev 51427)
@@ -25,6 +25,7 @@
 
 set(INC 
 	.
+	../blenfont
 	../blenkernel
 	../blenlib
 	../makesdna
@@ -62,4 +63,8 @@
 	add_definitions(-DWITH_BUILDINFO)
 endif()
 
+if(WITH_INTERNATIONAL)
+	add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}")

Modified: trunk/blender/source/blender/blenloader/SConscript
===================================================================
--- trunk/blender/source/blender/blenloader/SConscript	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/blenloader/SConscript	2012-10-19 16:43:10 UTC (rev 51427)
@@ -3,7 +3,7 @@
 
 sources = env.Glob('intern/*.c')
 
-incs = '. #/intern/guardedalloc ../blenlib ../blenkernel'
+incs = '. #/intern/guardedalloc ../blenfont ../blenlib ../blenkernel'
 incs += ' ../makesdna ../editors/include'
 incs += ' ../render/extern/include ../makesrna ../nodes ../bmesh ../imbuf'
 
@@ -11,6 +11,9 @@
 
 defs = []
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
 if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
     env.BlenderLib ( 'bf_blenloader', sources, Split(incs), defs, libtype=['core','player'], priority = [167,30]) #, cc_compileflags=['/WX'] )
 else:

Modified: trunk/blender/source/blender/blenloader/intern/readfile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/readfile.c	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/blenloader/intern/readfile.c	2012-10-19 16:43:10 UTC (rev 51427)
@@ -105,6 +105,8 @@
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_anim.h"
 #include "BKE_action.h"
 #include "BKE_armature.h"
@@ -976,13 +978,13 @@
 	
 	if (fd->flags & FD_FLAGS_FILE_OK) {
 		if (!read_file_dna(fd)) {
-			BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", incomplete", fd->relabase);
+			BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', incomplete", fd->relabase);
 			blo_freefiledata(fd);
 			fd = NULL;
 		}
 	} 
 	else {
-		BKE_reportf(reports, RPT_ERROR, "Failed to read blend file: \"%s\", not a blend file", fd->relabase);
+		BKE_reportf(reports, RPT_ERROR, "Failed to read blend file '%s', not a blend file", fd->relabase);
 		blo_freefiledata(fd);
 		fd = NULL;
 	}
@@ -999,7 +1001,8 @@
 	gzfile = BLI_gzopen(filepath, "rb");
 	
 	if (gzfile == (gzFile)Z_NULL) {
-		BKE_reportf(reports, RPT_WARNING, "Unable to open \"%s\": %s.", filepath, errno ? strerror(errno) : "Unknown error reading file");
+		BKE_reportf(reports, RPT_WARNING, "Unable to open '%s': %s",
+		            filepath, errno ? strerror(errno) : TIP_("Unknown error reading file"));
 		return NULL;
 	}
 	else {
@@ -1017,7 +1020,7 @@
 FileData *blo_openblendermemory(void *mem, int memsize, ReportList *reports)
 {
 	if (!mem || memsize<SIZEOFBLENDERHEADER) {
-		BKE_report(reports, RPT_WARNING, (mem)? "Unable to read": "Unable to open");
+		BKE_report(reports, RPT_WARNING, (mem) ? TIP_("Unable to read"): TIP_("Unable to open"));
 		return NULL;
 	}
 	else {
@@ -4764,8 +4767,7 @@
 				base->object = newlibadr_us(fd, sce->id.lib, base->object);
 				
 				if (base->object == NULL) {
-					BKE_reportf_wrap(fd->reports, RPT_WARNING,
-					                 "LIB ERROR: Object lost from scene:'%s\'",
+					BKE_reportf_wrap(fd->reports, RPT_WARNING, "LIB ERROR: object lost from scene: '%s'",
 					                 sce->id.name + 2);
 					BLI_remlink(&sce->base, base);
 					if (base == sce->basact) sce->basact = NULL;
@@ -6613,7 +6615,7 @@
 		G.main = main;
 		
 		if (!(do_version_tface(main, 1))) {
-			BKE_report(fd->reports, RPT_WARNING, "Texface conversion problem (error in console)");
+			BKE_report(fd->reports, RPT_WARNING, "Texface conversion problem (see error in console)");
 		}
 		
 		//XXX hack, material.c uses G.main allover the place, instead of main
@@ -7396,8 +7398,8 @@
 					prop = BKE_bproperty_object_get(ob, "Text");
 					if (prop) {
 						BKE_reportf_wrap(fd->reports, RPT_WARNING,
-						                 "Game property name conflict in object: \"%s\".\nText objects reserve the "
-						                 "[\"Text\"] game property to change their content through Logic Bricks.",
+						                 "Game property name conflict in object '%s':\ntext objects reserve the "
+						                 "['Text'] game property to change their content through logic bricks",
 						                 ob->id.name + 2);
 					}
 				}
@@ -9681,7 +9683,7 @@
 				if (fd == NULL) {
 					/* printf and reports for now... its important users know this */
 					BKE_reportf_wrap(basefd->reports, RPT_INFO,
-					                 "read library:  '%s', '%s'",
+					                 "Read library:  '%s', '%s'",
 					                 mainptr->curlib->filepath, mainptr->curlib->name);
 					
 					fd = blo_openblenderfile(mainptr->curlib->filepath, basefd->reports);
@@ -9735,7 +9737,7 @@
 					
 					if (fd == NULL) {
 						BKE_reportf_wrap(basefd->reports, RPT_WARNING,
-						                 "Can't find lib '%s'",
+						                 "Cannot find lib '%s'",
 						                 mainptr->curlib->filepath);
 					}
 				}
@@ -9754,7 +9756,7 @@
 								append_id_part(fd, mainptr, id, &realid);
 								if (!realid) {
 									BKE_reportf_wrap(fd->reports, RPT_WARNING,
-									                 "LIB ERROR: %s:'%s' missing from '%s'",
+									                 "LIB ERROR: %s: '%s' missing from '%s'",
 									                 BKE_idcode_to_name(GS(id->name)),
 									                 id->name+2, mainptr->curlib->filepath);
 								}
@@ -9786,7 +9788,7 @@
 				if (id->flag & LIB_READ) {
 					BLI_remlink(lbarray[a], id);
 					BKE_reportf_wrap(basefd->reports, RPT_WARNING,
-					                 "LIB ERROR: %s:'%s' unread libblock missing from '%s'",
+					                 "LIB ERROR: %s: '%s' unread libblock missing from '%s'",
 					                 BKE_idcode_to_name(GS(id->name)), id->name + 2, mainptr->curlib->filepath);
 					change_idid_adr(mainlist, basefd, id, NULL);
 					

Modified: trunk/blender/source/blender/blenloader/intern/runtime.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/runtime.c	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/blenloader/intern/runtime.c	2012-10-19 16:43:10 UTC (rev 51427)
@@ -104,7 +104,7 @@
 	fd = BLI_open(path, O_BINARY | O_RDONLY, 0);
 
 	if (fd == -1) {
-		BKE_reportf(reports, RPT_ERROR, "Unable to open \"%s\": %s.", path, strerror(errno));
+		BKE_reportf(reports, RPT_ERROR, "Unable to open '%s': %s", path, strerror(errno));
 		goto cleanup;
 	}
 	
@@ -115,15 +115,15 @@
 	datastart = handle_read_msb_int(fd);
 
 	if (datastart == -1) {
-		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (problem seeking)", path);
+		BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (problem seeking)", path);
 		goto cleanup;
 	}
 	else if (read(fd, buf, 8) != 8) {
-		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (truncated header)", path);
+		BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (truncated header)", path);
 		goto cleanup;
 	}
 	else if (memcmp(buf, "BRUNTIME", 8) != 0) {
-		BKE_reportf(reports, RPT_ERROR, "Unable to read  \"%s\" (not a blend file)", path);
+		BKE_reportf(reports, RPT_ERROR, "Unable to read '%s' (not a blend file)", path);
 		goto cleanup;
 	}
 	else {	

Modified: trunk/blender/source/blender/blenloader/intern/writefile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/writefile.c	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/blenloader/intern/writefile.c	2012-10-19 16:43:10 UTC (rev 51427)
@@ -3026,7 +3026,7 @@
 
 	file = BLI_open(tempname, O_BINARY+O_WRONLY+O_CREAT+O_TRUNC, 0666);
 	if (file == -1) {
-		BKE_reportf(reports, RPT_ERROR, "Can't open file %s for writing: %s", tempname, strerror(errno));
+		BKE_reportf(reports, RPT_ERROR, "Cannot open file %s for writing: %s", tempname, strerror(errno));
 		return 0;
 	}
 
@@ -3094,7 +3094,7 @@
 		if (0==ret) {
 			/* now rename to real file name, and delete temp @ file too */
 			if (BLI_rename(gzname, filepath) != 0) {
-				BKE_report(reports, RPT_ERROR, "Can't change old file (file saved with @)");
+				BKE_report(reports, RPT_ERROR, "Cannot change old file (file saved with @)");
 				return 0;
 			}
 
@@ -3110,7 +3110,7 @@
 		}
 	}
 	else if (BLI_rename(tempname, filepath) != 0) {
-		BKE_report(reports, RPT_ERROR, "Can't change old file (file saved with @)");
+		BKE_report(reports, RPT_ERROR, "Cannot change old file (file saved with @)");
 		return 0;
 	}
 

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2012-10-19 16:29:17 UTC (rev 51426)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2012-10-19 16:43:10 UTC (rev 51427)
@@ -654,7 +654,7 @@
 	if (ob->type != OB_ARMATURE)
 		return OPERATOR_CANCELLED;
 	if (BKE_object_obdata_is_libdata(ob)) {
-		BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); //error_libdata();
+		BKE_report(op->reports, RPT_ERROR, "Cannot apply pose to lib-linked armature"); /* error_libdata(); */
 		return OPERATOR_CANCELLED;
 	}
 
@@ -666,7 +666,7 @@
 		           "transforms stored are relative to the old rest pose");
 
 	/* Get editbones of active armature to alter */
-	ED_armature_to_edit(ob);	
+	ED_armature_to_edit(ob);
 	
 	/* get pose of active object and move it out of posemode */
 	pose = ob->pose;
@@ -2099,7 +2099,7 @@
 			}
 
 			sub_v3_v3v3(nor, ebone->tail, ebone->head);
-			vec_roll_to_mat3(nor, ebone->roll, mat);			
+			vec_roll_to_mat3(nor, ebone->roll, mat);
 			copy_v3_v3(vec, mat[2]);
 		}
 		else { /* Axis */
@@ -2969,7 +2969,7 @@
 		}
 	}
 	else {
-		// FIXME.. figure out a method for multiple bones
+		/* FIXME.. figure out a method for multiple bones */
 		BKE_reportf(op->reports, RPT_ERROR, "Too many points selected: %d\n", count);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list