[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54817] trunk/blender: Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazz ?\195?\161n and S.

Bastien Montagne montagne29 at wanadoo.fr
Sun Feb 24 16:40:29 CET 2013


Revision: 54817
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54817
Author:   mont29
Date:     2013-02-24 15:40:28 +0000 (Sun, 24 Feb 2013)
Log Message:
-----------
Another bunch of UI translation fixes, thanks to Leon Cheung, Gabriel Gazz?\195?\161n and S. Lockal for spotting them!

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/source/blender/editors/animation/anim_channels_defines.c
    trunk/blender/source/blender/editors/animation/fmodifier_ui.c
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/curve/CMakeLists.txt
    trunk/blender/source/blender/editors/curve/SConscript
    trunk/blender/source/blender/editors/curve/editcurve.c
    trunk/blender/source/blender/editors/io/CMakeLists.txt
    trunk/blender/source/blender/editors/io/SConscript
    trunk/blender/source/blender/editors/object/object_constraint.c
    trunk/blender/source/blender/editors/object/object_relations.c
    trunk/blender/source/blender/editors/object/object_select.c
    trunk/blender/source/blender/editors/screen/area.c
    trunk/blender/source/blender/editors/space_buttons/buttons_texture.c
    trunk/blender/source/blender/editors/space_image/image_ops.c
    trunk/blender/source/blender/editors/space_info/info_ops.c
    trunk/blender/source/blender/editors/space_info/info_stats.c
    trunk/blender/source/blender/editors/space_nla/nla_buttons.c
    trunk/blender/source/blender/editors/space_nla/nla_edit.c
    trunk/blender/source/blender/editors/space_node/node_group.c
    trunk/blender/source/blender/editors/space_text/text_header.c
    trunk/blender/source/blender/editors/space_text/text_ops.c
    trunk/blender/source/blender/editors/space_view3d/view3d_header.c
    trunk/blender/source/blender/editors/transform/transform_ops.c
    trunk/blender/source/blender/editors/util/ed_util.c
    trunk/blender/source/blender/makesrna/intern/rna_particle.c

Modified: trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py
===================================================================
--- trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/release/scripts/modules/bl_i18n_utils/bl_extract_messages.py	2013-02-24 15:40:28 UTC (rev 54817)
@@ -776,6 +776,14 @@
     # Get strings from C source code.
     dump_src_messages(msgs, reports, settings)
 
