Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts')
-rw-r--r--release/scripts/modules/bpy/path.py2
-rw-r--r--release/scripts/startup/bl_operators/animsys_update.py2
-rw-r--r--release/scripts/startup/bl_operators/image.py3
-rw-r--r--release/scripts/startup/bl_operators/object.py71
-rw-r--r--release/scripts/startup/bl_operators/object_align.py9
-rw-r--r--release/scripts/startup/bl_operators/object_quick_effects.py19
-rw-r--r--release/scripts/startup/bl_operators/object_randomize_transform.py41
-rw-r--r--release/scripts/startup/bl_operators/presets.py36
-rw-r--r--release/scripts/startup/bl_operators/screen_play_rendered_anim.py4
-rw-r--r--release/scripts/startup/bl_operators/sequencer.py10
-rw-r--r--release/scripts/startup/bl_operators/wm.py153
-rw-r--r--release/scripts/startup/bl_ui/properties_render.py173
-rw-r--r--release/scripts/startup/bl_ui/properties_texture.py3
-rw-r--r--release/scripts/startup/bl_ui/properties_world.py43
-rw-r--r--release/scripts/startup/bl_ui/space_console.py15
-rw-r--r--release/scripts/startup/bl_ui/space_dopesheet.py75
-rw-r--r--release/scripts/startup/bl_ui/space_graph.py69
-rw-r--r--release/scripts/startup/bl_ui/space_image.py139
-rw-r--r--release/scripts/startup/bl_ui/space_info.py161
-rw-r--r--release/scripts/startup/bl_ui/space_logic.py15
-rw-r--r--release/scripts/startup/bl_ui/space_nla.py51
-rw-r--r--release/scripts/startup/bl_ui/space_node.py25
-rw-r--r--release/scripts/startup/bl_ui/space_outliner.py7
-rw-r--r--release/scripts/startup/bl_ui/space_sequencer.py215
-rw-r--r--release/scripts/startup/bl_ui/space_text.py43
-rw-r--r--release/scripts/startup/bl_ui/space_time.py33
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py322
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py193
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py737
-rw-r--r--release/scripts/startup/bl_ui/space_view3d_toolbar.py47
-rwxr-xr-x[-rw-r--r--]release/scripts/templates/batch_export.py0
-rwxr-xr-x[-rw-r--r--]release/scripts/templates/ui_menu.py0
-rwxr-xr-x[-rw-r--r--]release/scripts/templates/ui_menu_simple.py0
-rwxr-xr-x[-rw-r--r--]release/scripts/templates/ui_panel_simple.py0
34 files changed, 1376 insertions, 1340 deletions
diff --git a/release/scripts/modules/bpy/path.py b/release/scripts/modules/bpy/path.py
index eb1a5ffc455..251fc947e94 100644
--- a/release/scripts/modules/bpy/path.py
+++ b/release/scripts/modules/bpy/path.py
@@ -35,7 +35,7 @@ def abspath(path, start=None):
:type start: string
"""
if path.startswith("//"):
- return _os.path.join(_os.path.dirname(_bpy.data.filepath) if start is None else start, path[2:])
+ return _os.path.join(_os.path.dirname(_bpy.data.filepath if start is None else start), path[2:])
return path
diff --git a/release/scripts/startup/bl_operators/animsys_update.py b/release/scripts/startup/bl_operators/animsys_update.py
index 63d438a5066..eedc006ebd1 100644
--- a/release/scripts/startup/bl_operators/animsys_update.py
+++ b/release/scripts/startup/bl_operators/animsys_update.py
@@ -17,6 +17,7 @@
# ##### END GPL LICENSE BLOCK #####
# <pep8 compliant>
+from blf import gettext as _
data_path_update = [
("ClothCollisionSettings", "min_distance", "distance_min"),
@@ -692,6 +693,7 @@ class UpdateAnimData(bpy.types.Operator):
"""Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves"""
bl_idname = "anim.update_data_paths"
bl_label = "Update Animation Data"
+ __doc__ = _("Update data paths from 2.56 and previous versions, modifying data paths of drivers and fcurves")
def execute(self, context):
import animsys_refactor
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py
index 23bafe2eaae..a0267b8b947 100644
--- a/release/scripts/startup/bl_operators/image.py
+++ b/release/scripts/startup/bl_operators/image.py
@@ -154,8 +154,7 @@ 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 bpy.data.is_saved:
filepath = "//" + filepath
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 627a1530fe1..c0bd20b8910 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -20,28 +20,29 @@
import bpy
from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty
+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",
+ 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,
)
@@ -102,7 +103,7 @@ class SelectPattern(bpy.types.Operator):
class SelectCamera(bpy.types.Operator):
'''Select object matching a naming pattern'''
bl_idname = "object.select_camera"
- bl_label = "Select Camera"
+ bl_label = _("Select Camera")
bl_options = {'REGISTER', 'UNDO'}
@classmethod
@@ -124,20 +125,20 @@ class SelectHierarchy(bpy.types.Operator):
'''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", ""),
+ 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",
+ name=_("Extend"),
+ description=_("Extend the existing selection"),
default=False,
)
@@ -191,16 +192,15 @@ 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"),
+ name=_("Relative"),
+ description=_("Apply the subsurf level as an offset relative to the current level"),
default=False,
)
@@ -268,31 +268,30 @@ class ShapeTransfer(bpy.types.Operator):
'''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",
+ _("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,
)
@@ -510,7 +509,7 @@ class ShapeTransfer(bpy.types.Operator):
class JoinUVs(bpy.types.Operator):
'''Copy UV Layout to objects with matching geometry'''
bl_idname = "object.join_uvs"
- bl_label = "Join as UVs"
+ bl_label = _("Join as UVs")
@classmethod
def poll(cls, context):
@@ -578,7 +577,7 @@ class JoinUVs(bpy.types.Operator):
class MakeDupliFace(bpy.types.Operator):
'''Make linked objects into dupli-faces'''
bl_idname = "object.make_dupli_face"
- bl_label = "Make Dupli-Face"
+ bl_label = _("Make Dupli-Face")
@classmethod
def poll(cls, context):
@@ -653,7 +652,7 @@ class IsolateTypeRender(bpy.types.Operator):
'''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):
@@ -673,7 +672,7 @@ class IsolateTypeRender(bpy.types.Operator):
class ClearAllRestrictRender(bpy.types.Operator):
'''Reveal all render objects by setting the hide render flag'''
bl_idname = "object.hide_render_clear_all"
- bl_label = "Clear All Restrict Render"
+ bl_label = _("Clear All Restrict Render")
bl_options = {'REGISTER', 'UNDO'}
def execute(self, context):
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index 8fe606399b4..04a4d7d8f42 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -20,6 +20,7 @@
import bpy
from mathutils import Vector
+from blf import gettext as _
def GlobalBB_LQ(bb_world):
@@ -340,14 +341,12 @@ from bpy.props import EnumProperty, BoolProperty
class AlignObjects(bpy.types.Operator):
'''Align Objects'''
bl_idname = "object.align"
- bl_label = "Align Objects"
+ bl_label = _("Align Objects")
bl_options = {'REGISTER', 'UNDO'}
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)"),
+ 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=(
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index ef10bfd737d..ba739648000 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -26,7 +26,7 @@ from bpy.props import (BoolProperty,
FloatProperty,
FloatVectorProperty,
)
-
+from blf import gettext as _
def object_ensure_material(obj, mat_name):
""" Use an existing material or add a new one.
@@ -281,8 +281,8 @@ class QuickSmoke(bpy.types.Operator):
)
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,
)
@@ -397,22 +397,21 @@ class QuickFluid(bpy.types.Operator):
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,
)
diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py
index b94c4f06cd3..acb988e147a 100644
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@ -19,6 +19,7 @@
# <pep8-80 compliant>
import bpy
+from blf import gettext as _
def randomize_selected(seed, delta, loc, rot, scale, scale_even):
@@ -90,57 +91,55 @@ from bpy.props import IntProperty, BoolProperty, FloatVectorProperty
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",
+ 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,
)
@@ -149,8 +148,8 @@ class RandomizeLocRotSize(bpy.types.Operator):
default=0.15, min=-1.0, max=1.0, precision=3)'''
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),
diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py
index fbcc327c3bd..31a6f421768 100644
--- a/release/scripts/startup/bl_operators/presets.py
+++ b/release/scripts/startup/bl_operators/presets.py
@@ -19,6 +19,7 @@
# <pep8-80 compliant>
import bpy
+from blf import gettext as _
class AddPresetBase():
@@ -31,8 +32,8 @@ class AddPresetBase():
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",
+ name=_("Name"),
+ description=_("Name of the preset, used to make the path name"),
maxlen=64,
)
remove_active = bpy.props.BoolProperty(
@@ -143,16 +144,16 @@ class AddPresetBase():
class ExecutePreset(bpy.types.Operator):
''' Executes a preset '''
bl_idname = "script.execute_preset"
- bl_label = "Execute a Python Preset"
+ 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):
@@ -171,7 +172,7 @@ class ExecutePreset(bpy.types.Operator):
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 = [
@@ -197,7 +198,7 @@ class AddPresetRender(AddPresetBase, bpy.types.Operator):
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 = [
@@ -225,7 +226,7 @@ class AddPresetSSS(AddPresetBase, bpy.types.Operator):
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 = [
@@ -247,7 +248,7 @@ class AddPresetCloth(AddPresetBase, bpy.types.Operator):
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 = [
@@ -276,8 +277,9 @@ class AddPresetSunSky(AddPresetBase, bpy.types.Operator):
class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
'''Add an Application Interaction Preset'''
bl_idname = "wm.interaction_preset_add"
- bl_label = "Add Interaction Preset"
+ bl_label = _("Add Interaction Preset")
preset_menu = "USERPREF_MT_interaction_presets"
+ __doc__ = _('Add an Application Interaction Preset')
preset_defines = [
"user_preferences = bpy.context.user_preferences"
@@ -302,9 +304,10 @@ class AddPresetInteraction(AddPresetBase, bpy.types.Operator):
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)
@@ -325,11 +328,12 @@ class AddPresetKeyconfig(AddPresetBase, bpy.types.Operator):
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",
+ name=_("Operator"),
maxlen=64,
options={'HIDDEN'},
)
@@ -368,7 +372,7 @@ class AddPresetOperator(AddPresetBase, bpy.types.Operator):
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
diff --git a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
index a38d817d738..ba0b1da45d1 100644
--- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
@@ -22,6 +22,7 @@
import bpy
import os
+from blf import gettext as _
def guess_player_path(preset):
@@ -67,8 +68,9 @@ def guess_player_path(preset):
class PlayRenderedAnim(bpy.types.Operator):
'''Plays back rendered frames/movies using an external player.'''
bl_idname = "render.play_rendered_anim"
- bl_label = "Play Rendered Animation"
+ bl_label = _("Play Rendered Animation")
bl_options = {'REGISTER'}
+ __doc__ = _("Plays back rendered frames/movies using an external player.")
def execute(self, context):
import subprocess
diff --git a/release/scripts/startup/bl_operators/sequencer.py b/release/scripts/startup/bl_operators/sequencer.py
index 16b72406c49..1feec100295 100644
--- a/release/scripts/startup/bl_operators/sequencer.py
+++ b/release/scripts/startup/bl_operators/sequencer.py
@@ -21,13 +21,14 @@
import bpy
from bpy.props import IntProperty
+from blf import gettext as _
class SequencerCrossfadeSounds(bpy.types.Operator):
'''Do crossfading volume animation of two selected sound strips.'''
bl_idname = "sequencer.crossfade_sounds"
- bl_label = "Crossfade sounds"
+ bl_label = _("Crossfade sounds")
bl_options = {'REGISTER', 'UNDO'}
@classmethod
@@ -78,10 +79,10 @@ class SequencerCutMulticam(bpy.types.Operator):
'''Cut multicam strip and select camera.'''
bl_idname = "sequencer.cut_multicam"
- bl_label = "Cut multicam"
+ bl_label = _("Cut multicam")
bl_options = {'REGISTER', 'UNDO'}
- camera = IntProperty(name="Camera",
+ camera = IntProperty(name=_("Camera"),
default=1, min=1, max=32, soft_min=1, soft_max=32)
@classmethod
@@ -116,8 +117,9 @@ class SequencerDeinterlaceSelectedMovies(bpy.types.Operator):
'''Deinterlace all selected movie sources.'''
bl_idname = "sequencer.deinterlace_selected_movies"
- bl_label = "Deinterlace 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_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index af33e45668c..ae44860c3dd 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -23,12 +23,13 @@ from bpy.props import StringProperty, BoolProperty, IntProperty, \
FloatProperty, EnumProperty
from rna_prop_ui import rna_idprop_ui_prop_get, rna_idprop_ui_prop_clear
+from blf import gettext as _
class MESH_OT_delete_edgeloop(bpy.types.Operator):
'''Delete an edge loop by merging the faces on each side to a single face loop'''
bl_idname = "mesh.delete_edgeloop"
- bl_label = "Delete Edge Loop"
+ bl_label = _("Delete Edge Loop")
def execute(self, context):
if 'FINISHED' in bpy.ops.transform.edge_slide(value=1.0):
@@ -38,14 +39,14 @@ class MESH_OT_delete_edgeloop(bpy.types.Operator):
return {'CANCELLED'}
-rna_path_prop = StringProperty(name="Context Attributes",
- description="rna context string", maxlen=1024, default="")
+rna_path_prop = StringProperty(name=_("Context Attributes"),
+ description=_("rna context string"), maxlen=1024, default="")
-rna_reverse_prop = BoolProperty(name="Reverse",
- description="Cycle backwards", default=False)
+rna_reverse_prop = BoolProperty(name=_("Reverse"),
+ description=_("Cycle backwards"), default=False)
-rna_relative_prop = BoolProperty(name="Relative",
- description="Apply relative to the current value (delta)",
+rna_relative_prop = BoolProperty(name=_("Relative"),
+ description=_("Apply relative to the current value (delta)"),
default=False)
@@ -79,12 +80,12 @@ def execute_context_assign(self, context):
class BRUSH_OT_active_index_set(bpy.types.Operator):
'''Set active sculpt/paint brush from it's number'''
bl_idname = "brush.active_index_set"
- bl_label = "Set Brush Number"
+ bl_label = _("Set Brush Number")
- mode = StringProperty(name="mode",
- description="Paint mode to set brush for", maxlen=1024)
- index = IntProperty(name="number",
- description="Brush number")
+ mode = StringProperty(name=_("mode"),
+ description=_("Paint mode to set brush for"), maxlen=1024)
+ index = IntProperty(name=_("number"),
+ description=_("Brush number"))
_attr_dict = {"sculpt": "use_paint_sculpt",
"vertex_paint": "use_paint_vertex",
@@ -107,12 +108,12 @@ class BRUSH_OT_active_index_set(bpy.types.Operator):
class WM_OT_context_set_boolean(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_boolean"
- bl_label = "Context Set Boolean"
+ bl_label = _("Context Set Boolean")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = BoolProperty(name="Value",
- description="Assignment value", default=True)
+ value = BoolProperty(name=_("Value"),
+ description=_("Assignment value"), default=True)
execute = execute_context_assign
@@ -120,11 +121,11 @@ class WM_OT_context_set_boolean(bpy.types.Operator):
class WM_OT_context_set_int(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_int"
- bl_label = "Context Set"
+ bl_label = _("Context Set")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = IntProperty(name="Value", description="Assign value", default=0)
+ value = IntProperty(name=_("Value"), description=_("Assign value"), default=0)
relative = rna_relative_prop
execute = execute_context_assign
@@ -133,13 +134,13 @@ class WM_OT_context_set_int(bpy.types.Operator): # same as enum
class WM_OT_context_scale_int(bpy.types.Operator):
'''Scale an int context value.'''
bl_idname = "wm.context_scale_int"
- bl_label = "Context Set"
+ bl_label = _("Context Set")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = FloatProperty(name="Value", description="Assign value", default=1.0)
- always_step = BoolProperty(name="Always Step",
- description="Always adjust the value by a minimum of 1 when 'value' is not 1.0.",
+ value = FloatProperty(name=_("Value"), description=_("Assign value"), default=1.0)
+ always_step = BoolProperty(name=_("Always Step"),
+ description=_("Always adjust the value by a minimum of 1 when 'value' is not 1.0."),
default=True)
def execute(self, context):
@@ -169,12 +170,12 @@ class WM_OT_context_scale_int(bpy.types.Operator):
class WM_OT_context_set_float(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_float"
- bl_label = "Context Set Float"
+ bl_label = _("Context Set Float")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = FloatProperty(name="Value",
- description="Assignment value", default=0.0)
+ value = FloatProperty(name=_("Value"),
+ description=_("Assignment value"), default=0.0)
relative = rna_relative_prop
execute = execute_context_assign
@@ -183,12 +184,12 @@ class WM_OT_context_set_float(bpy.types.Operator): # same as enum
class WM_OT_context_set_string(bpy.types.Operator): # same as enum
'''Set a context value.'''
bl_idname = "wm.context_set_string"
- bl_label = "Context Set String"
+ bl_label = _("Context Set String")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = StringProperty(name="Value",
- description="Assign value", maxlen=1024, default="")
+ value = StringProperty(name=_("Value"),
+ description=_("Assign value"), maxlen=1024, default="")
execute = execute_context_assign
@@ -196,12 +197,12 @@ class WM_OT_context_set_string(bpy.types.Operator): # same as enum
class WM_OT_context_set_enum(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_enum"
- bl_label = "Context Set Enum"
+ bl_label = _("Context Set Enum")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = StringProperty(name="Value",
- description="Assignment value (as a string)",
+ value = StringProperty(name=_("Value"),
+ description=_("Assignment value (as a string)"),
maxlen=1024, default="")
execute = execute_context_assign
@@ -210,12 +211,12 @@ class WM_OT_context_set_enum(bpy.types.Operator):
class WM_OT_context_set_value(bpy.types.Operator):
'''Set a context value.'''
bl_idname = "wm.context_set_value"
- bl_label = "Context Set Value"
+ bl_label = _("Context Set Value")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = StringProperty(name="Value",
- description="Assignment value (as a string)",
+ value = StringProperty(name=_("Value"),
+ description=_("Assignment value (as a string)"),
maxlen=1024, default="")
def execute(self, context):
@@ -228,7 +229,7 @@ class WM_OT_context_set_value(bpy.types.Operator):
class WM_OT_context_toggle(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle"
- bl_label = "Context Toggle"
+ bl_label = _("Context Toggle")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -247,15 +248,15 @@ class WM_OT_context_toggle(bpy.types.Operator):
class WM_OT_context_toggle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_toggle_enum"
- bl_label = "Context Toggle Values"
+ bl_label = _("Context Toggle Values")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value_1 = StringProperty(name="Value", \
- description="Toggle enum", maxlen=1024, default="")
+ value_1 = StringProperty(name=_("Value"), \
+ description=_("Toggle enum"), maxlen=1024, default="")
- value_2 = StringProperty(name="Value", \
- description="Toggle enum", maxlen=1024, default="")
+ value_2 = StringProperty(name=_("Value"), \
+ description=_("Toggle enum"), maxlen=1024, default="")
def execute(self, context):
@@ -274,7 +275,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
'''Set a context value. Useful for cycling active material, '''
'''vertex keys, groups' etc.'''
bl_idname = "wm.context_cycle_int"
- bl_label = "Context Int Cycle"
+ bl_label = _("Context Int Cycle")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -308,7 +309,7 @@ class WM_OT_context_cycle_int(bpy.types.Operator):
class WM_OT_context_cycle_enum(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_cycle_enum"
- bl_label = "Context Enum Cycle"
+ bl_label = _("Context Enum Cycle")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -361,7 +362,7 @@ class WM_OT_context_cycle_array(bpy.types.Operator):
'''Set a context array value.
Useful for cycling the active mesh edit mode.'''
bl_idname = "wm.context_cycle_array"
- bl_label = "Context Array Cycle"
+ bl_label = _("Context Array Cycle")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -407,7 +408,7 @@ class WM_MT_context_menu_enum(bpy.types.Menu):
class WM_OT_context_menu_enum(bpy.types.Operator):
bl_idname = "wm.context_menu_enum"
- bl_label = "Context Enum Menu"
+ bl_label = _("Context Enum Menu")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
@@ -421,12 +422,12 @@ class WM_OT_context_menu_enum(bpy.types.Operator):
class WM_OT_context_set_id(bpy.types.Operator):
'''Toggle a context value.'''
bl_idname = "wm.context_set_id"
- bl_label = "Set Library ID"
+ bl_label = _("Set Library ID")
bl_options = {'UNDO', 'INTERNAL'}
data_path = rna_path_prop
- value = StringProperty(name="Value",
- description="Assign value", maxlen=1024, default="")
+ value = StringProperty(name=_("Value"),
+ description=_("Assign value"), maxlen=1024, default="")
def execute(self, context):
value = self.value
@@ -453,10 +454,10 @@ class WM_OT_context_set_id(bpy.types.Operator):
return {'FINISHED'}
-doc_id = StringProperty(name="Doc ID",
+doc_id = StringProperty(name=_("Doc ID"),
description="", maxlen=1024, default="", options={'HIDDEN'})
-doc_new = StringProperty(name="Edit Description",
+doc_new = StringProperty(name=_("Edit Description"),
description="", maxlen=1024, default="")
data_path_iter = StringProperty(
@@ -523,14 +524,14 @@ class WM_OT_context_collection_boolean_set(bpy.types.Operator):
class WM_OT_context_modal_mouse(bpy.types.Operator):
'''Adjust arbitrary values with mouse input'''
bl_idname = "wm.context_modal_mouse"
- bl_label = "Context Modal Mouse"
+ bl_label = _("Context Modal Mouse")
bl_options = {'GRAB_POINTER', 'BLOCKING', 'INTERNAL'}
data_path_iter = data_path_iter
data_path_item = data_path_item
- input_scale = FloatProperty(default=0.01, description="Scale the mouse movement by this value before applying the delta")
- invert = BoolProperty(default=False, description="Invert the mouse input")
+ input_scale = FloatProperty(default=0.01, description=_("Scale the mouse movement by this value before applying the delta"))
+ invert = BoolProperty(default=False, description=_("Invert the mouse input"))
initial_x = IntProperty(options={'HIDDEN'})
def _values_store(self, context):
@@ -609,10 +610,11 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
class WM_OT_url_open(bpy.types.Operator):
"Open a website in the Webbrowser"
+ __doc__ = _("Open a website in the Webbrowser")
bl_idname = "wm.url_open"
bl_label = ""
- url = StringProperty(name="URL", description="URL to open")
+ url = StringProperty(name="URL", description=_("URL to open"))
def execute(self, context):
import webbrowser
@@ -626,7 +628,7 @@ class WM_OT_path_open(bpy.types.Operator):
bl_idname = "wm.path_open"
bl_label = ""
- filepath = StringProperty(name="File Path", maxlen=1024, subtype='FILE_PATH')
+ filepath = StringProperty(name=_("File Path"), maxlen=1024, subtype='FILE_PATH')
def execute(self, context):
import sys
@@ -657,7 +659,7 @@ class WM_OT_path_open(bpy.types.Operator):
class WM_OT_doc_view(bpy.types.Operator):
'''Load online reference docs'''
bl_idname = "wm.doc_view"
- bl_label = "View Documentation"
+ bl_label = _("View Documentation")
doc_id = doc_id
if bpy.app.version_cycle == "release":
@@ -711,7 +713,7 @@ class WM_OT_doc_view(bpy.types.Operator):
class WM_OT_doc_edit(bpy.types.Operator):
'''Load online reference docs'''
bl_idname = "wm.doc_edit"
- bl_label = "Edit Documentation"
+ bl_label = _("Edit Documentation")
doc_id = doc_id
doc_new = doc_new
@@ -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.prop(self, "doc_new", text="")
def invoke(self, context, event):
@@ -779,23 +781,23 @@ class WM_OT_doc_edit(bpy.types.Operator):
return wm.invoke_props_dialog(self, width=600)
-rna_path = StringProperty(name="Property Edit",
- description="Property data_path edit", maxlen=1024, default="", options={'HIDDEN'})
+rna_path = StringProperty(name=_("Property Edit"),
+ description=_("Property data_path edit"), maxlen=1024, default="", options={'HIDDEN'})
-rna_value = StringProperty(name="Property Value",
- description="Property value edit", maxlen=1024, default="")
+rna_value = StringProperty(name=_("Property Value"),
+ description=_("Property value edit"), maxlen=1024, default="")
-rna_property = StringProperty(name="Property Name",
- description="Property name edit", maxlen=1024, default="")
+rna_property = StringProperty(name=_("Property Name"),
+ description=_("Property name edit"), maxlen=1024, default="")
-rna_min = FloatProperty(name="Min", default=0.0, precision=3)
-rna_max = FloatProperty(name="Max", default=1.0, precision=3)
+rna_min = FloatProperty(name=_("Min"), default=0.0, precision=3)
+rna_max = FloatProperty(name=_("Max"), default=1.0, precision=3)
class WM_OT_properties_edit(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_edit"
- bl_label = "Edit Property"
+ bl_label = _("Edit Property")
bl_options = {'REGISTER'} # only because invoke_props_popup requires.
data_path = rna_path
@@ -803,7 +805,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
value = rna_value
min = rna_min
max = rna_max
- description = StringProperty(name="Tip", default="")
+ description = StringProperty(name=_("Tip"), default="")
def execute(self, context):
data_path = self.data_path
@@ -879,7 +881,7 @@ class WM_OT_properties_edit(bpy.types.Operator):
class WM_OT_properties_add(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_add"
- bl_label = "Add Property"
+ bl_label = _("Add Property")
data_path = rna_path
@@ -907,7 +909,7 @@ class WM_OT_properties_context_change(bpy.types.Operator):
bl_idname = "wm.properties_context_change"
bl_label = ""
- context = StringProperty(name="Context", maxlen=32)
+ context = StringProperty(name=_("Context"), maxlen=32)
def execute(self, context):
context.space_data.context = (self.context)
@@ -917,7 +919,7 @@ class WM_OT_properties_context_change(bpy.types.Operator):
class WM_OT_properties_remove(bpy.types.Operator):
'''Internal use (edit a property data_path)'''
bl_idname = "wm.properties_remove"
- bl_label = "Remove Property"
+ bl_label = _("Remove Property")
data_path = rna_path
property = rna_property
@@ -930,9 +932,9 @@ class WM_OT_properties_remove(bpy.types.Operator):
class WM_OT_keyconfig_activate(bpy.types.Operator):
bl_idname = "wm.keyconfig_activate"
- bl_label = "Activate Keyconfig"
+ bl_label = _("Activate Keyconfig")
- filepath = StringProperty(name="File Path", maxlen=1024)
+ filepath = StringProperty(name=_("File Path"), maxlen=1024)
def execute(self, context):
bpy.utils.keyconfig_set(self.filepath)
@@ -941,7 +943,7 @@ class WM_OT_keyconfig_activate(bpy.types.Operator):
class WM_OT_appconfig_default(bpy.types.Operator):
bl_idname = "wm.appconfig_default"
- bl_label = "Default Application Configuration"
+ bl_label = _("Default Application Configuration")
def execute(self, context):
import os
@@ -958,7 +960,7 @@ class WM_OT_appconfig_default(bpy.types.Operator):
class WM_OT_appconfig_activate(bpy.types.Operator):
bl_idname = "wm.appconfig_activate"
- bl_label = "Activate Application Configuration"
+ bl_label = _("Activate Application Configuration")
filepath = StringProperty(name="File Path", maxlen=1024)
@@ -977,7 +979,8 @@ class WM_OT_appconfig_activate(bpy.types.Operator):
class WM_OT_sysinfo(bpy.types.Operator):
'''Generate System Info'''
bl_idname = "wm.sysinfo"
- bl_label = "System Info"
+ bl_label = _("System Info")
+ __doc__ = _("Generate System Info")
def execute(self, context):
import sys_info
@@ -988,7 +991,7 @@ class WM_OT_sysinfo(bpy.types.Operator):
class WM_OT_copy_prev_settings(bpy.types.Operator):
'''Copy settings from previous version'''
bl_idname = "wm.copy_prev_settings"
- bl_label = "Copy Previous Settings"
+ bl_label = _("Copy Previous Settings")
def execute(self, context):
import os
diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py
index 6d36db29a6c..56520202efb 100644
--- a/release/scripts/startup/bl_ui/properties_render.py
+++ b/release/scripts/startup/bl_ui/properties_render.py
@@ -18,24 +18,25 @@
# <pep8 compliant>
import bpy
+from blf import gettext as _
class RENDER_MT_presets(bpy.types.Menu):
- bl_label = "Render Presets"
+ bl_label = _("Render Presets")
preset_subdir = "render"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
class RENDER_MT_ffmpeg_presets(bpy.types.Menu):
- bl_label = "FFMPEG Presets"
+ bl_label = _("FFMPEG Presets")
preset_subdir = "ffmpeg"
preset_operator = "script.python_file_run"
draw = bpy.types.Menu.draw_preset
class RENDER_MT_framerate_presets(bpy.types.Menu):
- bl_label = "Frame Rate Presets"
+ bl_label = _("Frame Rate Presets")
preset_subdir = "framerate"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@@ -54,7 +55,7 @@ class RenderButtonsPanel():
class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Render"
+ bl_label = _("Render")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
@@ -63,14 +64,14 @@ class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel):
rd = context.scene.render
row = layout.row()
- row.operator("render.render", text="Image", icon='RENDER_STILL')
- row.operator("render.render", text="Animation", icon='RENDER_ANIMATION').animation = True
+ row.operator("render.render", text=_("Image"), icon='RENDER_STILL')
+ row.operator("render.render", text=_("Animation"), icon='RENDER_ANIMATION').animation = True
- layout.prop(rd, "display_mode", text="Display")
+ layout.prop(rd, "display_mode", text=_("Display"))
class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Layers"
+ bl_label = _("Layers")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -96,25 +97,25 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.prop(scene, "layers", text="Scene")
+ col.prop(scene, "layers", text=_("Scene"))
col.label(text="")
- col.prop(rl, "light_override", text="Light")
- col.prop(rl, "material_override", text="Material")
+ col.prop(rl, "light_override", text=_("Light"))
+ col.prop(rl, "material_override", text=_("Material"))
col = split.column()
- col.prop(rl, "layers", text="Layer")
- col.label(text="Mask Layers:")
+ col.prop(rl, "layers", text=_("Layer"))
+ col.label(text=_("Mask Layers:"))
col.prop(rl, "layers_zmask", text="")
layout.separator()
- layout.label(text="Include:")
+ layout.label(text=_("Include:"))
split = layout.split()
col = split.column()
col.prop(rl, "use_zmask")
row = col.row()
- row.prop(rl, "invert_zmask", text="Negate")
+ row.prop(rl, "invert_zmask", text=_("Negate"))
row.active = rl.use_zmask
col.prop(rl, "use_all_z")
@@ -133,7 +134,7 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.label(text="Passes:")
+ col.label(text=_("Passes:"))
col.prop(rl, "use_pass_combined")
col.prop(rl, "use_pass_z")
col.prop(rl, "use_pass_vector")
@@ -174,7 +175,7 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel):
class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Dimensions"
+ bl_label = _("Dimensions")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
@@ -192,29 +193,29 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
col = split.column()
sub = col.column(align=True)
- sub.label(text="Resolution:")
+ sub.label(text=_("Resolution:"))
sub.prop(rd, "resolution_x", text="X")
sub.prop(rd, "resolution_y", text="Y")
sub.prop(rd, "resolution_percentage", text="")
- sub.label(text="Aspect Ratio:")
+ sub.label(text=_("Aspect Ratio:"))
sub.prop(rd, "pixel_aspect_x", text="X")
sub.prop(rd, "pixel_aspect_y", text="Y")
row = col.row()
- row.prop(rd, "use_border", text="Border")
+ row.prop(rd, "use_border", text=_("Border"))
sub = row.row()
sub.active = rd.use_border
- sub.prop(rd, "use_crop_to_border", text="Crop")
+ sub.prop(rd, "use_crop_to_border", text=_("Crop"))
col = split.column()
sub = col.column(align=True)
- sub.label(text="Frame Range:")
- sub.prop(scene, "frame_start", text="Start")
- sub.prop(scene, "frame_end", text="End")
- sub.prop(scene, "frame_step", text="Step")
+ sub.label(text=_("Frame Range:"))
+ sub.prop(scene, "frame_start", text=_("Start"))
+ sub.prop(scene, "frame_end", text=_("End"))
+ sub.prop(scene, "frame_step", text=_("Step"))
- sub.label(text="Frame Rate:")
+ sub.label(text=_("Frame Rate:"))
if rd.fps_base == 1:
fps_rate = round(rd.fps / rd.fps_base)
else:
@@ -224,7 +225,7 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
custom_framerate = (fps_rate not in {23.98, 24, 25, 29.97, 30, 50, 59.94, 60})
if custom_framerate == True:
- fps_label_text = "Custom (" + str(fps_rate) + " fps)"
+ fps_label_text = _("Custom (") + str(fps_rate) + " fps)"
else:
fps_label_text = str(fps_rate) + " fps"
@@ -234,14 +235,14 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel):
sub.prop(rd, "fps")
sub.prop(rd, "fps_base", text="/")
subrow = sub.row(align=True)
- subrow.label(text="Time Remapping:")
+ subrow.label(text=_("Time Remapping:"))
subrow = sub.row(align=True)
- subrow.prop(rd, "frame_map_old", text="Old")
- subrow.prop(rd, "frame_map_new", text="New")
+ subrow.prop(rd, "frame_map_old", text=_("Old"))
+ subrow.prop(rd, "frame_map_new", text=_("New"))
class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Anti-Aliasing"
+ bl_label = _("Anti-Aliasing")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw_header(self, context):
@@ -265,11 +266,11 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel):
col = split.column()
col.prop(rd, "pixel_filter_type", text="")
- col.prop(rd, "filter_size", text="Size")
+ col.prop(rd, "filter_size", text=_("Size"))
class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Sampled Motion Blur"
+ bl_label = _("Sampled Motion Blur")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -295,7 +296,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel):
class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Shading"
+ bl_label = _("Shading")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -307,19 +308,19 @@ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.prop(rd, "use_textures", text="Textures")
- col.prop(rd, "use_shadows", text="Shadows")
- col.prop(rd, "use_sss", text="Subsurface Scattering")
- col.prop(rd, "use_envmaps", text="Environment Map")
+ col.prop(rd, "use_textures", text=_("Textures"))
+ col.prop(rd, "use_shadows", text=_("Shadows"))
+ col.prop(rd, "use_sss", text=_("Subsurface Scattering"))
+ col.prop(rd, "use_envmaps", text=_("Environment Map"))
col = split.column()
- col.prop(rd, "use_raytrace", text="Ray Tracing")
+ col.prop(rd, "use_raytrace", text=_("Ray Tracing"))
col.prop(rd, "use_color_management")
- col.prop(rd, "alpha_mode", text="Alpha")
+ col.prop(rd, "alpha_mode", text=_("Alpha"))
class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Performance"
+ bl_label = _("Performance")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -331,18 +332,18 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.label(text="Threads:")
+ col.label(text=_("Threads:"))
col.row().prop(rd, "threads_mode", expand=True)
sub = col.column()
sub.enabled = rd.threads_mode == 'FIXED'
sub.prop(rd, "threads")
sub = col.column(align=True)
- sub.label(text="Tiles:")
+ sub.label(text=_("Tiles:"))
sub.prop(rd, "parts_x", text="X")
sub.prop(rd, "parts_y", text="Y")
col = split.column()
- col.label(text="Memory:")
+ col.label(text=_("Memory:"))
sub = col.column()
sub.enabled = not (rd.use_border or rd.use_full_sample)
sub.prop(rd, "use_save_buffers")
@@ -352,17 +353,17 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel):
sub.prop(rd, "use_free_unused_nodes")
sub = col.column()
sub.active = rd.use_raytrace
- sub.label(text="Acceleration structure:")
+ sub.label(text=_("Acceleration structure:"))
sub.prop(rd, "raytrace_method", text="")
if rd.raytrace_method == 'OCTREE':
- sub.prop(rd, "octree_resolution", text="Resolution")
+ sub.prop(rd, "octree_resolution", text=_("Resolution"))
else:
- sub.prop(rd, "use_instances", text="Instances")
- sub.prop(rd, "use_local_coords", text="Local Coordinates")
+ sub.prop(rd, "use_instances", text=_("Instances"))
+ sub.prop(rd, "use_local_coords", text=_("Local Coordinates"))
class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Post Processing"
+ bl_label = _("Post Processing")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -377,29 +378,29 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel):
col.prop(rd, "use_compositing")
col.prop(rd, "use_sequencer")
- split.prop(rd, "dither_intensity", text="Dither", slider=True)
+ split.prop(rd, "dither_intensity", text=_("Dither"), slider=True)
layout.separator()
split = layout.split()
col = split.column()
- col.prop(rd, "use_fields", text="Fields")
+ col.prop(rd, "use_fields", text=_("Fields"))
sub = col.column()
sub.active = rd.use_fields
sub.row().prop(rd, "field_order", expand=True)
- sub.prop(rd, "use_fields_still", text="Still")
+ sub.prop(rd, "use_fields_still", text=_("Still"))
col = split.column()
col.prop(rd, "use_edge_enhance")
sub = col.column()
sub.active = rd.use_edge_enhance
- sub.prop(rd, "edge_threshold", text="Threshold", slider=True)
+ sub.prop(rd, "edge_threshold", text=_("Threshold"), slider=True)
sub.prop(rd, "edge_color", text="")
class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Stamp"
+ bl_label = _("Stamp")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -418,33 +419,33 @@ class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.prop(rd, "use_stamp_time", text="Time")
- col.prop(rd, "use_stamp_date", text="Date")
- col.prop(rd, "use_stamp_render_time", text="RenderTime")
- col.prop(rd, "use_stamp_frame", text="Frame")
- col.prop(rd, "use_stamp_scene", text="Scene")
- col.prop(rd, "use_stamp_camera", text="Camera")
- col.prop(rd, "use_stamp_lens", text="Lens")
- col.prop(rd, "use_stamp_filename", text="Filename")
- col.prop(rd, "use_stamp_marker", text="Marker")
- col.prop(rd, "use_stamp_sequencer_strip", text="Seq. Strip")
+ col.prop(rd, "use_stamp_time", text=_("Time"))
+ col.prop(rd, "use_stamp_date", text=_("Date"))
+ col.prop(rd, "use_stamp_render_time", text=_("RenderTime"))
+ col.prop(rd, "use_stamp_frame", text=_("Frame"))
+ col.prop(rd, "use_stamp_scene", text=_("Scene"))
+ col.prop(rd, "use_stamp_camera", text=_("Camera"))
+ col.prop(rd, "use_stamp_lens", text=_("Lens"))
+ col.prop(rd, "use_stamp_filename", text=_("Filename"))
+ col.prop(rd, "use_stamp_marker", text=_("Marker"))
+ col.prop(rd, "use_stamp_sequencer_strip", text=_("Seq. Strip"))
col = split.column()
col.active = rd.use_stamp
col.prop(rd, "stamp_foreground", slider=True)
col.prop(rd, "stamp_background", slider=True)
col.separator()
- col.prop(rd, "stamp_font_size", text="Font Size")
+ col.prop(rd, "stamp_font_size", text=_("Font Size"))
row = layout.split(percentage=0.2)
- row.prop(rd, "use_stamp_note", text="Note")
+ row.prop(rd, "use_stamp_note", text=_("Note"))
sub = row.row()
sub.active = rd.use_stamp_note
sub.prop(rd, "stamp_note_text", text="")
class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Output"
+ bl_label = _("Output")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
@@ -459,7 +460,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
col = split.column()
col.prop(rd, "file_format", text="")
- col.row().prop(rd, "color_mode", text="Color", expand=True)
+ col.row().prop(rd, "color_mode", text=_("Color"), expand=True)
col = split.column()
col.prop(rd, "use_file_extension")
@@ -470,11 +471,11 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
layout.prop(rd, "file_quality", slider=True)
if file_format == 'PNG':
- layout.prop(rd, "file_quality", slider=True, text="Compression")
+ layout.prop(rd, "file_quality", slider=True, text=_("Compression"))
if file_format in {'OPEN_EXR', 'MULTILAYER'}:
row = layout.row()
- row.prop(rd, "exr_codec", text="Codec")
+ row.prop(rd, "exr_codec", text=_("Codec"))
if file_format == 'OPEN_EXR':
row = layout.row()
@@ -485,7 +486,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
elif file_format == 'JPEG2000':
split = layout.split()
col = split.column()
- col.label(text="Depth:")
+ col.label(text=_("Depth:"))
col.row().prop(rd, "jpeg2k_depth", expand=True)
col = split.column()
@@ -516,11 +517,11 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
elif file_format == 'QUICKTIME_QTKIT':
split = layout.split()
col = split.column()
- col.prop(rd, "quicktime_codec_type", text="Video Codec")
- col.prop(rd, "quicktime_codec_spatial_quality", text="Quality")
+ col.prop(rd, "quicktime_codec_type", text=_("Video Codec"))
+ col.prop(rd, "quicktime_codec_spatial_quality", text=_("Quality"))
# Audio
- col.prop(rd, "quicktime_audiocodec_type", text="Audio Codec")
+ col.prop(rd, "quicktime_audiocodec_type", text=_("Audio Codec"))
if rd.quicktime_audiocodec_type != 'No audio':
split = layout.split()
if rd.quicktime_audiocodec_type == 'LPCM':
@@ -544,7 +545,7 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel):
class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Encoding"
+ bl_label = _("Encoding")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -558,7 +559,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
rd = context.scene.render
- layout.menu("RENDER_MT_ffmpeg_presets", text="Presets")
+ layout.menu("RENDER_MT_ffmpeg_presets", text=_("Presets"))
split = layout.split()
split.prop(rd, "ffmpeg_format")
@@ -574,22 +575,22 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
split = layout.split()
col = split.column()
- col.label(text="Rate:")
- col.prop(rd, "ffmpeg_minrate", text="Minimum")
- col.prop(rd, "ffmpeg_maxrate", text="Maximum")
- col.prop(rd, "ffmpeg_buffersize", text="Buffer")
+ col.label(text=_("Rate:"))
+ col.prop(rd, "ffmpeg_minrate", text=_("Minimum"))
+ col.prop(rd, "ffmpeg_maxrate", text=_("Maximum"))
+ col.prop(rd, "ffmpeg_buffersize", text=_("Buffer"))
col = split.column()
col.prop(rd, "ffmpeg_autosplit")
- col.label(text="Mux:")
- col.prop(rd, "ffmpeg_muxrate", text="Rate")
- col.prop(rd, "ffmpeg_packetsize", text="Packet Size")
+ col.label(text=_("Mux:"))
+ col.prop(rd, "ffmpeg_muxrate", text=_("Rate"))
+ col.prop(rd, "ffmpeg_packetsize", text=_("Packet Size"))
layout.separator()
# Audio:
if rd.ffmpeg_format not in {'MP3'}:
- layout.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
+ layout.prop(rd, "ffmpeg_audio_codec", text=_("Audio Codec"))
split = layout.split()
@@ -601,7 +602,7 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel):
class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
- bl_label = "Bake"
+ bl_label = _("Bake")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -635,7 +636,7 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel):
col = split.column()
col.prop(rd, "use_bake_clear")
col.prop(rd, "bake_margin")
- col.prop(rd, "bake_quad_split", text="Split")
+ col.prop(rd, "bake_quad_split", text=_("Split"))
col = split.column()
col.prop(rd, "use_bake_selected_to_active")
diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py
index 7ca8818cbd2..8cb37a0b987 100644
--- a/release/scripts/startup/bl_ui/properties_texture.py
+++ b/release/scripts/startup/bl_ui/properties_texture.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from rna_prop_ui import PropertyPanel
+from blf import gettext as _
class TEXTURE_MT_specials(bpy.types.Menu):
@@ -370,7 +371,7 @@ class TEXTURE_PT_image(TextureTypePanel, bpy.types.Panel):
def texture_filter_common(tex, layout):
- layout.label(text="Filter:")
+ layout.label(text=_("Filter:"))
layout.prop(tex, "filter_type", text="")
if tex.use_mipmap and tex.filter_type in {'AREA', 'EWA', 'FELINE'}:
if tex.filter_type == 'FELINE':
diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py
index 0272667e754..63f8e88147b 100644
--- a/release/scripts/startup/bl_ui/properties_world.py
+++ b/release/scripts/startup/bl_ui/properties_world.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from rna_prop_ui import PropertyPanel
+from blf import gettext as _
class WorldButtonsPanel():
@@ -62,7 +63,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
- bl_label = "Preview"
+ bl_label = _("Preview")
COMPAT_ENGINES = {'BLENDER_RENDER'}
@classmethod
@@ -75,7 +76,7 @@ class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
- bl_label = "World"
+ bl_label = _("World")
COMPAT_ENGINES = {'BLENDER_RENDER'}
def draw(self, context):
@@ -100,7 +101,7 @@ class WORLD_PT_world(WorldButtonsPanel, bpy.types.Panel):
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):
@@ -114,12 +115,12 @@ class WORLD_PT_ambient_occlusion(WorldButtonsPanel, bpy.types.Panel):
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):
@@ -133,12 +134,12 @@ class WORLD_PT_environment_lighting(WorldButtonsPanel, bpy.types.Panel):
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):
@@ -152,15 +153,15 @@ class WORLD_PT_indirect_lighting(WorldButtonsPanel, bpy.types.Panel):
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):
@@ -174,18 +175,18 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
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()
@@ -200,15 +201,15 @@ class WORLD_PT_gather(WorldButtonsPanel, bpy.types.Panel):
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'}
@@ -237,7 +238,7 @@ class WORLD_PT_mist(WorldButtonsPanel, bpy.types.Panel):
class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
- bl_label = "Stars"
+ bl_label = _("Stars")
bl_options = {'DEFAULT_CLOSED'}
COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -256,11 +257,11 @@ class WORLD_PT_stars(WorldButtonsPanel, bpy.types.Panel):
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):
diff --git a/release/scripts/startup/bl_ui/space_console.py b/release/scripts/startup/bl_ui/space_console.py
index da6c102100b..7e4c84d5afc 100644
--- a/release/scripts/startup/bl_ui/space_console.py
+++ b/release/scripts/startup/bl_ui/space_console.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.props import StringProperty
+from blf import gettext as _
class CONSOLE_HT_header(bpy.types.Header):
@@ -35,11 +36,11 @@ class CONSOLE_HT_header(bpy.types.Header):
sub.menu("CONSOLE_MT_console")
row = layout.row(align=True)
- row.operator("console.autocomplete", text="Autocomplete")
+ row.operator("console.autocomplete", text=_("Autocomplete"))
class CONSOLE_MT_console(bpy.types.Menu):
- bl_label = "Console"
+ bl_label = _("Console")
def draw(self, context):
layout = self.layout
@@ -56,7 +57,7 @@ class CONSOLE_MT_console(bpy.types.Menu):
class CONSOLE_MT_language(bpy.types.Menu):
- bl_label = "Languages..."
+ bl_label = _("Languages...")
def draw(self, context):
import sys
@@ -85,7 +86,7 @@ def add_scrollback(text, text_type):
class ConsoleExec(bpy.types.Operator):
'''Execute the current console line as a python expression'''
bl_idname = "console.execute"
- bl_label = "Console Execute"
+ bl_label = _("Console Execute")
def execute(self, context):
sc = context.space_data
@@ -103,7 +104,7 @@ class ConsoleExec(bpy.types.Operator):
class ConsoleAutocomplete(bpy.types.Operator):
'''Evaluate the namespace up until the cursor and give a list of options or complete the name if there is only one'''
bl_idname = "console.autocomplete"
- bl_label = "Console Autocomplete"
+ bl_label = _("Console Autocomplete")
def execute(self, context):
sc = context.space_data
@@ -120,7 +121,7 @@ class ConsoleAutocomplete(bpy.types.Operator):
class ConsoleBanner(bpy.types.Operator):
'''Print a message whem the terminal initializes'''
bl_idname = "console.banner"
- bl_label = "Console Banner"
+ bl_label = _("Console Banner")
def execute(self, context):
sc = context.space_data
@@ -142,7 +143,7 @@ class ConsoleBanner(bpy.types.Operator):
class ConsoleLanguage(bpy.types.Operator):
'''Set the current language for this console'''
bl_idname = "console.language"
- bl_label = "Console Language"
+ bl_label = _("Console Language")
language = StringProperty(name="Language", maxlen=32, default="")
def execute(self, 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 fa5579ea2e0..15ba638dffb 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
@@ -204,35 +205,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
@@ -258,7 +259,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()
@@ -287,7 +288,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
@@ -298,32 +299,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"
@@ -355,9 +356,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")
@@ -415,7 +416,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):
@@ -434,7 +435,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):
@@ -457,9 +458,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)
@@ -478,7 +479,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):
@@ -497,7 +498,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):
@@ -517,7 +518,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):
@@ -535,7 +536,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):
@@ -553,7 +554,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):
@@ -574,7 +575,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):
@@ -593,22 +594,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="")
@@ -620,11 +621,11 @@ class IMAGE_PT_view_properties(bpy.types.Panel):
split = layout.split()
col = split.column()
col.prop(uvedit, "show_faces")
- 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 = 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)
@@ -633,7 +634,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):
@@ -667,16 +668,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):
@@ -691,7 +692,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):
@@ -711,7 +712,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):
@@ -728,14 +729,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_info.py b/release/scripts/startup/bl_ui/space_info.py
index cda37b3119a..fadd3ec73be 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -18,6 +18,7 @@
# <pep8 compliant>
import bpy
+from blf import gettext as _
class INFO_HT_header(bpy.types.Header):
@@ -44,7 +45,7 @@ class INFO_HT_header(bpy.types.Header):
sub.menu("INFO_MT_help")
if window.screen.show_fullscreen:
- layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text="Back to Previous")
+ layout.operator("screen.back_to_previous", icon='SCREEN_BACK', text=_("Back to Previous"))
layout.separator()
else:
layout.template_ID(context.window, "screen", new="screen.new", unlink="screen.delete")
@@ -72,11 +73,11 @@ class INFO_HT_header(bpy.types.Header):
"""
sinfo = context.space_data
row = layout.row(align=True)
- row.prop(sinfo, "show_report_debug", text="Debug")
- row.prop(sinfo, "show_report_info", text="Info")
- row.prop(sinfo, "show_report_operator", text="Operators")
- row.prop(sinfo, "show_report_warning", text="Warnings")
- row.prop(sinfo, "show_report_error", text="Errors")
+ row.prop(sinfo, "show_report_debug", text=_("Debug"))
+ row.prop(sinfo, "show_report_info", text=_("Info"))
+ row.prop(sinfo, "show_report_operator", text=_("Operators"))
+ row.prop(sinfo, "show_report_warning", text=_("Warnings"))
+ row.prop(sinfo, "show_report_error", text=_("Errors"))
row = layout.row()
row.enabled = sinfo.show_report_operator
@@ -87,7 +88,7 @@ class INFO_HT_header(bpy.types.Header):
class INFO_MT_report(bpy.types.Menu):
- bl_label = "Report"
+ bl_label = _("Report")
def draw(self, context):
layout = self.layout
@@ -99,31 +100,31 @@ class INFO_MT_report(bpy.types.Menu):
class INFO_MT_file(bpy.types.Menu):
- bl_label = "File"
+ bl_label = _("File");
def draw(self, context):
layout = self.layout
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.read_homefile", text="New", icon='NEW')
+ layout.operator("wm.read_homefile", text=_("New"), icon='NEW')
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.open_mainfile", text="Open...", icon='FILE_FOLDER')
+ layout.operator("wm.open_mainfile", text=_("Open..."), icon='FILE_FOLDER')
layout.menu("INFO_MT_file_open_recent")
layout.operator("wm.recover_last_session", icon='RECOVER_LAST')
- layout.operator("wm.recover_auto_save", text="Recover Auto Save...")
+ layout.operator("wm.recover_auto_save", text=_("Recover Auto Save..."))
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_mainfile", text="Save", icon='FILE_TICK').check_existing = False
+ layout.operator("wm.save_mainfile", text=_("Save"), icon='FILE_TICK').check_existing = False
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_as_mainfile", text="Save As...")
+ layout.operator("wm.save_as_mainfile", text=_("Save As..."))
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.save_as_mainfile", text="Save Copy...").copy = True
+ layout.operator("wm.save_as_mainfile", text=_("Save Copy...")).copy = True
layout.separator()
- layout.operator("screen.userpref_show", text="User Preferences...", icon='PREFERENCES')
+ layout.operator("screen.userpref_show", text=_("User Preferences..."), icon='PREFERENCES')
layout.operator_context = 'EXEC_AREA'
layout.operator("wm.save_homefile")
@@ -132,8 +133,8 @@ class INFO_MT_file(bpy.types.Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("wm.link_append", text="Link")
- props = layout.operator("wm.link_append", text="Append")
+ layout.operator("wm.link_append", text=_("Link"))
+ props = layout.operator("wm.link_append", text=_("Append"))
props.link = False
props.instance_groups = False
@@ -149,12 +150,12 @@ class INFO_MT_file(bpy.types.Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.quit_blender", text="Quit", icon='QUIT')
+ layout.operator("wm.quit_blender", text=_("Quit"), icon='QUIT')
class INFO_MT_file_import(bpy.types.Menu):
bl_idname = "INFO_MT_file_import"
- bl_label = "Import"
+ bl_label = _("Import")
def draw(self, context):
if hasattr(bpy.types, "WM_OT_collada_import"):
@@ -163,7 +164,7 @@ class INFO_MT_file_import(bpy.types.Menu):
class INFO_MT_file_export(bpy.types.Menu):
bl_idname = "INFO_MT_file_export"
- bl_label = "Export"
+ bl_label = _("Export")
def draw(self, context):
if hasattr(bpy.types, "WM_OT_collada_export"):
@@ -171,13 +172,13 @@ class INFO_MT_file_export(bpy.types.Menu):
class INFO_MT_file_external_data(bpy.types.Menu):
- bl_label = "External Data"
+ bl_label = _("External Data")
def draw(self, context):
layout = self.layout
- layout.operator("file.pack_all", text="Pack into .blend file")
- layout.operator("file.unpack_all", text="Unpack into Files")
+ layout.operator("file.pack_all", text=_("Pack into .blend file"))
+ layout.operator("file.unpack_all", text=_("Unpack into Files"))
layout.separator()
@@ -189,41 +190,41 @@ class INFO_MT_file_external_data(bpy.types.Menu):
class INFO_MT_mesh_add(bpy.types.Menu):
bl_idname = "INFO_MT_mesh_add"
- bl_label = "Mesh"
+ bl_label = _("Mesh")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text="Plane")
- layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text="Cube")
- layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text="Circle")
- layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text="UV Sphere")
- layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text="Icosphere")
- layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text="Cylinder")
- layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text="Cone")
+ layout.operator("mesh.primitive_plane_add", icon='MESH_PLANE', text=_("Plane"))
+ layout.operator("mesh.primitive_cube_add", icon='MESH_CUBE', text=_("Cube"))
+ layout.operator("mesh.primitive_circle_add", icon='MESH_CIRCLE', text=_("Circle"))
+ layout.operator("mesh.primitive_uv_sphere_add", icon='MESH_UVSPHERE', text=_("UV Sphere"))
+ layout.operator("mesh.primitive_ico_sphere_add", icon='MESH_ICOSPHERE', text=_("Icosphere"))
+ layout.operator("mesh.primitive_cylinder_add", icon='MESH_CYLINDER', text=_("Cylinder"))
+ layout.operator("mesh.primitive_cone_add", icon='MESH_CONE', text=_("Cone"))
layout.separator()
- layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text="Grid")
- layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text="Monkey")
- layout.operator("mesh.primitive_torus_add", text="Torus", icon='MESH_TORUS')
+ layout.operator("mesh.primitive_grid_add", icon='MESH_GRID', text=_("Grid"))
+ layout.operator("mesh.primitive_monkey_add", icon='MESH_MONKEY', text=_("Monkey"))
+ layout.operator("mesh.primitive_torus_add", text=_("Torus"), icon='MESH_TORUS')
class INFO_MT_curve_add(bpy.types.Menu):
bl_idname = "INFO_MT_curve_add"
- bl_label = "Curve"
+ bl_label = _("Curve")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text="Bezier")
- layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text="Circle")
- layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text="Nurbs Curve")
- layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text="Nurbs Circle")
- layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text="Path")
+ layout.operator("curve.primitive_bezier_curve_add", icon='CURVE_BEZCURVE', text=_("Bezier"))
+ layout.operator("curve.primitive_bezier_circle_add", icon='CURVE_BEZCIRCLE', text=_("Circle"))
+ layout.operator("curve.primitive_nurbs_curve_add", icon='CURVE_NCURVE', text=_("Nurbs Curve"))
+ layout.operator("curve.primitive_nurbs_circle_add", icon='CURVE_NCIRCLE', text=_("Nurbs Circle"))
+ layout.operator("curve.primitive_nurbs_path_add", icon='CURVE_PATH', text=_("Path"))
class INFO_MT_edit_curve_add(bpy.types.Menu):
bl_idname = "INFO_MT_edit_curve_add"
- bl_label = "Add"
+ bl_label = _("Add")
def draw(self, context):
is_surf = context.active_object.type == 'SURFACE'
@@ -239,71 +240,71 @@ class INFO_MT_edit_curve_add(bpy.types.Menu):
class INFO_MT_surface_add(bpy.types.Menu):
bl_idname = "INFO_MT_surface_add"
- bl_label = "Surface"
+ bl_label = _("Surface")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text="NURBS Curve")
- layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text="NURBS Circle")
- layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text="NURBS Surface")
- layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text="NURBS Cylinder")
- layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text="NURBS Sphere")
- layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text="NURBS Torus")
+ layout.operator("surface.primitive_nurbs_surface_curve_add", icon='SURFACE_NCURVE', text=_("NURBS Curve"))
+ layout.operator("surface.primitive_nurbs_surface_circle_add", icon='SURFACE_NCIRCLE', text=_("NURBS Circle"))
+ layout.operator("surface.primitive_nurbs_surface_surface_add", icon='SURFACE_NSURFACE', text=_("NURBS Surface"))
+ layout.operator("surface.primitive_nurbs_surface_cylinder_add", icon='SURFACE_NCYLINDER', text=_("NURBS Cylinder"))
+ layout.operator("surface.primitive_nurbs_surface_sphere_add", icon='SURFACE_NSPHERE', text=_("NURBS Sphere"))
+ layout.operator("surface.primitive_nurbs_surface_torus_add", icon='SURFACE_NTORUS', text=_("NURBS Torus"))
class INFO_MT_armature_add(bpy.types.Menu):
bl_idname = "INFO_MT_armature_add"
- bl_label = "Armature"
+ bl_label = _("Armature")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("object.armature_add", text="Single Bone", icon='BONE_DATA')
+ layout.operator("object.armature_add", text=_("Single Bone"), icon='BONE_DATA')
class INFO_MT_add(bpy.types.Menu):
- bl_label = "Add"
+ bl_label = _("Add")
def draw(self, context):
layout = self.layout
layout.operator_context = 'EXEC_SCREEN'
- #layout.operator_menu_enum("object.mesh_add", "type", text="Mesh", icon='OUTLINER_OB_MESH')
+ #layout.operator_menu_enum("object.mesh_add", "type", text=_("Mesh"), icon='OUTLINER_OB_MESH')
layout.menu("INFO_MT_mesh_add", icon='OUTLINER_OB_MESH')
- #layout.operator_menu_enum("object.curve_add", "type", text="Curve", icon='OUTLINER_OB_CURVE')
+ #layout.operator_menu_enum("object.curve_add", "type", text=_("Curve"), icon='OUTLINER_OB_CURVE')
layout.menu("INFO_MT_curve_add", icon='OUTLINER_OB_CURVE')
- #layout.operator_menu_enum("object.surface_add", "type", text="Surface", icon='OUTLINER_OB_SURFACE')
+ #layout.operator_menu_enum("object.surface_add", "type", text=_("Surface"), icon='OUTLINER_OB_SURFACE')
layout.menu("INFO_MT_surface_add", icon='OUTLINER_OB_SURFACE')
- layout.operator_menu_enum("object.metaball_add", "type", text="Metaball", icon='OUTLINER_OB_META')
+ layout.operator_menu_enum("object.metaball_add", "type", text=_("Metaball"), icon='OUTLINER_OB_META')
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("object.text_add", text="Text", icon='OUTLINER_OB_FONT')
+ layout.operator("object.text_add", text=_("Text"), icon='OUTLINER_OB_FONT')
layout.separator()
layout.menu("INFO_MT_armature_add", icon='OUTLINER_OB_ARMATURE')
- layout.operator("object.add", text="Lattice", icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
- layout.operator("object.add", text="Empty", icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
+ layout.operator("object.add", text=_("Lattice"), icon='OUTLINER_OB_LATTICE').type = 'LATTICE'
+ layout.operator("object.add", text=_("Empty"), icon='OUTLINER_OB_EMPTY').type = 'EMPTY'
layout.separator()
- layout.operator("object.camera_add", text="Camera", icon='OUTLINER_OB_CAMERA')
+ layout.operator("object.camera_add", text=_("Camera"), icon='OUTLINER_OB_CAMERA')
layout.operator_context = 'EXEC_SCREEN'
- layout.operator_menu_enum("object.lamp_add", "type", text="Lamp", icon='OUTLINER_OB_LAMP')
+ layout.operator_menu_enum("object.lamp_add", "type", text=_("Lamp"), icon='OUTLINER_OB_LAMP')
layout.separator()
- layout.operator_menu_enum("object.effector_add", "type", text="Force Field", icon='OUTLINER_OB_EMPTY')
+ layout.operator_menu_enum("object.effector_add", "type", text=_("Force Field"), icon='OUTLINER_OB_EMPTY')
layout.separator()
if(len(bpy.data.groups) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
- layout.operator("object.group_instance_add", text="Group Instance...", icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.group_instance_add", text=_("Group Instance..."), icon='OUTLINER_OB_EMPTY')
else:
- layout.operator_menu_enum("object.group_instance_add", "group", text="Group Instance", icon='OUTLINER_OB_EMPTY')
+ layout.operator_menu_enum("object.group_instance_add", "group", text=_("Group Instance"), icon='OUTLINER_OB_EMPTY')
class INFO_MT_game(bpy.types.Menu):
- bl_label = "Game"
+ bl_label = _("Game")
def draw(self, context):
layout = self.layout
@@ -324,18 +325,18 @@ class INFO_MT_game(bpy.types.Menu):
class INFO_MT_render(bpy.types.Menu):
- bl_label = "Render"
+ bl_label = _("Render")
def draw(self, context):
layout = self.layout
- layout.operator("render.render", text="Render Image", icon='RENDER_STILL')
- layout.operator("render.render", text="Render Animation", icon='RENDER_ANIMATION').animation = True
+ layout.operator("render.render", text=_("Render Image"), icon='RENDER_STILL')
+ layout.operator("render.render", text=_("Render Animation"), icon='RENDER_ANIMATION').animation = True
layout.separator()
- layout.operator("render.opengl", text="OpenGL Render Image")
- layout.operator("render.opengl", text="OpenGL Render Animation").animation = True
+ layout.operator("render.opengl", text=_("OpenGL Render Image"))
+ layout.operator("render.opengl", text=_("OpenGL Render Animation")).animation = True
layout.separator()
@@ -344,34 +345,34 @@ class INFO_MT_render(bpy.types.Menu):
class INFO_MT_help(bpy.types.Menu):
- bl_label = "Help"
+ bl_label = _("Help")
def draw(self, context):
import sys
layout = self.layout
- layout.operator("wm.url_open", text="Manual", icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
- layout.operator("wm.url_open", text="Release Log", icon='URL').url = 'http://www.blender.org/development/release-logs/blender-258/'
+ layout.operator("wm.url_open", text=_("Manual"), icon='HELP').url = 'http://wiki.blender.org/index.php/Doc:Manual'
+ layout.operator("wm.url_open", text=_("Release Log"), icon='URL').url = 'http://www.blender.org/development/release-logs/blender-257/'
layout.separator()
- layout.operator("wm.url_open", text="Blender Website", icon='URL').url = 'http://www.blender.org/'
- layout.operator("wm.url_open", text="Blender e-Shop", icon='URL').url = 'http://www.blender.org/e-shop'
- layout.operator("wm.url_open", text="Developer Community", icon='URL').url = 'http://www.blender.org/community/get-involved/'
- layout.operator("wm.url_open", text="User Community", icon='URL').url = 'http://www.blender.org/community/user-community/'
+ layout.operator("wm.url_open", text=_("Blender Website"), icon='URL').url = 'http://www.blender.org/'
+ layout.operator("wm.url_open", text=_("Blender e-Shop"), icon='URL').url = 'http://www.blender.org/e-shop'
+ layout.operator("wm.url_open", text=_("Developer Community"), icon='URL').url = 'http://www.blender.org/community/get-involved/'
+ layout.operator("wm.url_open", text=_("User Community"), icon='URL').url = 'http://www.blender.org/community/user-community/'
layout.separator()
- layout.operator("wm.url_open", text="Report a Bug", icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
+ layout.operator("wm.url_open", text=_("Report a Bug"), icon='URL').url = 'http://projects.blender.org/tracker/?atid=498&group_id=9&func=browse'
layout.separator()
- layout.operator("wm.url_open", text="Python API Reference", icon='URL').url = bpy.types.WM_OT_doc_view._prefix
+ layout.operator("wm.url_open", text=_("Python API Reference"), icon='URL').url = bpy.types.WM_OT_doc_view._prefix
layout.operator("help.operator_cheat_sheet", icon='TEXT')
layout.operator("wm.sysinfo", icon='TEXT')
layout.separator()
if sys.platform[:3] == "win":
layout.operator("wm.console_toggle", icon='CONSOLE')
layout.separator()
- layout.operator("anim.update_data_paths", text="FCurve/Driver Version fix", icon='HELP')
+ layout.operator("anim.update_data_paths", text=_("FCurve/Driver Version fix"), icon='HELP')
layout.separator()
layout.operator("wm.splash", icon='BLENDER')
@@ -381,7 +382,7 @@ class INFO_MT_help(bpy.types.Menu):
class HELP_OT_operator_cheat_sheet(bpy.types.Operator):
bl_idname = "help.operator_cheat_sheet"
- bl_label = "Operator Cheat Sheet"
+ bl_label = _("Operator Cheat Sheet")
def execute(self, context):
op_strings = []
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 831fd359782..b854d157fd0 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
@@ -142,7 +143,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()
@@ -168,7 +169,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):
@@ -185,13 +186,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_outliner.py b/release/scripts/startup/bl_ui/space_outliner.py
index 1f196cbd191..2ce2d05c58f 100644
--- a/release/scripts/startup/bl_ui/space_outliner.py
+++ b/release/scripts/startup/bl_ui/space_outliner.py
@@ -18,6 +18,7 @@
# <pep8 compliant>
import bpy
+from blf import gettext as _
class OUTLINER_HT_header(bpy.types.Header):
@@ -64,7 +65,7 @@ class OUTLINER_HT_header(bpy.types.Header):
class OUTLINER_MT_view(bpy.types.Menu):
- bl_label = "View"
+ bl_label = _("View")
def draw(self, context):
layout = self.layout
@@ -87,7 +88,7 @@ class OUTLINER_MT_view(bpy.types.Menu):
class OUTLINER_MT_search(bpy.types.Menu):
- bl_label = "Search"
+ bl_label = _("Search")
def draw(self, context):
layout = self.layout
@@ -101,7 +102,7 @@ class OUTLINER_MT_search(bpy.types.Menu):
class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
- bl_label = "Edit"
+ bl_label = _("Edit")
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index c477a2ff62b..1f9d45e9bc4 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
diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py
index b787fc5cf75..93e513acf0a 100644
--- a/release/scripts/startup/bl_ui/space_text.py
+++ b/release/scripts/startup/bl_ui/space_text.py
@@ -18,6 +18,7 @@
# <pep8-80 compliant>
import bpy
+from blf import gettext as _
class TEXT_HT_header(bpy.types.Header):
@@ -65,19 +66,19 @@ class TEXT_HT_header(bpy.types.Header):
row = layout.row()
if text.filepath:
if text.is_dirty:
- row.label(text="File: *%r (unsaved)" % text.filepath)
+ row.label(text=_("File")+": *%r " % text.filepath+_("(unsaved)"))
else:
- row.label(text="File: %r" % text.filepath)
+ row.label(text=_("File")+": %r" % text.filepath)
else:
- 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):
bl_space_type = 'TEXT_EDITOR'
bl_region_type = 'UI'
- bl_label = "Properties"
+ bl_label = _("Properties")
def draw(self, context):
layout = self.layout
@@ -108,7 +109,7 @@ class TEXT_PT_properties(bpy.types.Panel):
class TEXT_PT_find(bpy.types.Panel):
bl_space_type = 'TEXT_EDITOR'
bl_region_type = 'UI'
- bl_label = "Find"
+ bl_label = _("Find")
def draw(self, context):
layout = self.layout
@@ -135,12 +136,12 @@ class TEXT_PT_find(bpy.types.Panel):
# settings
layout.prop(st, "use_match_case")
row = layout.row()
- row.prop(st, "use_find_wrap", text="Wrap")
- row.prop(st, "use_find_all", text="All")
+ row.prop(st, "use_find_wrap", text=_("Wrap"))
+ row.prop(st, "use_find_all", text=_("All"))
class TEXT_MT_view(bpy.types.Menu):
- bl_label = "View"
+ bl_label = _("View")
def draw(self, context):
layout = self.layout
@@ -155,15 +156,15 @@ class TEXT_MT_view(bpy.types.Menu):
layout.separator()
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):
- bl_label = "Text"
+ bl_label = _("Text")
def draw(self, context):
layout = self.layout
@@ -195,7 +196,7 @@ class TEXT_MT_text(bpy.types.Menu):
class TEXT_MT_templates(bpy.types.Menu):
- bl_label = "Templates"
+ bl_label = _("Templates")
def draw(self, context):
self.path_menu(bpy.utils.script_paths("templates"),
@@ -205,7 +206,7 @@ class TEXT_MT_templates(bpy.types.Menu):
class TEXT_MT_edit_select(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -215,7 +216,7 @@ class TEXT_MT_edit_select(bpy.types.Menu):
class TEXT_MT_edit_markers(bpy.types.Menu):
- bl_label = "Markers"
+ bl_label = _("Markers")
def draw(self, context):
layout = self.layout
@@ -226,7 +227,7 @@ class TEXT_MT_edit_markers(bpy.types.Menu):
class TEXT_MT_format(bpy.types.Menu):
- bl_label = "Format"
+ bl_label = _("Format")
def draw(self, context):
layout = self.layout
@@ -245,21 +246,21 @@ class TEXT_MT_format(bpy.types.Menu):
class TEXT_MT_edit_to3d(bpy.types.Menu):
- bl_label = "Text To 3D Object"
+ bl_label = _("Text To 3D Object")
def draw(self, context):
layout = self.layout
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):
- bl_label = "Edit"
+ bl_label = _("Edit")
@classmethod
def poll(cls, context):
@@ -285,7 +286,7 @@ class TEXT_MT_edit(bpy.types.Menu):
layout.separator()
layout.operator("text.jump")
- layout.operator("text.properties", text="Find...")
+ layout.operator("text.properties", text=_("Find..."))
layout.separator()
diff --git a/release/scripts/startup/bl_ui/space_time.py b/release/scripts/startup/bl_ui/space_time.py
index 7e62465d1ee..d6d34eb8888 100644
--- a/release/scripts/startup/bl_ui/space_time.py
+++ b/release/scripts/startup/bl_ui/space_time.py
@@ -18,6 +18,7 @@
# <pep8 compliant>
import bpy
+from blf import gettext as _
class TIME_HT_header(bpy.types.Header):
@@ -43,11 +44,11 @@ class TIME_HT_header(bpy.types.Header):
row = layout.row(align=True)
if not scene.use_preview_range:
- row.prop(scene, "frame_start", text="Start")
- row.prop(scene, "frame_end", text="End")
+ row.prop(scene, "frame_start", text=_("Start"))
+ row.prop(scene, "frame_end", text=_("End"))
else:
- row.prop(scene, "frame_preview_start", text="Start")
- row.prop(scene, "frame_preview_end", text="End")
+ row.prop(scene, "frame_preview_start", text=_("Start"))
+ row.prop(scene, "frame_preview_end", text=_("End"))
layout.prop(scene, "frame_current", text="")
@@ -92,7 +93,7 @@ class TIME_HT_header(bpy.types.Header):
class TIME_MT_view(bpy.types.Menu):
- bl_label = "View"
+ bl_label = _("View")
def draw(self, context):
layout = self.layout
@@ -117,7 +118,7 @@ class TIME_MT_view(bpy.types.Menu):
class TIME_MT_cache(bpy.types.Menu):
- bl_label = "Cache"
+ bl_label = _("Cache")
def draw(self, context):
layout = self.layout
@@ -137,19 +138,19 @@ class TIME_MT_cache(bpy.types.Menu):
class TIME_MT_frame(bpy.types.Menu):
- bl_label = "Frame"
+ bl_label = _("Frame")
def draw(self, context):
layout = self.layout
- layout.operator("marker.add", text="Add Marker")
- layout.operator("marker.duplicate", text="Duplicate Marker")
- layout.operator("marker.delete", text="Delete Marker")
+ layout.operator("marker.add", text=_("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.separator()
@@ -163,7 +164,7 @@ class TIME_MT_frame(bpy.types.Menu):
class TIME_MT_playback(bpy.types.Menu):
- bl_label = "Playback"
+ bl_label = _("Playback")
def draw(self, context):
layout = self.layout
@@ -181,14 +182,14 @@ class TIME_MT_playback(bpy.types.Menu):
layout.separator()
- layout.prop(scene, "use_frame_drop", text="Frame Dropping")
- layout.prop(scene, "use_audio_sync", text="AV-sync", icon='SPEAKER')
+ layout.prop(scene, "use_frame_drop", text=_("Frame Dropping"))
+ layout.prop(scene, "use_audio_sync", text=_("AV-sync"), icon='SPEAKER')
layout.prop(scene, "use_audio")
layout.prop(scene, "use_audio_scrub")
class TIME_MT_autokey(bpy.types.Menu):
- bl_label = "Auto-Keyframing Mode"
+ bl_label = _("Auto-Keyframing Mode")
def draw(self, context):
layout = self.layout
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 139b3205835..fb5f2de7115 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -22,6 +22,7 @@ import os
import addon_utils
from bpy.props import StringProperty, BoolProperty, EnumProperty
+from blf import gettext as _
def ui_items_general(col, context):
@@ -64,10 +65,10 @@ def opengl_lamp_buttons(column, lamp):
col = split.column()
col.active = lamp.use
row = col.row()
- row.label(text="Diffuse:")
+ row.label(text=_("Diffuse:"))
row.prop(lamp, "diffuse_color", text="")
row = col.row()
- row.label(text="Specular:")
+ row.label(text=_("Specular:"))
row.prop(lamp, "specular_color", text="")
col = split.column()
@@ -85,7 +86,7 @@ class USERPREF_HT_header(bpy.types.Header):
userpref = context.user_preferences
layout.operator_context = 'EXEC_AREA'
- layout.operator("wm.save_homefile", text="Save As Default")
+ layout.operator("wm.save_homefile", text=_("Save As Default"))
layout.operator_context = 'INVOKE_DEFAULT'
@@ -114,7 +115,7 @@ class USERPREF_PT_tabs(bpy.types.Panel):
class USERPREF_MT_interaction_presets(bpy.types.Menu):
- bl_label = "Presets"
+ bl_label = _("Presets")
preset_subdir = "interaction"
preset_operator = "script.execute_preset"
draw = bpy.types.Menu.draw_preset
@@ -126,7 +127,7 @@ class USERPREF_MT_appconfigs(bpy.types.Menu):
preset_operator = "wm.appconfig_activate"
def draw(self, context):
- self.layout.operator("wm.appconfig_default", text="Blender (default)")
+ self.layout.operator("wm.appconfig_default", text=_("Blender (default)"))
# now draw the presets
bpy.types.Menu.draw_preset(self, context)
@@ -141,17 +142,17 @@ class USERPREF_MT_splash(bpy.types.Menu):
row = split.row()
row.label("")
row = split.row()
- row.label("Interaction:")
+ row.label(_("Interaction:"))
# XXX, no redraws
# text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
# if not text:
# text = "Blender (default)"
- row.menu("USERPREF_MT_appconfigs", text="Preset")
+ row.menu("USERPREF_MT_appconfigs", text=_("Preset"))
class USERPREF_PT_interface(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Interface"
+ bl_label = _("Interface")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -169,13 +170,13 @@ class USERPREF_PT_interface(bpy.types.Panel):
row = layout.row()
col = row.column()
- col.label(text="Display:")
+ col.label(text=_("Display:"))
col.prop(view, "show_tooltips")
col.prop(view, "show_tooltips_python")
- col.prop(view, "show_object_info", text="Object Info")
+ col.prop(view, "show_object_info", text=_("Object Info"))
col.prop(view, "show_large_cursors")
- col.prop(view, "show_view_name", text="View Name")
- col.prop(view, "show_playback_fps", text="Playback FPS")
+ col.prop(view, "show_view_name", text=_("View Name"))
+ col.prop(view, "show_playback_fps", text=_("Playback FPS"))
col.prop(view, "use_global_scene")
col.prop(view, "object_origin_size")
@@ -183,18 +184,18 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.separator()
col.separator()
- col.prop(view, "show_mini_axis", text="Display Mini Axis")
+ col.prop(view, "show_mini_axis", text=_("Display Mini Axis"))
sub = col.column()
sub.active = view.show_mini_axis
- sub.prop(view, "mini_axis_size", text="Size")
- sub.prop(view, "mini_axis_brightness", text="Brightness")
+ sub.prop(view, "mini_axis_size", text=_("Size"))
+ sub.prop(view, "mini_axis_brightness", text=_("Brightness"))
col.separator()
row.separator()
row.separator()
col = row.column()
- col.label(text="View Manipulation:")
+ col.label(text=_("View Manipulation:"))
col.prop(view, "use_mouse_auto_depth")
col.prop(view, "use_zoom_to_mouse")
col.prop(view, "use_rotate_around_active")
@@ -210,8 +211,8 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.separator()
col.separator()
- col.label(text="2D Viewports:")
- col.prop(view, "view2d_grid_spacing_min", text="Minimum Grid Spacing")
+ col.label(text=_("2D Viewports:"))
+ col.prop(view, "view2d_grid_spacing_min", text=_("Minimum Grid Spacing"))
col.prop(view, "timecode_style")
row.separator()
@@ -227,19 +228,19 @@ class USERPREF_PT_interface(bpy.types.Panel):
col.prop(view, "show_manipulator")
sub = col.column()
sub.active = view.show_manipulator
- sub.prop(view, "manipulator_size", text="Size")
- sub.prop(view, "manipulator_handle_size", text="Handle Size")
- sub.prop(view, "manipulator_hotspot", text="Hotspot")
+ sub.prop(view, "manipulator_size", text=_("Size"))
+ sub.prop(view, "manipulator_handle_size", text=_("Handle Size"))
+ sub.prop(view, "manipulator_hotspot", text=_("Hotspot"))
col.separator()
col.separator()
col.separator()
- col.label(text="Menus:")
+ col.label(text=_("Menus:"))
col.prop(view, "use_mouse_over_open")
- col.label(text="Menu Open Delay:")
- col.prop(view, "open_toplevel_delay", text="Top Level")
- col.prop(view, "open_sublevel_delay", text="Sub Level")
+ col.label(text=_("Menu Open Delay:"))
+ col.prop(view, "open_toplevel_delay", text=_("Top Level"))
+ col.prop(view, "open_sublevel_delay", text=_("Sub Level"))
col.separator()
@@ -248,7 +249,7 @@ class USERPREF_PT_interface(bpy.types.Panel):
class USERPREF_PT_edit(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Edit"
+ bl_label = _("Edit")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -266,102 +267,102 @@ class USERPREF_PT_edit(bpy.types.Panel):
row = layout.row()
col = row.column()
- col.label(text="Link Materials To:")
+ col.label(text=_("Link Materials To:"))
col.prop(edit, "material_link", text="")
col.separator()
col.separator()
col.separator()
- col.label(text="New Objects:")
+ col.label(text=_("New Objects:"))
col.prop(edit, "use_enter_edit_mode")
- col.label(text="Align To:")
+ col.label(text=_("Align To:"))
col.prop(edit, "object_align", text="")
col.separator()
col.separator()
col.separator()
- col.label(text="Undo:")
+ col.label(text=_("Undo:"))
col.prop(edit, "use_global_undo")
- col.prop(edit, "undo_steps", text="Steps")
- col.prop(edit, "undo_memory_limit", text="Memory Limit")
+ col.prop(edit, "undo_steps", text=_("Steps"))
+ col.prop(edit, "undo_memory_limit", text=_("Memory Limit"))
row.separator()
row.separator()
col = row.column()
- col.label(text="Grease Pencil:")
- col.prop(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
- col.prop(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
+ col.label(text=_("Grease Pencil:"))
+ col.prop(edit, "grease_pencil_manhattan_distance", text=_("Manhattan Distance"))
+ col.prop(edit, "grease_pencil_euclidean_distance", text=_("Euclidean Distance"))
#col.prop(edit, "use_grease_pencil_simplify_stroke", text="Simplify Stroke")
- col.prop(edit, "grease_pencil_eraser_radius", text="Eraser Radius")
- col.prop(edit, "use_grease_pencil_smooth_stroke", text="Smooth Stroke")
+ col.prop(edit, "grease_pencil_eraser_radius", text=_("Eraser Radius"))
+ col.prop(edit, "use_grease_pencil_smooth_stroke", text=_("Smooth Stroke"))
col.separator()
col.separator()
col.separator()
- col.label(text="Playback:")
+ col.label(text=_("Playback:"))
col.prop(edit, "use_negative_frames")
row.separator()
row.separator()
col = row.column()
- col.label(text="Keyframing:")
+ col.label(text=_("Keyframing:"))
col.prop(edit, "use_visual_keying")
- col.prop(edit, "use_keyframe_insert_needed", text="Only Insert Needed")
+ col.prop(edit, "use_keyframe_insert_needed", text=_("Only Insert Needed"))
col.separator()
- col.prop(edit, "use_auto_keying", text="Auto Keyframing:")
+ col.prop(edit, "use_auto_keying", text=_("Auto Keyframing:"))
sub = col.column()
# sub.active = edit.use_keyframe_insert_auto # incorrect, timeline can enable
- sub.prop(edit, "use_keyframe_insert_available", text="Only Insert Available")
+ sub.prop(edit, "use_keyframe_insert_available", text=_("Only Insert Available"))
col.separator()
- col.label(text="New F-Curve Defaults:")
- col.prop(edit, "keyframe_new_interpolation_type", text="Interpolation")
- col.prop(edit, "keyframe_new_handle_type", text="Handles")
- col.prop(edit, "use_insertkey_xyz_to_rgb", text="XYZ to RGB")
+ col.label(text=_("New F-Curve Defaults:"))
+ col.prop(edit, "keyframe_new_interpolation_type", text=_("Interpolation"))
+ col.prop(edit, "keyframe_new_handle_type", text=_("Handles"))
+ col.prop(edit, "use_insertkey_xyz_to_rgb", text=_("XYZ to RGB"))
col.separator()
col.separator()
col.separator()
- col.label(text="Transform:")
+ col.label(text=_("Transform:"))
col.prop(edit, "use_drag_immediately")
row.separator()
row.separator()
col = row.column()
- col.prop(edit, "sculpt_paint_overlay_color", text="Sculpt Overlay Color")
+ col.prop(edit, "sculpt_paint_overlay_color", text=_("Sculpt Overlay Color"))
col.separator()
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_action", text=_("Action"))
+ col.prop(edit, "use_duplicate_particle", text=_("Particle"))
class USERPREF_PT_system(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "System"
+ bl_label = _("System")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -383,11 +384,11 @@ class USERPREF_PT_system(bpy.types.Panel):
colsplit = column.split(percentage=0.85)
col = colsplit.column()
- col.label(text="General:")
+ col.label(text=_("General:"))
col.prop(system, "dpi")
col.prop(system, "frame_server_port")
- col.prop(system, "scrollback", text="Console Scrollback")
- col.prop(system, "author", text="Author")
+ col.prop(system, "scrollback", text=_("Console Scrollback"))
+ col.prop(system, "author", text=_("Author"))
col.prop(system, "use_scripts_auto_execute")
col.prop(system, "use_tabs_as_spaces")
@@ -395,21 +396,21 @@ class USERPREF_PT_system(bpy.types.Panel):
col.separator()
col.separator()
- col.label(text="Sound:")
+ col.label(text=_("Sound:"))
col.row().prop(system, "audio_device", expand=True)
sub = col.column()
sub.active = system.audio_device != 'NONE'
#sub.prop(system, "use_preview_images")
- sub.prop(system, "audio_channels", text="Channels")
- sub.prop(system, "audio_mixing_buffer", text="Mixing Buffer")
- sub.prop(system, "audio_sample_rate", text="Sample Rate")
- sub.prop(system, "audio_sample_format", text="Sample Format")
+ sub.prop(system, "audio_channels", text=_("Channels"))
+ sub.prop(system, "audio_mixing_buffer", text=_("Mixing Buffer"))
+ sub.prop(system, "audio_sample_rate", text=_("Sample Rate"))
+ sub.prop(system, "audio_sample_format", text=_("Sample Format"))
col.separator()
col.separator()
col.separator()
- col.label(text="Screencast:")
+ col.label(text=_("Screencast:"))
col.prop(system, "screencast_fps")
col.prop(system, "screencast_wait_time")
col.separator()
@@ -435,40 +436,40 @@ class USERPREF_PT_system(bpy.types.Panel):
colsplit = column.split(percentage=0.85)
col = colsplit.column()
- col.label(text="OpenGL:")
+ col.label(text=_("OpenGL:"))
col.prop(system, "gl_clip_alpha", slider=True)
col.prop(system, "use_mipmaps")
- col.label(text="Anisotropic Filtering")
+ col.label(text=_("Anisotropic Filtering"))
col.prop(system, "anisotropic_filter", text="")
col.prop(system, "use_vertex_buffer_objects")
#Anti-aliasing is disabled as it breaks broder/lasso select
#col.prop(system, "use_antialiasing")
- col.label(text="Window Draw Method:")
+ col.label(text=_("Window Draw Method:"))
col.prop(system, "window_draw_method", text="")
- col.label(text="Text Draw Options:")
+ col.label(text=_("Text Draw Options:"))
col.prop(system, "use_text_antialiasing")
- col.label(text="Textures:")
- col.prop(system, "gl_texture_limit", text="Limit Size")
- col.prop(system, "texture_time_out", text="Time Out")
- col.prop(system, "texture_collection_rate", text="Collection Rate")
+ col.label(text=_("Textures:"))
+ col.prop(system, "gl_texture_limit", text=_("Limit Size"))
+ col.prop(system, "texture_time_out", text=_("Time Out"))
+ col.prop(system, "texture_collection_rate", text=_("Collection Rate"))
col.separator()
col.separator()
col.separator()
- col.label(text="Sequencer:")
+ col.label(text=_("Sequencer:"))
col.prop(system, "prefetch_frames")
col.prop(system, "memory_cache_limit")
# 3. Column
column = split.column()
- column.label(text="Solid OpenGL lights:")
+ column.label(text=_("Solid OpenGL lights:"))
split = column.split(percentage=0.1)
split.label()
- split.label(text="Colors:")
- split.label(text="Direction:")
+ split.label(text=_("Colors:"))
+ split.label(text=_("Direction:"))
lamp = system.solid_lights[0]
opengl_lamp_buttons(column, lamp)
@@ -480,17 +481,16 @@ class USERPREF_PT_system(bpy.types.Panel):
opengl_lamp_buttons(column, lamp)
column.separator()
- column.separator()
- column.separator()
- column.label(text="Color Picker Type:")
+ column.label(text=_("Color Picker Type:"))
column.row().prop(system, "color_picker_type", text="")
- column.separator()
- column.separator()
+ column.label(text=_("Select Language:"))
+ column.row().prop(system, "language", text="")
+
column.separator()
- column.prop(system, "use_weight_color_range", text="Custom Weight Paint Range")
+ column.prop(system, "use_weight_color_range", text=_("Custom Weight Paint Range"))
sub = column.column()
sub.active = system.use_weight_color_range
sub.template_color_ramp(system, "weight_color_range", expand=True)
@@ -498,7 +498,7 @@ class USERPREF_PT_system(bpy.types.Panel):
class USERPREF_PT_theme(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Themes"
+ bl_label = _("Themes")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -556,71 +556,71 @@ class USERPREF_PT_theme(bpy.types.Panel):
col = split.column()
ui = theme.user_interface.wcol_regular
- col.label(text="Regular:")
+ col.label(text=_("Regular:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_tool
- col.label(text="Tool:")
+ col.label(text=_("Tool:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_radio
- col.label(text="Radio Buttons:")
+ col.label(text=_("Radio Buttons:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_text
- col.label(text="Text:")
+ col.label(text=_("Text:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_option
- col.label(text="Option:")
+ col.label(text=_("Option:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_toggle
- col.label(text="Toggle:")
+ col.label(text=_("Toggle:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_num
- col.label(text="Number Field:")
+ col.label(text=_("Number Field:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_numslider
- col.label(text="Value Slider:")
+ col.label(text=_("Value Slider:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_box
- col.label(text="Box:")
+ col.label(text=_("Box:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu
- col.label(text="Menu:")
+ col.label(text=_("Menu:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_pulldown
- col.label(text="Pulldown:")
+ col.label(text=_("Pulldown:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu_back
- col.label(text="Menu Back:")
+ col.label(text=_("Menu Back:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_menu_item
- col.label(text="Menu Item:")
+ col.label(text=_("Menu Item:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_scroll
- col.label(text="Scroll Bar:")
+ col.label(text=_("Scroll Bar:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_progress
- col.label(text="Progress Bar:")
+ col.label(text=_("Progress Bar:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_list_item
- col.label(text="List Item:")
+ col.label(text=_("List Item:"))
ui_items_general(col, ui)
ui = theme.user_interface.wcol_state
- col.label(text="State:")
+ col.label(text=_("State:"))
row = col.row()
@@ -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
row = col.row()
@@ -681,7 +681,7 @@ class USERPREF_PT_theme(bpy.types.Panel):
class USERPREF_PT_file(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Files"
+ bl_label = _("Files")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -699,22 +699,22 @@ class USERPREF_PT_file(bpy.types.Panel):
split = layout.split(percentage=0.7)
col = split.column()
- col.label(text="File Paths:")
+ col.label(text=_("File Paths:"))
colsplit = col.split(percentage=0.95)
col1 = colsplit.split(percentage=0.3)
sub = col1.column()
- sub.label(text="Fonts:")
- sub.label(text="Textures:")
- sub.label(text="Texture Plugins:")
- sub.label(text="Sequence Plugins:")
- sub.label(text="Render Output:")
- sub.label(text="Scripts:")
- sub.label(text="Sounds:")
- sub.label(text="Temp:")
- sub.label(text="Image Editor:")
- sub.label(text="Animation Player:")
+ sub.label(text=_("Fonts:"))
+ sub.label(text=_("Textures:"))
+ sub.label(text=_("Texture Plugins:"))
+ sub.label(text=_("Sequence Plugins:"))
+ sub.label(text=_("Render Output:"))
+ sub.label(text=_("Scripts:"))
+ sub.label(text=_("Sounds:"))
+ sub.label(text=_("Temp:"))
+ sub.label(text=_("Image Editor:"))
+ sub.label(text=_("Animation Player:"))
sub = col1.column()
sub.prop(paths, "font_directory", text="")
@@ -731,7 +731,7 @@ class USERPREF_PT_file(bpy.types.Panel):
subsplit.prop(paths, "animation_player", text="")
col = split.column()
- col.label(text="Save & Load:")
+ col.label(text=_("Save & Load:"))
col.prop(paths, "use_relative_paths")
col.prop(paths, "use_file_compression")
col.prop(paths, "use_load_ui")
@@ -746,18 +746,18 @@ class USERPREF_PT_file(bpy.types.Panel):
col.prop(paths, "save_version")
col.prop(paths, "recent_files")
col.prop(paths, "use_save_preview_images")
- col.label(text="Auto Save:")
+ col.label(text=_("Auto Save:"))
col.prop(paths, "use_auto_save_temporary_files")
sub = col.column()
sub.active = paths.use_auto_save_temporary_files
- sub.prop(paths, "auto_save_time", text="Timer (mins)")
+ sub.prop(paths, "auto_save_time", text=_("Timer (mins)"))
from bl_ui.space_userpref_keymap import InputKeyMapPanel
class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Input"
+ bl_label = _("Input")
@classmethod
def poll(cls, context):
@@ -770,7 +770,7 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
col = row.column()
sub = col.column()
- sub.label(text="Presets:")
+ sub.label(text=_("Presets:"))
subrow = sub.row(align=True)
subrow.menu("USERPREF_MT_interaction_presets", text=bpy.types.USERPREF_MT_interaction_presets.bl_label)
@@ -778,19 +778,19 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
subrow.operator("wm.interaction_preset_add", text="", icon='ZOOMOUT').remove_active = True
sub.separator()
- sub.label(text="Mouse:")
+ sub.label(text=_("Mouse:"))
sub1 = sub.column()
sub1.active = (inputs.select_mouse == 'RIGHT')
sub1.prop(inputs, "use_mouse_emulate_3_button")
sub.prop(inputs, "use_mouse_continuous")
sub.prop(inputs, "drag_threshold")
- sub.label(text="Select With:")
+ sub.label(text=_("Select With:"))
sub.row().prop(inputs, "select_mouse", expand=True)
sub = col.column()
- sub.label(text="Double Click:")
- sub.prop(inputs, "mouse_double_click_time", text="Speed")
+ sub.label(text=_("Double Click:"))
+ sub.prop(inputs, "mouse_double_click_time", text=_("Speed"))
sub.separator()
@@ -798,10 +798,10 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
sub.separator()
- sub.label(text="Orbit Style:")
+ sub.label(text=_("Orbit Style:"))
sub.row().prop(inputs, "view_rotate_method", expand=True)
- sub.label(text="Zoom Style:")
+ sub.label(text=_("Zoom Style:"))
sub.row().prop(inputs, "view_zoom_method", text="")
if inputs.view_zoom_method in {'DOLLY', 'CONTINUE'}:
sub.row().prop(inputs, "view_zoom_axis", expand=True)
@@ -812,8 +812,8 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
#col.separator()
sub = col.column()
- sub.label(text="Mouse Wheel:")
- sub.prop(inputs, "invert_zoom_wheel", text="Invert Wheel Zoom Direction")
+ sub.label(text=_("Mouse Wheel:"))
+ sub.prop(inputs, "invert_zoom_wheel", text=_("Invert Wheel Zoom Direction"))
#sub.prop(view, "wheel_scroll_lines", text="Scroll Lines")
col.separator()
@@ -849,19 +849,19 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
class USERPREF_MT_addons_dev_guides(bpy.types.Menu):
- bl_label = "Development Guides"
+ bl_label = _("Development Guides")
# menu to open webpages with addons development guides
def draw(self, context):
layout = self.layout
- layout.operator('wm.url_open', text='API Concepts', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
- layout.operator('wm.url_open', text='Addon Guidelines', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
- layout.operator('wm.url_open', text='How to share your addon', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
+ layout.operator('wm.url_open', text=_('API Concepts'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
+ layout.operator('wm.url_open', text=_('Addon Guidelines'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
+ layout.operator('wm.url_open', text=_('How to share your addon'), icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
class USERPREF_PT_addons(bpy.types.Panel):
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Addons"
+ bl_label = _("Addons")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -911,10 +911,10 @@ class USERPREF_PT_addons(bpy.types.Panel):
split = layout.split(percentage=0.2)
col = split.column()
col.prop(context.window_manager, "addon_search", text="", icon='VIEWZOOM')
- col.label(text="Categories")
+ col.label(text=_("Categories"))
col.prop(context.window_manager, "addon_filter", expand=True)
- col.label(text="Supported Level")
+ col.label(text=_("Supported Level"))
col.prop(context.window_manager, "addon_support", expand=True)
col = split.column()
@@ -985,23 +985,23 @@ class USERPREF_PT_addons(bpy.types.Panel):
if info["show_expanded"]:
if info["description"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Description:')
+ split.label(text=_('Description:'))
split.label(text=info["description"])
if info["location"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Location:')
+ split.label(text=_('Location:'))
split.label(text=info["location"])
if info["author"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Author:')
+ split.label(text=_('Author:'))
split.label(text=info["author"])
if info["version"]:
split = colsub.row().split(percentage=0.15)
- split.label(text='Version:')
+ split.label(text=_('Version:'))
split.label(text='.'.join(str(x) for x in info["version"]))
if info["warning"]:
split = colsub.row().split(percentage=0.15)
- split.label(text="Warning:")
+ split.label(text=_("Warning:"))
split.label(text=' ' + info["warning"], icon='ERROR')
user_addon = USERPREF_PT_addons.is_user_addon(mod, user_addon_paths)
@@ -1009,13 +1009,13 @@ class USERPREF_PT_addons(bpy.types.Panel):
if tot_row:
split = colsub.row().split(percentage=0.15)
- split.label(text="Internet:")
+ split.label(text=_("Internet:"))
if info["wiki_url"]:
- split.operator("wm.url_open", text="Link to the Wiki", icon='HELP').url = info["wiki_url"]
+ split.operator("wm.url_open", text=_("Link to the Wiki"), icon='HELP').url = info["wiki_url"]
if info["tracker_url"]:
- split.operator("wm.url_open", text="Report a Bug", icon='URL').url = info["tracker_url"]
+ split.operator("wm.url_open", text=_("Report a Bug"), icon='URL').url = info["tracker_url"]
if user_addon:
- split.operator("wm.addon_remove", text="Remove", icon='CANCEL').module = mod.__name__
+ split.operator("wm.addon_remove", text=_("Remove"), icon='CANCEL').module = mod.__name__
for i in range(4 - tot_row):
split.separator()
@@ -1028,7 +1028,7 @@ class USERPREF_PT_addons(bpy.types.Panel):
if missing_modules and filter in {"All", "Enabled"}:
col.column().separator()
- col.column().label(text="Missing script files")
+ col.column().label(text=_("Missing script files"))
module_names = {mod.__name__ for mod, info in addons}
for module_name in sorted(missing_modules):
@@ -1047,9 +1047,9 @@ class USERPREF_PT_addons(bpy.types.Panel):
class WM_OT_addon_enable(bpy.types.Operator):
"Enable an addon"
bl_idname = "wm.addon_enable"
- bl_label = "Enable Add-On"
+ bl_label = _("Enable Add-On")
- module = StringProperty(name="Module", description="Module name of the addon to enable")
+ module = StringProperty(name=_("Module"), description=_("Module name of the addon to enable"))
def execute(self, context):
mod = addon_utils.enable(self.module)
@@ -1068,9 +1068,9 @@ class WM_OT_addon_enable(bpy.types.Operator):
class WM_OT_addon_disable(bpy.types.Operator):
"Disable an addon"
bl_idname = "wm.addon_disable"
- bl_label = "Disable Add-On"
+ bl_label = _("Disable Add-On")
- module = StringProperty(name="Module", description="Module name of the addon to disable")
+ module = StringProperty(name=_("Module"), description=_("Module name of the addon to disable"))
def execute(self, context):
addon_utils.disable(self.module)
@@ -1080,17 +1080,17 @@ class WM_OT_addon_disable(bpy.types.Operator):
class WM_OT_addon_install(bpy.types.Operator):
"Install an addon"
bl_idname = "wm.addon_install"
- bl_label = "Install Add-On..."
+ bl_label = _("Install Add-On...")
- overwrite = BoolProperty(name="Overwrite", description="Remove existing addons with the same ID", default=True)
+ overwrite = BoolProperty(name=_("Overwrite"), description=_("Remove existing addons with the same ID"), default=True)
target = EnumProperty(
name="Target Path",
items=(('DEFAULT', "Default", ""),
('PREFS', "User Prefs", "")))
- filepath = StringProperty(name="File Path", description="File path to write file to")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
+ filepath = StringProperty(name=_("File Path"), description=_("File path to write file to"))
+ filter_folder = BoolProperty(name=_("Filter folders"), description="", default=True, options={'HIDDEN'})
+ filter_python = BoolProperty(name=_("Filter python"), description="", default=True, options={'HIDDEN'})
filter_glob = StringProperty(default="*.py;*.zip", options={'HIDDEN'})
@staticmethod
@@ -1226,7 +1226,7 @@ class WM_OT_addon_install(bpy.types.Operator):
class WM_OT_addon_remove(bpy.types.Operator):
"Disable an addon"
bl_idname = "wm.addon_remove"
- bl_label = "Remove Add-On"
+ bl_label = _("Remove Add-On")
module = StringProperty(name="Module", description="Module name of the addon to remove")
@@ -1276,7 +1276,7 @@ class WM_OT_addon_expand(bpy.types.Operator):
bl_idname = "wm.addon_expand"
bl_label = ""
- module = StringProperty(name="Module", description="Module name of the addon to expand")
+ module = StringProperty(name=_("Module"), description=_("Module name of the addon to expand"))
def execute(self, context):
module_name = self.module
diff --git a/release/scripts/startup/bl_ui/space_userpref_keymap.py b/release/scripts/startup/bl_ui/space_userpref_keymap.py
index 85764c55304..fde11a0ac29 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -19,91 +19,93 @@
# <pep8 compliant>
import bpy
import os
+from blf import gettext as _
+from blf import fake_gettext as N_
KM_HIERARCHY = [
- ('Window', 'EMPTY', 'WINDOW', []), # file save, window change, exit
- ('Screen', 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
- ('Screen Editing', 'EMPTY', 'WINDOW', []), # resizing, action corners
+ ( N_('Window'), 'EMPTY', 'WINDOW', []), # file save, window change, exit
+ ( N_('Screen'), 'EMPTY', 'WINDOW', [ # full screen, undo, screenshot
+ ( N_('Screen Editing'), 'EMPTY', 'WINDOW', []), # resizing, action corners
]),
- ('View2D', 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
- ('View2D Buttons List', 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
- ('Header', 'EMPTY', 'WINDOW', []), # header stuff (per region)
- ('Grease Pencil', 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
+ ( N_('View2D'), 'EMPTY', 'WINDOW', []), # view 2d navigation (per region)
+ ( N_('View2D Buttons List'), 'EMPTY', 'WINDOW', []), # view 2d with buttons navigation
+ ( N_('Header'), 'EMPTY', 'WINDOW', []), # header stuff (per region)
+ ( N_('Grease Pencil'), 'EMPTY', 'WINDOW', []), # grease pencil stuff (per region)
- ('3D View', 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
- ('Object Mode', 'EMPTY', 'WINDOW', []),
- ('Mesh', 'EMPTY', 'WINDOW', []),
- ('Curve', 'EMPTY', 'WINDOW', []),
- ('Armature', 'EMPTY', 'WINDOW', []),
- ('Metaball', 'EMPTY', 'WINDOW', []),
- ('Lattice', 'EMPTY', 'WINDOW', []),
- ('Font', 'EMPTY', 'WINDOW', []),
+ ( N_('3D View'), 'VIEW_3D', 'WINDOW', [ # view 3d navigation and generic stuff (select, transform)
+ ( N_('Object Mode'), 'EMPTY', 'WINDOW', []),
+ ( N_('Mesh'), 'EMPTY', 'WINDOW', []),
+ ( N_('Curve'), 'EMPTY', 'WINDOW', []),
+ ( N_('Armature'), 'EMPTY', 'WINDOW', []),
+ ( N_('Metaball'), 'EMPTY', 'WINDOW', []),
+ ( N_('Lattice'), 'EMPTY', 'WINDOW', []),
+ ( N_('Font'), 'EMPTY', 'WINDOW', []),
- ('Pose', 'EMPTY', 'WINDOW', []),
+ ( N_('Pose'), 'EMPTY', 'WINDOW', []),
- ('Vertex Paint', 'EMPTY', 'WINDOW', []),
- ('Weight Paint', 'EMPTY', 'WINDOW', []),
- ('Face Mask', 'EMPTY', 'WINDOW', []),
- ('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
- ('Sculpt', 'EMPTY', 'WINDOW', []),
+ ( N_('Vertex Paint'), 'EMPTY', 'WINDOW', []),
+ ( N_('Weight Paint'), 'EMPTY', 'WINDOW', []),
+ ( N_('Face Mask'), 'EMPTY', 'WINDOW', []),
+ ( N_('Image Paint'), 'EMPTY', 'WINDOW', []), # image and view3d
+ ( N_('Sculpt'), 'EMPTY', 'WINDOW', []),
- ('Armature Sketch', 'EMPTY', 'WINDOW', []),
- ('Particle', 'EMPTY', 'WINDOW', []),
+ ( N_('Armature Sketch'), 'EMPTY', 'WINDOW', []),
+ ( N_('Particle'), 'EMPTY', 'WINDOW', []),
- ('Object Non-modal', 'EMPTY', 'WINDOW', []), # mode change
+ ( N_('Object Non-modal'), 'EMPTY', 'WINDOW', []), # mode change
- ('3D View Generic', 'VIEW_3D', 'WINDOW', []) # toolbar and properties
+ ( N_('3D View Generic'), 'VIEW_3D', 'WINDOW', []) # toolbar and properties
]),
- ('Frames', 'EMPTY', 'WINDOW', []), # frame navigation (per region)
- ('Markers', 'EMPTY', 'WINDOW', []), # markers (per region)
- ('Animation', 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
- ('Animation Channels', 'EMPTY', 'WINDOW', []),
- ('Graph Editor', 'GRAPH_EDITOR', 'WINDOW', [
- ('Graph Editor Generic', 'GRAPH_EDITOR', 'WINDOW', [])
+ ( N_('Frames'), 'EMPTY', 'WINDOW', []), # frame navigation (per region)
+ ( N_('Markers'), 'EMPTY', 'WINDOW', []), # markers (per region)
+ ( N_('Animation'), 'EMPTY', 'WINDOW', []), # frame change on click, preview range (per region)
+ ( N_('Animation Channels'), 'EMPTY', 'WINDOW', []),
+ ( N_('Graph Editor'), 'GRAPH_EDITOR', 'WINDOW', [
+ ( N_('Graph Editor Generic'), 'GRAPH_EDITOR', 'WINDOW', [])
]),
- ('Dopesheet', 'DOPESHEET_EDITOR', 'WINDOW', []),
- ('NLA Editor', 'NLA_EDITOR', 'WINDOW', [
- ('NLA Channels', 'NLA_EDITOR', 'WINDOW', []),
- ('NLA Generic', 'NLA_EDITOR', 'WINDOW', [])
+ ( N_('Dopesheet'), 'DOPESHEET_EDITOR', 'WINDOW', []),
+ ( N_('NLA Editor'), 'NLA_EDITOR', 'WINDOW', [
+ ( N_('NLA Channels'), 'NLA_EDITOR', 'WINDOW', []),
+ ( N_('NLA Generic'), 'NLA_EDITOR', 'WINDOW', [])
]),
- ('Image', 'IMAGE_EDITOR', 'WINDOW', [
- ('UV Editor', 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
- ('Image Paint', 'EMPTY', 'WINDOW', []), # image and view3d
- ('Image Generic', 'IMAGE_EDITOR', 'WINDOW', [])
+ ( N_('Image'), 'IMAGE_EDITOR', 'WINDOW', [
+ ( N_('UV Editor'), 'EMPTY', 'WINDOW', []), # image (reverse order, UVEdit before Image
+ ( N_('Image Paint'), 'EMPTY', 'WINDOW', []), # image and view3d
+ ( N_('Image Generic'), 'IMAGE_EDITOR', 'WINDOW', [])
]),
- ('Timeline', 'TIMELINE', 'WINDOW', []),
- ('Outliner', 'OUTLINER', 'WINDOW', []),
+ ( N_('Timeline'), 'TIMELINE', 'WINDOW', []),
+ ( N_('Outliner'), 'OUTLINER', 'WINDOW', []),
- ('Node Editor', 'NODE_EDITOR', 'WINDOW', [
- ('Node Generic', 'NODE_EDITOR', 'WINDOW', [])
+ ( N_('Node Editor'), 'NODE_EDITOR', 'WINDOW', [
+ ( N_('Node Generic'), 'NODE_EDITOR', 'WINDOW', [])
]),
- ('Sequencer', 'SEQUENCE_EDITOR', 'WINDOW', []),
- ('Logic Editor', 'LOGIC_EDITOR', 'WINDOW', []),
+ ( N_('Sequencer'), 'SEQUENCE_EDITOR', 'WINDOW', []),
+ ( N_('Logic Editor'), 'LOGIC_EDITOR', 'WINDOW', []),
- ('File Browser', 'FILE_BROWSER', 'WINDOW', [
- ('File Browser Main', 'FILE_BROWSER', 'WINDOW', []),
- ('File Browser Buttons', 'FILE_BROWSER', 'WINDOW', [])
+ ( N_('File Browser'), 'FILE_BROWSER', 'WINDOW', [
+ ( N_('File Browser Main'), 'FILE_BROWSER', 'WINDOW', []),
+ ( N_('File Browser Buttons'), 'FILE_BROWSER', 'WINDOW', [])
]),
- ('Property Editor', 'PROPERTIES', 'WINDOW', []), # align context menu
+ ( N_('Property Editor'), 'PROPERTIES', 'WINDOW', []), # align context menu
- ('Script', 'SCRIPTS_WINDOW', 'WINDOW', []),
- ('Text', 'TEXT_EDITOR', 'WINDOW', []),
- ('Console', 'CONSOLE', 'WINDOW', []),
+ ( N_('Script'), 'SCRIPTS_WINDOW', 'WINDOW', []),
+ ( N_('Text'), 'TEXT_EDITOR', 'WINDOW', []),
+ ( N_('Console'), 'CONSOLE', 'WINDOW', []),
- ('View3D Gesture Circle', 'EMPTY', 'WINDOW', []),
- ('Gesture Border', 'EMPTY', 'WINDOW', []),
- ('Standard Modal Map', 'EMPTY', 'WINDOW', []),
- ('Transform Modal Map', 'EMPTY', 'WINDOW', []),
- ('View3D Fly Modal', 'EMPTY', 'WINDOW', []),
- ('View3D Rotate Modal', 'EMPTY', 'WINDOW', []),
- ('View3D Move Modal', 'EMPTY', 'WINDOW', []),
- ('View3D Zoom Modal', 'EMPTY', 'WINDOW', []),
+ ( N_('View3D Gesture Circle'), 'EMPTY', 'WINDOW', []),
+ ( N_('Gesture Border'), 'EMPTY', 'WINDOW', []),
+ ( N_('Standard Modal Map'), 'EMPTY', 'WINDOW', []),
+ ( N_('Transform Modal Map'), 'EMPTY', 'WINDOW', []),
+ ( N_('View3D Fly Modal'), 'EMPTY', 'WINDOW', []),
+ ( N_('View3D Rotate Modal'), 'EMPTY', 'WINDOW', []),
+ ( N_('View3D Move Modal'), 'EMPTY', 'WINDOW', []),
+ ( N_('View3D Zoom Modal'), 'EMPTY', 'WINDOW', []),
]
@@ -125,12 +127,12 @@ def _merge_keymaps(kc1, kc2):
class USERPREF_MT_keyconfigs(bpy.types.Menu):
- bl_label = "KeyPresets"
+ bl_label = _("KeyPresets")
preset_subdir = "keyconfig"
preset_operator = "wm.keyconfig_activate"
def draw(self, context):
- props = self.layout.operator("wm.context_set_value", text="Blender (default)")
+ props = self.layout.operator("wm.context_set_value", text=_("Blender (default)"))
props.data_path = "window_manager.keyconfigs.active"
props.value = "context.window_manager.keyconfigs.default"
@@ -140,7 +142,7 @@ class USERPREF_MT_keyconfigs(bpy.types.Menu):
class InputKeyMapPanel:
bl_space_type = 'USER_PREFERENCES'
- bl_label = "Input"
+ bl_label = _("Input")
bl_region_type = 'WINDOW'
bl_options = {'HIDE_HEADER'}
@@ -181,7 +183,7 @@ class InputKeyMapPanel:
row = col.row()
row.prop(km, "show_expanded_children", text="", emboss=False)
- row.label(text=km.name)
+ row.label(text=_(km.name))
row.label()
row.label()
@@ -189,9 +191,9 @@ class InputKeyMapPanel:
if km.is_modal:
row.label(text="", icon='LINKED')
if km.is_user_defined:
- row.operator("wm.keymap_restore", text="Restore")
+ row.operator("wm.keymap_restore", text=_("Restore"))
else:
- row.operator("wm.keymap_edit", text="Edit")
+ row.operator("wm.keymap_edit", text=_("Edit"))
if km.show_expanded_children:
if children:
@@ -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 " % _(km.name) + _("(Global)") )
else:
km.show_expanded_items = True
@@ -213,7 +215,7 @@ class InputKeyMapPanel:
col = self.indented_layout(col, level + 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.is_user_defined
- subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text=_("Add New"), icon='ZOOMIN')
col.separator()
@@ -351,9 +353,9 @@ class InputKeyMapPanel:
row.label()
if km.is_user_defined:
- row.operator("wm.keymap_restore", text="Restore")
+ row.operator("wm.keymap_restore", text=_("Restore"))
else:
- row.operator("wm.keymap_edit", text="Edit")
+ row.operator("wm.keymap_edit", text=_("Edit"))
for kmi in filtered_items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, 1)
@@ -362,7 +364,7 @@ class InputKeyMapPanel:
col = self.indented_layout(layout, 1)
subcol = col.split(percentage=0.2).column()
subcol.enabled = km.is_user_defined
- subcol.operator("wm.keyitem_add", text="Add New", icon='ZOOMIN')
+ subcol.operator("wm.keyitem_add", text=_("Add New"), icon='ZOOMIN')
def draw_hierarchy(self, display_keymaps, layout):
for entry in KM_HIERARCHY:
@@ -384,7 +386,7 @@ class InputKeyMapPanel:
#row.prop_search(wm.keyconfigs, "active", wm, "keyconfigs", text="Key Config:")
text = bpy.path.display_name(context.window_manager.keyconfigs.active.name)
if not text:
- text = "Blender (default)"
+ text = _("Blender (default)")
row.menu("USERPREF_MT_keyconfigs", text=text)
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMIN")
row.operator("wm.keyconfig_preset_add", text="", icon="ZOOMOUT").remove_active = True
@@ -426,7 +428,8 @@ def export_properties(prefix, properties, lines=None):
class WM_OT_keyconfig_test(bpy.types.Operator):
"Test keyconfig for conflicts"
bl_idname = "wm.keyconfig_test"
- bl_label = "Test Key Configuration for Conflicts"
+ bl_label = _("Test Key Configuration for Conflicts")
+ __doc__ = _("Test keyconfig for conflicts")
def testEntry(self, kc, entry, src=None, parent=None):
result = False
@@ -534,14 +537,15 @@ def _string_value(value):
class WM_OT_keyconfig_import(bpy.types.Operator):
"Import key configuration from a python script"
bl_idname = "wm.keyconfig_import"
- bl_label = "Import Key Configuration..."
+ bl_label = _("Import Key Configuration...")
+ __doc__ = _("Import key configuration from a python script")
- filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
+ filepath = StringProperty(name=_("File Path"), description=_("Filepath to write file to"), default="keymap.py")
+ filter_folder = BoolProperty(name=_("Filter folders"), description="", default=True, options={'HIDDEN'})
+ filter_text = BoolProperty(name=_("Filter text"), description="", default=True, options={'HIDDEN'})
+ filter_python = BoolProperty(name=_("Filter python"), description="", default=True, options={'HIDDEN'})
- keep_original = BoolProperty(name="Keep original", description="Keep original file after copying to configuration folder", default=True)
+ keep_original = BoolProperty(name=_("Keep original"), description=_("Keep original file after copying to configuration folder"), default=True)
def execute(self, context):
from os.path import basename
@@ -579,12 +583,13 @@ class WM_OT_keyconfig_import(bpy.types.Operator):
class WM_OT_keyconfig_export(bpy.types.Operator):
"Export key configuration to a python script"
bl_idname = "wm.keyconfig_export"
- bl_label = "Export Key Configuration..."
+ bl_label = _("Export Key Configuration...")
+ __doc__ = _("Export key configuration to a python script")
- filepath = StringProperty(name="File Path", description="Filepath to write file to", default="keymap.py")
- filter_folder = BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'})
- filter_text = BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'})
- filter_python = BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'})
+ filepath = StringProperty(name=_("File Path"), description=_("Filepath to write file to"), default="keymap.py")
+ filter_folder = BoolProperty(name=_("Filter folders"), description="", default=True, options={'HIDDEN'})
+ filter_text = BoolProperty(name=_("Filter text"), description="", default=True, options={'HIDDEN'})
+ filter_python = BoolProperty(name=_("Filter python"), description="", default=True, options={'HIDDEN'})
def execute(self, context):
if not self.filepath:
@@ -667,7 +672,8 @@ class WM_OT_keyconfig_export(bpy.types.Operator):
class WM_OT_keymap_edit(bpy.types.Operator):
"Edit stored key map"
bl_idname = "wm.keymap_edit"
- bl_label = "Edit Key Map"
+ bl_label = _("Edit Key Map")
+ __doc__ = _("Edit stored key map")
def execute(self, context):
km = context.keymap
@@ -678,7 +684,8 @@ class WM_OT_keymap_edit(bpy.types.Operator):
class WM_OT_keymap_restore(bpy.types.Operator):
"Restore key map(s)"
bl_idname = "wm.keymap_restore"
- bl_label = "Restore Key Map(s)"
+ bl_label = _("Restore Key Map(s)")
+ __doc__ = _("Restore key map(s)")
all = BoolProperty(name="All Keymaps", description="Restore all keymaps to default")
@@ -698,7 +705,8 @@ class WM_OT_keymap_restore(bpy.types.Operator):
class WM_OT_keyitem_restore(bpy.types.Operator):
"Restore key map item"
bl_idname = "wm.keyitem_restore"
- bl_label = "Restore Key Map Item"
+ bl_label = _("Restore Key Map Item")
+ __doc__ = _("Restore key map item")
item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
@@ -720,7 +728,8 @@ class WM_OT_keyitem_restore(bpy.types.Operator):
class WM_OT_keyitem_add(bpy.types.Operator):
"Add key map item"
bl_idname = "wm.keyitem_add"
- bl_label = "Add Key Map Item"
+ bl_label = _("Add Key Map Item")
+ __doc__ = _("Add key map item")
def execute(self, context):
km = context.keymap
@@ -742,9 +751,10 @@ class WM_OT_keyitem_add(bpy.types.Operator):
class WM_OT_keyitem_remove(bpy.types.Operator):
"Remove key map item"
bl_idname = "wm.keyitem_remove"
- bl_label = "Remove Key Map Item"
+ bl_label = _("Remove Key Map Item")
+ __doc__ = _("Remove key map item")
- item_id = IntProperty(name="Item Identifier", description="Identifier of the item to remove")
+ item_id = IntProperty(name=_("Item Identifier"), description=_("Identifier of the item to remove"))
@classmethod
def poll(cls, context):
@@ -760,7 +770,8 @@ class WM_OT_keyitem_remove(bpy.types.Operator):
class WM_OT_keyconfig_remove(bpy.types.Operator):
"Remove key config"
bl_idname = "wm.keyconfig_remove"
- bl_label = "Remove Key Config"
+ bl_label = _("Remove Key Config")
+ __doc__ = _("Remove key config")
@classmethod
def poll(cls, context):
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index acb0499c40f..b4adc3bf028 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):
@@ -117,62 +118,62 @@ class VIEW3D_HT_header(bpy.types.Header):
class ShowHideMenu():
- bl_label = "Show/Hide"
+ bl_label = _("Show/Hide")
_operator_name = ""
def draw(self, context):
layout = self.layout
- layout.operator("%s.reveal" % self._operator_name, text="Show Hidden")
- layout.operator("%s.hide" % self._operator_name, text="Hide Selected")
- layout.operator("%s.hide" % self._operator_name, text="Hide Unselected").unselected = True
+ layout.operator("%s.reveal" % self._operator_name, text=_("Show Hidden"))
+ layout.operator("%s.hide" % self._operator_name, text=_("Hide Selected"))
+ layout.operator("%s.hide" % self._operator_name, text=_("Hide Unselected")).unselected = True
class VIEW3D_MT_transform(bpy.types.Menu):
- bl_label = "Transform"
+ bl_label = _("Transform")
# TODO: get rid of the custom text strings?
def draw(self, context):
layout = self.layout
- layout.operator("transform.translate", text="Grab/Move")
+ layout.operator("transform.translate", text=_("Grab/Move"))
# TODO: sub-menu for grab per axis
- layout.operator("transform.rotate", text="Rotate")
+ layout.operator("transform.rotate", text=_("Rotate"))
# TODO: sub-menu for rot per axis
- layout.operator("transform.resize", text="Scale")
+ layout.operator("transform.resize", text=_("Scale"))
# TODO: sub-menu for scale per axis
layout.separator()
- layout.operator("transform.tosphere", text="To Sphere")
- layout.operator("transform.shear", text="Shear")
- layout.operator("transform.warp", text="Warp")
- layout.operator("transform.push_pull", text="Push/Pull")
+ layout.operator("transform.tosphere", text=_("To Sphere"))
+ layout.operator("transform.shear", text=_("Shear"))
+ layout.operator("transform.warp", text=_("Warp"))
+ layout.operator("transform.push_pull", text=_("Push/Pull"))
layout.separator()
- layout.operator("transform.translate", text="Move Texture Space").texture_space = True
- layout.operator("transform.resize", text="Scale Texture Space").texture_space = True
+ layout.operator("transform.translate", text=_("Move Texture Space")).texture_space = True
+ layout.operator("transform.resize", text=_("Scale Texture Space")).texture_space = True
layout.separator()
obj = context.object
if obj.type == 'ARMATURE' and obj.mode in {'EDIT', 'POSE'} and obj.data.draw_type in {'BBONE', 'ENVELOPE'}:
- layout.operator("transform.transform", text="Scale Envelope/BBone").mode = 'BONE_SIZE'
+ layout.operator("transform.transform", text=_("Scale Envelope/BBone")).mode = 'BONE_SIZE'
if context.edit_object and context.edit_object.type == 'ARMATURE':
layout.operator("armature.align")
else:
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("transform.transform", text="Align to Transform Orientation").mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
+ layout.operator("transform.transform", text=_("Align to Transform Orientation")).mode = 'ALIGN' # XXX see alignmenu() in edit.c of b2.4x to get this working
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("object.origin_set", text="Geometry to Origin").type = 'GEOMETRY_ORIGIN'
- layout.operator("object.origin_set", text="Origin to Geometry").type = 'ORIGIN_GEOMETRY'
- layout.operator("object.origin_set", text="Origin to 3D Cursor").type = 'ORIGIN_CURSOR'
+ layout.operator("object.origin_set", text=_("Geometry to Origin")).type = 'GEOMETRY_ORIGIN'
+ layout.operator("object.origin_set", text=_("Origin to Geometry")).type = 'ORIGIN_GEOMETRY'
+ layout.operator("object.origin_set", text=_("Origin to 3D Cursor")).type = 'ORIGIN_CURSOR'
layout.separator()
@@ -181,37 +182,37 @@ class VIEW3D_MT_transform(bpy.types.Menu):
class VIEW3D_MT_mirror(bpy.types.Menu):
- bl_label = "Mirror"
+ bl_label = _("Mirror")
def draw(self, context):
layout = self.layout
- layout.operator("transform.mirror", text="Interactive Mirror")
+ layout.operator("transform.mirror", text=_("Interactive Mirror"))
layout.separator()
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("transform.mirror", text="X Global")
+ props = layout.operator("transform.mirror", text=_("X Global"))
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'GLOBAL'
- props = layout.operator("transform.mirror", text="Y Global")
+ props = layout.operator("transform.mirror", text=_("Y Global"))
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'GLOBAL'
- props = layout.operator("transform.mirror", text="Z Global")
+ props = layout.operator("transform.mirror", text=_("Z Global"))
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'GLOBAL'
if context.edit_object:
layout.separator()
- props = layout.operator("transform.mirror", text="X Local")
+ props = layout.operator("transform.mirror", text=_("X Local"))
props.constraint_axis = (True, False, False)
props.constraint_orientation = 'LOCAL'
- props = layout.operator("transform.mirror", text="Y Local")
+ props = layout.operator("transform.mirror", text=_("Y Local"))
props.constraint_axis = (False, True, False)
props.constraint_orientation = 'LOCAL'
- props = layout.operator("transform.mirror", text="Z Local")
+ props = layout.operator("transform.mirror", text=_("Z Local"))
props.constraint_axis = (False, False, True)
props.constraint_orientation = 'LOCAL'
@@ -219,24 +220,24 @@ class VIEW3D_MT_mirror(bpy.types.Menu):
class VIEW3D_MT_snap(bpy.types.Menu):
- bl_label = "Snap"
+ bl_label = _("Snap")
def draw(self, context):
layout = self.layout
- layout.operator("view3d.snap_selected_to_grid", text="Selection to Grid")
- layout.operator("view3d.snap_selected_to_cursor", text="Selection to Cursor")
+ layout.operator("view3d.snap_selected_to_grid", text=_("Selection to Grid"))
+ layout.operator("view3d.snap_selected_to_cursor", text=_("Selection to Cursor"))
layout.separator()
- layout.operator("view3d.snap_cursor_to_selected", text="Cursor to Selected")
- layout.operator("view3d.snap_cursor_to_center", text="Cursor to Center")
- layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid")
- layout.operator("view3d.snap_cursor_to_active", text="Cursor to Active")
+ layout.operator("view3d.snap_cursor_to_selected", text=_("Cursor to Selected"))
+ layout.operator("view3d.snap_cursor_to_center", text=_("Cursor to Center"))
+ layout.operator("view3d.snap_cursor_to_grid", text=_("Cursor to Grid"))
+ layout.operator("view3d.snap_cursor_to_active", text=_("Cursor to Active"))
class VIEW3D_MT_uv_map(bpy.types.Menu):
- bl_label = "UV Mapping"
+ bl_label = _("UV Mapping")
def draw(self, context):
layout = self.layout
@@ -258,7 +259,7 @@ class VIEW3D_MT_uv_map(bpy.types.Menu):
layout.separator()
layout.operator("uv.project_from_view")
- layout.operator("uv.project_from_view", text="Project from View (Bounds)").scale_to_bounds = True
+ layout.operator("uv.project_from_view", text=_("Project from View (Bounds)")).scale_to_bounds = True
layout.separator()
@@ -269,7 +270,7 @@ class VIEW3D_MT_uv_map(bpy.types.Menu):
class VIEW3D_MT_view(bpy.types.Menu):
- bl_label = "View"
+ bl_label = _("View")
def draw(self, context):
layout = self.layout
@@ -279,15 +280,15 @@ class VIEW3D_MT_view(bpy.types.Menu):
layout.separator()
- layout.operator("view3d.viewnumpad", text="Camera").type = 'CAMERA'
- layout.operator("view3d.viewnumpad", text="Top").type = 'TOP'
- layout.operator("view3d.viewnumpad", text="Bottom").type = 'BOTTOM'
- layout.operator("view3d.viewnumpad", text="Front").type = 'FRONT'
- layout.operator("view3d.viewnumpad", text="Back").type = 'BACK'
- layout.operator("view3d.viewnumpad", text="Right").type = 'RIGHT'
- layout.operator("view3d.viewnumpad", text="Left").type = 'LEFT'
+ layout.operator("view3d.viewnumpad", text=_("Camera")).type = 'CAMERA'
+ layout.operator("view3d.viewnumpad", text=_("Top")).type = 'TOP'
+ layout.operator("view3d.viewnumpad", text=_("Bottom")).type = 'BOTTOM'
+ layout.operator("view3d.viewnumpad", text=_("Front")).type = 'FRONT'
+ layout.operator("view3d.viewnumpad", text=_("Back")).type = 'BACK'
+ layout.operator("view3d.viewnumpad", text=_("Right")).type = 'RIGHT'
+ layout.operator("view3d.viewnumpad", text=_("Left")).type = 'LEFT'
- layout.menu("VIEW3D_MT_view_cameras", text="Cameras")
+ layout.menu("VIEW3D_MT_view_cameras", text=_("Cameras"))
layout.separator()
@@ -302,22 +303,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()
@@ -327,7 +328,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
@@ -340,9 +341,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()
@@ -350,7 +351,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
@@ -359,52 +360,52 @@ 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 **********
class VIEW3D_MT_select_object(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -414,23 +415,23 @@ class VIEW3D_MT_select_object(bpy.types.Menu):
layout.separator()
- layout.operator("object.select_all", text="Select/Deselect All")
- layout.operator("object.select_inverse", text="Inverse")
- layout.operator("object.select_random", text="Random")
- layout.operator("object.select_mirror", text="Mirror")
- layout.operator("object.select_by_layer", text="Select All by Layer")
- layout.operator_menu_enum("object.select_by_type", "type", text="Select All by Type...")
- layout.operator("object.select_camera", text="Select Camera")
+ layout.operator("object.select_all", text=_("Select/Deselect All"))
+ layout.operator("object.select_inverse", text=_("Inverse"))
+ layout.operator("object.select_random", text=_("Random"))
+ layout.operator("object.select_mirror", text=_("Mirror"))
+ layout.operator("object.select_by_layer", text=_("Select All by Layer"))
+ layout.operator_menu_enum("object.select_by_type", "type", text=_("Select All by Type..."))
+ layout.operator("object.select_camera", text=_("Select Camera"))
layout.separator()
- layout.operator_menu_enum("object.select_grouped", "type", text="Grouped")
- layout.operator_menu_enum("object.select_linked", "type", text="Linked")
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator_menu_enum("object.select_grouped", "type", text=_("Grouped"))
+ layout.operator_menu_enum("object.select_linked", "type", text=_("Linked"))
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_pose(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -439,35 +440,35 @@ class VIEW3D_MT_select_pose(bpy.types.Menu):
layout.separator()
- layout.operator("pose.select_all", text="Select/Deselect All")
- layout.operator("pose.select_inverse", text="Inverse")
- layout.operator("pose.select_flip_active", text="Flip Active")
- layout.operator("pose.select_constraint_target", text="Constraint Target")
- layout.operator("pose.select_linked", text="Linked")
+ layout.operator("pose.select_all", text=_("Select/Deselect All"))
+ layout.operator("pose.select_inverse", text=_("Inverse"))
+ layout.operator("pose.select_flip_active", text=_("Flip Active"))
+ layout.operator("pose.select_constraint_target", text=_("Constraint Target"))
+ layout.operator("pose.select_linked", text=_("Linked"))
layout.separator()
- layout.operator("pose.select_hierarchy", text="Parent").direction = 'PARENT'
- layout.operator("pose.select_hierarchy", text="Child").direction = 'CHILD'
+ layout.operator("pose.select_hierarchy", text=_("Parent")).direction = 'PARENT'
+ layout.operator("pose.select_hierarchy", text=_("Child")).direction = 'CHILD'
layout.separator()
- props = layout.operator("pose.select_hierarchy", text="Extend Parent")
+ props = layout.operator("pose.select_hierarchy", text=_("Extend Parent"))
props.extend = True
props.direction = 'PARENT'
- props = layout.operator("pose.select_hierarchy", text="Extend Child")
+ props = layout.operator("pose.select_hierarchy", text=_("Extend Child"))
props.extend = True
props.direction = 'CHILD'
layout.separator()
- layout.operator_menu_enum("pose.select_grouped", "type", text="Grouped")
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator_menu_enum("pose.select_grouped", "type", text=_("Grouped"))
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_particle(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -476,7 +477,7 @@ class VIEW3D_MT_select_particle(bpy.types.Menu):
layout.separator()
- layout.operator("particle.select_all", text="Select/Deselect All")
+ layout.operator("particle.select_all", text=_("Select/Deselect All"))
layout.operator("particle.select_linked")
layout.operator("particle.select_inverse")
@@ -487,12 +488,12 @@ class VIEW3D_MT_select_particle(bpy.types.Menu):
layout.separator()
- layout.operator("particle.select_roots", text="Roots")
- layout.operator("particle.select_tips", text="Tips")
+ layout.operator("particle.select_roots", text=_("Roots"))
+ layout.operator("particle.select_tips", text=_("Tips"))
class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -502,40 +503,40 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
layout.separator()
- layout.operator("mesh.select_all", text="Select/Deselect All")
- layout.operator("mesh.select_inverse", text="Inverse")
+ layout.operator("mesh.select_all", text=_("Select/Deselect All"))
+ layout.operator("mesh.select_inverse", text=_("Inverse"))
layout.separator()
- layout.operator("mesh.select_random", text="Random")
- layout.operator("mesh.select_nth", text="Every N Number of Verts")
- layout.operator("mesh.edges_select_sharp", text="Sharp Edges")
- layout.operator("mesh.faces_select_linked_flat", text="Linked Flat Faces")
- layout.operator("mesh.faces_select_interior", text="Interior Faces")
- layout.operator("mesh.select_axis", text="Side of Active")
+ layout.operator("mesh.select_random", text=_("Random"))
+ layout.operator("mesh.select_nth", text=_("Every N Number of Verts"))
+ layout.operator("mesh.edges_select_sharp", text=_("Sharp Edges"))
+ layout.operator("mesh.faces_select_linked_flat", text=_("Linked Flat Faces"))
+ layout.operator("mesh.faces_select_interior", text=_("Interior Faces"))
+ layout.operator("mesh.select_axis", text=_("Side of Active"))
layout.separator()
- layout.operator("mesh.select_by_number_vertices", text="Triangles").type = 'TRIANGLES'
- layout.operator("mesh.select_by_number_vertices", text="Quads").type = 'QUADS'
+ layout.operator("mesh.select_by_number_vertices", text=_("Triangles")).type = 'TRIANGLES'
+ layout.operator("mesh.select_by_number_vertices", text=_("Quads")).type = 'QUADS'
if context.scene.tool_settings.mesh_select_mode[2] == False:
- layout.operator("mesh.select_non_manifold", text="Non Manifold")
- layout.operator("mesh.select_by_number_vertices", text="Loose Verts/Edges").type = 'OTHER'
- layout.operator("mesh.select_similar", text="Similar")
+ layout.operator("mesh.select_non_manifold", text=_("Non Manifold"))
+ layout.operator("mesh.select_by_number_vertices", text=_("Loose Verts/Edges")).type = 'OTHER'
+ layout.operator("mesh.select_similar", text=_("Similar"))
layout.separator()
- layout.operator("mesh.select_less", text="Less")
- layout.operator("mesh.select_more", text="More")
+ layout.operator("mesh.select_less", text=_("Less"))
+ layout.operator("mesh.select_more", text=_("More"))
layout.separator()
- layout.operator("mesh.select_mirror", text="Mirror")
+ layout.operator("mesh.select_mirror", text=_("Mirror"))
- layout.operator("mesh.select_linked", text="Linked")
- layout.operator("mesh.select_vertex_path", text="Vertex Path")
- layout.operator("mesh.loop_multi_select", text="Edge Loop")
- layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
+ layout.operator("mesh.select_linked", text=_("Linked"))
+ layout.operator("mesh.select_vertex_path", text=_("Vertex Path"))
+ layout.operator("mesh.loop_multi_select", text=_("Edge Loop"))
+ layout.operator("mesh.loop_multi_select", text=_("Edge Ring")).ring = True
layout.separator()
@@ -544,7 +545,7 @@ class VIEW3D_MT_select_edit_mesh(bpy.types.Menu):
class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -554,10 +555,10 @@ class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
layout.separator()
- layout.operator("curve.select_all", text="Select/Deselect All")
+ layout.operator("curve.select_all", text=_("Select/Deselect All"))
layout.operator("curve.select_inverse")
layout.operator("curve.select_random")
- layout.operator("curve.select_nth", text="Every Nth Number of Points")
+ layout.operator("curve.select_nth", text=_("Every Nth Number of Points"))
layout.separator()
@@ -573,7 +574,7 @@ class VIEW3D_MT_select_edit_curve(bpy.types.Menu):
class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -583,10 +584,10 @@ class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
layout.separator()
- layout.operator("curve.select_all", text="Select/Deselect All")
+ layout.operator("curve.select_all", text=_("Select/Deselect All"))
layout.operator("curve.select_inverse")
layout.operator("curve.select_random")
- layout.operator("curve.select_nth", text="Every Nth Number of Points")
+ layout.operator("curve.select_nth", text=_("Every Nth Number of Points"))
layout.separator()
@@ -599,7 +600,7 @@ class VIEW3D_MT_select_edit_surface(bpy.types.Menu):
class VIEW3D_MT_select_edit_metaball(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -617,7 +618,7 @@ class VIEW3D_MT_select_edit_metaball(bpy.types.Menu):
class VIEW3D_MT_select_edit_lattice(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -626,11 +627,11 @@ class VIEW3D_MT_select_edit_lattice(bpy.types.Menu):
layout.separator()
- layout.operator("lattice.select_all", text="Select/Deselect All")
+ layout.operator("lattice.select_all", text=_("Select/Deselect All"))
class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
layout = self.layout
@@ -639,29 +640,29 @@ class VIEW3D_MT_select_edit_armature(bpy.types.Menu):
layout.separator()
- layout.operator("armature.select_all", text="Select/Deselect All")
- layout.operator("armature.select_inverse", text="Inverse")
+ layout.operator("armature.select_all", text=_("Select/Deselect All"))
+ layout.operator("armature.select_inverse", text=_("Inverse"))
layout.separator()
- layout.operator("armature.select_hierarchy", text="Parent").direction = 'PARENT'
- layout.operator("armature.select_hierarchy", text="Child").direction = 'CHILD'
+ layout.operator("armature.select_hierarchy", text=_("Parent")).direction = 'PARENT'
+ layout.operator("armature.select_hierarchy", text=_("Child")).direction = 'CHILD'
layout.separator()
- props = layout.operator("armature.select_hierarchy", text="Extend Parent")
+ props = layout.operator("armature.select_hierarchy", text=_("Extend Parent"))
props.extend = True
props.direction = 'PARENT'
- props = layout.operator("armature.select_hierarchy", text="Extend Child")
+ props = layout.operator("armature.select_hierarchy", text=_("Extend Child"))
props.extend = True
props.direction = 'CHILD'
- layout.operator("object.select_pattern", text="Select Pattern...")
+ layout.operator("object.select_pattern", text=_("Select Pattern..."))
class VIEW3D_MT_select_face(bpy.types.Menu): # XXX no matching enum
- bl_label = "Select"
+ bl_label = _("Select")
def draw(self, context):
# layout = self.layout
@@ -675,7 +676,7 @@ class VIEW3D_MT_select_face(bpy.types.Menu): # XXX no matching enum
class VIEW3D_MT_object(bpy.types.Menu):
bl_context = "objectmode"
- bl_label = "Object"
+ bl_label = _("Object")
def draw(self, context):
layout = self.layout
@@ -700,11 +701,11 @@ class VIEW3D_MT_object(bpy.types.Menu):
layout.operator("object.duplicate_move")
layout.operator("object.duplicate_move_linked")
- layout.operator("object.delete", text="Delete...")
- layout.operator("object.proxy_make", text="Make Proxy...")
- layout.menu("VIEW3D_MT_make_links", text="Make Links...")
+ layout.operator("object.delete", text=_("Delete..."))
+ layout.operator("object.proxy_make", text=_("Make Proxy..."))
+ layout.menu("VIEW3D_MT_make_links", text=_("Make Links..."))
layout.operator("object.make_dupli_face")
- layout.operator_menu_enum("object.make_local", "type", text="Make Local...")
+ layout.operator_menu_enum("object.make_local", "type", text=_("Make Local..."))
layout.menu("VIEW3D_MT_make_single_user")
layout.separator()
@@ -725,37 +726,37 @@ class VIEW3D_MT_object(bpy.types.Menu):
layout.separator()
- layout.operator("object.move_to_layer", text="Move to Layer...")
+ layout.operator("object.move_to_layer", text=_("Move to Layer..."))
layout.menu("VIEW3D_MT_object_showhide")
layout.operator_menu_enum("object.convert", "target")
class VIEW3D_MT_object_animation(bpy.types.Menu):
- bl_label = "Animation"
+ bl_label = _("Animation")
def draw(self, context):
layout = self.layout
- layout.operator("anim.keyframe_insert_menu", text="Insert Keyframe...")
- layout.operator("anim.keyframe_delete_v3d", text="Delete Keyframe...")
- layout.operator("anim.keying_set_active_set", text="Change Keying Set...")
+ layout.operator("anim.keyframe_insert_menu", text=_("Insert Keyframe..."))
+ layout.operator("anim.keyframe_delete_v3d", text=_("Delete Keyframe..."))
+ layout.operator("anim.keying_set_active_set", text=_("Change Keying Set..."))
class VIEW3D_MT_object_clear(bpy.types.Menu):
- bl_label = "Clear"
+ bl_label = _("Clear")
def draw(self, context):
layout = self.layout
- layout.operator("object.location_clear", text="Location")
- layout.operator("object.rotation_clear", text="Rotation")
- layout.operator("object.scale_clear", text="Scale")
- layout.operator("object.origin_clear", text="Origin")
+ layout.operator("object.location_clear", text=_("Location"))
+ layout.operator("object.rotation_clear", text=_("Rotation"))
+ layout.operator("object.scale_clear", text=_("Scale"))
+ layout.operator("object.origin_clear", text=_("Origin"))
class VIEW3D_MT_object_specials(bpy.types.Menu):
- bl_label = "Specials"
+ bl_label = _("Specials")
@classmethod
def poll(cls, context):
@@ -770,19 +771,19 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
layout.operator_context = 'INVOKE_REGION_WIN'
if obj.data.type == 'PERSP':
- props = layout.operator("wm.context_modal_mouse", text="Camera Lens Angle")
+ props = layout.operator("wm.context_modal_mouse", text=_("Camera Lens Angle"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.lens"
props.input_scale = 0.1
else:
- props = layout.operator("wm.context_modal_mouse", text="Camera Lens Scale")
+ props = layout.operator("wm.context_modal_mouse", text=_("Camera Lens Scale"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.ortho_scale"
props.input_scale = 0.01
if not obj.data.dof_object:
#layout.label(text="Test Has DOF obj");
- props = layout.operator("wm.context_modal_mouse", text="DOF Distance")
+ props = layout.operator("wm.context_modal_mouse", text=_("DOF Distance"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.dof_distance"
props.input_scale = 0.02
@@ -790,12 +791,12 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
if obj.type in {'CURVE', 'FONT'}:
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Extrude Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Extrude Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.extrude"
props.input_scale = 0.01
- props = layout.operator("wm.context_modal_mouse", text="Width Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Width Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.offset"
props.input_scale = 0.01
@@ -803,7 +804,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
if obj.type == 'EMPTY':
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Empty Draw Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Empty Draw Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "empty_draw_size"
props.input_scale = 0.01
@@ -811,34 +812,34 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
if obj.type == 'LAMP':
layout.operator_context = 'INVOKE_REGION_WIN'
- props = layout.operator("wm.context_modal_mouse", text="Energy")
+ props = layout.operator("wm.context_modal_mouse", text=_("Energy"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.energy"
if obj.data.type in {'SPOT', 'AREA', 'POINT'}:
- props = layout.operator("wm.context_modal_mouse", text="Falloff Distance")
+ props = layout.operator("wm.context_modal_mouse", text=_("Falloff Distance"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.distance"
props.input_scale = 0.1
if obj.data.type == 'SPOT':
layout.separator()
- props = layout.operator("wm.context_modal_mouse", text="Spot Size")
+ props = layout.operator("wm.context_modal_mouse", text=_("Spot Size"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_size"
props.input_scale = 0.01
- props = layout.operator("wm.context_modal_mouse", text="Spot Blend")
+ props = layout.operator("wm.context_modal_mouse", text=_("Spot Blend"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.spot_blend"
props.input_scale = -0.01
- props = layout.operator("wm.context_modal_mouse", text="Clip Start")
+ props = layout.operator("wm.context_modal_mouse", text=_("Clip Start"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_buffer_clip_start"
props.input_scale = 0.05
- props = layout.operator("wm.context_modal_mouse", text="Clip End")
+ props = layout.operator("wm.context_modal_mouse", text=_("Clip End"))
props.data_path_iter = "selected_editable_objects"
props.data_path_item = "data.shadow_buffer_clip_end"
props.input_scale = 0.05
@@ -850,46 +851,46 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
class VIEW3D_MT_object_apply(bpy.types.Menu):
- bl_label = "Apply"
+ bl_label = _("Apply")
def draw(self, context):
layout = self.layout
- layout.operator("object.transform_apply", text="Location").location = True
- layout.operator("object.transform_apply", text="Rotation").rotation = True
- layout.operator("object.transform_apply", text="Scale").scale = True
- props = layout.operator("object.transform_apply", text="Rotation & Scale")
+ layout.operator("object.transform_apply", text=_("Location")).location = True
+ layout.operator("object.transform_apply", text=_("Rotation")).rotation = True
+ layout.operator("object.transform_apply", text=_("Scale")).scale = True
+ props = layout.operator("object.transform_apply", text=_("Rotation & Scale"))
props.scale = True
props.rotation = True
layout.separator()
- layout.operator("object.visual_transform_apply", text="Visual Transform")
+ layout.operator("object.visual_transform_apply", text=_("Visual Transform"))
layout.operator("object.duplicates_make_real")
class VIEW3D_MT_object_parent(bpy.types.Menu):
- bl_label = "Parent"
+ bl_label = _("Parent")
def draw(self, context):
layout = self.layout
- layout.operator("object.parent_set", text="Set")
- layout.operator("object.parent_clear", text="Clear")
+ layout.operator("object.parent_set", text=_("Set"))
+ layout.operator("object.parent_clear", text=_("Clear"))
class VIEW3D_MT_object_track(bpy.types.Menu):
- bl_label = "Track"
+ bl_label = _("Track")
def draw(self, context):
layout = self.layout
- layout.operator("object.track_set", text="Set")
- layout.operator("object.track_clear", text="Clear")
+ layout.operator("object.track_set", text=_("Set"))
+ layout.operator("object.track_clear", text=_("Clear"))
class VIEW3D_MT_object_group(bpy.types.Menu):
- bl_label = "Group"
+ bl_label = _("Group")
def draw(self, context):
layout = self.layout
@@ -904,7 +905,7 @@ class VIEW3D_MT_object_group(bpy.types.Menu):
class VIEW3D_MT_object_constraints(bpy.types.Menu):
- bl_label = "Constraints"
+ bl_label = _("Constraints")
def draw(self, context):
layout = self.layout
@@ -915,68 +916,68 @@ class VIEW3D_MT_object_constraints(bpy.types.Menu):
class VIEW3D_MT_object_showhide(bpy.types.Menu):
- bl_label = "Show/Hide"
+ bl_label = _("Show/Hide")
def draw(self, context):
layout = self.layout
- layout.operator("object.hide_view_clear", text="Show Hidden")
- layout.operator("object.hide_view_set", text="Hide Selected")
- layout.operator("object.hide_view_set", text="Hide Unselected").unselected = True
+ layout.operator("object.hide_view_clear", text=_("Show Hidden"))
+ layout.operator("object.hide_view_set", text=_("Hide Selected"))
+ layout.operator("object.hide_view_set", text=_("Hide Unselected")).unselected = True
class VIEW3D_MT_make_single_user(bpy.types.Menu):
- bl_label = "Make Single User"
+ bl_label = _("Make Single User")
def draw(self, context):
layout = self.layout
- props = layout.operator("object.make_single_user", text="Object")
+ props = layout.operator("object.make_single_user", text=_("Object"))
props.object = True
- props = layout.operator("object.make_single_user", text="Object & Data")
+ props = layout.operator("object.make_single_user", text=_("Object & Data"))
props.object = props.obdata = True
- props = layout.operator("object.make_single_user", text="Object & Data & Materials+Tex")
+ props = layout.operator("object.make_single_user", text=_("Object & Data & Materials+Tex"))
props.object = props.obdata = props.material = props.texture = True
- props = layout.operator("object.make_single_user", text="Materials+Tex")
+ props = layout.operator("object.make_single_user", text=_("Materials+Tex"))
props.material = props.texture = True
- props = layout.operator("object.make_single_user", text="Object Animation")
+ props = layout.operator("object.make_single_user", text=_("Object Animation"))
props.animation = True
class VIEW3D_MT_make_links(bpy.types.Menu):
- bl_label = "Make Links"
+ bl_label = _("Make Links")
def draw(self, context):
layout = self.layout
if(len(bpy.data.scenes) > 10):
layout.operator_context = 'INVOKE_DEFAULT'
- layout.operator("object.make_links_scene", text="Objects to Scene...", icon='OUTLINER_OB_EMPTY')
- layout.operator("object.make_links_scene", text="Markers to Scene...", icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.make_links_scene", text=_("Objects to Scene..."), icon='OUTLINER_OB_EMPTY')
+ layout.operator("object.make_links_scene", text=_("Markers to Scene..."), icon='OUTLINER_OB_EMPTY')
else:
- layout.operator_menu_enum("object.make_links_scene", "scene", text="Objects to Scene...")
- layout.operator_menu_enum("marker.make_links_scene", "scene", text="Markers to Scene...")
+ layout.operator_menu_enum("object.make_links_scene", "scene", text=_("Objects to Scene..."))
+ layout.operator_menu_enum("marker.make_links_scene", "scene", text=_("Markers to Scene..."))
layout.operator_enum("object.make_links_data", "type") # inline
class VIEW3D_MT_object_game(bpy.types.Menu):
- bl_label = "Game"
+ bl_label = _("Game")
def draw(self, context):
layout = self.layout
- layout.operator("object.logic_bricks_copy", text="Copy Logic Bricks")
+ layout.operator("object.logic_bricks_copy", text=_("Copy Logic Bricks"))
layout.separator()
- layout.operator("object.game_property_copy", text="Replace Properties").operation = 'REPLACE'
- layout.operator("object.game_property_copy", text="Merge Properties").operation = 'MERGE'
- layout.operator_menu_enum("object.game_property_copy", "property", text="Copy Properties...")
+ layout.operator("object.game_property_copy", text=_("Replace Properties")).operation = 'REPLACE'
+ layout.operator("object.game_property_copy", text=_("Merge Properties")).operation = 'MERGE'
+ layout.operator_menu_enum("object.game_property_copy", "property", text=_("Copy Properties..."))
layout.separator()
@@ -987,7 +988,7 @@ class VIEW3D_MT_object_game(bpy.types.Menu):
class VIEW3D_MT_paint_vertex(bpy.types.Menu):
- bl_label = "Paint"
+ bl_label = _("Paint")
def draw(self, context):
layout = self.layout
@@ -1002,7 +1003,7 @@ class VIEW3D_MT_paint_vertex(bpy.types.Menu):
class VIEW3D_MT_hook(bpy.types.Menu):
- bl_label = "Hooks"
+ bl_label = _("Hooks")
def draw(self, context):
layout = self.layout
@@ -1021,32 +1022,32 @@ class VIEW3D_MT_hook(bpy.types.Menu):
class VIEW3D_MT_vertex_group(bpy.types.Menu):
- bl_label = "Vertex Groups"
+ bl_label = _("Vertex Groups")
def draw(self, context):
layout = self.layout
layout.operator_context = 'EXEC_AREA'
- layout.operator("object.vertex_group_assign", text="Assign to New Group").new = True
+ layout.operator("object.vertex_group_assign", text=_("Assign to New Group")).new = True
ob = context.active_object
if ob.mode == 'EDIT':
if ob.vertex_groups.active:
layout.separator()
- layout.operator("object.vertex_group_assign", text="Assign to Active Group")
- layout.operator("object.vertex_group_remove_from", text="Remove from Active Group")
- layout.operator("object.vertex_group_remove_from", text="Remove from All").all = True
+ layout.operator("object.vertex_group_assign", text=_("Assign to Active Group"))
+ layout.operator("object.vertex_group_remove_from", text=_("Remove from Active Group"))
+ layout.operator("object.vertex_group_remove_from", text=_("Remove from All")).all = True
layout.separator()
if ob.vertex_groups.active:
- layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group")
- layout.operator("object.vertex_group_remove", text="Remove Active Group")
- layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
+ layout.operator_menu_enum("object.vertex_group_set_active", "group", text=_("Set Active Group"))
+ layout.operator("object.vertex_group_remove", text=_("Remove Active Group"))
+ layout.operator("object.vertex_group_remove", text=_("Remove All Groups")).all = True
# ********** Weight paint menu **********
class VIEW3D_MT_paint_weight(bpy.types.Menu):
- bl_label = "Weights"
+ bl_label = _("Weights")
def draw(self, context):
layout = self.layout
@@ -1057,16 +1058,16 @@ class VIEW3D_MT_paint_weight(bpy.types.Menu):
layout.separator()
- layout.operator("paint.weight_from_bones", text="Assign Automatic From Bones").type = 'AUTOMATIC'
- layout.operator("paint.weight_from_bones", text="Assign From Bone Envelopes").type = 'ENVELOPES'
+ layout.operator("paint.weight_from_bones", text=_("Assign Automatic From Bones")).type = 'AUTOMATIC'
+ layout.operator("paint.weight_from_bones", text=_("Assign From Bone Envelopes")).type = 'ENVELOPES'
layout.separator()
- layout.operator("object.vertex_group_normalize_all", text="Normalize All")
- layout.operator("object.vertex_group_normalize", text="Normalize")
- layout.operator("object.vertex_group_invert", text="Invert")
- layout.operator("object.vertex_group_clean", text="Clean")
- layout.operator("object.vertex_group_levels", text="Levels")
+ layout.operator("object.vertex_group_normalize_all", text=_("Normalize All"))
+ layout.operator("object.vertex_group_normalize", text=_("Normalize"))
+ layout.operator("object.vertex_group_invert", text=_("Invert"))
+ layout.operator("object.vertex_group_clean", text=_("Clean"))
+ layout.operator("object.vertex_group_levels", text=_("Levels"))
layout.separator()
@@ -1076,7 +1077,7 @@ class VIEW3D_MT_paint_weight(bpy.types.Menu):
class VIEW3D_MT_sculpt(bpy.types.Menu):
- bl_label = "Sculpt"
+ bl_label = _("Sculpt")
def draw(self, context):
layout = self.layout
@@ -1115,18 +1116,18 @@ class VIEW3D_MT_sculpt(bpy.types.Menu):
layout.operator("sculpt.set_persistent_base")
layout.separator()
- layout.prop(sculpt, "use_threaded", text="Threaded Sculpt")
+ layout.prop(sculpt, "use_threaded", text=_("Threaded Sculpt"))
layout.prop(sculpt, "show_brush")
# TODO, make availabel from paint menu!
- layout.prop(tool_settings, "sculpt_paint_use_unified_size", text="Unify Size")
- layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text="Unify Strength")
+ layout.prop(tool_settings, "sculpt_paint_use_unified_size", text=_("Unify Size"))
+ layout.prop(tool_settings, "sculpt_paint_use_unified_strength", text=_("Unify Strength"))
# ********** Particle menu **********
class VIEW3D_MT_particle(bpy.types.Menu):
- bl_label = "Particle"
+ bl_label = _("Particle")
def draw(self, context):
layout = self.layout
@@ -1158,7 +1159,7 @@ class VIEW3D_MT_particle(bpy.types.Menu):
class VIEW3D_MT_particle_specials(bpy.types.Menu):
- bl_label = "Specials"
+ bl_label = _("Specials")
def draw(self, context):
layout = self.layout
@@ -1182,7 +1183,7 @@ class VIEW3D_MT_particle_showhide(ShowHideMenu, bpy.types.Menu):
class VIEW3D_MT_pose(bpy.types.Menu):
- bl_label = "Pose"
+ bl_label = _("Pose")
def draw(self, context):
layout = self.layout
@@ -1213,7 +1214,7 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.operator("pose.copy")
layout.operator("pose.paste")
- layout.operator("pose.paste", text="Paste X-Flipped Pose").flipped = True
+ layout.operator("pose.paste", text=_("Paste X-Flipped Pose")).flipped = True
layout.separator()
@@ -1230,9 +1231,9 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("pose.autoside_names", text="AutoName Left/Right").axis = 'XAXIS'
- layout.operator("pose.autoside_names", text="AutoName Front/Back").axis = 'YAXIS'
- layout.operator("pose.autoside_names", text="AutoName Top/Bottom").axis = 'ZAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Left/Right")).axis = 'XAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Front/Back")).axis = 'YAXIS'
+ layout.operator("pose.autoside_names", text=_("AutoName Top/Bottom")).axis = 'ZAXIS'
layout.operator("pose.flip_names")
@@ -1241,32 +1242,32 @@ class VIEW3D_MT_pose(bpy.types.Menu):
layout.separator()
layout.operator_context = 'INVOKE_AREA'
- layout.operator("pose.armature_layers", text="Change Armature Layers...")
- layout.operator("pose.bone_layers", text="Change Bone Layers...")
+ layout.operator("pose.armature_layers", text=_("Change Armature Layers..."))
+ layout.operator("pose.bone_layers", text=_("Change Bone Layers..."))
layout.separator()
layout.menu("VIEW3D_MT_pose_showhide")
- layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings")
+ layout.menu("VIEW3D_MT_bone_options_toggle", text=_("Bone Settings"))
class VIEW3D_MT_pose_transform(bpy.types.Menu):
- bl_label = "Clear Transform"
+ bl_label = _("Clear Transform")
def draw(self, context):
layout = self.layout
- layout.operator("pose.transforms_clear", text="All")
+ layout.operator("pose.transforms_clear", text=_("All"))
- layout.operator("pose.loc_clear", text="Location")
- layout.operator("pose.rot_clear", text="Rotation")
- layout.operator("pose.scale_clear", text="Scale")
+ layout.operator("pose.loc_clear", text=_("Location"))
+ layout.operator("pose.rot_clear", text=_("Rotation"))
+ layout.operator("pose.scale_clear", text=_("Scale"))
- layout.label(text="Origin")
+ layout.label(text=_("Origin"))
class VIEW3D_MT_pose_slide(bpy.types.Menu):
- bl_label = "In-Betweens"
+ bl_label = _("In-Betweens")
def draw(self, context):
layout = self.layout
@@ -1277,7 +1278,7 @@ class VIEW3D_MT_pose_slide(bpy.types.Menu):
class VIEW3D_MT_pose_propagate(bpy.types.Menu):
- bl_label = "Propagate"
+ bl_label = _("Propagate")
def draw(self, context):
layout = self.layout
@@ -1286,41 +1287,41 @@ class VIEW3D_MT_pose_propagate(bpy.types.Menu):
layout.separator()
- layout.operator("pose.propagate", text="To Next Keyframe").mode = 'NEXT_KEY'
- layout.operator("pose.propagate", text="To Last Keyframe (Make Cyclic)").mode = 'LAST_KEY'
+ layout.operator("pose.propagate", text=_("To Next Keyframe")).mode = 'NEXT_KEY'
+ layout.operator("pose.propagate", text=_("To Last Keyframe (Make Cyclic)")).mode = 'LAST_KEY'
layout.separator()
- layout.operator("pose.propagate", text="On Selected Markers").mode = 'SELECTED_MARKERS'
+ layout.operator("pose.propagate", text=_("On Selected Markers")).mode = 'SELECTED_MARKERS'
class VIEW3D_MT_pose_library(bpy.types.Menu):
- bl_label = "Pose Library"
+ bl_label = _("Pose Library")
def draw(self, context):
layout = self.layout
- layout.operator("poselib.browse_interactive", text="Browse Poses...")
+ layout.operator("poselib.browse_interactive", text=_("Browse Poses..."))
layout.separator()
- layout.operator("poselib.pose_add", text="Add Pose...")
- layout.operator("poselib.pose_rename", text="Rename Pose...")
- layout.operator("poselib.pose_remove", text="Remove Pose...")
+ layout.operator("poselib.pose_add", text=_("Add Pose..."))
+ layout.operator("poselib.pose_rename", text=_("Rename Pose..."))
+ layout.operator("poselib.pose_remove", text=_("Remove Pose..."))
class VIEW3D_MT_pose_motion(bpy.types.Menu):
- bl_label = "Motion Paths"
+ bl_label = _("Motion Paths")
def draw(self, context):
layout = self.layout
- layout.operator("pose.paths_calculate", text="Calculate")
- layout.operator("pose.paths_clear", text="Clear")
+ layout.operator("pose.paths_calculate", text=_("Calculate"))
+ layout.operator("pose.paths_clear", text=_("Clear"))
class VIEW3D_MT_pose_group(bpy.types.Menu):
- bl_label = "Bone Groups"
+ bl_label = _("Bone Groups")
def draw(self, context):
layout = self.layout
@@ -1334,7 +1335,7 @@ class VIEW3D_MT_pose_group(bpy.types.Menu):
class VIEW3D_MT_pose_ik(bpy.types.Menu):
- bl_label = "Inverse Kinematics"
+ bl_label = _("Inverse Kinematics")
def draw(self, context):
layout = self.layout
@@ -1344,12 +1345,12 @@ class VIEW3D_MT_pose_ik(bpy.types.Menu):
class VIEW3D_MT_pose_constraints(bpy.types.Menu):
- bl_label = "Constraints"
+ bl_label = _("Constraints")
def draw(self, context):
layout = self.layout
- layout.operator("pose.constraint_add_with_targets", text="Add (With Targets)...")
+ layout.operator("pose.constraint_add_with_targets", text=_("Add (With Targets)..."))
layout.operator("pose.constraints_copy")
layout.operator("pose.constraints_clear")
@@ -1359,7 +1360,7 @@ class VIEW3D_MT_pose_showhide(ShowHideMenu, bpy.types.Menu):
class VIEW3D_MT_pose_apply(bpy.types.Menu):
- bl_label = "Apply"
+ bl_label = _("Apply")
def draw(self, context):
layout = self.layout
@@ -1415,7 +1416,7 @@ class VIEW3D_MT_bone_options_disable(bpy.types.Menu, BoneOptions):
class VIEW3D_MT_edit_mesh(bpy.types.Menu):
- bl_label = "Mesh"
+ bl_label = _("Mesh")
def draw(self, context):
layout = self.layout
@@ -1434,14 +1435,14 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu):
layout.separator()
- layout.menu("VIEW3D_MT_uv_map", text="UV Unwrap...")
+ layout.menu("VIEW3D_MT_uv_map", text=_("UV Unwrap..."))
layout.separator()
- layout.operator("view3d.edit_mesh_extrude_move_normal", text="Extrude Region")
- layout.operator("view3d.edit_mesh_extrude_individual_move", text="Extrude Individual")
+ layout.operator("view3d.edit_mesh_extrude_move_normal", text=_("Extrude Region"))
+ layout.operator("view3d.edit_mesh_extrude_individual_move", text=_("Extrude Individual"))
layout.operator("mesh.duplicate_move")
- layout.operator("mesh.delete", text="Delete...")
+ layout.operator("mesh.delete", text=_("Delete..."))
layout.separator()
@@ -1462,22 +1463,22 @@ class VIEW3D_MT_edit_mesh(bpy.types.Menu):
class VIEW3D_MT_edit_mesh_specials(bpy.types.Menu):
- bl_label = "Specials"
+ bl_label = _("Specials")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("mesh.subdivide", text="Subdivide")
- layout.operator("mesh.subdivide", text="Subdivide Smooth").smoothness = 1.0
- layout.operator("mesh.merge", text="Merge...")
+ layout.operator("mesh.subdivide", text=_("Subdivide"))
+ layout.operator("mesh.subdivide", text=_("Subdivide Smooth")).smoothness = 1.0
+ layout.operator("mesh.merge", text=_("Merge..."))
layout.operator("mesh.remove_doubles")
- layout.operator("mesh.hide", text="Hide")
- layout.operator("mesh.reveal", text="Reveal")
+ layout.operator("mesh.hide", text=_("Hide"))
+ layout.operator("mesh.reveal", text=_("Reveal"))
layout.operator("mesh.select_inverse")
layout.operator("mesh.flip_normals")
- layout.operator("mesh.vertices_smooth", text="Smooth")
+ layout.operator("mesh.vertices_smooth", text=_("Smooth"))
# layout.operator("mesh.bevel", text="Bevel")
layout.operator("mesh.faces_shade_smooth")
layout.operator("mesh.faces_shade_flat")
@@ -1487,34 +1488,34 @@ class VIEW3D_MT_edit_mesh_specials(bpy.types.Menu):
class VIEW3D_MT_edit_mesh_select_mode(bpy.types.Menu):
- bl_label = "Mesh Select Mode"
+ bl_label = _("Mesh Select Mode")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- 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"
class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
- bl_label = "Extrude"
+ bl_label = _("Extrude")
_extrude_funcs = { \
- "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text="Vertices Only"),
- "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text="Edges Only"),
- "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text="Individual Faces"),
- "REGION": lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region"),
+ "VERT": lambda layout: layout.operator("mesh.extrude_vertices_move", text=_("Vertices Only")),
+ "EDGE": lambda layout: layout.operator("mesh.extrude_edges_move", text=_("Edges Only")),
+ "FACE": lambda layout: layout.operator("mesh.extrude_faces_move", text=_("Individual Faces")),
+ "REGION": lambda layout: layout.operator("view3d.edit_mesh_extrude_move_normal", text=_("Region")),
}
@staticmethod
@@ -1543,7 +1544,7 @@ class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
"Extrude individual elements and move"
- bl_label = "Extrude Individual and Move"
+ bl_label = _("Extrude Individual and Move")
bl_idname = "view3d.edit_mesh_extrude_individual_move"
def execute(self, context):
@@ -1572,7 +1573,7 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
class VIEW3D_OT_edit_mesh_extrude_move(bpy.types.Operator):
"Extrude and move along normals"
- bl_label = "Extrude and Move on Normals"
+ bl_label = _("Extrude and Move on Normals")
bl_idname = "view3d.edit_mesh_extrude_move_normal"
def execute(self, context):
@@ -1597,7 +1598,7 @@ class VIEW3D_OT_edit_mesh_extrude_move(bpy.types.Operator):
class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
- bl_label = "Vertices"
+ bl_label = _("Vertices")
def draw(self, context):
layout = self.layout
@@ -1629,7 +1630,7 @@ class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
class VIEW3D_MT_edit_mesh_edges(bpy.types.Menu):
- bl_label = "Edges"
+ bl_label = _("Edges")
def draw(self, context):
layout = self.layout
@@ -1641,35 +1642,35 @@ class VIEW3D_MT_edit_mesh_edges(bpy.types.Menu):
layout.separator()
layout.operator("mesh.mark_seam")
- layout.operator("mesh.mark_seam", text="Clear Seam").clear = True
+ layout.operator("mesh.mark_seam", text=_("Clear Seam")).clear = True
layout.separator()
layout.operator("mesh.mark_sharp")
- layout.operator("mesh.mark_sharp", text="Clear Sharp").clear = True
+ layout.operator("mesh.mark_sharp", text=_("Clear Sharp")).clear = True
layout.separator()
- layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
- layout.operator("mesh.edge_rotate", text="Rotate Edge CCW").direction = 'CCW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CW")).direction = 'CW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CCW")).direction = 'CCW'
layout.separator()
layout.operator("TRANSFORM_OT_edge_slide")
layout.operator("TRANSFORM_OT_edge_crease")
- layout.operator("mesh.loop_multi_select", text="Edge Loop")
+ layout.operator("mesh.loop_multi_select", text=_("Edge Loop"))
# uiItemO(layout, "Loopcut", 0, "mesh.loop_cut"); // CutEdgeloop(em, 1);
# uiItemO(layout, "Edge Slide", 0, "mesh.edge_slide"); // EdgeSlide(em, 0,0.0);
- layout.operator("mesh.loop_multi_select", text="Edge Ring").ring = True
+ layout.operator("mesh.loop_multi_select", text=_("Edge Ring")).ring = True
layout.operator("mesh.loop_to_region")
layout.operator("mesh.region_to_loop")
class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
- bl_label = "Faces"
+ bl_label = _("Faces")
bl_idname = "VIEW3D_MT_edit_mesh_faces"
def draw(self, context):
@@ -1706,7 +1707,7 @@ class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
# uiItemO(layout, NULL, 0, "mesh.face_mode"); // mesh_set_face_flags(em, 1);
# uiItemBooleanO(layout, NULL, 0, "mesh.face_mode", "clear", 1); // mesh_set_face_flags(em, 0);
- layout.operator("mesh.edge_rotate", text="Rotate Edge CW").direction = 'CW'
+ layout.operator("mesh.edge_rotate", text=_("Rotate Edge CW")).direction = 'CW'
layout.separator()
@@ -1717,13 +1718,13 @@ class VIEW3D_MT_edit_mesh_faces(bpy.types.Menu):
class VIEW3D_MT_edit_mesh_normals(bpy.types.Menu):
- bl_label = "Normals"
+ bl_label = _("Normals")
def draw(self, context):
layout = self.layout
- layout.operator("mesh.normals_make_consistent", text="Recalculate Outside")
- layout.operator("mesh.normals_make_consistent", text="Recalculate Inside").inside = True
+ layout.operator("mesh.normals_make_consistent", text=_("Recalculate Outside"))
+ layout.operator("mesh.normals_make_consistent", text=_("Recalculate Inside")).inside = True
layout.separator()
@@ -1753,7 +1754,7 @@ def draw_curve(self, context):
layout.operator("curve.separate")
layout.operator("curve.make_segment")
layout.operator("curve.cyclic_toggle")
- layout.operator("curve.delete", text="Delete...")
+ layout.operator("curve.delete", text=_("Delete..."))
layout.separator()
@@ -1771,13 +1772,13 @@ def draw_curve(self, context):
class VIEW3D_MT_edit_curve(bpy.types.Menu):
- bl_label = "Curve"
+ bl_label = _("Curve")
draw = draw_curve
class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
- bl_label = "Control Points"
+ bl_label = _("Control Points")
def draw(self, context):
layout = self.layout
@@ -1785,7 +1786,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
edit_object = context.edit_object
if edit_object.type == 'CURVE':
- layout.operator("transform.transform", text="Tilt").mode = 'TILT'
+ layout.operator("transform.transform", text=_("Tilt")).mode = 'TILT'
layout.operator("curve.tilt_clear")
layout.operator("curve.separate")
@@ -1799,7 +1800,7 @@ class VIEW3D_MT_edit_curve_ctrlpoints(bpy.types.Menu):
class VIEW3D_MT_edit_curve_segments(bpy.types.Menu):
- bl_label = "Segments"
+ bl_label = _("Segments")
def draw(self, context):
layout = self.layout
@@ -1809,7 +1810,7 @@ class VIEW3D_MT_edit_curve_segments(bpy.types.Menu):
class VIEW3D_MT_edit_curve_specials(bpy.types.Menu):
- bl_label = "Specials"
+ bl_label = _("Specials")
def draw(self, context):
layout = self.layout
@@ -1827,13 +1828,13 @@ class VIEW3D_MT_edit_curve_showhide(ShowHideMenu, bpy.types.Menu):
class VIEW3D_MT_edit_surface(bpy.types.Menu):
- bl_label = "Surface"
+ bl_label = _("Surface")
draw = draw_curve
class VIEW3D_MT_edit_font(bpy.types.Menu):
- bl_label = "Text"
+ bl_label = _("Text")
def draw(self, context):
layout = self.layout
@@ -1846,14 +1847,14 @@ class VIEW3D_MT_edit_font(bpy.types.Menu):
layout.separator()
- layout.operator("font.style_toggle", text="Toggle Bold").style = 'BOLD'
- layout.operator("font.style_toggle", text="Toggle Italic").style = 'ITALIC'
- layout.operator("font.style_toggle", text="Toggle Underline").style = 'UNDERLINE'
- layout.operator("font.style_toggle", text="Toggle Small Caps").style = 'SMALL_CAPS'
+ layout.operator("font.style_toggle", text=_("Toggle Bold")).style = 'BOLD'
+ layout.operator("font.style_toggle", text=_("Toggle Italic")).style = 'ITALIC'
+ layout.operator("font.style_toggle", text=_("Toggle Underline")).style = 'UNDERLINE'
+ layout.operator("font.style_toggle", text=_("Toggle Small Caps")).style = 'SMALL_CAPS'
class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
- bl_label = "Special Characters"
+ bl_label = _("Special Characters")
def draw(self, context):
layout = self.layout
@@ -1887,7 +1888,7 @@ class VIEW3D_MT_edit_text_chars(bpy.types.Menu):
class VIEW3D_MT_edit_meta(bpy.types.Menu):
- bl_label = "Metaball"
+ bl_label = _("Metaball")
def draw(self, context):
layout = self.layout
@@ -1906,7 +1907,7 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
layout.separator()
- layout.operator("mball.delete_metaelems", text="Delete...")
+ layout.operator("mball.delete_metaelems", text=_("Delete..."))
layout.operator("mball.duplicate_metaelems")
layout.separator()
@@ -1920,18 +1921,18 @@ class VIEW3D_MT_edit_meta(bpy.types.Menu):
class VIEW3D_MT_edit_meta_showhide(bpy.types.Menu):
- bl_label = "Show/Hide"
+ bl_label = _("Show/Hide")
def draw(self, context):
layout = self.layout
- layout.operator("mball.reveal_metaelems", text="Show Hidden")
- layout.operator("mball.hide_metaelems", text="Hide Selected")
- layout.operator("mball.hide_metaelems", text="Hide Unselected").unselected = True
+ layout.operator("mball.reveal_metaelems", text=_("Show Hidden"))
+ layout.operator("mball.hide_metaelems", text=_("Hide Selected"))
+ layout.operator("mball.hide_metaelems", text=_("Hide Unselected")).unselected = True
class VIEW3D_MT_edit_lattice(bpy.types.Menu):
- bl_label = "Lattice"
+ bl_label = _("Lattice")
def draw(self, context):
layout = self.layout
@@ -1953,7 +1954,7 @@ class VIEW3D_MT_edit_lattice(bpy.types.Menu):
class VIEW3D_MT_edit_armature(bpy.types.Menu):
- bl_label = "Armature"
+ bl_label = _("Armature")
def draw(self, context):
layout = self.layout
@@ -1981,15 +1982,15 @@ class VIEW3D_MT_edit_armature(bpy.types.Menu):
layout.separator()
- layout.operator("armature.subdivide", text="Subdivide")
- layout.operator("armature.switch_direction", text="Switch Direction")
+ layout.operator("armature.subdivide", text=_("Subdivide"))
+ layout.operator("armature.switch_direction", text=_("Switch Direction"))
layout.separator()
layout.operator_context = 'EXEC_AREA'
- layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
- layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
- layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Left/Right")).type = 'XAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Front/Back")).type = 'YAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Top/Bottom")).type = 'ZAXIS'
layout.operator("armature.flip_names")
layout.separator()
@@ -2004,41 +2005,41 @@ class VIEW3D_MT_edit_armature(bpy.types.Menu):
layout.separator()
- layout.menu("VIEW3D_MT_bone_options_toggle", text="Bone Settings")
+ layout.menu("VIEW3D_MT_bone_options_toggle", text=_("Bone Settings"))
class VIEW3D_MT_armature_specials(bpy.types.Menu):
- bl_label = "Specials"
+ bl_label = _("Specials")
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
- layout.operator("armature.subdivide", text="Subdivide")
- layout.operator("armature.switch_direction", text="Switch Direction")
+ layout.operator("armature.subdivide", text=_("Subdivide"))
+ layout.operator("armature.switch_direction", text=_("Switch Direction"))
layout.separator()
layout.operator_context = 'EXEC_REGION_WIN'
- layout.operator("armature.autoside_names", text="AutoName Left/Right").type = 'XAXIS'
- layout.operator("armature.autoside_names", text="AutoName Front/Back").type = 'YAXIS'
- layout.operator("armature.autoside_names", text="AutoName Top/Bottom").type = 'ZAXIS'
- layout.operator("armature.flip_names", text="Flip Names")
+ layout.operator("armature.autoside_names", text=_("AutoName Left/Right")).type = 'XAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Front/Back")).type = 'YAXIS'
+ layout.operator("armature.autoside_names", text=_("AutoName Top/Bottom")).type = 'ZAXIS'
+ layout.operator("armature.flip_names", text=_("Flip Names"))
class VIEW3D_MT_edit_armature_parent(bpy.types.Menu):
- bl_label = "Parent"
+ bl_label = _("Parent")
def draw(self, context):
layout = self.layout
- layout.operator("armature.parent_set", text="Make")
- layout.operator("armature.parent_clear", text="Clear")
+ layout.operator("armature.parent_set", text=_("Make"))
+ layout.operator("armature.parent_clear", text=_("Clear"))
class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
- bl_label = "Bone Roll"
+ bl_label = _("Bone Roll")
def draw(self, context):
layout = self.layout
@@ -2047,7 +2048,7 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
layout.separator()
- layout.operator("transform.transform", text="Set Roll").mode = 'BONE_ROLL'
+ layout.operator("transform.transform", text=_("Set Roll")).mode = 'BONE_ROLL'
# ********** Panel **********
@@ -2055,7 +2056,7 @@ class VIEW3D_MT_edit_armature_roll(bpy.types.Menu):
class VIEW3D_PT_view3d_properties(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "View"
+ bl_label = _("View")
@classmethod
def poll(cls, context):
@@ -2070,24 +2071,24 @@ class VIEW3D_PT_view3d_properties(bpy.types.Panel):
col = layout.column()
col.active = view.region_3d.view_perspective != 'CAMERA'
col.prop(view, "lens")
- col.label(text="Lock to Object:")
+ col.label(text=_("Lock to Object:"))
col.prop(view, "lock_object", text="")
if view.lock_object and view.lock_object.type == 'ARMATURE':
col.prop_search(view, "lock_bone", view.lock_object.data, "bones", text="")
elif not view.lock_object:
- col.prop(view, "lock_cursor", text="Lock to Cursor")
+ col.prop(view, "lock_cursor", text=_("Lock to Cursor"))
col = layout.column()
col.prop(view, "lock_camera")
col = layout.column(align=True)
- col.label(text="Clip:")
- col.prop(view, "clip_start", text="Start")
- col.prop(view, "clip_end", text="End")
+ col.label(text=_("Clip:"))
+ col.prop(view, "clip_start", text=_("Start"))
+ col.prop(view, "clip_end", text=_("End"))
subcol = col.column()
subcol.enabled = not view.lock_camera_and_layers
- subcol.label(text="Local Camera:")
+ subcol.label(text=_("Local Camera:"))
subcol.prop(view, "camera", text="")
layout.column().prop(view, "cursor_location")
@@ -2096,7 +2097,7 @@ class VIEW3D_PT_view3d_properties(bpy.types.Panel):
class VIEW3D_PT_view3d_name(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Item"
+ bl_label = _("Item")
@classmethod
def poll(cls, context):
@@ -2121,7 +2122,7 @@ class VIEW3D_PT_view3d_name(bpy.types.Panel):
class VIEW3D_PT_view3d_display(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Display"
+ bl_label = _("Display")
bl_options = {'DEFAULT_CLOSED'}
@classmethod
@@ -2153,7 +2154,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
col = layout.column()
col.active = display_all
split = col.split(percentage=0.55)
- split.prop(view, "show_floor", text="Grid Floor")
+ split.prop(view, "show_floor", text=_("Grid Floor"))
row = split.row(align=True)
row.prop(view, "show_axis_x", text="X", toggle=True)
@@ -2162,14 +2163,14 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
sub = col.column(align=True)
sub.active = (display_all and view.show_floor)
- sub.prop(view, "grid_lines", text="Lines")
- sub.prop(view, "grid_scale", text="Scale")
+ sub.prop(view, "grid_lines", text=_("Lines"))
+ sub.prop(view, "grid_scale", text=_("Scale"))
subsub = sub.column(align=True)
subsub.active = scene.unit_settings.system == 'NONE'
- subsub.prop(view, "grid_subdivisions", text="Subdivisions")
+ subsub.prop(view, "grid_subdivisions", text=_("Subdivisions"))
col = layout.column()
- col.label(text="Shading:")
+ col.label(text=_("Shading:"))
col.prop(gs, "material_mode", text="")
col.prop(view, "show_textured_solid")
@@ -2177,7 +2178,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
region = view.region_quadview
- layout.operator("screen.region_quadview", text="Toggle Quad View")
+ layout.operator("screen.region_quadview", text=_("Toggle Quad View"))
if region:
col = layout.column()
@@ -2193,7 +2194,7 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
class VIEW3D_PT_view3d_meshdisplay(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Mesh Display"
+ bl_label = _("Mesh Display")
@classmethod
def poll(cls, context):
@@ -2206,22 +2207,22 @@ class VIEW3D_PT_view3d_meshdisplay(bpy.types.Panel):
mesh = context.active_object.data
col = layout.column()
- col.label(text="Overlays:")
- col.prop(mesh, "show_edges", text="Edges")
- col.prop(mesh, "show_faces", text="Faces")
- col.prop(mesh, "show_edge_crease", text="Creases")
- col.prop(mesh, "show_edge_bevel_weight", text="Bevel Weights")
- col.prop(mesh, "show_edge_seams", text="Seams")
- col.prop(mesh, "show_edge_sharp", text="Sharp")
+ col.label(text=_("Overlays:"))
+ col.prop(mesh, "show_edges", text=_("Edges"))
+ col.prop(mesh, "show_faces", text=_("Faces"))
+ col.prop(mesh, "show_edge_crease", text=_("Creases"))
+ col.prop(mesh, "show_edge_bevel_weight", text=_("Bevel Weights"))
+ col.prop(mesh, "show_edge_seams", text=_("Seams"))
+ col.prop(mesh, "show_edge_sharp", text=_("Sharp"))
col.separator()
- col.label(text="Normals:")
- col.prop(mesh, "show_normal_face", text="Face")
- col.prop(mesh, "show_normal_vertex", text="Vertex")
- col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
+ col.label(text=_("Normals:"))
+ col.prop(mesh, "show_normal_face", text=_("Face"))
+ col.prop(mesh, "show_normal_vertex", text=_("Vertex"))
+ col.prop(context.scene.tool_settings, "normal_size", text=_("Normal Size"))
col.separator()
- col.label(text="Numerics:")
+ col.label(text=_("Numerics:"))
col.prop(mesh, "show_extra_edge_length")
col.prop(mesh, "show_extra_face_angle")
col.prop(mesh, "show_extra_face_area")
@@ -2230,7 +2231,7 @@ class VIEW3D_PT_view3d_meshdisplay(bpy.types.Panel):
class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Curve Display"
+ bl_label = _("Curve Display")
@classmethod
def poll(cls, context):
@@ -2243,16 +2244,16 @@ class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel):
curve = context.active_object.data
col = layout.column()
- col.label(text="Overlays:")
- col.prop(curve, "show_handles", text="Handles")
- col.prop(curve, "show_normal_face", text="Normals")
- col.prop(context.scene.tool_settings, "normal_size", text="Normal Size")
+ col.label(text=_("Overlays:"))
+ col.prop(curve, "show_handles", text=_("Handles"))
+ col.prop(curve, "show_normal_face", text=_("Normals"))
+ col.prop(context.scene.tool_settings, "normal_size", text=_("Normal Size"))
class VIEW3D_PT_background_image(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Background Images"
+ bl_label = _("Background Images")
bl_options = {'DEFAULT_CLOSED'}
@classmethod
@@ -2273,7 +2274,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
view = context.space_data
col = layout.column()
- col.operator("view3d.background_image_add", text="Add Image")
+ col.operator("view3d.background_image_add", text=_("Add Image"))
for i, bg in enumerate(view.background_images):
layout.active = view.show_background_images
@@ -2283,10 +2284,10 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
if bg.image:
row.prop(bg.image, "name", text="", emboss=False)
else:
- row.label(text="Not Set")
+ row.label(text=_("Not Set"))
row.operator("view3d.background_image_remove", text="", emboss=False, icon='X').index = i
- box.prop(bg, "view_axis", text="Axis")
+ box.prop(bg, "view_axis", text=_("Axis"))
if bg.show_expanded:
row = box.row()
@@ -2305,7 +2306,7 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
class VIEW3D_PT_transform_orientations(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Transform Orientations"
+ bl_label = _("Transform Orientations")
bl_options = {'DEFAULT_CLOSED'}
@classmethod
@@ -2321,19 +2322,19 @@ class VIEW3D_PT_transform_orientations(bpy.types.Panel):
col = layout.column()
col.prop(view, "transform_orientation")
- col.operator("transform.create_orientation", text="Create")
+ col.operator("transform.create_orientation", text=_("Create"))
orientation = view.current_orientation
if orientation:
col.prop(orientation, "name")
- col.operator("transform.delete_orientation", text="Delete")
+ col.operator("transform.delete_orientation", text=_("Delete"))
class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'UI'
- bl_label = "Skeleton Sketching"
+ bl_label = _("Skeleton Sketching")
bl_options = {'DEFAULT_CLOSED'}
@classmethod
@@ -2372,13 +2373,13 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
col.prop(toolsettings, "etch_number")
col.prop(toolsettings, "etch_side")
- col.operator("sketch.convert", text="Convert")
+ col.operator("sketch.convert", text=_("Convert"))
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 19c3224f138..d029de3786c 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():
@@ -30,30 +31,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)
@@ -116,8 +117,8 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, bpy.types.Panel):
col.operator("transform.translate")
col.operator("transform.rotate")
col.operator("transform.resize", text="Scale")
- 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:")
@@ -1008,7 +1009,7 @@ class VIEW3D_PT_tools_brush_appearance(PaintPanel, bpy.types.Panel):
brush = settings.brush
if brush is None: # unlikely but can happen
- layout.label(text="Brush Unset")
+ layout.label(text=_("Brush Unset"))
return
col = layout.column()
diff --git a/release/scripts/templates/batch_export.py b/release/scripts/templates/batch_export.py
index aa0e601725b..aa0e601725b 100644..100755
--- a/release/scripts/templates/batch_export.py
+++ b/release/scripts/templates/batch_export.py
diff --git a/release/scripts/templates/ui_menu.py b/release/scripts/templates/ui_menu.py
index d3923b5b083..d3923b5b083 100644..100755
--- a/release/scripts/templates/ui_menu.py
+++ b/release/scripts/templates/ui_menu.py
diff --git a/release/scripts/templates/ui_menu_simple.py b/release/scripts/templates/ui_menu_simple.py
index 2129dfd81a4..2129dfd81a4 100644..100755
--- a/release/scripts/templates/ui_menu_simple.py
+++ b/release/scripts/templates/ui_menu_simple.py
diff --git a/release/scripts/templates/ui_panel_simple.py b/release/scripts/templates/ui_panel_simple.py
index cde6126b626..cde6126b626 100644..100755
--- a/release/scripts/templates/ui_panel_simple.py
+++ b/release/scripts/templates/ui_panel_simple.py