merge with trunk r38787
authorXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 29 Jul 2011 17:42:53 +0000 (17:42 +0000)
committerXiao Xiangquan <xiaoxiangquan@gmail.com>
Fri, 29 Jul 2011 17:42:53 +0000 (17:42 +0000)
105 files changed:
1  2 
SConstruct
intern/ffmpeg/ffmpeg_compat.h
po/POTFILES.in
release/scripts/modules/bpy/path.py
release/scripts/startup/bl_operators/image.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_operators/object_align.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_operators/object_randomize_transform.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_operators/screen_play_rendered_anim.py
release/scripts/startup/bl_operators/wm.py
release/scripts/startup/bl_ui/properties_world.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_userpref.py
release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
release/scripts/templates/batch_export.py
release/scripts/templates/ui_menu.py
release/scripts/templates/ui_menu_simple.py
release/scripts/templates/ui_panel_simple.py
source/blender/blenfont/CMakeLists.txt
source/blender/editors/animation/CMakeLists.txt
source/blender/editors/armature/CMakeLists.txt
source/blender/editors/armature/editarmature.c
source/blender/editors/curve/CMakeLists.txt
source/blender/editors/gpencil/CMakeLists.txt
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_panel.c
source/blender/editors/interface/interface_regions.c
source/blender/editors/interface/interface_style.c
source/blender/editors/interface/interface_templates.c
source/blender/editors/mesh/CMakeLists.txt
source/blender/editors/mesh/editmesh_mods.c
source/blender/editors/metaball/CMakeLists.txt
source/blender/editors/object/CMakeLists.txt
source/blender/editors/object/object_add.c
source/blender/editors/object/object_edit.c
source/blender/editors/physics/CMakeLists.txt
source/blender/editors/render/SConscript
source/blender/editors/render/render_shading.c
source/blender/editors/sculpt_paint/CMakeLists.txt
source/blender/editors/sound/CMakeLists.txt
source/blender/editors/space_action/CMakeLists.txt
source/blender/editors/space_buttons/CMakeLists.txt
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_graph/CMakeLists.txt
source/blender/editors/space_image/image_buttons.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_logic/CMakeLists.txt
source/blender/editors/space_nla/CMakeLists.txt
source/blender/editors/space_node/node_draw.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_header.c
source/blender/editors/space_node/node_ops.c
source/blender/editors/space_outliner/CMakeLists.txt
source/blender/editors/space_script/CMakeLists.txt
source/blender/editors/space_sequencer/CMakeLists.txt
source/blender/editors/space_sequencer/sequencer_add.c
source/blender/editors/space_text/text_ops.c
source/blender/editors/space_time/CMakeLists.txt
source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/transform/CMakeLists.txt
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_ops.c
source/blender/editors/util/CMakeLists.txt
source/blender/editors/util/undo.c
source/blender/editors/uvedit/CMakeLists.txt
source/blender/editors/uvedit/uvedit_ops.c
source/blender/makesrna/intern/CMakeLists.txt
source/blender/makesrna/intern/SConscript
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/python/mathutils/CMakeLists.txt
source/blender/python/mathutils/mathutils.c
source/blender/python/mathutils/mathutils.h
source/blender/python/mathutils/mathutils_Color.c
source/blender/python/mathutils/mathutils_Color.h
source/blender/python/mathutils/mathutils_Euler.c
source/blender/python/mathutils/mathutils_Euler.h
source/blender/python/mathutils/mathutils_Matrix.c
source/blender/python/mathutils/mathutils_Matrix.h
source/blender/python/mathutils/mathutils_Quaternion.c
source/blender/python/mathutils/mathutils_Quaternion.h
source/blender/python/mathutils/mathutils_Vector.c
source/blender/python/mathutils/mathutils_Vector.h
source/blender/python/mathutils/mathutils_geometry.c
source/blender/python/mathutils/mathutils_geometry.h
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_operators.c
source/creator/CMakeLists.txt
source/tests/check_deprecated.py

diff --cc SConstruct
@@@ -470,9 -487,9 +487,9 @@@ if  env['OURPLATFORM']!='darwin'
                      if f.endswith('.ttf'):
                          continue
                  
--                if 'locale' in dp:
++                if 'locale' in dp or 'fonts' in dp:
                      datafileslist.append(os.path.join(dp,f))
 -                    dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[1:]))    # skip bin
 +                    dir= os.path.join(*([env['BF_INSTALLDIR']] + [VERSION] + ['datafiles'] + dp.split(os.sep)[2:]))    # skip bin/.blender
                      datafilestargetlist.append(dir + os.sep + f)
  
                  else:
diff --cc po/POTFILES.in
index 0c65433,0000000..b45e7b2
mode 100755,000000..100755
--- /dev/null
@@@ -1,185 -1,0 +1,187 @@@
 +release/scripts/startup/bl_operators/animsys_update.py
 +release/scripts/startup/bl_operators/object.py
 +release/scripts/startup/bl_operators/object_align.py
++release/scripts/startup/bl_operators/object_quick_effects.py
 +release/scripts/startup/bl_operators/object_randomize_transform.py
 +release/scripts/startup/bl_operators/presets.py
 +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_render.py
 +release/scripts/startup/bl_ui/properties_texture.py
++release/scripts/startup/bl_ui/properties_world.py
 +
 +release/scripts/startup/bl_ui/space_console.py
 +release/scripts/startup/bl_ui/space_dopesheet.py
 +release/scripts/startup/bl_ui/space_graph.py
 +release/scripts/startup/bl_ui/space_image.py
 +release/scripts/startup/bl_ui/space_info.py
 +release/scripts/startup/bl_ui/space_logic.py
 +release/scripts/startup/bl_ui/space_nla.py
 +release/scripts/startup/bl_ui/space_node.py
 +release/scripts/startup/bl_ui/space_outliner.py
 +release/scripts/startup/bl_ui/space_sequencer.py 
 +release/scripts/startup/bl_ui/space_text.py
 +release/scripts/startup/bl_ui/space_time.py
 +release/scripts/startup/bl_ui/space_userpref.py
 +release/scripts/startup/bl_ui/space_userpref_keymap.py
 +release/scripts/startup/bl_ui/space_view3d.py
 +release/scripts/startup/bl_ui/space_view3d_toolbar.py
 +
 +source/blender/editors/animation/anim_channels_edit.c
 +source/blender/editors/animation/anim_markers.c
 +source/blender/editors/animation/anim_ops.c
 +source/blender/editors/animation/drivers.c
 +source/blender/editors/animation/keyframing.c
 +source/blender/editors/animation/keyingsets.c
 +
 +source/blender/editors/armature/armature_ops.c
 +source/blender/editors/armature/editarmature.c
 +source/blender/editors/armature/editarmature_sketch.c
 +source/blender/editors/armature/poselib.c
 +source/blender/editors/armature/poseobject.c
 +source/blender/editors/armature/poseSlide.c
 +
 +source/blender/editors/curve/editcurve.c
 +source/blender/editors/curve/editfont.c
 +
 +source/blender/editors/gpencil/gpencil_paint.c
 +
 +source/blender/editors/interface/interface_layout.c
 +source/blender/editors/interface/interface_ops.c
 +source/blender/editors/interface/interface_regions.c
 +source/blender/editors/interface/interface_templates.c
 +source/blender/editors/interface/interface_utils.c
 +source/blender/editors/interface/view2d_ops.c
 +
 +source/blender/editors/mesh/editmesh.c
 +source/blender/editors/mesh/editmesh_add.c
 +source/blender/editors/mesh/editmesh_loop.c
 +source/blender/editors/mesh/editmesh_mods.c
 +source/blender/editors/mesh/editmesh_tools.c
 +source/blender/editors/mesh/loopcut.c
 +source/blender/editors/mesh/mesh_ops.c
 +
 +source/blender/editors/metaball/mball_edit.c
 +
 +source/blender/editors/object/object_add.c
 +source/blender/editors/object/object_constraint.c
 +source/blender/editors/object/object_edit.c
 +source/blender/editors/object/object_group.c
 +source/blender/editors/object/object_lattice.c
 +source/blender/editors/object/object_ops.c
 +source/blender/editors/object/object_relations.c
 +source/blender/editors/object/object_select.c
 +source/blender/editors/object/object_shapekey.c
 +source/blender/editors/object/object_transform.c
 +
 +source/blender/editors/physics/particle_edit.c
 +source/blender/editors/physics/particle_object.c
 +source/blender/editors/physics/physics_pointcache.c
 +
 +source/blender/editors/render/render_internal.c
 +source/blender/editors/render/render_opengl.c
 +source/blender/editors/render/render_shading.c
 +source/blender/editors/render/render_view.c
 +
 +source/blender/editors/screen/area.c
 +source/blender/editors/screen/screendump.c
 +source/blender/editors/screen/screen_ops.c
 +
 +source/blender/editors/sculpt_paint/paint_ops.c
 +source/blender/editors/sculpt_paint/paint_image.c
 +source/blender/editors/sculpt_paint/paint_utils.c
 +source/blender/editors/sculpt_paint/paint_vertex.c
 +source/blender/editors/sculpt_paint/sculpt.c
 +
 +source/blender/editors/sound/sound_ops.c
 +
 +source/blender/editors/space_action/action_edit.c
 +source/blender/editors/space_action/action_ops.c
 +source/blender/editors/space_action/action_select.c
 +
 +source/blender/editors/space_buttons/buttons_ops.c
 +source/blender/editors/space_console/console_ops.c
 +
 +source/blender/editors/space_file/file_draw.c
 +source/blender/editors/space_file/file_ops.c
 +source/blender/editors/space_file/file_panels.c
 +
 +source/blender/editors/space_graph/graph_buttons.c
 +source/blender/editors/space_graph/graph_edit.c
 +source/blender/editors/space_graph/graph_ops.c
 +source/blender/editors/space_graph/graph_select.c
 +
 +source/blender/editors/space_image/image_buttons.c
 +source/blender/editors/space_image/image_ops.c
 +
 +source/blender/editors/space_info/info_ops.c
 +source/blender/editors/space_info/info_report.c
 +source/blender/editors/space_info/space_info.c
 +
 +source/blender/editors/space_logic/logic_buttons.c
 +
 +source/blender/editors/space_nla/nla_buttons.c
 +source/blender/editors/space_nla/nla_channels.c
 +source/blender/editors/space_nla/nla_edit.c
 +source/blender/editors/space_nla/nla_select.c
 +
 +source/blender/editors/space_node/node_buttons.c
 +source/blender/editors/space_node/node_edit.c
 +source/blender/editors/space_node/node_header.c
 +source/blender/editors/space_node/node_ops.c
 +source/blender/editors/space_node/node_select.c
 +source/blender/editors/space_node/node_state.c
 +
 +source/blender/editors/space_outliner/outliner.c
 +source/blender/editors/space_script/script_edit.c
 +
 +source/blender/editors/space_sequencer/sequencer_add.c
 +source/blender/editors/space_sequencer/sequencer_buttons.c
 +source/blender/editors/space_sequencer/sequencer_edit.c
 +source/blender/editors/space_sequencer/sequencer_select.c
 +
 +source/blender/editors/space_text/text_header.c
 +source/blender/editors/space_text/text_ops.c
 +source/blender/editors/space_time/time_ops.c
 +
 +source/blender/editors/space_view3d/view3d_buttons.c
 +source/blender/editors/space_view3d/view3d_draw.c
 +source/blender/editors/space_view3d/view3d_edit.c
 +source/blender/editors/space_view3d/view3d_fly.c
 +source/blender/editors/space_view3d/view3d_header.c
 +source/blender/editors/space_view3d/view3d_select.c
 +source/blender/editors/space_view3d/view3d_view.c
 +source/blender/editors/space_view3d/view3d_toolbar.c
 +
 +source/blender/editors/transform/transform.c
 +source/blender/editors/transform/transform_ops.c
 +source/blender/editors/transform/transform_orientations.c
 +
 +source/blender/editors/util/undo.c
 +
 +source/blender/editors/uvedit/uvedit_ops.c
 +source/blender/editors/uvedit/uvedit_unwrap_ops.c
 +
 +source/blender/makesrna/intern/rna_ID.c
 +source/blender/makesrna/intern/rna_action.c
 +source/blender/makesrna/intern/rna_color.c
 +source/blender/makesrna/intern/rna_curve.c
 +source/blender/makesrna/intern/rna_fcurve.c
 +source/blender/makesrna/intern/rna_material.c
 +source/blender/makesrna/intern/rna_object.c
 +source/blender/makesrna/intern/rna_object_force.c
 +source/blender/makesrna/intern/rna_render.c
 +source/blender/makesrna/intern/rna_scene.c
 +source/blender/makesrna/intern/rna_space.c
 +source/blender/makesrna/intern/rna_ui_api.c
 +source/blender/makesrna/intern/rna_userdef.c
 +source/blender/makesrna/intern/rna_wm.c
 +source/blender/makesrna/intern/rna_wm_api.c
 +
 +source/blender/windowmanager/intern/wm_files.c
 +source/blender/windowmanager/intern/wm_operators.c
 +source/blender/windowmanager/intern/wm_window.c
 +
 +
