[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [55186] trunk/blender: Fix more UI i18n issues (reported by Leon Cheung and Lockal).

Bastien Montagne montagne29 at wanadoo.fr
Mon Mar 11 10:06:50 CET 2013


Revision: 55186
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=55186
Author:   mont29
Date:     2013-03-11 09:06:49 +0000 (Mon, 11 Mar 2013)
Log Message:
-----------
Fix more UI i18n issues (reported by Leon Cheung and Lockal).

We have a glicth with colormanagement's spaces descriptions, though, looks like they are clamped at 64 chars (see raw space), will see that later, if it?\226?\128?\153s solvable.

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py
    trunk/blender/source/blender/blenkernel/intern/constraint.c
    trunk/blender/source/blender/editors/sculpt_paint/CMakeLists.txt
    trunk/blender/source/blender/editors/sculpt_paint/SConscript
    trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
    trunk/blender/source/blender/editors/space_node/drawnode.c
    trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
    trunk/blender/source/blender/makesrna/intern/rna_color.c

Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/release/scripts/modules/bl_i18n_utils/spell_check_utils.py	2013-03-11 09:06:49 UTC (rev 55186)
@@ -77,6 +77,7 @@
         "builtin", "builtins",
         "bytecode",
         "chunksize",
+        "customdata",
         "dataset", "datasets",
         "de",
         "defocus",

Modified: trunk/blender/source/blender/blenkernel/intern/constraint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/constraint.c	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/blenkernel/intern/constraint.c	2013-03-11 09:06:49 UTC (rev 55186)
@@ -817,7 +817,7 @@
 static bConstraintTypeInfo CTI_CHILDOF = {
 	CONSTRAINT_TYPE_CHILDOF, /* type */
 	sizeof(bChildOfConstraint), /* size */
-	"ChildOf", /* name */
+	"Child Of", /* name */
 	"bChildOfConstraint", /* struct name */
 	NULL, /* free data */
 	childof_id_looper, /* id looper */
@@ -992,7 +992,7 @@
 static bConstraintTypeInfo CTI_TRACKTO = {
 	CONSTRAINT_TYPE_TRACKTO, /* type */
 	sizeof(bTrackToConstraint), /* size */
-	"TrackTo", /* name */
+	"Track To", /* name */
 	"bTrackToConstraint", /* struct name */
 	NULL, /* free data */
 	trackto_id_looper, /* id looper */

Modified: trunk/blender/source/blender/editors/sculpt_paint/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/CMakeLists.txt	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/editors/sculpt_paint/CMakeLists.txt	2013-03-11 09:06:49 UTC (rev 55186)
@@ -23,6 +23,7 @@
 	../uvedit
 	../../blenkernel
 	../../blenlib
+	../../blenfont
 	../../blenloader
 	../../bmesh
 	../../gpu
@@ -58,4 +59,8 @@
 	sculpt_intern.h
 )
 
+if(WITH_INTERNATIONAL)
+	add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_editor_sculpt_paint "${SRC}" "${INC}" "${INC_SYS}")

Modified: trunk/blender/source/blender/editors/sculpt_paint/SConscript
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/SConscript	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/editors/sculpt_paint/SConscript	2013-03-11 09:06:49 UTC (rev 55186)
@@ -31,7 +31,7 @@
 
 defs = []
 
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf'
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../render/extern/include'
 incs += ' ../../gpu ../../makesrna ../../blenloader ../../bmesh ../uvedit'
@@ -47,4 +47,7 @@
 if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'):
     incs += ' ' + env['BF_PTHREADS_INC']
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
 env.BlenderLib ( 'bf_editors_sculpt_paint', sources, Split(incs), defines=defs, libtype=['core'], priority=[40] )

Modified: trunk/blender/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/editors/sculpt_paint/sculpt.c	2013-03-11 09:06:49 UTC (rev 55186)
@@ -43,6 +43,8 @@
 #include "BLI_threads.h"
 #include "BLI_rand.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_mesh_types.h"
 #include "DNA_meshdata_types.h"
 #include "DNA_node_types.h"
@@ -4438,8 +4440,7 @@
 	op->customdata = stroke;
 
 	/* For tablet rotation */
-	ignore_background_click = RNA_boolean_get(op->ptr,
-	                                          "ignore_background_click");
+	ignore_background_click = RNA_boolean_get(op->ptr, "ignore_background_click");
 
 	if (ignore_background_click && !over_mesh(C, op, event->x, event->y)) {
 		paint_stroke_data_free(op);
@@ -4518,8 +4519,7 @@
 
 	/* properties */
 
-	RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement,
-	                           "Stroke", "");
+	RNA_def_collection_runtime(ot->srna, "stroke", &RNA_OperatorStrokeElement, "Stroke", "");
 
 	RNA_def_enum(ot->srna, "mode", stroke_mode_items, BRUSH_STROKE_NORMAL, 
 	             "Sculpt Stroke Mode",
@@ -4696,28 +4696,23 @@
 	return OPERATOR_FINISHED;
 }
 
-static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op,
-                                                 wmEvent *UNUSED(event))
+static int sculpt_dynamic_topology_toggle_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(event))
 {
 	Object *ob = CTX_data_active_object(C);
 	Mesh *me = ob->data;
 	SculptSession *ss = ob->sculpt;
-	const char *msg = "Dynamic-topology sculpting will not preserve"
-	                  "vertex colors, UVs, or other customdata";
+	const char *msg = TIP_("Dynamic-topology sculpting will not preserve vertex colors, UVs, or other customdata");
 
 	if (!ss->bm) {
 		int i;
 
 		for (i = 0; i < CD_NUMTYPES; i++) {
-			if (!ELEM7(i, CD_MVERT, CD_MEDGE, CD_MFACE,
-			           CD_MLOOP, CD_MPOLY, CD_PAINT_MASK,
-			           CD_ORIGINDEX) &&
+			if (!ELEM7(i, CD_MVERT, CD_MEDGE, CD_MFACE, CD_MLOOP, CD_MPOLY, CD_PAINT_MASK, CD_ORIGINDEX) &&
 			    (CustomData_has_layer(&me->vdata, i) ||
 			     CustomData_has_layer(&me->edata, i) ||
 			     CustomData_has_layer(&me->fdata, i)))
 			{
-				/* The mesh has customdata that will be lost, let the
-				 * user confirm this is OK */
+				/* The mesh has customdata that will be lost, let the user confirm this is OK */
 				return WM_operator_confirm_message(C, op, msg);
 			}
 		}

Modified: trunk/blender/source/blender/editors/space_node/drawnode.c
===================================================================
--- trunk/blender/source/blender/editors/space_node/drawnode.c	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/editors/space_node/drawnode.c	2013-03-11 09:06:49 UTC (rev 55186)
@@ -1296,11 +1296,11 @@
 	uiItemR(row, ptr, "scale", 0, "", ICON_NONE);
 	
 	row = uiLayoutRow(layout, TRUE);
-	uiItemR(row, ptr, "use_min", 0, "Min", ICON_NONE);
+	uiItemR(row, ptr, "use_min", 0, IFACE_("Min"), ICON_NONE);
 	uiItemR(row, ptr, "min", 0, "", ICON_NONE);
 	
 	row = uiLayoutRow(layout, TRUE);
-	uiItemR(row, ptr, "use_max", 0, "Max", ICON_NONE);
+	uiItemR(row, ptr, "use_max", 0, IFACE_("Max"), ICON_NONE);
 	uiItemR(row, ptr, "max", 0, "", ICON_NONE);
 }
 

Modified: trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_draw.c	2013-03-11 06:56:51 UTC (rev 55185)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_draw.c	2013-03-11 09:06:49 UTC (rev 55186)
@@ -41,6 +41,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_deform.h"
 #include "BKE_depsgraph.h"
@@ -429,7 +431,8 @@
 					Object *ob = (Object *)tselem->id; // id = object
 					bActionGroup *grp = te->directdata;
 					
-					BLI_uniquename(&ob->pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name), sizeof(grp->name));
+					BLI_uniquename(&ob->pose->agroups, grp, "Group", '.', offsetof(bActionGroup, name),
+					               sizeof(grp->name));
 					WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob);
 				}
 				break;