+    # Get strings from addons' categories.
+    print("foo, bar", bpy.types.WindowManager.addon_filter[1]['items'](bpy.context.window_manager, bpy.context))
+    for uid, label, tip in bpy.types.WindowManager.addon_filter[1]['items'](bpy.context.window_manager, bpy.context):
+        print(uid, label, tip)
+        process_msg(msgs, settings.DEFAULT_CONTEXT, label, "Addons' categories", reports, None, settings)
+        if tip:
+            process_msg(msgs, settings.DEFAULT_CONTEXT, tip, "Addons' categories", reports, None, settings)
+
     # Get strings specific to translations' menu.
     for lng in settings.LANGUAGES:
         process_msg(msgs, settings.DEFAULT_CONTEXT, lng[1], "Languages’ labels from bl_i18n_utils/settings.py",

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2013-02-24 15:40:28 UTC (rev 54817)
@@ -1612,6 +1612,8 @@
     def draw(self, context):
         layout = self.layout
 
+        default_context = bpy.app.translations.contexts.default
+
         options = [
             "show_wire",
             "use_deform",
@@ -1631,7 +1633,8 @@
             opt_suffix = "bone."
 
         for opt in options:
-            props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name)
+            props = layout.operator("wm.context_collection_boolean_set", text=bone_props[opt].name,
+                                    text_ctxt=default_context)
             props.data_path_iter = data_path_iter
             props.data_path_item = opt_suffix + opt
             props.type = self.type

Modified: trunk/blender/source/blender/editors/animation/anim_channels_defines.c
===================================================================
--- trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/animation/anim_channels_defines.c	2013-02-24 15:40:28 UTC (rev 54817)
@@ -36,6 +36,8 @@
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 
+#include "BLF_translation.h"
+
 #include "DNA_anim_types.h"
 #include "DNA_armature_types.h"
 #include "DNA_camera_types.h"
@@ -3256,21 +3258,21 @@
 			icon = ICON_VISIBLE_IPO_OFF;
 			
 			if (ale->type == ANIMTYPE_FCURVE)
-				tooltip = "Channel is visible in Graph Editor for editing";
+				tooltip = TIP_("Channel is visible in Graph Editor for editing");
 			else
-				tooltip = "Channel(s) are visible in Graph Editor for editing";
+				tooltip = TIP_("Channel(s) are visible in Graph Editor for editing");
 			break;
 			
 		case ACHANNEL_SETTING_EXPAND: /* expanded triangle */
 			//icon = ((enabled)? ICON_TRIA_DOWN : ICON_TRIA_RIGHT);
 			icon = ICON_TRIA_RIGHT;
-			tooltip = "Make channels grouped under this channel visible";
+			tooltip = TIP_("Make channels grouped under this channel visible");
 			break;
 			
 		case ACHANNEL_SETTING_SOLO: /* NLA Tracks only */
 			//icon = ((enabled)? ICON_LAYER_ACTIVE : ICON_LAYER_USED);
 			icon = ICON_LAYER_USED;
-			tooltip = "NLA Track is the only one evaluated for the AnimData block it belongs to";
+			tooltip = TIP_("NLA Track is the only one evaluated for the AnimData block it belongs to");
 			break;
 		
 		/* --- */
@@ -3279,7 +3281,7 @@
 			// TODO: what about when there's no protect needed?
 			//icon = ((enabled)? ICON_LOCKED : ICON_UNLOCKED);
 			icon = ICON_UNLOCKED;
-			tooltip = "Editability of keyframes for this channel";
+			tooltip = TIP_("Editability of keyframes for this channel");
 			break;
 			
 		case ACHANNEL_SETTING_MUTE: /* muted speaker */
@@ -3287,9 +3289,9 @@
 			icon = ICON_MUTE_IPO_OFF;
 			
 			if (ale->type == ALE_FCURVE) 
-				tooltip = "Does F-Curve contribute to result";
+				tooltip = TIP_("Does F-Curve contribute to result");
 			else
-				tooltip = "Do channels contribute to result";
+				tooltip = TIP_("Do channels contribute to result");
 			break;
 			
 		default:

Modified: trunk/blender/source/blender/editors/animation/fmodifier_ui.c
===================================================================
--- trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/animation/fmodifier_ui.c	2013-02-24 15:40:28 UTC (rev 54817)
@@ -584,9 +584,9 @@
 		
 		/* name */
 		if (fmi)
-			uiItemL(sub, fmi->name, ICON_NONE);
+			uiItemL(sub, IFACE_(fmi->name), ICON_NONE);
 		else
-			uiItemL(sub, "<Unknown Modifier>", ICON_NONE);
+			uiItemL(sub, IFACE_("<Unknown Modifier>"), ICON_NONE);
 		
 		/* right-align ------------------------------------------- */
 		sub = uiLayoutRow(row, TRUE);

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2013-02-24 15:40:28 UTC (rev 54817)
@@ -52,6 +52,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_animsys.h"
 #include "BKE_action.h"
 #include "BKE_armature.h"
@@ -3916,7 +3918,7 @@
 static int armature_parent_set_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED(event))
 {
 	EditBone *actbone = CTX_data_active_bone(C);
-	uiPopupMenu *pup = uiPupMenuBegin(C, "Make Parent ", ICON_NONE);
+	uiPopupMenu *pup = uiPupMenuBegin(C, CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Make Parent"), ICON_NONE);
 	uiLayout *layout = uiPupMenuLayout(pup);
 	int allchildbones = 0;
 	

Modified: trunk/blender/source/blender/editors/curve/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/editors/curve/CMakeLists.txt	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/curve/CMakeLists.txt	2013-02-24 15:40:28 UTC (rev 54817)
@@ -20,6 +20,7 @@
 
 set(INC
 	../include
+	../../blenfont
 	../../blenkernel
 	../../blenlib
 	../../blenloader
@@ -42,4 +43,8 @@
 	curve_intern.h
 )
 
+if(WITH_INTERNATIONAL)
+	add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_editor_curve "${SRC}" "${INC}" "${INC_SYS}")

Modified: trunk/blender/source/blender/editors/curve/SConscript
===================================================================
--- trunk/blender/source/blender/editors/curve/SConscript	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/curve/SConscript	2013-02-24 15:40:28 UTC (rev 54817)
@@ -29,9 +29,14 @@
 
 sources = env.Glob('*.c')
 
+defs = []
+
 incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../bmesh ../../gpu ../../blenloader'
 incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
 
-env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), [], libtype=['core'], priority=[45] )
+if env['WITH_BF_INTERNATIONAL']:
+    defs.append('WITH_INTERNATIONAL')
+
+env.BlenderLib ( 'bf_editors_curve', sources, Split(incs), defs, libtype=['core'], priority=[45] )