Simple merge
@@@ -142,14 -154,14 +154,13 @@@ class ProjectEdit(bpy.types.Operator)
  
          filepath = os.path.basename(bpy.data.filepath)
          filepath = os.path.splitext(filepath)[0]
 -        # fixes <memory> rubbish, needs checking
 -        # filepath = bpy.path.clean_name(filepath)
 +        # filepath = bpy.path.clean_name(filepath) # fixes <memory> rubbish, needs checking
  
-         if filepath.startswith(".") or filepath == "":
-             # TODO, have a way to check if the file is saved, assume startup.blend
+         if bpy.data.is_saved:
+             filepath = "//" + filepath
+         else:
              tmpdir = context.user_preferences.filepaths.temporary_directory
              filepath = os.path.join(tmpdir, "project_edit")
-         else:
-             filepath = "//" + filepath
  
          obj = context.object
  
@@@ -26,12 -25,25 +26,25 @@@ from blf import gettext as 
  class SelectPattern(bpy.types.Operator):
      '''Select object matching a naming pattern'''
      bl_idname = "object.select_pattern"
 -    bl_label = "Select Pattern"
 +    bl_label = _("Select Pattern")
      bl_options = {'REGISTER', 'UNDO'}
  
-     pattern = StringProperty(name=_("Pattern"), description=_("Name filter using '*' and '?' wildcard chars"), maxlen=32, default="*")
-     case_sensitive = BoolProperty(name=_("Case Sensitive"), description=_("Do a case sensitive compare"), default=False)
-     extend = BoolProperty(name=_("Extend"), description=_("Extend the existing selection"), default=True)
+     pattern = StringProperty(
 -            name="Pattern",
 -            description="Name filter using '*' and '?' wildcard chars",
++            name=_("Pattern"),
++            description=_("Name filter using '*' and '?' wildcard chars"),
+             maxlen=32,
+             default="*",
+             )
+     case_sensitive = BoolProperty(
 -            name="Case Sensitive",
 -            description="Do a case sensitive compare",
++            name=_("Case Sensitive"),
++            description=_("Do a case sensitive compare"),
+             default=False,
+             )
+     extend = BoolProperty(
 -            name="Extend",
 -            description="Extend the existing selection",
++            name=_("Extend"),
++            description=_("Extend the existing selection"),
+             default=True,
+             )
  
      def execute(self, context):
  
@@@ -94,19 -121,25 +122,25 @@@ class SelectCamera(bpy.types.Operator)
  
  
  class SelectHierarchy(bpy.types.Operator):
-     '''Select object relative to the active objects position in the hierarchy'''
+     '''Select object relative to the active objects position''' \
+     '''in the hierarchy'''
      bl_idname = "object.select_hierarchy"
 -    bl_label = "Select Hierarchy"
 +    bl_label = _("Select Hierarchy")
      bl_options = {'REGISTER', 'UNDO'}
  