@@ -462,17 +465,20 @@
 				uiBlockSetEmboss(block, UI_EMBOSSN);
 				bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_VIEW_OFF,
 				                   (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), (int)te->ys, UI_UNIT_X, UI_UNIT_Y,
-				                   &ptr, "hide", -1, 0, 0, -1, -1, "Restrict viewport visibility (Ctrl - Recursive)");
+				                   &ptr, "hide", -1, 0, 0, -1, -1,
+				                   TIP_("Restrict viewport visibility (Ctrl - Recursive)"));
 				uiButSetFunc(bt, restrictbutton_view_cb, scene, ob);
 				
 				bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_SELECT_OFF,
 				                   (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX), (int)te->ys, UI_UNIT_X, UI_UNIT_Y,
-				                   &ptr, "hide_select", -1, 0, 0, -1, -1, "Restrict viewport selection (Ctrl - Recursive)");
+				                   &ptr, "hide_select", -1, 0, 0, -1, -1,
+				                   TIP_("Restrict viewport selection (Ctrl - Recursive)"));
 				uiButSetFunc(bt, restrictbutton_sel_cb, scene, ob);
 				
 				bt = uiDefIconButR(block, ICONTOG, 0, ICON_RESTRICT_RENDER_OFF,
 				                   (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_RENDERX), (int)te->ys, UI_UNIT_X, UI_UNIT_Y,
-				                   &ptr, "hide_render", -1, 0, 0, -1, -1, "Restrict rendering (Ctrl - Recursive)");
+				                   &ptr, "hide_render", -1, 0, 0, -1, -1,
+				                   TIP_("Restrict rendering (Ctrl - Recursive)"));
 				uiButSetFunc(bt, restrictbutton_rend_cb, scene, ob);
 				
 				uiBlockSetEmboss(block, UI_EMBOSS);
