finish handle for properties_XXX scripts
authorXiao Xiangquan <xiaoxiangquan@gmail.com>
Tue, 2 Aug 2011 16:51:50 +0000 (16:51 +0000)
committerXiao Xiangquan <xiaoxiangquan@gmail.com>
Tue, 2 Aug 2011 16:51:50 +0000 (16:51 +0000)
27 files changed:
po/POTFILES.in
release/scripts/startup/bl_ui/properties_animviz.py
release/scripts/startup/bl_ui/properties_data_armature.py
release/scripts/startup/bl_ui/properties_data_bone.py
release/scripts/startup/bl_ui/properties_data_camera.py
release/scripts/startup/bl_ui/properties_data_curve.py
release/scripts/startup/bl_ui/properties_data_empty.py
release/scripts/startup/bl_ui/properties_data_lamp.py
release/scripts/startup/bl_ui/properties_data_lattice.py
release/scripts/startup/bl_ui/properties_data_mesh.py
release/scripts/startup/bl_ui/properties_data_metaball.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/properties_game.py
release/scripts/startup/bl_ui/properties_material.py
release/scripts/startup/bl_ui/properties_object.py
release/scripts/startup/bl_ui/properties_object_constraint.py
release/scripts/startup/bl_ui/properties_particle.py
release/scripts/startup/bl_ui/properties_physics_cloth.py
release/scripts/startup/bl_ui/properties_physics_common.py
release/scripts/startup/bl_ui/properties_physics_field.py
release/scripts/startup/bl_ui/properties_physics_fluid.py
release/scripts/startup/bl_ui/properties_physics_smoke.py
release/scripts/startup/bl_ui/properties_physics_softbody.py
release/scripts/startup/bl_ui/properties_render.py
release/scripts/startup/bl_ui/properties_scene.py
release/scripts/startup/bl_ui/properties_texture.py
source/blender/blenfont/BLF_api.h

index b45e7b21a87eb2ce8e6260c4e5aaeff7b9e0b3cd..78930165ec8635b49f6e1caed87f2562751b88db 100755 (executable)
@@ -8,7 +8,30 @@ release/scripts/startup/bl_operators/screen_play_rendered_anim.py
 release/scripts/startup/bl_operators/sequencer.py
 release/scripts/startup/bl_operators/wm.py
 
+release/scripts/startup/bl_ui/properties_animviz.py
+release/scripts/startup/bl_ui/properties_data_armature.py
+release/scripts/startup/bl_ui/properties_data_bone.py
+release/scripts/startup/bl_ui/properties_data_camera.py
+release/scripts/startup/bl_ui/properties_data_curve.py
+release/scripts/startup/bl_ui/properties_data_empty.py
+release/scripts/startup/bl_ui/properties_data_lamp.py
+release/scripts/startup/bl_ui/properties_data_lattice.py
+release/scripts/startup/bl_ui/properties_data_mesh.py
+release/scripts/startup/bl_ui/properties_data_metaball.py
+release/scripts/startup/bl_ui/properties_data_modifier.py
+release/scripts/startup/bl_ui/properties_game.py
+release/scripts/startup/bl_ui/properties_material.py
+release/scripts/startup/bl_ui/properties_object_constraint.py
+release/scripts/startup/bl_ui/properties_object.py
+release/scripts/startup/bl_ui/properties_particle.py
+release/scripts/startup/bl_ui/properties_physics_cloth.py
+release/scripts/startup/bl_ui/properties_physics_common.py
+release/scripts/startup/bl_ui/properties_physics_field.py
+release/scripts/startup/bl_ui/properties_physics_fluid.py
+release/scripts/startup/bl_ui/properties_physics_smoke.py
+release/scripts/startup/bl_ui/properties_physics_softbody.py
 release/scripts/startup/bl_ui/properties_render.py
+release/scripts/startup/bl_ui/properties_scene.py
 release/scripts/startup/bl_ui/properties_texture.py
 release/scripts/startup/bl_ui/properties_world.py
 
index 3b33a7ccc6100444603a03b401f7b7c80dc5297f..6c5125b8e23de2730b56f14630a65aac2cec2645 100644 (file)
 # NOTE:
 # The specialised panel types are derived in their respective UI modules
 # dont register these classes since they are only helpers.
-
+from blf import gettext as _
 
 class MotionPathButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_label = "Motion Paths"
+    bl_label = _("Motion Paths")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_settings(self, context, avs, bones=False):
@@ -43,30 +43,30 @@ class MotionPathButtonsPanel():
         col = split.column()
         sub = col.column(align=True)
         if (mps.type == 'CURRENT_FRAME'):
-            sub.prop(mps, "frame_before", text="Before")
-            sub.prop(mps, "frame_after", text="After")
+            sub.prop(mps, "frame_before", text=_("Before"))
+            sub.prop(mps, "frame_after", text=_("After"))
         elif (mps.type == 'RANGE'):
-            sub.prop(mps, "frame_start", text="Start")
-            sub.prop(mps, "frame_end", text="End")
+            sub.prop(mps, "frame_start", text=_("Start"))
+            sub.prop(mps, "frame_end", text=_("End"))
 
-        sub.prop(mps, "frame_step", text="Step")
+        sub.prop(mps, "frame_step", text=_("Step"))
         if bones:
             col.row().prop(mps, "bake_location", expand=True)
 
         col = split.column()
-        col.label(text="Display:")
-        col.prop(mps, "show_frame_numbers", text="Frame Numbers")
-        col.prop(mps, "show_keyframe_highlight", text="Keyframes")
+        col.label(text=_("Display:"))
+        col.prop(mps, "show_frame_numbers", text=_("Frame Numbers"))
+        col.prop(mps, "show_keyframe_highlight", text=_("Keyframes"))
         if bones:
-            col.prop(mps, "show_keyframe_action_all", text="+ Non-Grouped Keyframes")
-        col.prop(mps, "show_keyframe_numbers", text="Keyframe Numbers")
+            col.prop(mps, "show_keyframe_action_all", text=_("+ Non-Grouped Keyframes"))
+        col.prop(mps, "show_keyframe_numbers", text=_("Keyframe Numbers"))
 
 
 # FIXME: this panel still needs to be ported so that it will work correctly with animviz
 class OnionSkinButtonsPanel():
     bl_space_type = 'PROPERTIES'
     bl_region_type = 'WINDOW'
-    bl_label = "Onion Skinning"
+    bl_label = _("Onion Skinning")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
@@ -82,16 +82,16 @@ class OnionSkinButtonsPanel():
 
         sub = col.column(align=True)
         if arm.ghost_type == 'RANGE':
-            sub.prop(arm, "ghost_frame_start", text="Start")
-            sub.prop(arm, "ghost_frame_end", text="End")
-            sub.prop(arm, "ghost_size", text="Step")
+            sub.prop(arm, "ghost_frame_start", text=_("Start"))
+            sub.prop(arm, "ghost_frame_end", text=_("End"))
+            sub.prop(arm, "ghost_size", text=_("Step"))
         elif arm.ghost_type == 'CURRENT_FRAME':
-            sub.prop(arm, "ghost_step", text="Range")
-            sub.prop(arm, "ghost_size", text="Step")
+            sub.prop(arm, "ghost_step", text=_("Range"))
+            sub.prop(arm, "ghost_size", text=_("Step"))
 
         col = split.column()
-        col.label(text="Display:")
-        col.prop(arm, "show_only_ghost_selected", text="Selected Only")
+        col.label(text=_("Display:"))
+        col.prop(arm, "show_only_ghost_selected", text=_("Selected Only"))
 
 if __name__ == "__main__":  # only for live edit.
     import bpy