-     direction = EnumProperty(items=(
-                         ('PARENT', _("Parent"), ""),
-                         ('CHILD', _("Child"), "")),
-                 name=_("Direction"),
-                 description=_("Direction to select in the hierarchy"),
-                 default='PARENT')
+     direction = EnumProperty(
 -            items=(('PARENT', "Parent", ""),
 -                   ('CHILD', "Child", ""),
++            items=(('PARENT', _("Parent"), ""),
++                   ('CHILD', _("Child"), "")
+                    ),
 -            name="Direction",
 -            description="Direction to select in the hierarchy",
++            name=_("Direction"),
++            description=_("Direction to select in the hierarchy"),
+             default='PARENT')
  
-     extend = BoolProperty(name=_("Extend"), description=_("Extend the existing selection"), default=False)
+     extend = BoolProperty(
 -            name="Extend",
 -            description="Extend the existing selection",
++            name=_("Extend"),
++            description=_("Extend the existing selection"),
+             default=False,
+             )
  
      @classmethod
      def poll(cls, context):
@@@ -158,13 -191,18 +192,17 @@@ class SubdivisionSet(bpy.types.Operator
      '''Sets a Subdivision Surface Level (1-5)'''
  
      bl_idname = "object.subdivision_set"
 -    bl_label = "Subdivision Set"
 +    bl_label = _("Subdivision Set")
      bl_options = {'REGISTER', 'UNDO'}
  
 -    level = IntProperty(name="Level",
 +    level = IntProperty(name=_("Level"),
              default=1, min=-100, max=100, soft_min=-6, soft_max=6)
  
-     relative = BoolProperty(name=_("Relative"), description=_("Apply the subsurf level as an offset relative to the current level"), default=False)
+     relative = BoolProperty(
 -            name="Relative",
 -            description=("Apply the subsurf level as an offset "
 -                         "relative to the current level"),
++            name=_("Relative"),
++            description=_("Apply the subsurf level as an offset relative to the current level"),
+             default=False,
+             )
  
      @classmethod
      def poll(cls, context):
  
  
  class ShapeTransfer(bpy.types.Operator):
-     '''Copy another selected objects active shape to this one by applying the relative offsets'''
+     '''Copy another selected objects active shape to this one by ''' \
+     '''applying the relative offsets'''
  
      bl_idname = "object.shape_key_transfer"
 -    bl_label = "Transfer Shape Key"
 +    bl_label = _("Transfer Shape Key")
      bl_options = {'REGISTER', 'UNDO'}
  
-     mode = EnumProperty(items=(
-                         ('OFFSET', _("Offset"), _("Apply the relative positional offset")),
-                         ('RELATIVE_FACE', _("Relative Face"), _("Calculate the geometricly relative position (using faces).")),
-                         ('RELATIVE_EDGE', _("Relative Edge"), _("Calculate the geometricly relative position (using edges)."))),
-                 name=_("Transformation Mode"),
-                 description=_("Method to apply relative shape positions to the new shape"),
-                 default='OFFSET')
-     use_clamp = BoolProperty(name=_("Clamp Offset"),
-                 description=_("Clamp the transformation to the distance each vertex moves in the original shape."),
-                 default=False)
+     mode = EnumProperty(
+             items=(('OFFSET',
 -                    "Offset",
 -                    "Apply the relative positional offset",
++                    _("Offset"),
++                    _("Apply the relative positional offset")
+                     ),
+                    ('RELATIVE_FACE',
 -                    "Relative Face",
 -                    "Calculate relative position (using faces).",
++                    _("Relative Face"),
++                    _("Calculate relative position (using faces)."),
+                     ),
+                    ('RELATIVE_EDGE',
 -                   "Relative Edge",
 -                   "Calculate relative position (using edges).",
++                   _("Relative Edge"),
++                   _("Calculate relative position (using edges)."),
+                    ),
+                    ),
 -            name="Transformation Mode",
 -            description="Relative shape positions to the new shape method",
++            name=_("Transformation Mode"),
++            description=_("Relative shape positions to the new shape method"),
+             default='OFFSET',
+             )
+     use_clamp = BoolProperty(
 -            name="Clamp Offset",
 -            description=("Clamp the transformation to the distance each "
 -                         "vertex moves in the original shape."),
++            name=_("Clamp Offset"),
++            description=_("Clamp the transformation to the distance each vertex moves in the original shape."),
+             default=False,
+             )
  
      def _main(self, ob_act, objects, mode='OFFSET', use_clamp=False):
  
@@@ -536,9 -650,10 +649,10 @@@ class MakeDupliFace(bpy.types.Operator)
  
  
  class IsolateTypeRender(bpy.types.Operator):
-     '''Hide unselected render objects of same type as active by setting the hide render flag'''
+     '''Hide unselected render objects of same type as active ''' \
+     '''by setting the hide render flag'''
      bl_idname = "object.isolate_type_render"
 -    bl_label = "Restrict Render Unselected"
 +    bl_label = _("Restrict Render Unselected")
      bl_options = {'REGISTER', 'UNDO'}
  
      def execute(self, context):
  
  import bpy
  from mathutils import Vector
 +from blf import gettext as _
  
+ def GlobalBB_LQ(bb_world):
  
- def align_objects(align_x, align_y, align_z, align_mode, relative_to):
+     # Initialize the variables with the 8th vertex
+     left, right, front, back, down, up = (bb_world[7][0],
+                                           bb_world[7][0],
+                                           bb_world[7][1],
+                                           bb_world[7][1],
+                                           bb_world[7][2],
+                                           bb_world[7][2],
+                                           )
+     # Test against the other 7 verts
+     for i in range (7):
+         # X Range
+         val = bb_world[i][0]
+         if val < left:
+             left = val
+         if val > right:
+             right = val
+         # Y Range
+         val = bb_world[i][1]
+         if val < front:
+             front = val
+         if val > back:
+             back = val
+         # Z Range
+         val = bb_world[i][2]
+         if val < down:
+             down = val
+         if val > up:
+             up = val
+     return (Vector((left, front, up)), Vector((right, back, down)))
+ def GlobalBB_HQ(obj):
+     matrix_world = obj.matrix_world.copy()
+     # Initialize the variables with the last vertex
+     verts = obj.data.vertices
+     val = matrix_world * verts[-1].co
+     left, right, front, back, down, up = (val[0],
+                                           val[0],
+                                           val[1],
+                                           val[1],
+                                           val[2],
+                                           val[2],
+                                           )
+     # Test against all other verts
+     for i in range (len(verts)-1):
+         vco = matrix_world * verts[i].co
+         # X Range
+         val = vco[0]
+         if val < left:
+             left = val
+         if val > right:
+             right = val
+         # Y Range
+         val = vco[1]
+         if val < front:
+             front = val
+         if val > back:
+             back = val
+         # Z Range
+         val = vco[2]
+         if val < down:
+             down = val
+         if val > up:
+             up = val
+     return Vector((left, front, up)), Vector((right, back, down))
+ def align_objects(align_x,
+                   align_y,
+                   align_z,
+                   align_mode,
+                   relative_to,
+                   bb_quality):
  
      cursor = bpy.context.scene.cursor_location
  
@@@ -235,9 -340,16 +341,14 @@@ from bpy.props import EnumProperty, Boo
  class AlignObjects(bpy.types.Operator):
      '''Align Objects'''
      bl_idname = "object.align"
 -    bl_label = "Align Objects"
 +    bl_label = _("Align Objects")
      bl_options = {'REGISTER', 'UNDO'}
  
 -            name="High Quality",
 -            description=("Enables high quality calculation of the "
 -                         "bounding box for perfect results on complex "
 -                         "shape meshes with rotation/scale (Slow)"),
+     bb_quality = BoolProperty(
++            name=_("High Quality"),
++            description=_("Enables high quality calculation of the bounding box for perfect results on complex shape meshes with rotation/scale (Slow)"),
+             default=True)
      align_mode = EnumProperty(items=(
              ('OPT_1', "Negative Sides", ""),
              ('OPT_2', "Centers", ""),
  
  from mathutils import Vector
  import bpy
- from bpy.props import BoolProperty, EnumProperty, IntProperty, FloatProperty, FloatVectorProperty
+ from bpy.props import (BoolProperty,
+                        EnumProperty,
+                        IntProperty,
+                        FloatProperty,
+                        FloatVectorProperty,
+                        )
 -
++from blf import gettext as _
  
  def object_ensure_material(obj, mat_name):
      """ Use an existing material or add a new one.
@@@ -262,17 -270,21 +270,21 @@@ class QuickSmoke(bpy.types.Operator)
      bl_label = "Quick Smoke"
      bl_options = {'REGISTER', 'UNDO'}
  
-     style = EnumProperty(items=(
-                         ('STREAM', "Stream", ""),
-                         ('PUFF', "Puff", ""),
-                         ('FIRE', "Fire", "")),
-                 name="Smoke Style",
-                 description="",
-                 default='STREAM')
-     show_flows = BoolProperty(name="Render Smoke Objects",
-                 description="Keep the smoke objects visible during rendering.",
-                 default=False)
+     style = EnumProperty(
+             items=(('STREAM', "Stream", ""),
+                    ('PUFF', "Puff", ""),
+                    ('FIRE', "Fire", ""),
+                    ),
+             name="Smoke Style",
+             description="",
+             default='STREAM',
+             )
+     show_flows = BoolProperty(
 -            name="Render Smoke Objects",
 -            description="Keep the smoke objects visible during rendering.",
++            name=_("Render Smoke Objects"),
++            description=_("Keep the smoke objects visible during rendering."),
+             default=False,
+             )
  
      def execute(self, context):
          fake_context = bpy.context.copy()
@@@ -371,24 -388,33 +388,32 @@@ class QuickFluid(bpy.types.Operator)
      bl_label = "Quick Fluid"
      bl_options = {'REGISTER', 'UNDO'}
  
-     style = EnumProperty(items=(
-                         ('INFLOW', "Inflow", ""),
-                         ('BASIC', "Basic", "")),
+     style = EnumProperty(
+             items=(('INFLOW', "Inflow", ""),
+                    ('BASIC', "Basic", ""),
+                    ),
                  name="Fluid Style",
                  description="",
-                 default='BASIC')
-     initial_velocity = FloatVectorProperty(name="Initial Velocity",
-         description="Initial velocity of the fluid",
-         default=(0.0, 0.0, 0.0), min=-100.0, max=100.0, subtype='VELOCITY')
-     show_flows = BoolProperty(name="Render Fluid Objects",
-                 description="Keep the fluid objects visible during rendering.",
-                 default=False)
-     start_baking = BoolProperty(name="Start Fluid Bake",
-                 description="Start baking the fluid immediately after creating the domain object.",
-                 default=False)
+                 default='BASIC',
+                 )
+     initial_velocity = FloatVectorProperty(
 -            name="Initial Velocity",
 -            description="Initial velocity of the fluid",
++            name=_("Initial Velocity"),
++            description=_("Initial velocity of the fluid"),
+             default=(0.0, 0.0, 0.0),
+             min=-100.0,
+             max=100.0,
+             subtype='VELOCITY',
+             )
+     show_flows = BoolProperty(
 -            name="Render Fluid Objects",
 -            description="Keep the fluid objects visible during rendering.",
++            name=_("Render Fluid Objects"),
++            description=_("Keep the fluid objects visible during rendering."),
+             default=False,
+             )
+     start_baking = BoolProperty(
 -            name="Start Fluid Bake",
 -            description=("Start baking the fluid immediately "
 -                         "after creating the domain object"),
++            name=_("Start Fluid Bake"),
++            description=_("Start baking the fluid immediately after creating the domain object"),
+             default=False,
+             )
  
      def execute(self, context):
          fake_context = bpy.context.copy()
  #
  # ##### END GPL LICENSE BLOCK #####
  
- # <pep8 compliant>
+ # <pep8-80 compliant>
  
  import bpy
 +from blf import gettext as _
  
  
  def randomize_selected(seed, delta, loc, rot, scale, scale_even):
@@@ -91,43 -90,72 +91,70 @@@ from bpy.props import IntProperty, Bool
  class RandomizeLocRotSize(bpy.types.Operator):
      '''Randomize objects loc/rot/scale'''
      bl_idname = "object.randomize_transform"
 -    bl_label = "Randomize Transform"
 +    bl_label = _("Randomize Transform")
      bl_options = {'REGISTER', 'UNDO'}
  
-     random_seed = IntProperty(name="Random Seed",
-         description="Seed value for the random generator",
-         default=0, min=0, max=1000)
-     use_delta = BoolProperty(name="Transform Delta",
-         description="Randomize delta transform values instead of regular transform", default=False)
-     use_loc = BoolProperty(name="Randomize Location",
-         description="Randomize the location values", default=True)
-     loc = FloatVectorProperty(name="Location",
-         description="Maximun distance the objects can spread over each axis",
-         default=(0.0, 0.0, 0.0), min=-100.0, max=100.0, subtype='TRANSLATION')
-     use_rot = BoolProperty(name="Randomize Rotation",
-         description="Randomize the rotation values", default=True)
-     rot = FloatVectorProperty(name="Rotation",
-         description="Maximun rotation over each axis",
-         default=(0.0, 0.0, 0.0), min=-180.0, max=180.0, subtype='TRANSLATION')
-     use_scale = BoolProperty(name="Randomize Scale",
-         description="Randomize the scale values", default=True)
-     scale_even = BoolProperty(name="Scale Even",
-         description="Use the same scale value for all axis", default=False)
+     random_seed = IntProperty(
 -            name="Random Seed",
 -            description="Seed value for the random generator",
++            name=_("Random Seed"),
++            description=_("Seed value for the random generator"),
+             min=0,
+             max=1000,
+             default=0,
+             )
+     use_delta = BoolProperty(
 -            name="Transform Delta",
 -            description=("Randomize delta transform values "
 -                         "instead of regular transform"),
++            name=_("Transform Delta"),
++            description=_("Randomize delta transform values instead of regular transform"),
+             default=False,
+             )
+     use_loc = BoolProperty(
 -            name="Randomize Location",
 -            description="Randomize the location values",
++            name=_("Randomize Location"),
++            description=_("Randomize the location values"),
+             default=True,
+             )
+     loc = FloatVectorProperty(
 -            name="Location",
 -            description=("Maximun distance the objects "
 -                         "can spread over each axis"),
++            name=_("Location"),
++            description=_("Maximun distance the objects can spread over each axis"),
+             min=-100.0,
+             max=100.0,
+             default=(0.0, 0.0, 0.0),
+             subtype='TRANSLATION',
+             )
+     use_rot = BoolProperty(
 -            name="Randomize Rotation",
 -            description="Randomize the rotation values",
++            name=_("Randomize Rotation"),
++            description=_("Randomize the rotation values"),
+             default=True,
+             )
+     rot = FloatVectorProperty(
 -            name="Rotation",
 -            description="Maximun rotation over each axis",
++            name=_("Rotation"),
++            description=_("Maximun rotation over each axis"),
+             min=-180.0,
+             max=180.0,
+             default=(0.0, 0.0, 0.0),
+             subtype='TRANSLATION',
+             )
+     use_scale = BoolProperty(
 -            name="Randomize Scale",
 -            description="Randomize the scale values",
++            name=_("Randomize Scale"),
++            description=_("Randomize the scale values"),
+             default=True,
+             )
+     scale_even = BoolProperty(
 -            name="Scale Even",
 -            description="Use the same scale value for all axis",
++            name=_("Scale Even"),
++            description=_("Use the same scale value for all axis"),
+             default=False,
+             )
  
      '''scale_min = FloatProperty(name="Minimun Scale Factor",
          description="Lowest scale percentage possible",
          default=0.15, min=-1.0, max=1.0, precision=3)'''
  
-     scale = FloatVectorProperty(name="Scale",
-         description="Maximum scale randomization over each axis",
-         default=(0.0, 0.0, 0.0), min=-100.0, max=100.0, subtype='TRANSLATION')
+     scale = FloatVectorProperty(
 -            name="Scale",
 -            description="Maximum scale randomization over each axis",
++            name=_("Scale"),
++            description=_("Maximum scale randomization over each axis"),
+             min=-100.0,
+             max=100.0,
+             default=(0.0, 0.0, 0.0),
+             subtype='TRANSLATION',
+             )
  
      def execute(self, context):
          from math import radians
  #
  # ##### END GPL LICENSE BLOCK #####
  
- # <pep8 compliant>
+ # <pep8-80 compliant>
  
  import bpy
 +from blf import gettext as _
  
  
  class AddPresetBase():
      # bl_label = "Add a Python Preset"
      bl_options = {'REGISTER'}  # only because invoke_props_popup requires.
  
-     name = bpy.props.StringProperty(name="Name", description="Name of the preset, used to make the path name", maxlen=64, default="")
-     remove_active = bpy.props.BoolProperty(default=False, options={'HIDDEN'})
+     name = bpy.props.StringProperty(
 -            name="Name",
 -            description="Name of the preset, used to make the path name",
++            name=_("Name"),
++            description=_("Name of the preset, used to make the path name"),
+             maxlen=64,
+             )
+     remove_active = bpy.props.BoolProperty(
+             default=False,
+             options={'HIDDEN'},
+             )
  
      @staticmethod
      def as_filename(name):  # could reuse for other presets
  class ExecutePreset(bpy.types.Operator):
      ''' Executes a preset '''
      bl_idname = "script.execute_preset"
--    bl_label = "Execute a Python Preset"
-     filepath = bpy.props.StringProperty(name="Path", description="Path of the Python file to execute", maxlen=512, default="")
-     menu_idname = bpy.props.StringProperty(name="Menu ID Name", description="ID name of the menu this was called from", default="")
++    bl_label = _("Execute a Python Preset")
+     filepath = bpy.props.StringProperty(
 -            name="Path",
 -            description="Path of the Python file to execute",
++            name=_("Path"),
++            description=_("Path of the Python file to execute"),
+             maxlen=512,
+             )
+     menu_idname = bpy.props.StringProperty(
 -            name="Menu ID Name",
 -            description="ID name of the menu this was called from",
++            name=_("Menu ID Name"),
++            description=_("ID name of the menu this was called from"),
+             )
  
      def execute(self, context):
          from os.path import basename
  class AddPresetRender(AddPresetBase, bpy.types.Operator):
      '''Add a Render Preset'''
      bl_idname = "render.preset_add"
--    bl_label = "Add Render Preset"
++    bl_label = _("Add Render Preset")
      preset_menu = "RENDER_MT_presets"
  
      preset_defines = [
  class AddPresetSSS(AddPresetBase, bpy.types.Operator):
      '''Add a Subsurface Scattering Preset'''
      bl_idname = "material.sss_preset_add"
--    bl_label = "Add SSS Preset"
++    bl_label = _("Add SSS Preset")
      preset_menu = "MATERIAL_MT_sss_presets"
  
      preset_defines = [
  class AddPresetCloth(AddPresetBase, bpy.types.Operator):
      '''Add a Cloth Preset'''
      bl_idname = "cloth.preset_add"
--    bl_label = "Add Cloth Preset"
++    bl_label = _("Add Cloth Preset")
      preset_menu = "CLOTH_MT_presets"
  
      preset_defines = [
  class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
      '''Add a Sky & Atmosphere Preset'''
      bl_idname = "lamp.sunsky_preset_add"
--    bl_label = "Add Sunsky Preset"
++    bl_label = _("Add Sunsky Preset")
      preset_menu = "LAMP_MT_sunsky_presets"
  
      preset_defines = [
@@@ -282,10 -302,9 +304,10 @@@ class AddPresetInteraction(AddPresetBas
  class AddPresetKeyconfig(AddPresetBase, bpy.types.Operator):
      '''Add a Keyconfig Preset'''
      bl_idname = "wm.keyconfig_preset_add"
--    bl_label = "Add Keyconfig Preset"
++    bl_label = _("Add Keyconfig Preset")
      preset_menu = "USERPREF_MT_keyconfigs"
      preset_subdir = "keyconfig"
 +    __doc__ = _('Add a Keyconfig Preset')
  
      def add(self, context, filepath):
          bpy.ops.wm.keyconfig_export(filepath=filepath)
  class AddPresetOperator(AddPresetBase, bpy.types.Operator):
      '''Add an Application Interaction Preset'''
      bl_idname = "wm.operator_preset_add"
 -    bl_label = "Operator Preset"
 +    bl_label = _("Operator Preset")
      preset_menu = "WM_MT_operator_presets"
 +    __doc__ = _("Add an Application Interaction Preset")
  
-     operator = bpy.props.StringProperty(name="Operator", maxlen=64, options={'HIDDEN'})
+     operator = bpy.props.StringProperty(
 -            name="Operator",
++            name=_("Operator"),
+             maxlen=64,
+             options={'HIDDEN'},
+             )
  
      # XXX, not ideal
      preset_defines = [
  
  
  class WM_MT_operator_presets(bpy.types.Menu):
--    bl_label = "Operator Presets"
++    bl_label = _("Operator Presets")
  
      def draw(self, context):
          self.operator = context.space_data.operator.bl_idname
@@@ -773,7 -771,7 +773,7 @@@ class WM_OT_doc_edit(bpy.types.Operator
  
      def draw(self, context):
          layout = self.layout
-         layout.label(text=_("Descriptor ID: '%s'") % self.doc_id)
 -        layout.label(text="Descriptor ID: '%s'" % self.doc_id)
++        layout.label(text=_("Descriptor ID")+": '%s'" % self.doc_id)
          layout.prop(self, "doc_new", text="")
  
      def invoke(self, context, event):
@@@ -19,8 -19,6 +19,7 @@@
  # <pep8 compliant>
  import bpy
  from rna_prop_ui import PropertyPanel
- # TODO, "color_range" not in the UI
++from blf import gettext as _
  
  
  class WorldButtonsPanel():
@@@ -64,7 -62,7 +63,7 @@@ class WORLD_PT_context_world(WorldButto
  
  
  class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Preview"
++    bl_label = _("Preview")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      @classmethod
@@@ -77,7 -75,7 +76,7 @@@
  
  
  class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "World"
++    bl_label = _("World")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      def draw(self, context):
  
  
  class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Ambient Occlusion"
++    bl_label = _("Ambient Occlusion")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      def draw_header(self, context):
          layout.active = light.use_ambient_occlusion
  
          split = layout.split()
--        split.prop(light, "ao_factor", text="Factor")
++        split.prop(light, "ao_factor", text=_("Factor"))
          split.prop(light, "ao_blend_type", text="")
  
  
  class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Environment Lighting"
++    bl_label = _("Environment Lighting")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      def draw_header(self, context):
          layout.active = light.use_environment_light
  
          split = layout.split()
--        split.prop(light, "environment_energy", text="Energy")
++        split.prop(light, "environment_energy", text=_("Energy"))
          split.prop(light, "environment_color", text="")
  
  
  class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Indirect Lighting"
++    bl_label = _("Indirect Lighting")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      def draw_header(self, context):
          layout.active = light.use_indirect_light and light.gather_method == 'APPROXIMATE'
  
          split = layout.split()
--        split.prop(light, "indirect_factor", text="Factor")
--        split.prop(light, "indirect_bounces", text="Bounces")
++        split.prop(light, "indirect_factor", text=_("Factor"))
++        split.prop(light, "indirect_bounces", text=_("Bounces"))
  
          if light.gather_method == 'RAYTRACE':
--            layout.label(text="Only works with Approximate gather method")
++            layout.label(text=_("Only works with Approximate gather method"))
  
  
  class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Gather"
++    bl_label = _("Gather")
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
      def draw(self, context):
          split = layout.split()
  
          col = split.column()
--        col.label(text="Attenuation:")
++        col.label(text=_("Attenuation:"))
          if light.gather_method == 'RAYTRACE':
              col.prop(light, "distance")
          col.prop(light, "use_falloff")
          sub = col.row()
          sub.active = light.use_falloff
--        sub.prop(light, "falloff_strength", text="Strength")
++        sub.prop(light, "falloff_strength", text=_("Strength"))
  
          if light.gather_method == 'RAYTRACE':
              col = split.column()
  
--            col.label(text="Sampling:")
++            col.label(text=_("Sampling:"))
              col.prop(light, "sample_method", text="")
  
              sub = col.column()
          if light.gather_method == 'APPROXIMATE':
              col = split.column()
  
--            col.label(text="Sampling:")
++            col.label(text=_("Sampling:"))
              col.prop(light, "passes")
--            col.prop(light, "error_threshold", text="Error")
++            col.prop(light, "error_threshold", text=_("Error"))
              col.prop(light, "use_cache")
              col.prop(light, "correction")
  
  
  class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Mist"
++    bl_label = _("Mist")
      bl_options = {'DEFAULT_CLOSED'}
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
  
  
  class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
--    bl_label = "Stars"
++    bl_label = _("Stars")
      bl_options = {'DEFAULT_CLOSED'}
      COMPAT_ENGINES = {'BLENDER_RENDER'}
  
  
          col = split.column()
          col.prop(world.star_settings, "size")
--        col.prop(world.star_settings, "color_random", text="Colors")
++        col.prop(world.star_settings, "color_random", text=_("Colors"))
  
          col = split.column()
--        col.prop(world.star_settings, "distance_min", text="Min. Dist")
--        col.prop(world.star_settings, "average_separation", text="Separation")
++        col.prop(world.star_settings, "distance_min", text=_("Min. Dist"))
++        col.prop(world.star_settings, "average_separation", text=_("Separation"))
  
  
  class WORLD_PT_custom_props(WorldButtonsPanel, PropertyPanel, bpy.types.Panel):
@@@ -64,7 -63,7 +64,7 @@@ class IMAGE_MT_view(bpy.types.Menu)
          ratios = [[1, 8], [1, 4], [1, 2], [1, 1], [2, 1], [4, 1], [8, 1]]
  
          for a, b in ratios:
-             text = _("Zoom %d:%d") % (a, b)
 -            text = "Zoom %d:%d" % (a, b)
++            text = _("Zoom") + " %d:%d" % (a, b)
              layout.operator("image.view_zoom_ratio", text=text).ratio = a / b
  
          layout.separator()
@@@ -199,9 -198,13 +199,13 @@@ class IMAGE_MT_uvs_transform(bpy.types.
          layout.operator("transform.rotate")
          layout.operator("transform.resize")
  
+         layout.separator()
+         layout.operator("transform.shear")
  
  class IMAGE_MT_uvs_snap(bpy.types.Menu):
 -    bl_label = "Snap"
 +    bl_label = _("Snap")
  
      def draw(self, context):
          layout = self.layout
@@@ -358,13 -357,13 +358,13 @@@ class SEQUENCER_PT_edit(SequencerButton
  
          col = layout.column(align=True)
          row = col.row()
-         row.label(text=_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration))
 -        row.label(text="Final Length: %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
++        row.label(text=_("Final Length")+": %s" % bpy.utils.smpte_from_frame(strip.frame_final_duration))
          row = col.row()
          row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
-         row.label(text=_("Playhead: %d") % (frame_current - strip.frame_start))
 -        row.label(text="Playhead: %d" % (frame_current - strip.frame_start))
++        row.label(text=_("Playhead")+": %d" % (frame_current - strip.frame_start))
  
-         col.label(text=_("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end))
-         col.label(text=_("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end))
 -        col.label(text="Frame Offset %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
 -        col.label(text="Frame Still %d:%d" % (strip.frame_still_start, strip.frame_still_end))
++        col.label(text=_("Frame Offset")+" %d:%d" % (strip.frame_offset_start, strip.frame_offset_end))
++        col.label(text=_("Frame Still")+" %d:%d" % (strip.frame_still_start, strip.frame_still_end))
  
          elem = False
  
              elem = strip.elements[0]
  
          if elem and elem.orig_width > 0 and elem.orig_height > 0:
-             col.label(text=_("Orig Dim: %dx%d") % (elem.orig_width, elem.orig_height))
 -            col.label(text="Orig Dim: %dx%d" % (elem.orig_width, elem.orig_height))
++            col.label(text=_("Orig Dim")+": %dx%d" % (elem.orig_width, elem.orig_height))
  
  
  class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel):
@@@ -668,7 -667,7 +668,7 @@@ class SEQUENCER_PT_scene(SequencerButto
          if scene:
              sta = scene.frame_start
              end = scene.frame_end
-             layout.label(text=_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1))
 -            layout.label(text="Original frame range: %d-%d (%d)" % (sta, end, end - sta + 1))
++            layout.label(text=_("Original frame range")+": %d-%d (%d)" % (sta, end, end - sta + 1))
  
  
  class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel):
@@@ -16,9 -16,8 +16,9 @@@
  #
  # ##### END GPL LICENSE BLOCK #####
  
- # <pep8 compliant>
+ # <pep8-80 compliant>
  import bpy
 +from blf import gettext as _
  
  
  class TEXT_HT_header(bpy.types.Header):
              row = layout.row()
              if text.filepath:
                  if text.is_dirty:
-                     row.label(text="File: *%s (unsaved)" % text.filepath)
 -                    row.label(text="File: *%r (unsaved)" % text.filepath)
++                    row.label(text=_("File")+": *%r " % text.filepath+_("(unsaved)"))
                  else:
-                     row.label(text="File: %s" % text.filepath)
 -                    row.label(text="File: %r" % text.filepath)
++                    row.label(text=_("File")+": %r" % text.filepath)
              else:
-                 row.label(text="Text: External" if text.library else "Text: Internal")
 -                row.label(text="Text: External"
++                row.label(text=_("Text: External")
+                           if text.library
 -                          else "Text: Internal")
++                          else _("Text: Internal"))
  
  
  class TEXT_PT_properties(bpy.types.Panel):
@@@ -151,8 -154,12 +155,12 @@@ class TEXT_MT_view(bpy.types.Menu)
  
          layout.separator()
  
-         layout.operator("text.move", text=_("Top of File")).type = 'FILE_TOP'
-         layout.operator("text.move", text=_("Bottom of File")).type = 'FILE_BOTTOM'
+         layout.operator("text.move",
 -                        text="Top of File",
++                        text=_("Top of File"),
+                         ).type = 'FILE_TOP'
+         layout.operator("text.move",
 -                        text="Bottom of File",
++                        text=_("Bottom of File"),
+                         ).type = 'FILE_BOTTOM'
  
  
  class TEXT_MT_text(bpy.types.Menu):
              # XXX   uiMenuItemO(head, 0, "text.refresh_pyconstraints");
              #endif
  
-         layout.separator()
-         layout.menu("TEXT_MT_templates")
  
  class TEXT_MT_templates(bpy.types.Menu):
-     '''
-     Creates the menu items by scanning scripts/templates
-     '''
-     bl_label = _("Script Templates")
 -    bl_label = "Templates"
++    bl_label = _("Templates")
  
      def draw(self, context):
-         self.path_menu(bpy.utils.script_paths("templates"), "text.open", {"internal": True})
+         self.path_menu(bpy.utils.script_paths("templates"),
+                        "text.open",
+                        {"internal": True},
+                        )
  
  
  class TEXT_MT_edit_select(bpy.types.Menu):
@@@ -247,8 -250,12 +251,12 @@@ class TEXT_MT_edit_to3d(bpy.types.Menu)
      def draw(self, context):
          layout = self.layout
  
-         layout.operator("text.to_3d_object", text=_("One Object")).split_lines = False
-         layout.operator("text.to_3d_object", text=_("One Object Per Line")).split_lines = True
+         layout.operator("text.to_3d_object",
 -                        text="One Object",
++                        text=_("One Object"),
+                         ).split_lines = False
+         layout.operator("text.to_3d_object",
 -                        text="One Object Per Line",
++                        text=_("One Object Per Line"),
+                         ).split_lines = True
  
  
  class TEXT_MT_edit(bpy.types.Menu):
@@@ -345,19 -344,19 +345,19 @@@ class USERPREF_PT_edit(bpy.types.Panel)
          col.separator()
          col.separator()
  
 -        col.label(text="Duplicate Data:")
 -        col.prop(edit, "use_duplicate_mesh", text="Mesh")
 -        col.prop(edit, "use_duplicate_surface", text="Surface")
 -        col.prop(edit, "use_duplicate_curve", text="Curve")
 -        col.prop(edit, "use_duplicate_text", text="Text")
 -        col.prop(edit, "use_duplicate_metaball", text="Metaball")
 -        col.prop(edit, "use_duplicate_armature", text="Armature")
 -        col.prop(edit, "use_duplicate_lamp", text="Lamp")
 -        col.prop(edit, "use_duplicate_material", text="Material")
 -        col.prop(edit, "use_duplicate_texture", text="Texture")
 -        #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
 -        col.prop(edit, "use_duplicate_action", text="Action")
 -        col.prop(edit, "use_duplicate_particle", text="Particle")
 +        col.label(text=_("Duplicate Data:"))
 +        col.prop(edit, "use_duplicate_mesh", text=_("Mesh"))
 +        col.prop(edit, "use_duplicate_surface", text=_("Surface"))
 +        col.prop(edit, "use_duplicate_curve", text=_("Curve"))
 +        col.prop(edit, "use_duplicate_text", text=_("Text"))
 +        col.prop(edit, "use_duplicate_metaball", text=_("Metaball"))
 +        col.prop(edit, "use_duplicate_armature", text=_("Armature"))
 +        col.prop(edit, "use_duplicate_lamp", text=_("Lamp"))
 +        col.prop(edit, "use_duplicate_material", text=_("Material"))
 +        col.prop(edit, "use_duplicate_texture", text=_("Texture"))
-         #col.prop(edit, "use_duplicate_fcurve", text="F-Curve")
++        #col.prop(edit, "use_duplicate_fcurve", text=_("F-Curve"))
 +        col.prop(edit, "use_duplicate_action", text=_("Action"))
 +        col.prop(edit, "use_duplicate_particle", text=_("Particle"))
  
  
  class USERPREF_PT_system(bpy.types.Panel):
@@@ -656,7 -656,7 +656,7 @@@ class USERPREF_PT_theme(bpy.types.Panel
              col = split.column()
  
              for i, ui in enumerate(theme.bone_color_sets):
-                 col.label(text=_("Color Set %d:") % (i + 1))  # i starts from 0
 -                col.label(text="Color Set %d:" % (i + 1))  # i starts from 0
++                col.label(text=_("Color Set")+" %d:" % (i + 1))  # i starts from 0
  
                  row = col.row()
  
@@@ -202,7 -200,7 +202,7 @@@ class InputKeyMapPanel
                  subcol = self.indented_layout(col, level + 1)
                  subrow = subcol.row()
                  subrow.prop(km, "show_expanded_items", text="", emboss=False)
-                 subrow.label(text=_("%s (Global)") % _(km.name) )
 -                subrow.label(text="%s (Global)" % km.name)
++                subrow.label(text="%s " % _(km.name) + _("(Global)") )
              else:
                  km.show_expanded_items = True
  
@@@ -117,7 -116,8 +117,8 @@@ class VIEW3D_PT_tools_meshedit(View3DPa
          col.operator("transform.translate")
          col.operator("transform.rotate")
          col.operator("transform.resize", text="Scale")
-         col.operator("transform.shrink_fatten", text="Along Normal")
 -        col.operator("transform.shrink_fatten", text="Shrink/Fatten")
 -        col.operator("transform.push_pull", text="Push/Pull")
++        col.operator("transform.shrink_fatten", text=_("Shrink/Fatten"))
++        col.operator("transform.push_pull", text=_("Push/Pull"))
  
          col = layout.column(align=True)
          col.label(text="Deform:")
index 0000000,d3923b5..d3923b5
mode 000000,100644..100755
--- /dev/null
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../imbuf
        ../../makesdna
        ../../makesrna
@@@ -251,14 -251,6 +251,14 @@@ void uiStyleFontDrawRotated(uiFontStyl
  }
  
  /* ************** helpers ************************ */
++/* XXX: read a style configure */
 +uiStyle* UI_GetStyle(void)
 +{
 +      uiStyle *style = NULL;
 +      /* offset is two struct uiStyle pointers */
 +      /* style = BLI_findstring( &U.uistyles, "Unifont Style", sizeof(style)*2 ) */;
 +      return (style != NULL) ? style : U.uistyles.first;
 +}
  
  /* temporarily, does widget font */
  int UI_GetStringWidth(const char *str)
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../imbuf
        ../../makesdna
        ../../makesrna
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../render/extern/include
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../gpu
        ../../ikplugin
        ../../imbuf
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
@@@ -3,7 -3,7 +3,7 @@@ Import ('env'
  
  sources = env.Glob('*.c')
  
--incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
++incs = '../include ../../blenlib ../../blenfont ../../blenkernel ../../makesdna ../../imbuf'
  incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
  incs += ' ../../gpu'
  incs += ' ../../makesrna ../../render/extern/include  #/intern/elbeem/extern'
@@@ -108,9 -106,9 +108,9 @@@ static int material_slot_add_exec(bCont
  void OBJECT_OT_material_slot_add(wmOperatorType *ot)
  {
        /* identifiers */
 -      ot->name= "Add Material Slot";
 +      ot->name= _("Add Material Slot");
        ot->idname= "OBJECT_OT_material_slot_add";
-       ot->description=_("Add a new material slot or duplicate the selected one");
 -      ot->description="Add a new material slot";
++      ot->description=_("Add a new material slot");
        
        /* api callbacks */
        ot->exec= material_slot_add_exec;
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
+       ../../blenlib
        ../../blenloader
-       ../../imbuf
        ../../gpu
-       ../../blenlib
+       ../../imbuf
        ../../makesdna
        ../../makesrna
-       ../../windowmanager
        ../../render/extern/include
+       ../../windowmanager
        ../../../../intern/guardedalloc
  )
  
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
@@@ -1281,7 -1279,7 +1281,7 @@@ void FILE_OT_filenum(struct wmOperatorT
        ot->poll= ED_operator_file_active; /* <- important, handler is on window level */
  
        /* props */
-       RNA_def_int(ot->srna, "increment", 1, 0, 100, _("Increment"), "", 0,100);
 -      RNA_def_int(ot->srna, "increment", 1, -100, 100, "Increment", "", -100,100);
++      RNA_def_int(ot->srna, "increment", 1, -100, 100, _("Increment"), "", -100,100);
  }
  
  static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 -      ../interface
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
++      ../../editors/interface
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
@@@ -2098,6 -2098,8 +2100,8 @@@ void NODE_OT_duplicate(wmOperatorType *
        
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
 -      RNA_def_boolean(ot->srna, "keep_inputs", 0, "Keep Inputs", "Keep the input links to duplicated nodes");
+       
++      RNA_def_boolean(ot->srna, "keep_inputs", 0, _("Keep Inputs"), _("Keep the input links to duplicated nodes"));
  }
  
  /* *************************** add link op ******************** */
@@@ -2487,9 -2489,154 +2491,154 @@@ void NODE_OT_links_cut(wmOperatorType *
        prop= RNA_def_property(ot->srna, "path", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_runtime(prop, &RNA_OperatorMousePath);
        /* internal */
 -      RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, "Cursor", "", 0, INT_MAX);
 +      RNA_def_int(ot->srna, "cursor", BC_KNIFECURSOR, 0, INT_MAX, _("Cursor"), "", 0, INT_MAX);
  }
  
+ /* *********************  automatic node insert on dragging ******************* */
+ /* assumes sockets in list */
+ static bNodeSocket *socket_best_match(ListBase *sockets, int type)
+ {
+       bNodeSocket *sock;
+       
+       /* first, match type */
+       for(sock= sockets->first; sock; sock= sock->next)
+               if(!(sock->flag & SOCK_HIDDEN))
+                       if(type == sock->type)
+                               return sock;
+       
+       /* then just use first unhidden socket */
+       for(sock= sockets->first; sock; sock= sock->next)
+               if(!(sock->flag & SOCK_HIDDEN))
+                       return sock;
+       /* OK, let's unhide proper one */
+       for(sock= sockets->first; sock; sock= sock->next) {
+               if(type == sock->type) {
+                       sock->flag &= ~SOCK_HIDDEN;
+                       return sock;
+               }
+       }
+       
+       /* just the first */
+       sock= sockets->first;
+       sock->flag &= ~SOCK_HIDDEN;
+       
+       return sockets->first;
+ }
+ /* prevent duplicate testing code below */
+ static SpaceNode *ed_node_link_conditions(ScrArea *sa, bNode **select)
+ {
+       SpaceNode *snode= sa?sa->spacedata.first:NULL;
+       bNode *node;
+       bNodeLink *link;
+       
+       /* no unlucky accidents */
+       if(sa==NULL || sa->spacetype!=SPACE_NODE) return NULL;
+       
+       *select= NULL;
+       
+       for(node= snode->edittree->nodes.first; node; node= node->next) {
+               if(node->flag & SELECT) {
+                       if(*select)
+                               break;
+                       else
+                               *select= node;
+               }
+       }
+       /* only one selected */
+       if(node || *select==NULL) return NULL;
+       
+       /* correct node */
+       if((*select)->inputs.first==NULL || (*select)->outputs.first==NULL) return NULL;
+       
+       /* test node for links */
+       for(link= snode->edittree->links.first; link; link=link->next) {
+               if(link->tonode == *select || link->fromnode == *select)
+                       return NULL;
+       }
+       
+       return snode;
+ }
+ /* assumes link with NODE_LINKFLAG_HILITE set */
+ void ED_node_link_insert(ScrArea *sa)
+ {
+       bNode *node, *select;
+       SpaceNode *snode= ed_node_link_conditions(sa, &select);
+       bNodeLink *link;
+       bNodeSocket *sockto;
+       
+       if(snode==NULL) return;
+       
+       /* get the link */
+       for(link= snode->edittree->links.first; link; link=link->next)
+               if(link->flag & NODE_LINKFLAG_HILITE)
+                       break;
+       
+       if(link) {
+               node= link->tonode;
+               sockto= link->tosock;
+               
+               link->tonode= select;
+               link->tosock= socket_best_match(&select->inputs, link->fromsock->type);
+               link->flag &= ~NODE_LINKFLAG_HILITE;
+               
+               nodeAddLink(snode->edittree, select, socket_best_match(&select->outputs, sockto->type), node, sockto);
+               ntreeSolveOrder(snode->edittree);       /* needed for pointers */
+               snode_tag_changed(snode, select);
+               ED_node_changed_update(snode->id, select);
+       }
+ }
+ /* test == 0, clear all intersect flags */
+ void ED_node_link_intersect_test(ScrArea *sa, int test)
+ {
+       bNode *select;
+       SpaceNode *snode= ed_node_link_conditions(sa, &select);
+       bNodeLink *link, *selink=NULL;
+       float mcoords[6][2];
+       
+       if(snode==NULL) return;
+       
+       /* clear flags */
+       for(link= snode->edittree->links.first; link; link=link->next)
+               link->flag &= ~NODE_LINKFLAG_HILITE;
+       
+       if(test==0) return;
+       
+       /* okay, there's 1 node, without links, now intersect */
+       mcoords[0][0]= select->totr.xmin;
+       mcoords[0][1]= select->totr.ymin;
+       mcoords[1][0]= select->totr.xmax;
+       mcoords[1][1]= select->totr.ymin;
+       mcoords[2][0]= select->totr.xmax;
+       mcoords[2][1]= select->totr.ymax;
+       mcoords[3][0]= select->totr.xmin;
+       mcoords[3][1]= select->totr.ymax;
+       mcoords[4][0]= select->totr.xmin;
+       mcoords[4][1]= select->totr.ymin;
+       mcoords[5][0]= select->totr.xmax;
+       mcoords[5][1]= select->totr.ymax;
+       
+       /* we only tag a single link for intersect now */
+       /* idea; use header dist when more? */
+       for(link= snode->edittree->links.first; link; link=link->next) {
+               
+               if(cut_links_intersect(link, mcoords, 5)) { /* intersect code wants edges */
+                       if(selink) 
+                               break;
+                       selink= link;
+               }
+       }
+               
+       if(link==NULL && selink)
+               selink->flag |= NODE_LINKFLAG_HILITE;
+ }
  /* ******************************** */
  // XXX some code needing updating to operators...
  
@@@ -3137,6 -3285,8 +3287,8 @@@ void NODE_OT_add_file(wmOperatorType *o
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
        
        WM_operator_properties_filesel(ot, FOLDERFILE|IMAGEFILE, FILE_SPECIAL, FILE_OPENFILE, WM_FILESEL_FILEPATH);  //XXX TODO, relative_path
 -      RNA_def_string(ot->srna, "name", "Image", 24, "Name", "Datablock name to assign.");
 +      RNA_def_string(ot->srna, "name", "Image", 24, _("Name"), _("Datablock name to assign."));
  }
  
@@@ -103,12 -101,19 +103,19 @@@ void node_operatortypes(void
  void ED_operatormacros_node(void)
  {
        wmOperatorType *ot;
+       wmOperatorTypeMacro *mot;
        
 -      ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
 +      ot= WM_operatortype_append_macro("NODE_OT_duplicate_move", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER);
        WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
        WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
  
 -      ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", "Duplicate", OPTYPE_UNDO|OPTYPE_REGISTER);
+       /* modified operator call for duplicating with input links */
 -      ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", "Link Viewer", OPTYPE_UNDO);
++      ot= WM_operatortype_append_macro("NODE_OT_duplicate_move_keep_inputs", _("Duplicate"), OPTYPE_UNDO|OPTYPE_REGISTER);
+       mot = WM_operatortype_macro_define(ot, "NODE_OT_duplicate");
+               RNA_boolean_set(mot->ptr, "keep_inputs", 1);
+       WM_operatortype_macro_define(ot, "TRANSFORM_OT_translate");
 +      ot= WM_operatortype_append_macro("NODE_OT_select_link_viewer", _("Link Viewer"), OPTYPE_UNDO);
        WM_operatortype_macro_define(ot, "NODE_OT_select");
        WM_operatortype_macro_define(ot, "NODE_OT_link_viewer");
        }
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../imbuf
        ../../makesdna
        ../../makesrna
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../imbuf
        ../../makesdna
        ../../makesrna
  static void sequencer_generic_props__internal(wmOperatorType *ot, int flag)
  {
        if(flag & SEQPROP_STARTFRAME)
 -              RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, "Start Frame", "Start frame of the sequence strip", INT_MIN, INT_MAX);
 +              RNA_def_int(ot->srna, "frame_start", 0, INT_MIN, INT_MAX, _("Start Frame"), _("Start frame of the sequence strip"), INT_MIN, INT_MAX);
        
        if(flag & SEQPROP_ENDFRAME)
 -              RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, "End Frame", "End frame for the color strip", INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */
 +              RNA_def_int(ot->srna, "frame_end", 0, INT_MIN, INT_MAX, _("End Frame"), _("End frame for the color strip"), INT_MIN, INT_MAX); /* not useual since most strips have a fixed length */
        
 -      RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, "Channel", "Channel to place this strip into", 1, MAXSEQ);
 +      RNA_def_int(ot->srna, "channel", 1, 1, MAXSEQ, _("Channel"), _("Channel to place this strip into"), 1, MAXSEQ);
        
 -      RNA_def_boolean(ot->srna, "replace_sel", 1, "Replace Selection", "replace the current selection");
 +      RNA_def_boolean(ot->srna, "replace_sel", 1, _("Replace Selection"), _("replace the current selection"));
  
 -      RNA_def_boolean(ot->srna, "overlap", 0, "Allow Overlap", "Don't correct overlap on new sequence strips");
++      RNA_def_boolean(ot->srna, "overlap", 0, _("Allow Overlap"), _("Don't correct overlap on new sequence strips"));
        if(flag & SEQPROP_FILES)
 -              RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, "Files", "");
 +              RNA_def_collection_runtime(ot->srna, "files", &RNA_OperatorFileListElement, _("Files"), "");
  }
  
  static void sequencer_generic_invoke_path__internal(bContext *C, wmOperator *op, const char *identifier)
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
Simple merge
  
  set(INC
        ../include
 +      ../../blenfont
        ../../blenkernel
-       ../../blenloader
        ../../blenlib
+       ../../blenloader
        ../../makesdna
        ../../makesrna
        ../../windowmanager
@@@ -1076,9 -1202,12 +1204,12 @@@ static int align_exec(bContext *C, wmOp
  static void UV_OT_align(wmOperatorType *ot)
  {
        static EnumPropertyItem axis_items[] = {
 -              {'s', "ALIGN_S", 0, "Straighten", "Align UVs along the line defined by the endpoints"},
 -              {'t', "ALIGN_T", 0, "Straighten X", "Align UVs along the line defined by the endpoints along the X axis"},
 -              {'u', "ALIGN_U", 0, "Straighten Y", "Align UVs along the line defined by the endpoints along the Y axis"},
 -              {'a', "ALIGN_AUTO", 0, "Align Auto", "Automatically choose the axis on which there is most alignment already"},
 -              {'x', "ALIGN_X", 0, "Align X", "Align UVs on X axis"},
 -              {'y', "ALIGN_Y", 0, "Align Y", "Align UVs on Y axis"},
++              {'s', "ALIGN_S", 0, N_("Straighten"), N_("Align UVs along the line defined by the endpoints")},
++              {'t', "ALIGN_T", 0, N_("Straighten X"), N_("Align UVs along the line defined by the endpoints along the X axis")},
++              {'u', "ALIGN_U", 0, N_("Straighten Y"), N_("Align UVs along the line defined by the endpoints along the Y axis")},
 +              {'a', "ALIGN_AUTO", 0, N_("Align Auto"), N_("Automatically choose the axis on which there is most alignment already")},
 +              {'x', "ALIGN_X", 0, N_("Align X"), N_("Align UVs on X axis")},
 +              {'y', "ALIGN_Y", 0, N_("Align Y"), N_("Align UVs on Y axis")},
                {0, NULL, 0, NULL, NULL}};
  
        /* identifiers */
@@@ -12,6 -12,6 +12,7 @@@ root_build_dir=normpath(env['BF_BUILDDI
  
  source_files = env.Glob('*.c')
  source_files.remove('rna_access.c')
++source_files.append('../../blenfont/intern/blf_gettext.c')
  
  generated_files = source_files[:]
  generated_files.remove('rna_define.c')
  #include <stdlib.h>
  
  #include "RNA_define.h"
- #include "BLF_api.h"
  #include "rna_internal.h"
  
++#include "BLF_api.h"
++
  #include "DNA_cloth_types.h"
  #include "DNA_object_types.h"
  #include "DNA_object_force.h"
@@@ -2435,35 -2434,32 +2435,36 @@@ static void rna_def_userdef_system(Blen
                {0, NULL, 0, NULL, NULL}};
        
                /* hardcoded here, could become dynamic somehow */
 +      /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
 +      /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
        static EnumPropertyItem language_items[] = {
 -              {0, "ENGLISH", 0, "English", ""},
 -              {1, "JAPANESE", 0, "Japanese", ""},
 -              {2, "DUTCH", 0, "Dutch", ""},
 -              {3, "ITALIAN", 0, "Italian", ""},
 -              {4, "GERMAN", 0, "German", ""},
 -              {5, "FINNISH", 0, "Finnish", ""},
 -              {6, "SWEDISH", 0, "Swedish", ""},
 -              {7, "FRENCH", 0, "French", ""},
 -              {8, "SPANISH", 0, "Spanish", ""},
 -              {9, "CATALAN", 0, "Catalan", ""},
 -              {10, "CZECH", 0, "Czech", ""},
 -              {11, "BRAZILIAN_PORTUGUESE", 0, "Brazilian Portuguese", ""},
 -              {12, "SIMPLIFIED_CHINESE", 0, "Simplified Chinese", ""},
 -              {13, "RUSSIAN", 0, "Russian", ""},
 -              {14, "CROATIAN", 0, "Croatian", ""},
 -              {15, "SERBIAN", 0, "Serbian", ""},
 -              {16, "UKRAINIAN", 0, "Ukrainian", ""},
 -              {17, "POLISH", 0, "Polish", ""},
 -              {18, "ROMANIAN", 0, "Romanian", ""},
 -              {19, "ARABIC", 0, "Arabic", ""},
 -              {20, "BULGARIAN", 0, "Bulgarian", ""},
 -              {21, "GREEK", 0, "Greek", ""},
 -              {22, "KOREAN", 0, "Korean", ""},
 +              {0, "DEFAULT", 0, N_("Default (Default)"), ""},
 +              {1, "ENGLISH", 0, N_("English (English)"), "en_US"},
 +              {2, "JAPANESE", 0, N_("Japanese (日本語)"), "ja_JP"},
 +              {3, "DUTCH", 0, N_("Dutch (Nederlandse taal)"), "nl_NL"},
 +              {4, "ITALIAN", 0, N_("Italian (Italiano)"), "it_IT"},
 +              {5, "GERMAN", 0, N_("German (Deutsch)"), "de_DE"},
 +              {6, "FINNISH", 0, N_("Finnish (Suomalainen)"), "fi_FI"},
 +              {7, "SWEDISH", 0, N_("Swedish (Svenska)"), "sv_SE"},
 +              {8, "FRENCH", 0, N_("French (Française)"), "fr_FR"},
 +              {9, "SPANISH", 0, N_("Spanish (Español)"), "es_ES"},
 +              {10, "CATALAN", 0, N_("Catalan (Català)"), "ca_AD"},
 +              {11, "CZECH", 0, N_("Czech (Český)"), "cs_CZ"},
 +              {12, "BRAZILIAN_PORTUGUESE", 0, N_("Brazilian Portuguese (Português do Brasil)"), "pt_BR"},
 +              {13, "SIMPLIFIED_CHINESE", 0, N_("Simplified Chinese (简体中文)"), "zh_CN"},
 +              {14, "TRADITIONAL_CHINESE", 0, N_("Traditional Chinese (繁體中文)"), "zh_TW"},
 +              {15, "RUSSIAN", 0, N_("Russian (Русский)"), "ru_RU"},
 +              {16, "CROATIAN", 0, N_("Croatian (Hrvatski)"), "hr_HR"},
 +              {17, "SERBIAN", 0, N_("Serbian (Српском језику)"), "sr_RS"},
 +              {18, "UKRAINIAN", 0, N_("Ukrainian (Український)"), "uk_UA"},
 +              {19, "POLISH", 0, N_("Polish (Polski)"), "pl_PL"},
 +              {20, "ROMANIAN", 0, N_("Romanian (Român)"), "ro_RO"},
 +              {21, "ARABIC", 0, N_("Arabic (العربية)"), "ar_EG"},
 +              {22, "BULGARIAN", 0, N_("Bulgarian (Български)"), "bg_BG"},
 +              {23, "GREEK", 0, N_("Greek (Ελληνικά)"), "el_GR"},
 +              {24, "KOREAN", 0, N_("Korean (한국 언어)"), "ko_KR"},
                {0, NULL, 0, NULL, NULL}};
        srna= RNA_def_struct(brna, "UserPreferencesSystem", NULL);
        RNA_def_struct_sdna(srna, "UserDef");
        RNA_def_struct_nested(brna, srna, "UserPreferences");
index bba08e3,50b75b0..4a0fa50
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils.c 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 449708d,b798b5e..300c054
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils.h 38674 2011-07-25 01:44:19Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index fd187fd,d0c7ec7..37730ba
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Color.c 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 0fc8803,0fc8803..0afb0ee
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Color.h 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 2888b06,5c609d8..afff927
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Euler.c 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 849e16c,849e16c..2df3d61
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils_Euler.h 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 4343485,3953171..1a1a9f8
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Matrix.c 38674 2011-07-25 01:44:19Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index aa736d1,aa736d1..84a92ba
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils_Matrix.h 38409 2011-07-15 04:01:47Z campbellbarton $
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
   * This program is free software; you can redistribute it and/or
index 977ff7c,2be258a..d43cae9
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Quaternion.c 38674 2011-07-25 01:44:19Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index d606621,d606621..4ba7089
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils_Quaternion.h 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index b8fdc2f,a954c07..5d0e467
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Vector.c 38674 2011-07-25 01:44:19Z campbellbarton $
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
   * This program is free software; you can redistribute it and/or
index 0ede836,0ede836..e430a10
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /*
-- * $Id$
++ * $Id: mathutils_Vector.h 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 4c359a1,bcdfe02..acfb8a9
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
- /* 
-  * $Id$
+ /*
 - * $Id$
++ * $Id: mathutils_geometry.c 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
index 929b8cc,c963a63..0b07fc1
mode 100644,100644..100755
@@@ -1,5 -1,5 +1,5 @@@
  /* 
-- * $Id$
++ * $Id: mathutils_geometry.h 38409 2011-07-15 04:01:47Z campbellbarton $
   *
   * ***** BEGIN GPL LICENSE BLOCK *****
   *
Simple merge
@@@ -128,28 -126,22 +128,28 @@@ void WM_init(bContext *C, int argc, con
                wm_init_cursor_data();
        }
        GHOST_CreateSystemPaths();
 +      BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
 +      BLF_lang_init();
 +      // use default settings
 +      BLF_lang_encoding("");
 +      /* get the default database, plus a wm */
 +      WM_read_homefile(C, NULL, G.factory_startup, &wmbase);
 +      BLF_lang_set(NULL);
 +
 +      RNA_types_init_gettext();
 +
        wm_operatortype_init();
+       
        set_free_windowmanager_cb(wm_close_and_free);   /* library.c */
        set_blender_test_break_cb(wm_window_testbreak); /* blender.c */
        DAG_editors_update_cb(ED_render_id_flush_update); /* depsgraph.c */
+       
        ED_spacetypes_init();   /* editors/space_api/spacetype.c */
+       
        ED_file_init();                 /* for fsmenu */
-       ED_init_node_butfuncs();
+       ED_init_node_butfuncs();        
 -      
 -      BLF_init(11, U.dpi); /* Please update source/gamengine/GamePlayer/GPG_ghost.cpp if you change this */
 -      BLF_lang_init();
 -      /* get the default database, plus a wm */
 -      WM_read_homefile(C, NULL, G.factory_startup);
  
 +      WM_read_homefile_proc(C, &wmbase);
        /* note: there is a bug where python needs initializing before loading the
         * startup.blend because it may contain PyDrivers. It also needs to be after
         * initializing space types and other internal data.
@@@ -455,8 -451,8 +455,10 @@@ elseif(WIN32
        endif()
  
        install( # same as linux!, deduplicate
--              DIRECTORY ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
-               DESTINATION ${TARGETDIR_VER}/datafiles
++              DIRECTORY
++          ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
++          ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
+               DESTINATION ${TARGETDIR_VER}/datafiles/locale
                PATTERN ".svn" EXCLUDE
        )
  
@@@ -669,15 -665,8 +671,15 @@@ elseif(APPLE
                )
  
                install_dir(
 -                      ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/
 +                      DIRECTORY
 +                                      ${CMAKE_SOURCE_DIR}/release/bin/.blender/fonts
 +                      \${TARGETDIR_VER}/datafiles/
 +              )
 +
 +              install_dir(
 +                      DIRECTORY
-                                       ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale
-                       \${TARGETDIR_VER}/datafiles/
++                                      ${CMAKE_SOURCE_DIR}/release/bin/.blender/locale/
+                       \${TARGETDIR_VER}/datafiles/locale
                )
        endif()
  
index 0000000,11c7ce6..11c7ce6
mode 000000,100644..100755
--- /dev/null