@@ -487,19 +493,19 @@
 				restrict_bool = group_restrict_flag(gr, OB_RESTRICT_VIEW);
 				bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_VIEW_ON : ICON_RESTRICT_VIEW_OFF,
 				                  (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_VIEWX), (int)te->ys, UI_UNIT_X, UI_UNIT_Y,
-				                  NULL, 0, 0, 0, 0, "Restrict/Allow visibility in the 3D View");
+				                  NULL, 0, 0, 0, 0, TIP_("Restrict/Allow visibility in the 3D View"));
 				uiButSetFunc(bt, restrictbutton_gr_restrict_view, scene, gr);
 
 				restrict_bool = group_restrict_flag(gr, OB_RESTRICT_SELECT);
 				bt = uiDefIconBut(block, ICONTOG, 0, restrict_bool ? ICON_RESTRICT_SELECT_ON : ICON_RESTRICT_SELECT_OFF,
 				                  (int)(ar->v2d.cur.xmax - OL_TOG_RESTRICT_SELECTX), (int)te->ys, UI_UNIT_X, UI_UNIT_Y,
-				                  NULL, 0, 0, 0, 0, "Restrict/Allow selection in the 3D View");
+				                  NULL, 0, 0, 0, 0, TIP_("Restrict/Allow selection in the 3D View"));
 				uiButSetFunc(bt, restrictbutton_gr_restrict_select, scene, gr);
 
 				restrict_bool = group_restrict_flag(gr, OB_RESTRICT_RENDER);

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list