diff options
author | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-13 18:41:12 +0400 |
---|---|---|
committer | Xiao Xiangquan <xiaoxiangquan@gmail.com> | 2011-07-13 18:41:12 +0400 |
commit | 470a5017fb80f21bac08373e4b5816c92d42990a (patch) | |
tree | dc91c7e24136e376859c351f58ee06a1af458539 /release/scripts | |
parent | b4c02ee72218fd4c76f7659db2e994895f67dc22 (diff) |
complete space outliner, space node, space nla, etc.
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_operators/sequencer.py | 1 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_dopesheet.py | 75 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_graph.py | 69 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 139 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_logic.py | 15 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_nla.py | 51 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_node.py | 25 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 215 |
8 files changed, 299 insertions, 291 deletions
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py index 5ea06169cae..1feec100295 100644 --- a/release/scripts/startup/bl_operators/sequencer.py +++ b/release/scripts/startup/bl_operators/sequencer.py @@ -119,6 +119,7 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator): bl_idname = "sequencer.deinterlace_selected_movies" bl_label = _("Deinterlace Movies") bl_options = {'REGISTER', 'UNDO'} + __doc__ = _("Deinterlace all selected movie sources.") @classmethod def poll(cls, context): diff --git a/release/scripts/startup/bl_ui/space_dopesheet.py b/release/scripts/startup/bl_ui/space_dopesheet.py index 930a2029d32..659a39ebd2d 100644 --- a/release/scripts/startup/bl_ui/space_dopesheet.py +++ b/release/scripts/startup/bl_ui/space_dopesheet.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ ####################################### @@ -113,7 +114,7 @@ class DOPESHEET_HT_header(bpy.types.Header): sub.menu("DOPESHEET_MT_gpencil_frame") layout.prop(st, "mode", text="") - layout.prop(st.dopesheet, "show_summary", text="Summary") + layout.prop(st.dopesheet, "show_summary", text=_("Summary")) if st.mode == 'DOPESHEET': dopesheet_filter(layout, context) @@ -135,7 +136,7 @@ class DOPESHEET_HT_header(bpy.types.Header): class DOPESHEET_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -151,9 +152,9 @@ class DOPESHEET_MT_view(bpy.types.Menu): layout.prop(st, "use_marker_sync") if st.show_seconds: - layout.operator("anim.time_toggle", text="Show Frames") + layout.operator("anim.time_toggle", text=_("Show Frames")) else: - layout.operator("anim.time_toggle", text="Show Seconds") + layout.operator("anim.time_toggle", text=_("Show Seconds")) layout.separator() layout.operator("anim.previewrange_set") @@ -171,7 +172,7 @@ class DOPESHEET_MT_view(bpy.types.Menu): class DOPESHEET_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -179,22 +180,22 @@ class DOPESHEET_MT_select(bpy.types.Menu): layout.column() # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None layout.operator("action.select_all_toggle") - layout.operator("action.select_all_toggle", text="Invert Selection").invert = True + layout.operator("action.select_all_toggle", text=_("Invert Selection")).invert = True layout.separator() layout.operator("action.select_border") - layout.operator("action.select_border", text="Border Axis Range").axis_range = True + layout.operator("action.select_border", text=_("Border Axis Range")).axis_range = True layout.separator() - layout.operator("action.select_column", text="Columns on Selected Keys").mode = 'KEYS' - layout.operator("action.select_column", text="Column on Current Frame").mode = 'CFRA' + layout.operator("action.select_column", text=_("Columns on Selected Keys")).mode = 'KEYS' + layout.operator("action.select_column", text=_("Column on Current Frame")).mode = 'CFRA' - layout.operator("action.select_column", text="Columns on Selected Markers").mode = 'MARKERS_COLUMN' - layout.operator("action.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN' + layout.operator("action.select_column", text=_("Columns on Selected Markers")).mode = 'MARKERS_COLUMN' + layout.operator("action.select_column", text=_("Between Selected Markers")).mode = 'MARKERS_BETWEEN' layout.separator() - layout.operator("action.select_leftright", text="Before Current Frame").mode = 'LEFT' - layout.operator("action.select_leftright", text="After Current Frame").mode = 'RIGHT' + layout.operator("action.select_leftright", text=_("Before Current Frame")).mode = 'LEFT' + layout.operator("action.select_leftright", text=_("After Current Frame")).mode = 'RIGHT' # FIXME: grease pencil mode isn't supported for these yet, so skip for that mode only if context.space_data.mode != 'GPENCIL': @@ -207,7 +208,7 @@ class DOPESHEET_MT_select(bpy.types.Menu): class DOPESHEET_MT_marker(bpy.types.Menu): - bl_label = "Marker" + bl_label = _("Marker") def draw(self, context): layout = self.layout @@ -217,14 +218,14 @@ class DOPESHEET_MT_marker(bpy.types.Menu): #layout.operator_context = 'EXEC_REGION_WIN' layout.column() - layout.operator("marker.add", "Add Marker") - layout.operator("marker.duplicate", text="Duplicate Marker") - layout.operator("marker.delete", text="Delete Marker") + layout.operator("marker.add", _("Add Marker")) + layout.operator("marker.duplicate", text=_("Duplicate Marker")) + layout.operator("marker.delete", text=_("Delete Marker")) layout.separator() - layout.operator("marker.rename", text="Rename Marker") - layout.operator("marker.move", text="Grab/Move Marker") + layout.operator("marker.rename", text=_("Rename Marker")) + layout.operator("marker.move", text=_("Grab/Move Marker")) if st.mode in {'ACTION', 'SHAPEKEY'} and st.action: layout.separator() @@ -238,7 +239,7 @@ class DOPESHEET_MT_marker(bpy.types.Menu): # Keyframe Editing class DOPESHEET_MT_channel(bpy.types.Menu): - bl_label = "Channel" + bl_label = _("Channel") def draw(self, context): layout = self.layout @@ -255,30 +256,30 @@ class DOPESHEET_MT_channel(bpy.types.Menu): layout.separator() layout.operator("anim.channels_editable_toggle") - layout.operator_menu_enum("action.extrapolation_type", "type", text="Extrapolation Mode") + layout.operator_menu_enum("action.extrapolation_type", "type", text=_("Extrapolation Mode")) layout.separator() layout.operator("anim.channels_expand") layout.operator("anim.channels_collapse") layout.separator() - layout.operator_menu_enum("anim.channels_move", "direction", text="Move...") + layout.operator_menu_enum("anim.channels_move", "direction", text=_("Move...")) layout.separator() layout.operator("anim.channels_fcurves_enable") class DOPESHEET_MT_key(bpy.types.Menu): - bl_label = "Key" + bl_label = _("Key") def draw(self, context): layout = self.layout layout.column() - layout.menu("DOPESHEET_MT_key_transform", text="Transform") + layout.menu("DOPESHEET_MT_key_transform", text=_("Transform")) - layout.operator_menu_enum("action.snap", "type", text="Snap") - layout.operator_menu_enum("action.mirror", "type", text="Mirror") + layout.operator_menu_enum("action.snap", "type", text=_("Snap")) + layout.operator_menu_enum("action.mirror", "type", text=_("Mirror")) layout.separator() layout.operator("action.keyframe_insert") @@ -288,9 +289,9 @@ class DOPESHEET_MT_key(bpy.types.Menu): layout.operator("action.delete") layout.separator() - layout.operator_menu_enum("action.keyframe_type", "type", text="Keyframe Type") - layout.operator_menu_enum("action.handle_type", "type", text="Handle Type") - layout.operator_menu_enum("action.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("action.keyframe_type", "type", text=_("Keyframe Type")) + layout.operator_menu_enum("action.handle_type", "type", text=_("Handle Type")) + layout.operator_menu_enum("action.interpolation_type", "type", text=_("Interpolation Mode")) layout.separator() layout.operator("action.clean") @@ -302,23 +303,23 @@ class DOPESHEET_MT_key(bpy.types.Menu): class DOPESHEET_MT_key_transform(bpy.types.Menu): - bl_label = "Transform" + bl_label = _("Transform") def draw(self, context): layout = self.layout layout.column() - layout.operator("transform.transform", text="Grab/Move").mode = 'TIME_TRANSLATE' - layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' - layout.operator("transform.transform", text="Slide").mode = 'TIME_SLIDE' - layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE' + layout.operator("transform.transform", text=_("Grab/Move")).mode = 'TIME_TRANSLATE' + layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND' + layout.operator("transform.transform", text=_("Slide")).mode = 'TIME_SLIDE' + layout.operator("transform.transform", text=_("Scale")).mode = 'TIME_SCALE' ####################################### # Grease Pencil Editing class DOPESHEET_MT_gpencil_channel(bpy.types.Menu): - bl_label = "Channel" + bl_label = _("Channel") def draw(self, context): layout = self.layout @@ -346,13 +347,13 @@ class DOPESHEET_MT_gpencil_channel(bpy.types.Menu): class DOPESHEET_MT_gpencil_frame(bpy.types.Menu): - bl_label = "Frame" + bl_label = _("Frame") def draw(self, context): layout = self.layout layout.column() - layout.menu("DOPESHEET_MT_key_transform", text="Transform") + layout.menu("DOPESHEET_MT_key_transform", text=_("Transform")) #layout.operator_menu_enum("action.snap", "type", text="Snap") #layout.operator_menu_enum("action.mirror", "type", text="Mirror") diff --git a/release/scripts/startup/bl_ui/space_graph.py b/release/scripts/startup/bl_ui/space_graph.py index bfc1a0e3a23..c74ffee9bc1 100644 --- a/release/scripts/startup/bl_ui/space_graph.py +++ b/release/scripts/startup/bl_ui/space_graph.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class GRAPH_HT_header(bpy.types.Header): @@ -62,7 +63,7 @@ class GRAPH_HT_header(bpy.types.Header): class GRAPH_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -85,9 +86,9 @@ class GRAPH_MT_view(bpy.types.Menu): layout.separator() if st.show_handles: - layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text="Show All Handles") + layout.operator("graph.handles_view_toggle", icon='CHECKBOX_HLT', text=_("Show All Handles")) else: - layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text="Show All Handles") + layout.operator("graph.handles_view_toggle", icon='CHECKBOX_DEHLT', text=_("Show All Handles")) layout.prop(st, "use_only_selected_curves_handles") layout.prop(st, "use_only_selected_keyframe_handles") layout.operator("anim.time_toggle") @@ -108,7 +109,7 @@ class GRAPH_MT_view(bpy.types.Menu): class GRAPH_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -116,23 +117,23 @@ class GRAPH_MT_select(bpy.types.Menu): layout.column() # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None layout.operator("graph.select_all_toggle") - layout.operator("graph.select_all_toggle", text="Invert Selection").invert = True + layout.operator("graph.select_all_toggle", text=_("Invert Selection")).invert = True layout.separator() layout.operator("graph.select_border") - layout.operator("graph.select_border", text="Border Axis Range").axis_range = True - layout.operator("graph.select_border", text="Border (Include Handles)").include_handles = True + layout.operator("graph.select_border", text=_("Border Axis Range")).axis_range = True + layout.operator("graph.select_border", text=_("Border (Include Handles)")).include_handles = True layout.separator() - layout.operator("graph.select_column", text="Columns on Selected Keys").mode = 'KEYS' - layout.operator("graph.select_column", text="Column on Current Frame").mode = 'CFRA' + layout.operator("graph.select_column", text=_("Columns on Selected Keys")).mode = 'KEYS' + layout.operator("graph.select_column", text=_("Column on Current Frame")).mode = 'CFRA' - layout.operator("graph.select_column", text="Columns on Selected Markers").mode = 'MARKERS_COLUMN' - layout.operator("graph.select_column", text="Between Selected Markers").mode = 'MARKERS_BETWEEN' + layout.operator("graph.select_column", text=_("Columns on Selected Markers")).mode = 'MARKERS_COLUMN' + layout.operator("graph.select_column", text=_("Between Selected Markers")).mode = 'MARKERS_BETWEEN' layout.separator() - layout.operator("graph.select_leftright", text="Before Current Frame").mode = 'LEFT' - layout.operator("graph.select_leftright", text="After Current Frame").mode = 'RIGHT' + layout.operator("graph.select_leftright", text=_("Before Current Frame")).mode = 'LEFT' + layout.operator("graph.select_leftright", text=_("After Current Frame")).mode = 'RIGHT' layout.separator() layout.operator("graph.select_more") @@ -143,7 +144,7 @@ class GRAPH_MT_select(bpy.types.Menu): class GRAPH_MT_marker(bpy.types.Menu): - bl_label = "Marker" + bl_label = _("Marker") def draw(self, context): layout = self.layout @@ -151,20 +152,20 @@ class GRAPH_MT_marker(bpy.types.Menu): #layout.operator_context = 'EXEC_REGION_WIN' layout.column() - layout.operator("marker.add", "Add Marker") - layout.operator("marker.duplicate", text="Duplicate Marker") - layout.operator("marker.delete", text="Delete Marker") + layout.operator("marker.add", _("Add Marker")) + layout.operator("marker.duplicate", text=_("Duplicate Marker")) + layout.operator("marker.delete", text=_("Delete Marker")) layout.separator() - layout.operator("marker.rename", text="Rename Marker") - layout.operator("marker.move", text="Grab/Move Marker") + layout.operator("marker.rename", text=_("Rename Marker")) + layout.operator("marker.move", text=_("Grab/Move Marker")) # TODO: pose markers for action edit mode only? class GRAPH_MT_channel(bpy.types.Menu): - bl_label = "Channel" + bl_label = _("Channel") def draw(self, context): layout = self.layout @@ -182,30 +183,30 @@ class GRAPH_MT_channel(bpy.types.Menu): layout.separator() layout.operator("anim.channels_editable_toggle") layout.operator("anim.channels_visibility_set") - layout.operator_menu_enum("graph.extrapolation_type", "type", text="Extrapolation Mode") + layout.operator_menu_enum("graph.extrapolation_type", "type", text=_("Extrapolation Mode")) layout.separator() layout.operator("anim.channels_expand") layout.operator("anim.channels_collapse") layout.separator() - layout.operator_menu_enum("anim.channels_move", "direction", text="Move...") + layout.operator_menu_enum("anim.channels_move", "direction", text=_("Move...")) layout.separator() layout.operator("anim.channels_fcurves_enable") class GRAPH_MT_key(bpy.types.Menu): - bl_label = "Key" + bl_label = _("Key") def draw(self, context): layout = self.layout layout.column() - layout.menu("GRAPH_MT_key_transform", text="Transform") + layout.menu("GRAPH_MT_key_transform", text=_("Transform")) - layout.operator_menu_enum("graph.snap", "type", text="Snap") - layout.operator_menu_enum("graph.mirror", "type", text="Mirror") + layout.operator_menu_enum("graph.snap", "type", text=_("Snap")) + layout.operator_menu_enum("graph.mirror", "type", text=_("Mirror")) layout.separator() layout.operator("graph.keyframe_insert") @@ -217,8 +218,8 @@ class GRAPH_MT_key(bpy.types.Menu): layout.operator("graph.delete") layout.separator() - layout.operator_menu_enum("graph.handle_type", "type", text="Handle Type") - layout.operator_menu_enum("graph.interpolation_type", "type", text="Interpolation Mode") + layout.operator_menu_enum("graph.handle_type", "type", text=_("Handle Type")) + layout.operator_menu_enum("graph.interpolation_type", "type", text=_("Interpolation Mode")) layout.separator() layout.operator("graph.clean") @@ -231,20 +232,20 @@ class GRAPH_MT_key(bpy.types.Menu): layout.operator("graph.paste") layout.separator() - layout.operator("graph.euler_filter", text="Discontinuity (Euler) Filter") + layout.operator("graph.euler_filter", text=_("Discontinuity (Euler) Filter")) class GRAPH_MT_key_transform(bpy.types.Menu): - bl_label = "Transform" + bl_label = _("Transform") def draw(self, context): layout = self.layout layout.column() - layout.operator("transform.translate", text="Grab/Move") - layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' - layout.operator("transform.rotate", text="Rotate") - layout.operator("transform.resize", text="Scale") + layout.operator("transform.translate", text=_("Grab/Move")) + layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND' + layout.operator("transform.rotate", text=_("Rotate")) + layout.operator("transform.resize", text=_("Scale")) if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 9f69ca17076..7f2d88a6e4e 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class BrushButtonsPanel(): @@ -32,7 +33,7 @@ class BrushButtonsPanel(): class IMAGE_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -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) layout.operator("image.view_zoom_ratio", text=text).ratio = a / b layout.separator() @@ -80,7 +81,7 @@ class IMAGE_MT_view(bpy.types.Menu): class IMAGE_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -91,7 +92,7 @@ class IMAGE_MT_select(bpy.types.Menu): layout.separator() layout.operator("uv.select_all") - layout.operator("uv.select_all", text="Inverse").action = 'INVERT' + layout.operator("uv.select_all", text=_("Inverse")).action = 'INVERT' layout.operator("uv.unlink_selected") layout.separator() @@ -101,7 +102,7 @@ class IMAGE_MT_select(bpy.types.Menu): class IMAGE_MT_image(bpy.types.Menu): - bl_label = "Image" + bl_label = _("Image") def draw(self, context): layout = self.layout @@ -121,12 +122,12 @@ class IMAGE_MT_image(bpy.types.Menu): layout.operator("image.save") layout.operator("image.save_as") - layout.operator("image.save_as", text="Save a Copy").copy = True + layout.operator("image.save_as", text=_("Save a Copy")).copy = True if ima.source == 'SEQUENCE': layout.operator("image.save_sequence") - layout.operator("image.external_edit", "Edit Externally") + layout.operator("image.external_edit", _("Edit Externally")) layout.separator() @@ -144,7 +145,7 @@ class IMAGE_MT_image(bpy.types.Menu): # this could be done in operator poll too if ima.is_dirty: if ima.source in {'FILE', 'GENERATED'} and ima.type != 'MULTILAYER': - layout.operator("image.pack", text="Pack As PNG").as_png = True + layout.operator("image.pack", text=_("Pack As PNG")).as_png = True layout.separator() @@ -152,44 +153,44 @@ class IMAGE_MT_image(bpy.types.Menu): class IMAGE_MT_image_invert(bpy.types.Menu): - bl_label = "Invert" + bl_label = _("Invert") def draw(self, context): layout = self.layout - op = layout.operator("image.invert", text="Invert Image Colors") + op = layout.operator("image.invert", text=_("Invert Image Colors")) op.invert_r = True op.invert_g = True op.invert_b = True layout.separator() - op = layout.operator("image.invert", text="Invert Red Channel") + op = layout.operator("image.invert", text=_("Invert Red Channel")) op.invert_r = True - op = layout.operator("image.invert", text="Invert Green Channel") + op = layout.operator("image.invert", text=_("Invert Green Channel")) op.invert_g = True - op = layout.operator("image.invert", text="Invert Blue Channel") + op = layout.operator("image.invert", text=_("Invert Blue Channel")) op.invert_b = True - op = layout.operator("image.invert", text="Invert Alpha Channel") + op = layout.operator("image.invert", text=_("Invert Alpha Channel")) op.invert_a = True class IMAGE_MT_uvs_showhide(bpy.types.Menu): - bl_label = "Show/Hide Faces" + bl_label = _("Show/Hide Faces") def draw(self, context): layout = self.layout layout.operator("uv.reveal") - layout.operator("uv.hide", text="Hide Selected") - layout.operator("uv.hide", text="Hide Unselected").unselected = True + layout.operator("uv.hide", text=_("Hide Selected")) + layout.operator("uv.hide", text=_("Hide Unselected")).unselected = True class IMAGE_MT_uvs_transform(bpy.types.Menu): - bl_label = "Transform" + bl_label = _("Transform") def draw(self, context): layout = self.layout @@ -200,35 +201,35 @@ class IMAGE_MT_uvs_transform(bpy.types.Menu): class IMAGE_MT_uvs_snap(bpy.types.Menu): - bl_label = "Snap" + bl_label = _("Snap") def draw(self, context): layout = self.layout layout.operator_context = 'EXEC_REGION_WIN' - layout.operator("uv.snap_selected", text="Selected to Pixels").target = 'PIXELS' - layout.operator("uv.snap_selected", text="Selected to Cursor").target = 'CURSOR' - layout.operator("uv.snap_selected", text="Selected to Adjacent Unselected").target = 'ADJACENT_UNSELECTED' + layout.operator("uv.snap_selected", text=_("Selected to Pixels")).target = 'PIXELS' + layout.operator("uv.snap_selected", text=_("Selected to Cursor")).target = 'CURSOR' + layout.operator("uv.snap_selected", text=_("Selected to Adjacent Unselected")).target = 'ADJACENT_UNSELECTED' layout.separator() - layout.operator("uv.snap_cursor", text="Cursor to Pixels").target = 'PIXELS' - layout.operator("uv.snap_cursor", text="Cursor to Selected").target = 'SELECTED' + layout.operator("uv.snap_cursor", text=_("Cursor to Pixels")).target = 'PIXELS' + layout.operator("uv.snap_cursor", text=_("Cursor to Selected")).target = 'SELECTED' class IMAGE_MT_uvs_mirror(bpy.types.Menu): - bl_label = "Mirror" + bl_label = _("Mirror") def draw(self, context): layout = self.layout layout.operator_context = 'EXEC_REGION_WIN' - layout.operator("transform.mirror", text="X Axis").constraint_axis[0] = True - layout.operator("transform.mirror", text="Y Axis").constraint_axis[1] = True + layout.operator("transform.mirror", text=_("X Axis")).constraint_axis[0] = True + layout.operator("transform.mirror", text=_("Y Axis")).constraint_axis[1] = True class IMAGE_MT_uvs_weldalign(bpy.types.Menu): - bl_label = "Weld/Align" + bl_label = _("Weld/Align") def draw(self, context): layout = self.layout @@ -254,7 +255,7 @@ class IMAGE_MT_uvs(bpy.types.Menu): layout.prop(uv, "use_live_unwrap") layout.operator("uv.unwrap") - layout.operator("uv.pin", text="Unpin").clear = True + layout.operator("uv.pin", text=_("Unpin")).clear = True layout.operator("uv.pin") layout.separator() @@ -283,7 +284,7 @@ class IMAGE_MT_uvs(bpy.types.Menu): class IMAGE_MT_uvs_select_mode(bpy.types.Menu): - bl_label = "UV Select Mode" + bl_label = _("UV Select Mode") def draw(self, context): layout = self.layout @@ -294,32 +295,32 @@ class IMAGE_MT_uvs_select_mode(bpy.types.Menu): # do smart things depending on whether uv_select_sync is on if toolsettings.use_uv_select_sync: - prop = layout.operator("wm.context_set_value", text="Vertex", icon='VERTEXSEL') + prop = layout.operator("wm.context_set_value", text=_("Vertex"), icon='VERTEXSEL') prop.value = "(True, False, False)" prop.data_path = "tool_settings.mesh_select_mode" - prop = layout.operator("wm.context_set_value", text="Edge", icon='EDGESEL') + prop = layout.operator("wm.context_set_value", text=_("Edge"), icon='EDGESEL') prop.value = "(False, True, False)" prop.data_path = "tool_settings.mesh_select_mode" - prop = layout.operator("wm.context_set_value", text="Face", icon='FACESEL') + prop = layout.operator("wm.context_set_value", text=_("Face"), icon='FACESEL') prop.value = "(False, False, True)" prop.data_path = "tool_settings.mesh_select_mode" else: - prop = layout.operator("wm.context_set_string", text="Vertex", icon='UV_VERTEXSEL') + prop = layout.operator("wm.context_set_string", text=_("Vertex"), icon='UV_VERTEXSEL') prop.value = "VERTEX" prop.data_path = "tool_settings.uv_select_mode" - prop = layout.operator("wm.context_set_string", text="Edge", icon='UV_EDGESEL') + prop = layout.operator("wm.context_set_string", text=_("Edge"), icon='UV_EDGESEL') prop.value = "EDGE" prop.data_path = "tool_settings.uv_select_mode" - prop = layout.operator("wm.context_set_string", text="Face", icon='UV_FACESEL') + prop = layout.operator("wm.context_set_string", text=_("Face"), icon='UV_FACESEL') prop.value = "FACE" prop.data_path = "tool_settings.uv_select_mode" - prop = layout.operator("wm.context_set_string", text="Island", icon='UV_ISLANDSEL') + prop = layout.operator("wm.context_set_string", text=_("Island"), icon='UV_ISLANDSEL') prop.value = "ISLAND" prop.data_path = "tool_settings.uv_select_mode" @@ -351,9 +352,9 @@ class IMAGE_HT_header(bpy.types.Header): sub.menu("IMAGE_MT_select") if ima and ima.is_dirty: - sub.menu("IMAGE_MT_image", text="Image*") + sub.menu("IMAGE_MT_image", text=_("Image*")) else: - sub.menu("IMAGE_MT_image", text="Image") + sub.menu("IMAGE_MT_image", text=_("Image")) if show_uvedit: sub.menu("IMAGE_MT_uvs") @@ -411,7 +412,7 @@ class IMAGE_HT_header(bpy.types.Header): class IMAGE_PT_image_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' - bl_label = "Image" + bl_label = _("Image") @classmethod def poll(cls, context): @@ -430,7 +431,7 @@ class IMAGE_PT_image_properties(bpy.types.Panel): class IMAGE_PT_game_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' - bl_label = "Game Properties" + bl_label = _("Game Properties") @classmethod def poll(cls, context): @@ -454,9 +455,9 @@ class IMAGE_PT_game_properties(bpy.types.Panel): subsub = sub.column() subsub.active = ima.use_animation - subsub.prop(ima, "frame_start", text="Start") - subsub.prop(ima, "frame_end", text="End") - subsub.prop(ima, "fps", text="Speed") + subsub.prop(ima, "frame_start", text=_("Start")) + subsub.prop(ima, "frame_end", text=_("End")) + subsub.prop(ima, "fps", text=_("Speed")) col.prop(ima, "use_tiles") sub = col.column(align=True) @@ -475,7 +476,7 @@ class IMAGE_PT_game_properties(bpy.types.Panel): class IMAGE_PT_view_histogram(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' - bl_label = "Histogram" + bl_label = _("Histogram") @classmethod def poll(cls, context): @@ -494,7 +495,7 @@ class IMAGE_PT_view_histogram(bpy.types.Panel): class IMAGE_PT_view_waveform(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' - bl_label = "Waveform" + bl_label = _("Waveform") @classmethod def poll(cls, context): @@ -514,7 +515,7 @@ class IMAGE_PT_view_waveform(bpy.types.Panel): class IMAGE_PT_view_vectorscope(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' - bl_label = "Vectorscope" + bl_label = _("Vectorscope") @classmethod def poll(cls, context): @@ -532,7 +533,7 @@ class IMAGE_PT_view_vectorscope(bpy.types.Panel): class IMAGE_PT_sample_line(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' - bl_label = "Sample Line" + bl_label = _("Sample Line") @classmethod def poll(cls, context): @@ -550,7 +551,7 @@ class IMAGE_PT_sample_line(bpy.types.Panel): class IMAGE_PT_scope_sample(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'PREVIEW' - bl_label = "Scope Samples" + bl_label = _("Scope Samples") @classmethod def poll(cls, context): @@ -571,7 +572,7 @@ class IMAGE_PT_scope_sample(bpy.types.Panel): class IMAGE_PT_view_properties(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' - bl_label = "Display" + bl_label = _("Display") @classmethod def poll(cls, context): @@ -590,22 +591,22 @@ class IMAGE_PT_view_properties(bpy.types.Panel): col = split.column() if ima: - col.prop(ima, "display_aspect", text="Aspect Ratio") + col.prop(ima, "display_aspect", text=_("Aspect Ratio")) col = split.column() - col.label(text="Coordinates:") - col.prop(sima, "show_repeat", text="Repeat") + col.label(text=_("Coordinates:")) + col.prop(sima, "show_repeat", text=_("Repeat")) if show_uvedit: - col.prop(uvedit, "show_normalized_coords", text="Normalized") + col.prop(uvedit, "show_normalized_coords", text=_("Normalized")) elif show_uvedit: - col.label(text="Coordinates:") - col.prop(uvedit, "show_normalized_coords", text="Normalized") + col.label(text=_("Coordinates:")) + col.prop(uvedit, "show_normalized_coords", text=_("Normalized")) if show_uvedit: col = layout.column() - col.label("Cursor Location") + col.label(_("Cursor Location")) row = col.row() row.prop(uvedit, "cursor_location", text="") @@ -616,13 +617,13 @@ class IMAGE_PT_view_properties(bpy.types.Panel): split = layout.split() col = split.column() - col.prop(uvedit, "show_smooth_edges", text="Smooth") - col.prop(uvedit, "show_modified_edges", text="Modified") + col.prop(uvedit, "show_smooth_edges", text=_("Smooth")) + col.prop(uvedit, "show_modified_edges", text=_("Modified")) #col.prop(uvedit, "show_edges") #col.prop(uvedit, "show_faces") col = split.column() - col.prop(uvedit, "show_stretch", text="Stretch") + col.prop(uvedit, "show_stretch", text=_("Stretch")) sub = col.column() sub.active = uvedit.show_stretch sub.row().prop(uvedit, "draw_stretch_type", expand=True) @@ -631,7 +632,7 @@ class IMAGE_PT_view_properties(bpy.types.Panel): class IMAGE_PT_paint(bpy.types.Panel): bl_space_type = 'IMAGE_EDITOR' bl_region_type = 'UI' - bl_label = "Paint" + bl_label = _("Paint") @classmethod def poll(cls, context): @@ -665,16 +666,16 @@ class IMAGE_PT_paint(bpy.types.Panel): row.prop(brush, "jitter", slider=True) row.prop(brush, "use_pressure_jitter", toggle=True, text="") - col.prop(brush, "blend", text="Blend") + col.prop(brush, "blend", text=_("Blend")) if brush.image_tool == 'CLONE': col.separator() - col.prop(brush, "clone_image", text="Image") - col.prop(brush, "clone_alpha", text="Alpha") + col.prop(brush, "clone_image", text=_("Image")) + col.prop(brush, "clone_alpha", text=_("Alpha")) class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel): - bl_label = "Texture" + bl_label = _("Texture") bl_options = {'DEFAULT_CLOSED'} def draw(self, context): @@ -689,7 +690,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, bpy.types.Panel): class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel): - bl_label = "Tool" + bl_label = _("Tool") bl_options = {'DEFAULT_CLOSED'} def draw(self, context): @@ -709,7 +710,7 @@ class IMAGE_PT_tools_brush_tool(BrushButtonsPanel, bpy.types.Panel): class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel): - bl_label = "Paint Stroke" + bl_label = _("Paint Stroke") bl_options = {'DEFAULT_CLOSED'} def draw(self, context): @@ -726,14 +727,14 @@ class IMAGE_PT_paint_stroke(BrushButtonsPanel, bpy.types.Panel): layout.prop(brush, "use_space") row = layout.row(align=True) row.active = brush.use_space - row.prop(brush, "spacing", text="Distance", slider=True) + row.prop(brush, "spacing", text=_("Distance"), slider=True) row.prop(brush, "use_pressure_spacing", toggle=True, text="") layout.prop(brush, "use_wrap") class IMAGE_PT_paint_curve(BrushButtonsPanel, bpy.types.Panel): - bl_label = "Paint Curve" + bl_label = _("Paint Curve") bl_options = {'DEFAULT_CLOSED'} def draw(self, context): diff --git a/release/scripts/startup/bl_ui/space_logic.py b/release/scripts/startup/bl_ui/space_logic.py index 7f7aba71a46..da4161cd88c 100644 --- a/release/scripts/startup/bl_ui/space_logic.py +++ b/release/scripts/startup/bl_ui/space_logic.py @@ -18,12 +18,13 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class LOGIC_PT_properties(bpy.types.Panel): bl_space_type = 'LOGIC_EDITOR' bl_region_type = 'UI' - bl_label = "Properties" + bl_label = _("Properties") @classmethod def poll(cls, context): @@ -36,7 +37,7 @@ class LOGIC_PT_properties(bpy.types.Panel): ob = context.active_object game = ob.game - layout.operator("object.game_property_new", text="Add Game Property", icon='ZOOMIN') + layout.operator("object.game_property_new", text=_("Add Game Property"), icon='ZOOMIN') for i, prop in enumerate(game.properties): @@ -50,14 +51,14 @@ class LOGIC_PT_properties(bpy.types.Panel): class LOGIC_MT_logicbricks_add(bpy.types.Menu): - bl_label = "Add" + bl_label = _("Add") def draw(self, context): layout = self.layout - layout.operator_menu_enum("logic.sensor_add", "type", text="Sensor") - layout.operator_menu_enum("logic.controller_add", "type", text="Controller") - layout.operator_menu_enum("logic.actuator_add", "type", text="Actuator") + layout.operator_menu_enum("logic.sensor_add", "type", text=_("Sensor")) + layout.operator_menu_enum("logic.controller_add", "type", text=_("Controller")) + layout.operator_menu_enum("logic.actuator_add", "type", text=_("Actuator")) class LOGIC_HT_header(bpy.types.Header): @@ -77,7 +78,7 @@ class LOGIC_HT_header(bpy.types.Header): class LOGIC_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_nla.py b/release/scripts/startup/bl_ui/space_nla.py index 717adb3baa8..f6fa84c3c6a 100644 --- a/release/scripts/startup/bl_ui/space_nla.py +++ b/release/scripts/startup/bl_ui/space_nla.py @@ -19,6 +19,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class NLA_HT_header(bpy.types.Header): @@ -49,7 +50,7 @@ class NLA_HT_header(bpy.types.Header): class NLA_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -65,7 +66,7 @@ class NLA_MT_view(bpy.types.Menu): layout.prop(st, "use_realtime_update") layout.prop(st, "show_frame_indicator") - layout.operator("anim.time_toggle", text="Show Frames" if st.show_seconds else "Show Seconds") + layout.operator("anim.time_toggle", text=_("Show Frames") if st.show_seconds else _("Show Seconds")) layout.prop(st, "show_strip_curves") @@ -79,7 +80,7 @@ class NLA_MT_view(bpy.types.Menu): class NLA_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -87,19 +88,19 @@ class NLA_MT_select(bpy.types.Menu): layout.column() # This is a bit misleading as the operator's default text is "Select All" while it actually *toggles* All/None layout.operator("nla.select_all_toggle") - layout.operator("nla.select_all_toggle", text="Invert Selection").invert = True + layout.operator("nla.select_all_toggle", text=_("Invert Selection")).invert = True layout.separator() layout.operator("nla.select_border") - layout.operator("nla.select_border", text="Border Axis Range").axis_range = True + layout.operator("nla.select_border", text=_("Border Axis Range")).axis_range = True layout.separator() - layout.operator("nla.select_leftright", text="Before Current Frame").mode = 'LEFT' - layout.operator("nla.select_leftright", text="After Current Frame").mode = 'RIGHT' + layout.operator("nla.select_leftright", text=_("Before Current Frame")).mode = 'LEFT' + layout.operator("nla.select_leftright", text=_("After Current Frame")).mode = 'RIGHT' class NLA_MT_marker(bpy.types.Menu): - bl_label = "Marker" + bl_label = _("Marker") def draw(self, context): layout = self.layout @@ -107,18 +108,18 @@ class NLA_MT_marker(bpy.types.Menu): #layout.operator_context = 'EXEC_REGION_WIN' layout.column() - layout.operator("marker.add", "Add Marker") - layout.operator("marker.duplicate", text="Duplicate Marker") - layout.operator("marker.delete", text="Delete Marker") + layout.operator("marker.add", _("Add Marker")) + layout.operator("marker.duplicate", text=_("Duplicate Marker")) + layout.operator("marker.delete", text=_("Delete Marker")) layout.separator() - layout.operator("marker.rename", text="Rename Marker") - layout.operator("marker.move", text="Grab/Move Marker") + layout.operator("marker.rename", text=_("Rename Marker")) + layout.operator("marker.move", text=_("Grab/Move Marker")) class NLA_MT_edit(bpy.types.Menu): - bl_label = "Edit" + bl_label = _("Edit") def draw(self, context): layout = self.layout @@ -126,9 +127,9 @@ class NLA_MT_edit(bpy.types.Menu): scene = context.scene layout.column() - layout.menu("NLA_MT_edit_transform", text="Transform") + layout.menu("NLA_MT_edit_transform", text=_("Transform")) - layout.operator_menu_enum("nla.snap", "type", text="Snap") + layout.operator_menu_enum("nla.snap", "type", text=_("Snap")) layout.separator() layout.operator("nla.duplicate") @@ -150,18 +151,18 @@ class NLA_MT_edit(bpy.types.Menu): # TODO: this really belongs more in a "channel" (or better, "track") menu layout.separator() - layout.operator_menu_enum("anim.channels_move", "direction", text="Track Ordering...") + layout.operator_menu_enum("anim.channels_move", "direction", text=_("Track Ordering...")) layout.separator() # TODO: names of these tools for 'tweakmode' need changing? if scene.is_nla_tweakmode: - layout.operator("nla.tweakmode_exit", text="Stop Tweaking Strip Actions") + layout.operator("nla.tweakmode_exit", text=_("Stop Tweaking Strip Actions")) else: - layout.operator("nla.tweakmode_enter", text="Start Tweaking Strip Actions") + layout.operator("nla.tweakmode_enter", text=_("Start Tweaking Strip Actions")) class NLA_MT_add(bpy.types.Menu): - bl_label = "Add" + bl_label = _("Add") def draw(self, context): layout = self.layout @@ -176,19 +177,19 @@ class NLA_MT_add(bpy.types.Menu): layout.separator() layout.operator("nla.tracks_add") - layout.operator("nla.tracks_add", text="Add Tracks Above Selected").above_selected = True + layout.operator("nla.tracks_add", text=_("Add Tracks Above Selected")).above_selected = True class NLA_MT_edit_transform(bpy.types.Menu): - bl_label = "Transform" + bl_label = _("Transform") def draw(self, context): layout = self.layout layout.column() - layout.operator("transform.translate", text="Grab/Move") - layout.operator("transform.transform", text="Extend").mode = 'TIME_EXTEND' - layout.operator("transform.transform", text="Scale").mode = 'TIME_SCALE' + layout.operator("transform.translate", text=_("Grab/Move")) + layout.operator("transform.transform", text=_("Extend")).mode = 'TIME_EXTEND' + layout.operator("transform.transform", text=_("Scale")).mode = 'TIME_SCALE' if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index fed1cc49c4c..a4e5c48cd80 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ class NODE_HT_header(bpy.types.Header): @@ -66,7 +67,7 @@ class NODE_HT_header(bpy.types.Header): scene = snode.id layout.prop(scene, "use_nodes") - layout.prop(scene.render, "use_free_unused_nodes", text="Free Unused") + layout.prop(scene.render, "use_free_unused_nodes", text=_("Free Unused")) layout.prop(snode, "show_backdrop") if snode.show_backdrop: row = layout.row(align=True) @@ -79,7 +80,7 @@ class NODE_HT_header(bpy.types.Header): class NODE_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -97,9 +98,9 @@ class NODE_MT_view(bpy.types.Menu): if context.space_data.show_backdrop: layout.separator() - layout.operator("node.backimage_move", text="Backdrop move") - layout.operator("node.backimage_zoom", text="Backdrop zoom in").factor = 1.2 - layout.operator("node.backimage_zoom", text="Backdrop zoom out").factor = 0.833 + layout.operator("node.backimage_move", text=_("Backdrop move")) + layout.operator("node.backimage_zoom", text=_("Backdrop zoom in")).factor = 1.2 + layout.operator("node.backimage_zoom", text=_("Backdrop zoom out")).factor = 0.833 layout.separator() @@ -108,7 +109,7 @@ class NODE_MT_view(bpy.types.Menu): class NODE_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout @@ -125,7 +126,7 @@ class NODE_MT_select(bpy.types.Menu): class NODE_MT_node(bpy.types.Menu): - bl_label = "Node" + bl_label = _("Node") def draw(self, context): layout = self.layout @@ -141,7 +142,7 @@ class NODE_MT_node(bpy.types.Menu): layout.separator() layout.operator("node.link_make") - layout.operator("node.link_make", text="Make and Replace Links").replace = True + layout.operator("node.link_make", text=_("Make and Replace Links")).replace = True layout.operator("node.links_cut") layout.separator() @@ -167,7 +168,7 @@ class NODE_MT_node(bpy.types.Menu): class NODE_PT_properties(bpy.types.Panel): bl_space_type = 'NODE_EDITOR' bl_region_type = 'UI' - bl_label = "Backdrop" + bl_label = _("Backdrop") @classmethod def poll(cls, context): @@ -184,13 +185,13 @@ class NODE_PT_properties(bpy.types.Panel): snode = context.space_data layout.active = snode.show_backdrop layout.prop(snode, "backdrop_channels", text="") - layout.prop(snode, "backdrop_zoom", text="Zoom") + layout.prop(snode, "backdrop_zoom", text=_("Zoom")) col = layout.column(align=True) - col.label(text="Offset:") + col.label(text=_("Offset:")) col.prop(snode, "backdrop_x", text="X") col.prop(snode, "backdrop_y", text="Y") - col.operator("node.backimage_move", text="Move") + col.operator("node.backimage_move", text=_("Move") if __name__ == "__main__": # only for live edit. bpy.utils.register_module(__name__) diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index c477a2ff62b..e7276b82aba 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -18,6 +18,7 @@ # <pep8 compliant> import bpy +from blf import gettext as _ def act_strip(context): @@ -63,9 +64,9 @@ class SEQUENCER_HT_header(bpy.types.Header): elif st.view_type == 'SEQUENCER_PREVIEW': layout.separator() layout.operator("sequencer.refresh_all") - layout.prop(st, "display_channel", text="Channel") + layout.prop(st, "display_channel", text=_("Channel")) else: - layout.prop(st, "display_channel", text="Channel") + layout.prop(st, "display_channel", text=_("Channel")) ed = context.scene.sequence_editor if ed: @@ -77,7 +78,7 @@ class SEQUENCER_HT_header(bpy.types.Header): class SEQUENCER_MT_view_toggle(bpy.types.Menu): - bl_label = "View Type" + bl_label = _("View Type") def draw(self, context): layout = self.layout @@ -88,7 +89,7 @@ class SEQUENCER_MT_view_toggle(bpy.types.Menu): class SEQUENCER_MT_view(bpy.types.Menu): - bl_label = "View" + bl_label = _("View") def draw(self, context): layout = self.layout @@ -102,11 +103,11 @@ class SEQUENCER_MT_view(bpy.types.Menu): layout.separator() if st.view_type in {'SEQUENCER', 'SEQUENCER_PREVIEW'}: - layout.operator("sequencer.view_all", text='View all Sequences') + layout.operator("sequencer.view_all", text=_('View all Sequences')) if st.view_type in {'PREVIEW', 'SEQUENCER_PREVIEW'}: layout.operator_context = 'INVOKE_REGION_PREVIEW' - layout.operator("sequencer.view_all_preview", text='Fit preview in window') - layout.operator("sequencer.view_zoom_ratio", text='Show preview 1:1').ratio = 1.0 + layout.operator("sequencer.view_all_preview", text=_('Fit preview in window')) + layout.operator("sequencer.view_zoom_ratio", text=_('Show preview 1:1')).ratio = 1.0 layout.operator_context = 'INVOKE_DEFAULT' # # XXX, invokes in the header view @@ -130,18 +131,18 @@ class SEQUENCER_MT_view(bpy.types.Menu): class SEQUENCER_MT_select(bpy.types.Menu): - bl_label = "Select" + bl_label = _("Select") def draw(self, context): layout = self.layout layout.column() - layout.operator("sequencer.select_active_side", text="Strips to the Left").side = 'LEFT' - layout.operator("sequencer.select_active_side", text="Strips to the Right").side = 'RIGHT' + layout.operator("sequencer.select_active_side", text=_("Strips to the Left")).side = 'LEFT' + layout.operator("sequencer.select_active_side", text=_("Strips to the Right")).side = 'RIGHT' layout.separator() - layout.operator("sequencer.select_handles", text="Surrounding Handles").side = 'BOTH' - layout.operator("sequencer.select_handles", text="Left Handle").side = 'LEFT' - layout.operator("sequencer.select_handles", text="Right Handle").side = 'RIGHT' + layout.operator("sequencer.select_handles", text=_("Surrounding Handles")).side = 'BOTH' + layout.operator("sequencer.select_handles", text=_("Left Handle")).side = 'LEFT' + layout.operator("sequencer.select_handles", text=_("Right Handle")).side = 'RIGHT' layout.separator() layout.operator("sequencer.select_linked") layout.operator("sequencer.select_all_toggle") @@ -149,7 +150,7 @@ class SEQUENCER_MT_select(bpy.types.Menu): class SEQUENCER_MT_marker(bpy.types.Menu): - bl_label = "Marker" + bl_label = _("Marker") def draw(self, context): layout = self.layout @@ -157,20 +158,20 @@ class SEQUENCER_MT_marker(bpy.types.Menu): #layout.operator_context = 'EXEC_REGION_WIN' layout.column() - layout.operator("marker.add", "Add Marker") - layout.operator("marker.duplicate", text="Duplicate Marker") - layout.operator("marker.delete", text="Delete Marker") + layout.operator("marker.add", _("Add Marker")) + layout.operator("marker.duplicate", text=_("Duplicate Marker")) + layout.operator("marker.delete", text=_("Delete Marker")) layout.separator() - layout.operator("marker.rename", text="Rename Marker") - layout.operator("marker.move", text="Grab/Move Marker") + layout.operator("marker.rename", text=_("Rename Marker")) + layout.operator("marker.move", text=_("Grab/Move Marker")) #layout.operator("sequencer.sound_strip_add", text="Transform Markers") # toggle, will be rna - (sseq->flag & SEQ_MARKER_TRANS) class SEQUENCER_MT_add(bpy.types.Menu): - bl_label = "Add" + bl_label = _("Add") def draw(self, context): layout = self.layout @@ -179,45 +180,45 @@ class SEQUENCER_MT_add(bpy.types.Menu): layout.column() if len(bpy.data.scenes) > 10: layout.operator_context = 'INVOKE_DEFAULT' - layout.operator("sequencer.scene_strip_add", text="Scene...") + layout.operator("sequencer.scene_strip_add", text=_("Scene...")) else: - layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text="Scene...") + layout.operator_menu_enum("sequencer.scene_strip_add", "scene", text=_("Scene...")) - layout.operator("sequencer.movie_strip_add", text="Movie") - layout.operator("sequencer.image_strip_add", text="Image") - layout.operator("sequencer.sound_strip_add", text="Sound") + layout.operator("sequencer.movie_strip_add", text=_("Movie")) + layout.operator("sequencer.image_strip_add", text=_("Image")) + layout.operator("sequencer.sound_strip_add", text=_("Sound")) layout.menu("SEQUENCER_MT_add_effect") class SEQUENCER_MT_add_effect(bpy.types.Menu): - bl_label = "Effect Strip..." + bl_label = _("Effect Strip...") def draw(self, context): layout = self.layout layout.operator_context = 'INVOKE_REGION_WIN' layout.column() - layout.operator("sequencer.effect_strip_add", text="Add").type = 'ADD' - layout.operator("sequencer.effect_strip_add", text="Subtract").type = 'SUBTRACT' - layout.operator("sequencer.effect_strip_add", text="Alpha Over").type = 'ALPHA_OVER' - layout.operator("sequencer.effect_strip_add", text="Alpha Under").type = 'ALPHA_UNDER' - layout.operator("sequencer.effect_strip_add", text="Cross").type = 'CROSS' - layout.operator("sequencer.effect_strip_add", text="Gamma Cross").type = 'GAMMA_CROSS' - layout.operator("sequencer.effect_strip_add", text="Multiply").type = 'MULTIPLY' - layout.operator("sequencer.effect_strip_add", text="Over Drop").type = 'OVER_DROP' - layout.operator("sequencer.effect_strip_add", text="Plugin").type = 'PLUGIN' - layout.operator("sequencer.effect_strip_add", text="Wipe").type = 'WIPE' - layout.operator("sequencer.effect_strip_add", text="Glow").type = 'GLOW' - layout.operator("sequencer.effect_strip_add", text="Transform").type = 'TRANSFORM' - layout.operator("sequencer.effect_strip_add", text="Color").type = 'COLOR' - layout.operator("sequencer.effect_strip_add", text="Speed Control").type = 'SPEED' - layout.operator("sequencer.effect_strip_add", text="Multicam Selector").type = 'MULTICAM' - layout.operator("sequencer.effect_strip_add", text="Adjustment Layer").type = 'ADJUSTMENT' + layout.operator("sequencer.effect_strip_add", text=_("Add")).type = 'ADD' + layout.operator("sequencer.effect_strip_add", text=_("Subtract")).type = 'SUBTRACT' + layout.operator("sequencer.effect_strip_add", text=_("Alpha Over")).type = 'ALPHA_OVER' + layout.operator("sequencer.effect_strip_add", text=_("Alpha Under")).type = 'ALPHA_UNDER' + layout.operator("sequencer.effect_strip_add", text=_("Cross")).type = 'CROSS' + layout.operator("sequencer.effect_strip_add", text=_("Gamma Cross")).type = 'GAMMA_CROSS' + layout.operator("sequencer.effect_strip_add", text=_("Multiply")).type = 'MULTIPLY' + layout.operator("sequencer.effect_strip_add", text=_("Over Drop")).type = 'OVER_DROP' + layout.operator("sequencer.effect_strip_add", text=_("Plugin")).type = 'PLUGIN' + layout.operator("sequencer.effect_strip_add", text=_("Wipe")).type = 'WIPE' + layout.operator("sequencer.effect_strip_add", text=_("Glow")).type = 'GLOW' + layout.operator("sequencer.effect_strip_add", text=_("Transform")).type = 'TRANSFORM' + layout.operator("sequencer.effect_strip_add", text=_("Color")).type = 'COLOR' + layout.operator("sequencer.effect_strip_add", text=_("Speed Control")).type = 'SPEED' + layout.operator("sequencer.effect_strip_add", text=_("Multicam Selector")).type = 'MULTICAM' + layout.operator("sequencer.effect_strip_add", text=_("Adjustment Layer")).type = 'ADJUSTMENT' class SEQUENCER_MT_strip(bpy.types.Menu): - bl_label = "Strip" + bl_label = _("Strip") def draw(self, context): layout = self.layout @@ -225,13 +226,13 @@ class SEQUENCER_MT_strip(bpy.types.Menu): layout.operator_context = 'INVOKE_REGION_WIN' layout.column() - layout.operator("transform.transform", text="Grab/Move").mode = 'TRANSLATION' - layout.operator("transform.transform", text="Grab/Extend from frame").mode = 'TIME_EXTEND' + layout.operator("transform.transform", text=_("Grab/Move")).mode = 'TRANSLATION' + layout.operator("transform.transform", text=_("Grab/Extend from frame")).mode = 'TIME_EXTEND' # uiItemO(layout, NULL, 0, "sequencer.strip_snap"); // TODO - add this operator layout.separator() - layout.operator("sequencer.cut", text="Cut (hard) at frame").type = 'HARD' - layout.operator("sequencer.cut", text="Cut (soft) at frame").type = 'SOFT' + layout.operator("sequencer.cut", text=_("Cut (hard) at frame")).type = 'HARD' + layout.operator("sequencer.cut", text=_("Cut (soft) at frame")).type = 'SOFT' layout.operator("sequencer.images_separate") layout.operator("sequencer.deinterlace_selected_movies") layout.separator() @@ -283,7 +284,7 @@ class SEQUENCER_MT_strip(bpy.types.Menu): layout.operator("sequencer.mute") layout.operator("sequencer.unmute") - layout.operator("sequencer.mute", text="Mute Deselected Strips").unselected = True + layout.operator("sequencer.mute", text=_("Mute Deselected Strips")).unselected = True layout.operator("sequencer.snap") @@ -321,7 +322,7 @@ class SequencerButtonsPanel_Output(): class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Edit Strip" + bl_label = _("Edit Strip") def draw(self, context): layout = self.layout @@ -330,21 +331,21 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel): strip = act_strip(context) split = layout.split(percentage=0.3) - split.label(text="Name:") + split.label(text=_("Name:")) split.prop(strip, "name", text="") split = layout.split(percentage=0.3) - split.label(text="Type:") + split.label(text=_("Type:")) split.prop(strip, "type", text="") split = layout.split(percentage=0.3) - split.label(text="Blend:") + split.label(text=_("Blend:")) split.prop(strip, "blend_type", text="") row = layout.row(align=True) sub = row.row() sub.active = (not strip.mute) - sub.prop(strip, "blend_alpha", text="Opacity", slider=True) + sub.prop(strip, "blend_alpha", text=_("Opacity"), slider=True) row.prop(strip, "mute", toggle=True, icon='RESTRICT_VIEW_ON' if strip.mute else 'RESTRICT_VIEW_OFF', text="") row.prop(strip, "lock", toggle=True, icon='LOCKED' if strip.lock else 'UNLOCKED', text="") @@ -357,13 +358,13 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel): 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 = 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)) - 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 @@ -373,11 +374,11 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, bpy.types.Panel): 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)) class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Effect Strip" + bl_label = _("Effect Strip") @classmethod def poll(cls, context): @@ -413,7 +414,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): col = layout.column() col.prop(strip, "transition_type") - col.label(text="Direction:") + col.label(text=_("Direction:")) col.row().prop(strip, "direction", expand=True) col = layout.column() @@ -433,13 +434,13 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): row.prop(strip, "use_only_boost") elif strip.type == 'SPEED': - layout.prop(strip, "use_default_fade", "Stretch to input strip length") + layout.prop(strip, "use_default_fade", _("Stretch to input strip length")) if not strip.use_default_fade: layout.prop(strip, "use_as_speed") if strip.use_as_speed: layout.prop(strip, "speed_factor") else: - layout.prop(strip, "speed_factor", text="Frame number") + layout.prop(strip, "speed_factor", text=_("Frame number")) layout.prop(strip, "scale_to_length") #doesn't work currently @@ -457,7 +458,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY') - row.label("Cut To") + row.label(_("Cut To")) for i in range(1, strip.channel): row.operator("sequencer.cut_multicam", text=str(i)).camera = i @@ -465,17 +466,17 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): if strip.type == 'SPEED': col.prop(strip, "multiply_speed") elif strip.type in {'CROSS', 'GAMMA_CROSS', 'PLUGIN', 'WIPE'}: - col.prop(strip, "use_default_fade", "Default fade") + col.prop(strip, "use_default_fade", _("Default fade")) if not strip.use_default_fade: - col.prop(strip, "effect_fader", text="Effect fader") + col.prop(strip, "effect_fader", text=_("Effect fader")) - layout.prop(strip, "use_translation", text="Image Offset:") + layout.prop(strip, "use_translation", text=_("Image Offset:")) if strip.use_translation: col = layout.column(align=True) col.prop(strip.transform, "offset_x", text="X") col.prop(strip.transform, "offset_y", text="Y") - layout.prop(strip, "use_crop", text="Image Crop:") + layout.prop(strip, "use_crop", text=_("Image Crop:")) if strip.use_crop: col = layout.column(align=True) col.prop(strip.crop, "max_y") @@ -490,7 +491,7 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): col.prop(strip, "interpolation") col.prop(strip, "translation_unit") col = layout.column(align=True) - col.label(text="Position:") + col.label(text=_("Position:")) col.prop(strip, "translate_start_x", text="X") col.prop(strip, "translate_start_y", text="Y") @@ -500,22 +501,22 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, bpy.types.Panel): col.prop(strip, "use_uniform_scale") if (strip.use_uniform_scale): col = layout.column(align=True) - col.prop(strip, "scale_start_x", text="Scale") + col.prop(strip, "scale_start_x", text=_("Scale")) else: col = layout.column(align=True) - col.label(text="Scale:") + col.label(text=_("Scale:")) col.prop(strip, "scale_start_x", text="X") col.prop(strip, "scale_start_y", text="Y") layout.separator() col = layout.column(align=True) - col.label(text="Rotation:") - col.prop(strip, "rotation_start", text="Rotation") + col.label(text=_("Rotation:")) + col.prop(strip, "rotation_start", text=_("Rotation")) class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Strip Input" + bl_label = _("Strip Input") @classmethod def poll(cls, context): @@ -544,7 +545,7 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): if seq_type == 'IMAGE': split = layout.split(percentage=0.2) col = split.column() - col.label(text="Path:") + col.label(text=_("Path:")) col = split.column() col.prop(strip, "directory", text="") @@ -554,28 +555,28 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): if elem: split = layout.split(percentage=0.2) col = split.column() - col.label(text="File:") + col.label(text=_("File:")) col = split.column() col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback elif seq_type == 'MOVIE': split = layout.split(percentage=0.2) col = split.column() - col.label(text="Path:") + col.label(text=_("Path:")) col = split.column() col.prop(strip, "filepath", text="") - col.prop(strip, "mpeg_preseek", text="MPEG Preseek") + col.prop(strip, "mpeg_preseek", text=_("MPEG Preseek")) # TODO, sound??? # end drawing filename - layout.prop(strip, "use_translation", text="Image Offset:") + layout.prop(strip, "use_translation", text=_("Image Offset:")) if strip.use_translation: col = layout.column(align=True) col.prop(strip.transform, "offset_x", text="X") col.prop(strip.transform, "offset_y", text="Y") - layout.prop(strip, "use_crop", text="Image Crop:") + layout.prop(strip, "use_crop", text=_("Image Crop:")) if strip.use_crop: col = layout.column(align=True) col.prop(strip.crop, "max_y") @@ -585,18 +586,18 @@ class SEQUENCER_PT_input(SequencerButtonsPanel, bpy.types.Panel): if not isinstance(strip, bpy.types.EffectSequence): col = layout.column(align=True) - col.label(text="Trim Duration (hard):") - col.prop(strip, "animation_offset_start", text="Start") - col.prop(strip, "animation_offset_end", text="End") + col.label(text=_("Trim Duration (hard):")) + col.prop(strip, "animation_offset_start", text=_("Start")) + col.prop(strip, "animation_offset_end", text=_("End")) col = layout.column(align=True) - col.label(text="Trim Duration (soft):") - col.prop(strip, "frame_offset_start", text="Start") - col.prop(strip, "frame_offset_end", text="End") + col.label(text=_("Trim Duration (soft):")) + col.prop(strip, "frame_offset_start", text=_("Start")) + col.prop(strip, "frame_offset_end", text=_("End")) class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Sound" + bl_label = _("Sound") @classmethod def poll(cls, context): @@ -621,9 +622,9 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel): row = layout.row() if strip.sound.packed_file: - row.operator("sound.unpack", icon='PACKAGE', text="Unpack") + row.operator("sound.unpack", icon='PACKAGE', text=_("Unpack")) else: - row.operator("sound.pack", icon='UGLYPACKAGE', text="Pack") + row.operator("sound.pack", icon='UGLYPACKAGE', text=_("Pack")) row.prop(strip.sound, "use_memory_cache") @@ -632,12 +633,12 @@ class SEQUENCER_PT_sound(SequencerButtonsPanel, bpy.types.Panel): col = layout.column(align=True) col.label(text="Trim Duration:") - col.prop(strip, "animation_offset_start", text="Start") - col.prop(strip, "animation_offset_end", text="End") + col.prop(strip, "animation_offset_start", text=_("Start")) + col.prop(strip, "animation_offset_end", text=_("End")) class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Scene" + bl_label = _("Scene") @classmethod def poll(cls, context): @@ -661,17 +662,17 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, bpy.types.Panel): if scene: layout.prop(scene.render, "use_sequencer") - layout.label(text="Camera Override") + layout.label(text=_("Camera Override")) layout.template_ID(strip, "scene_camera") 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)) class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Filter" + bl_label = _("Filter") @classmethod def poll(cls, context): @@ -695,22 +696,22 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel): strip = act_strip(context) col = layout.column() - col.label(text="Video:") + col.label(text=_("Video:")) col.prop(strip, "strobe") row = layout.row() - row.label(text="Flip:") + row.label(text=_("Flip:")) row.prop(strip, "use_flip_x", text="X") row.prop(strip, "use_flip_y", text="Y") col = layout.column() - col.prop(strip, "use_reverse_frames", text="Backwards") + col.prop(strip, "use_reverse_frames", text=_("Backwards")) col.prop(strip, "use_deinterlace") col = layout.column() - col.label(text="Colors:") - col.prop(strip, "color_saturation", text="Saturation") - col.prop(strip, "color_multiply", text="Multiply") + col.label(text=_("Colors:")) + col.prop(strip, "color_saturation", text=_("Saturation")) + col.prop(strip, "color_multiply", text=_("Multiply")) col.prop(strip, "use_premultiply") col.prop(strip, "use_float") @@ -721,19 +722,19 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, bpy.types.Panel): col = row.column() col.template_color_wheel(strip.color_balance, "lift", value_slider=False, cubic=True) col.row().prop(strip.color_balance, "lift") - col.prop(strip.color_balance, "invert_lift", text="Inverse") + col.prop(strip.color_balance, "invert_lift", text=_("Inverse")) col = row.column() col.template_color_wheel(strip.color_balance, "gamma", value_slider=False, lock_luminosity=True, cubic=True) col.row().prop(strip.color_balance, "gamma") - col.prop(strip.color_balance, "invert_gamma", text="Inverse") + col.prop(strip.color_balance, "invert_gamma", text=_("Inverse")) col = row.column() col.template_color_wheel(strip.color_balance, "gain", value_slider=False, lock_luminosity=True, cubic=True) col.row().prop(strip.color_balance, "gain") - col.prop(strip.color_balance, "invert_gain", text="Inverse") + col.prop(strip.color_balance, "invert_gain", text=_("Inverse")) class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel): - bl_label = "Proxy" + bl_label = _("Proxy") @classmethod def poll(cls, context): @@ -767,7 +768,7 @@ class SEQUENCER_PT_proxy(SequencerButtonsPanel, bpy.types.Panel): class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel): - bl_label = "Scene Preview/Render" + bl_label = _("Scene Preview/Render") bl_space_type = 'SEQUENCE_EDITOR' bl_region_type = 'UI' @@ -777,7 +778,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel): col = layout.column() col.active = False # Currently only opengl preview works! - col.prop(render, "use_sequencer_gl_preview", text="Open GL Preview") + col.prop(render, "use_sequencer_gl_preview", text=_("Open GL Preview")) col = layout.column() #col.active = render.use_sequencer_gl_preview col.prop(render, "sequencer_gl_preview", text="") @@ -792,7 +793,7 @@ class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, bpy.types.Panel): class SEQUENCER_PT_view(SequencerButtonsPanel_Output, bpy.types.Panel): - bl_label = "View Settings" + bl_label = _("View Settings") def draw(self, context): layout = self.layout |