Modified: trunk/blender/source/blender/editors/curve/editcurve.c
===================================================================
--- trunk/blender/source/blender/editors/curve/editcurve.c	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/curve/editcurve.c	2013-02-24 15:40:28 UTC (rev 54817)
@@ -53,6 +53,8 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 
+#include "BLF_translation.h"
+
 #include "BKE_context.h"
 #include "BKE_curve.h"
 #include "BKE_depsgraph.h"
@@ -4925,7 +4927,7 @@
 		for (nu = editnurb->first; nu; nu = nu->next) {
 			if (nu->pntsu > 1 || nu->pntsv > 1) {
 				if (nu->type == CU_NURBS) {
-					pup = uiPupMenuBegin(C, "Direction", ICON_NONE);
+					pup = uiPupMenuBegin(C, IFACE_("Direction"), ICON_NONE);
 					layout = uiPupMenuLayout(pup);
 					uiItemsEnumO(layout, op->type->idname, "direction");
 					uiPupMenuEnd(C, pup);
@@ -6051,14 +6053,14 @@
 	uiLayout *layout;
 
 	if (obedit->type == OB_SURF) {
-		pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+		pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
 		layout = uiPupMenuLayout(pup);
 		uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 0);
 		uiItemEnumO_ptr(layout, op->type, NULL, 0, "type", 2);
 		uiPupMenuEnd(C, pup);
 	}
 	else {
-		pup = uiPupMenuBegin(C, "Delete", ICON_NONE);
+		pup = uiPupMenuBegin(C, IFACE_("Delete"), ICON_NONE);
 		layout = uiPupMenuLayout(pup);
 		uiItemsEnumO(layout, op->type->idname, "type");
 		uiPupMenuEnd(C, pup);

Modified: trunk/blender/source/blender/editors/io/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/editors/io/CMakeLists.txt	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/io/CMakeLists.txt	2013-02-24 15:40:28 UTC (rev 54817)
@@ -47,4 +47,8 @@
 	add_definitions(-DWITH_COLLADA)
 endif()
 
+if(WITH_INTERNATIONAL)
+	add_definitions(-DWITH_INTERNATIONAL)
+endif()
+
 blender_add_lib(bf_editor_io "${SRC}" "${INC}" "${INC_SYS}")

Modified: trunk/blender/source/blender/editors/io/SConscript
===================================================================
--- trunk/blender/source/blender/editors/io/SConscript	2013-02-24 14:42:21 UTC (rev 54816)
+++ trunk/blender/source/blender/editors/io/SConscript	2013-02-24 15:40:28 UTC (rev 54817)
@@ -36,4 +36,7 @@
 if env['WITH_BF_COLLADA']:
     defs += ['WITH_COLLADA']
 
+if env['WITH_BF_INTERNATIONAL']:
+    defs += ['WITH_INTERNATIONAL']
+
 env.BlenderLib ( 'bf_editor_io', sources, Split(incs), defines=defs, libtype=['core','player'], priority=[330,210] )


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list