index f2a3bac237359912d1b426dc383c90fd387b858e..8e5c3971b2317ce3319decf2830f76270b1314d3 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class ArmatureButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -49,7 +49,7 @@ class DATA_PT_context_arm(ArmatureButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "Skeleton"
+    bl_label = _("Skeleton")
 
     def draw(self, context):
         layout = self.layout
@@ -59,20 +59,20 @@ class DATA_PT_skeleton(ArmatureButtonsPanel, bpy.types.Panel):
         layout.prop(arm, "pose_position", expand=True)
 
         col = layout.column()
-        col.label(text="Layers:")
+        col.label(text=_("Layers:"))
         col.prop(arm, "layers", text="")
-        col.label(text="Protected Layers:")
+        col.label(text=_("Protected Layers:"))
         col.prop(arm, "layers_protected", text="")
 
         layout.label(text="Deform:")
         flow = layout.column_flow()
-        flow.prop(arm, "use_deform_vertex_groups", text="Vertex Groups")
-        flow.prop(arm, "use_deform_envelopes", text="Envelopes")
-        flow.prop(arm, "use_deform_preserve_volume", text="Quaternion")
+        flow.prop(arm, "use_deform_vertex_groups", text=_("Vertex Groups"))
+        flow.prop(arm, "use_deform_envelopes", text=_("Envelopes"))
+        flow.prop(arm, "use_deform_preserve_volume", text=_("Quaternion"))
 
 
 class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
 
     def draw(self, context):
         layout = self.layout
@@ -85,19 +85,19 @@ class DATA_PT_display(ArmatureButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(arm, "show_names", text="Names")
-        col.prop(arm, "show_axes", text="Axes")
-        col.prop(arm, "show_bone_custom_shapes", text="Shapes")
+        col.prop(arm, "show_names", text=_("Names"))
+        col.prop(arm, "show_axes", text=_("Axes"))
+        col.prop(arm, "show_bone_custom_shapes", text=_("Shapes"))
 
         col = split.column()
-        col.prop(arm, "show_group_colors", text="Colors")
+        col.prop(arm, "show_group_colors", text=_("Colors"))
         if ob:
-            col.prop(ob, "show_x_ray", text="X-Ray")
-        col.prop(arm, "use_deform_delay", text="Delay Refresh")
+            col.prop(ob, "show_x_ray", text=_("X-Ray"))
+        col.prop(arm, "use_deform_delay", text=_("Delay Refresh"))
 
 
 class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "Bone Groups"
+    bl_label = _("Bone Groups")
 
     @classmethod
     def poll(cls, context):
@@ -139,16 +139,16 @@ class DATA_PT_bone_groups(ArmatureButtonsPanel, bpy.types.Panel):
         row.active = (ob.proxy is None)
 
         sub = row.row(align=True)
-        sub.operator("pose.group_assign", text="Assign")
-        sub.operator("pose.group_unassign", text="Remove")  # row.operator("pose.bone_group_remove_from", text="Remove")
+        sub.operator("pose.group_assign", text=_("Assign"))
+        sub.operator("pose.group_unassign", text=_("Remove"))  # row.operator("pose.bone_group_remove_from", text=_("Remove"))
 
         sub = row.row(align=True)
-        sub.operator("pose.group_select", text="Select")
-        sub.operator("pose.group_deselect", text="Deselect")
+        sub.operator("pose.group_select", text=_("Select"))
+        sub.operator("pose.group_deselect", text=_("Deselect"))
 
 
 class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "Pose Library"
+    bl_label = _("Pose Library")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -187,7 +187,7 @@ class DATA_PT_pose_library(ArmatureButtonsPanel, bpy.types.Panel):
 
 # TODO: this panel will soon be depreceated too
 class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "Ghost"
+    bl_label = _("Ghost")
 
     def draw(self, context):
         layout = self.layout
@@ -201,20 +201,20 @@ class DATA_PT_ghost(ArmatureButtonsPanel, bpy.types.Panel):
         col = split.column(align=True)
 
         if arm.ghost_type == 'RANGE':
-            col.prop(arm, "ghost_frame_start", text="Start")
-            col.prop(arm, "ghost_frame_end", text="End")
-            col.prop(arm, "ghost_size", text="Step")
+            col.prop(arm, "ghost_frame_start", text=_("Start"))
+            col.prop(arm, "ghost_frame_end", text=_("End"))
+            col.prop(arm, "ghost_size", text=_("Step"))
         elif arm.ghost_type == 'CURRENT_FRAME':
-            col.prop(arm, "ghost_step", text="Range")
-            col.prop(arm, "ghost_size", text="Step")
+            col.prop(arm, "ghost_step", text=_("Range"))
+            col.prop(arm, "ghost_size", text=_("Step"))
 
         col = split.column()
-        col.label(text="Display:")
-        col.prop(arm, "show_only_ghost_selected", text="Selected Only")
+        col.label(text=_("Display:"))
+        col.prop(arm, "show_only_ghost_selected", text=_("Selected Only"))
 
 
 class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
-    bl_label = "iTaSC parameters"
+    bl_label = _("iTaSC parameters")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -234,7 +234,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
             layout.prop(itasc, "mode", expand=True)
             simulation = (itasc.mode == 'SIMULATION')
             if simulation:
-                layout.label(text="Reiteration:")
+                layout.label(text=_("Reiteration:"))
                 layout.prop(itasc, "reiteration_method", expand=True)
 
             row = layout.row()
@@ -246,8 +246,8 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
                 layout.prop(itasc, "use_auto_step")
                 row = layout.row()
                 if itasc.use_auto_step:
-                    row.prop(itasc, "step_min", text="Min")
-                    row.prop(itasc, "step_max", text="Max")
+                    row.prop(itasc, "step_min", text=_("Min"))
+                    row.prop(itasc, "step_max", text=_("Max"))
                 else:
                     row.prop(itasc, "step_count")
 
@@ -257,7 +257,7 @@ class DATA_PT_iksolver_itasc(ArmatureButtonsPanel, bpy.types.Panel):
                 layout.prop(itasc, "velocity_max")
             if itasc.solver == 'DLS':
                 row = layout.row()
-                row.prop(itasc, "damping_max", text="Damp", slider=True)
+                row.prop(itasc, "damping_max", text=_("Damp"), slider=True)
                 row.prop(itasc, "damping_epsilon", text="Eps", slider=True)
 
 from bl_ui.properties_animviz import (
@@ -285,8 +285,8 @@ class DATA_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
         layout.separator()
 
         split = layout.split()
-        split.operator("pose.paths_calculate", text="Calculate Paths")
-        split.operator("pose.paths_clear", text="Clear Paths")
+        split.operator("pose.paths_calculate", text=_("Calculate Paths"))
+        split.operator("pose.paths_clear", text=_("Clear Paths"))
 
 
 class DATA_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): # inherit from panel when ready
index 9fc055e934367a393e3b429df055a3aedcf919cd..eccd820ed3526b3889bd78dde988b2e6c9befc0a 100644 (file)
@@ -20,7 +20,7 @@
 
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class BoneButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -49,7 +49,7 @@ class BONE_PT_context_bone(BoneButtonsPanel, bpy.types.Panel):
 
 
 class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Transform"
+    bl_label = _("Transform")
 
     @classmethod
     def poll(cls, context):
@@ -75,14 +75,14 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
 
             col = row.column()
             if pchan.rotation_mode == 'QUATERNION':
-                col.prop(pchan, "rotation_quaternion", text="Rotation")
+                col.prop(pchan, "rotation_quaternion", text=_("Rotation"))
             elif pchan.rotation_mode == 'AXIS_ANGLE':
-                #col.label(text="Rotation")
-                #col.prop(pchan, "rotation_angle", text="Angle")
-                #col.prop(pchan, "rotation_axis", text="Axis")
-                col.prop(pchan, "rotation_axis_angle", text="Rotation")
+                #col.label(text=_("Rotation"))
+                #col.prop(pchan, "rotation_angle", text=_("Angle"))
+                #col.prop(pchan, "rotation_axis", text=_("Axis"))
+                col.prop(pchan, "rotation_axis_angle", text=_("Rotation"))
             else:
-                col.prop(pchan, "rotation_euler", text="Rotation")
+                col.prop(pchan, "rotation_euler", text=_("Rotation"))
 
             row.column().prop(pchan, "scale")
 
@@ -96,14 +96,14 @@ class BONE_PT_transform(BoneButtonsPanel, bpy.types.Panel):
 
             col = row.column()
             sub = col.column(align=True)
-            sub.label(text="Roll:")
+            sub.label(text=_("Roll:"))
             sub.prop(bone, "roll", text="")
             sub.label()
             sub.prop(bone, "lock")
 
 
 class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Transform Locks"
+    bl_label = _("Transform Locks")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -125,18 +125,18 @@ class BONE_PT_transform_locks(BoneButtonsPanel, bpy.types.Panel):
 
         col = row.column()
         if pchan.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
-            col.prop(pchan, "lock_rotations_4d", text="Lock Rotation")
+            col.prop(pchan, "lock_rotations_4d", text=_("Lock Rotation"))
             if pchan.lock_rotations_4d:
                 col.prop(pchan, "lock_rotation_w", text="W")
             col.prop(pchan, "lock_rotation", text="")
         else:
-            col.prop(pchan, "lock_rotation", text="Rotation")
+            col.prop(pchan, "lock_rotation", text=_("Rotation"))
 
         row.column().prop(pchan, "lock_scale")
 
 
 class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Relations"
+    bl_label = _("Relations")
 
     def draw(self, context):
         layout = self.layout
@@ -154,17 +154,17 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Layers:")
+        col.label(text=_("Layers:"))
         col.prop(bone, "layers", text="")
 
         col.separator()
 
         if ob and pchan:
-            col.label(text="Bone Group:")
+            col.label(text=_("Bone Group:"))
             col.prop_search(pchan, "bone_group", ob.pose, "bone_groups", text="")
 
         col = split.column()
-        col.label(text="Parent:")
+        col.label(text=_("Parent:"))
         if context.bone:
             col.prop(bone, "parent", text="")
         else:
@@ -173,15 +173,15 @@ class BONE_PT_relations(BoneButtonsPanel, bpy.types.Panel):
         sub = col.column()
         sub.active = (bone.parent is not None)
         sub.prop(bone, "use_connect")
-        sub.prop(bone, "use_inherit_rotation", text="Inherit Rotation")
-        sub.prop(bone, "use_inherit_scale", text="Inherit Scale")
+        sub.prop(bone, "use_inherit_rotation", text=_("Inherit Rotation"))
+        sub.prop(bone, "use_inherit_scale", text=_("Inherit Scale"))
         sub = col.column()
         sub.active = (not bone.parent or not bone.use_connect)
-        sub.prop(bone, "use_local_location", text="Local Location")
+        sub.prop(bone, "use_local_location", text=_("Local Location"))
 
 
 class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
 
     @classmethod
     def poll(cls, context):
@@ -205,20 +205,20 @@ class BONE_PT_display(BoneButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.prop(bone, "show_wire", text="Wireframe")
-            col.prop(bone, "hide", text="Hide")
+            col.prop(bone, "show_wire", text=_("Wireframe"))
+            col.prop(bone, "hide", text=_("Hide"))
 
             if pchan:
                 col = split.column()
 
-                col.label(text="Custom Shape:")
+                col.label(text=_("Custom Shape:"))
                 col.prop(pchan, "custom_shape", text="")
                 if pchan.custom_shape:
-                    col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text="At")
+                    col.prop_search(pchan, "custom_shape_transform", ob.pose, "bones", text=_("At"))
 
 
 class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Inverse Kinematics"
+    bl_label = _("Inverse Kinematics")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -240,13 +240,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
         split.prop(pchan, "lock_ik_x", icon='LOCKED' if pchan.lock_ik_x else 'UNLOCKED', text="X")
         split.active = pchan.is_in_ik_chain
         row = split.row()
-        row.prop(pchan, "ik_stiffness_x", text="Stiffness", slider=True)
+        row.prop(pchan, "ik_stiffness_x", text=_("Stiffness"), slider=True)
         row.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
-        sub.prop(pchan, "use_ik_limit_x", text="Limit")
+        sub.prop(pchan, "use_ik_limit_x", text=_("Limit"))
         sub.active = pchan.lock_ik_x == False and pchan.is_in_ik_chain
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_x", text="")
@@ -257,13 +257,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
         split.prop(pchan, "lock_ik_y", icon='LOCKED' if pchan.lock_ik_y else 'UNLOCKED', text="Y")
         split.active = pchan.is_in_ik_chain
         row = split.row()
-        row.prop(pchan, "ik_stiffness_y", text="Stiffness", slider=True)
+        row.prop(pchan, "ik_stiffness_y", text=_("Stiffness"), slider=True)
         row.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
-        sub.prop(pchan, "use_ik_limit_y", text="Limit")
+        sub.prop(pchan, "use_ik_limit_y", text=_("Limit"))
         sub.active = pchan.lock_ik_y == False and pchan.is_in_ik_chain
 
         sub = split.row(align=True)
@@ -275,13 +275,13 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
         split.prop(pchan, "lock_ik_z", icon='LOCKED' if pchan.lock_ik_z else 'UNLOCKED', text="Z")
         split.active = pchan.is_in_ik_chain
         sub = split.row()
-        sub.prop(pchan, "ik_stiffness_z", text="Stiffness", slider=True)
+        sub.prop(pchan, "ik_stiffness_z", text=_("Stiffness"), slider=True)
         sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
         sub = split.row()
 
-        sub.prop(pchan, "use_ik_limit_z", text="Limit")
+        sub.prop(pchan, "use_ik_limit_z", text=_("Limit"))
         sub.active = pchan.lock_ik_z == False and pchan.is_in_ik_chain
         sub = split.row(align=True)
         sub.prop(pchan, "ik_min_z", text="")
@@ -289,7 +289,7 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
         sub.active = pchan.lock_ik_z == False and pchan.use_ik_limit_z and pchan.is_in_ik_chain
 
         split = layout.split(percentage=0.25)
-        split.label(text="Stretch:")
+        split.label(text=_("Stretch:"))
         sub = split.row()
         sub.prop(pchan, "ik_stretch", text="", slider=True)
         sub.active = pchan.is_in_ik_chain
@@ -297,19 +297,19 @@ class BONE_PT_inverse_kinematics(BoneButtonsPanel, bpy.types.Panel):
         if ob.pose.ik_solver == 'ITASC':
             split = layout.split()
             col = split.column()
-            col.prop(pchan, "use_ik_rotation_control", text="Control Rotation")
+            col.prop(pchan, "use_ik_rotation_control", text=_("Control Rotation"))
             col.active = pchan.is_in_ik_chain
             col = split.column()
-            col.prop(pchan, "ik_rotation_weight", text="Weight", slider=True)
+            col.prop(pchan, "ik_rotation_weight", text=_("Weight"), slider=True)
             col.active = pchan.is_in_ik_chain
             # not supported yet
             #row = layout.row()
-            #row.prop(pchan, "use_ik_linear_control", text="Joint Size")
-            #row.prop(pchan, "ik_linear_weight", text="Weight", slider=True)
+            #row.prop(pchan, "use_ik_linear_control", text=_("Joint Size"))
+            #row.prop(pchan, "ik_linear_weight", text=_("Weight"), slider=True)
 
 
 class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
-    bl_label = "Deform"
+    bl_label = _("Deform")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw_header(self, context):
@@ -333,27 +333,27 @@ class BONE_PT_deform(BoneButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Envelope:")
+        col.label(text=_("Envelope:"))
 
         sub = col.column(align=True)
-        sub.prop(bone, "envelope_distance", text="Distance")
-        sub.prop(bone, "envelope_weight", text="Weight")
-        col.prop(bone, "use_envelope_multiply", text="Multiply")
+        sub.prop(bone, "envelope_distance", text=_("Distance"))
+        sub.prop(bone, "envelope_weight", text=_("Weight"))
+        col.prop(bone, "use_envelope_multiply", text=_("Multiply"))
 
         sub = col.column(align=True)
-        sub.label(text="Radius:")
-        sub.prop(bone, "head_radius", text="Head")
-        sub.prop(bone, "tail_radius", text="Tail")
+        sub.label(text=_("Radius:"))
+        sub.prop(bone, "head_radius", text=_("Head"))
+        sub.prop(bone, "tail_radius", text=_("Tail"))
 
         col = split.column()
-        col.label(text="Curved Bones:")
+        col.label(text=_("Curved Bones:"))
 
         sub = col.column(align=True)
-        sub.prop(bone, "bbone_segments", text="Segments")
-        sub.prop(bone, "bbone_in", text="Ease In")
-        sub.prop(bone, "bbone_out", text="Ease Out")
+        sub.prop(bone, "bbone_segments", text=_("Segments"))
+        sub.prop(bone, "bbone_in", text=_("Ease In"))
+        sub.prop(bone, "bbone_out", text=_("Ease Out"))
 
-        col.label(text="Offset:")
+        col.label(text=_("Offset:"))
         col.prop(bone, "use_cyclic_offset")
 
 
index 80cd5227fca8043d72182e0db9cbc151a5654e8c..b3f1f861b8168dbdc7c6e46354391e84ccb3f3eb 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class CameraButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -54,7 +54,7 @@ class DATA_PT_context_camera(CameraButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
-    bl_label = "Lens"
+    bl_label = _("Lens")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -90,16 +90,16 @@ class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Shift:")
+        col.label(text=_("Shift:"))
         col.prop(cam, "shift_x", text="X")
         col.prop(cam, "shift_y", text="Y")
 
         col = split.column(align=True)
-        col.label(text="Clipping:")
-        col.prop(cam, "clip_start", text="Start")
-        col.prop(cam, "clip_end", text="End")
+        col.label(text=_("Clipping:"))
+        col.prop(cam, "clip_start", text=_("Start"))
+        col.prop(cam, "clip_end", text=_("End"))
 
-        layout.label(text="Depth of Field:")
+        layout.label(text=_("Depth of Field:"))
 
         split = layout.split()
         split.prop(cam, "dof_object", text="")
@@ -108,11 +108,11 @@ class DATA_PT_camera(CameraButtonsPanel, bpy.types.Panel):
 
         if cam.dof_object != None:
             col.enabled = False
-        col.prop(cam, "dof_distance", text="Distance")
+        col.prop(cam, "dof_distance", text=_("Distance"))
 
 
 class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -123,19 +123,19 @@ class DATA_PT_camera_display(CameraButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(cam, "show_limits", text="Limits")
-        col.prop(cam, "show_mist", text="Mist")
-        col.prop(cam, "show_title_safe", text="Title Safe")
-        col.prop(cam, "show_name", text="Name")
+        col.prop(cam, "show_limits", text=_("Limits"))
+        col.prop(cam, "show_mist", text=_("Mist"))
+        col.prop(cam, "show_title_safe", text=_("Title Safe"))
+        col.prop(cam, "show_name", text=_("Name"))
         col.prop_menu_enum(cam, "show_guide")
 
         col = split.column()
-        col.prop(cam, "draw_size", text="Size")
+        col.prop(cam, "draw_size", text=_("Size"))
         col.separator()
-        col.prop(cam, "show_passepartout", text="Passepartout")
+        col.prop(cam, "show_passepartout", text=_("Passepartout"))
         sub = col.column()
         sub.active = cam.show_passepartout
-        sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
+        sub.prop(cam, "passepartout_alpha", text=_("Alpha"), slider=True)
 
 
 class DATA_PT_custom_props_camera(CameraButtonsPanel, PropertyPanel, bpy.types.Panel):
index 3c88127c72403e07b265dde6e25cd003364ab0b8..316ea16759768e25665d8c31dc4ff9aebbf4151c 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class CurveButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -66,7 +66,7 @@ class DATA_PT_context_curve(CurveButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Shape"
+    bl_label = _("Shape")
 
     def draw(self, context):
         layout = self.layout
@@ -84,17 +84,17 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Resolution:")
+        col.label(text=_("Resolution:"))
         sub = col.column(align=True)
-        sub.prop(curve, "resolution_u", text="Preview U")
-        sub.prop(curve, "render_resolution_u", text="Render U")
+        sub.prop(curve, "resolution_u", text=_("Preview U"))
+        sub.prop(curve, "render_resolution_u", text=_("Render U"))
         if is_curve:
-            col.label(text="Twisting:")
+            col.label(text=_("Twisting:"))
             col.prop(curve, "twist_mode", text="")
-            col.prop(curve, "twist_smooth", text="Smooth")
+            col.prop(curve, "twist_smooth", text=_("Smooth"))
         if is_text:
-            col.label(text="Display:")
-            col.prop(curve, "use_fast_edit", text="Fast Editing")
+            col.label(text=_("Display:"))
+            col.prop(curve, "use_fast_edit", text=_("Fast Editing"))
 
         col = split.column()
 
@@ -102,20 +102,20 @@ class DATA_PT_shape_curve(CurveButtonsPanel, bpy.types.Panel):
             sub = col.column()
             sub.label(text="")
             sub = col.column(align=True)
-            sub.prop(curve, "resolution_v", text="Preview V")
-            sub.prop(curve, "render_resolution_v", text="Render V")
+            sub.prop(curve, "resolution_v", text=_("Preview V"))
+            sub.prop(curve, "render_resolution_v", text=_("Render V"))
 
         if (is_curve or is_text):
-            col.label(text="Fill:")
+            col.label(text=_("Fill:"))
             sub = col.column()
             sub.active = (curve.bevel_object is None)
             sub.prop(curve, "use_fill_front")
             sub.prop(curve, "use_fill_back")
-            col.prop(curve, "use_fill_deform", text="Fill Deformed")
+            col.prop(curve, "use_fill_deform", text=_("Fill Deformed"))
 
 
 class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Texture Space"
+    bl_label = _("Texture Space")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -129,12 +129,12 @@ class DATA_PT_curve_texture_space(CurveButtonsPanel, bpy.types.Panel):
         row.prop(curve, "use_uv_as_generated")
 
         row = layout.row()
-        row.column().prop(curve, "texspace_location", text="Location")
-        row.column().prop(curve, "texspace_size", text="Size")
+        row.column().prop(curve, "texspace_location", text=_("Location"))
+        row.column().prop(curve, "texspace_size", text=_("Size"))
 
 
 class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Geometry"
+    bl_label = _("Geometry")
 
     @classmethod
     def poll(cls, context):
@@ -152,22 +152,22 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Modification:")
+        col.label(text=_("Modification:"))
         col.prop(curve, "offset")
         col.prop(curve, "extrude")
-        col.label(text="Taper Object:")
+        col.label(text=_("Taper Object:"))
         col.prop(curve, "taper_object", text="")
 
         col = split.column()
-        col.label(text="Bevel:")
-        col.prop(curve, "bevel_depth", text="Depth")
-        col.prop(curve, "bevel_resolution", text="Resolution")
-        col.label(text="Bevel Object:")
+        col.label(text=_("Bevel:"))
+        col.prop(curve, "bevel_depth", text=_("Depth"))
+        col.prop(curve, "bevel_resolution", text=_("Resolution"))
+        col.label(text=_("Bevel Object:"))
         col.prop(curve, "bevel_object", text="")
 
 
 class DATA_PT_pathanim(CurveButtonsPanelCurve, bpy.types.Panel):
-    bl_label = "Path Animation"
+    bl_label = _("Path Animation")
 
     def draw_header(self, context):
         curve = context.curve
@@ -182,7 +182,7 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, bpy.types.Panel):
         layout.active = curve.use_path
 
         col = layout.column()
-        layout.prop(curve, "path_duration", text="Frames")
+        layout.prop(curve, "path_duration", text=_("Frames"))
         layout.prop(curve, "eval_time")
 
         split = layout.split()
@@ -194,11 +194,11 @@ class DATA_PT_pathanim(CurveButtonsPanelCurve, bpy.types.Panel):
 
         col = split.column()
         col.prop(curve, "use_radius")
-        col.prop(curve, "use_time_offset", text="Offset Children")
+        col.prop(curve, "use_time_offset", text=_("Offset Children"))
 
 
 class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
-    bl_label = "Active Spline"
+    bl_label = _("Active Spline")
 
     def draw(self, context):
         layout = self.layout
@@ -215,20 +215,20 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
             # These settings are below but its easier to have
             # poly's set aside since they use so few settings
             col = split.column()
-            col.label(text="Cyclic:")
+            col.label(text=_("Cyclic:"))
             col.prop(act_spline, "use_smooth")
             col = split.column()
             col.prop(act_spline, "use_cyclic_u", text="U")
 
         else:
             col = split.column()
-            col.label(text="Cyclic:")
+            col.label(text=_("Cyclic:"))
             if act_spline.type == 'NURBS':
-                col.label(text="Bezier:")
-                col.label(text="Endpoint:")
-                col.label(text="Order:")
+                col.label(text=_("Bezier:"))
+                col.label(text=_("Endpoint:"))
+                col.label(text=_("Order:"))
 
-            col.label(text="Resolution:")
+            col.label(text=_("Resolution:"))
 
             col = split.column()
             col.prop(act_spline, "use_cyclic_u", text="U")
@@ -261,15 +261,15 @@ class DATA_PT_active_spline(CurveButtonsPanelActive, bpy.types.Panel):
                 col = split.column()
                 col.active = (curve.dimensions == '3D')
 
-                col.label(text="Interpolation:")
-                col.prop(act_spline, "tilt_interpolation", text="Tilt")
-                col.prop(act_spline, "radius_interpolation", text="Radius")
+                col.label(text=_("Interpolation:"))
+                col.prop(act_spline, "tilt_interpolation", text=_("Tilt"))
+                col.prop(act_spline, "radius_interpolation", text=_("Radius"))
 
             layout.prop(act_spline, "use_smooth")
 
 
 class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Font"
+    bl_label = _("Font")
 
     @classmethod
     def poll(cls, context):
@@ -282,16 +282,16 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
         char = context.curve.edit_format
 
         row = layout.split(percentage=0.25)
-        row.label(text="Regular")
+        row.label(text=_("Regular"))
         row.template_ID(text, "font", open="font.open", unlink="font.unlink")
         row = layout.split(percentage=0.25)
-        row.label(text="Bold")
+        row.label(text=_("Bold"))
         row.template_ID(text, "font_bold", open="font.open", unlink="font.unlink")
         row = layout.split(percentage=0.25)
-        row.label(text="Italic")
+        row.label(text=_("Italic"))
         row.template_ID(text, "font_italic", open="font.open", unlink="font.unlink")
         row = layout.split(percentage=0.25)
-        row.label(text="Bold & Italic")
+        row.label(text=_("Bold & Italic"))
         row.template_ID(text, "font_bold_italic", open="font.open", unlink="font.unlink")
 
         #layout.prop(text, "font")
@@ -299,41 +299,41 @@ class DATA_PT_font(CurveButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(text, "size", text="Size")
+        col.prop(text, "size", text=_("Size"))
         col = split.column()
         col.prop(text, "shear")
 
         split = layout.split()
 
         col = split.column()
-        col.label(text="Object Font:")
+        col.label(text=_("Object Font:"))
         col.prop(text, "family", text="")
 
         col = split.column()
-        col.label(text="Text on Curve:")
+        col.label(text=_("Text on Curve:"))
         col.prop(text, "follow_curve", text="")
 
         split = layout.split()
 
         col = split.column()
         colsub = col.column(align=True)
-        colsub.label(text="Underline:")
-        colsub.prop(text, "underline_position", text="Position")
-        colsub.prop(text, "underline_height", text="Thickness")
+        colsub.label(text=_("Underline:"))
+        colsub.prop(text, "underline_position", text=_("Position"))
+        colsub.prop(text, "underline_height", text=_("Thickness"))
 
         col = split.column()
-        col.label(text="Character:")
+        col.label(text=_("Character:"))
         col.prop(char, "use_bold")
         col.prop(char, "use_italic")
         col.prop(char, "use_underline")
 
         row = layout.row()
-        row.prop(text, "small_caps_scale", text="Small Caps")
+        row.prop(text, "small_caps_scale", text=_("Small Caps"))
         row.prop(char, "use_small_caps")
 
 
 class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Paragraph"
+    bl_label = _("Paragraph")
 
     @classmethod
     def poll(cls, context):
@@ -344,25 +344,25 @@ class DATA_PT_paragraph(CurveButtonsPanel, bpy.types.Panel):
 
         text = context.curve
 
-        layout.label(text="Align:")
+        layout.label(text=_("Align:"))
         layout.prop(text, "align", expand=True)
 
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Spacing:")
-        col.prop(text, "space_character", text="Character")
-        col.prop(text, "space_word", text="Word")
-        col.prop(text, "space_line", text="Line")
+        col.label(text=_("Spacing:"))
+        col.prop(text, "space_character", text=_("Character"))
+        col.prop(text, "space_word", text=_("Word"))
+        col.prop(text, "space_line", text=_("Line"))
 
         col = split.column(align=True)
-        col.label(text="Offset:")
+        col.label(text=_("Offset:"))
         col.prop(text, "offset_x", text="X")
         col.prop(text, "offset_y", text="Y")
 
 
 class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
-    bl_label = "Text Boxes"
+    bl_label = _("Text Boxes")
 
     @classmethod
     def poll(cls, context):
@@ -388,13 +388,13 @@ class DATA_PT_textboxes(CurveButtonsPanel, bpy.types.Panel):
 
             col = split.column(align=True)
 
-            col.label(text="Dimensions:")
-            col.prop(box, "width", text="Width")
-            col.prop(box, "height", text="Height")
+            col.label(text=_("Dimensions:"))
+            col.prop(box, "width", text=_("Width"))
+            col.prop(box, "height", text=_("Height"))
 
             col = split.column(align=True)
 
-            col.label(text="Offset:")
+            col.label(text=_("Offset:"))
             col.prop(box, "x", text="X")
             col.prop(box, "y", text="Y")
 
index 5a0d327f90d1064bd2da09b5dc73b9f8d11ed262..377f637e72ce4cd665216f5c0d0aec14e5385bb4 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -31,26 +31,26 @@ class DataButtonsPanel():
 
 
 class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Empty"
+    bl_label = _("Empty")
 
     def draw(self, context):
         layout = self.layout
 
         ob = context.object
 
-        layout.prop(ob, "empty_draw_type", text="Display")
+        layout.prop(ob, "empty_draw_type", text=_("Display"))
 
         if ob.empty_draw_type == 'IMAGE':
             # layout.template_image(ob, "data", None)
             layout.template_ID(ob, "data", open="image.open", unlink="image.unlink")
 
             row = layout.row(align=True)
-            row.prop(ob, "color", text="Transparency", index=3, slider=True)
+            row.prop(ob, "color", text=_("Transparency"), index=3, slider=True)
             row = layout.row(align=True)
-            row.prop(ob, "empty_image_offset", text="Offset X", index=0)
-            row.prop(ob, "empty_image_offset", text="Offset Y", index=1)
+            row.prop(ob, "empty_image_offset", text=_("Offset X"), index=0)
+            row.prop(ob, "empty_image_offset", text=_("Offset Y"), index=1)
 
-        layout.prop(ob, "empty_draw_size", text="Size")
+        layout.prop(ob, "empty_draw_size", text=_("Size"))
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index 36010c8b51100b82287e4cc2d4e8cf15f21efaf6..bf05acfbb37523ace35f1e29fd0d26e79041d964 100644 (file)
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class LAMP_MT_sunsky_presets(bpy.types.Menu):
-    bl_label = "Sun & Sky Presets"
+    bl_label = _("Sun & Sky Presets")
     preset_subdir = "sunsky"
     preset_operator = "script.execute_preset"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -66,7 +66,7 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Preview"
+    bl_label = _("Preview")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -74,7 +74,7 @@ class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Lamp"
+    bl_label = _("Lamp")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -92,15 +92,15 @@ class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
         sub.prop(lamp, "energy")
 
         if lamp.type in {'POINT', 'SPOT'}:
-            sub.label(text="Falloff:")
+            sub.label(text=_("Falloff:"))
             sub.prop(lamp, "falloff_type", text="")
             sub.prop(lamp, "distance")
 
             if lamp.falloff_type == 'LINEAR_QUADRATIC_WEIGHTED':
-                col.label(text="Attenuation Factors:")
+                col.label(text=_("Attenuation Factors:"))
                 sub = col.column(align=True)
-                sub.prop(lamp, "linear_attenuation", slider=True, text="Linear")
-                sub.prop(lamp, "quadratic_attenuation", slider=True, text="Quadratic")
+                sub.prop(lamp, "linear_attenuation", slider=True, text=_("Linear"))
+                sub.prop(lamp, "quadratic_attenuation", slider=True, text=_("Quadratic"))
 
             col.prop(lamp, "use_sphere")
 
@@ -110,13 +110,13 @@ class DATA_PT_lamp(DataButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         col.prop(lamp, "use_negative")
-        col.prop(lamp, "use_own_layer", text="This Layer Only")
+        col.prop(lamp, "use_own_layer", text=_("This Layer Only"))
         col.prop(lamp, "use_specular")
         col.prop(lamp, "use_diffuse")
 
 
 class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Sky & Atmosphere"
+    bl_label = _("Sky & Atmosphere")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -138,34 +138,34 @@ class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
 
         row = layout.row()
         row.active = lamp.use_sky or lamp.use_atmosphere
-        row.prop(lamp, "atmosphere_turbidity", text="Turbidity")
+        row.prop(lamp, "atmosphere_turbidity", text=_("Turbidity"))
 
         split = layout.split()
 
         col = split.column()
         col.active = lamp.use_sky
-        col.label(text="Blending:")
+        col.label(text=_("Blending:"))
         sub = col.column()
         sub.prop(lamp, "sky_blend_type", text="")
-        sub.prop(lamp, "sky_blend", text="Factor")
+        sub.prop(lamp, "sky_blend", text=_("Factor"))
 
-        col.label(text="Color Space:")
+        col.label(text=_("Color Space:"))
         sub = col.column()
         sub.row().prop(lamp, "sky_color_space", expand=True)
-        sub.prop(lamp, "sky_exposure", text="Exposure")
+        sub.prop(lamp, "sky_exposure", text=_("Exposure"))
 
         col = split.column()
         col.active = lamp.use_sky
-        col.label(text="Horizon:")
+        col.label(text=_("Horizon:"))
         sub = col.column()
-        sub.prop(lamp, "horizon_brightness", text="Brightness")
-        sub.prop(lamp, "spread", text="Spread")
+        sub.prop(lamp, "horizon_brightness", text=_("Brightness"))
+        sub.prop(lamp, "spread", text=_("Spread"))
 
-        col.label(text="Sun:")
+        col.label(text=_("Sun:"))
         sub = col.column()
-        sub.prop(lamp, "sun_brightness", text="Brightness")
-        sub.prop(lamp, "sun_size", text="Size")
-        sub.prop(lamp, "backscattered_light", slider=True, text="Back Light")
+        sub.prop(lamp, "sun_brightness", text=_("Brightness"))
+        sub.prop(lamp, "sun_size", text=_("Size"))
+        sub.prop(lamp, "backscattered_light", slider=True, text=_("Back Light"))
 
         layout.separator()
 
@@ -175,20 +175,20 @@ class DATA_PT_sunsky(DataButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         col.active = lamp.use_atmosphere
-        col.label(text="Intensity:")
-        col.prop(lamp, "sun_intensity", text="Sun")
-        col.prop(lamp, "atmosphere_distance_factor", text="Distance")
+        col.label(text=_("Intensity:"))
+        col.prop(lamp, "sun_intensity", text=_("Sun"))
+        col.prop(lamp, "atmosphere_distance_factor", text=_("Distance"))
 
         col = split.column()
         col.active = lamp.use_atmosphere
-        col.label(text="Scattering:")
+        col.label(text=_("Scattering:"))
         sub = col.column(align=True)
-        sub.prop(lamp, "atmosphere_inscattering", slider=True, text="Inscattering")
-        sub.prop(lamp, "atmosphere_extinction", slider=True, text="Extinction")
+        sub.prop(lamp, "atmosphere_inscattering", slider=True, text=_("Inscattering"))
+        sub.prop(lamp, "atmosphere_extinction", slider=True, text=_("Extinction"))
 
 
 class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Shadow"
+    bl_label = _("Shadow")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -208,15 +208,15 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.label(text="Form factor sampling:")
+            col.label(text=_("Form factor sampling:"))
 
             sub = col.row(align=True)
 
             if lamp.shape == 'SQUARE':
-                sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+                sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples"))
             elif lamp.shape == 'RECTANGLE':
-                sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
-                sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
+                sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples X"))
+                sub.prop(lamp, "shadow_ray_samples_y", text=_("Samples Y"))
 
         if lamp.shadow_method != 'NOSHADOW':
             split = layout.split()
@@ -225,34 +225,34 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
             col.prop(lamp, "shadow_color", text="")
 
             col = split.column()
-            col.prop(lamp, "use_shadow_layer", text="This Layer Only")
+            col.prop(lamp, "use_shadow_layer", text=_("This Layer Only"))
             col.prop(lamp, "use_only_shadow")
 
         if lamp.shadow_method == 'RAY_SHADOW':
             split = layout.split()
 
             col = split.column()
-            col.label(text="Sampling:")
+            col.label(text=_("Sampling:"))
 
             if lamp.type in {'POINT', 'SUN', 'SPOT'}:
                 sub = col.row()
 
-                sub.prop(lamp, "shadow_ray_samples", text="Samples")
-                sub.prop(lamp, "shadow_soft_size", text="Soft Size")
+                sub.prop(lamp, "shadow_ray_samples", text=_("Samples"))
+                sub.prop(lamp, "shadow_soft_size", text=_("Soft Size"))
 
             elif lamp.type == 'AREA':
                 sub = col.row(align=True)
 
                 if lamp.shape == 'SQUARE':
-                    sub.prop(lamp, "shadow_ray_samples_x", text="Samples")
+                    sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples"))
                 elif lamp.shape == 'RECTANGLE':
-                    sub.prop(lamp, "shadow_ray_samples_x", text="Samples X")
-                    sub.prop(lamp, "shadow_ray_samples_y", text="Samples Y")
+                    sub.prop(lamp, "shadow_ray_samples_x", text=_("Samples X"))
+                    sub.prop(lamp, "shadow_ray_samples_y", text=_("Samples Y"))
 
             col.row().prop(lamp, "shadow_ray_sample_method", expand=True)
 
             if lamp.shadow_ray_sample_method == 'ADAPTIVE_QMC':
-                layout.prop(lamp, "shadow_adaptive_threshold", text="Threshold")
+                layout.prop(lamp, "shadow_adaptive_threshold", text=_("Threshold"))
 
             if lamp.type == 'AREA' and lamp.shadow_ray_sample_method == 'CONSTANT_JITTERED':
                 row = layout.row()
@@ -262,48 +262,48 @@ class DATA_PT_shadow(DataButtonsPanel, bpy.types.Panel):
 
         elif lamp.shadow_method == 'BUFFER_SHADOW':
             col = layout.column()
-            col.label(text="Buffer Type:")
+            col.label(text=_("Buffer Type:"))
             col.row().prop(lamp, "shadow_buffer_type", expand=True)
 
             if lamp.shadow_buffer_type in {'REGULAR', 'HALFWAY', 'DEEP'}:
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Filter Type:")
+                col.label(text=_("Filter Type:"))
                 col.prop(lamp, "shadow_filter_type", text="")
                 sub = col.column(align=True)
-                sub.prop(lamp, "shadow_buffer_soft", text="Soft")
-                sub.prop(lamp, "shadow_buffer_bias", text="Bias")
+                sub.prop(lamp, "shadow_buffer_soft", text=_("Soft"))
+                sub.prop(lamp, "shadow_buffer_bias", text=_("Bias"))
 
                 col = split.column()
-                col.label(text="Sample Buffers:")
+                col.label(text=_("Sample Buffers:"))
                 col.prop(lamp, "shadow_sample_buffers", text="")
                 sub = col.column(align=True)
-                sub.prop(lamp, "shadow_buffer_size", text="Size")
-                sub.prop(lamp, "shadow_buffer_samples", text="Samples")
+                sub.prop(lamp, "shadow_buffer_size", text=_("Size"))
+                sub.prop(lamp, "shadow_buffer_samples", text=_("Samples"))
                 if lamp.shadow_buffer_type == 'DEEP':
                     col.prop(lamp, "compression_threshold")
 
             elif lamp.shadow_buffer_type == 'IRREGULAR':
-                layout.prop(lamp, "shadow_buffer_bias", text="Bias")
+                layout.prop(lamp, "shadow_buffer_bias", text=_("Bias"))
 
             split = layout.split()
 
             col = split.column()
-            col.prop(lamp, "use_auto_clip_start", text="Autoclip Start")
+            col.prop(lamp, "use_auto_clip_start", text=_("Autoclip Start"))
             sub = col.column()
             sub.active = not lamp.use_auto_clip_start
-            sub.prop(lamp, "shadow_buffer_clip_start", text="Clip Start")
+            sub.prop(lamp, "shadow_buffer_clip_start", text=_("Clip Start"))
 
             col = split.column()
-            col.prop(lamp, "use_auto_clip_end", text="Autoclip End")
+            col.prop(lamp, "use_auto_clip_end", text=_("Autoclip End"))
             sub = col.column()
             sub.active = not lamp.use_auto_clip_end
-            sub.prop(lamp, "shadow_buffer_clip_end", text=" Clip End")
+            sub.prop(lamp, "shadow_buffer_clip_end", text=_(" Clip End"))
 
 
 class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Area Shape"
+    bl_label = _("Area Shape")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -324,12 +324,12 @@ class DATA_PT_area(DataButtonsPanel, bpy.types.Panel):
         if (lamp.shape == 'SQUARE'):
             sub.prop(lamp, "size")
         elif (lamp.shape == 'RECTANGLE'):
-            sub.prop(lamp, "size", text="Size X")
-            sub.prop(lamp, "size_y", text="Size Y")
+            sub.prop(lamp, "size", text=_("Size X"))
+            sub.prop(lamp, "size_y", text=_("Size Y"))
 
 
 class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Spot Shape"
+    bl_label = _("Spot Shape")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -347,8 +347,8 @@ class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         sub = col.column()
-        sub.prop(lamp, "spot_size", text="Size")
-        sub.prop(lamp, "spot_blend", text="Blend", slider=True)
+        sub.prop(lamp, "spot_size", text=_("Size"))
+        sub.prop(lamp, "spot_blend", text=_("Blend"), slider=True)
         col.prop(lamp, "use_square")
         col.prop(lamp, "show_cone")
 
@@ -357,13 +357,13 @@ class DATA_PT_spot(DataButtonsPanel, bpy.types.Panel):
         col.prop(lamp, "use_halo")
         sub = col.column(align=True)
         sub.active = lamp.use_halo
-        sub.prop(lamp, "halo_intensity", text="Intensity")
+        sub.prop(lamp, "halo_intensity", text=_("Intensity"))
         if lamp.shadow_method == 'BUFFER_SHADOW':
-            sub.prop(lamp, "halo_step", text="Step")
+            sub.prop(lamp, "halo_step", text=_("Step"))
 
 
 class DATA_PT_falloff_curve(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Falloff Curve"
+    bl_label = _("Falloff Curve")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
index cd719b6fe8488c12ee503b559ea654b6aff50361..98e0d1558ec5e2eb034872ca1af2b42946333101 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -52,7 +52,7 @@ class DATA_PT_context_lattice(DataButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_lattice(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Lattice"
+    bl_label = _("Lattice")
 
     def draw(self, context):
         layout = self.layout
index 618a88f08799523312ee25d18f1fa1abab840937..e646fd1c2f80b3f4f4fb0008f907d9ae2cb103b6 100644 (file)
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class MESH_MT_vertex_group_specials(bpy.types.Menu):
-    bl_label = "Vertex Group Specials"
+    bl_label = _("Vertex Group Specials")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -33,11 +33,11 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu):
         layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
         layout.operator("object.vertex_group_copy_to_selected", icon='LINK_AREA')
         layout.operator("object.vertex_group_mirror", icon='ARROW_LEFTRIGHT')
-        layout.operator("object.vertex_group_remove", icon='X', text="Delete All").all = True
+        layout.operator("object.vertex_group_remove", icon='X', text=_("Delete All")).all = True
 
 
 class MESH_MT_shape_key_specials(bpy.types.Menu):
-    bl_label = "Shape Key Specials"
+    bl_label = _("Shape Key Specials")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -46,7 +46,7 @@ class MESH_MT_shape_key_specials(bpy.types.Menu):
         layout.operator("object.shape_key_transfer", icon='COPY_ID')  # icon is not ideal
         layout.operator("object.join_shapes", icon='COPY_ID')  # icon is not ideal
         layout.operator("object.shape_key_mirror", icon='ARROW_LEFTRIGHT')
-        op = layout.operator("object.shape_key_add", icon='ZOOMIN', text="New Shape From Mix")
+        op = layout.operator("object.shape_key_add", icon='ZOOMIN', text=_("New Shape From Mix"))
         op.from_mix = True
 
 
@@ -80,7 +80,7 @@ class DATA_PT_context_mesh(MeshButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Normals"
+    bl_label = _("Normals")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -94,13 +94,13 @@ class DATA_PT_normals(MeshButtonsPanel, bpy.types.Panel):
         col.prop(mesh, "use_auto_smooth")
         sub = col.column()
         sub.active = mesh.use_auto_smooth
-        sub.prop(mesh, "auto_smooth_angle", text="Angle")
+        sub.prop(mesh, "auto_smooth_angle", text=_("Angle"))
 
         split.prop(mesh, "show_double_sided")
 
 
 class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Texture Space"
+    bl_label = _("Texture Space")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -115,12 +115,12 @@ class DATA_PT_texture_space(MeshButtonsPanel, bpy.types.Panel):
 
         layout.prop(mesh, "use_auto_texspace")
         row = layout.row()
-        row.column().prop(mesh, "texspace_location", text="Location")
-        row.column().prop(mesh, "texspace_size", text="Size")
+        row.column().prop(mesh, "texspace_location", text=_("Location"))
+        row.column().prop(mesh, "texspace_size", text=_("Size"))
 
 
 class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Vertex Groups"
+    bl_label = _("Vertex Groups")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -158,18 +158,18 @@ class DATA_PT_vertex_groups(MeshButtonsPanel, bpy.types.Panel):
             row = layout.row()
 
             sub = row.row(align=True)
-            sub.operator("object.vertex_group_assign", text="Assign")
-            sub.operator("object.vertex_group_remove_from", text="Remove")
+            sub.operator("object.vertex_group_assign", text=_("Assign"))
+            sub.operator("object.vertex_group_remove_from", text=_("Remove"))
 
             sub = row.row(align=True)
-            sub.operator("object.vertex_group_select", text="Select")
-            sub.operator("object.vertex_group_deselect", text="Deselect")
+            sub.operator("object.vertex_group_select", text=_("Select"))
+            sub.operator("object.vertex_group_deselect", text=_("Deselect"))
 
-            layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
+            layout.prop(context.tool_settings, "vertex_group_weight", text=_("Weight"))
 
 
 class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Shape Keys"
+    bl_label = _("Shape Keys")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -245,13 +245,13 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
 
                     col = split.column(align=True)
                     col.active = enable_edit_value
-                    col.label(text="Range:")
-                    col.prop(kb, "slider_min", text="Min")
-                    col.prop(kb, "slider_max", text="Max")
+                    col.label(text=_("Range:"))
+                    col.prop(kb, "slider_min", text=_("Min"))
+                    col.prop(kb, "slider_max", text=_("Max"))
 
                     col = split.column(align=True)
                     col.active = enable_edit_value
-                    col.label(text="Blend:")
+                    col.label(text=_("Blend:"))
                     col.prop_search(kb, "vertex_group", ob, "vertex_groups", text="")
                     col.prop_search(kb, "relative_key", key, "key_blocks", text="")
 
@@ -262,7 +262,7 @@ class DATA_PT_shape_keys(MeshButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_uv_texture(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "UV Texture"
+    bl_label = _("UV Texture")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -285,7 +285,7 @@ class DATA_PT_uv_texture(MeshButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Texture Face"
+    bl_label = _("Texture Face")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -303,7 +303,7 @@ class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel):
 
         if tf:
             if context.scene.render.engine != 'BLENDER_GAME':
-                col.label(text="Options only supported in Game Engine")
+                col.label(text=_("Options only supported in Game Engine"))
 
             split = layout.split()
             col = split.column()
@@ -328,11 +328,11 @@ class DATA_PT_texface(MeshButtonsPanel, bpy.types.Panel):
             col = layout.column()
             col.prop(tf, "blend_type")
         else:
-            col.label(text="No UV Texture")
+            col.label(text=_("No UV Texture"))
 
 
 class DATA_PT_vertex_colors(MeshButtonsPanel, bpy.types.Panel):
-    bl_label = "Vertex Colors"
+    bl_label = _("Vertex Colors")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
index 6dda99bc37f710db39dd4bc64d7138dbab129bc4..96b94d369b5ef5604628b3f23e0a555542ae4a55 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class DataButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -49,7 +49,7 @@ class DATA_PT_context_metaball(DataButtonsPanel, bpy.types.Panel):
 
 
 class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Metaball"
+    bl_label = _("Metaball")
 
     def draw(self, context):
         layout = self.layout
@@ -59,21 +59,21 @@ class DATA_PT_metaball(DataButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Resolution:")
+        col.label(text=_("Resolution:"))
         sub = col.column(align=True)
-        sub.prop(mball, "resolution", text="View")
-        sub.prop(mball, "render_resolution", text="Render")
+        sub.prop(mball, "resolution", text=_("View"))
+        sub.prop(mball, "render_resolution", text=_("Render"))
 
         col = split.column()
-        col.label(text="Settings:")
-        col.prop(mball, "threshold", text="Threshold")
+        col.label(text=_("Settings:"))
+        col.prop(mball, "threshold", text=_("Threshold"))
 
-        layout.label(text="Update:")
+        layout.label(text=_("Update:"))
         layout.prop(mball, "update_method", expand=True)
 
 
 class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Texture Space"
+    bl_label = _("Texture Space")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -85,12 +85,12 @@ class DATA_PT_mball_texture_space(DataButtonsPanel, bpy.types.Panel):
         layout.prop(mball, "use_auto_texspace")
 
         row = layout.row()
-        row.column().prop(mball, "texspace_location", text="Location")
-        row.column().prop(mball, "texspace_size", text="Size")
+        row.column().prop(mball, "texspace_location", text=_("Location"))
+        row.column().prop(mball, "texspace_size", text=_("Size"))
 
 
 class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
-    bl_label = "Active Element"
+    bl_label = _("Active Element")
 
     @classmethod
     def poll(cls, context):
@@ -106,25 +106,25 @@ class DATA_PT_metaball_element(DataButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Settings:")
-        col.prop(metaelem, "stiffness", text="Stiffness")
-        col.prop(metaelem, "use_negative", text="Negative")
-        col.prop(metaelem, "hide", text="Hide")
+        col.label(text=_("Settings:"))
+        col.prop(metaelem, "stiffness", text=_("Stiffness"))
+        col.prop(metaelem, "use_negative", text=_("Negative"))
+        col.prop(metaelem, "hide", text=_("Hide"))
 
         col = split.column(align=True)
 
         if metaelem.type in {'CUBE', 'ELLIPSOID'}:
-            col.label(text="Size:")
+            col.label(text=_("Size:"))
             col.prop(metaelem, "size_x", text="X")
             col.prop(metaelem, "size_y", text="Y")
             col.prop(metaelem, "size_z", text="Z")
 
         elif metaelem.type == 'TUBE':
-            col.label(text="Size:")
+            col.label(text=_("Size:"))
             col.prop(metaelem, "size_x", text="X")
 
         elif metaelem.type == 'PLANE':
-            col.label(text="Size:")
+            col.label(text=_("Size:"))
             col.prop(metaelem, "size_x", text="X")
             col.prop(metaelem, "size_y", text="Y")
 
index 0a4d0b605140fb0f84a97641d709bb7b5cb20dd4..18bf286872415cdb6b16932adfa4d0b4126499a5 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 class ModifierButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -27,7 +27,7 @@ class ModifierButtonsPanel():
 
 
 class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
-    bl_label = "Modifiers"
+    bl_label = _("Modifiers")
 
     def draw(self, context):
         layout = self.layout
@@ -50,14 +50,14 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Object:")
+        col.label(text=_("Object:"))
         col.prop(md, "object", text="")
         col.prop(md, "use_deform_preserve_volume")
 
         col = split.column()
-        col.label(text="Bind To:")
-        col.prop(md, "use_vertex_groups", text="Vertex Groups")
-        col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
+        col.label(text=_("Bind To:"))
+        col.prop(md, "use_vertex_groups", text=_("Vertex Groups"))
+        col.prop(md, "use_bone_envelopes", text=_("Bone Envelopes"))
 
         layout.separator()
 
@@ -91,11 +91,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         col.separator()
 
-        col.prop(md, "use_merge_vertices", text="Merge")
+        col.prop(md, "use_merge_vertices", text=_("Merge"))
         sub = col.column()
         sub.active = md.use_merge_vertices
-        sub.prop(md, "use_merge_vertices_cap", text="First Last")
-        sub.prop(md, "merge_threshold", text="Distance")
+        sub.prop(md, "use_merge_vertices_cap", text=_("First Last"))
+        sub.prop(md, "merge_threshold", text=_("Distance"))
 
         col = split.column()
         col.prop(md, "use_relative_offset")
@@ -121,7 +121,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split.prop(md, "width")
         split.prop(md, "use_only_vertices")
 
-        layout.label(text="Limit Method:")
+        layout.label(text=_("Limit Method:"))
         layout.row().prop(md, "limit_method", expand=True)
         if md.limit_method == 'ANGLE':
             layout.prop(md, "angle_limit")
@@ -132,11 +132,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Operation:")
+        col.label(text=_("Operation:"))
         col.prop(md, "operation", text="")
 
         col = split.column()
-        col.label(text="Object:")
+        col.label(text=_("Object:"))
         col.prop(md, "object", text="")
 
     def BUILD(self, layout, ob, md):
@@ -155,7 +155,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
     def CAST(self, layout, ob, md):
         split = layout.split(percentage=0.25)
 
-        split.label(text="Cast Type:")
+        split.label(text=_("Cast Type:"))
         split.prop(md, "cast_type", text="")
 
         split = layout.split(percentage=0.25)
@@ -174,52 +174,52 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         col = split.column()
-        col.label(text="Control Object:")
+        col.label(text=_("Control Object:"))
         col.prop(md, "object", text="")
         if md.object:
             col.prop(md, "use_transform")
 
     def CLOTH(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def COLLISION(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def CURVE(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Object:")
+        col.label(text=_("Object:"))
         col.prop(md, "object", text="")
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
-        layout.label(text="Deformation Axis:")
+        layout.label(text=_("Deformation Axis:"))
         layout.row().prop(md, "deform_axis", expand=True)
 
     def DECIMATE(self, layout, ob, md):
         layout.prop(md, "ratio")
-        layout.label(text="Face Count: %s" % str(md.face_count))
+        layout.label(text=_("Face Count")+": %s" % str(md.face_count))
 
     def DISPLACE(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Texture:")
+        col.label(text=_("Texture:"))
         col.template_ID(md, "texture", new="texture.new")
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         col = split.column()
-        col.label(text="Direction:")
+        col.label(text=_("Direction:"))
         col.prop(md, "direction", text="")
-        col.label(text="Texture Coordinates:")
+        col.label(text=_("Texture Coordinates:"))
         col.prop(md, "texture_coords", text="")
         if md.texture_coords == 'OBJECT':
-            layout.prop(md, "texture_coords_object", text="Object")
+            layout.prop(md, "texture_coords_object", text=_("Object"))
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
             layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
 
@@ -233,23 +233,23 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(md, "use_edge_angle", text="Edge Angle")
+        col.prop(md, "use_edge_angle", text=_("Edge Angle"))
         sub = col.column()
         sub.active = md.use_edge_angle
         sub.prop(md, "split_angle")
 
-        split.prop(md, "use_edge_sharp", text="Sharp Edges")
+        split.prop(md, "use_edge_sharp", text=_("Sharp Edges"))
 
     def EXPLODE(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Vertex group:")
+        col.label(text=_("Vertex group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         sub = col.column()
         sub.active = bool(md.vertex_group)
         sub.prop(md, "protect")
-        col.label(text="Particle UV")
+        col.label(text=_("Particle UV"))
         col.prop_search(md, "particle_uv", ob.data, "uv_textures", text="")
 
         col = split.column()
@@ -259,22 +259,22 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col.prop(md, "show_dead")
         col.prop(md, "use_size")
 
-        layout.operator("object.explode_refresh", text="Refresh")
+        layout.operator("object.explode_refresh", text=_("Refresh"))
 
     def FLUID_SIMULATION(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def HOOK(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Object:")
+        col.label(text=_("Object:"))
         col.prop(md, "object", text="")
         if md.object and md.object.type == 'ARMATURE':
-            col.label(text="Bone:")
+            col.label(text=_("Bone:"))
             col.prop_search(md, "subtarget", md.object.data, "bones", text="")
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         layout.separator()
@@ -286,38 +286,38 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col.prop(md, "force", slider=True)
 
         col = split.column()
-        col.operator("object.hook_reset", text="Reset")
-        col.operator("object.hook_recenter", text="Recenter")
+        col.operator("object.hook_reset", text=_("Reset"))
+        col.operator("object.hook_recenter", text=_("Recenter"))
 
         if ob.mode == 'EDIT':
             layout.separator()
             row = layout.row()
-            row.operator("object.hook_select", text="Select")
-            row.operator("object.hook_assign", text="Assign")
+            row.operator("object.hook_select", text=_("Select"))
+            row.operator("object.hook_assign", text=_("Assign"))
 
     def LATTICE(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Object:")
+        col.label(text=_("Object:"))
         col.prop(md, "object", text="")
 
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
     def MASK(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Mode:")
+        col.label(text=_("Mode:"))
         col.prop(md, "mode", text="")
         col = split.column()
         if md.mode == 'ARMATURE':
-            col.label(text="Armature:")
+            col.label(text=_("Armature:"))
             col.prop(md, "armature", text="")
         elif md.mode == 'VERTEX_GROUP':
-            col.label(text="Vertex Group:")
+            col.label(text=_("Vertex Group:"))
             col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         sub = col.column()
@@ -329,11 +329,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         sub = col.column()
-        sub.label(text="Object:")
+        sub.label(text=_("Object:"))
         sub.prop(md, "object", text="")
         sub.active = not md.is_bound
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         sub = col.column()
@@ -343,9 +343,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         layout.separator()
 
         if md.is_bound:
-            layout.operator("object.meshdeform_bind", text="Unbind")
+            layout.operator("object.meshdeform_bind", text=_("Unbind"))
         else:
-            layout.operator("object.meshdeform_bind", text="Bind")
+            layout.operator("object.meshdeform_bind", text=_("Bind"))
 
             row = layout.row()
             row.prop(md, "precision")
@@ -355,19 +355,19 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split(percentage=0.25)
 
         col = split.column()
-        col.label(text="Axis:")
+        col.label(text=_("Axis:"))
         col.prop(md, "use_x")
         col.prop(md, "use_y")
         col.prop(md, "use_z")
 
         col = split.column()
-        col.label(text="Options:")
-        col.prop(md, "use_mirror_merge", text="Merge")
-        col.prop(md, "use_clip", text="Clipping")
-        col.prop(md, "use_mirror_vertex_groups", text="Vertex Groups")
+        col.label(text=_("Options:"))
+        col.prop(md, "use_mirror_merge", text=_("Merge"))
+        col.prop(md, "use_clip", text=_("Clipping"))
+        col.prop(md, "use_mirror_vertex_groups", text=_("Vertex Groups"))
 
         col = split.column()
-        col.label(text="Textures:")
+        col.label(text=_("Textures:"))
         col.prop(md, "use_mirror_u", text="U")
         col.prop(md, "use_mirror_v", text="V")
 
@@ -375,7 +375,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         if md.use_mirror_merge == True:
             col.prop(md, "merge_threshold")
-        col.label(text="Mirror Object:")
+        col.label(text=_("Mirror Object:"))
         col.prop(md, "mirror_object", text="")
 
     def MULTIRES(self, layout, ob, md):
@@ -383,17 +383,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         split = layout.split()
         col = split.column()
-        col.prop(md, "levels", text="Preview")
-        col.prop(md, "sculpt_levels", text="Sculpt")
-        col.prop(md, "render_levels", text="Render")
+        col.prop(md, "levels", text=_("Preview"))
+        col.prop(md, "sculpt_levels", text=_("Sculpt"))
+        col.prop(md, "render_levels", text=_("Render"))
 
         col = split.column()
 
         col.enabled = ob.mode != 'EDIT'
-        col.operator("object.multires_subdivide", text="Subdivide")
-        col.operator("object.multires_higher_levels_delete", text="Delete Higher")
-        col.operator("object.multires_reshape", text="Reshape")
-        col.operator("object.multires_base_apply", text="Apply Base")
+        col.operator("object.multires_subdivide", text=_("Subdivide"))
+        col.operator("object.multires_higher_levels_delete", text=_("Delete Higher"))
+        col.operator("object.multires_reshape", text=_("Reshape"))
+        col.operator("object.multires_base_apply", text=_("Apply Base"))
         col.prop(md, "use_subsurf_uv")
         col.prop(md, "show_only_control_edges")
 
@@ -402,34 +402,34 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col = layout.column()
         row = col.row()
         if md.is_external:
-            row.operator("object.multires_external_pack", text="Pack External")
+            row.operator("object.multires_external_pack", text=_("Pack External"))
             row.label()
             row = col.row()
             row.prop(md, "filepath", text="")
         else:
-            row.operator("object.multires_external_save", text="Save External...")
+            row.operator("object.multires_external_save", text=_("Save External..."))
             row.label()
 
     def PARTICLE_INSTANCE(self, layout, ob, md):
         layout.prop(md, "object")
-        layout.prop(md, "particle_system_index", text="Particle System")
+        layout.prop(md, "particle_system_index", text=_("Particle System"))
 
         split = layout.split()
         col = split.column()
-        col.label(text="Create From:")
+        col.label(text=_("Create From:"))
         col.prop(md, "use_normal")
         col.prop(md, "use_children")
         col.prop(md, "use_size")
 
         col = split.column()
-        col.label(text="Show Particles When:")
+        col.label(text=_("Show Particles When:"))
         col.prop(md, "show_alive")
         col.prop(md, "show_unborn")
         col.prop(md, "show_dead")
 
         layout.separator()
 
-        layout.prop(md, "use_path", text="Create Along Paths")
+        layout.prop(md, "use_path", text=_("Create Along Paths"))
 
         split = layout.split()
         split.active = md.use_path
@@ -439,17 +439,17 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         col.prop(md, "position", slider=True)
-        col.prop(md, "random_position", text="Random", slider=True)
+        col.prop(md, "random_position", text=_("Random"), slider=True)
 
     def PARTICLE_SYSTEM(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Particle context")
+        layout.label(text=_("Settings can be found inside the Particle context"))
 
     def SCREW(self, layout, ob, md):
         split = layout.split()
 
         col = split.column()
         col.prop(md, "axis")
-        col.prop(md, "object", text="AxisOb")
+        col.prop(md, "object", text=_("AxisOb"))
         col.prop(md, "angle")
         col.prop(md, "steps")
         col.prop(md, "render_steps")
@@ -468,10 +468,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
     def SHRINKWRAP(self, layout, ob, md):
         split = layout.split()
         col = split.column()
-        col.label(text="Target:")
+        col.label(text=_("Target:"))
         col.prop(md, "target", text="")
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         split = layout.split()
@@ -481,28 +481,28 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col.prop(md, "subsurf_levels")
 
         col = split.column()
-        col.label(text="Mode:")
+        col.label(text=_("Mode:"))
         col.prop(md, "wrap_method", text="")
 
         if md.wrap_method == 'PROJECT':
             split = layout.split(percentage=0.25)
 
             col = split.column()
-            col.label(text="Axis:")
+            col.label(text=_("Axis:"))
             col.prop(md, "use_project_x")
             col.prop(md, "use_project_y")
             col.prop(md, "use_project_z")
 
             col = split.column()
-            col.label(text="Direction:")
+            col.label(text=_("Direction:"))
             col.prop(md, "use_negative_direction")
             col.prop(md, "use_positive_direction")
 
             col = split.column()
-            col.label(text="Cull Faces:")
+            col.label(text=_("Cull Faces:"))
             col.prop(md, "cull_face", expand=True)
 
-            layout.label(text="Auxiliary Target:")
+            layout.label(text=_("Auxiliary Target:"))
             layout.prop(md, "auxiliary_target", text="")
 
         elif md.wrap_method == 'NEAREST_SURFACEPOINT':
@@ -512,24 +512,24 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Mode:")
+        col.label(text=_("Mode:"))
         col.prop(md, "deform_method", text="")
 
         col = split.column()
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
         split = layout.split()
 
         col = split.column()
-        col.label(text="Origin:")
+        col.label(text=_("Origin:"))
         col.prop(md, "origin", text="")
         sub = col.column()
         sub.active = (md.origin is not None)
         sub.prop(md, "use_relative")
 
         col = split.column()
-        col.label(text="Deform:")
+        col.label(text=_("Deform:"))
         col.prop(md, "factor")
         col.prop(md, "limits", slider=True)
         if md.deform_method in {'TAPER', 'STRETCH'}:
@@ -537,13 +537,13 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
             col.prop(md, "lock_y")
 
     def SMOKE(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def SMOOTH(self, layout, ob, md):
         split = layout.split(percentage=0.25)
 
         col = split.column()
-        col.label(text="Axis:")
+        col.label(text=_("Axis:"))
         col.prop(md, "use_x")
         col.prop(md, "use_y")
         col.prop(md, "use_z")
@@ -551,11 +551,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col = split.column()
         col.prop(md, "factor")
         col.prop(md, "iterations")
-        col.label(text="Vertex Group:")
+        col.label(text=_("Vertex Group:"))
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
     def SOFT_BODY(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def SOLIDIFY(self, layout, ob, md):
         split = layout.split()
@@ -564,18 +564,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         col.prop(md, "thickness")
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
-        col.label(text="Crease:")
-        col.prop(md, "edge_crease_inner", text="Inner")
-        col.prop(md, "edge_crease_outer", text="Outer")
-        col.prop(md, "edge_crease_rim", text="Rim")
-        col.label(text="Material Index Offset:")
+        col.label(text=_("Crease:"))
+        col.prop(md, "edge_crease_inner", text=_("Inner"))
+        col.prop(md, "edge_crease_outer", text=_("Outer"))
+        col.prop(md, "edge_crease_rim", text=_("Rim"))
+        col.label(text=_("Material Index Offset:"))
 
         col = split.column()
 
         col.prop(md, "offset")
         sub = col.column()
         sub.active = bool(md.vertex_group)
-        sub.prop(md, "invert_vertex_group", text="Invert")
+        sub.prop(md, "invert_vertex_group", text=_("Invert"))
 
         col.prop(md, "use_even_offset")
         col.prop(md, "use_quality_normals")
@@ -587,65 +587,65 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         row.prop(md, "material_offset", text="")
         row = row.row()
         row.active = md.use_rim
-        row.prop(md, "material_offset_rim", text="Rim")
+        row.prop(md, "material_offset_rim", text=_("Rim"))
 
     def SUBSURF(self, layout, ob, md):
         layout.row().prop(md, "subdivision_type", expand=True)
 
         split = layout.split()
         col = split.column()
-        col.label(text="Subdivisions:")
-        col.prop(md, "levels", text="View")
-        col.prop(md, "render_levels", text="Render")
+        col.label(text=_("Subdivisions:"))
+        col.prop(md, "levels", text=_("View"))
+        col.prop(md, "render_levels", text=_("Render"))
 
         col = split.column()
-        col.label(text="Options:")
+        col.label(text=_("Options:"))
         col.prop(md, "use_subsurf_uv")
         col.prop(md, "show_only_control_edges")
 
     def SURFACE(self, layout, ob, md):
-        layout.label(text="Settings can be found inside the Physics context")
+        layout.label(text=_("Settings can be found inside the Physics context"))
 
     def UV_PROJECT(self, layout, ob, md):
         if ob.type == 'MESH':
             split = layout.split()
 
             col = split.column()
-            col.label(text="Image:")
+            col.label(text=_("Image:"))
             col.prop(md, "image", text="")
 
             col = split.column()
-            col.label(text="UV Layer:")
+            col.label(text=_("UV Layer:"))
             col.prop_search(md, "uv_layer", ob.data, "uv_textures", text="")
 
             split = layout.split()
             col = split.column()
             col.prop(md, "use_image_override")
-            col.prop(md, "projector_count", text="Projectors")
+            col.prop(md, "projector_count", text=_("Projectors"))
             for proj in md.projectors:
                 col.prop(proj, "object", text="")
 
             col = split.column()
             sub = col.column(align=True)
-            sub.prop(md, "aspect_x", text="Aspect X")
-            sub.prop(md, "aspect_y", text="Aspect Y")
+            sub.prop(md, "aspect_x", text=_("Aspect X"))
+            sub.prop(md, "aspect_y", text=_("Aspect Y"))
 
             sub = col.column(align=True)
-            sub.prop(md, "scale_x", text="Scale X")
-            sub.prop(md, "scale_y", text="Scale Y")
+            sub.prop(md, "scale_x", text=_("Scale X"))
+            sub.prop(md, "scale_y", text=_("Scale Y"))
 
     def WARP(self, layout, ob, md):
         use_falloff = (md.falloff_type != 'NONE')
         split = layout.split()
 
         col = split.column()
-        col.label(text="From:")
+        col.label(text=_("From:"))
         col.prop(md, "object_from", text="")
 
         col.prop(md, "use_volume_preserve")
 
         col = split.column()
-        col.label(text="To:")
+        col.label(text=_("To:"))
         col.prop(md, "object_to", text="")
         col.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
 
@@ -664,15 +664,15 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         # 2 new columns
         split = layout.split()
         col = split.column()
-        col.label(text="Texture:")
+        col.label(text=_("Texture:"))
         col.prop(md, "texture", text="")
 
         col = split.column()
-        col.label(text="Texture Coordinates:")
+        col.label(text=_("Texture Coordinates:"))
         col.prop(md, "texture_coords", text="")
 
         if md.texture_coords == 'OBJECT':
-            layout.prop(md, "texture_coords_object", text="Object")
+            layout.prop(md, "texture_coords_object", text=_("Object"))
         elif md.texture_coords == 'UV' and ob.type == 'MESH':
             layout.prop_search(md, "uv_layer", ob.data, "uv_textures")
 
@@ -680,7 +680,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Motion:")
+        col.label(text=_("Motion:"))
         col.prop(md, "use_x")
         col.prop(md, "use_y")
         col.prop(md, "use_cyclic")
@@ -696,18 +696,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Time:")
+        col.label(text=_("Time:"))
         sub = col.column(align=True)
-        sub.prop(md, "time_offset", text="Offset")
-        sub.prop(md, "lifetime", text="Life")
-        col.prop(md, "damping_time", text="Damping")
+        sub.prop(md, "time_offset", text=_("Offset"))
+        sub.prop(md, "lifetime", text=_("Life"))
+        col.prop(md, "damping_time", text=_("Damping"))
 
         col = split.column()
-        col.label(text="Position:")
+        col.label(text=_("Position:"))
         sub = col.column(align=True)
         sub.prop(md, "start_position_x", text="X")
         sub.prop(md, "start_position_y", text="Y")
-        col.prop(md, "falloff_radius", text="Falloff")
+        col.prop(md, "falloff_radius", text=_("Falloff"))
 
         layout.separator()
 
@@ -715,7 +715,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, bpy.types.Panel):
         layout.prop_search(md, "vertex_group", ob, "vertex_groups")
         split = layout.split(percentage=0.33)
         col = split.column()
-        col.label(text="Texture")
+        col.label(text=_("Texture"))
         col = split.column()
         col.template_ID(md, "texture", new="texture.new")
         layout.prop(md, "texture_coords")
index 0c07451b3b2dcdde62413053dbe48b305765863c..b9b979d8d9282449359ed022fc6c4d8e0f0154c7 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 class PhysicsButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -27,7 +27,7 @@ class PhysicsButtonsPanel():
 
 
 class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
-    bl_label = "Physics"
+    bl_label = _("Physics")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -53,7 +53,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             col = split.column()
             col.prop(game, "use_actor")
             col.prop(game, "use_ghost")
-            col.prop(ob, "hide_render", text="Invisible")  # out of place but useful
+            col.prop(ob, "hide_render", text=_("Invisible"))  # out of place but useful
 
             col = split.column()
             col.prop(game, "use_material_physics_fh")
@@ -65,7 +65,7 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.label(text="Attributes:")
+            col.label(text=_("Attributes:"))
             col.prop(game, "mass")
             col.prop(game, "radius")
             col.prop(game, "form_factor")
@@ -80,29 +80,29 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.label(text="Velocity:")
+            col.label(text=_("Velocity:"))
             sub = col.column(align=True)
-            sub.prop(game, "velocity_min", text="Minimum")
-            sub.prop(game, "velocity_max", text="Maximum")
+            sub.prop(game, "velocity_min", text=_("Minimum"))
+            sub.prop(game, "velocity_max", text=_("Maximum"))
 
             col = split.column()
-            col.label(text="Damping:")
+            col.label(text=_("Damping:"))
             sub = col.column(align=True)
-            sub.prop(game, "damping", text="Translation", slider=True)
-            sub.prop(game, "rotation_damping", text="Rotation", slider=True)
+            sub.prop(game, "damping", text=_("Translation"), slider=True)
+            sub.prop(game, "rotation_damping", text=_("Rotation"), slider=True)
 
             layout.separator()
 
             split = layout.split()
 
             col = split.column()
-            col.label(text="Lock Translation:")
+            col.label(text=_("Lock Translation:"))
             col.prop(game, "lock_location_x", text="X")
             col.prop(game, "lock_location_y", text="Y")
             col.prop(game, "lock_location_z", text="Z")
 
             col = split.column()
-            col.label(text="Lock Rotation:")
+            col.label(text=_("Lock Rotation:"))
             col.prop(game, "lock_rotation_x", text="X")
             col.prop(game, "lock_rotation_y", text="Y")
             col.prop(game, "lock_rotation_z", text="Z")
@@ -111,21 +111,21 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             col = layout.column()
             col.prop(game, "use_actor")
             col.prop(game, "use_ghost")
-            col.prop(ob, "hide_render", text="Invisible")
+            col.prop(ob, "hide_render", text=_("Invisible"))
 
             layout.separator()
 
             split = layout.split()
 
             col = split.column()
-            col.label(text="Attributes:")
+            col.label(text=_("Attributes:"))
             col.prop(game, "mass")
             col.prop(soft, "weld_threshold")
             col.prop(soft, "location_iterations")
             col.prop(soft, "linear_stiffness", slider=True)
             col.prop(soft, "dynamic_friction", slider=True)
             col.prop(soft, "collision_margin", slider=True)
-            col.prop(soft, "use_bending_constraints", text="Bending Constraints")
+            col.prop(soft, "use_bending_constraints", text=_("Bending Constraints"))
 
             col = split.column()
             col.prop(soft, "use_shape_match")
@@ -135,25 +135,25 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
 
             col.separator()
 
-            col.label(text="Cluster Collision:")
+            col.label(text=_("Cluster Collision:"))
             col.prop(soft, "use_cluster_rigid_to_softbody")
             col.prop(soft, "use_cluster_soft_to_softbody")
             sub = col.column()
             sub.active = (soft.use_cluster_rigid_to_softbody or soft.use_cluster_soft_to_softbody)
-            sub.prop(soft, "cluster_iterations", text="Iterations")
+            sub.prop(soft, "cluster_iterations", text=_("Iterations"))
 
         elif game.physics_type == 'STATIC':
             col = layout.column()
             col.prop(game, "use_actor")
             col.prop(game, "use_ghost")
-            col.prop(ob, "hide_render", text="Invisible")
+            col.prop(ob, "hide_render", text=_("Invisible"))
 
             layout.separator()
 
             split = layout.split()
 
             col = split.column()
-            col.label(text="Attributes:")
+            col.label(text=_("Attributes:"))
             col.prop(game, "radius")
 
             col = split.column()
@@ -164,11 +164,11 @@ class PHYSICS_PT_game_physics(PhysicsButtonsPanel, bpy.types.Panel):
             subsub.prop(game, "friction_coefficients", text="", slider=True)
 
         elif game.physics_type in {'SENSOR', 'INVISIBLE', 'NO_COLLISION', 'OCCLUDE'}:
-            layout.prop(ob, "hide_render", text="Invisible")
+            layout.prop(ob, "hide_render", text=_("Invisible"))
 
 
 class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
-    bl_label = "Collision Bounds"
+    bl_label = _("Collision Bounds")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -188,11 +188,11 @@ class PHYSICS_PT_game_collision_bounds(PhysicsButtonsPanel, bpy.types.Panel):
         game = context.active_object.game
 
         layout.active = game.use_collision_bounds
-        layout.prop(game, "collision_bounds_type", text="Bounds")
+        layout.prop(game, "collision_bounds_type", text=_("Bounds"))
 
         row = layout.row()
-        row.prop(game, "collision_margin", text="Margin", slider=True)
-        row.prop(game, "use_collision_compound", text="Compound")
+        row.prop(game, "collision_margin", text=_("Margin"), slider=True)
+        row.prop(game, "use_collision_compound", text=_("Compound"))
 
 
 class RenderButtonsPanel():
@@ -207,19 +207,19 @@ class RenderButtonsPanel():
 
 
 class RENDER_PT_game(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Game"
+    bl_label = _("Game")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
         layout = self.layout
 
         row = layout.row()
-        row.operator("view3d.game_start", text="Start")
+        row.operator("view3d.game_start", text=_("Start"))
         row.label()
 
 
 class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Standalone Player"
+    bl_label = _("Standalone Player")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -232,27 +232,27 @@ class RENDER_PT_game_player(RenderButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Resolution:")
+        col.label(text=_("Resolution:"))
         sub = col.column(align=True)
         sub.prop(gs, "resolution_x", slider=False, text="X")
         sub.prop(gs, "resolution_y", slider=False, text="Y")
 
         col = split.column()
-        col.label(text="Quality:")
+        col.label(text=_("Quality:"))
         sub = col.column(align=True)
-        sub.prop(gs, "depth", text="Bit Depth", slider=False)
-        sub.prop(gs, "frequency", text="FPS", slider=False)
+        sub.prop(gs, "depth", text=_("Bit Depth"), slider=False)
+        sub.prop(gs, "frequency", text=_("FPS"), slider=False)
 
         # framing:
         col = layout.column()
-        col.label(text="Framing:")
+        col.label(text=_("Framing:"))
         col.row().prop(gs, "frame_type", expand=True)
         if gs.frame_type == 'LETTERBOX':
             col.prop(gs, "frame_color", text="")
 
 
 class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Stereo"
+    bl_label = _("Stereo")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -271,7 +271,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
 
         # dome:
         elif stereo_mode == 'DOME':
-            layout.prop(gs, "dome_mode", text="Dome Type")
+            layout.prop(gs, "dome_mode", text=_("Dome Type"))
 
             dome_type = gs.dome_mode
 
@@ -282,23 +282,23 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
                dome_type == 'TRUNCATED_FRONT':
 
                 col = split.column()
-                col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+                col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
                 col.prop(gs, "dome_angle", slider=True)
 
                 col = split.column()
-                col.prop(gs, "dome_tesselation", text="Tesselation")
+                col.prop(gs, "dome_tesselation", text=_("Tesselation"))
                 col.prop(gs, "dome_tilt")
 
             elif dome_type == 'PANORAM_SPH':
                 col = split.column()
 
-                col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+                col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
                 col = split.column()
-                col.prop(gs, "dome_tesselation", text="Tesselation")
+                col.prop(gs, "dome_tesselation", text=_("Tesselation"))
 
             else:  # cube map
                 col = split.column()
-                col.prop(gs, "dome_buffer_resolution", text="Resolution", slider=True)
+                col.prop(gs, "dome_buffer_resolution", text=_("Resolution"), slider=True)
 
                 col = split.column()
 
@@ -306,7 +306,7 @@ class RENDER_PT_game_stereo(RenderButtonsPanel, bpy.types.Panel):
 
 
 class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Shading"
+    bl_label = _("Shading")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -320,19 +320,19 @@ class RENDER_PT_game_shading(RenderButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.prop(gs, "use_glsl_lights", text="Lights")
-            col.prop(gs, "use_glsl_shaders", text="Shaders")
-            col.prop(gs, "use_glsl_shadows", text="Shadows")
-            col.prop(gs, "use_glsl_color_management", text="Color Management")
+            col.prop(gs, "use_glsl_lights", text=_("Lights"))
+            col.prop(gs, "use_glsl_shaders", text=_("Shaders"))
+            col.prop(gs, "use_glsl_shadows", text=_("Shadows"))
+            col.prop(gs, "use_glsl_color_management", text=_("Color Management"))
 
             col = split.column()
-            col.prop(gs, "use_glsl_ramps", text="Ramps")
-            col.prop(gs, "use_glsl_nodes", text="Nodes")
-            col.prop(gs, "use_glsl_extra_textures", text="Extra Textures")
+            col.prop(gs, "use_glsl_ramps", text=_("Ramps"))
+            col.prop(gs, "use_glsl_nodes", text=_("Nodes"))
+            col.prop(gs, "use_glsl_extra_textures", text=_("Extra Textures"))
 
 
 class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Performance"
+    bl_label = _("Performance")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -345,7 +345,7 @@ class RENDER_PT_game_performance(RenderButtonsPanel, bpy.types.Panel):
 
 
 class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -353,15 +353,15 @@ class RENDER_PT_game_display(RenderButtonsPanel, bpy.types.Panel):
 
         gs = context.scene.game_settings
         flow = layout.column_flow()
-        flow.prop(gs, "show_debug_properties", text="Debug Properties")
-        flow.prop(gs, "show_framerate_profile", text="Framerate and Profile")
-        flow.prop(gs, "show_physics_visualization", text="Physics Visualization")
+        flow.prop(gs, "show_debug_properties", text=_("Debug Properties"))
+        flow.prop(gs, "show_framerate_profile", text=_("Framerate and Profile"))
+        flow.prop(gs, "show_physics_visualization", text=_("Physics Visualization"))
         flow.prop(gs, "use_deprecation_warnings")
-        flow.prop(gs, "show_mouse", text="Mouse Cursor")
+        flow.prop(gs, "show_mouse", text=_("Mouse Cursor"))
 
 
 class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
-    bl_label = "Sound"
+    bl_label = _("Sound")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     def draw(self, context):
@@ -371,7 +371,7 @@ class RENDER_PT_game_sound(RenderButtonsPanel, bpy.types.Panel):
 
         layout.prop(scene, "audio_distance_model")
 
-        layout.prop(scene, "audio_doppler_speed", text="Speed")
+        layout.prop(scene, "audio_doppler_speed", text=_("Speed"))
         layout.prop(scene, "audio_doppler_factor")
 
 
@@ -406,7 +406,7 @@ class WORLD_PT_game_context_world(WorldButtonsPanel, bpy.types.Panel):
 
 
 class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
-    bl_label = "World"
+    bl_label = _("World")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -425,7 +425,7 @@ class WORLD_PT_game_world(WorldButtonsPanel, bpy.types.Panel):
 
 
 class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
-    bl_label = "Mist"
+    bl_label = _("Mist")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -451,7 +451,7 @@ class WORLD_PT_game_mist(WorldButtonsPanel, bpy.types.Panel):
 
 
 class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
-    bl_label = "Physics"
+    bl_label = _("Physics")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -466,37 +466,37 @@ class WORLD_PT_game_physics(WorldButtonsPanel, bpy.types.Panel):
 
         layout.prop(gs, "physics_engine")
         if gs.physics_engine != 'NONE':
-            layout.prop(gs, "physics_gravity", text="Gravity")
+            layout.prop(gs, "physics_gravity", text=_("Gravity"))
 
             split = layout.split()
 
             col = split.column()
-            col.label(text="Physics Steps:")
+            col.label(text=_("Physics Steps:"))
             sub = col.column(align=True)
-            sub.prop(gs, "physics_step_max", text="Max")
-            sub.prop(gs, "physics_step_sub", text="Substeps")
-            col.prop(gs, "fps", text="FPS")
+            sub.prop(gs, "physics_step_max", text=_("Max"))
+            sub.prop(gs, "physics_step_sub", text=_("Substeps"))
+            col.prop(gs, "fps", text=_("FPS"))
 
             col = split.column()
-            col.label(text="Logic Steps:")
-            col.prop(gs, "logic_step_max", text="Max")
+            col.label(text=_("Logic Steps:"))
+            col.prop(gs, "logic_step_max", text=_("Max"))
 
             col = layout.column()
-            col.prop(gs, "use_occlusion_culling", text="Occlusion Culling")
+            col.prop(gs, "use_occlusion_culling", text=_("Occlusion Culling"))
             sub = col.column()
             sub.active = gs.use_occlusion_culling
-            sub.prop(gs, "occlusion_culling_resolution", text="Resolution")
+            sub.prop(gs, "occlusion_culling_resolution", text=_("Resolution"))
 
         else:
             split = layout.split()
 
             col = split.column()
-            col.label(text="Physics Steps:")
-            col.prop(gs, "fps", text="FPS")
+            col.label(text=_("Physics Steps:"))
+            col.prop(gs, "fps", text=_("FPS"))
 
             col = split.column()
-            col.label(text="Logic Steps:")
-            col.prop(gs, "logic_step_max", text="Max")
+            col.label(text=_("Logic Steps:"))
+            col.prop(gs, "logic_step_max", text=_("Max"))
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index 2a52ae23782a57238a3f246ab0072f3efdaf2931..9f988f58b24782320c1624e318c41582503ede3e 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 def active_node_mat(mat):
     # TODO, 2.4x has a pipeline section, for 2.5 we need to communicate
@@ -51,14 +51,14 @@ def simple_material(mat):
 
 
 class MATERIAL_MT_sss_presets(bpy.types.Menu):
-    bl_label = "SSS Presets"
+    bl_label = _("SSS Presets")
     preset_subdir = "sss"
     preset_operator = "script.execute_preset"
     draw = bpy.types.Menu.draw_preset
 
 
 class MATERIAL_MT_specials(bpy.types.Menu):
-    bl_label = "Material Specials"
+    bl_label = _("Material Specials")
 
     def draw(self, context):
         layout = self.layout
@@ -113,9 +113,9 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
 
             if ob.mode == 'EDIT':
                 row = layout.row(align=True)
-                row.operator("object.material_slot_assign", text="Assign")
-                row.operator("object.material_slot_select", text="Select")
-                row.operator("object.material_slot_deselect", text="Deselect")
+                row.operator("object.material_slot_assign", text=_("Assign"))
+                row.operator("object.material_slot_select", text=_("Select"))
+                row.operator("object.material_slot_deselect", text=_("Deselect"))
 
         split = layout.split(percentage=0.65)
 
@@ -141,11 +141,11 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, bpy.types.Panel):
                 if mat.active_node_material:
                     row.prop(mat.active_node_material, "name", text="")
                 else:
-                    row.label(text="No material node selected")
+                    row.label(text=_("No material node selected"))
 
 
 class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Preview"
+    bl_label = _("Preview")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -153,7 +153,7 @@ class MATERIAL_PT_preview(MaterialButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_pipeline(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Render Pipeline Options"
+    bl_label = _("Render Pipeline Options")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -196,15 +196,15 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, bpy.types.Panel):
         col = split.column()
         col.active = mat_type
 
-        col.prop(mat, "use_cast_shadows_only", text="Cast Only")
-        col.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
+        col.prop(mat, "use_cast_shadows_only", text=_("Cast Only"))
+        col.prop(mat, "shadow_cast_alpha", text=_("Casting Alpha"))
         col.prop(mat, "use_cast_buffer_shadows")
         col.prop(mat, "use_cast_approximate")
         col.prop(mat, "pass_index")
 
 
 class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Diffuse"
+    bl_label = _("Diffuse")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -224,12 +224,12 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(mat, "diffuse_color", text="")
         sub = col.column()
         sub.active = (not mat.use_shadeless)
-        sub.prop(mat, "diffuse_intensity", text="Intensity")
+        sub.prop(mat, "diffuse_intensity", text=_("Intensity"))
 
         col = split.column()
         col.active = (not mat.use_shadeless)
         col.prop(mat, "diffuse_shader", text="")
-        col.prop(mat, "use_diffuse_ramp", text="Ramp")
+        col.prop(mat, "use_diffuse_ramp", text=_("Ramp"))
 
         col = layout.column()
         col.active = (not mat.use_shadeless)
@@ -239,12 +239,12 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(mat, "darkness")
         elif mat.diffuse_shader == 'TOON':
             row = col.row()
-            row.prop(mat, "diffuse_toon_size", text="Size")
-            row.prop(mat, "diffuse_toon_smooth", text="Smooth")
+            row.prop(mat, "diffuse_toon_size", text=_("Size"))
+            row.prop(mat, "diffuse_toon_smooth", text=_("Smooth"))
         elif mat.diffuse_shader == 'FRESNEL':
             row = col.row()
-            row.prop(mat, "diffuse_fresnel", text="Fresnel")
-            row.prop(mat, "diffuse_fresnel_factor", text="Factor")
+            row.prop(mat, "diffuse_fresnel", text=_("Fresnel"))
+            row.prop(mat, "diffuse_fresnel_factor", text=_("Factor"))
 
         if mat.use_diffuse_ramp:
             layout.separator()
@@ -252,14 +252,14 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, bpy.types.Panel):
             layout.separator()
 
             row = layout.row()
-            row.prop(mat, "diffuse_ramp_input", text="Input")
-            row.prop(mat, "diffuse_ramp_blend", text="Blend")
+            row.prop(mat, "diffuse_ramp_input", text=_("Input"))
+            row.prop(mat, "diffuse_ramp_blend", text=_("Blend"))
 
-            layout.prop(mat, "diffuse_ramp_factor", text="Factor")
+            layout.prop(mat, "diffuse_ramp_factor", text=_("Factor"))
 
 
 class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Specular"
+    bl_label = _("Specular")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -279,25 +279,25 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         col.prop(mat, "specular_color", text="")
-        col.prop(mat, "specular_intensity", text="Intensity")
+        col.prop(mat, "specular_intensity", text=_("Intensity"))
 
         col = split.column()
         col.prop(mat, "specular_shader", text="")
-        col.prop(mat, "use_specular_ramp", text="Ramp")
+        col.prop(mat, "use_specular_ramp", text=_("Ramp"))
 
         col = layout.column()
         if mat.specular_shader in {'COOKTORR', 'PHONG'}:
-            col.prop(mat, "specular_hardness", text="Hardness")
+            col.prop(mat, "specular_hardness", text=_("Hardness"))
         elif mat.specular_shader == 'BLINN':
             row = col.row()
-            row.prop(mat, "specular_hardness", text="Hardness")
-            row.prop(mat, "specular_ior", text="IOR")
+            row.prop(mat, "specular_hardness", text=_("Hardness"))
+            row.prop(mat, "specular_ior", text=_("IOR"))
         elif mat.specular_shader == 'WARDISO':
-            col.prop(mat, "specular_slope", text="Slope")
+            col.prop(mat, "specular_slope", text=_("Slope"))
         elif mat.specular_shader == 'TOON':
             row = col.row()
-            row.prop(mat, "specular_toon_size", text="Size")
-            row.prop(mat, "specular_toon_smooth", text="Smooth")
+            row.prop(mat, "specular_toon_size", text=_("Size"))
+            row.prop(mat, "specular_toon_smooth", text=_("Smooth"))
 
         if mat.use_specular_ramp:
             layout.separator()
@@ -305,14 +305,14 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, bpy.types.Panel):
             layout.separator()
 
             row = layout.row()
-            row.prop(mat, "specular_ramp_input", text="Input")
-            row.prop(mat, "specular_ramp_blend", text="Blend")
+            row.prop(mat, "specular_ramp_input", text=_("Input"))
+            row.prop(mat, "specular_ramp_blend", text=_("Blend"))
 
-            layout.prop(mat, "specular_ramp_factor", text="Factor")
+            layout.prop(mat, "specular_ramp_factor", text=_("Factor"))
 
 
 class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Shading"
+    bl_label = _("Shading")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -346,7 +346,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Transparency"
+    bl_label = _("Transparency")
     # bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -381,14 +381,14 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(mat, "alpha")
         row = col.row()
         row.active = (base_mat.transparency_method != 'MASK') and (not mat.use_shadeless)
-        row.prop(mat, "specular_alpha", text="Specular")
+        row.prop(mat, "specular_alpha", text=_("Specular"))
 
         col = split.column()
         col.active = (not mat.use_shadeless)
         col.prop(rayt, "fresnel")
         sub = col.column()
         sub.active = rayt.fresnel > 0
-        sub.prop(rayt, "fresnel_factor", text="Blend")
+        sub.prop(rayt, "fresnel_factor", text=_("Blend"))
 
         if base_mat.transparency_method == 'RAYTRACE':
             layout.separator()
@@ -403,16 +403,16 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(rayt, "depth")
 
             col = split.column()
-            col.label(text="Gloss:")
-            col.prop(rayt, "gloss_factor", text="Amount")
+            col.label(text=_("Gloss:"))
+            col.prop(rayt, "gloss_factor", text=_("Amount"))
             sub = col.column()
             sub.active = rayt.gloss_factor < 1.0
-            sub.prop(rayt, "gloss_threshold", text="Threshold")
-            sub.prop(rayt, "gloss_samples", text="Samples")
+            sub.prop(rayt, "gloss_threshold", text=_("Threshold"))
+            sub.prop(rayt, "gloss_samples", text=_("Samples"))
 
 
 class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Mirror"
+    bl_label = _("Mirror")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -445,32 +445,32 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(raym, "fresnel")
         sub = col.column()
         sub.active = raym.fresnel > 0
-        sub.prop(raym, "fresnel_factor", text="Blend")
+        sub.prop(raym, "fresnel_factor", text=_("Blend"))
 
         split = layout.split()
 
         col = split.column()
         col.separator()
         col.prop(raym, "depth")
-        col.prop(raym, "distance", text="Max Dist")
+        col.prop(raym, "distance", text=_("Max Dist"))
         col.separator()
         sub = col.split(percentage=0.4)
         sub.active = raym.distance > 0.0
-        sub.label(text="Fade To:")
+        sub.label(text=_("Fade To:"))
         sub.prop(raym, "fade_to", text="")
 
         col = split.column()
-        col.label(text="Gloss:")
-        col.prop(raym, "gloss_factor", text="Amount")
+        col.label(text=_("Gloss:"))
+        col.prop(raym, "gloss_factor", text=_("Amount"))
         sub = col.column()
         sub.active = raym.gloss_factor < 1.0
-        sub.prop(raym, "gloss_threshold", text="Threshold")
-        sub.prop(raym, "gloss_samples", text="Samples")
-        sub.prop(raym, "gloss_anisotropic", text="Anisotropic")
+        sub.prop(raym, "gloss_threshold", text=_("Threshold"))
+        sub.prop(raym, "gloss_samples", text=_("Samples"))
+        sub.prop(raym, "gloss_anisotropic", text=_("Anisotropic"))
 
 
 class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Subsurface Scattering"
+    bl_label = _("Subsurface Scattering")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -507,22 +507,22 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(sss, "ior")
         col.prop(sss, "scale")
         col.prop(sss, "color", text="")
-        col.prop(sss, "radius", text="RGB Radius", expand=True)
+        col.prop(sss, "radius", text=_("RGB Radius"), expand=True)
 
         col = split.column()
         sub = col.column(align=True)
-        sub.label(text="Blend:")
-        sub.prop(sss, "color_factor", text="Color")
-        sub.prop(sss, "texture_factor", text="Texture")
-        sub.label(text="Scattering Weight:")
+        sub.label(text=_("Blend:"))
+        sub.prop(sss, "color_factor", text=_("Color"))
+        sub.prop(sss, "texture_factor", text=_("Texture"))
+        sub.label(text=_("Scattering Weight:"))
         sub.prop(sss, "front")
         sub.prop(sss, "back")
         col.separator()
-        col.prop(sss, "error_threshold", text="Error")
+        col.prop(sss, "error_threshold", text=_("Error"))
 
 
 class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Halo"
+    bl_label = _("Halo")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -558,7 +558,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(halo, "hardness")
         col.prop(halo, "add")
 
-        layout.label(text="Options:")
+        layout.label(text=_("Options:"))
 
         split = layout.split()
         col = split.column()
@@ -575,7 +575,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Flare"
+    bl_label = _("Flare")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -600,17 +600,17 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(halo, "flare_size", text="Size")
-        col.prop(halo, "flare_boost", text="Boost")
-        col.prop(halo, "flare_seed", text="Seed")
+        col.prop(halo, "flare_size", text=_("Size"))
+        col.prop(halo, "flare_boost", text=_("Boost"))
+        col.prop(halo, "flare_seed", text=_("Seed"))
 
         col = split.column()
-        col.prop(halo, "flare_subflare_count", text="Subflares")
-        col.prop(halo, "flare_subflare_size", text="Subsize")
+        col.prop(halo, "flare_subflare_count", text=_("Subflares"))
+        col.prop(halo, "flare_subflare_size", text=_("Subsize"))
 
 
 class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Physics"
+    bl_label = _("Physics")
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
     @classmethod
@@ -628,7 +628,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
         row.prop(phys, "elasticity", slider=True)
 
         row = layout.row()
-        row.label(text="Force Field:")
+        row.label(text=_("Force Field:"))
 
         row = layout.row()
         row.prop(phys, "fh_force")
@@ -640,7 +640,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Strand"
+    bl_label = _("Strand")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -660,10 +660,10 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         sub = col.column(align=True)
-        sub.label(text="Size:")
-        sub.prop(tan, "root_size", text="Root")
-        sub.prop(tan, "tip_size", text="Tip")
-        sub.prop(tan, "size_min", text="Minimum")
+        sub.label(text=_("Size:"))
+        sub.prop(tan, "root_size", text=_("Root"))
+        sub.prop(tan, "tip_size", text=_("Tip"))
+        sub.prop(tan, "size_min", text=_("Minimum"))
         sub.prop(tan, "use_blender_units")
         sub = col.column()
         sub.active = (not mat.use_shadeless)
@@ -671,7 +671,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
         col.prop(tan, "shape")
 
         col = split.column()
-        col.label(text="Shading:")
+        col.label(text=_("Shading:"))
         col.prop(tan, "width_fade")
         ob = context.object
         if ob and ob.type == 'MESH':
@@ -681,13 +681,13 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, bpy.types.Panel):
         col.separator()
         sub = col.column()
         sub.active = (not mat.use_shadeless)
-        sub.label("Surface diffuse:")
+        sub.label(_("Surface diffuse:"))
         sub = col.column()
-        sub.prop(tan, "blend_distance", text="Distance")
+        sub.prop(tan, "blend_distance", text=_("Distance"))
 
 
 class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Options"
+    bl_label = _("Options")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     @classmethod
@@ -716,11 +716,11 @@ class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
             sub.prop(mat, "offset_z")
             sub.active = mat.use_transparency and mat.transparency_method == 'Z_TRANSPARENCY'
         sub = col.column(align=True)
-        sub.label(text="Light Group:")
+        sub.label(text=_("Light Group:"))
         sub.prop(mat, "light_group", text="")
         row = sub.row()
         row.active = bool(mat.light_group)
-        row.prop(mat, "use_light_group_exclusive", text="Exclusive")
+        row.prop(mat, "use_light_group_exclusive", text=_("Exclusive"))
 
         col = split.column()
         col.prop(mat, "use_face_texture")
@@ -736,7 +736,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Shadow"
+    bl_label = _("Shadow")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -755,12 +755,12 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(mat, "use_shadows", text="Receive")
-        col.prop(mat, "use_transparent_shadows", text="Receive Transparent")
+        col.prop(mat, "use_shadows", text=_("Receive"))
+        col.prop(mat, "use_transparent_shadows", text=_("Receive Transparent"))
         if simple_material(base_mat):
-            col.prop(mat, "use_cast_shadows_only", text="Cast Only")
-            col.prop(mat, "shadow_cast_alpha", text="Casting Alpha")
-        col.prop(mat, "use_only_shadow", text="Shadows Only")
+            col.prop(mat, "use_cast_shadows_only", text=_("Cast Only"))
+            col.prop(mat, "shadow_cast_alpha", text=_("Casting Alpha"))
+        col.prop(mat, "use_only_shadow", text=_("Shadows Only"))
         sub = col.column()
         sub.active = mat.use_only_shadow
         sub.prop(mat, "shadow_only_type", text="")
@@ -770,17 +770,17 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, bpy.types.Panel):
             col.prop(mat, "use_cast_buffer_shadows")
         sub = col.column()
         sub.active = mat.use_cast_buffer_shadows
-        sub.prop(mat, "shadow_buffer_bias", text="Buffer Bias")
-        col.prop(mat, "use_ray_shadow_bias", text="Auto Ray Bias")
+        sub.prop(mat, "shadow_buffer_bias", text=_("Buffer Bias"))
+        col.prop(mat, "use_ray_shadow_bias", text=_("Auto Ray Bias"))
         sub = col.column()
         sub.active = (not mat.use_ray_shadow_bias)
-        sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
+        sub.prop(mat, "shadow_ray_bias", text=_("Ray Bias"))
         if simple_material(base_mat):
             col.prop(mat, "use_cast_approximate")
 
 
 class MATERIAL_PT_transp_game(MaterialButtonsPanel, bpy.types.Panel):
-    bl_label = "Transparency"
+    bl_label = _("Transparency")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_GAME'}
 
@@ -823,7 +823,7 @@ class VolumeButtonsPanel():
 
 
 class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Density"
+    bl_label = _("Density")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -837,7 +837,7 @@ class MATERIAL_PT_volume_density(VolumeButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Shading"
+    bl_label = _("Shading")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -862,7 +862,7 @@ class MATERIAL_PT_volume_shading(VolumeButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Lighting"
+    bl_label = _("Lighting")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -887,7 +887,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
             sub = col.column()
             sub.enabled = True
             sub.active = False
-            sub.label("Light Cache Enabled")
+            sub.label(_("Light Cache Enabled"))
             col.prop(vol, "cache_resolution")
 
             sub = col.column(align=True)
@@ -897,7 +897,7 @@ class MATERIAL_PT_volume_lighting(VolumeButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Transparency"
+    bl_label = _("Transparency")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -915,7 +915,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Integration"
+    bl_label = _("Integration")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -926,7 +926,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Step Calculation:")
+        col.label(text=_("Step Calculation:"))
         col.prop(vol, "step_method", text="")
         col = col.column(align=True)
         col.prop(vol, "step_size")
@@ -937,7 +937,7 @@ class MATERIAL_PT_volume_integration(VolumeButtonsPanel, bpy.types.Panel):
 
 
 class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
-    bl_label = "Options"
+    bl_label = _("Options")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
     bl_options = {'DEFAULT_CLOSED'}
 
@@ -961,11 +961,11 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, bpy.types.Panel):
         col.prop(mat, "use_mist")
 
         col = split.column()
-        col.label(text="Light Group:")
+        col.label(text=_("Light Group:"))
         col.prop(mat, "light_group", text="")
         row = col.row()
         row.active = bool(mat.light_group)
-        row.prop(mat, "use_light_group_exclusive", text="Exclusive")
+        row.prop(mat, "use_light_group_exclusive", text=_("Exclusive"))
 
 
 class MATERIAL_PT_custom_props(MaterialButtonsPanel, PropertyPanel, bpy.types.Panel):
index cdbcf2cf53313a35af88035f7ce3997f0fbbb49d..338b262b434f6a21c57088a4f0d25e4cfcad9a7a 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class ObjectButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -43,7 +43,7 @@ class OBJECT_PT_context_object(ObjectButtonsPanel, bpy.types.Panel):
 
 
 class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Transform"
+    bl_label = _("Transform")
 
     def draw(self, context):
         layout = self.layout
@@ -54,14 +54,14 @@ class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
 
         row.column().prop(ob, "location")
         if ob.rotation_mode == 'QUATERNION':
-            row.column().prop(ob, "rotation_quaternion", text="Rotation")
+            row.column().prop(ob, "rotation_quaternion", text=_("Rotation"))
         elif ob.rotation_mode == 'AXIS_ANGLE':
-            #row.column().label(text="Rotation")
-            #row.column().prop(pchan, "rotation_angle", text="Angle")
-            #row.column().prop(pchan, "rotation_axis", text="Axis")
-            row.column().prop(ob, "rotation_axis_angle", text="Rotation")
+            #row.column().label(text=_("Rotation"))
+            #row.column().prop(pchan, "rotation_angle", text=_("Angle"))
+            #row.column().prop(pchan, "rotation_axis", text=_("Axis"))
+            row.column().prop(ob, "rotation_axis_angle", text=_("Rotation"))
         else:
-            row.column().prop(ob, "rotation_euler", text="Rotation")
+            row.column().prop(ob, "rotation_euler", text=_("Rotation"))
 
         row.column().prop(ob, "scale")
 
@@ -69,7 +69,7 @@ class OBJECT_PT_transform(ObjectButtonsPanel, bpy.types.Panel):
 
 
 class OBJECT_PT_delta_transform(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Delta Transform"
+    bl_label = _("Delta Transform")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
@@ -81,21 +81,21 @@ class OBJECT_PT_delta_transform(ObjectButtonsPanel, bpy.types.Panel):
 
         row.column().prop(ob, "delta_location")
         if ob.rotation_mode == 'QUATERNION':
-            row.column().prop(ob, "delta_rotation_quaternion", text="Rotation")
+            row.column().prop(ob, "delta_rotation_quaternion", text=_("Rotation"))
         elif ob.rotation_mode == 'AXIS_ANGLE':
-            #row.column().label(text="Rotation")
-            #row.column().prop(pchan, "delta_rotation_angle", text="Angle")
-            #row.column().prop(pchan, "delta_rotation_axis", text="Axis")
-            #row.column().prop(ob, "delta_rotation_axis_angle", text="Rotation")
-            row.column().label(text="Not for Axis-Angle")
+            #row.column().label(text=_("Rotation"))
+            #row.column().prop(pchan, "delta_rotation_angle", text=_("Angle"))
+            #row.column().prop(pchan, "delta_rotation_axis", text=_("Axis"))
+            #row.column().prop(ob, "delta_rotation_axis_angle", text=_("Rotation"))
+            row.column().label(text=_("Not for Axis-Angle"))
         else:
-            row.column().prop(ob, "delta_rotation_euler", text="Rotation")
+            row.column().prop(ob, "delta_rotation_euler", text=_("Rotation"))
 
         row.column().prop(ob, "delta_scale")
 
 
 class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Transform Locks"
+    bl_label = _("Transform Locks")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
@@ -106,22 +106,22 @@ class OBJECT_PT_transform_locks(ObjectButtonsPanel, bpy.types.Panel):
         row = layout.row()
 
         col = row.column()
-        col.prop(ob, "lock_location", text="Location")
+        col.prop(ob, "lock_location", text=_("Location"))
 
         col = row.column()
         if ob.rotation_mode in {'QUATERNION', 'AXIS_ANGLE'}:
-            col.prop(ob, "lock_rotations_4d", text="Rotation")
+            col.prop(ob, "lock_rotations_4d", text=_("Rotation"))
             if ob.lock_rotations_4d:
                 col.prop(ob, "lock_rotation_w", text="W")
             col.prop(ob, "lock_rotation", text="")
         else:
-            col.prop(ob, "lock_rotation", text="Rotation")
+            col.prop(ob, "lock_rotation", text=_("Rotation"))
 
-        row.column().prop(ob, "lock_scale", text="Scale")
+        row.column().prop(ob, "lock_scale", text=_("Scale"))
 
 
 class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Relations"
+    bl_label = _("Relations")
 
     def draw(self, context):
         layout = self.layout
@@ -136,7 +136,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
         col.prop(ob, "pass_index")
 
         col = split.column()
-        col.label(text="Parent:")
+        col.label(text=_("Parent:"))
         col.prop(ob, "parent", text="")
 
         sub = col.column()
@@ -148,7 +148,7 @@ class OBJECT_PT_relations(ObjectButtonsPanel, bpy.types.Panel):
 
 
 class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Groups"
+    bl_label = _("Groups")
 
     def draw(self, context):
         layout = self.layout
@@ -156,7 +156,7 @@ class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
         ob = context.object
 
         row = layout.row(align=True)
-        row.operator("object.group_link", text="Add to Group")
+        row.operator("object.group_link", text=_("Add to Group"))
         row.operator("object.group_add", text="", icon='ZOOMIN')
 
         # XXX, this is bad practice, yes, I wrote it :( - campbell
@@ -175,19 +175,19 @@ class OBJECT_PT_groups(ObjectButtonsPanel, bpy.types.Panel):
                 split = col.box().split()
 
                 col = split.column()
-                col.prop(group, "layers", text="Dupli")
+                col.prop(group, "layers", text=_("Dupli"))
 
                 col = split.column()
                 col.prop(group, "dupli_offset", text="")
 
-                prop = col.operator("wm.context_set_value", text="From Cursor")
+                prop = col.operator("wm.context_set_value", text=_("From Cursor"))
                 prop.data_path = "object.users_group[%d].dupli_offset" % index
                 prop.value = value
                 index += 1
 
 
 class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
 
     def draw(self, context):
         layout = self.layout
@@ -196,11 +196,11 @@ class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
 
         split = layout.split()
         col = split.column()
-        col.prop(ob, "draw_type", text="Type")
+        col.prop(ob, "draw_type", text=_("Type"))
 
         col = split.column()
         row = col.row()
-        row.prop(ob, "show_bounds", text="Bounds")
+        row.prop(ob, "show_bounds", text=_("Bounds"))
         sub = row.row()
         sub.active = ob.show_bounds
         sub.prop(ob, "draw_bounds_type", text="")
@@ -208,20 +208,20 @@ class OBJECT_PT_display(ObjectButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(ob, "show_name", text="Name")
-        col.prop(ob, "show_axis", text="Axis")
-        col.prop(ob, "show_wire", text="Wire")
-        col.prop(ob, "color", text="Object Color")
+        col.prop(ob, "show_name", text=_("Name"))
+        col.prop(ob, "show_axis", text=_("Axis"))
+        col.prop(ob, "show_wire", text=_("Wire"))
+        col.prop(ob, "color", text=_("Object Color"))
 
         col = split.column()
-        col.prop(ob, "show_texture_space", text="Texture Space")
-        col.prop(ob, "show_x_ray", text="X-Ray")
+        col.prop(ob, "show_texture_space", text=_("Texture Space"))
+        col.prop(ob, "show_x_ray", text=_("X-Ray"))
         if ob.type == 'MESH':
-            col.prop(ob, "show_transparent", text="Transparency")
+            col.prop(ob, "show_transparent", text=_("Transparency"))
 
 
 class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Duplication"
+    bl_label = _("Duplication")
 
     def draw(self, context):
         layout = self.layout
@@ -234,32 +234,32 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column(align=True)
-            col.prop(ob, "dupli_frames_start", text="Start")
-            col.prop(ob, "dupli_frames_end", text="End")
+            col.prop(ob, "dupli_frames_start", text=_("Start"))
+            col.prop(ob, "dupli_frames_end", text=_("End"))
 
             col = split.column(align=True)
-            col.prop(ob, "dupli_frames_on", text="On")
-            col.prop(ob, "dupli_frames_off", text="Off")
+            col.prop(ob, "dupli_frames_on", text=_("On"))
+            col.prop(ob, "dupli_frames_off", text=_("Off"))
 
-            layout.prop(ob, "use_dupli_frames_speed", text="Speed")
+            layout.prop(ob, "use_dupli_frames_speed", text=_("Speed"))
 
         elif ob.dupli_type == 'VERTS':
-            layout.prop(ob, "use_dupli_vertices_rotation", text="Rotation")
+            layout.prop(ob, "use_dupli_vertices_rotation", text=_("Rotation"))
 
         elif ob.dupli_type == 'FACES':
 
             row = layout.row()
-            row.prop(ob, "use_dupli_faces_scale", text="Scale")
-            row.prop(ob, "dupli_faces_scale", text="Inherit Scale")
+            row.prop(ob, "use_dupli_faces_scale", text=_("Scale"))
+            row.prop(ob, "dupli_faces_scale", text=_("Inherit Scale"))
 
         elif ob.dupli_type == 'GROUP':
-            layout.prop(ob, "dupli_group", text="Group")
+            layout.prop(ob, "dupli_group", text=_("Group"))
 
 
 # XXX: the following options are all quite buggy, ancient hacks that should be dropped
 
 class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
-    bl_label = "Animation Hacks"
+    bl_label = _("Animation Hacks")
     bl_options = {'DEFAULT_CLOSED'}
 
     def draw(self, context):
@@ -270,21 +270,21 @@ class OBJECT_PT_animation(ObjectButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Time Offset:")
-        col.prop(ob, "use_time_offset_edit", text="Edit")
+        col.label(text=_("Time Offset:"))
+        col.prop(ob, "use_time_offset_edit", text=_("Edit"))
         row = col.row()
-        row.prop(ob, "use_time_offset_parent", text="Parent")
+        row.prop(ob, "use_time_offset_parent", text=_("Parent"))
         row.active = (ob.parent is not None)
         row = col.row()
         row.prop(ob, "use_slow_parent")
         row.active = (ob.parent is not None)
-        col.prop(ob, "time_offset", text="Offset")
+        col.prop(ob, "time_offset", text=_("Offset"))
 
         # XXX: these are still used for a few curve-related tracking features
         col = split.column()
-        col.label(text="Tracking Axes:")
-        col.prop(ob, "track_axis", text="Axis")
-        col.prop(ob, "up_axis", text="Up Axis")
+        col.label(text=_("Tracking Axes:"))
+        col.prop(ob, "track_axis", text=_("Axis"))
+        col.prop(ob, "up_axis", text=_("Up Axis"))
 
 
 from bl_ui.properties_animviz import (
@@ -311,8 +311,8 @@ class OBJECT_PT_motion_paths(MotionPathButtonsPanel, bpy.types.Panel):
         layout.separator()
 
         row = layout.row()
-        row.operator("object.paths_calculate", text="Calculate Paths")
-        row.operator("object.paths_clear", text="Clear Paths")
+        row.operator("object.paths_calculate", text=_("Calculate Paths"))
+        row.operator("object.paths_clear", text=_("Clear Paths"))
 
 
 class OBJECT_PT_onion_skinning(OnionSkinButtonsPanel):  # , bpy.types.Panel): # inherit from panel when ready
index 5f79dd3127ad15f9366776006df8533a5c90b4e6..319281f0a2280d7c5a8c9eb636d4ab40834e3046 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 class ConstraintButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -42,7 +42,7 @@ class ConstraintButtonsPanel():
 
             split = layout.split(percentage=0.2)
 
-            split.label(text="Space:")
+            split.label(text=_("Space:"))
             row = split.row()
 
             if target:
@@ -59,21 +59,21 @@ class ConstraintButtonsPanel():
 
         if con.target and subtargets:
             if con.target.type == 'ARMATURE':
-                layout.prop_search(con, "subtarget", con.target.data, "bones", text="Bone")
+                layout.prop_search(con, "subtarget", con.target.data, "bones", text=_("Bone"))
 
                 if hasattr(con, "head_tail"):
                     row = layout.row()
-                    row.label(text="Head/Tail:")
+                    row.label(text=_("Head/Tail:"))
                     row.prop(con, "head_tail", text="")
             elif con.target.type in {'MESH', 'LATTICE'}:
-                layout.prop_search(con, "subtarget", con.target, "vertex_groups", text="Vertex Group")
+                layout.prop_search(con, "subtarget", con.target, "vertex_groups", text=_("Vertex Group"))
 
     def ik_template(self, layout, con):
         # only used for iTaSC
         layout.prop(con, "pole_target")
 
         if con.pole_target and con.pole_target.type == 'ARMATURE':
-            layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone")
+            layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text=_("Bone"))
 
         if con.pole_target:
             row = layout.row()
@@ -95,19 +95,19 @@ class ConstraintButtonsPanel():
         split = layout.split()
 
         col = split.column()
-        col.label(text="Location:")
+        col.label(text=_("Location:"))
         col.prop(con, "use_location_x", text="X")
         col.prop(con, "use_location_y", text="Y")
         col.prop(con, "use_location_z", text="Z")
 
         col = split.column()
-        col.label(text="Rotation:")
+        col.label(text=_("Rotation:"))
         col.prop(con, "use_rotation_x", text="X")
         col.prop(con, "use_rotation_y", text="Y")
         col.prop(con, "use_rotation_z", text="Z")
 
         col = split.column()
-        col.label(text="Scale:")
+        col.label(text=_("Scale:"))
         col.prop(con, "use_scale_x", text="X")
         col.prop(con, "use_scale_y", text="Y")
         col.prop(con, "use_scale_z", text="Z")
@@ -120,11 +120,11 @@ class ConstraintButtonsPanel():
         self.target_template(layout, con)
 
         row = layout.row()
-        row.label(text="To:")
+        row.label(text=_("To:"))
         row.prop(con, "track_axis", expand=True)
 
         row = layout.row()
-        row.prop(con, "up_axis", text="Up")
+        row.prop(con, "up_axis", text=_("Up"))
         row.prop(con, "use_target_z")
 
         self.space_template(layout, con)
@@ -139,7 +139,7 @@ class ConstraintButtonsPanel():
             layout.prop(con, "pole_target")
 
             if con.pole_target and con.pole_target.type == 'ARMATURE':
-                layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text="Bone")
+                layout.prop_search(con, "pole_subtarget", con.pole_target.data, "bones", text=_("Bone"))
 
             if con.pole_target:
                 row = layout.row()
@@ -151,11 +151,11 @@ class ConstraintButtonsPanel():
             col.prop(con, "iterations")
             col.prop(con, "chain_count")
 
-            col.label(text="Weight:")
-            col.prop(con, "weight", text="Position", slider=True)
+            col.label(text=_("Weight:"))
+            col.prop(con, "weight", text=_("Position"), slider=True)
             sub = col.column()
             sub.active = con.use_rotation
-            sub.prop(con, "orient_weight", text="Rotation", slider=True)
+            sub.prop(con, "orient_weight", text=_("Rotation"), slider=True)
 
             col = split.column()
             col.prop(con, "use_tail")
@@ -169,16 +169,16 @@ class ConstraintButtonsPanel():
         self.ik_template(layout, con)
 
         row = layout.row()
-        row.label(text="Axis Ref:")
+        row.label(text=_("Axis Ref:"))
         row.prop(con, "reference_axis", expand=True)
         split = layout.split(percentage=0.33)
         split.row().prop(con, "use_location")
         row = split.row()
-        row.prop(con, "weight", text="Weight", slider=True)
+        row.prop(con, "weight", text=_("Weight"), slider=True)
         row.active = con.use_location
         split = layout.split(percentage=0.33)
         row = split.row()
-        row.label(text="Lock:")
+        row.label(text=_("Lock:"))
         row = split.row()
         row.prop(con, "lock_location_x", text="X")
         row.prop(con, "lock_location_y", text="Y")
@@ -188,11 +188,11 @@ class ConstraintButtonsPanel():
         split = layout.split(percentage=0.33)
         split.row().prop(con, "use_rotation")
         row = split.row()
-        row.prop(con, "orient_weight", text="Weight", slider=True)
+        row.prop(con, "orient_weight", text=_("Weight"), slider=True)
         row.active = con.use_rotation
         split = layout.split(percentage=0.33)
         row = split.row()
-        row.label(text="Lock:")
+        row.label(text=_("Lock:"))
         row = split.row()
         row.prop(con, "lock_rotation_x", text="X")
         row.prop(con, "lock_rotation_y", text="Y")
@@ -206,8 +206,8 @@ class ConstraintButtonsPanel():
         layout.prop(con, "limit_mode")
 
         row = layout.row()
-        row.prop(con, "weight", text="Weight", slider=True)
-        row.prop(con, "distance", text="Distance", slider=True)
+        row.prop(con, "weight", text=_("Weight"), slider=True)
+        row.prop(con, "distance", text=_("Distance"), slider=True)
 
     def FOLLOW_PATH(self, context, layout, con):
         self.target_template(layout, con)
@@ -221,16 +221,16 @@ class ConstraintButtonsPanel():
         col = split.column()
         col.prop(con, "use_fixed_location")
         if con.use_fixed_location:
-            col.prop(con, "offset_factor", text="Offset")
+            col.prop(con, "offset_factor", text=_("Offset"))
         else:
             col.prop(con, "offset")
 
         row = layout.row()
-        row.label(text="Forward:")
+        row.label(text=_("Forward:"))
         row.prop(con, "forward_axis", expand=True)
 
         row = layout.row()
-        row.prop(con, "up_axis", text="Up")
+        row.prop(con, "up_axis", text=_("Up"))
         row.label()
 
     def LIMIT_ROTATION(self, context, layout, con):
@@ -241,29 +241,29 @@ class ConstraintButtonsPanel():
         col.prop(con, "use_limit_x")
         sub = col.column()
         sub.active = con.use_limit_x
-        sub.prop(con, "min_x", text="Min")
-        sub.prop(con, "max_x", text="Max")
+        sub.prop(con, "min_x", text=_("Min"))
+        sub.prop(con, "max_x", text=_("Max"))
 
         col = split.column(align=True)
         col.prop(con, "use_limit_y")
         sub = col.column()
         sub.active = con.use_limit_y
-        sub.prop(con, "min_y", text="Min")
-        sub.prop(con, "max_y", text="Max")
+        sub.prop(con, "min_y", text=_("Min"))
+        sub.prop(con, "max_y", text=_("Max"))
 
         col = split.column(align=True)
         col.prop(con, "use_limit_z")
         sub = col.column()
         sub.active = con.use_limit_z
-        sub.prop(con, "min_z", text="Min")
-        sub.prop(con, "max_z", text="Max")
+        sub.prop(con, "min_z", text=_("Min"))
+        sub.prop(con, "max_z", text=_("Max"))
 
         row = layout.row()
         row.prop(con, "use_transform_limit")
         row.label()
 
         row = layout.row()
-        row.label(text="Convert:")
+        row.label(text=_("Convert:"))
         row.prop(con, "owner_space", text="")
 
     def LIMIT_LOCATION(self, context, layout, con):
@@ -304,7 +304,7 @@ class ConstraintButtonsPanel():
         row.label()
 
         row = layout.row()
-        row.label(text="Convert:")
+        row.label(text=_("Convert:"))
         row.prop(con, "owner_space", text="")
 
     def LIMIT_SCALE(self, context, layout, con):
@@ -345,7 +345,7 @@ class ConstraintButtonsPanel():
         row.label()
 
         row = layout.row()
-        row.label(text="Convert:")
+        row.label(text=_("Convert:"))
         row.prop(con, "owner_space", text="")
 
     def COPY_ROTATION(self, context, layout, con):
@@ -357,19 +357,19 @@ class ConstraintButtonsPanel():
         col.prop(con, "use_x", text="X")
         sub = col.column()
         sub.active = con.use_x
-        sub.prop(con, "invert_x", text="Invert")
+        sub.prop(con, "invert_x", text=_("Invert"))
 
         col = split.column()
         col.prop(con, "use_y", text="Y")
         sub = col.column()
         sub.active = con.use_y
-        sub.prop(con, "invert_y", text="Invert")
+        sub.prop(con, "invert_y", text=_("Invert"))
 
         col = split.column()
         col.prop(con, "use_z", text="Z")
         sub = col.column()
         sub.active = con.use_z
-        sub.prop(con, "invert_z", text="Invert")
+        sub.prop(con, "invert_z", text=_("Invert"))
 
         layout.prop(con, "use_offset")
 
@@ -384,19 +384,19 @@ class ConstraintButtonsPanel():
         col.prop(con, "use_x", text="X")
         sub = col.column()
         sub.active = con.use_x
-        sub.prop(con, "invert_x", text="Invert")
+        sub.prop(con, "invert_x", text=_("Invert"))
 
         col = split.column()
         col.prop(con, "use_y", text="Y")
         sub = col.column()
         sub.active = con.use_y
-        sub.prop(con, "invert_y", text="Invert")
+        sub.prop(con, "invert_y", text=_("Invert"))
 
         col = split.column()
         col.prop(con, "use_z", text="Z")
         sub = col.column()
         sub.active = con.use_z
-        sub.prop(con, "invert_z", text="Invert")
+        sub.prop(con, "invert_z", text=_("Invert"))
 
         layout.prop(con, "use_offset")
 
@@ -417,7 +417,7 @@ class ConstraintButtonsPanel():
     def MAINTAIN_VOLUME(self, context, layout, con):
 
         row = layout.row()
-        row.label(text="Free:")
+        row.label(text=_("Free:"))
         row.prop(con, "free_axis", expand=True)
 
         layout.prop(con, "volume")
@@ -441,28 +441,28 @@ class ConstraintButtonsPanel():
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Action Length:")
-        col.prop(con, "frame_start", text="Start")
-        col.prop(con, "frame_end", text="End")
+        col.label(text=_("Action Length:"))
+        col.prop(con, "frame_start", text=_("Start"))
+        col.prop(con, "frame_end", text=_("End"))
 
         col = split.column(align=True)
-        col.label(text="Target Range:")
-        col.prop(con, "min", text="Min")
-        col.prop(con, "max", text="Max")
+        col.label(text=_("Target Range:"))
+        col.prop(con, "min", text=_("Min"))
+        col.prop(con, "max", text=_("Max"))
 
         row = layout.row()
-        row.label(text="Convert:")
+        row.label(text=_("Convert:"))
         row.prop(con, "target_space", text="")
 
     def LOCKED_TRACK(self, context, layout, con):
         self.target_template(layout, con)
 
         row = layout.row()
-        row.label(text="To:")
+        row.label(text=_("To:"))
         row.prop(con, "track_axis", expand=True)
 
         row = layout.row()
-        row.label(text="Lock:")
+        row.label(text=_("Lock:"))
         row.prop(con, "lock_axis", expand=True)
 
     def LIMIT_DISTANCE(self, context, layout, con):
@@ -473,23 +473,23 @@ class ConstraintButtonsPanel():
         col.operator("constraint.limitdistance_reset")
 
         row = layout.row()
-        row.label(text="Clamp Region:")
+        row.label(text=_("Clamp Region:"))
         row.prop(con, "limit_mode", text="")
 
     def STRETCH_TO(self, context, layout, con):
         self.target_template(layout, con)
 
         row = layout.row()
-        row.prop(con, "rest_length", text="Rest Length")
-        row.operator("constraint.stretchto_reset", text="Reset")
+        row.prop(con, "rest_length", text=_("Rest Length"))
+        row.operator("constraint.stretchto_reset", text=_("Reset"))
 
-        layout.prop(con, "bulge", text="Volume Variation")
+        layout.prop(con, "bulge", text=_("Volume Variation"))
 
         row = layout.row()
-        row.label(text="Volume:")
+        row.label(text=_("Volume:"))
         row.prop(con, "volume", expand=True)
 
-        row.label(text="Plane:")
+        row.label(text=_("Plane:"))
         row.prop(con, "keep_axis", expand=True)
 
     def FLOOR(self, context, layout, con):
@@ -502,7 +502,7 @@ class ConstraintButtonsPanel():
         layout.prop(con, "offset")
 
         row = layout.row()
-        row.label(text="Min/Max:")
+        row.label(text=_("Min/Max:"))
         row.prop(con, "floor_location", expand=True)
 
         self.space_template(layout, con)
@@ -514,113 +514,113 @@ class ConstraintButtonsPanel():
         layout.prop(con, "child")
 
         row = layout.row()
-        row.prop(con, "use_linked_collision", text="Linked Collision")
-        row.prop(con, "show_pivot", text="Display Pivot")
+        row.prop(con, "use_linked_collision", text=_("Linked Collision"))
+        row.prop(con, "show_pivot", text=_("Display Pivot"))
 
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Pivot:")
+        col.label(text=_("Pivot:"))
         col.prop(con, "pivot_x", text="X")
         col.prop(con, "pivot_y", text="Y")
         col.prop(con, "pivot_z", text="Z")
 
         col = split.column(align=True)
-        col.label(text="Axis:")
+        col.label(text=_("Axis:"))
         col.prop(con, "axis_x", text="X")
         col.prop(con, "axis_y", text="Y")
         col.prop(con, "axis_z", text="Z")
 
         if con.pivot_type == 'CONE_TWIST':
-            layout.label(text="Limits:")
+            layout.label(text=_("Limits:"))
             split = layout.split()
 
             col = split.column()
-            col.prop(con, "use_angular_limit_x", text="Angle X")
+            col.prop(con, "use_angular_limit_x", text=_("Angle X"))
             sub = col.column()
             sub.active = con.use_angular_limit_x
             sub.prop(con, "limit_angle_max_x", text="")
 
             col = split.column()
-            col.prop(con, "use_angular_limit_y", text="Angle Y")
+            col.prop(con, "use_angular_limit_y", text=_("Angle Y"))
             sub = col.column()
             sub.active = con.use_angular_limit_y
             sub.prop(con, "limit_angle_max_y", text="")
 
             col = split.column()
-            col.prop(con, "use_angular_limit_z", text="Angle Z")
+            col.prop(con, "use_angular_limit_z", text=_("Angle Z"))
             sub = col.column()
             sub.active = con.use_angular_limit_z
             sub.prop(con, "limit_angle_max_z", text="")
 
         elif con.pivot_type == 'GENERIC_6_DOF':
-            layout.label(text="Limits:")
+            layout.label(text=_("Limits:"))
             split = layout.split()
 
             col = split.column(align=True)
             col.prop(con, "use_limit_x", text="X")
             sub = col.column()
             sub.active = con.use_limit_x
-            sub.prop(con, "limit_min_x", text="Min")
-            sub.prop(con, "limit_max_x", text="Max")
+            sub.prop(con, "limit_min_x", text=_("Min"))
+            sub.prop(con, "limit_max_x", text=_("Max"))
 
             col = split.column(align=True)
             col.prop(con, "use_limit_y", text="Y")
             sub = col.column()
             sub.active = con.use_limit_y
-            sub.prop(con, "limit_min_y", text="Min")
-            sub.prop(con, "limit_max_y", text="Max")
+            sub.prop(con, "limit_min_y", text=_("Min"))
+            sub.prop(con, "limit_max_y", text=_("Max"))
 
             col = split.column(align=True)
             col.prop(con, "use_limit_z", text="Z")
             sub = col.column()
             sub.active = con.use_limit_z
-            sub.prop(con, "limit_min_z", text="Min")
-            sub.prop(con, "limit_max_z", text="Max")
+            sub.prop(con, "limit_min_z", text=_("Min"))
+            sub.prop(con, "limit_max_z", text=_("Max"))
 
             split = layout.split()
 
             col = split.column(align=True)
-            col.prop(con, "use_angular_limit_x", text="Angle X")
+            col.prop(con, "use_angular_limit_x", text=_("Angle X"))
             sub = col.column()
             sub.active = con.use_angular_limit_x
-            sub.prop(con, "limit_angle_min_x", text="Min")
-            sub.prop(con, "limit_angle_max_x", text="Max")
+            sub.prop(con, "limit_angle_min_x", text=_("Min"))
+            sub.prop(con, "limit_angle_max_x", text=_("Max"))
 
             col = split.column(align=True)
-            col.prop(con, "use_angular_limit_y", text="Angle Y")
+            col.prop(con, "use_angular_limit_y", text=_("Angle Y"))
             sub = col.column()
             sub.active = con.use_angular_limit_y
-            sub.prop(con, "limit_angle_min_y", text="Min")
-            sub.prop(con, "limit_angle_max_y", text="Max")
+            sub.prop(con, "limit_angle_min_y", text=_("Min"))
+            sub.prop(con, "limit_angle_max_y", text=_("Max"))
 
             col = split.column(align=True)
-            col.prop(con, "use_angular_limit_z", text="Angle Z")
+            col.prop(con, "use_angular_limit_z", text=_("Angle Z"))
             sub = col.column()
             sub.active = con.use_angular_limit_z
-            sub.prop(con, "limit_angle_min_z", text="Min")
-            sub.prop(con, "limit_angle_max_z", text="Max")
+            sub.prop(con, "limit_angle_min_z", text=_("Min"))
+            sub.prop(con, "limit_angle_max_z", text=_("Max"))
 
         elif con.pivot_type == 'HINGE':
-            layout.label(text="Limits:")
+            layout.label(text=_("Limits:"))
             split = layout.split()
 
             row = split.row(align=True)
             col = row.column()
-            col.prop(con, "use_angular_limit_x", text="Angle X")
+            col.prop(con, "use_angular_limit_x", text=_("Angle X"))
 
             col = row.column()
             col.active = con.use_angular_limit_x
-            col.prop(con, "limit_angle_min_x", text="Min")
+            col.prop(con, "limit_angle_min_x", text=_("Min"))
             col = row.column()
             col.active = con.use_angular_limit_x
-            col.prop(con, "limit_angle_max_x", text="Max")
+            col.prop(con, "limit_angle_max_x", text=_("Max"))
 
     def CLAMP_TO(self, context, layout, con):
         self.target_template(layout, con)
 
         row = layout.row()
-        row.label(text="Main Axis:")
+        row.label(text=_("Main Axis:"))
         row.prop(con, "main_axis", expand=True)
 
         layout.prop(con, "use_cyclic")
@@ -628,32 +628,32 @@ class ConstraintButtonsPanel():
     def TRANSFORM(self, context, layout, con):
         self.target_template(layout, con)
 
-        layout.prop(con, "use_motion_extrapolate", text="Extrapolate")
+        layout.prop(con, "use_motion_extrapolate", text=_("Extrapolate"))
 
         col = layout.column()
-        col.row().label(text="Source:")
+        col.row().label(text=_("Source:"))
         col.row().prop(con, "map_from", expand=True)
 
         split = layout.split()
 
         sub = split.column(align=True)
         sub.label(text="X:")
-        sub.prop(con, "from_min_x", text="Min")
-        sub.prop(con, "from_max_x", text="Max")
+        sub.prop(con, "from_min_x", text=_("Min"))
+        sub.prop(con, "from_max_x", text=_("Max"))
 
         sub = split.column(align=True)
         sub.label(text="Y:")
-        sub.prop(con, "from_min_y", text="Min")
-        sub.prop(con, "from_max_y", text="Max")
+        sub.prop(con, "from_min_y", text=_("Min"))
+        sub.prop(con, "from_max_y", text=_("Max"))
 
         sub = split.column(align=True)
         sub.label(text="Z:")
-        sub.prop(con, "from_min_z", text="Min")
-        sub.prop(con, "from_max_z", text="Max")
+        sub.prop(con, "from_min_z", text=_("Min"))
+        sub.prop(con, "from_max_z", text=_("Max"))
 
         col = layout.column()
         row = col.row()
-        row.label(text="Source to Destination Mapping:")
+        row.label(text=_("Source to Destination Mapping:"))
 
         # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't
         # open it. Thus we are using the hardcoded value instead.
@@ -672,7 +672,7 @@ class ConstraintButtonsPanel():
         split = layout.split()
 
         col = split.column()
-        col.label(text="Destination:")
+        col.label(text=_("Destination:"))
         col.row().prop(con, "map_to", expand=True)
 
         split = layout.split()
@@ -681,22 +681,22 @@ class ConstraintButtonsPanel():
         col.label(text="X:")
 
         sub = col.column(align=True)
-        sub.prop(con, "to_min_x", text="Min")
-        sub.prop(con, "to_max_x", text="Max")
+        sub.prop(con, "to_min_x", text=_("Min"))
+        sub.prop(con, "to_max_x", text=_("Max"))
 
         col = split.column()
         col.label(text="Y:")
 
         sub = col.column(align=True)
-        sub.prop(con, "to_min_y", text="Min")
-        sub.prop(con, "to_max_y", text="Max")
+        sub.prop(con, "to_min_y", text=_("Min"))
+        sub.prop(con, "to_max_y", text=_("Max"))
 
         col = split.column()
         col.label(text="Z:")
 
         sub = col.column(align=True)
-        sub.prop(con, "to_min_z", text="Min")
-        sub.prop(con, "to_max_z", text="Max")
+        sub.prop(con, "to_min_z", text=_("Min"))
+        sub.prop(con, "to_max_z", text=_("Max"))
 
         self.space_template(layout, con)
 
@@ -716,20 +716,20 @@ class ConstraintButtonsPanel():
         self.target_template(layout, con)
 
         row = layout.row()
-        row.label(text="To:")
+        row.label(text=_("To:"))
         row.prop(con, "track_axis", expand=True)
 
     def SPLINE_IK(self, context, layout, con):
         self.target_template(layout, con)
 
         col = layout.column()
-        col.label(text="Spline Fitting:")
+        col.label(text=_("Spline Fitting:"))
         col.prop(con, "chain_count")
         col.prop(con, "use_even_divisions")
         col.prop(con, "use_chain_offset")
 
         col = layout.column()
-        col.label(text="Chain Scaling:")
+        col.label(text=_("Chain Scaling:"))
         col.prop(con, "use_y_stretch")
         col.prop(con, "xz_scale_mode")
         col.prop(con, "use_curve_radius")
@@ -739,24 +739,24 @@ class ConstraintButtonsPanel():
 
         if con.target:
             col = layout.column()
-            col.prop(con, "offset", text="Pivot Offset")
+            col.prop(con, "offset", text=_("Pivot Offset"))
         else:
             col = layout.column()
             col.prop(con, "use_relative_location")
             if con.use_relative_location:
-                col.prop(con, "offset", text="Relative Pivot Point")
+                col.prop(con, "offset", text=_("Relative Pivot Point"))
             else:
-                col.prop(con, "offset", text="Absolute Pivot Point")
+                col.prop(con, "offset", text=_("Absolute Pivot Point"))
 
         col = layout.column()
-        col.prop(con, "rotation_range", text="Pivot When")
+        col.prop(con, "rotation_range", text=_("Pivot When"))
 
     def SCRIPT(self, context, layout, con):
-        layout.label("Blender 2.5 has no py-constraints")
+        layout.label( _("Blender 2.5 has no py-constraints") )
 
 
 class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
-    bl_label = "Object Constraints"
+    bl_label = _("Object Constraints")
     bl_context = "constraint"
 
     @classmethod
@@ -771,7 +771,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
         if ob.mode == 'POSE':
             box = layout.box()
             box.alert = True
-            box.label(icon='INFO', text="See Bone Constraints tab to Add Constraints to active bone")
+            box.label(icon='INFO', text=_("See Bone Constraints tab to Add Constraints to active bone"))
         else:
             layout.operator_menu_enum("object.constraint_add", "type")
 
@@ -780,7 +780,7 @@ class OBJECT_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
 
 
 class BONE_PT_constraints(ConstraintButtonsPanel, bpy.types.Panel):
-    bl_label = "Bone Constraints"
+    bl_label = _("Bone Constraints")
     bl_context = "bone_constraint"
 
     @classmethod
index 4c92296dacdc451a7ea8e1b0e55b089d7a5144f2..dfb90617893d4e3231c439402c2c8cbc379d83c0 100644 (file)
@@ -19,6 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
+from blf import gettext as _
 
 from bl_ui.properties_physics_common import (
     point_cache_ui,
@@ -107,17 +108,17 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
             layout.template_ID(context.space_data, "pin_id")
 
             if part.is_fluid:
-                layout.label(text="Settings used for fluid.")
+                layout.label(text=_("Settings used for fluid."))
                 return
 
-            layout.prop(part, "type", text="Type")
+            layout.prop(part, "type", text=_("Type"))
 
         elif not psys.settings:
             split = layout.split(percentage=0.32)
 
             col = split.column()
-            col.label(text="Name:")
-            col.label(text="Settings:")
+            col.label(text=_("Name:"))
+            col.label(text=_("Settings:"))
 
             col = split.column()
             col.prop(psys, "name", text="")
@@ -127,10 +128,10 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
 
             split = layout.split(percentage=0.32)
             col = split.column()
-            col.label(text="Name:")
+            col.label(text=_("Name:"))
             if part.is_fluid == False:
-                col.label(text="Settings:")
-                col.label(text="Type:")
+                col.label(text=_("Settings:"))
+                col.label(text=_("Type:"))
 
             col = split.column()
             col.prop(psys, "name", text="")
@@ -140,8 +141,8 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
                 row.template_ID(psys, "settings", new="particle.new")
 
             #row = layout.row()
-            #row.label(text="Viewport")
-            #row.label(text="Render")
+            #row.label(text=_("Viewport"))
+            #row.label(text=_("Render"))
 
             if part.is_fluid:
                 layout.label(text=str(part.count) + " fluid particles for this frame.")
@@ -156,7 +157,7 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
             split = layout.split(percentage=0.65)
             if part.type == 'HAIR':
                 if psys != None and psys.is_edited:
-                    split.operator("particle.edited_clear", text="Free Edit")
+                    split.operator("particle.edited_clear", text=_("Free Edit"))
                 else:
                     row = split.row()
                     row.enabled = particle_panel_enabled(context, psys)
@@ -173,11 +174,11 @@ class PARTICLE_PT_context_particles(ParticleButtonsPanel, bpy.types.Panel):
             elif psys != None and part.type == 'REACTOR':
                 split.enabled = particle_panel_enabled(context, psys)
                 split.prop(psys, "reactor_target_object")
-                split.prop(psys, "reactor_target_particle_system", text="Particle System")
+                split.prop(psys, "reactor_target_particle_system", text=_("Particle System"))
 
 
 class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Emission"
+    bl_label = _("Emission")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -220,7 +221,7 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "lifetime")
             col.prop(part, "lifetime_random", slider=True)
 
-        layout.label(text="Emit From:")
+        layout.label(text=_("Emit From:"))
         layout.prop(part, "emit_from", expand=True)
 
         row = layout.row()
@@ -238,15 +239,15 @@ class PARTICLE_PT_emission(ParticleButtonsPanel, bpy.types.Panel):
 
             row = layout.row()
             if part.distribution == 'JIT':
-                row.prop(part, "userjit", text="Particles/Face")
-                row.prop(part, "jitter_factor", text="Jittering Amount", slider=True)
+                row.prop(part, "userjit", text=_("Particles/Face"))
+                row.prop(part, "jitter_factor", text=_("Jittering Amount"), slider=True)
             elif part.distribution == 'GRID':
                 row.prop(part, "grid_resolution")
-                row.prop(part, "grid_random", text="Random", slider=True)
+                row.prop(part, "grid_random", text=_("Random"), slider=True)
 
 
 class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Hair dynamics"
+    bl_label = _("Hair dynamics")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -283,26 +284,26 @@ class PARTICLE_PT_hair_dynamics(ParticleButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Material:")
+        col.label(text=_("Material:"))
         sub = col.column(align=True)
-        sub.prop(cloth, "pin_stiffness", text="Stiffness")
+        sub.prop(cloth, "pin_stiffness", text=_("Stiffness"))
         sub.prop(cloth, "mass")
-        sub.prop(cloth, "bending_stiffness", text="Bending")
+        sub.prop(cloth, "bending_stiffness", text=_("Bending"))
         sub.prop(cloth, "internal_friction", slider=True)
         sub.prop(cloth, "collider_friction", slider=True)
 
         col = split.column()
-        col.label(text="Damping:")
+        col.label(text=_("Damping:"))
         sub = col.column(align=True)
-        sub.prop(cloth, "spring_damping", text="Spring")
-        sub.prop(cloth, "air_damping", text="Air")
+        sub.prop(cloth, "spring_damping", text=_("Spring"))
+        sub.prop(cloth, "air_damping", text=_("Air"))
 
-        col.label(text="Quality:")
-        col.prop(cloth, "quality", text="Steps", slider=True)
+        col.label(text=_("Quality:"))
+        col.prop(cloth, "quality", text=_("Steps"), slider=True)
 
 
 class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Cache"
+    bl_label = _("Cache")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -328,7 +329,7 @@ class PARTICLE_PT_cache(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Velocity"
+    bl_label = _("Velocity")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -354,17 +355,17 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Emitter Geometry:")
+        col.label(text=_("Emitter Geometry:"))
         col.prop(part, "normal_factor")
         sub = col.column(align=True)
         sub.prop(part, "tangent_factor")
         sub.prop(part, "tangent_phase", slider=True)
 
         col = split.column()
-        col.label(text="Emitter Object:")
+        col.label(text=_("Emitter Object:"))
         col.prop(part, "object_align_factor", text="")
 
-        layout.label(text="Other:")
+        layout.label(text=_("Other:"))
         row = layout.row()
         if part.emit_from == 'PARTICLE':
             row.prop(part, "particle_factor")
@@ -378,7 +379,7 @@ class PARTICLE_PT_velocity(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Rotation"
+    bl_label = _("Rotation")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -405,21 +406,21 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
         layout.enabled = particle_panel_enabled(context, psys)
 
         row = layout.row()
-        row.label(text="Initial Rotation:")
+        row.label(text=_("Initial Rotation:"))
         row.prop(part, "use_dynamic_rotation")
 
         split = layout.split()
 
         col = split.column(align=True)
         col.prop(part, "rotation_mode", text="")
-        col.prop(part, "rotation_factor_random", slider=True, text="Random")
+        col.prop(part, "rotation_factor_random", slider=True, text=_("Random"))
 
         col = split.column(align=True)
         col.prop(part, "phase_factor", slider=True)
-        col.prop(part, "phase_factor_random", text="Random", slider=True)
+        col.prop(part, "phase_factor_random", text=_("Random"), slider=True)
 
         col = layout.column()
-        col.label(text="Angular Velocity:")
+        col.label(text=_("Angular Velocity:"))
         col.row().prop(part, "angular_velocity_mode", expand=True)
 
         if part.angular_velocity_mode != 'NONE':
@@ -427,7 +428,7 @@ class PARTICLE_PT_rotation(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Physics"
+    bl_label = _("Physics")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -460,19 +461,19 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
         if part.physics_type != 'NO':
             col = row.column(align=True)
             col.prop(part, "mass")
-            col.prop(part, "use_multiply_size_mass", text="Multiply mass with size")
+            col.prop(part, "use_multiply_size_mass", text=_("Multiply mass with size"))
 
         if part.physics_type in ('NEWTON', 'FLUID'):
             split = layout.split()
 
             col = split.column()
-            col.label(text="Forces:")
+            col.label(text=_("Forces:"))
             col.prop(part, "brownian_factor")
             col.prop(part, "drag_factor", slider=True)
             col.prop(part, "damping", slider=True)
 
             col = split.column()
-            col.label(text="Integration:")
+            col.label(text=_("Integration:"))
             col.prop(part, "integrator", text="")
             col.prop(part, "timestep")
             col.prop(part, "subframes")
@@ -487,13 +488,13 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Fluid properties:")
-                col.prop(fluid, "stiffness", text="Stiffness")
-                col.prop(fluid, "linear_viscosity", text="Viscosity")
-                col.prop(fluid, "buoyancy", text="Buoancy", slider=True)
+                col.label(text=_("Fluid properties:"))
+                col.prop(fluid, "stiffness", text=_("Stiffness"))
+                col.prop(fluid, "linear_viscosity", text=_("Viscosity"))
+                col.prop(fluid, "buoyancy", text=_("Buoancy"), slider=True)
 
                 col = split.column()
-                col.label(text="Advanced:")
+                col.label(text=_("Advanced:"))
 
                 sub = col.row()
                 sub.prop(fluid, "repulsion", slider=fluid.factor_repulsion)
@@ -514,8 +515,8 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Springs:")
-                col.prop(fluid, "spring_force", text="Force")
+                col.label(text=_("Springs:"))
+                col.prop(fluid, "spring_force", text=_("Force"))
                 col.prop(fluid, "use_viscoelastic_springs")
                 sub = col.column(align=True)
                 sub.active = fluid.use_viscoelastic_springs
@@ -523,7 +524,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                 sub.prop(fluid, "plasticity", slider=True)
 
                 col = split.column()
-                col.label(text="Advanced:")
+                col.label(text=_("Advanced:"))
                 sub = col.row()
                 sub.prop(fluid, "rest_length", slider=fluid.factor_rest_length)
                 sub.prop(fluid, "factor_rest_length", text="")
@@ -531,7 +532,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                 sub = col.column()
                 sub.active = fluid.use_viscoelastic_springs
                 sub.prop(fluid, "use_initial_rest_length")
-                sub.prop(fluid, "spring_frames", text="Frames")
+                sub.prop(fluid, "spring_frames", text=_("Frames"))
 
         elif part.physics_type == 'KEYED':
             split = layout.split()
@@ -540,11 +541,11 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
             row = layout.row()
             col = row.column()
             col.active = not psys.use_keyed_timing
-            col.prop(part, "keyed_loops", text="Loops")
+            col.prop(part, "keyed_loops", text=_("Loops"))
             if psys:
-                row.prop(psys, "use_keyed_timing", text="Use Timing")
+                row.prop(psys, "use_keyed_timing", text=_("Use Timing"))
 
-            layout.label(text="Keys:")
+            layout.label(text=_("Keys:"))
         elif part.physics_type == 'BOIDS':
             boids = part.boids
 
@@ -580,7 +581,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
             row = layout.row()
 
             col = row.column(align=True)
-            col.label(text="Battle:")
+            col.label(text=_("Battle:"))
             col.prop(boids, "health")
             col.prop(boids, "strength")
             col.prop(boids, "aggression")
@@ -588,16 +589,16 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(boids, "range")
 
             col = row.column()
-            col.label(text="Misc:")
+            col.label(text=_("Misc:"))
             col.prop(boids, "bank", slider=True)
             col.prop(boids, "pitch", slider=True)
             col.prop(boids, "height", slider=True)
 
         if psys and part.physics_type in {'KEYED', 'BOIDS', 'FLUID'}:
             if part.physics_type == 'BOIDS':
-                layout.label(text="Relations:")
+                layout.label(text=_("Relations:"))
             elif part.physics_type == 'FLUID':
-                layout.label(text="Fluid interaction:")
+                layout.label(text=_("Fluid interaction:"))
 
             row = layout.row()
             row.template_list(psys, "targets", psys, "active_particle_target_index")
@@ -620,7 +621,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                     #doesn't work yet
                     #col.alert = key.valid
                     col.prop(key, "object", text="")
-                    col.prop(key, "system", text="System")
+                    col.prop(key, "system", text=_("System"))
                     col = row.column()
                     col.active = psys.use_keyed_timing
                     col.prop(key, "time")
@@ -630,7 +631,7 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                     #doesn't work yet
                     #sub.alert = key.valid
                     sub.prop(key, "object", text="")
-                    sub.prop(key, "system", text="System")
+                    sub.prop(key, "system", text=_("System"))
 
                     layout.prop(key, "alliance", expand=True)
                 elif part.physics_type == 'FLUID':
@@ -638,11 +639,11 @@ class PARTICLE_PT_physics(ParticleButtonsPanel, bpy.types.Panel):
                     #doesn't work yet
                     #sub.alert = key.valid
                     sub.prop(key, "object", text="")
-                    sub.prop(key, "system", text="System")
+                    sub.prop(key, "system", text=_("System"))
 
 
 class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Boid Brain"
+    bl_label = _("Boid Brain")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -677,7 +678,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
 
         state = boids.active_boid_state
 
-        #layout.prop(state, "name", text="State name")
+        #layout.prop(state, "name", text=_("State name"))
 
         row = layout.row()
         row.prop(state, "ruleset_type")
@@ -720,7 +721,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
                 row.prop(rule, "use_predict")
                 row.prop(rule, "fear_factor")
             elif rule.type == 'FOLLOW_PATH':
-                row.label(text="Not yet functional.")
+                row.label(text=_("Not yet functional."))
             elif rule.type == 'AVOID_COLLISION':
                 row.prop(rule, "use_avoid")
                 row.prop(rule, "use_avoid_collision")
@@ -743,7 +744,7 @@ class PARTICLE_PT_boidbrain(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Render"
+    bl_label = _("Render")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     @classmethod
@@ -799,14 +800,14 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
             sub.active = (part.use_render_adaptive is True and part.use_strand_primitive is False)
             sub.prop(part, "adaptive_pixel")
             col.prop(part, "use_hair_bspline")
-            col.prop(part, "render_step", text="Steps")
+            col.prop(part, "render_step", text=_("Steps"))
 
             col = split.column()
-            col.label(text="Timing:")
+            col.label(text=_("Timing:"))
             col.prop(part, "use_absolute_path_time")
-            col.prop(part, "path_start", text="Start", slider=not part.use_absolute_path_time)
-            col.prop(part, "path_end", text="End", slider=not part.use_absolute_path_time)
-            col.prop(part, "length_random", text="Random", slider=True)
+            col.prop(part, "path_start", text=_("Start"), slider=not part.use_absolute_path_time)
+            col.prop(part, "path_end", text=_("End"), slider=not part.use_absolute_path_time)
+            col.prop(part, "length_random", text=_("Random"), slider=True)
 
             row = layout.row()
             col = row.column()
@@ -863,30 +864,30 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
         elif part.render_type == 'BILLBOARD':
             ob = context.object
 
-            col.label(text="Align:")
+            col.label(text=_("Align:"))
 
             row = layout.row()
             row.prop(part, "billboard_align", expand=True)
-            row.prop(part, "lock_billboard", text="Lock")
+            row.prop(part, "lock_billboard", text=_("Lock"))
             row = layout.row()
             row.prop(part, "billboard_object")
 
             row = layout.row()
             col = row.column(align=True)
-            col.label(text="Tilt:")
-            col.prop(part, "billboard_tilt", text="Angle", slider=True)
-            col.prop(part, "billboard_tilt_random", text="Random", slider=True)
+            col.label(text=_("Tilt:"))
+            col.prop(part, "billboard_tilt", text=_("Angle"), slider=True)
+            col.prop(part, "billboard_tilt_random", text=_("Random"), slider=True)
             col = row.column()
             col.prop(part, "billboard_offset")
 
             row = layout.row()
             col = row.column()
-            col.prop(part, "billboard_size", text="Scale")
+            col.prop(part, "billboard_size", text=_("Scale"))
             if part.billboard_align == 'VEL':
                 col = row.column(align=True)
-                col.label("Velocity Scale:")
-                col.prop(part, "billboard_velocity_head", text="Head")
-                col.prop(part, "billboard_velocity_tail", text="Tail")
+                col.label(_("Velocity Scale:"))
+                col.prop(part, "billboard_velocity_head", text=_("Head"))
+                col.prop(part, "billboard_velocity_tail", text=_("Tail"))
 
             if psys:
                 col = layout.column()
@@ -894,8 +895,8 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
                 col.prop_search(psys, "billboard_time_index_uv", ob.data, "uv_textures")
 
             split = layout.split(percentage=0.33)
-            split.label(text="Split uv's:")
-            split.prop(part, "billboard_uv_split", text="Number of splits")
+            split.label(text=_("Split uv's:"))
+            split.prop(part, "billboard_uv_split", text=_("Number of splits"))
 
             if psys:
                 col = layout.column()
@@ -903,9 +904,9 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
                 col.prop_search(psys, "billboard_split_uv", ob.data, "uv_textures")
 
             row = col.row()
-            row.label(text="Animate:")
+            row.label(text=_("Animate:"))
             row.prop(part, "billboard_animation", text="")
-            row.label(text="Offset:")
+            row.label(text=_("Offset:"))
             row.prop(part, "billboard_offset_split", text="")
 
         if part.render_type == 'HALO' or part.render_type == 'LINE' or part.render_type == 'BILLBOARD':
@@ -913,10 +914,10 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
             col = row.column()
             col.prop(part, "trail_count")
             if part.trail_count > 1:
-                col.prop(part, "use_absolute_path_time", text="Length in frames")
+                col.prop(part, "use_absolute_path_time", text=_("Length in frames"))
                 col = row.column()
-                col.prop(part, "path_end", text="Length", slider=not part.use_absolute_path_time)
-                col.prop(part, "length_random", text="Random", slider=True)
+                col.prop(part, "path_end", text=_("Length"), slider=not part.use_absolute_path_time)
+                col.prop(part, "length_random", text=_("Random"), slider=True)
             else:
                 col = row.column()
                 col.label(text="")
@@ -928,7 +929,7 @@ class PARTICLE_PT_render(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Display"
+    bl_label = _("Display")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -964,11 +965,11 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
         if part.draw_percentage != 100 and psys is not None:
             if part.type == 'HAIR':
                 if psys.use_hair_dynamics and psys.point_cache.is_baked == False:
-                    layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
+                    layout.row().label(text=_("Display percentage makes dynamics inaccurate without baking!"))
             else:
                 phystype = part.physics_type
                 if phystype != 'NO' and phystype != 'KEYED' and psys.point_cache.is_baked == False:
-                    layout.row().label(text="Display percentage makes dynamics inaccurate without baking!")
+                    layout.row().label(text=_("Display percentage makes dynamics inaccurate without baking!"))
 
         row = layout.row()
         col = row.column()
@@ -979,18 +980,18 @@ class PARTICLE_PT_draw(ParticleButtonsPanel, bpy.types.Panel):
             col.prop(part, "show_health")
 
         col = row.column(align=True)
-        col.label(text="Color:")
+        col.label(text=_("Color:"))
         col.prop(part, "draw_color", text="")
         sub = col.row()
         sub.active = part.draw_color in ('VELOCITY', 'ACCELERATION')
-        sub.prop(part, "color_maximum", text="Max")
+        sub.prop(part, "color_maximum", text=_("Max"))
 
         if (path):
             col.prop(part, "draw_step")
 
 
 class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Children"
+    bl_label = _("Children")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -1012,24 +1013,24 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
         row = layout.row()
 
         col = row.column(align=True)
-        col.prop(part, "child_nbr", text="Display")
-        col.prop(part, "rendered_child_count", text="Render")
+        col.prop(part, "child_nbr", text=_("Display"))
+        col.prop(part, "rendered_child_count", text=_("Render"))
 
         if part.child_type == 'INTERPOLATED':
             col = row.column()
             if psys:
-                col.prop(psys, "child_seed", text="Seed")
+                col.prop(psys, "child_seed", text=_("Seed"))
             col.prop(part, "virtual_parents", slider=True)
             col.prop(part, "create_long_hair_children")
         else:
             col = row.column(align=True)
-            col.prop(part, "child_size", text="Size")
-            col.prop(part, "child_size_random", text="Random")
+            col.prop(part, "child_size", text=_("Size"))
+            col.prop(part, "child_size_random", text=_("Random"))
 
         split = layout.split()
 
         col = split.column()
-        col.label(text="Effects:")
+        col.label(text=_("Effects:"))
 
         sub = col.column(align=True)
         sub.prop(part, "clump_factor", slider=True)
@@ -1041,38 +1042,38 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
 
         if part.child_type == 'SIMPLE':
             sub = col.column(align=True)
-            sub.prop(part, "child_radius", text="Radius")
-            sub.prop(part, "child_roundness", text="Roundness", slider=True)
+            sub.prop(part, "child_radius", text=_("Radius"))
+            sub.prop(part, "child_roundness", text=_("Roundness"), slider=True)
             if psys:
-                sub.prop(psys, "child_seed", text="Seed")
+                sub.prop(psys, "child_seed", text=_("Seed"))
         elif part.virtual_parents > 0.0:
             sub = col.column(align=True)
-            sub.label(text="Parting not")
-            sub.label(text="available with")
-            sub.label(text="virtual parents.")
+            sub.label(text=_("Parting not"))
+            sub.label(text=_("available with"))
+            sub.label(text=_("virtual parents."))
         else:
             sub = col.column(align=True)
-            sub.prop(part, "child_parting_factor", text="Parting", slider=True)
-            sub.prop(part, "child_parting_min", text="Min")
-            sub.prop(part, "child_parting_max", text="Max")
+            sub.prop(part, "child_parting_factor", text=_("Parting"), slider=True)
+            sub.prop(part, "child_parting_min", text=_("Min"))
+            sub.prop(part, "child_parting_max", text=_("Max"))
 
         col = split.column()
-        col.label(text="Roughness:")
+        col.label(text=_("Roughness:"))
 
         sub = col.column(align=True)
-        sub.prop(part, "roughness_1", text="Uniform")
-        sub.prop(part, "roughness_1_size", text="Size")
+        sub.prop(part, "roughness_1", text=_("Uniform"))
+        sub.prop(part, "roughness_1_size", text=_("Size"))
 
         sub = col.column(align=True)
         sub.prop(part, "roughness_endpoint", "Endpoint")
         sub.prop(part, "roughness_end_shape")
 
         sub = col.column(align=True)
-        sub.prop(part, "roughness_2", text="Random")
-        sub.prop(part, "roughness_2_size", text="Size")
+        sub.prop(part, "roughness_2", text=_("Random"))
+        sub.prop(part, "roughness_2_size", text=_("Size"))
         sub.prop(part, "roughness_2_threshold", slider=True)
 
-        layout.row().label(text="Kink:")
+        layout.row().label(text=_("Kink:"))
         layout.row().prop(part, "kink", expand=True)
 
         split = layout.split()
@@ -1081,7 +1082,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
         col = split.column()
         sub = col.column(align=True)
         sub.prop(part, "kink_amplitude")
-        sub.prop(part, "kink_amplitude_clump", text="Clump", slider=True)
+        sub.prop(part, "kink_amplitude_clump", text=_("Clump"), slider=True)
         col.prop(part, "kink_flat", slider=True)
         col = split.column()
         sub = col.column(align=True)
@@ -1090,7 +1091,7 @@ class PARTICLE_PT_children(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Field Weights"
+    bl_label = _("Field Weights")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -1111,7 +1112,7 @@ class PARTICLE_PT_field_weights(ParticleButtonsPanel, bpy.types.Panel):
 
 
 class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Force Field Settings"
+    bl_label = _("Force Field Settings")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -1122,30 +1123,30 @@ class PARTICLE_PT_force_fields(ParticleButtonsPanel, bpy.types.Panel):
 
         row = layout.row()
         row.prop(part, "use_self_effect")
-        row.prop(part, "effector_amount", text="Amount")
+        row.prop(part, "effector_amount", text=_("Amount"))
 
         split = layout.split(percentage=0.2)
-        split.label(text="Type 1:")
+        split.label(text=_("Type 1:"))
         split.prop(part.force_field_1, "type", text="")
         basic_force_field_settings_ui(self, context, part.force_field_1)
         if part.force_field_1.type != 'NONE':
-            layout.label(text="Falloff:")
+            layout.label(text=_("Falloff:"))
         basic_force_field_falloff_ui(self, context, part.force_field_1)
 
         if part.force_field_1.type != 'NONE':
             layout.label(text="")
 
         split = layout.split(percentage=0.2)
-        split.label(text="Type 2:")
+        split.label(text=_("Type 2:"))
         split.prop(part.force_field_2, "type", text="")
         basic_force_field_settings_ui(self, context, part.force_field_2)
         if part.force_field_2.type != 'NONE':
-            layout.label(text="Falloff:")
+            layout.label(text=_("Falloff:"))
         basic_force_field_falloff_ui(self, context, part.force_field_2)
 
 
 class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
-    bl_label = "Vertexgroups"
+    bl_label = _("Vertexgroups")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
@@ -1162,56 +1163,56 @@ class PARTICLE_PT_vertexgroups(ParticleButtonsPanel, bpy.types.Panel):
         psys = context.particle_system
 
         row = layout.row()
-        row.label(text="Vertex Group")
-        row.label(text="Negate")
+        row.label(text=_("Vertex Group"))
+        row.label(text=_("Negate"))
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text="Density")
+        row.prop_search(psys, "vertex_group_density", ob, "vertex_groups", text=_("Density"))
         row.prop(psys, "invert_vertex_group_density", text="")
 
         # Commented out vertex groups don't work and are still waiting for better implementation
         # row = layout.row()
-        # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text="Velocity")
+        # row.prop_search(psys, "vertex_group_velocity", ob, "vertex_groups", text=_("Velocity"))
         # row.prop(psys, "invert_vertex_group_velocity", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text="Length")
+        row.prop_search(psys, "vertex_group_length", ob, "vertex_groups", text=_("Length"))
         row.prop(psys, "invert_vertex_group_length", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text="Clump")
+        row.prop_search(psys, "vertex_group_clump", ob, "vertex_groups", text=_("Clump"))
         row.prop(psys, "invert_vertex_group_clump", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text="Kink")
+        row.prop_search(psys, "vertex_group_kink", ob, "vertex_groups", text=_("Kink"))
         row.prop(psys, "invert_vertex_group_kink", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text="Roughness 1")
+        row.prop_search(psys, "vertex_group_roughness_1", ob, "vertex_groups", text=_("Roughness 1"))
         row.prop(psys, "invert_vertex_group_roughness_1", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text="Roughness 2")
+        row.prop_search(psys, "vertex_group_roughness_2", ob, "vertex_groups", text=_("Roughness 2"))
         row.prop(psys, "invert_vertex_group_roughness_2", text="")
 
         row = layout.row()
-        row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text="Roughness End")
+        row.prop_search(psys, "vertex_group_roughness_end", ob, "vertex_groups", text=_("Roughness End"))
         row.prop(psys, "invert_vertex_group_roughness_end", text="")
 
         # row = layout.row()
-        # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text="Size")
+        # row.prop_search(psys, "vertex_group_size", ob, "vertex_groups", text=_("Size"))
         # row.prop(psys, "invert_vertex_group_size", text="")
 
         # row = layout.row()
-        # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text="Tangent")
+        # row.prop_search(psys, "vertex_group_tangent", ob, "vertex_groups", text=_("Tangent"))
         # row.prop(psys, "invert_vertex_group_tangent", text="")
 
         # row = layout.row()
-        # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text="Rotation")
+        # row.prop_search(psys, "vertex_group_rotation", ob, "vertex_groups", text=_("Rotation"))
         # row.prop(psys, "invert_vertex_group_rotation", text="")
 
         # row = layout.row()
-        # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text="Field")
+        # row.prop_search(psys, "vertex_group_field", ob, "vertex_groups", text=_("Field"))
         # row.prop(psys, "invert_vertex_group_field", text="")
 
 
index bce6ab993a7fd8a3fa5745a6beaffe7de7684f92..cb0106bee5ac4ce5233414a5815a1e864b7f0acc 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 from bl_ui.properties_physics_common import (
     point_cache_ui,
@@ -34,7 +34,7 @@ class CLOTH_MT_presets(bpy.types.Menu):
     '''
     Creates the menu items by scanning scripts/templates
     '''
-    bl_label = "Cloth Presets"
+    bl_label = _("Cloth Presets")
     preset_subdir = "cloth"
     preset_operator = "script.execute_preset"
     draw = bpy.types.Menu.draw_preset
@@ -53,7 +53,7 @@ class PhysicButtonsPanel():
 
 
 class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Cloth"
+    bl_label = _("Cloth")
 
     def draw(self, context):
         layout = self.layout
@@ -70,55 +70,55 @@ class PHYSICS_PT_cloth(PhysicButtonsPanel, bpy.types.Panel):
 
             col = split.column()
 
-            col.label(text="Presets:")
+            col.label(text=_("Presets:"))
             sub = col.row(align=True)
             sub.menu("CLOTH_MT_presets", text=bpy.types.CLOTH_MT_presets.bl_label)
             sub.operator("cloth.preset_add", text="", icon="ZOOMIN")
             sub.operator("cloth.preset_add", text="", icon="ZOOMOUT").remove_active = True
 
-            col.label(text="Quality:")
-            col.prop(cloth, "quality", text="Steps", slider=True)
+            col.label(text=_("Quality:"))
+            col.prop(cloth, "quality", text=_("Steps"), slider=True)
 
-            col.label(text="Material:")
+            col.label(text=_("Material:"))
             col.prop(cloth, "mass")
-            col.prop(cloth, "structural_stiffness", text="Structural")
-            col.prop(cloth, "bending_stiffness", text="Bending")
+            col.prop(cloth, "structural_stiffness", text=_("Structural"))
+            col.prop(cloth, "bending_stiffness", text=_("Bending"))
 
             col = split.column()
 
-            col.label(text="Damping:")
-            col.prop(cloth, "spring_damping", text="Spring")
-            col.prop(cloth, "air_damping", text="Air")
+            col.label(text=_("Damping:"))
+            col.prop(cloth, "spring_damping", text=_("Spring"))
+            col.prop(cloth, "air_damping", text=_("Air"))
 
-            col.prop(cloth, "use_pin_cloth", text="Pinning")
+            col.prop(cloth, "use_pin_cloth", text=_("Pinning"))
             sub = col.column()
             sub.active = cloth.use_pin_cloth
             sub.prop_search(cloth, "vertex_group_mass", ob, "vertex_groups", text="")
-            sub.prop(cloth, "pin_stiffness", text="Stiffness")
+            sub.prop(cloth, "pin_stiffness", text=_("Stiffness"))
 
-            col.label(text="Pre roll:")
-            col.prop(cloth, "pre_roll", text="Frame")
+            col.label(text=_("Pre roll:"))
+            col.prop(cloth, "pre_roll", text=_("Frame"))
 
             # Disabled for now
             """
             if cloth.vertex_group_mass:
-                layout.label(text="Goal:")
+                layout.label(text=_("Goal:"))
 
                 col = layout.column_flow()
-                col.prop(cloth, "goal_default", text="Default")
-                col.prop(cloth, "goal_spring", text="Stiffness")
-                col.prop(cloth, "goal_friction", text="Friction")
+                col.prop(cloth, "goal_default", text=_("Default"))
+                col.prop(cloth, "goal_spring", text=_("Stiffness"))
+                col.prop(cloth, "goal_friction", text=_("Friction"))
             """
 
             key = ob.data.shape_keys
 
             if key:
-                col.label(text="Rest Shape Key:")
+                col.label(text=_("Rest Shape Key:"))
                 col.prop_search(cloth, "rest_shape_key", key, "key_blocks", text="")
 
 
 class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Cloth Cache"
+    bl_label = _("Cloth Cache")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -131,7 +131,7 @@ class PHYSICS_PT_cloth_cache(PhysicButtonsPanel, bpy.types.Panel):
 
 
 class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Cloth Collision"
+    bl_label = _("Cloth Collision")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -155,24 +155,24 @@ class PHYSICS_PT_cloth_collision(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(cloth, "collision_quality", slider=True, text="Quality")
-        col.prop(cloth, "distance_min", slider=True, text="Distance")
-        col.prop(cloth, "repel_force", slider=True, text="Repel")
-        col.prop(cloth, "distance_repel", slider=True, text="Repel Distance")
+        col.prop(cloth, "collision_quality", slider=True, text=_("Quality"))
+        col.prop(cloth, "distance_min", slider=True, text=_("Distance"))
+        col.prop(cloth, "repel_force", slider=True, text=_("Repel"))
+        col.prop(cloth, "distance_repel", slider=True, text=_("Repel Distance"))
         col.prop(cloth, "friction")
 
         col = split.column()
-        col.prop(cloth, "use_self_collision", text="Self Collision")
+        col.prop(cloth, "use_self_collision", text=_("Self Collision"))
         sub = col.column()
         sub.active = cloth.use_self_collision
-        sub.prop(cloth, "self_collision_quality", slider=True, text="Quality")
-        sub.prop(cloth, "self_distance_min", slider=True, text="Distance")
+        sub.prop(cloth, "self_collision_quality", slider=True, text=_("Quality"))
+        sub.prop(cloth, "self_distance_min", slider=True, text=_("Distance"))
 
         layout.prop(cloth, "group")
 
 
 class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Cloth Stiffness Scaling"
+    bl_label = _("Cloth Stiffness Scaling")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -197,18 +197,18 @@ class PHYSICS_PT_cloth_stiffness(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Structural Stiffness:")
+        col.label(text=_("Structural Stiffness:"))
         col.prop_search(cloth, "vertex_group_structural_stiffness", ob, "vertex_groups", text="")
-        col.prop(cloth, "structural_stiffness_max", text="Max")
+        col.prop(cloth, "structural_stiffness_max", text=_("Max"))
 
         col = split.column()
-        col.label(text="Bending Stiffness:")
+        col.label(text=_("Bending Stiffness:"))
         col.prop_search(cloth, "vertex_group_bending", ob, "vertex_groups", text="")
-        col.prop(cloth, "bending_stiffness_max", text="Max")
+        col.prop(cloth, "bending_stiffness_max", text=_("Max"))
 
 
 class PHYSICS_PT_cloth_field_weights(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Cloth Field Weights"
+    bl_label = _("Cloth Field Weights")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
index f7cf8da184033d6a7a1a17f2dd60e7ae8897bd31..d544928c3fc485bf7ca7fd5c695ca5e4063ea91b 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 
 import bpy
-
+from blf import gettext as _
 
 class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -52,14 +52,14 @@ class PHYSICS_PT_add(PhysicButtonsPanel, bpy.types.Panel):
         ob = context.object
 
         layout = self.layout
-        layout.label("Enable physics for:")
+        layout.label(_("Enable physics for:"))
         split = layout.split()
         col = split.column()
 
         if(context.object.field.type == 'NONE'):
-            col.operator("object.forcefield_toggle", text="Force Field", icon='FORCE_FORCE')
+            col.operator("object.forcefield_toggle", text=_("Force Field"), icon='FORCE_FORCE')
         else:
-            col.operator("object.forcefield_toggle", text="Force Field", icon='X')
+            col.operator("object.forcefield_toggle", text=_("Force Field"), icon='X')
 
         if(ob.type == 'MESH'):
             physics_add(self, col, context.collision, "Collision", 'COLLISION', 'MOD_PHYSICS', False)
@@ -94,11 +94,11 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
 
     if cache.use_external:
         split = layout.split(percentage=0.80)
-        split.prop(cache, "name", text="File Name")
+        split.prop(cache, "name", text=_("File Name"))
         split.prop(cache, "index", text="")
 
         row = layout.row()
-        row.label(text="File Path:")
+        row.label(text=_("File Path:"))
         row.prop(cache, "use_library_path", "Use Lib Path")
 
         layout.prop(cache, "filepath", text="")
@@ -107,13 +107,13 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
     else:
         if cachetype == 'SMOKE':
             if not bpy.data.is_saved:
-                layout.label(text="Cache is disabled until the file is saved")
+                layout.label(text=_("Cache is disabled until the file is saved"))
                 layout.enabled = False
 
         if cache.use_disk_cache:
-            layout.prop(cache, "name", text="File Name")
+            layout.prop(cache, "name", text=_("File Name"))
         else:
-            layout.prop(cache, "name", text="Cache Name")
+            layout.prop(cache, "name", text=_("Cache Name"))
 
         row = layout.row(align=True)
 
@@ -141,7 +141,7 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
             row = layout.row()
             row.enabled = enabled and bpy.data.is_saved
             row.active = cache.use_disk_cache
-            row.label(text="Compression:")
+            row.label(text=_("Compression:"))
             row.prop(cache, "compression", expand=True)
 
         layout.separator()
@@ -151,22 +151,22 @@ def point_cache_ui(self, context, cache, enabled, cachetype):
         col = split.column()
 
         if cache.is_baked == True:
-            col.operator("ptcache.free_bake", text="Free Bake")
+            col.operator("ptcache.free_bake", text=_("Free Bake"))
         else:
-            col.operator("ptcache.bake", text="Bake").bake = True
+            col.operator("ptcache.bake", text=_("Bake")).bake = True
 
         sub = col.row()
         sub.enabled = (cache.frames_skipped or cache.is_outdated) and enabled
-        sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
+        sub.operator("ptcache.bake", text=_("Calculate To Frame")).bake = False
 
         sub = col.column()
         sub.enabled = enabled
-        sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
+        sub.operator("ptcache.bake_from_cache", text=_("Current Cache to Bake"))
 
         col = split.column()
-        col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True
-        col.operator("ptcache.free_bake_all", text="Free All Bakes")
-        col.operator("ptcache.bake_all", text="Update All To Frame").bake = False
+        col.operator("ptcache.bake_all", text=_("Bake All Dynamics")).bake = True
+        col.operator("ptcache.free_bake_all", text=_("Free All Bakes"))
+        col.operator("ptcache.bake_all", text=_("Update All To Frame")).bake = False
 
 
 def effector_weights_ui(self, context, weights):
@@ -214,7 +214,7 @@ def basic_force_field_settings_ui(self, context, field):
     col = split.column()
 
     if field.type == 'DRAG':
-        col.prop(field, "linear_drag", text="Linear")
+        col.prop(field, "linear_drag", text=_("Linear"))
     else:
         col.prop(field, "strength")
 
@@ -222,12 +222,12 @@ def basic_force_field_settings_ui(self, context, field):
         col.prop(field, "size")
         col.prop(field, "flow")
     elif field.type == 'HARMONIC':
-        col.prop(field, "harmonic_damping", text="Damping")
+        col.prop(field, "harmonic_damping", text=_("Damping"))
         col.prop(field, "rest_length")
     elif field.type == 'VORTEX' and field.shape != 'POINT':
         col.prop(field, "inflow")
     elif field.type == 'DRAG':
-        col.prop(field, "quadratic_drag", text="Quadratic")
+        col.prop(field, "quadratic_drag", text=_("Quadratic"))
     else:
         col.prop(field, "flow")
 
@@ -236,19 +236,19 @@ def basic_force_field_settings_ui(self, context, field):
     sub.prop(field, "noise")
     sub.prop(field, "seed")
     if field.type == 'TURBULENCE':
-        col.prop(field, "use_global_coords", text="Global")
+        col.prop(field, "use_global_coords", text=_("Global"))
     elif field.type == 'HARMONIC':
         col.prop(field, "use_multiple_springs")
 
     split = layout.split()
 
     col = split.column()
-    col.label(text="Effect point:")
+    col.label(text=_("Effect point:"))
     col.prop(field, "apply_to_location")
     col.prop(field, "apply_to_rotation")
 
     col = split.column()
-    col.label(text="Collision:")
+    col.label(text=_("Collision:"))
     col.prop(field, "use_absorption")
 
 
@@ -264,7 +264,7 @@ def basic_force_field_falloff_ui(self, context, field):
     col.prop(field, "z_direction", text="")
 
     col = split.column()
-    col.prop(field, "falloff_power", text="Power")
+    col.prop(field, "falloff_power", text=_("Power"))
 
     split = layout.split()
     col = split.column()
@@ -272,14 +272,14 @@ def basic_force_field_falloff_ui(self, context, field):
     row.prop(field, "use_min_distance", text="")
     sub = row.row()
     sub.active = field.use_min_distance
-    sub.prop(field, "distance_min", text="Minimum")
+    sub.prop(field, "distance_min", text=_("Minimum"))
 
     col = split.column()
     row = col.row(align=True)
     row.prop(field, "use_max_distance", text="")
     sub = row.row()
     sub.active = field.use_max_distance
-    sub.prop(field, "distance_max", text="Maximum")
+    sub.prop(field, "distance_max", text=_("Maximum"))
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index 9f96f0a5b9f562a0c5acf365d85a98e83a20777b..0cd20a63d7e67328c17f72a611764bb2244bec15 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 from bl_ui.properties_physics_common import (
     basic_force_field_settings_ui,
@@ -38,7 +38,7 @@ class PhysicButtonsPanel():
 
 
 class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Force Fields"
+    bl_label = _("Force Fields")
 
     @classmethod
     def poll(cls, context):
@@ -53,13 +53,13 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
         field = ob.field
 
         split = layout.split(percentage=0.2)
-        split.label(text="Type:")
+        split.label(text=_("Type:"))
 
         split.prop(field, "type", text="")
 
         if field.type not in {'NONE', 'GUIDE', 'TEXTURE'}:
             split = layout.split(percentage=0.2)
-            split.label(text="Shape:")
+            split.label(text=_("Shape:"))
             split.prop(field, "shape", text="")
 
         split = layout.split()
@@ -75,7 +75,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
             col.prop(field, "use_guide_path_weight")
 
             col = split.column()
-            col.label(text="Clumping:")
+            col.label(text=_("Clumping:"))
             col.prop(field, "guide_clump_amount")
             col.prop(field, "guide_clump_shape")
 
@@ -116,7 +116,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
 
         if field.type not in {'NONE', 'GUIDE'}:
 
-            layout.label(text="Falloff:")
+            layout.label(text=_("Falloff:"))
             layout.prop(field, "falloff_type", expand=True)
 
             basic_force_field_falloff_ui(self, context, field)
@@ -127,20 +127,20 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
                 split = layout.split(percentage=0.35)
 
                 col = split.column()
-                col.label(text="Angular:")
-                col.prop(field, "use_radial_min", text="Use Minimum")
-                col.prop(field, "use_radial_max", text="Use Maximum")
+                col.label(text=_("Angular:"))
+                col.prop(field, "use_radial_min", text=_("Use Minimum"))
+                col.prop(field, "use_radial_max", text=_("Use Maximum"))
 
                 col = split.column()
-                col.prop(field, "radial_falloff", text="Power")
+                col.prop(field, "radial_falloff", text=_("Power"))
 
                 sub = col.column()
                 sub.active = field.use_radial_min
-                sub.prop(field, "radial_min", text="Angle")
+                sub.prop(field, "radial_min", text=_("Angle"))
 
                 sub = col.column()
                 sub.active = field.use_radial_max
-                sub.prop(field, "radial_max", text="Angle")
+                sub.prop(field, "radial_max", text=_("Angle"))
 
             elif field.falloff_type == 'TUBE':
                 layout.separator()
@@ -148,24 +148,24 @@ class PHYSICS_PT_field(PhysicButtonsPanel, bpy.types.Panel):
                 split = layout.split(percentage=0.35)
 
                 col = split.column()
-                col.label(text="Radial:")
-                col.prop(field, "use_radial_min", text="Use Minimum")
-                col.prop(field, "use_radial_max", text="Use Maximum")
+                col.label(text=_("Radial:"))
+                col.prop(field, "use_radial_min", text=_("Use Minimum"))
+                col.prop(field, "use_radial_max", text=_("Use Maximum"))
 
                 col = split.column()
-                col.prop(field, "radial_falloff", text="Power")
+                col.prop(field, "radial_falloff", text=_("Power"))
 
                 sub = col.column()
                 sub.active = field.use_radial_min
-                sub.prop(field, "radial_min", text="Distance")
+                sub.prop(field, "radial_min", text=_("Distance"))
 
                 sub = col.column()
                 sub.active = field.use_radial_max
-                sub.prop(field, "radial_max", text="Distance")
+                sub.prop(field, "radial_max", text=_("Distance"))
 
 
 class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Collision"
+    bl_label = _("Collision")
     #bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -191,31 +191,31 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, bpy.types.Panel):
             split = layout.split()
 
             col = split.column()
-            col.label(text="Particle:")
+            col.label(text=_("Particle:"))
             col.prop(settings, "permeability", slider=True)
             col.prop(settings, "stickness")
             col.prop(settings, "use_particle_kill")
-            col.label(text="Particle Damping:")
+            col.label(text=_("Particle Damping:"))
             sub = col.column(align=True)
-            sub.prop(settings, "damping_factor", text="Factor", slider=True)
-            sub.prop(settings, "damping_random", text="Random", slider=True)
+            sub.prop(settings, "damping_factor", text=_("Factor"), slider=True)
+            sub.prop(settings, "damping_random", text=_("Random"), slider=True)
 
-            col.label(text="Particle Friction:")
+            col.label(text=_("Particle Friction:"))
             sub = col.column(align=True)
-            sub.prop(settings, "friction_factor", text="Factor", slider=True)
-            sub.prop(settings, "friction_random", text="Random", slider=True)
+            sub.prop(settings, "friction_factor", text=_("Factor"), slider=True)
+            sub.prop(settings, "friction_random", text=_("Random"), slider=True)
 
             col = split.column()
-            col.label(text="Soft Body and Cloth:")
+            col.label(text=_("Soft Body and Cloth:"))
             sub = col.column(align=True)
-            sub.prop(settings, "thickness_outer", text="Outer", slider=True)
-            sub.prop(settings, "thickness_inner", text="Inner", slider=True)
+            sub.prop(settings, "thickness_outer", text=_("Outer"), slider=True)
+            sub.prop(settings, "thickness_inner", text=_("Inner"), slider=True)
 
-            col.label(text="Soft Body Damping:")
-            col.prop(settings, "damping", text="Factor", slider=True)
+            col.label(text=_("Soft Body Damping:"))
+            col.prop(settings, "damping", text=_("Factor"), slider=True)
 
-            col.label(text="Force Fields:")
-            col.prop(settings, "absorption", text="Absorption")
+            col.label(text=_("Force Fields:"))
+            col.prop(settings, "absorption", text=_("Absorption"))
 
 if __name__ == "__main__":  # only for live edit.
     bpy.utils.register_module(__name__)
index c7e3a9e722007efcf4150e305caeb3606dcc4ed7..da5e03969744b74afb2377b84f1ce4a83f996f4b 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 class PhysicButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -33,7 +33,7 @@ class PhysicButtonsPanel():
 
 
 class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Fluid"
+    bl_label = _("Fluid")
 
     def draw(self, context):
         layout = self.layout
@@ -45,7 +45,7 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
 
             row = layout.row()
             if fluid is None:
-                row.label("built without fluids")
+                row.label(_("built without fluids"))
                 return
 
             row.prop(fluid, "type")
@@ -57,28 +57,28 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 layout.active = fluid.use
 
             if fluid.type == 'DOMAIN':
-                layout.operator("fluid.bake", text="Bake (Req. Memory: %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
+                layout.operator("fluid.bake", text=_("Bake (Req. Memory:")+" %s)" % fluid.memory_estimate, icon='MOD_FLUIDSIM')
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Resolution:")
-                col.prop(fluid, "resolution", text="Final")
-                col.label(text="Render Display:")
+                col.label(text=_("Resolution:"))
+                col.prop(fluid, "resolution", text=_("Final"))
+                col.label(text=_("Render Display:"))
                 col.prop(fluid, "render_display_mode", text="")
 
                 col = split.column()
                 col.label()
-                col.prop(fluid, "preview_resolution", text="Preview")
-                col.label(text="Viewport Display:")
+                col.prop(fluid, "preview_resolution", text=_("Preview"))
+                col.label(text=_("Viewport Display:"))
                 col.prop(fluid, "viewport_display_mode", text="")
 
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Time:")
+                col.label(text=_("Time:"))
                 sub = col.column(align=True)
-                sub.prop(fluid, "start_time", text="Start")
-                sub.prop(fluid, "end_time", text="End")
+                sub.prop(fluid, "start_time", text=_("Start"))
+                sub.prop(fluid, "end_time", text=_("End"))
 
                 col = split.column()
                 col.label()
@@ -91,36 +91,36 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Volume Initialization:")
+                col.label(text=_("Volume Initialization:"))
                 col.prop(fluid, "volume_initialization", text="")
                 col.prop(fluid, "use_animated_mesh")
 
                 col = split.column()
-                col.label(text="Initial Velocity:")
+                col.label(text=_("Initial Velocity:"))
                 col.prop(fluid, "initial_velocity", text="")
 
             elif fluid.type == 'OBSTACLE':
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Volume Initialization:")
+                col.label(text=_("Volume Initialization:"))
                 col.prop(fluid, "volume_initialization", text="")
                 col.prop(fluid, "use_animated_mesh")
 
                 col = split.column()
-                col.label(text="Slip Type:")
+                col.label(text=_("Slip Type:"))
                 col.prop(fluid, "slip_type", text="")
                 if fluid.slip_type == 'PARTIALSLIP':
-                    col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+                    col.prop(fluid, "partial_slip_factor", slider=True, text=_("Amount"))
 
-                col.label(text="Impact:")
-                col.prop(fluid, "impact_factor", text="Factor")
+                col.label(text=_("Impact:"))
+                col.prop(fluid, "impact_factor", text=_("Factor"))
 
             elif fluid.type == 'INFLOW':
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Volume Initialization:")
+                col.label(text=_("Volume Initialization:"))
                 col.prop(fluid, "volume_initialization", text="")
                 col.prop(fluid, "use_animated_mesh")
                 row = col.row()
@@ -128,14 +128,14 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 row.prop(fluid, "use_local_coords")
 
                 col = split.column()
-                col.label(text="Inflow Velocity:")
+                col.label(text=_("Inflow Velocity:"))
                 col.prop(fluid, "inflow_velocity", text="")
 
             elif fluid.type == 'OUTFLOW':
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Volume Initialization:")
+                col.label(text=_("Volume Initialization:"))
                 col.prop(fluid, "volume_initialization", text="")
                 col.prop(fluid, "use_animated_mesh")
 
@@ -145,12 +145,12 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Influence:")
-                col.prop(fluid, "particle_influence", text="Size")
-                col.prop(fluid, "alpha_influence", text="Alpha")
+                col.label(text=_("Influence:"))
+                col.prop(fluid, "particle_influence", text=_("Size"))
+                col.prop(fluid, "alpha_influence", text=_("Alpha"))
 
                 col = split.column()
-                col.label(text="Type:")
+                col.label(text=_("Type:"))
                 col.prop(fluid, "use_drops")
                 col.prop(fluid, "use_floats")
                 col.prop(fluid, "show_tracer")
@@ -166,28 +166,28 @@ class PHYSICS_PT_fluid(PhysicButtonsPanel, bpy.types.Panel):
                 col.prop(fluid, "use_reverse_frames")
 
                 col = split.column()
-                col.label(text="Time:")
+                col.label(text=_("Time:"))
                 sub = col.column(align=True)
-                sub.prop(fluid, "start_time", text="Start")
-                sub.prop(fluid, "end_time", text="End")
+                sub.prop(fluid, "start_time", text=_("Start"))
+                sub.prop(fluid, "end_time", text=_("End"))
 
                 split = layout.split()
 
                 col = split.column()
-                col.label(text="Attraction Force:")
+                col.label(text=_("Attraction Force:"))
                 sub = col.column(align=True)
-                sub.prop(fluid, "attraction_strength", text="Strength")
-                sub.prop(fluid, "attraction_radius", text="Radius")
+                sub.prop(fluid, "attraction_strength", text=_("Strength"))
+                sub.prop(fluid, "attraction_radius", text=_("Radius"))
 
                 col = split.column()
-                col.label(text="Velocity Force:")
+                col.label(text=_("Velocity Force:"))
                 sub = col.column(align=True)
-                sub.prop(fluid, "velocity_strength", text="Strength")
-                sub.prop(fluid, "velocity_radius", text="Radius")
+                sub.prop(fluid, "velocity_strength", text=_("Strength"))
+                sub.prop(fluid, "velocity_radius", text=_("Radius"))
 
 
 class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Domain World"
+    bl_label = _("Domain World")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -205,39 +205,39 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, bpy.types.Panel):
 
         col = split.column()
         if scene.use_gravity:
-            col.label(text="Using Scene Gravity", icon="SCENE_DATA")
+            col.label(text=_("Using Scene Gravity"), icon="SCENE_DATA")
             sub = col.column()
             sub.enabled = False
             sub.prop(fluid, "gravity", text="")
         else:
-            col.label(text="Gravity:")
+            col.label(text=_("Gravity:"))
             col.prop(fluid, "gravity", text="")
 
         if scene.unit_settings.system != 'NONE':
-            col.label(text="Using Scene Size Units", icon="SCENE_DATA")
+            col.label(text=_("Using Scene Size Units"), icon="SCENE_DATA")
             sub = col.column()
             sub.enabled = False
-            sub.prop(fluid, "simulation_scale", text="Metres")
+            sub.prop(fluid, "simulation_scale", text=_("Metres"))
         else:
-            col.label(text="Real World Size:")
-            col.prop(fluid, "simulation_scale", text="Metres")
+            col.label(text=_("Real World Size:"))
+            col.prop(fluid, "simulation_scale", text=_("Metres"))
 
         col = split.column()
-        col.label(text="Viscosity Presets:")
+        col.label(text=_("Viscosity Presets:"))
         sub = col.column(align=True)
         sub.prop(fluid, "viscosity_preset", text="")
 
         if fluid.viscosity_preset == 'MANUAL':
-            sub.prop(fluid, "viscosity_base", text="Base")
-            sub.prop(fluid, "viscosity_exponent", text="Exponent", slider=True)
+            sub.prop(fluid, "viscosity_base", text=_("Base"))
+            sub.prop(fluid, "viscosity_exponent", text=_("Exponent"), slider=True)
 
-        col.label(text="Optimization:")
+        col.label(text=_("Optimization:"))
         col.prop(fluid, "grid_levels", slider=True)
         col.prop(fluid, "compressibility", slider=True)
 
 
 class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Domain Boundary"
+    bl_label = _("Domain Boundary")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -253,20 +253,20 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Slip Type:")
+        col.label(text=_("Slip Type:"))
         col.prop(fluid, "slip_type", text="")
         if fluid.slip_type == 'PARTIALSLIP':
-            col.prop(fluid, "partial_slip_factor", slider=True, text="Amount")
+            col.prop(fluid, "partial_slip_factor", slider=True, text=_("Amount"))
         col.prop(fluid, "surface_noobs")
 
         col = split.column()
-        col.label(text="Surface:")
-        col.prop(fluid, "surface_smooth", text="Smoothing")
-        col.prop(fluid, "surface_subdivisions", text="Subdivisions")
+        col.label(text=_("Surface:"))
+        col.prop(fluid, "surface_smooth", text=_("Smoothing"))
+        col.prop(fluid, "surface_subdivisions", text=_("Subdivisions"))
 
 
 class PHYSICS_PT_domain_particles(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Domain Particles"
+    bl_label = _("Domain Particles")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
index 61d8d2e3825dcf1d2022b3cbefc64a20a5786f06..9ce7bc0ab360df31826f027c9b1ecaba8b73f580 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 from bl_ui.properties_physics_common import (
     point_cache_ui,
@@ -39,7 +39,7 @@ class PhysicButtonsPanel():
 
 
 class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Smoke"
+    bl_label = _("Smoke")
 
     def draw(self, context):
         layout = self.layout
@@ -58,23 +58,23 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
                 split.enabled = not domain.point_cache.is_baked
 
                 col = split.column()
-                col.label(text="Resolution:")
-                col.prop(domain, "resolution_max", text="Divisions")
-                col.label(text="Time:")
-                col.prop(domain, "time_scale", text="Scale")
-                col.label(text="Border Collisions:")
+                col.label(text=_("Resolution:"))
+                col.prop(domain, "resolution_max", text=_("Divisions"))
+                col.label(text=_("Time:"))
+                col.prop(domain, "time_scale", text=_("Scale"))
+                col.label(text=_("Border Collisions:"))
                 col.prop(domain, "collision_extents", text="")
 
                 col = split.column()
-                col.label(text="Behavior:")
+                col.label(text=_("Behavior:"))
                 col.prop(domain, "alpha")
-                col.prop(domain, "beta", text="Temp. Diff.")
+                col.prop(domain, "beta", text=_("Temp. Diff."))
                 col.prop(domain, "vorticity")
-                col.prop(domain, "use_dissolve_smoke", text="Dissolve")
+                col.prop(domain, "use_dissolve_smoke", text=_("Dissolve"))
                 sub = col.column()
                 sub.active = domain.use_dissolve_smoke
-                sub.prop(domain, "dissolve_speed", text="Time")
-                sub.prop(domain, "use_dissolve_smoke_log", text="Slow")
+                sub.prop(domain, "dissolve_speed", text=_("Time"))
+                sub.prop(domain, "use_dissolve_smoke_log", text_("Slow"))
 
             elif md.smoke_type == 'FLOW':
 
@@ -84,27 +84,27 @@ class PHYSICS_PT_smoke(PhysicButtonsPanel, bpy.types.Panel):
 
                 col = split.column()
                 col.prop(flow, "use_outflow")
-                col.label(text="Particle System:")
+                col.label(text=_("Particle System:"))
                 col.prop_search(flow, "particle_system", ob, "particle_systems", text="")
 
                 sub = col.column()
                 sub.active = not md.flow_settings.use_outflow
 
-                sub.prop(flow, "initial_velocity", text="Initial Velocity")
+                sub.prop(flow, "initial_velocity", text=_("Initial Velocity"))
                 sub = sub.column()
                 sub.active = flow.initial_velocity
-                sub.prop(flow, "velocity_factor", text="Multiplier")
+                sub.prop(flow, "velocity_factor", text=_("Multiplier"))
 
                 sub = split.column()
                 sub.active = not md.flow_settings.use_outflow
-                sub.label(text="Initial Values:")
+                sub.label(text=_("Initial Values:"))
                 sub.prop(flow, "use_absolute")
                 sub.prop(flow, "density")
                 sub.prop(flow, "temperature")
 
 
 class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Smoke Groups"
+    bl_label = _("Smoke Groups")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -120,19 +120,19 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Flow Group:")
+        col.label(text=_("Flow Group:"))
         col.prop(group, "fluid_group", text="")
 
-        #col.label(text="Effector Group:")
+        #col.label(text=_("Effector Group:"))
         #col.prop(group, "effector_group", text="")
 
         col = split.column()
-        col.label(text="Collision Group:")
+        col.label(text=_("Collision Group:"))
         col.prop(group, "collision_group", text="")
 
 
 class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Smoke High Resolution"
+    bl_label = _("Smoke High Resolution")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -156,12 +156,12 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
         split.enabled = not md.point_cache.is_baked
 
         col = split.column()
-        col.label(text="Resolution:")
-        col.prop(md, "amplify", text="Divisions")
+        col.label(text=_("Resolution:"))
+        col.prop(md, "amplify", text=_("Divisions"))
         col.prop(md, "smooth_emitter")
 
         col = split.column()
-        col.label(text="Noise Method:")
+        col.label(text=_("Noise Method:"))
         col.row().prop(md, "noise_type", text="")
         col.prop(md, "strength")
 
@@ -169,7 +169,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, bpy.types.Panel):
 
 
 class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Smoke Cache"
+    bl_label = _("Smoke Cache")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -183,14 +183,14 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, bpy.types.Panel):
         md = context.smoke.domain_settings
         cache = md.point_cache
 
-        layout.label(text="Compression:")
+        layout.label(text=_("Compression:"))
         layout.prop(md, "point_cache_compress_type", expand=True)
 
         point_cache_ui(self, context, cache, (cache.is_baked is False), 'SMOKE')
 
 
 class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Smoke Field Weights"
+    bl_label = _("Smoke Field Weights")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
index 61115a0590e3dd185284ce5f8919d99a2026d17c..1e9cc58e71c5003eb5eefeb0a487ccbf433f381d 100644 (file)
@@ -18,7 +18,7 @@
 
 # <pep8 compliant>
 import bpy
-
+from blf import gettext as _
 
 from bl_ui.properties_physics_common import (
     point_cache_ui,
@@ -45,7 +45,7 @@ class PhysicButtonsPanel():
 
 
 class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body"
+    bl_label = _("Soft Body")
 
     def draw(self, context):
         layout = self.layout
@@ -61,18 +61,18 @@ class PHYSICS_PT_softbody(PhysicButtonsPanel, bpy.types.Panel):
             split.enabled = softbody_panel_enabled(md)
 
             col = split.column()
-            col.label(text="Object:")
+            col.label(text=_("Object:"))
             col.prop(softbody, "friction")
             col.prop(softbody, "mass")
-            col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text="Mass:")
+            col.prop_search(softbody, "vertex_group_mass", ob, "vertex_groups", text=_("Mass:"))
 
             col = split.column()
-            col.label(text="Simulation:")
+            col.label(text=_("Simulation:"))
             col.prop(softbody, "speed")
 
 
 class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Cache"
+    bl_label = _("Soft Body Cache")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -85,7 +85,7 @@ class PHYSICS_PT_softbody_cache(PhysicButtonsPanel, bpy.types.Panel):
 
 
 class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Goal"
+    bl_label = _("Soft Body Goal")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -113,22 +113,22 @@ class PHYSICS_PT_softbody_goal(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Goal Strengths:")
-        col.prop(softbody, "goal_default", text="Default")
+        col.label(text=_("Goal Strengths:"))
+        col.prop(softbody, "goal_default", text=_("Default"))
         sub = col.column(align=True)
-        sub.prop(softbody, "goal_min", text="Minimum")
-        sub.prop(softbody, "goal_max", text="Maximum")
+        sub.prop(softbody, "goal_min", text=_("Minimum"))
+        sub.prop(softbody, "goal_max", text=_("Maximum"))
 
         col = split.column()
-        col.label(text="Goal Settings:")
-        col.prop(softbody, "goal_spring", text="Stiffness")
-        col.prop(softbody, "goal_friction", text="Damping")
+        col.label(text=_("Goal Settings:"))
+        col.prop(softbody, "goal_spring", text=_("Stiffness"))
+        col.prop(softbody, "goal_friction", text=_("Damping"))
 
-        layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text="Vertex Group")
+        layout.prop_search(softbody, "vertex_group_goal", ob, "vertex_groups", text=_("Vertex Group"))
 
 
 class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Edges"
+    bl_label = _("Soft Body Edges")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -153,14 +153,14 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Springs:")
+        col.label(text=_("Springs:"))
         col.prop(softbody, "pull")
         col.prop(softbody, "push")
         col.prop(softbody, "damping")
         col.prop(softbody, "plastic")
         col.prop(softbody, "bend")
-        col.prop(softbody, "spring_length", text="Length")
-        col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text="Springs:")
+        col.prop(softbody, "spring_length", text=_("Length"))
+        col.prop_search(softbody, "vertex_group_spring", ob, "vertex_groups", text=_("Springs:"))
 
         col = split.column()
         col.prop(softbody, "use_stiff_quads")
@@ -168,20 +168,20 @@ class PHYSICS_PT_softbody_edge(PhysicButtonsPanel, bpy.types.Panel):
         sub.active = softbody.use_stiff_quads
         sub.prop(softbody, "shear")
 
-        col.label(text="Aerodynamics:")
+        col.label(text=_("Aerodynamics:"))
         col.row().prop(softbody, "aerodynamics_type", expand=True)
-        col.prop(softbody, "aero", text="Factor")
+        col.prop(softbody, "aero", text=_("Factor"))
 
         #sub = col.column()
         #sub.enabled = softbody.aero > 0
 
-        col.label(text="Collision:")
-        col.prop(softbody, "use_edge_collision", text="Edge")
-        col.prop(softbody, "use_face_collision", text="Face")
+        col.label(text=_("Collision:"))
+        col.prop(softbody, "use_edge_collision", text=_("Edge"))
+        col.prop(softbody, "use_face_collision", text=_("Face"))
 
 
 class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Self Collision"
+    bl_label = _("Soft Body Self Collision")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -202,18 +202,18 @@ class PHYSICS_PT_softbody_collision(PhysicButtonsPanel, bpy.types.Panel):
 
         layout.active = softbody.use_self_collision and softbody_panel_enabled(md)
 
-        layout.label(text="Collision Ball Size Calculation:")
+        layout.label(text=_("Collision Ball Size Calculation:"))
         layout.prop(softbody, "collision_type", expand=True)
 
         col = layout.column(align=True)
-        col.label(text="Ball:")
-        col.prop(softbody, "ball_size", text="Size")
-        col.prop(softbody, "ball_stiff", text="Stiffness")
-        col.prop(softbody, "ball_damp", text="Dampening")
+        col.label(text=_("Ball:"))
+        col.prop(softbody, "ball_size", text=_("Size"))
+        col.prop(softbody, "ball_stiff", text=_("Stiffness"))
+        col.prop(softbody, "ball_damp", text=_("Dampening"))
 
 
 class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Solver"
+    bl_label = _("Soft Body Solver")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
@@ -232,24 +232,24 @@ class PHYSICS_PT_softbody_solver(PhysicButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column(align=True)
-        col.label(text="Step Size:")
+        col.label(text=_("Step Size:"))
         col.prop(softbody, "step_min")
         col.prop(softbody, "step_max")
-        col.prop(softbody, "use_auto_step", text="Auto-Step")
+        col.prop(softbody, "use_auto_step", text=_("Auto-Step"))
 
         col = split.column()
         col.prop(softbody, "error_threshold")
-        col.label(text="Helpers:")
+        col.label(text=_("Helpers:"))
         col.prop(softbody, "choke")
         col.prop(softbody, "fuzzy")
 
-        layout.label(text="Diagnostics:")
+        layout.label(text=_("Diagnostics:"))
         layout.prop(softbody, "use_diagnose")
         layout.prop(softbody, "use_estimate_matrix")
 
 
 class PHYSICS_PT_softbody_field_weights(PhysicButtonsPanel, bpy.types.Panel):
-    bl_label = "Soft Body Field Weights"
+    bl_label = _("Soft Body Field Weights")
     bl_options = {'DEFAULT_CLOSED'}
 
     @classmethod
index 56520202efbb4e14a7d25b7f06bd2ce5dba53a0c..91b604efdc0670a16f969b1a345cd2cc2ea4c8e5 100644 (file)
@@ -499,13 +499,13 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
             split.label("FIXME: hard coded Non-Linear, Gamma:1.0")
             '''
             col = split.column()
-            col.prop(rd, "use_cineon_log", text="Convert to Log")
+            col.prop(rd, "use_cineon_log", text=_("Convert to Log"))
 
             col = split.column(align=True)
             col.active = rd.use_cineon_log
-            col.prop(rd, "cineon_black", text="Black")
-            col.prop(rd, "cineon_white", text="White")
-            col.prop(rd, "cineon_gamma", text="Gamma")
+            col.prop(rd, "cineon_black", text=_("Black"))
+            col.prop(rd, "cineon_white", text=_("White"))
+            col.prop(rd, "cineon_gamma", text=_("Gamma"))
             '''
 
         elif file_format == 'TIFF':
index 7725f6616934489646f33b259a9cef60dc3458f0..fbdf02dd51ebf272cfe8251863af9faa2be74904 100644 (file)
@@ -19,7 +19,7 @@
 # <pep8 compliant>
 import bpy
 from rna_prop_ui import PropertyPanel
-
+from blf import gettext as _
 
 class SceneButtonsPanel():
     bl_space_type = 'PROPERTIES'
@@ -32,7 +32,7 @@ class SceneButtonsPanel():
 
 
 class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Scene"
+    bl_label = _("Scene")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -40,11 +40,11 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel):
         scene = context.scene
 
         layout.prop(scene, "camera")
-        layout.prop(scene, "background_set", text="Background")
+        layout.prop(scene, "background_set", text=_("Background"))
 
 
 class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Units"
+    bl_label = _("Units")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw(self, context):
@@ -57,12 +57,12 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel):
 
         row = layout.row()
         row.active = (unit.system != 'NONE')
-        row.prop(unit, "scale_length", text="Scale")
+        row.prop(unit, "scale_length", text=_("Scale"))
         row.prop(unit, "use_separate")
 
 
 class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Keying Sets"
+    bl_label = _("Keying Sets")
 
     def draw(self, context):
         layout = self.layout
@@ -86,16 +86,16 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel):
 
             subcol = col.column()
             subcol.operator_context = 'INVOKE_DEFAULT'
-            op = subcol.operator("anim.keying_set_export", text="Export to File")
+            op = subcol.operator("anim.keying_set_export", text=_("Export to File"))
             op.filepath = "keyingset.py"
 
             col = row.column()
-            col.label(text="Keyframing Settings:")
+            col.label(text=_("Keyframing Settings:"))
             col.prop(ks, "bl_options")
 
 
 class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Active Keying Set"
+    bl_label = _("Active Keying Set")
 
     @classmethod
     def poll(cls, context):
@@ -109,7 +109,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
         ks = scene.keying_sets.active
 
         row = layout.row()
-        row.label(text="Paths:")
+        row.label(text=_("Paths:"))
 
         row = layout.row()
 
@@ -123,20 +123,20 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
         ksp = ks.paths.active
         if ksp:
             col = layout.column()
-            col.label(text="Target:")
+            col.label(text=_("Target:"))
             col.template_any_ID(ksp, "id", "id_type")
             col.template_path_builder(ksp, "data_path", ksp.id)
 
             row = layout.row()
 
             col = row.column()
-            col.label(text="Array Target:")
+            col.label(text=_("Array Target:"))
             col.prop(ksp, "use_entire_array")
             if ksp.use_entire_array is False:
                 col.prop(ksp, "array_index")
 
             col = row.column()
-            col.label(text="F-Curve Grouping:")
+            col.label(text=_("F-Curve Grouping:"))
             col.prop(ksp, "group_method")
             if ksp.group_method == 'NAMED':
                 col.prop(ksp, "group")
@@ -145,7 +145,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel):
 
 
 class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Gravity"
+    bl_label = _("Gravity")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
@@ -162,7 +162,7 @@ class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel):
 
 
 class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
-    bl_label = "Simplify"
+    bl_label = _("Simplify")
     COMPAT_ENGINES = {'BLENDER_RENDER'}
 
     def draw_header(self, context):
@@ -180,14 +180,14 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.prop(rd, "simplify_subdivision", text="Subdivision")
-        col.prop(rd, "simplify_child_particles", text="Child Particles")
+        col.prop(rd, "simplify_subdivision", text=_("Subdivision"))
+        col.prop(rd, "simplify_child_particles", text=_("Child Particles"))
 
         col.prop(rd, "use_simplify_triangulate")
 
         col = split.column()
-        col.prop(rd, "simplify_shadow_samples", text="Shadow Samples")
-        col.prop(rd, "simplify_ao_sss", text="AO and SSS")
+        col.prop(rd, "simplify_shadow_samples", text=_("Shadow Samples"))
+        col.prop(rd, "simplify_ao_sss", text=_("AO and SSS"))
 
 
 class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
@@ -201,12 +201,12 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel):
 class ANIM_OT_keying_set_export(bpy.types.Operator):
     "Export Keying Set to a python script."
     bl_idname = "anim.keying_set_export"
-    bl_label = "Export Keying Set..."
+    bl_label = _("Export Keying Set...")
 
-    filepath = bpy.props.StringProperty(name="File Path", description="Filepath to write file to.")
-    filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
-    filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
-    filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
+    filepath = bpy.props.StringProperty(name=_("File Path"), description=_("Filepath to write file to."))
+    filter_folder = bpy.props.BoolProperty(name=_("Filter folders"), description="", default=True, options={'HIDDEN'})
+    filter_text = bpy.props.BoolProperty(name=_("Filter text"), description="", default=True, options={'HIDDEN'})
+    filter_python = bpy.props.BoolProperty(name=_("Filter python"), description="", default=True, options={'HIDDEN'})
 
     def execute(self, context):
         if not self.filepath:
index 8cb37a0b9877e68cc69a96a7f0ee3691b6299342..6b253b6ab2abafc5822093bc9aab33b04b0fdc5b 100644 (file)
@@ -23,7 +23,7 @@ from blf import gettext as _
 
 
 class TEXTURE_MT_specials(bpy.types.Menu):
-    bl_label = "Texture Specials"
+    bl_label = _("Texture Specials")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -34,7 +34,7 @@ class TEXTURE_MT_specials(bpy.types.Menu):
 
 
 class TEXTURE_MT_envmap_specials(bpy.types.Menu):
-    bl_label = "Environment Map Specials"
+    bl_label = _("Environment Map Specials")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -143,16 +143,16 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, bpy.types.Panel):
             if tex.use_nodes:
 
                 if slot:
-                    split.label(text="Output:")
+                    split.label(text=_("Output:"))
                     split.prop(slot, "output_node", text="")
 
             else:
-                split.label(text="Type:")
+                split.label(text=_("Type:"))
                 split.prop(tex, "type", text="")
 
 
 class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
-    bl_label = "Preview"
+    bl_label = _("Preview")
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
     def draw(self, context):
@@ -169,7 +169,7 @@ class TEXTURE_PT_preview(TextureButtonsPanel, bpy.types.Panel):
 
 
 class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
-    bl_label = "Colors"
+    bl_label = _("Colors")
     bl_options = {'DEFAULT_CLOSED'}
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -178,21 +178,21 @@ class TEXTURE_PT_colors(TextureButtonsPanel, bpy.types.Panel):
 
         tex = context.texture
 
-        layout.prop(tex, "use_color_ramp", text="Ramp")
+        layout.prop(tex, "use_color_ramp", text=_("Ramp"))
         if tex.use_color_ramp:
             layout.template_color_ramp(tex, "color_ramp", expand=True)
 
         split = layout.split()
 
         col = split.column()
-        col.label(text="RGB Multiply:")
+        col.label(text=_("RGB Multiply:"))
         sub = col.column(align=True)
         sub.prop(tex, "factor_red", text="R")
         sub.prop(tex, "factor_green", text="G")
         sub.prop(tex, "factor_blue", text="B")
 
         col = split.column()
-        col.label(text="Adjust:")
+        col.label(text=_("Adjust:"))
         col.prop(tex, "intensity")
         col.prop(tex, "contrast")
         col.prop(tex, "saturation")
@@ -225,7 +225,7 @@ class TextureTypePanel(TextureButtonsPanel):
 
 
 class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Clouds"
+    bl_label = _("Clouds")
     tex_type = 'CLOUDS'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -235,21 +235,21 @@ class TEXTURE_PT_clouds(TextureTypePanel, bpy.types.Panel):
         tex = context.texture
 
         layout.prop(tex, "cloud_type", expand=True)
-        layout.label(text="Noise:")
-        layout.prop(tex, "noise_type", text="Type", expand=True)
-        layout.prop(tex, "noise_basis", text="Basis")
+        layout.label(text=_("Noise:"))
+        layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+        layout.prop(tex, "noise_basis", text=_("Basis"))
 
         split = layout.split()
 
         col = split.column()
-        col.prop(tex, "noise_scale", text="Size")
-        col.prop(tex, "noise_depth", text="Depth")
+        col.prop(tex, "noise_scale", text=_("Size"))
+        col.prop(tex, "noise_depth", text=_("Depth"))
 
-        split.prop(tex, "nabla", text="Nabla")
+        split.prop(tex, "nabla", text=_("Nabla"))
 
 
 class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Wood"
+    bl_label = _("Wood")
     tex_type = 'WOOD'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -263,22 +263,22 @@ class TEXTURE_PT_wood(TextureTypePanel, bpy.types.Panel):
 
         col = layout.column()
         col.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
-        col.label(text="Noise:")
-        col.row().prop(tex, "noise_type", text="Type", expand=True)
-        layout.prop(tex, "noise_basis", text="Basis")
+        col.label(text=_("Noise:"))
+        col.row().prop(tex, "noise_type", text=_("Type"), expand=True)
+        layout.prop(tex, "noise_basis", text=_("Basis"))
 
         split = layout.split()
         split.active = tex.wood_type in {'RINGNOISE', 'BANDNOISE'}
 
         col = split.column()
-        col.prop(tex, "noise_scale", text="Size")
+        col.prop(tex, "noise_scale", text=_("Size"))
         col.prop(tex, "turbulence")
 
         split.prop(tex, "nabla")
 
 
 class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Marble"
+    bl_label = _("Marble")
     tex_type = 'MARBLE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -289,15 +289,15 @@ class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
 
         layout.prop(tex, "marble_type", expand=True)
         layout.prop(tex, "noise_basis_2", expand=True)
-        layout.label(text="Noise:")
-        layout.prop(tex, "noise_type", text="Type", expand=True)
-        layout.prop(tex, "noise_basis", text="Basis")
+        layout.label(text=_("Noise:"))
+        layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+        layout.prop(tex, "noise_basis", text=_("Basis"))
 
         split = layout.split()
 
         col = split.column()
-        col.prop(tex, "noise_scale", text="Size")
-        col.prop(tex, "noise_depth", text="Depth")
+        col.prop(tex, "noise_scale", text=_("Size"))
+        col.prop(tex, "noise_depth", text=_("Depth"))
 
         col = split.column()
         col.prop(tex, "turbulence")
@@ -305,7 +305,7 @@ class TEXTURE_PT_marble(TextureTypePanel, bpy.types.Panel):
 
 
 class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Magic"
+    bl_label = _("Magic")
     tex_type = 'MAGIC'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -315,12 +315,12 @@ class TEXTURE_PT_magic(TextureTypePanel, bpy.types.Panel):
         tex = context.texture
 
         row = layout.row()
-        row.prop(tex, "noise_depth", text="Depth")
+        row.prop(tex, "noise_depth", text=_("Depth"))
         row.prop(tex, "turbulence")
 
 
 class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Blend"
+    bl_label = _("Blend")
     tex_type = 'BLEND'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -338,7 +338,7 @@ class TEXTURE_PT_blend(TextureTypePanel, bpy.types.Panel):
 
 
 class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Stucci"
+    bl_label = _("Stucci")
     tex_type = 'STUCCI'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -348,17 +348,17 @@ class TEXTURE_PT_stucci(TextureTypePanel, bpy.types.Panel):
         tex = context.texture
 
         layout.prop(tex, "stucci_type", expand=True)
-        layout.label(text="Noise:")
-        layout.prop(tex, "noise_type", text="Type", expand=True)
-        layout.prop(tex, "noise_basis", text="Basis")
+        layout.label(text=_("Noise:"))
+        layout.prop(tex, "noise_type", text=_("Type"), expand=True)
+        layout.prop(tex, "noise_basis", text=_("Basis"))
 
         row = layout.row()
-        row.prop(tex, "noise_scale", text="Size")
+        row.prop(tex, "noise_scale", text=_("Size"))
         row.prop(tex, "turbulence")
 
 
 class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Image"
+    bl_label = _("Image")
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
 
@@ -375,16 +375,16 @@ def texture_filter_common(tex, layout):
     layout.prop(tex, "filter_type", text="")
     if tex.use_mipmap and tex.filter_type in {'AREA', 'EWA', 'FELINE'}:
         if tex.filter_type == 'FELINE':
-            layout.prop(tex, "filter_probes", text="Probes")
+            layout.prop(tex, "filter_probes", text=_("Probes"))
         else:
-            layout.prop(tex, "filter_eccentricity", text="Eccentricity")
+            layout.prop(tex, "filter_eccentricity", text=_("Eccentricity"))
 
     layout.prop(tex, "filter_size")
     layout.prop(tex, "use_filter_size_min")
 
 
 class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Image Sampling"
+    bl_label = _("Image Sampling")
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -399,12 +399,12 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
         split = layout.split()
 
         col = split.column()
-        col.label(text="Alpha:")
-        col.prop(tex, "use_alpha", text="Use")
-        col.prop(tex, "use_calculate_alpha", text="Calculate")
-        col.prop(tex, "invert_alpha", text="Invert")
+        col.label(text=_("Alpha:"))
+        col.prop(tex, "use_alpha", text=_("Use"))
+        col.prop(tex, "use_calculate_alpha", text=_("Calculate"))
+        col.prop(tex, "invert_alpha", text=_("Invert"))
         col.separator()
-        col.prop(tex, "use_flip_axis", text="Flip X/Y Axis")
+        col.prop(tex, "use_flip_axis", text=_("Flip X/Y Axis"))
 
         col = split.column()
 
@@ -425,7 +425,7 @@ class TEXTURE_PT_image_sampling(TextureTypePanel, bpy.types.Panel):
 
 
 class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
-    bl_label = "Image Mapping"
+    bl_label = _("Image Mapping")
     bl_options = {'DEFAULT_CLOSED'}
     tex_type = 'IMAGE'
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -441,12 +441,12 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
 
         if tex.extension == 'REPEAT':
             col = split.column(align=True)
-            col.label(text="Repeat:")
+            col.label(text=_("Repeat:"))
             col.prop(tex, "repeat_x", text="X")
             col.prop(tex, "repeat_y", text="Y")
 
             col = split.column(align=True)
-            col.label(text="Mirror:")
+            col.label(text=_("Mirror:"))
             row = col.row()
             row.prop(tex, "use_mirror_x", text="X")
             row.active = (tex.repeat_x > 1)
@@ -458,11 +458,11 @@ class TEXTURE_PT_image_mapping(TextureTypePanel, bpy.types.Panel):
         elif tex.extension == 'CHECKER':
             col = split.column(align=True)
             row = col.row()
-            row.prop(tex, "use_checker_even", text="Even")
-