diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-15 15:41:15 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-06-15 15:41:15 +0400 |
commit | de12f8049a2fbd6e4feab02bc252411a8f5d5d1f (patch) | |
tree | 8188e6fc5c899330a54fc6076c594b325c53cc95 /release | |
parent | 40981d872f0410caf1870194c8e15ebaed864dea (diff) |
translate left panel
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 45 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d_toolbar.py | 41 |
2 files changed, 44 insertions, 42 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index 775243a74d2..df9cc9c6961 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class VIEW3D_HT_header(bpy.types.Header): bl_space_type = 'VIEW_3D' @@ -304,22 +305,22 @@ class VIEW3D_MT_view(bpy.types.Menu): layout.operator_context = 'INVOKE_REGION_WIN' - layout.operator("view3d.clip_border", text="Clipping Border...") - layout.operator("view3d.zoom_border", text="Zoom Border...") + layout.operator("view3d.clip_border", text=_("Clipping Border...")) + layout.operator("view3d.zoom_border", text=_("Zoom Border...")) layout.separator() - layout.operator("view3d.layers", text="Show All Layers").nr = 0 + layout.operator("view3d.layers", text=_("Show All Layers")).nr = 0 layout.separator() - layout.operator("view3d.localview", text="View Global/Local") + layout.operator("view3d.localview", text=_("View Global/Local")) layout.operator("view3d.view_selected") layout.operator("view3d.view_all") layout.separator() - layout.operator("screen.animation_play", text="Playback Animation") + layout.operator("screen.animation_play", text=_("Playback Animation")) layout.separator() @@ -329,7 +330,7 @@ class VIEW3D_MT_view(bpy.types.Menu): class VIEW3D_MT_view_navigation(bpy.types.Menu): - bl_label = "Navigation" + bl_label = _("Navigation") def draw(self, context): layout = self.layout @@ -342,9 +343,9 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu): layout.separator() - layout.operator("view3d.zoom", text="Zoom In").delta = 1 - layout.operator("view3d.zoom", text="Zoom Out").delta = -1 - layout.operator("view3d.zoom_camera_1_to_1", text="Zoom Camera 1:1") + layout.operator("view3d.zoom", text=_("Zoom In")).delta = 1 + layout.operator("view3d.zoom", text=_("Zoom Out")).delta = -1 + layout.operator("view3d.zoom_camera_1_to_1", text=_("Zoom Camera 1:1")) layout.separator() @@ -352,7 +353,7 @@ class VIEW3D_MT_view_navigation(bpy.types.Menu): class VIEW3D_MT_view_align(bpy.types.Menu): - bl_label = "Align View" + bl_label = _("Align View") def draw(self, context): layout = self.layout @@ -361,46 +362,46 @@ class VIEW3D_MT_view_align(bpy.types.Menu): layout.separator() - layout.operator("view3d.view_all", text="Center Cursor and View All").center = True - layout.operator("view3d.camera_to_view", text="Align Active Camera to View") + layout.operator("view3d.view_all", text=_("Center Cursor and View All")).center = True + layout.operator("view3d.camera_to_view", text=_("Align Active Camera to View")) layout.operator("view3d.view_selected") layout.operator("view3d.view_center_cursor") class VIEW3D_MT_view_align_selected(bpy.types.Menu): - bl_label = "Align View to Selected" + bl_label = _("Align View to Selected") def draw(self, context): layout = self.layout - props = layout.operator("view3d.viewnumpad", text="Top") + props = layout.operator("view3d.viewnumpad", text=_("Top")) props.align_active = True props.type = 'TOP' - props = layout.operator("view3d.viewnumpad", text="Bottom") + props = layout.operator("view3d.viewnumpad", text=_("Bottom")) props.align_active = True props.type = 'BOTTOM' - props = layout.operator("view3d.viewnumpad", text="Front") + props = layout.operator("view3d.viewnumpad", text=_("Front")) props.align_active = True props.type = 'FRONT' - props = layout.operator("view3d.viewnumpad", text="Back") + props = layout.operator("view3d.viewnumpad", text=_("Back")) props.align_active = True props.type = 'BACK' - props = layout.operator("view3d.viewnumpad", text="Right") + props = layout.operator("view3d.viewnumpad", text=_("Right")) props.align_active = True props.type = 'RIGHT' - props = layout.operator("view3d.viewnumpad", text="Left") + props = layout.operator("view3d.viewnumpad", text=_("Left")) props.align_active = True props.type = 'LEFT' class VIEW3D_MT_view_cameras(bpy.types.Menu): - bl_label = "Cameras" + bl_label = _("Cameras") def draw(self, context): layout = self.layout layout.operator("view3d.object_as_camera") - layout.operator("view3d.viewnumpad", text="Active Camera").type = 'CAMERA' + layout.operator("view3d.viewnumpad", text=_("Active Camera")).type = 'CAMERA' # ********** Select menus, suffix from context.mode ********** @@ -2330,7 +2331,7 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel): class VIEW3D_PT_context_properties(bpy.types.Panel): bl_space_type = 'VIEW_3D' bl_region_type = 'UI' - bl_label = "Properties" + bl_label = _("Properties") bl_options = {'DEFAULT_CLOSED'} def _active_context_member(context): diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py index 3e263876e3d..5bb41942e7c 100644 --- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py +++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class View3DPanel(): bl_space_type = 'VIEW_3D' @@ -29,30 +30,30 @@ class View3DPanel(): # History/Repeat tools def draw_repeat_tools(context, layout): col = layout.column(align=True) - col.label(text="Repeat:") + col.label(text=_("Repeat:")) col.operator("screen.repeat_last") - col.operator("screen.repeat_history", text="History...") + col.operator("screen.repeat_history", text=_("History...")) # Keyframing tools def draw_keyframing_tools(context, layout): col = layout.column(align=True) - col.label(text="Keyframes:") + col.label(text=_("Keyframes:")) row = col.row() - row.operator("anim.keyframe_insert_menu", text="Insert") - row.operator("anim.keyframe_delete_v3d", text="Remove") + row.operator("anim.keyframe_insert_menu", text=_("Insert")) + row.operator("anim.keyframe_delete_v3d", text=_("Remove")) # Grease Pencil tools def draw_gpencil_tools(context, layout): col = layout.column(align=True) - col.label(text="Grease Pencil:") + col.label(text=_("Grease Pencil:")) row = col.row() - row.operator("gpencil.draw", text="Draw").mode = 'DRAW' - row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' - row.operator("gpencil.draw", text="Erase").mode = 'ERASER' + row.operator("gpencil.draw", text=_("Draw")).mode = 'DRAW' + row.operator("gpencil.draw", text=_("Line")).mode = 'DRAW_STRAIGHT' + row.operator("gpencil.draw", text=_("Erase")).mode = 'ERASER' row = col.row() row.prop(context.tool_settings, "use_grease_pencil_sessions") @@ -62,22 +63,22 @@ def draw_gpencil_tools(context, layout): class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel): bl_context = "objectmode" - bl_label = "Object Tools" + bl_label = _("Object Tools") def draw(self, context): layout = self.layout col = layout.column(align=True) - col.label(text="Transform:") + col.label(text=_("Transform:")) col.operator("transform.translate") col.operator("transform.rotate") - col.operator("transform.resize", text="Scale") + col.operator("transform.resize", text=_("Scale")) col = layout.column(align=True) - col.operator("object.origin_set", text="Origin") + col.operator("object.origin_set", text=_("Origin")) col = layout.column(align=True) - col.label(text="Object:") + col.label(text=_("Object:")) col.operator("object.duplicate_move") col.operator("object.delete") col.operator("object.join") @@ -86,16 +87,16 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, bpy.types.Panel): if active_object and active_object.type == 'MESH': col = layout.column(align=True) - col.label(text="Shading:") - col.operator("object.shade_smooth", text="Smooth") - col.operator("object.shade_flat", text="Flat") + col.label(text=_("Shading:")) + col.operator("object.shade_smooth", text=_("Smooth")) + col.operator("object.shade_flat", text=_("Flat")) draw_keyframing_tools(context, layout) col = layout.column(align=True) - col.label(text="Motion Paths:") - col.operator("object.paths_calculate", text="Calculate Paths") - col.operator("object.paths_clear", text="Clear Paths") + col.label(text=_("Motion Paths:")) + col.operator("object.paths_calculate", text=_("Calculate Paths")) + col.operator("object.paths_clear", text=_("Clear Paths")) draw_repeat_tools(context, layout) |