[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44624] trunk/blender/source/blender: Many i18n fixings, based on [#30428] [2.62] Translation Issues.

Bastien Montagne montagne29 at wanadoo.fr
Sat Mar 3 22:42:28 CET 2012


Revision: 44624
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44624
Author:   mont29
Date:     2012-03-03 21:42:21 +0000 (Sat, 03 Mar 2012)
Log Message:
-----------
Many i18n fixings, based on [#30428] [2.62] Translation Issues.

In fact, most "UI special cases" are not well translated, currently. :/ This affects especially the "Properties" panels. This commit should address problems in Graph editors, and 3D View (but probably not yet all of them). Yet it already adds more than 100 new messages (and fixes translated drawing of more).

Also done some style edits?\226?\128?\166

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/fmodifier.c
    trunk/blender/source/blender/editors/animation/CMakeLists.txt
    trunk/blender/source/blender/editors/animation/SConscript
    trunk/blender/source/blender/editors/animation/fmodifier_ui.c
    trunk/blender/source/blender/editors/gpencil/CMakeLists.txt
    trunk/blender/source/blender/editors/gpencil/SConscript
    trunk/blender/source/blender/editors/gpencil/gpencil_buttons.c
    trunk/blender/source/blender/editors/interface/interface_layout.c
    trunk/blender/source/blender/editors/space_file/file_draw.c
    trunk/blender/source/blender/editors/space_file/file_panels.c
    trunk/blender/source/blender/editors/space_graph/graph_buttons.c
    trunk/blender/source/blender/editors/space_graph/graph_edit.c
    trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
    trunk/blender/source/blender/makesrna/intern/rna_gpencil.c
    trunk/blender/source/blender/render/CMakeLists.txt
    trunk/blender/source/blender/render/SConscript
    trunk/blender/source/blender/render/intern/source/external_engine.c
    trunk/blender/source/blender/windowmanager/intern/wm_operators.c

Modified: trunk/blender/source/blender/blenkernel/intern/fmodifier.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/fmodifier.c	2012-03-03 20:36:09 UTC (rev 44623)
+++ trunk/blender/source/blender/blenkernel/intern/fmodifier.c	2012-03-03 21:42:21 UTC (rev 44624)
@@ -39,6 +39,8 @@
 
 #include "DNA_anim_types.h"
 
+#include "BLF_translation.h"
+
 #include "BLI_blenlib.h"
 #include "BLI_math.h" /* windows needs for M_PI */
 #include "BLI_utildefines.h"
@@ -264,7 +266,7 @@
 	sizeof(FMod_Generator), /* size */
 	FMI_TYPE_GENERATE_CURVE, /* action type */
 	FMI_REQUIRES_NOTHING, /* requirements */
-	"Generator", /* name */
+	N_("Generator"), /* name */
 	"FMod_Generator", /* struct name */
 	fcm_generator_free, /* free data */
 	fcm_generator_copy, /* copy data */
@@ -386,7 +388,7 @@
 	sizeof(FMod_FunctionGenerator), /* size */
 	FMI_TYPE_GENERATE_CURVE, /* action type */
 	FMI_REQUIRES_NOTHING, /* requirements */
-	"Built-In Function", /* name */
+	N_("Built-In Function"), /* name */
 	"FMod_FunctionGenerator", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */
@@ -493,7 +495,7 @@
 	sizeof(FMod_Envelope), /* size */
 	FMI_TYPE_REPLACE_VALUES, /* action type */
 	0, /* requirements */
-	"Envelope", /* name */
+	N_("Envelope"), /* name */
 	"FMod_Envelope", /* struct name */
 	fcm_envelope_free, /* free data */
 	fcm_envelope_copy, /* copy data */
@@ -690,7 +692,7 @@
 	sizeof(FMod_Cycles), /* size */
 	FMI_TYPE_EXTRAPOLATION, /* action type */
 	FMI_REQUIRES_ORIGINAL_DATA, /* requirements */
-	"Cycles", /* name */
+	N_("Cycles"), /* name */
 	"FMod_Cycles", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */
@@ -748,7 +750,7 @@
 	sizeof(FMod_Noise), /* size */
 	FMI_TYPE_REPLACE_VALUES, /* action type */
 	0, /* requirements */
-	"Noise", /* name */
+	N_("Noise"), /* name */
 	"FMod_Noise", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */
@@ -766,7 +768,7 @@
 	sizeof(FMod_Filter), /* size */
 	FMI_TYPE_REPLACE_VALUES, /* action type */
 	0, /* requirements */
-	"Filter", /* name */
+	N_("Filter"), /* name */
 	"FMod_Filter", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */
@@ -822,7 +824,7 @@
 	sizeof(FMod_Python), /* size */
 	FMI_TYPE_GENERATE_CURVE, /* action type */
 	FMI_REQUIRES_RUNTIME_CHECK, /* requirements */
-	"Python", /* name */
+	N_("Python"), /* name */
 	"FMod_Python", /* struct name */
 	fcm_python_free, /* free data */
 	fcm_python_copy, /* copy data */
@@ -865,7 +867,7 @@
 	sizeof(FMod_Limits), /* size */
 	FMI_TYPE_GENERATE_CURVE, /* action type */  /* XXX... err... */   
 	FMI_REQUIRES_RUNTIME_CHECK, /* requirements */
-	"Limits", /* name */
+	N_("Limits"), /* name */
 	"FMod_Limits", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */
@@ -918,7 +920,7 @@
 	sizeof(FMod_Limits), /* size */
 	FMI_TYPE_GENERATE_CURVE, /* action type */  /* XXX... err... */   
 	FMI_REQUIRES_RUNTIME_CHECK, /* requirements */
-	"Stepped", /* name */
+	N_("Stepped"), /* name */
 	"FMod_Stepped", /* struct name */
 	NULL, /* free data */
 	NULL, /* copy data */

Modified: trunk/blender/source/blender/editors/animation/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/editors/animation/CMakeLists.txt	2012-03-03 20:36:09 UTC (rev 44623)
+++ trunk/blender/source/blender/editors/animation/CMakeLists.txt	2012-03-03 21:42:21 UTC (rev 44624)
@@ -20,6 +20,7 @@
 
 set(INC
 	../include
+	../../blenfont
 	../../blenkernel
 	../../blenlib
 	../../blenloader

Modified: trunk/blender/source/blender/editors/animation/SConscript
===================================================================
--- trunk/blender/source/blender/editors/animation/SConscript	2012-03-03 20:36:09 UTC (rev 44623)
+++ trunk/blender/source/blender/editors/animation/SConscript	2012-03-03 21:42:21 UTC (rev 44624)
@@ -3,7 +3,7 @@
 
 sources = env.Glob('*.c')
 
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf'
+incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../makesrna ../../imbuf ../../blenfont'
 incs += ' ../../bmesh ../../windowmanager #/intern/guardedalloc #/extern/glew/include ../../blenloader'
 
 env.BlenderLib ( 'bf_editors_animation', sources, Split(incs), [], libtype=['core'], priority=[125] )

Modified: trunk/blender/source/blender/editors/animation/fmodifier_ui.c
===================================================================
--- trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2012-03-03 20:36:09 UTC (rev 44623)
+++ trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2012-03-03 21:42:21 UTC (rev 44624)
@@ -45,6 +45,8 @@
 
 #include "MEM_guardedalloc.h"
 
+#include "BLF_translation.h"
+
 #include "BLI_blenlib.h"
 #include "BLI_utildefines.h"
 
@@ -141,39 +143,50 @@
 			/* draw polynomial order selector */
 			row= uiLayoutRow(layout, 0);
 			block= uiLayoutGetBlock(row);
-				but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 10,0,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
+				but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 10, 0, width-30, 19,
+				               &data->poly_order, 1, 100, 0, 0,
+				               TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
 				uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
 			
 			
 			/* draw controls for each coefficient and a + sign at end of row */
 			row= uiLayoutRow(layout, 1);
 			block= uiLayoutGetBlock(row);
-				uiDefBut(block, LABEL, 1, "y = ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
 			
 			cp= data->coefficients;
 			for (i=0; (i < data->arraysize) && (cp); i++, cp++) {
+				/* To align with first line. */
+				if (i)
+					uiDefBut(block, LABEL, 1, "   ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
+				else
+					uiDefBut(block, LABEL, 1, "y =", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
 				/* coefficient */
-				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient for polynomial");
+				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 150, 20, cp, -UI_FLT_MAX, UI_FLT_MAX,
+				          10, 3, TIP_("Coefficient for polynomial"));
 				
 				/* 'x' param (and '+' if necessary) */
-				if (i) {
-					if (i == 1)
-						strcpy(xval, "x");
-					else
-						sprintf(xval, "x^%u", i);
-					uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "Power of x");
-				}
+				if (i == 0)
+					strcpy(xval, "");
+				else if (i == 1)
+					strcpy(xval, "x");
+				else
+					sprintf(xval, "x^%u", i);
+				uiDefBut(block, LABEL, 1, xval, 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, TIP_("Power of x"));
 				
 				if ( (i != (data->arraysize - 1)) || ((i==0) && data->arraysize==2) ) {
-					uiDefBut(block, LABEL, 1, "+", 0,0 , 30, 20, NULL, 0.0, 0.0, 0, 0, "");
+					uiDefBut(block, LABEL, 1, "+", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
 					
 					/* next coefficient on a new row */
 					row= uiLayoutRow(layout, 1);
 					block= uiLayoutGetBlock(row);
 				}
+				else {
+					/* For alignement in UI! */
+					uiDefBut(block, LABEL, 1, " ", 0, 0, 30, 20, NULL, 0.0, 0.0, 0, 0, "");
+				}
 			}
+			break;
 		}
-			break;
 		
 		case FCM_GENERATOR_POLYNOMIAL_FACTORISED: /* Factorized polynomial expression */
 		{
@@ -183,26 +196,34 @@
 			/* draw polynomial order selector */
 			row= uiLayoutRow(layout, 0);
 			block= uiLayoutGetBlock(row);
-				but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, "Poly Order: ", 0,0,width-30,19, &data->poly_order, 1, 100, 0, 0, "'Order' of the Polynomial - for a polynomial with n terms, 'order' is n-1");
+				but= uiDefButI(block, NUM, B_FMODIFIER_REDRAW, IFACE_("Poly Order:"), 0, 0, width-30, 19,
+				               &data->poly_order, 1, 100, 0, 0,
+				               TIP_("'Order' of the Polynomial (for a polynomial with n terms, 'order' is n-1)"));
 				uiButSetFunc(but, validate_fmodifier_cb, fcm, NULL);
 			
 			
 			/* draw controls for each pair of coefficients */
 			row= uiLayoutRow(layout, 1);
 			block= uiLayoutGetBlock(row);
-				uiDefBut(block, LABEL, 1, "y=", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
 			
 			cp= data->coefficients;
 			for (i=0; (i < data->poly_order) && (cp); i++, cp+=2) {
+				/* To align with first line. */
+				if (i)
+					uiDefBut(block, LABEL, 1, "   ", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
+				else
+					uiDefBut(block, LABEL, 1, "y =", 0, 0, 50, 20, NULL, 0.0, 0.0, 0, 0, "");
 				/* opening bracket */
 				uiDefBut(block, LABEL, 1, "(", 0, 0, 20, 20, NULL, 0.0, 0.0, 0, 0, "");
 				
 				/* coefficients */
-				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Coefficient of x");
+				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp, -UI_FLT_MAX, UI_FLT_MAX,
+				          10, 3, TIP_("Coefficient of x"));
 				
-				uiDefBut(block, LABEL, 1, "x+", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
+				uiDefBut(block, LABEL, 1, "x +", 0, 0, 40, 20, NULL, 0.0, 0.0, 0, 0, "");
 				
-				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX, 10, 3, "Second coefficient");
+				uiDefButF(block, NUM, B_FMODIFIER_REDRAW, "", 0, 0, 100, 20, cp+1, -UI_FLT_MAX, UI_FLT_MAX,
+				          10, 3, TIP_("Second coefficient"));
 				
 				/* closing bracket and '+' sign */
 				if ( (i != (data->poly_order - 1)) || ((i==0) && data->poly_order==2) ) {
@@ -261,13 +282,13 @@
 	
 	/* before range */
 	col= uiLayoutColumn(split, 1);
-		uiItemL(col, "Before:", ICON_NONE);
+		uiItemL(col, IFACE_("Before:"), ICON_NONE);
 		uiItemR(col, &ptr, "mode_before", 0, "", ICON_NONE);
 		uiItemR(col, &ptr, "cycles_before", 0, NULL, ICON_NONE);
 		
 	/* after range */
 	col= uiLayoutColumn(split, 1);
-		uiItemL(col, "After:", ICON_NONE);
+		uiItemL(col, IFACE_("After:"), ICON_NONE);
 		uiItemR(col, &ptr, "mode_after", 0, "", ICON_NONE);
 		uiItemR(col, &ptr, "cycles_after", 0, NULL, ICON_NONE);
 }
@@ -479,12 +500,12 @@
 	
 	/* general settings */
 	col= uiLayoutColumn(layout, 1);
-		uiItemL(col, "Envelope:", ICON_NONE);
+		uiItemL(col, IFACE_("Envelope:"), ICON_NONE);
 		uiItemR(col, &ptr, "reference_value", 0, NULL, ICON_NONE);
 		
 		row= uiLayoutRow(col, 1);
-			uiItemR(row, &ptr, "default_min", 0, "Min", ICON_NONE);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list