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:
-rwxr-xr-xpo/POTFILES.in31
-rwxr-xr-xpo/update_pot.py2
-rw-r--r--release/scripts/startup/bl_operators/object.py5
-rw-r--r--release/scripts/startup/bl_operators/object_align.py4
-rw-r--r--release/scripts/startup/bl_operators/object_randomize_transform.py4
-rw-r--r--release/scripts/startup/bl_operators/screen_play_rendered_anim.py4
-rw-r--r--release/scripts/startup/bl_operators/wm.py5
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py302
-rw-r--r--release/scripts/startup/bl_ui/space_userpref_keymap.py145
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py162
-rw-r--r--source/blender/blenfont/BLF_api.h1
-rw-r--r--source/blender/blenfont/CMakeLists.txt1
-rw-r--r--source/blender/blenfont/intern/blf.c6
-rwxr-xr-xsource/blender/blenfont/intern/blf_gettext.c40
-rw-r--r--source/blender/blenfont/intern/blf_lang.c2
-rw-r--r--source/blender/editors/interface/interface_ops.c4
-rw-r--r--source/blender/editors/interface/interface_style.c39
-rw-r--r--source/blender/editors/interface/interface_templates.c8
-rw-r--r--source/blender/editors/object/object_add.c32
-rw-r--r--source/blender/editors/object/object_constraint.c28
-rw-r--r--source/blender/editors/object/object_edit.c2
-rw-r--r--source/blender/editors/object/object_group.c28
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c24
-rw-r--r--source/blender/editors/object/object_select.c42
-rw-r--r--source/blender/editors/render/render_view.c6
-rw-r--r--source/blender/editors/screen/area.c36
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c21
-rw-r--r--source/blender/editors/space_view3d/view3d_fly.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c8
-rw-r--r--source/blender/editors/util/CMakeLists.txt1
-rw-r--r--source/blender/editors/util/SConscript2
-rw-r--r--source/blender/editors/util/undo.c14
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/RNA_define.h3
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt1
-rw-r--r--source/blender/makesrna/intern/rna_access.c44
-rw-r--r--source/blender/makesrna/intern/rna_curve.c14
-rw-r--r--source/blender/makesrna/intern/rna_define.c24
-rw-r--r--source/blender/makesrna/intern/rna_object.c31
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c28
-rw-r--r--source/blender/makesrna/intern/rna_space.c40
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c505
-rw-r--r--source/blender/python/generic/blf_py_api.c22
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c3
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c4
-rw-r--r--source/blender/windowmanager/intern/wm_window.c2
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp15
49 files changed, 946 insertions, 815 deletions
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 8fa088536da..9d47549c48b 100755
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,5 +1,21 @@
+release/scripts/addons/io_anim_bvh/__init__.py
+release/scripts/addons/io_curve_svg/__init__.py
+release/scripts/addons/io_mesh_ply/__init__.py
+release/scripts/addons/io_scene_fbx/__init__.py
+release/scripts/addons/io_scene_x3d/__init__.py
+release/scripts/addons/rigify/metarigs/human.py
+release/scripts/addons/rigify/rigs/spine.py
+release/scripts/addons/rigify/utils.py
+
+release/scripts/startup/bl_operators/object.py
+release/scripts/startup/bl_operators/object_align.py
+release/scripts/startup/bl_operators/object_randomize_transform.py
+release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+release/scripts/startup/bl_operators/wm.py
+
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_userpref.py
+release/scripts/startup/bl_ui/space_userpref_keymap.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -21,6 +37,7 @@ source/blender/editors/curve/editfont.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/interface/interface_ops.c
+source/blender/editors/interface/interface_templates.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/interface/view2d_ops.c
@@ -33,6 +50,7 @@ source/blender/editors/mesh/loopcut.c
source/blender/editors/object/object_add.c
source/blender/editors/object/object_constraint.c
source/blender/editors/object/object_edit.c
+source/blender/editors/object/object_group.c
source/blender/editors/object/object_ops.c
source/blender/editors/object/object_relations.c
source/blender/editors/object/object_select.c
@@ -45,6 +63,7 @@ source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_opengl.c
+source/blender/editors/render/render_view.c
source/blender/editors/screen/area.c
source/blender/editors/screen/screendump.c
@@ -90,7 +109,9 @@ source/blender/editors/space_sequencer/sequencer_select.c
source/blender/editors/space_text/text_ops.c
+source/blender/editors/space_view3d/view3d_buttons.c
source/blender/editors/space_view3d/view3d_edit.c
+source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_header.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
@@ -98,13 +119,23 @@ source/blender/editors/space_view3d/view3d_toolbar.c
source/blender/editors/transform/transform_ops.c
+source/blender/editors/util/undo.c
+
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
+source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_ID.c
+source/blender/makesrna/intern/rna_object.c
+source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_scene.c
+source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_ui_api.c
+source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_operators.c
+source/blender/windowmanager/intern/wm_window.c
+
+
diff --git a/po/update_pot.py b/po/update_pot.py
index 3631a8cd40b..5b5fe35ae35 100755
--- a/po/update_pot.py
+++ b/po/update_pot.py
@@ -8,7 +8,7 @@ GETTEXT_XGETTEXT_EXECUTABLE="xgettext"
SOURCE_DIR=".."
DOMAIN="blender"
-cmd = "%s --files-from=%s/po/POTFILES.in --keyword=_ --keyword=gettext --directory=%s --output=%s/po/%s.pot --from-code=utf-8" % (
+cmd = "%s --files-from=%s/po/POTFILES.in --keyword=_ --keyword=N_ --directory=%s --output=%s/po/%s.pot --from-code=utf-8" % (
GETTEXT_XGETTEXT_EXECUTABLE, SOURCE_DIR, SOURCE_DIR, SOURCE_DIR, DOMAIN)
os.system( cmd )
diff --git a/release/scripts/startup/bl_operators/object.py b/release/scripts/startup/bl_operators/object.py
index 0342a14a1b2..a23982e8e4e 100644
--- a/release/scripts/startup/bl_operators/object.py
+++ b/release/scripts/startup/bl_operators/object.py
@@ -20,6 +20,7 @@
import bpy
from bpy.props import StringProperty, BoolProperty, EnumProperty, IntProperty
+from blf import gettext as _
class SelectPattern(bpy.types.Operator):
@@ -412,7 +413,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):
@@ -470,7 +471,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):
diff --git a/release/scripts/startup/bl_operators/object_align.py b/release/scripts/startup/bl_operators/object_align.py
index 644f30a4745..89b02fc98b0 100644
--- a/release/scripts/startup/bl_operators/object_align.py
+++ b/release/scripts/startup/bl_operators/object_align.py
@@ -20,7 +20,7 @@
import bpy
from mathutils import Vector
-
+from blf import gettext as _
def align_objects(align_x, align_y, align_z, align_mode, relative_to):
@@ -236,7 +236,7 @@ from bpy.props import EnumProperty
class AlignObjects(bpy.types.Operator):
'''Align Objects'''
bl_idname = "object.align"
- bl_label = "Align Objects"
+ bl_label = _("Align Objects")
bl_options = {'REGISTER', 'UNDO'}
align_mode = EnumProperty(items=(
diff --git a/release/scripts/startup/bl_operators/object_randomize_transform.py b/release/scripts/startup/bl_operators/object_randomize_transform.py
index 9dc5086086f..68f97f63c73 100644
--- a/release/scripts/startup/bl_operators/object_randomize_transform.py
+++ b/release/scripts/startup/bl_operators/object_randomize_transform.py
@@ -19,7 +19,7 @@
# <pep8 compliant>
import bpy
-
+from blf import gettext as _
def randomize_selected(seed, delta, loc, rot, scale, scale_even):
@@ -90,7 +90,7 @@ 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",
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 64af25e7b0f..017b3b82d0b 100644
--- a/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
+++ b/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
@@ -26,7 +26,7 @@
import bpy
import os
-
+from blf import gettext as _
def guess_player_path(preset):
import sys
@@ -66,7 +66,7 @@ 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'}
def execute(self, context):
diff --git a/release/scripts/startup/bl_operators/wm.py b/release/scripts/startup/bl_operators/wm.py
index fcc30ecbb4b..de071a155f3 100644
--- a/release/scripts/startup/bl_operators/wm.py
+++ b/release/scripts/startup/bl_operators/wm.py
@@ -21,6 +21,7 @@
import bpy
from bpy.props import StringProperty, BoolProperty, IntProperty, FloatProperty
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):
@@ -546,6 +547,7 @@ 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 = ""
@@ -914,7 +916,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
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index 265debd10f4..ed4f47860a3 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -64,10 +64,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 +85,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'
@@ -94,7 +94,7 @@ class USERPREF_HT_header(bpy.types.Header):
layout.operator("wm.keyconfig_import")
elif userpref.active_section == 'ADDONS':
layout.operator("wm.addon_install")
- layout.menu("USERPREF_MT_addons_dev_guides", text=" Addons Developer Guides", icon='INFO')
+ layout.menu("USERPREF_MT_addons_dev_guides", text=_(" Addons Developer Guides"), icon='INFO')
elif userpref.active_section == 'THEMES':
layout.operator("ui.reset_default_theme")
@@ -114,7 +114,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
@@ -151,7 +151,7 @@ class USERPREF_MT_splash(bpy.types.Menu):
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 +169,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 +183,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 +210,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 +227,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 +248,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 +266,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.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.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 +383,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 +395,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,38 +435,38 @@ 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.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)
@@ -481,14 +481,14 @@ class USERPREF_PT_system(bpy.types.Panel):
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.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)
@@ -496,7 +496,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'}
@@ -554,71 +554,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()
@@ -654,7 +654,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()
@@ -679,7 +679,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'}
@@ -697,22 +697,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="")
@@ -729,7 +729,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")
@@ -744,18 +744,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):
@@ -768,7 +768,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)
@@ -776,19 +776,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()
@@ -796,10 +796,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)
@@ -810,8 +810,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()
@@ -847,22 +847,22 @@ class USERPREF_PT_input(bpy.types.Panel, InputKeyMapPanel):
class USERPREF_MT_addons_dev_guides(bpy.types.Menu):
- bl_label = "Addons develoment guides"
+ bl_label = _("Addons develoment guides")
# menu to open webpages with addons development guides
def draw(self, context):
layout = self.layout
- layout.operator('wm.url_open', text='API Concepts'
+ layout.operator('wm.url_open', text=_('API Concepts')
).url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
- layout.operator('wm.url_open', text='Addons guidelines',
+ layout.operator('wm.url_open', text=_('Addons guidelines')
).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',
+ layout.operator('wm.url_open', text=_('How to share your addon')
).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'}
@@ -889,10 +889,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", text="") # , expand=True, too slow with dynamic enum.
- col.label(text="Supported Level")
+ col.label(text=_("Supported Level"))
col.prop(context.window_manager, "addon_support", expand=True)
col = split.column()
@@ -952,31 +952,31 @@ 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')
if info["wiki_url"] or info["tracker_url"]:
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 info["wiki_url"] and info["tracker_url"]:
split.separator()
@@ -991,7 +991,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):
@@ -1010,9 +1010,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)
@@ -1031,9 +1031,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)
@@ -1043,17 +1043,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
@@ -1192,7 +1192,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 e99cefb91b8..d2e672e0c35 100644
--- a/release/scripts/startup/bl_ui/space_userpref_keymap.py
+++ b/release/scripts/startup/bl_ui/space_userpref_keymap.py
@@ -19,91 +19,92 @@
# <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', []),
]
@@ -130,7 +131,7 @@ class USERPREF_MT_keyconfigs(bpy.types.Menu):
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"
@@ -181,7 +182,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 +190,9 @@ class InputKeyMapPanel:
if km.is_modal:
row.label(text="", icon='LINKED')
if km.is_user_defined:
- op = row.operator("wm.keymap_restore", text="Restore")
+ op = row.operator("wm.keymap_restore", text=_("Restore"))
else:
- op = row.operator("wm.keymap_edit", text="Edit")
+ op = row.operator("wm.keymap_edit", text=_("Edit"))
if km.show_expanded_children:
if children:
@@ -351,9 +352,9 @@ class InputKeyMapPanel:
row.label()
if km.is_user_defined:
- op = row.operator("wm.keymap_restore", text="Restore")
+ op = row.operator("wm.keymap_restore", text=_("Restore"))
else:
- op = row.operator("wm.keymap_edit", text="Edit")
+ op = row.operator("wm.keymap_edit", text=_("Edit"))
for kmi in filtered_items:
self.draw_kmi(display_keymaps, kc, km, kmi, col, 1)
@@ -384,7 +385,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
@@ -534,14 +535,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'})
- 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,7 +581,8 @@ 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'})
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index bda4bb899ac..76748e61640 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -120,62 +120,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()
@@ -184,37 +184,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'
@@ -222,20 +222,20 @@ 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):
@@ -735,26 +735,26 @@ class VIEW3D_MT_object(bpy.types.Menu):
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):
@@ -847,46 +847,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
@@ -901,7 +901,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
@@ -912,68 +912,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()
@@ -1873,14 +1873,14 @@ 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):
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h
index e305345d6bc..9847b6ce838 100644
--- a/source/blender/blenfont/BLF_api.h
+++ b/source/blender/blenfont/BLF_api.h
@@ -224,5 +224,6 @@ extern int blf_mono_font_render; // dont mess drawing with render threads.
extern int blf_unifont;
extern int blf_unifont_render; // dont mess drawing with render threads.
#define _(msgid) BLF_gettext(msgid)
+#define N_(msgid) msgid
#endif /* BLF_API_H */
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index b915764c1bb..118a081bf69 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -40,6 +40,7 @@ set(SRC
intern/blf.c
intern/blf_dir.c
intern/blf_font.c
+ intern/blf_gettext.c
intern/blf_glyph.c
intern/blf_lang.c
intern/blf_util.c
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index b5ad6ab8ae9..643c2826403 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -37,7 +37,6 @@
#include <math.h>
#include <ft2build.h>
-#include <libintl.h>
#include FT_FREETYPE_H
#include FT_GLYPH_H
@@ -125,11 +124,6 @@ void BLF_cache_clear(void)
}
}
-char* BLF_gettext(const char *msgid)
-{
- return gettext( msgid );
-}
-
static int blf_search(const char *name)
{
FontBLF *font;
diff --git a/source/blender/blenfont/intern/blf_gettext.c b/source/blender/blenfont/intern/blf_gettext.c
new file mode 100755
index 00000000000..c82baed555c
--- /dev/null
+++ b/source/blender/blenfont/intern/blf_gettext.c
@@ -0,0 +1,40 @@
+/*
+ * $Id: blf_gettext.c 37094 2011-06-02 11:22:22Z xiaoxiangquan $
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * Contributor(s): Blender Foundation.
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+/** \file blender/blenfont/intern/blf_gettext.c
+ * \ingroup blf
+ */
+
+#include <libintl.h>
+#include <string.h>
+
+char* BLF_gettext(const char *msgid)
+{
+ if( msgid!=NULL && strlen(msgid)>0 )
+ return gettext( msgid );
+ return "";
+}
diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
index 6a3e5b1f2ef..4a32d5270b4 100644
--- a/source/blender/blenfont/intern/blf_lang.c
+++ b/source/blender/blenfont/intern/blf_lang.c
@@ -39,7 +39,7 @@
#ifdef INTERNATIONAL
#include <locale.h>
-#include "libintl.h"
+#include <libintl.h>
#include "DNA_listBase.h"
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index e2bfedcf3ea..6a35ba9baf1 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -217,9 +217,9 @@ static int reset_default_theme_exec(bContext *C, wmOperator *UNUSED(op))
static void UI_OT_reset_default_theme(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Reset to Default Theme";
+ ot->name= _("Reset to Default Theme");
ot->idname= "UI_OT_reset_default_theme";
- ot->description= "Reset to the default theme colors";
+ ot->description= _("Reset to the default theme colors");
/* callbacks */
ot->exec= reset_default_theme_exec;
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 9ebf7c9cd4f..64280bbda03 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -351,39 +351,14 @@ void uiStyleInit(void)
/* XXX Maybe it's bad to do this */
if(style==NULL) {
- if( strcmp(lang_set,"hr.UTF-8")==0
- || strcmp(lang_set,"ar.UTF-8")==0
- || strcmp(lang_set,"bg.UTF-8")==0
- || strcmp(lang_set,"ca.UTF-8")==0
- || strcmp(lang_set,"cs.UTF-8")==0
- || strcmp(lang_set,"de.UTF-8")==0
- || strcmp(lang_set,"el.UTF-8")==0
- || strcmp(lang_set,"es.UTF-8")==0
- || strcmp(lang_set,"fi.UTF-8")==0
- || strcmp(lang_set,"fr.UTF-8")==0
- || strcmp(lang_set,"it.UTF-8")==0
- || strcmp(lang_set,"ja.UTF-8")==0
- || strcmp(lang_set,"ko.UTF-8")==0
- || strcmp(lang_set,"pl.UTF-8")==0
- || strcmp(lang_set,"ro.UTF-8")==0
- || strcmp(lang_set,"ru.UTF-8")==0
- || strcmp(lang_set,"sr.UTF-8")==0
- || strcmp(lang_set,"sv.UTF-8")==0
- || strcmp(lang_set,"uk.UTF-8")==0
- || strcmp(lang_set,"zh_CN.UTF-8")==0
- )
+ // load unifont only when need. It takes 15MB memories
+ // get_datatoc_bunifont_ttf() may return null, BLF_load_mem_unique() will handle it
+ if( blf_unifont == -1 )
+ blf_unifont= BLF_load_mem_unique("unifont", (unsigned char *)get_datatoc_bunifont_ttf(), datatoc_bunifont_ttf_size);
+ if( blf_unifont != -1 )
{
- // load unifont only when need. It takes 15MB memories
- // get_datatoc_bunifont_ttf() may return null, BLF_load_mem_unique() will handle it
- if( blf_unifont == -1 )
- blf_unifont= BLF_load_mem_unique("unifont", (unsigned char *)get_datatoc_bunifont_ttf(), datatoc_bunifont_ttf_size);
- if( blf_unifont != -1 )
- {
- BLF_size(blf_unifont, 12, 72);
- ui_style_new(&U.uistyles, "Unifont Style", blf_unifont );
- }
- else
- ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT );
+ BLF_size(blf_unifont, 12, 72);
+ ui_style_new(&U.uistyles, "Unifont Style", blf_unifont );
}
else
ui_style_new(&U.uistyles, "Default Style", UIFONT_DEFAULT );
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index bbd1bd8773b..625ca4c70ec 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -1288,10 +1288,10 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
if(coba==NULL) return;
- bt= uiDefBut(block, BUT, 0, "Add", 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
+ bt= uiDefBut(block, BUT, 0, _("Add"), 0+xoffs,line1_y,40,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Add a new color stop to the colorband");
uiButSetNFunc(bt, colorband_add_cb, MEM_dupallocN(cb), coba);
- bt= uiDefBut(block, BUT, 0, "Delete", 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position");
+ bt= uiDefBut(block, BUT, 0, _("Delete"), 45+xoffs,line1_y,45,UI_UNIT_Y, NULL, 0, 0, 0, 0, "Delete the active position");
uiButSetNFunc(bt, colorband_del_cb, MEM_dupallocN(cb), coba);
@@ -1301,8 +1301,8 @@ static void colorband_buttons_large(uiLayout *layout, uiBlock *block, ColorBand
uiDefButS(block, NUM, 0, "", 120+xoffs,line1_y,80, UI_UNIT_Y, &coba->cur, 0.0, (float)(MAX2(0, coba->tot-1)), 0, 0, "Choose active color stop");
- bt= uiDefButS(block, MENU, 0, "Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4",
- 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, "Set interpolation between color stops");
+ bt= uiDefButS(block, MENU, 0, _("Interpolation %t|Ease %x1|Cardinal %x3|Linear %x0|B-Spline %x2|Constant %x4"),
+ 210+xoffs, line1_y, 90, UI_UNIT_Y, &coba->ipotype, 0.0, 0.0, 0, 0, _("Set interpolation between color stops"));
uiButSetNFunc(bt, rna_update_cb, MEM_dupallocN(cb), NULL);
uiBlockEndAlign(block);
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index bd7d6c826a8..321ac8be102 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -351,7 +351,7 @@ void OBJECT_OT_add(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", object_type_items, 0, "Type", "");
+ RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(object_type_items), 0, "Type", "");
ED_object_add_generic_props(ot, TRUE);
}
@@ -443,7 +443,7 @@ void OBJECT_OT_effector_add(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- ot->prop= RNA_def_enum(ot->srna, "type", field_type_items, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(field_type_items), 0, "Type", "");
ED_object_add_generic_props(ot, TRUE);
}
@@ -575,7 +575,7 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot)
/* flags */
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
- RNA_def_enum(ot->srna, "type", metaelem_type_items, 0, "Primitive", "");
+ RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(metaelem_type_items), 0, "Primitive", "");
ED_object_add_generic_props(ot, TRUE);
}
@@ -708,16 +708,16 @@ static int object_lamp_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_lamp_add(wmOperatorType *ot)
{
static EnumPropertyItem lamp_type_items[] = {
- {LA_LOCAL, "POINT", ICON_LAMP_POINT, "Point", "Omnidirectional point light source"},
- {LA_SUN, "SUN", ICON_LAMP_SUN, "Sun", "Constant direction parallel ray light source"},
- {LA_SPOT, "SPOT", ICON_LAMP_SPOT, "Spot", "Directional cone light source"},
- {LA_HEMI, "HEMI", ICON_LAMP_HEMI, "Hemi", "180 degree constant light source"},
- {LA_AREA, "AREA", ICON_LAMP_AREA, "Area", "Directional area light source"},
+ {LA_LOCAL, "POINT", ICON_LAMP_POINT, N_("Point"), N_("Omnidirectional point light source")},
+ {LA_SUN, "SUN", ICON_LAMP_SUN, N_("Sun"), N_("Constant direction parallel ray light source")},
+ {LA_SPOT, "SPOT", ICON_LAMP_SPOT, N_("Spot"), N_("Directional cone light source")},
+ {LA_HEMI, "HEMI", ICON_LAMP_HEMI, N_("Hemi"), N_("180 degree constant light source")},
+ {LA_AREA, "AREA", ICON_LAMP_AREA, N_("Area"), N_("Directional area light source")},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
- ot->name= "Add Lamp";
- ot->description = "Add a lamp object to the scene";
+ ot->name= _("Add Lamp");
+ ot->description = _("Add a lamp object to the scene");
ot->idname= "OBJECT_OT_lamp_add";
/* api callbacks */
@@ -729,7 +729,7 @@ void OBJECT_OT_lamp_add(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", lamp_type_items, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(lamp_type_items), 0, "Type", "");
ED_object_add_generic_props(ot, FALSE);
}
@@ -1019,8 +1019,8 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Make Duplicates Real";
- ot->description = "Make dupli objects attached to this object real";
+ ot->name= _("Make Duplicates Real");
+ ot->description = _("Make dupli objects attached to this object real");
ot->idname= "OBJECT_OT_duplicates_make_real";
/* api callbacks */
@@ -1035,8 +1035,8 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot)
/**************************** Convert **************************/
static EnumPropertyItem convert_target_items[]= {
- {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""},
- {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, "Mesh from Curve/Meta/Surf/Text", ""},
+ {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, N_("Curve from Mesh/Text"), ""},
+ {OB_MESH, "MESH", ICON_OUTLINER_OB_MESH, N_("Mesh from Curve/Meta/Surf/Text"), ""},
{0, NULL, 0, NULL, NULL}};
static void curvetomesh(Scene *scene, Object *ob)
@@ -1397,7 +1397,7 @@ void OBJECT_OT_convert(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "target", convert_target_items, OB_MESH, _("Target"), _("Type of object to convert to"));
+ ot->prop= RNA_def_enum(ot->srna, "target", RNA_enum_items_gettexted(convert_target_items), OB_MESH, _("Target"), _("Type of object to convert to"));
RNA_def_boolean(ot->srna, "keep_original", 0, _("Keep Original"), _("Keep original objects instead of replacing them"));
}
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 14213a0f191..89ac7800c0f 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1048,9 +1048,9 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Clear Object Constraints";
+ ot->name = _("Clear Object Constraints");
ot->idname= "OBJECT_OT_constraints_clear";
- ot->description= "Clear all the constraints for the active Object only";
+ ot->description= _("Clear all the constraints for the active Object only");
/* callbacks */
ot->exec= object_constraints_clear_exec;
@@ -1094,9 +1094,9 @@ static int pose_constraint_copy_exec(bContext *C, wmOperator *op)
void POSE_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Constraints to Selected";
+ ot->name= _("Copy Constraints to Selected");
ot->idname= "POSE_OT_constraints_copy";
- ot->description = "Copy constraints to other selected bones.";
+ ot->description = _("Copy constraints to other selected bones.");
/* api callbacks */
ot->exec= pose_constraint_copy_exec;
@@ -1130,9 +1130,9 @@ static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_constraints_copy(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Copy Constraints to Selected";
+ ot->name= _("Copy Constraints to Selected");
ot->idname= "OBJECT_OT_constraints_copy";
- ot->description = "Copy constraints to other selected objects.";
+ ot->description = _("Copy constraints to other selected objects.");
/* api callbacks */
ot->exec= object_constraint_copy_exec;
@@ -1442,8 +1442,8 @@ static int pose_constraint_add_exec(bContext *C, wmOperator *op)
void OBJECT_OT_constraint_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint";
- ot->description = "Add a constraint to the active object";
+ ot->name= _("Add Constraint");
+ ot->description = _("Add a constraint to the active object");
ot->idname= "OBJECT_OT_constraint_add";
/* api callbacks */
@@ -1461,8 +1461,8 @@ void OBJECT_OT_constraint_add(wmOperatorType *ot)
void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint (with Targets)";
- ot->description = "Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones";
+ ot->name= _("Add Constraint (with Targets)");
+ ot->description = _("Add a constraint to the active object, with target (where applicable) set to the selected Objects/Bones");
ot->idname= "OBJECT_OT_constraint_add_with_targets";
/* api callbacks */
@@ -1480,8 +1480,8 @@ void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot)
void POSE_OT_constraint_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint";
- ot->description = "Add a constraint to the active bone";
+ ot->name= _("Add Constraint");
+ ot->description = _("Add a constraint to the active bone");
ot->idname= "POSE_OT_constraint_add";
/* api callbacks */
@@ -1499,8 +1499,8 @@ void POSE_OT_constraint_add(wmOperatorType *ot)
void POSE_OT_constraint_add_with_targets(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Constraint (with Targets)";
- ot->description = "Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones";
+ ot->name= _("Add Constraint (with Targets)");
+ ot->description = _("Add a constraint to the active bone, with target (where applicable) set to the selected Objects/Bones");
ot->idname= "POSE_OT_constraint_add_with_targets";
/* api callbacks */
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 21e636e3340..1fc7c02fd74 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -2216,7 +2216,7 @@ static int game_property_clear_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_game_property_clear(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Clear Game Property";
+ ot->name= _("Clear Game Property");
ot->idname= "OBJECT_OT_game_property_clear";
/* api callbacks */
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index b1ab68ff087..11883ec56e4 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -37,6 +37,8 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "DNA_group_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
@@ -95,8 +97,8 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
void GROUP_OT_objects_add_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add Selected To Active Group";
- ot->description = "Add the object to an object group that contains the active object";
+ ot->name= _("Add Selected To Active Group");
+ ot->description = _("Add the object to an object group that contains the active object");
ot->idname= "GROUP_OT_objects_add_active";
/* api callbacks */
@@ -142,8 +144,8 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
void GROUP_OT_objects_remove_active(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Selected From Active Group";
- ot->description = "Remove the object from an object group that contains the active object";
+ ot->name= _("Remove Selected From Active Group");
+ ot->description = _("Remove the object from an object group that contains the active object");
ot->idname= "GROUP_OT_objects_remove_active";
/* api callbacks */
@@ -176,8 +178,8 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
void GROUP_OT_objects_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove From Groups";
- ot->description = "Remove selected objects from all groups";
+ ot->name= _("Remove From Groups");
+ ot->description = _("Remove selected objects from all groups");
ot->idname= "GROUP_OT_objects_remove";
/* api callbacks */
@@ -213,8 +215,8 @@ static int group_create_exec(bContext *C, wmOperator *op)
void GROUP_OT_create(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Create New Group";
- ot->description = "Create an object group from selected objects";
+ ot->name= _("Create New Group");
+ ot->description = _("Create an object group from selected objects");
ot->idname= "GROUP_OT_create";
/* api callbacks */
@@ -249,9 +251,9 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_group_add(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Add to Group";
+ ot->name= _("Add to Group");
ot->idname= "OBJECT_OT_group_add";
- ot->description = "Add an object to a new group";
+ ot->description = _("Add an object to a new group");
/* api callbacks */
ot->exec= group_add_exec;
@@ -281,9 +283,9 @@ void OBJECT_OT_group_link(wmOperatorType *ot)
PropertyRNA *prop;
/* identifiers */
- ot->name= "Link to Group";
+ ot->name= _("Link to Group");
ot->idname= "OBJECT_OT_group_link";
- ot->description = "Add an object to an existing group";
+ ot->description = _("Add an object to an existing group");
/* api callbacks */
ot->exec= group_link_exec;
@@ -317,7 +319,7 @@ static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
void OBJECT_OT_group_remove(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Remove Group";
+ ot->name= _("Remove Group");
ot->idname= "OBJECT_OT_group_remove";
/* api callbacks */
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 5fc33c6836d..e6a3df57c2d 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -228,7 +228,7 @@ void ED_operatormacros_object(void)
}
/* grr, should be able to pass options on... */
- ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", "Duplicate Linked", OPTYPE_UNDO|OPTYPE_REGISTER);
+ ot= WM_operatortype_append_macro("OBJECT_OT_duplicate_move_linked", _("Duplicate Linked"), OPTYPE_UNDO|OPTYPE_REGISTER);
if(ot) {
otmacro= WM_operatortype_macro_define(ot, "OBJECT_OT_duplicate");
RNA_boolean_set(otmacro->ptr, "linked", 1);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index cae78dcbccd..15dc040d58f 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1322,7 +1322,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
/* identifiers */
ot->name= "Link Objects to Scene";
- ot->description = "Make linked data local to each object";
+ ot->description = _("Make linked data local to each object");
ot->idname= "OBJECT_OT_make_links_scene";
/* api callbacks */
@@ -1334,7 +1334,7 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, "Scene", "");
+ prop= RNA_def_enum(ot->srna, "scene", DummyRNA_NULL_items, 0, _("Scene"), "");
RNA_def_enum_funcs(prop, RNA_scene_local_itemf);
ot->prop= prop;
}
@@ -1342,11 +1342,11 @@ void OBJECT_OT_make_links_scene(wmOperatorType *ot)
void OBJECT_OT_make_links_data(wmOperatorType *ot)
{
static EnumPropertyItem make_links_items[]= {
- {MAKE_LINKS_OBDATA, "OBDATA", 0, "Object Data", ""},
- {MAKE_LINKS_MATERIALS, "MATERIAL", 0, "Materials", ""},
- {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, "Animation Data", ""},
- {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, "DupliGroup", ""},
- {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, "Modifiers", ""},
+ {MAKE_LINKS_OBDATA, "OBDATA", 0, N_("Object Data"), ""},
+ {MAKE_LINKS_MATERIALS, "MATERIAL", 0, N_("Materials"), ""},
+ {MAKE_LINKS_ANIMDATA, "ANIMATION", 0, N_("Animation Data"), ""},
+ {MAKE_LINKS_DUPLIGROUP, "DUPLIGROUP", 0, N_("DupliGroup"), ""},
+ {MAKE_LINKS_MODIFIERS, "MODIFIERS", 0, N_("Modifiers"), ""},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
@@ -1362,7 +1362,7 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(make_links_items), 0, "Type", "");
}
@@ -1785,9 +1785,9 @@ static int make_local_exec(bContext *C, wmOperator *op)
void OBJECT_OT_make_local(wmOperatorType *ot)
{
static EnumPropertyItem type_items[]= {
- {1, "SELECTED_OBJECTS", 0, "Selected Objects", ""},
- {2, "SELECTED_OBJECTS_DATA", 0, "Selected Objects and Data", ""},
- {3, "ALL", 0, "All", ""},
+ {1, "SELECTED_OBJECTS", 0, N_("Selected Objects"), ""},
+ {2, "SELECTED_OBJECTS_DATA", 0, N_("Selected Objects and Data"), ""},
+ {3, "ALL", 0, N_("All"), ""},
{0, NULL, 0, NULL, NULL}};
/* identifiers */
@@ -1804,7 +1804,7 @@ void OBJECT_OT_make_local(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
/* properties */
- ot->prop= RNA_def_enum(ot->srna, "type", type_items, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(type_items), 0, "Type", "");
}
static int make_single_user_exec(bContext *C, wmOperator *op)
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 3c2d46872cd..3492eda742a 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -166,20 +166,20 @@ void OBJECT_OT_select_by_type(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first."));
- ot->prop= RNA_def_enum(ot->srna, "type", object_type_items, 1, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(object_type_items), 1, "Type", "");
}
/*********************** Selection by Links *********************/
static EnumPropertyItem prop_select_linked_types[] = {
//{1, "IPO", 0, "Object IPO", ""}, // XXX depreceated animation system stuff...
- {2, "OBDATA", 0, "Object Data", ""},
- {3, "MATERIAL", 0, "Material", ""},
- {4, "TEXTURE", 0, "Texture", ""},
- {5, "DUPGROUP", 0, "Dupligroup", ""},
- {6, "PARTICLE", 0, "Particle System", ""},
- {7, "LIBRARY", 0, "Library", ""},
- {8, "LIBRARY_OBDATA", 0, "Library (Object Data)", ""},
+ {2, "OBDATA", 0, N_("Object Data"), ""},
+ {3, "MATERIAL", 0, N_("Material"), ""},
+ {4, "TEXTURE", 0, N_("Texture"), ""},
+ {5, "DUPGROUP", 0, N_("Dupligroup"), ""},
+ {6, "PARTICLE", 0, N_("Particle System"), ""},
+ {7, "LIBRARY", 0, N_("Library"), ""},
+ {8, "LIBRARY_OBDATA", 0, N_("Library (Object Data)"), ""},
{0, NULL, 0, NULL, NULL}
};
@@ -348,23 +348,23 @@ void OBJECT_OT_select_linked(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first."));
- ot->prop= RNA_def_enum(ot->srna, "type", prop_select_linked_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_linked_types), 0, "Type", "");
}
/*********************** Selected Grouped ********************/
static EnumPropertyItem prop_select_grouped_types[] = {
- {1, "CHILDREN_RECURSIVE", 0, "Children", ""},
- {2, "CHILDREN", 0, "Immediate Children", ""},
- {3, "PARENT", 0, "Parent", ""},
- {4, "SIBLINGS", 0, "Siblings", "Shared Parent"},
- {5, "TYPE", 0, "Type", "Shared object type"},
- {6, "LAYER", 0, "Layer", "Shared layers"},
- {7, "GROUP", 0, "Group", "Shared group"},
- {8, "HOOK", 0, "Hook", ""},
- {9, "PASS", 0, "Pass", "Render pass Index"},
- {10, "COLOR", 0, "Color", "Object Color"},
- {11, "PROPERTIES", 0, "Properties", "Game Properties"},
+ {1, "CHILDREN_RECURSIVE", 0, N_("Children"), ""},
+ {2, "CHILDREN", 0, N_("Immediate Children"), ""},
+ {3, "PARENT", 0, N_("Parent"), ""},
+ {4, "SIBLINGS", 0, N_("Siblings"), N_("Shared Parent")},
+ {5, "TYPE", 0, N_("Type"), N_("Shared object type")},
+ {6, "LAYER", 0, N_("Layer"), N_("Shared layers")},
+ {7, "GROUP", 0, N_("Group"), N_("Shared group")},
+ {8, "HOOK", 0, N_("Hook"), ""},
+ {9, "PASS", 0, N_("Pass"), N_("Render pass Index")},
+ {10, "COLOR", 0, N_("Color"), N_("Object Color")},
+ {11, "PROPERTIES", 0, N_("Properties"), N_("Game Properties")},
{0, NULL, 0, NULL, NULL}
};
@@ -636,7 +636,7 @@ void OBJECT_OT_select_grouped(wmOperatorType *ot)
/* properties */
RNA_def_boolean(ot->srna, "extend", FALSE, _("Extend"), _("Extend selection instead of deselecting everything first."));
- ot->prop= RNA_def_enum(ot->srna, "type", prop_select_grouped_types, 0, "Type", "");
+ ot->prop= RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_select_grouped_types), 0, "Type", "");
}
/************************* Select by Layer **********************/
diff --git a/source/blender/editors/render/render_view.c b/source/blender/editors/render/render_view.c
index 9dfcde6ed0d..21c820a1e07 100644
--- a/source/blender/editors/render/render_view.c
+++ b/source/blender/editors/render/render_view.c
@@ -36,6 +36,8 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "DNA_scene_types.h"
#include "BKE_blender.h"
@@ -347,8 +349,8 @@ static int render_view_show_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
void RENDER_OT_view_show(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Show/Hide Render View";
- ot->description= "Toggle show render view";
+ ot->name= _("Show/Hide Render View");
+ ot->description= _("Toggle show render view");
ot->idname= "RENDER_OT_view_show";
/* api callbacks */
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index a1ba861f477..904c8235a32 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -1173,41 +1173,7 @@ void ED_area_prevspace(bContext *C, ScrArea *sa)
static const char *editortype_pup(void)
{
- return(
- "Editor type:%t"
- "|3D View %x1"
-
- "|%l"
-
- "|Timeline %x15"
- "|Graph Editor %x2"
- "|DopeSheet %x12"
- "|NLA Editor %x13"
-
- "|%l"
-
- "|UV/Image Editor %x6"
-
- "|Video Sequence Editor %x8"
- "|Text Editor %x9"
- "|Node Editor %x16"
- "|Logic Editor %x17"
-
- "|%l"
-
- "|Properties %x4"
- "|Outliner %x3"
- "|User Preferences %x19"
- "|Info%x7"
-
- "|%l"
-
- "|File Browser %x5"
-
- "|%l"
-
- "|Python Console %x18"
- );
+ return _("Editor type:%t|3D View %x1|%l|Timeline %x15|Graph Editor %x2|DopeSheet %x12|NLA Editor %x13|%l|UV/Image Editor %x6|Video Sequence Editor %x8|Text Editor %x9|Node Editor %x16|Logic Editor %x17|%l|Properties %x4|Outliner %x3|User Preferences %x19|Info%x7|%l|File Browser %x5|%l|Python Console %x18");
}
static void spacefunc(struct bContext *C, void *UNUSED(arg1), void *UNUSED(arg2))
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index 549a547b846..a7891db466a 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -52,6 +52,8 @@
#include "BLI_rand.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "BKE_action.h"
#include "BKE_context.h"
#include "BKE_curve.h"
@@ -1469,8 +1471,8 @@ static int view3d_properties(bContext *C, wmOperator *UNUSED(op))
void VIEW3D_OT_properties(wmOperatorType *ot)
{
- ot->name= "Properties";
- ot->description= "Toggles the properties panel display";
+ ot->name= _("Properties");
+ ot->description= _("Toggles the properties panel display");
ot->idname= "VIEW3D_OT_properties";
ot->exec= view3d_properties;
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 8cef69fdaba..491bc4c1964 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -2515,12 +2515,11 @@ void VIEW3D_OT_viewnumpad(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "align_active", 0, _("Align Active"), _("Align to the active objects axis"));
}
-/* XXX add _() for strings */
static EnumPropertyItem prop_view_orbit_items[] = {
- {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, "Orbit Left", "Orbit the view around to the Left"},
- {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, "Orbit Right", "Orbit the view around to the Right"},
- {V3D_VIEW_STEPUP, "ORBITUP", 0, "Orbit Up", "Orbit the view Up"},
- {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, "Orbit Down", "Orbit the view Down"},
+ {V3D_VIEW_STEPLEFT, "ORBITLEFT", 0, N_("Orbit Left"), N_("Orbit the view around to the Left")},
+ {V3D_VIEW_STEPRIGHT, "ORBITRIGHT", 0, N_("Orbit Right"), N_("Orbit the view around to the Right")},
+ {V3D_VIEW_STEPUP, "ORBITUP", 0, N_("Orbit Up"), N_("Orbit the view Up")},
+ {V3D_VIEW_STEPDOWN, "ORBITDOWN", 0, N_("Orbit Down"), N_("Orbit the view Down")},
{0, NULL, 0, NULL, NULL}};
static int vieworbit_exec(bContext *C, wmOperator *op)
@@ -2580,15 +2579,15 @@ void VIEW3D_OT_view_orbit(wmOperatorType *ot)
/* flags */
ot->flag= 0;
- RNA_def_enum(ot->srna, "type", prop_view_orbit_items, 0, "Orbit", "Direction of View Orbit");
+ RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_view_orbit_items), 0, "Orbit", "Direction of View Orbit");
}
/* XXX add _() for strings */
static EnumPropertyItem prop_view_pan_items[] = {
- {V3D_VIEW_PANLEFT, "PANLEFT", 0, "Pan Left", "Pan the view to the Left"},
- {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, "Pan Right", "Pan the view to the Right"},
- {V3D_VIEW_PANUP, "PANUP", 0, "Pan Up", "Pan the view Up"},
- {V3D_VIEW_PANDOWN, "PANDOWN", 0, "Pan Down", "Pan the view Down"},
+ {V3D_VIEW_PANLEFT, "PANLEFT", 0, N_("Pan Left"), N_("Pan the view to the Left")},
+ {V3D_VIEW_PANRIGHT, "PANRIGHT", 0, N_("Pan Right"), N_("Pan the view to the Right")},
+ {V3D_VIEW_PANUP, "PANUP", 0, N_("Pan Up"), N_("Pan the view Up")},
+ {V3D_VIEW_PANDOWN, "PANDOWN", 0, N_("Pan Down"), N_("Pan the view Down")},
{0, NULL, 0, NULL, NULL}};
static int viewpan_exec(bContext *C, wmOperator *op)
@@ -2629,7 +2628,7 @@ void VIEW3D_OT_view_pan(wmOperatorType *ot)
/* flags */
ot->flag= 0;
- RNA_def_enum(ot->srna, "type", prop_view_pan_items, 0, "Pan", "Direction of View Pan");
+ RNA_def_enum(ot->srna, "type", RNA_enum_items_gettexted(prop_view_pan_items), 0, "Pan", "Direction of View Pan");
}
static int viewpersportho_exec(bContext *C, wmOperator *UNUSED(op))
diff --git a/source/blender/editors/space_view3d/view3d_fly.c b/source/blender/editors/space_view3d/view3d_fly.c
index ed1ed5b3881..604b0f155ff 100644
--- a/source/blender/editors/space_view3d/view3d_fly.c
+++ b/source/blender/editors/space_view3d/view3d_fly.c
@@ -39,6 +39,8 @@
#include "BLI_blenlib.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "BKE_context.h"
#include "BKE_object.h"
#include "BKE_report.h"
@@ -932,8 +934,8 @@ static int fly_modal(bContext *C, wmOperator *op, wmEvent *event)
void VIEW3D_OT_fly(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Fly Navigation";
- ot->description= "Interactively fly around the scene";
+ ot->name= _("Fly Navigation");
+ ot->description= _("Interactively fly around the scene");
ot->idname= "VIEW3D_OT_fly";
/* api callbacks */
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 05975052913..13a7dc968cb 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -1812,8 +1812,8 @@ static int view3d_borderselect_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_border(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Border Select";
- ot->description= "Select items using border selection";
+ ot->name= _("Border Select");
+ ot->description= _("Select items using border selection");
ot->idname= "VIEW3D_OT_select_border";
/* api callbacks */
@@ -2293,8 +2293,8 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
void VIEW3D_OT_select_circle(wmOperatorType *ot)
{
- ot->name= "Circle Select";
- ot->description= "Select items using circle selection";
+ ot->name= _("Circle Select");
+ ot->description= _("Select items using circle selection");
ot->idname= "VIEW3D_OT_select_circle";
ot->invoke= WM_gesture_circle_invoke;
diff --git a/source/blender/editors/util/CMakeLists.txt b/source/blender/editors/util/CMakeLists.txt
index 8e5415945c7..f67056f5b71 100644
--- a/source/blender/editors/util/CMakeLists.txt
+++ b/source/blender/editors/util/CMakeLists.txt
@@ -21,6 +21,7 @@
set(INC
../include
+ ../../blenfont
../../blenkernel
../../blenloader
../../blenlib
diff --git a/source/blender/editors/util/SConscript b/source/blender/editors/util/SConscript
index a694b211ca4..cfbf1c83079 100644
--- a/source/blender/editors/util/SConscript
+++ b/source/blender/editors/util/SConscript
@@ -3,7 +3,7 @@ Import ('env')
sources = env.Glob('*.c')
-incs = '../include ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
+incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
incs += ' ../../makesrna'
incs += ' ../../blenloader'
diff --git a/source/blender/editors/util/undo.c b/source/blender/editors/util/undo.c
index 24a868891de..5d726e2c844 100644
--- a/source/blender/editors/util/undo.c
+++ b/source/blender/editors/util/undo.c
@@ -46,6 +46,8 @@
#include "BLI_dynstr.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
+
#include "BKE_blender.h"
#include "BKE_context.h"
#include "BKE_global.h"
@@ -288,8 +290,8 @@ static int ed_redo_exec(bContext *C, wmOperator *UNUSED(op))
void ED_OT_undo(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Undo";
- ot->description= "Undo previous action";
+ ot->name= _("Undo");
+ ot->description= _("Undo previous action");
ot->idname= "ED_OT_undo";
/* api callbacks */
@@ -315,8 +317,8 @@ void ED_OT_undo_push(wmOperatorType *ot)
void ED_OT_redo(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Redo";
- ot->description= "Redo previous action";
+ ot->name= _("Redo");
+ ot->description= _("Redo previous action");
ot->idname= "ED_OT_redo";
/* api callbacks */
@@ -507,8 +509,8 @@ static int undo_history_exec(bContext *C, wmOperator *op)
void ED_OT_undo_history(wmOperatorType *ot)
{
/* identifiers */
- ot->name= "Undo History";
- ot->description= "Redo specific action in history";
+ ot->name= _("Undo History");
+ ot->description= _("Redo specific action in history");
ot->idname= "ED_OT_undo_history";
/* api callbacks */
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index ca19a86e42c..9c0ddeb93ff 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -574,6 +574,8 @@ extern StructRNA RNA_WorldTextureSlot;
extern StructRNA RNA_XnorController;
extern StructRNA RNA_XorController;
+/* make all types gettexted */
+void RNA_types_init_gettext();
/* Pointer
*
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h
index ac2a89161d9..e09115c3848 100644
--- a/source/blender/makesrna/RNA_define.h
+++ b/source/blender/makesrna/RNA_define.h
@@ -194,6 +194,9 @@ void RNA_enum_items_add(EnumPropertyItem **items, int *totitem, EnumPropertyItem
void RNA_enum_items_add_value(EnumPropertyItem **items, int *totitem, EnumPropertyItem *item, int value);
void RNA_enum_item_end(EnumPropertyItem **items, int *totitem);
+/* make every name and description field surrounded by gettext */
+EnumPropertyItem* RNA_enum_items_gettexted(EnumPropertyItem *item);
+
/* Memory management */
void RNA_def_struct_duplicate_pointers(StructRNA *srna);
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 4e4ff396e71..f60bc325494 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -128,6 +128,7 @@ set(SRC
${APISRC}
../../../../intern/guardedalloc/intern/mallocn.c
../../../../intern/guardedalloc/intern/mmap_win.c
+ ../../blenfont/intern/blf_gettext.c
)
set(INC
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index ab11f88e0f6..10a837f0d05 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -43,6 +43,8 @@
#include "BLI_dynstr.h"
#include "BLI_ghash.h"
+#include "BLF_api.h"
+
#include "BKE_animsys.h"
#include "BKE_context.h"
#include "BKE_idprop.h"
@@ -96,6 +98,48 @@ void RNA_exit(void)
RNA_free(&BLENDER_RNA);
}
+void RNA_struct_gettexted( StructRNA* ptr )
+{
+ StructRNA* temp_struct;
+ PropertyRNA* temp_property;
+ PropertyRNA* end_property;
+
+ ptr->name = _(ptr->name);
+ ptr->description = _(ptr->description);
+
+ temp_property = (PropertyRNA*)ptr->cont.properties.first;
+ end_property = (PropertyRNA*)ptr->cont.properties.last;
+ while( temp_property!=end_property )
+ {
+ temp_property->name = _(temp_property->name);
+ temp_property->description = _(temp_property->description);
+ if( temp_property->type == PROP_ENUM )
+ RNA_enum_items_gettexted( ((EnumPropertyRNA*)temp_property)->item );
+ temp_property = temp_property->next;
+ }
+ if( end_property!=NULL )
+ {
+ end_property->name = _(end_property->name);
+ end_property->description = _(end_property->description);
+ if( end_property->type == PROP_ENUM )
+ RNA_enum_items_gettexted( ((EnumPropertyRNA*)end_property)->item );
+ }
+
+ temp_struct = (StructRNA*)ptr->cont.next;
+ if( temp_struct!=NULL && temp_struct != &RNA_UnknownType )
+ RNA_struct_gettexted( temp_struct );
+}
+
+void RNA_types_init_gettext()
+{
+ StructRNA* target_struct[] = { &RNA_UserPreferences, &RNA_Theme, NULL };
+ int i=0;
+ for( i=0; target_struct[i]!=NULL; i++ )
+ {
+ RNA_struct_gettexted( target_struct[i] );
+ }
+}
+
/* Pointer */
void RNA_main_pointer_create(struct Main *main, PointerRNA *r_ptr)
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index df9071d7825..5328652a9f0 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -33,6 +33,8 @@
#include "rna_internal.h"
+#include "BLF_api.h"
+
#include "DNA_curve_types.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
@@ -46,15 +48,15 @@
#include "ED_curve.h"
EnumPropertyItem beztriple_handle_type_items[] = {
- {HD_FREE, "FREE", 0, "Free", ""},
- {HD_AUTO, "AUTO", 0, "Auto", ""},
- {HD_VECT, "VECTOR", 0, "Vector", ""},
- {HD_ALIGN, "ALIGNED", 0, "Aligned", ""},
+ {HD_FREE, "FREE", 0, N_("Free"), ""},
+ {HD_AUTO, "AUTO", 0, N_("Auto"), ""},
+ {HD_VECT, "VECTOR", 0, N_("Vector"), ""},
+ {HD_ALIGN, "ALIGNED", 0, N_("Aligned"), ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem beztriple_interpolation_mode_items[] = {
- {BEZT_IPO_CONST, "CONSTANT", 0, "Constant", ""},
- {BEZT_IPO_LIN, "LINEAR", 0, "Linear", ""},
+ {BEZT_IPO_CONST, "CONSTANT", 0, N_("Constant"), ""},
+ {BEZT_IPO_LIN, "LINEAR", 0, N_("Linear"), ""},
{BEZT_IPO_BEZ, "BEZIER", 0, "Bezier", ""},
{0, NULL, 0, NULL, NULL}};
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 8e9c7e287d6..115d4ed655d 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -43,6 +43,8 @@
#include "BLI_utildefines.h"
#include "BLI_ghash.h"
+#include "BLF_api.h"
+
#include "RNA_define.h"
#include "rna_internal.h"
@@ -1268,6 +1270,28 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
}
}
+/* make every name and description field surrounded by gettext */
+EnumPropertyItem* RNA_enum_items_gettexted(EnumPropertyItem *item)
+{
+ if( item )
+ {
+ int i;
+ /* get the last item's value field, 1 says it has been gettexted, 0 says not */
+ for(i=0; item[i].identifier; i++) ;
+ /* if not gettexted before */
+ if( item[i].value==0 )
+ {
+ for(i=0; item[i].identifier; i++)
+ {
+ item[i].name = _(item[i].name);
+ item[i].description = _(item[i].description);
+ }
+ item[i].value = 1;
+ }
+ }
+ return item;
+}
+
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
{
StructRNA *srna= DefRNA.laststruct;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 8ee8652e2e5..5f4b2cf6a9f 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -51,6 +51,7 @@
#include "BKE_group.h" /* needed for object_in_group() */
#include "BLO_sys_types.h" /* needed for intptr_t used in ED_mesh.h */
+#include "BLF_api.h"
#include "ED_mesh.h"
#include "WM_api.h"
@@ -90,31 +91,31 @@ static EnumPropertyItem collision_bounds_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem metaelem_type_items[] = {
- {MB_BALL, "BALL", ICON_META_BALL, "Ball", ""},
- {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, "Capsule", ""},
- {MB_PLANE, "PLANE", ICON_META_PLANE, "Plane", ""},
- {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, "Ellipsoid", ""}, // NOTE: typo at original definition!
- {MB_CUBE, "CUBE", ICON_META_CUBE, "Cube", ""},
+ {MB_BALL, "BALL", ICON_META_BALL, N_("Ball"), ""},
+ {MB_TUBE, "CAPSULE", ICON_META_CAPSULE, N_("Capsule"), ""},
+ {MB_PLANE, "PLANE", ICON_META_PLANE, N_("Plane"), ""},
+ {MB_ELIPSOID, "ELLIPSOID", ICON_META_ELLIPSOID, N_("Ellipsoid"), ""}, // NOTE: typo at original definition!
+ {MB_CUBE, "CUBE", ICON_META_CUBE, N_("Cube"), ""},
{0, NULL, 0, NULL, NULL}};
/* used for 2 enums */
-#define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, "Curve", ""}
-#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""}
-#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""}
+#define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, N_("Curve"), ""}
+#define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, N_("Surface"), ""}
+#define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, N_("Font"), ""}
EnumPropertyItem object_type_items[] = {
- {OB_MESH, "MESH", 0, "Mesh", ""},
+ {OB_MESH, "MESH", 0, N_("Mesh"), ""},
OBTYPE_CU_CURVE,
OBTYPE_CU_SURF,
- {OB_MBALL, "META", 0, "Meta", ""},
+ {OB_MBALL, "META", 0, N_("Meta"), ""},
OBTYPE_CU_FONT,
{0, "", 0, NULL, NULL},
- {OB_ARMATURE, "ARMATURE", 0, "Armature", ""},
- {OB_LATTICE, "LATTICE", 0, "Lattice", ""},
- {OB_EMPTY, "EMPTY", 0, "Empty", ""},
+ {OB_ARMATURE, "ARMATURE", 0, N_("Armature"), ""},
+ {OB_LATTICE, "LATTICE", 0, N_("Lattice"), ""},
+ {OB_EMPTY, "EMPTY", 0, N_("Empty"), ""},
{0, "", 0, NULL, NULL},
- {OB_CAMERA, "CAMERA", 0, "Camera", ""},
- {OB_LAMP, "LAMP", 0, "Lamp", ""},
+ {OB_CAMERA, "CAMERA", 0, N_("Camera"), ""},
+ {OB_LAMP, "LAMP", 0, N_("Lamp"), ""},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem object_type_curve_items[] = {
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
index 5d3c29b736b..8e1dbe35616 100644
--- a/source/blender/makesrna/intern/rna_object_force.c
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -30,7 +30,7 @@
#include <stdlib.h>
#include "RNA_define.h"
-
+#include "BLF_api.h"
#include "rna_internal.h"
#include "DNA_cloth_types.h"
@@ -1054,19 +1054,19 @@ static void rna_def_field(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem field_type_items[] = {
- {0, "NONE", 0, "None", ""},
- {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, "Force", "Gives a radial field toward the center of object"},
- {PFIELD_WIND, "WIND", ICON_FORCE_WIND, "Wind", "Gives a constant force along the force objects local Z axis"},
- {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, "Vortex", "Gives a spiraling force that twists the force objects local Z axis"},
- {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, "Magnetic", "Forcefield depends on the speed of the particles"},
- {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, "Harmonic", "The source of this force field is the zero point of a harmonic oscillator"},
- {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, "Charge", "Spherical forcefield based on the charge of particles, only influences other charge force fields"},
- {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, "Lennard-Jones", "Forcefield based on the Lennard-Jones potential"},
- {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, "Texture", "Forcefield based on a texture"},
- {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, "Curve Guide", "Creates a force along a curve object"},
- {PFIELD_BOID, "BOID", ICON_FORCE_BOID, "Boid", ""},
- {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, "Turbulence", "Creates turbulence with a noise field"},
- {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, "Drag", "Creates a force that dampens motion"},
+ {0, "NONE", 0, N_("None"), ""},
+ {PFIELD_FORCE, "FORCE", ICON_FORCE_FORCE, N_("Force"), N_("Gives a radial field toward the center of object")},
+ {PFIELD_WIND, "WIND", ICON_FORCE_WIND, N_("Wind"), N_("Gives a constant force along the force objects local Z axis")},
+ {PFIELD_VORTEX, "VORTEX", ICON_FORCE_VORTEX, N_("Vortex"), N_("Gives a spiraling force that twists the force objects local Z axis")},
+ {PFIELD_MAGNET, "MAGNET", ICON_FORCE_MAGNETIC, N_("Magnetic"), N_("Forcefield depends on the speed of the particles")},
+ {PFIELD_HARMONIC, "HARMONIC", ICON_FORCE_HARMONIC, N_("Harmonic"), N_("The source of this force field is the zero point of a harmonic oscillator")},
+ {PFIELD_CHARGE, "CHARGE", ICON_FORCE_CHARGE, N_("Charge"), N_("Spherical forcefield based on the charge of particles, only influences other charge force fields")},
+ {PFIELD_LENNARDJ, "LENNARDJ", ICON_FORCE_LENNARDJONES, N_("Lennard-Jones"), N_("Forcefield based on the Lennard-Jones potential")},
+ {PFIELD_TEXTURE, "TEXTURE", ICON_FORCE_TEXTURE, N_("Texture"), N_("Forcefield based on a texture")},
+ {PFIELD_GUIDE, "GUIDE", ICON_FORCE_CURVE, N_("Curve Guide"), N_("Creates a force along a curve object")},
+ {PFIELD_BOID, "BOID", ICON_FORCE_BOID, N_("Boid"), ""},
+ {PFIELD_TURBULENCE, "TURBULENCE", ICON_FORCE_TURBULENCE, N_("Turbulence"), N_("Creates turbulence with a noise field")},
+ {PFIELD_DRAG, "DRAG", ICON_FORCE_DRAG, N_("Drag"), N_("Creates a force that dampens motion")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem falloff_items[] = {
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 8ab480df425..51556f3d0c7 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -34,6 +34,8 @@
#include "RNA_access.h"
#include "RNA_define.h"
+#include "BLF_api.h"
+
#include "rna_internal.h"
#include "BKE_key.h"
@@ -49,26 +51,26 @@
#include "WM_types.h"
EnumPropertyItem space_type_items[] = {
- {SPACE_EMPTY, "EMPTY", 0, "Empty", ""},
- {SPACE_VIEW3D, "VIEW_3D", 0, "3D View", ""},
- {SPACE_IPO, "GRAPH_EDITOR", 0, "Graph Editor", ""},
- {SPACE_OUTLINER, "OUTLINER", 0, "Outliner", ""},
- {SPACE_BUTS, "PROPERTIES", 0, "Properties", ""},
- {SPACE_FILE, "FILE_BROWSER", 0, "File Browser", ""},
- {SPACE_IMAGE, "IMAGE_EDITOR", 0, "Image Editor", ""},
- {SPACE_INFO, "INFO", 0, "Info", ""},
- {SPACE_SEQ, "SEQUENCE_EDITOR", 0, "Sequence Editor", ""},
- {SPACE_TEXT, "TEXT_EDITOR", 0, "Text Editor", ""},
+ {SPACE_EMPTY, "EMPTY", 0, N_("Empty"), ""},
+ {SPACE_VIEW3D, "VIEW_3D", 0, N_("3D View"), ""},
+ {SPACE_IPO, "GRAPH_EDITOR", 0, N_("Graph Editor"), ""},
+ {SPACE_OUTLINER, "OUTLINER", 0, N_("Outliner"), ""},
+ {SPACE_BUTS, "PROPERTIES", 0, N_("Properties"), ""},
+ {SPACE_FILE, "FILE_BROWSER", 0, N_("File Browser"), ""},
+ {SPACE_IMAGE, "IMAGE_EDITOR", 0, N_("Image Editor"), ""},
+ {SPACE_INFO, "INFO", 0, N_("Info"), ""},
+ {SPACE_SEQ, "SEQUENCE_EDITOR", 0, N_("Sequence Editor"), ""},
+ {SPACE_TEXT, "TEXT_EDITOR", 0, N_("Text Editor"), ""},
//{SPACE_IMASEL, "IMAGE_BROWSER", 0, "Image Browser", ""},
- {SPACE_SOUND, "AUDIO_WINDOW", 0, "Audio Window", ""},
- {SPACE_ACTION, "DOPESHEET_EDITOR", 0, "DopeSheet Editor", ""},
- {SPACE_NLA, "NLA_EDITOR", 0, "NLA Editor", ""},
- {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, "Scripts Window", ""},
- {SPACE_TIME, "TIMELINE", 0, "Timeline", ""},
- {SPACE_NODE, "NODE_EDITOR", 0, "Node Editor", ""},
- {SPACE_LOGIC, "LOGIC_EDITOR", 0, "Logic Editor", ""},
- {SPACE_CONSOLE, "CONSOLE", 0, "Python Console", ""},
- {SPACE_USERPREF, "USER_PREFERENCES", 0, "User Preferences", ""},
+ {SPACE_SOUND, "AUDIO_WINDOW", 0, N_("Audio Window"), ""},
+ {SPACE_ACTION, "DOPESHEET_EDITOR", 0, N_("DopeSheet Editor"), ""},
+ {SPACE_NLA, "NLA_EDITOR", 0, N_("NLA Editor"), ""},
+ {SPACE_SCRIPT, "SCRIPTS_WINDOW", 0, N_("Scripts Window"), ""},
+ {SPACE_TIME, "TIMELINE", 0, N_("Timeline"), ""},
+ {SPACE_NODE, "NODE_EDITOR", 0, N_("Node Editor"), ""},
+ {SPACE_LOGIC, "LOGIC_EDITOR", 0, N_("Logic Editor"), ""},
+ {SPACE_CONSOLE, "CONSOLE", 0, N_("Python Console"), ""},
+ {SPACE_USERPREF, "USER_PREFERENCES", 0, N_("User Preferences"), ""},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_channels_items[] = {
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 14af5ed7a3f..60fe7cbff4f 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -44,6 +44,7 @@
#include "WM_types.h"
#include "BLI_utildefines.h"
+#include "BLF_api.h"
#include "BKE_sound.h"
@@ -1737,24 +1738,24 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem active_theme_area[] = {
- {0, "USER_INTERFACE", ICON_UI, "User Interface", ""},
- {18, "BONE_COLOR_SETS", ICON_COLOR, "Bone Color Sets", ""},
- {1, "VIEW_3D", ICON_VIEW3D, "3D View", ""},
- {2, "TIMELINE", ICON_TIME, "Timeline", ""},
- {3, "GRAPH_EDITOR", ICON_IPO, "Graph Editor", ""},
- {4, "DOPESHEET_EDITOR", ICON_ACTION, "Dopesheet", ""},
- {5, "NLA_EDITOR", ICON_NLA, "NLA Editor", ""},
- {6, "IMAGE_EDITOR", ICON_IMAGE_COL, "UV/Image Editor", ""},
- {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, "Video Sequence Editor", ""},
- {8, "TEXT_EDITOR", ICON_TEXT, "Text Editor", ""},
- {9, "NODE_EDITOR", ICON_NODETREE, "Node Editor", ""},
- {10, "LOGIC_EDITOR", ICON_LOGIC, "Logic Editor", ""},
- {11, "PROPERTIES", ICON_BUTS, "Properties", ""},
- {12, "OUTLINER", ICON_OOPS, "Outliner", ""},
- {14, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", ""},
- {15, "INFO", ICON_INFO, "Info", ""},
- {16, "FILE_BROWSER", ICON_FILESEL, "File Browser", ""},
- {17, "CONSOLE", ICON_CONSOLE, "Python Console", ""},
+ {0, "USER_INTERFACE", ICON_UI, N_("User Interface"), ""},
+ {18, "BONE_COLOR_SETS", ICON_COLOR, N_("Bone Color Sets"), ""},
+ {1, "VIEW_3D", ICON_VIEW3D, N_("3D View"), ""},
+ {2, "TIMELINE", ICON_TIME, N_("Timeline"), ""},
+ {3, "GRAPH_EDITOR", ICON_IPO, N_("Graph Editor"), ""},
+ {4, "DOPESHEET_EDITOR", ICON_ACTION, N_("Dopesheet"), ""},
+ {5, "NLA_EDITOR", ICON_NLA, N_("NLA Editor"), ""},
+ {6, "IMAGE_EDITOR", ICON_IMAGE_COL, N_("UV/Image Editor"), ""},
+ {7, "SEQUENCE_EDITOR", ICON_SEQUENCE, N_("Video Sequence Editor"), ""},
+ {8, "TEXT_EDITOR", ICON_TEXT, N_("Text Editor"), ""},
+ {9, "NODE_EDITOR", ICON_NODETREE, N_("Node Editor"), ""},
+ {10, "LOGIC_EDITOR", ICON_LOGIC, N_("Logic Editor"), ""},
+ {11, "PROPERTIES", ICON_BUTS, N_("Properties"), ""},
+ {12, "OUTLINER", ICON_OOPS, N_("Outliner"), ""},
+ {14, "USER_PREFERENCES", ICON_PREFERENCES, N_("User Preferences"), ""},
+ {15, "INFO", ICON_INFO, N_("Info"), ""},
+ {16, "FILE_BROWSER", ICON_FILESEL, N_("File Browser"), ""},
+ {17, "CONSOLE", ICON_CONSOLE, N_("Python Console"), ""},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "Theme", NULL);
@@ -1762,121 +1763,121 @@ static void rna_def_userdef_themes(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Theme", "Theme settings defining draw style and colors in the user interface");
prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
- RNA_def_property_ui_text(prop, "Name", "Name of the theme");
+ RNA_def_property_ui_text(prop, N_("Name"), N_("Name of the theme"));
RNA_def_struct_name_property(srna, prop);
prop= RNA_def_property(srna, "theme_area", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "active_theme_area");
RNA_def_property_enum_items(prop, active_theme_area);
- RNA_def_property_ui_text(prop, "Active Theme Area", "");
+ RNA_def_property_ui_text(prop, N_("Active Theme Area"), "");
prop= RNA_def_property(srna, "user_interface", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tui");
RNA_def_property_struct_type(prop, "ThemeUserInterface");
- RNA_def_property_ui_text(prop, "User Interface", "");
+ RNA_def_property_ui_text(prop, N_("User Interface"), "");
prop= RNA_def_property(srna, "view_3d", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tv3d");
RNA_def_property_struct_type(prop, "ThemeView3D");
- RNA_def_property_ui_text(prop, "3D View", "");
+ RNA_def_property_ui_text(prop, N_("3D View"), "");
prop= RNA_def_property(srna, "graph_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tipo");
RNA_def_property_struct_type(prop, "ThemeGraphEditor");
- RNA_def_property_ui_text(prop, "Graph Editor", "");
+ RNA_def_property_ui_text(prop, N_("Graph Editor"), "");
prop= RNA_def_property(srna, "file_browser", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tfile");
RNA_def_property_struct_type(prop, "ThemeFileBrowser");
- RNA_def_property_ui_text(prop, "File Browser", "");
+ RNA_def_property_ui_text(prop, N_("File Browser"), "");
prop= RNA_def_property(srna, "nla_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnla");
RNA_def_property_struct_type(prop, "ThemeNLAEditor");
- RNA_def_property_ui_text(prop, "NLA Editor", "");
+ RNA_def_property_ui_text(prop, N_("NLA Editor"), "");
prop= RNA_def_property(srna, "dopesheet_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tact");
RNA_def_property_struct_type(prop, "ThemeDopeSheet");
- RNA_def_property_ui_text(prop, "DopeSheet", "");
+ RNA_def_property_ui_text(prop, N_("DopeSheet"), "");
prop= RNA_def_property(srna, "image_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tima");
RNA_def_property_struct_type(prop, "ThemeImageEditor");
- RNA_def_property_ui_text(prop, "Image Editor", "");
+ RNA_def_property_ui_text(prop, N_("Image Editor"), "");
prop= RNA_def_property(srna, "sequence_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tseq");
RNA_def_property_struct_type(prop, "ThemeSequenceEditor");
- RNA_def_property_ui_text(prop, "Sequence Editor", "");
+ RNA_def_property_ui_text(prop, N_("Sequence Editor"), "");
prop= RNA_def_property(srna, "properties", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tbuts");
RNA_def_property_struct_type(prop, "ThemeProperties");
- RNA_def_property_ui_text(prop, "Properties", "");
+ RNA_def_property_ui_text(prop, N_("Properties"), "");
prop= RNA_def_property(srna, "text_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "text");
RNA_def_property_struct_type(prop, "ThemeTextEditor");
- RNA_def_property_ui_text(prop, "Text Editor", "");
+ RNA_def_property_ui_text(prop, N_("Text Editor"), "");
prop= RNA_def_property(srna, "timeline", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "ttime");
RNA_def_property_struct_type(prop, "ThemeTimeline");
- RNA_def_property_ui_text(prop, "Timeline", "");
+ RNA_def_property_ui_text(prop, N_("Timeline"), "");
prop= RNA_def_property(srna, "node_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tnode");
RNA_def_property_struct_type(prop, "ThemeNodeEditor");
- RNA_def_property_ui_text(prop, "Node Editor", "");
+ RNA_def_property_ui_text(prop, N_("Node Editor"), "");
prop= RNA_def_property(srna, "logic_editor", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tlogic");
RNA_def_property_struct_type(prop, "ThemeLogicEditor");
- RNA_def_property_ui_text(prop, "Logic Editor", "");
+ RNA_def_property_ui_text(prop, N_("Logic Editor"), "");
prop= RNA_def_property(srna, "outliner", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "toops");
RNA_def_property_struct_type(prop, "ThemeOutliner");
- RNA_def_property_ui_text(prop, "Outliner", "");
+ RNA_def_property_ui_text(prop, N_("Outliner"), "");
prop= RNA_def_property(srna, "info", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tinfo");
RNA_def_property_struct_type(prop, "ThemeInfo");
- RNA_def_property_ui_text(prop, "Info", "");
+ RNA_def_property_ui_text(prop, N_("Info"), "");
prop= RNA_def_property(srna, "user_preferences", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tuserpref");
RNA_def_property_struct_type(prop, "ThemeUserPreferences");
- RNA_def_property_ui_text(prop, "User Preferences", "");
+ RNA_def_property_ui_text(prop, N_("User Preferences"), "");
prop= RNA_def_property(srna, "console", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "tconsole");
RNA_def_property_struct_type(prop, "ThemeConsole");
- RNA_def_property_ui_text(prop, "Console", "");
+ RNA_def_property_ui_text(prop, N_("Console"), "");
prop= RNA_def_property(srna, "bone_color_sets", PROP_COLLECTION, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_collection_sdna(prop, NULL, "tarm", "");
RNA_def_property_struct_type(prop, "ThemeBoneColorSet");
- RNA_def_property_ui_text(prop, "Bone Color Sets", "");
+ RNA_def_property_ui_text(prop, N_("Bone Color Sets"), "");
}
static void rna_def_userdef_addon(BlenderRNA *brna)
@@ -1957,11 +1958,11 @@ static void rna_def_userdef_solidlight(BlenderRNA *brna)
static void rna_def_userdef_view(BlenderRNA *brna)
{
static EnumPropertyItem timecode_styles[] = {
- {USER_TIMECODE_MINIMAL, "MINIMAL", 0, "Minimal Info", "Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary"},
- {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, "SMPTE (Full)", "Full SMPTE timecode. Format is HH:MM:SS:FF"},
- {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, "SMPTE (Compact)", "SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default"},
- {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, "Compact with Milliseconds", "Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead"},
- {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, "Only Seconds", "Direct conversion of frame numbers to seconds"},
+ {USER_TIMECODE_MINIMAL, "MINIMAL", 0, N_("Minimal Info"), N_("Most compact representation. Uses '+' as separator for sub-second frame numbers, with left and right truncation of the timecode as necessary")},
+ {USER_TIMECODE_SMPTE_FULL, "SMPTE", 0, N_("SMPTE (Full)"), N_("Full SMPTE timecode. Format is HH:MM:SS:FF")},
+ {USER_TIMECODE_SMPTE_MSF, "SMPTE_COMPACT", 0, N_("SMPTE (Compact)"), N_("SMPTE timecode showing minutes, seconds, and frames only. Hours are also shown if necessary, but not by default")},
+ {USER_TIMECODE_MILLISECONDS, "MILLISECONDS", 0, N_("Compact with Milliseconds"), N_("Similar to SMPTE (Compact), except that instead of frames, milliseconds are shown instead")},
+ {USER_TIMECODE_SECONDS_ONLY, "SECONDS_ONLY", 0, N_("Only Seconds"), N_("Direct conversion of frame numbers to seconds")},
{0, NULL, 0, NULL, NULL}};
PropertyRNA *prop;
@@ -1977,163 +1978,163 @@ static void rna_def_userdef_view(BlenderRNA *brna)
/* display */
prop= RNA_def_property(srna, "show_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TOOLTIPS);
- RNA_def_property_ui_text(prop, "Tooltips", "Display tooltips");
+ RNA_def_property_ui_text(prop, N_("Tooltips"), N_("Display tooltips"));
prop= RNA_def_property(srna, "show_tooltips_python", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TOOLTIPS_PYTHON);
- RNA_def_property_ui_text(prop, "Show Python Tooltips", "Show Python references in tooltips");
+ RNA_def_property_ui_text(prop, N_("Show Python Tooltips"), N_("Show Python references in tooltips"));
prop= RNA_def_property(srna, "show_object_info", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DRAWVIEWINFO);
- RNA_def_property_ui_text(prop, "Display Object Info", "Display objects name and frame number in 3D view");
+ RNA_def_property_ui_text(prop, N_("Display Object Info"), N_("Display objects name and frame number in 3D view"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_global_scene", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SCENEGLOBAL);
- RNA_def_property_ui_text(prop, "Global Scene", "Forces the current Scene to be displayed in all Screens");
+ RNA_def_property_ui_text(prop, N_("Global Scene"), N_("Forces the current Scene to be displayed in all Screens"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_large_cursors", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "curssize", 0);
- RNA_def_property_ui_text(prop, "Large Cursors", "Use large mouse cursors when available");
+ RNA_def_property_ui_text(prop, N_("Large Cursors"), N_("Use large mouse cursors when available"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_view_name", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
- RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View");
+ RNA_def_property_ui_text(prop, N_("Show View Name"), N_("Show the name of the view's direction in each 3D View"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE);
- RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
+ RNA_def_property_ui_text(prop, N_("Show Splash"), N_("Display splash screen on startup"));
prop= RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS);
- RNA_def_property_ui_text(prop, "Show Playback FPS", "Show the frames per second screen refresh rate, while animation is played back");
+ RNA_def_property_ui_text(prop, N_("Show Playback FPS"), N_("Show the frames per second screen refresh rate, while animation is played back"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* menus */
prop= RNA_def_property(srna, "use_mouse_over_open", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MENUOPENAUTO);
- RNA_def_property_ui_text(prop, "Open On Mouse Over", "Open menu buttons and pulldowns automatically when the mouse is hovering");
+ RNA_def_property_ui_text(prop, N_("Open On Mouse Over"), N_("Open menu buttons and pulldowns automatically when the mouse is hovering"));
prop= RNA_def_property(srna, "open_toplevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold1");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Top Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening top level menus");
+ RNA_def_property_ui_text(prop, N_("Top Level Menu Open Delay"), N_("Time delay in 1/10 seconds before automatically opening top level menus"));
prop= RNA_def_property(srna, "open_sublevel_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "menuthreshold2");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Sub Level Menu Open Delay", "Time delay in 1/10 seconds before automatically opening sub level menus");
+ RNA_def_property_ui_text(prop, N_("Sub Level Menu Open Delay"), N_("Time delay in 1/10 seconds before automatically opening sub level menus"));
/* Toolbox click-hold delay */
prop= RNA_def_property(srna, "open_left_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_leftmouse");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Hold LMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox");
+ RNA_def_property_ui_text(prop, N_("Hold LMB Open Toolbox Delay"), N_("Time in 1/10 seconds to hold the Left Mouse Button before opening the toolbox"));
prop= RNA_def_property(srna, "open_right_mouse_delay", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tb_rightmouse");
RNA_def_property_range(prop, 1, 40);
- RNA_def_property_ui_text(prop, "Hold RMB Open Toolbox Delay", "Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox");
+ RNA_def_property_ui_text(prop, N_("Hold RMB Open Toolbox Delay"), N_("Time in 1/10 seconds to hold the Right Mouse Button before opening the toolbox"));
prop= RNA_def_property(srna, "show_column_layout", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_PLAINMENUS);
- RNA_def_property_ui_text(prop, "Toolbox Column Layout", "Use a column layout for toolbox");
+ RNA_def_property_ui_text(prop, N_("Toolbox Column Layout"), N_("Use a column layout for toolbox"));
prop= RNA_def_property(srna, "use_directional_menus", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_MENUFIXEDORDER);
- RNA_def_property_ui_text(prop, "Contents Follow Opening Direction", "Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction");
+ RNA_def_property_ui_text(prop, N_("Contents Follow Opening Direction"), N_("Otherwise menus, etc will always be top to bottom, left to right, no matter opening direction"));
prop= RNA_def_property(srna, "use_global_pivot", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
- RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
+ RNA_def_property_ui_text(prop, N_("Global Pivot"), N_("Lock the same rotation/scaling pivot in all 3D Views"));
prop= RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
- RNA_def_property_ui_text(prop, "Auto Depth", "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
+ RNA_def_property_ui_text(prop, N_("Auto Depth"), N_("Use the depth under the mouse to improve view pan/rotate/zoom functionality"));
prop= RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
- RNA_def_property_ui_text(prop, "Camera Parent Lock", "When the camera is locked to the view and in fly mode, transform the parent rather than the camera");
+ RNA_def_property_ui_text(prop, N_("Camera Parent Lock"), N_("When the camera is locked to the view and in fly mode, transform the parent rather than the camera"));
/* view zoom */
prop= RNA_def_property(srna, "use_zoom_to_mouse", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_TO_MOUSEPOS);
- RNA_def_property_ui_text(prop, "Zoom To Mouse Position", "Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center");
+ RNA_def_property_ui_text(prop, N_("Zoom To Mouse Position"), N_("Zoom in towards the mouse pointer's position in the 3D view, rather than the 2D window center"));
/* view rotation */
prop= RNA_def_property(srna, "use_auto_perspective", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_AUTOPERSP);
- RNA_def_property_ui_text(prop, "Auto Perspective", "Automatically switch between orthographic and perspective when changing from top/front/side views");
+ RNA_def_property_ui_text(prop, N_("Auto Perspective"), N_("Automatically switch between orthographic and perspective when changing from top/front/side views"));
prop= RNA_def_property(srna, "use_rotate_around_active", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_SELECTION);
- RNA_def_property_ui_text(prop, "Rotate Around Selection", "Use selection as the pivot point");
+ RNA_def_property_ui_text(prop, N_("Rotate Around Selection"), N_("Use selection as the pivot point"));
/* mini axis */
prop= RNA_def_property(srna, "show_mini_axis", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_ROTVIEWICON);
- RNA_def_property_ui_text(prop, "Show Mini Axis", "Show a small rotating 3D axis in the bottom left corner of the 3D View");
+ RNA_def_property_ui_text(prop, N_("Show Mini Axis"), N_("Show a small rotating 3D axis in the bottom left corner of the 3D View"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvisize");
RNA_def_property_range(prop, 10, 64);
- RNA_def_property_ui_text(prop, "Mini Axis Size", "The axis icon's size");
+ RNA_def_property_ui_text(prop, N_("Mini Axis Size"), N_("The axis icon's size"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "mini_axis_brightness", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "rvibright");
RNA_def_property_range(prop, 0, 10);
- RNA_def_property_ui_text(prop, "Mini Axis Brightness", "The brightness of the icon");
+ RNA_def_property_ui_text(prop, N_("Mini Axis Brightness"), N_("The brightness of the icon"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "smooth_view", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "smooth_viewtx");
RNA_def_property_range(prop, 0, 1000);
- RNA_def_property_ui_text(prop, "Smooth View", "The time to animate the view in milliseconds, zero to disable");
+ RNA_def_property_ui_text(prop, N_("Smooth View"), N_("The time to animate the view in milliseconds, zero to disable"));
prop= RNA_def_property(srna, "rotation_angle", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "pad_rot_angle");
RNA_def_property_range(prop, 0, 90);
- RNA_def_property_ui_text(prop, "Rotation Angle", "The rotation step for numerical pad keys (2 4 6 8)");
+ RNA_def_property_ui_text(prop, N_("Rotation Angle"), N_("The rotation step for numerical pad keys (2 4 6 8)"));
/* 3D transform widget */
prop= RNA_def_property(srna, "show_manipulator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "tw_flag", V3D_USE_MANIPULATOR);
- RNA_def_property_ui_text(prop, "Manipulator", "Use 3D transform manipulator");
+ RNA_def_property_ui_text(prop, N_("Manipulator"), N_("Use 3D transform manipulator"));
RNA_def_property_update(prop, 0, "rna_userdef_show_manipulator_update");
prop= RNA_def_property(srna, "manipulator_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_size");
RNA_def_property_range(prop, 2, 40);
- RNA_def_property_ui_text(prop, "Manipulator Size", "Diameter of widget, in 10 pixel units");
+ RNA_def_property_ui_text(prop, N_("Manipulator Size"), N_("Diameter of widget, in 10 pixel units"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_handle_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_handlesize");
RNA_def_property_range(prop, 2, 40);
- RNA_def_property_ui_text(prop, "Manipulator Handle Size", "Size of widget handles as percentage of widget radius");
+ RNA_def_property_ui_text(prop, N_("Manipulator Handle Size"), N_("Size of widget handles as percentage of widget radius"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "manipulator_hotspot", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "tw_hotspot");
RNA_def_property_range(prop, 4, 40);
- RNA_def_property_ui_text(prop, "Manipulator Hotspot", "Hotspot in pixels for clicking widget handles");
+ RNA_def_property_ui_text(prop, N_("Manipulator Hotspot"), N_("Hotspot in pixels for clicking widget handles"));
prop= RNA_def_property(srna, "object_origin_size", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "obcenter_dia");
RNA_def_property_range(prop, 4, 10);
- RNA_def_property_ui_text(prop, "Object Origin Size", "Diameter in Pixels for Object/Lamp origin display");
+ RNA_def_property_ui_text(prop, N_("Object Origin Size"), N_("Diameter in Pixels for Object/Lamp origin display"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* View2D Grid Displays */
prop= RNA_def_property(srna, "view2d_grid_spacing_min", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "v2d_min_gridsize");
RNA_def_property_range(prop, 1, 500); // XXX: perhaps the lower range should only go down to 5?
- RNA_def_property_ui_text(prop, "2D View Minimum Grid Spacing", "Minimum number of pixels between each gridline in 2D Viewports");
+ RNA_def_property_ui_text(prop, N_("2D View Minimum Grid Spacing"), N_("Minimum number of pixels between each gridline in 2D Viewports"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
// TODO: add a setter for this, so that we can bump up the minimum size as necessary...
@@ -2141,7 +2142,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
RNA_def_property_enum_items(prop, timecode_styles);
RNA_def_property_enum_sdna(prop, NULL, "timecode_style");
RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_timecode_style_set", NULL);
- RNA_def_property_ui_text(prop, "TimeCode Style", "Format of Time Codes displayed when not displaying timing in terms of frames");
+ RNA_def_property_ui_text(prop, N_("TimeCode Style"), N_("Format of Time Codes displayed when not displaying timing in terms of frames"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
@@ -2156,178 +2157,178 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem material_link_items[]= {
- {0, "OBDATA", 0, "ObData", "Toggle whether the material is linked to object data or the object block"},
- {USER_MAT_ON_OB, "OBJECT", 0, "Object", "Toggle whether the material is linked to object data or the object block"},
+ {0, "OBDATA", 0, N_("ObData"), N_("Toggle whether the material is linked to object data or the object block")},
+ {USER_MAT_ON_OB, "OBJECT", 0, N_("Object"), N_("Toggle whether the material is linked to object data or the object block")},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem object_align_items[]= {
- {0, "WORLD", 0, "World", "Align newly added objects to the world coordinates"},
- {USER_ADD_VIEWALIGNED, "VIEW", 0, "View", "Align newly added objects facing the active 3D View direction"},
+ {0, "WORLD", 0, N_("World"), N_("Align newly added objects to the world coordinates")},
+ {USER_ADD_VIEWALIGNED, "VIEW", 0, N_("View"), N_("Align newly added objects facing the active 3D View direction")},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesEdit", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "Edit Methods", "Settings for interacting with Blender data");
+ RNA_def_struct_ui_text(srna, N_("Edit Methods"), N_("Settings for interacting with Blender data"));
/* Edit Methods */
prop= RNA_def_property(srna, "material_link", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, material_link_items);
- RNA_def_property_ui_text(prop, "Material Link To", "Toggle whether the material is linked to object data or the object block");
+ RNA_def_property_ui_text(prop, N_("Material Link To"), N_("Toggle whether the material is linked to object data or the object block"));
prop= RNA_def_property(srna, "object_align", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, object_align_items);
- RNA_def_property_ui_text(prop, "Align Object To", "When adding objects from a 3D View menu, either align them to that view's direction or the world coordinates");
+ RNA_def_property_ui_text(prop, N_("Align Object To"), N_("When adding objects from a 3D View menu, either align them to that view's direction or the world coordinates"));
prop= RNA_def_property(srna, "use_enter_edit_mode", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_ADD_EDITMODE);
- RNA_def_property_ui_text(prop, "Enter Edit Mode", "Enter Edit Mode automatically after adding a new object");
+ RNA_def_property_ui_text(prop, N_("Enter Edit Mode"), N_("Enter Edit Mode automatically after adding a new object"));
prop= RNA_def_property(srna, "use_drag_immediately", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELEASECONFIRM);
- RNA_def_property_ui_text(prop, "Release confirms", "Moving things with a mouse drag confirms when releasing the button");
+ RNA_def_property_ui_text(prop, N_("Release confirms"), N_("Moving things with a mouse drag confirms when releasing the button"));
/* Undo */
prop= RNA_def_property(srna, "undo_steps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undosteps");
RNA_def_property_range(prop, 0, 64);
- RNA_def_property_ui_text(prop, "Undo Steps", "Number of undo steps available (smaller values conserve memory)");
+ RNA_def_property_ui_text(prop, N_("Undo Steps"), N_("Number of undo steps available (smaller values conserve memory)"));
prop= RNA_def_property(srna, "undo_memory_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "undomemory");
RNA_def_property_range(prop, 0, 32767);
- RNA_def_property_ui_text(prop, "Undo Memory Size", "Maximum memory usage in megabytes (0 means unlimited)");
+ RNA_def_property_ui_text(prop, N_("Undo Memory Size"), N_("Maximum memory usage in megabytes (0 means unlimited)"));
prop= RNA_def_property(srna, "use_global_undo", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_GLOBALUNDO);
- RNA_def_property_ui_text(prop, "Global Undo", "Global undo works by keeping a full copy of the file itself in memory, so takes extra memory");
+ RNA_def_property_ui_text(prop, N_("Global Undo"), N_("Global undo works by keeping a full copy of the file itself in memory, so takes extra memory"));
/* auto keyframing */
prop= RNA_def_property(srna, "use_auto_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_mode", AUTOKEY_ON);
- RNA_def_property_ui_text(prop, "Auto Keying Enable", "Automatic keyframe insertion for Objects and Bones");
+ RNA_def_property_ui_text(prop, N_("Auto Keying Enable"), N_("Automatic keyframe insertion for Objects and Bones"));
RNA_def_property_ui_icon(prop, ICON_REC, 0);
prop= RNA_def_property(srna, "auto_keying_mode", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, auto_key_modes);
RNA_def_property_enum_funcs(prop, "rna_userdef_autokeymode_get", "rna_userdef_autokeymode_set", NULL);
- RNA_def_property_ui_text(prop, "Auto Keying Mode", "Mode of automatic keyframe insertion for Objects and Bones");
+ RNA_def_property_ui_text(prop, N_("Auto Keying Mode"), N_("Mode of automatic keyframe insertion for Objects and Bones"));
prop= RNA_def_property(srna, "use_keyframe_insert_available", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTAVAIL);
- RNA_def_property_ui_text(prop, "Auto Keyframe Insert Available", "Automatic keyframe insertion in available curves");
+ RNA_def_property_ui_text(prop, N_("Auto Keyframe Insert Available"), N_("Automatic keyframe insertion in available curves"));
/* keyframing settings */
prop= RNA_def_property(srna, "use_keyframe_insert_needed", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_INSERTNEEDED);
- RNA_def_property_ui_text(prop, "Keyframe Insert Needed", "Keyframe insertion only when keyframe needed");
+ RNA_def_property_ui_text(prop, N_("Keyframe Insert Needed"), N_("Keyframe insertion only when keyframe needed"));
prop= RNA_def_property(srna, "use_visual_keying", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_AUTOMATKEY);
- RNA_def_property_ui_text(prop, "Visual Keying", "Use Visual keying automatically for constrained objects");
+ RNA_def_property_ui_text(prop, N_("Visual Keying"), N_("Use Visual keying automatically for constrained objects"));
prop= RNA_def_property(srna, "use_insertkey_xyz_to_rgb", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "autokey_flag", AUTOKEY_FLAG_XYZ2RGB);
- RNA_def_property_ui_text(prop, "New F-Curve Colors - XYZ to RGB", "Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis");
+ RNA_def_property_ui_text(prop, N_("New F-Curve Colors - XYZ to RGB"), N_("Color for newly added transformation F-Curves (Location, Rotation, Scale) and also Color is based on the transform axis"));
prop= RNA_def_property(srna, "keyframe_new_interpolation_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, beztriple_interpolation_mode_items);
RNA_def_property_enum_sdna(prop, NULL, "ipo_new");
- RNA_def_property_ui_text(prop, "New Interpolation Type", "");
+ RNA_def_property_ui_text(prop, N_("New Interpolation Type"), "");
prop= RNA_def_property(srna, "keyframe_new_handle_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, beztriple_handle_type_items);
RNA_def_property_enum_sdna(prop, NULL, "keyhandles_new");
- RNA_def_property_ui_text(prop, "New Handles Type", "");
+ RNA_def_property_ui_text(prop, N_("New Handles Type"), "");
/* frame numbers */
prop= RNA_def_property(srna, "use_negative_frames", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_NONEGFRAMES);
- RNA_def_property_ui_text(prop, "Allow Negative Frames", "Current frame number can be manually set to a negative value");
+ RNA_def_property_ui_text(prop, N_("Allow Negative Frames"), N_("Current frame number can be manually set to a negative value"));
/* grease pencil */
prop= RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Manhattan Distance", "Pixels moved by mouse per axis when drawing stroke");
+ RNA_def_property_ui_text(prop, N_("Grease Pencil Manhattan Distance"), N_("Pixels moved by mouse per axis when drawing stroke"));
prop= RNA_def_property(srna, "grease_pencil_euclidean_distance", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_euclideandist");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Euclidean Distance", "Distance moved by mouse when drawing stroke (in pixels) to include");
+ RNA_def_property_ui_text(prop, N_("Grease Pencil Euclidean Distance"), N_("Distance moved by mouse when drawing stroke (in pixels) to include"));
prop= RNA_def_property(srna, "use_grease_pencil_smooth_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
- RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke");
+ RNA_def_property_ui_text(prop, N_("Grease Pencil Smooth Stroke"), N_("Smooth the final stroke"));
prop= RNA_def_property(srna, "use_grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
- RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke");
+ RNA_def_property_ui_text(prop, N_("Grease Pencil Simplify Stroke"), N_("Simplify the final stroke"));
prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");
RNA_def_property_range(prop, 0, 100);
- RNA_def_property_ui_text(prop, "Grease Pencil Eraser Radius", "Radius of eraser 'brush'");
+ RNA_def_property_ui_text(prop, N_("Grease Pencil Eraser Radius"), N_("Radius of eraser 'brush'"));
/* sculpt and paint */
prop= RNA_def_property(srna, "sculpt_paint_overlay_color", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, NULL, "sculpt_paint_overlay_col");
RNA_def_property_array(prop, 3);
- RNA_def_property_ui_text(prop, "Sculpt/Paint Overlay Color", "Color of texture overlay");
+ RNA_def_property_ui_text(prop, N_("Sculpt/Paint Overlay Color"), N_("Color of texture overlay"));
/* duplication linking */
prop= RNA_def_property(srna, "use_duplicate_mesh", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MESH);
- RNA_def_property_ui_text(prop, "Duplicate Mesh", "Causes mesh data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Mesh"), N_("Causes mesh data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_surface", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_SURF);
- RNA_def_property_ui_text(prop, "Duplicate Surface", "Causes surface data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Surface"), N_("Causes surface data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_curve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_CURVE);
- RNA_def_property_ui_text(prop, "Duplicate Curve", "Causes curve data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Curve"), N_("Causes curve data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_text", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_FONT);
- RNA_def_property_ui_text(prop, "Duplicate Text", "Causes text data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Text"), N_("Causes text data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_metaball", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MBALL);
- RNA_def_property_ui_text(prop, "Duplicate Metaball", "Causes metaball data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Metaball"), N_("Causes metaball data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_armature", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ARM);
- RNA_def_property_ui_text(prop, "Duplicate Armature", "Causes armature data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Armature"), N_("Causes armature data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_lamp", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_LAMP);
- RNA_def_property_ui_text(prop, "Duplicate Lamp", "Causes lamp data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Lamp"), N_("Causes lamp data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_material", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_MAT);
- RNA_def_property_ui_text(prop, "Duplicate Material", "Causes material data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Material"), N_("Causes material data to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_texture", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_TEX);
- RNA_def_property_ui_text(prop, "Duplicate Texture", "Causes texture data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Texture"), N_("Causes texture data to be duplicated with the object"));
// xxx
prop= RNA_def_property(srna, "use_duplicate_fcurve", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_IPO);
- RNA_def_property_ui_text(prop, "Duplicate F-Curve", "Causes F-curve data to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate F-Curve"), N_("Causes F-curve data to be duplicated with the object"));
// xxx
prop= RNA_def_property(srna, "use_duplicate_action", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_ACT);
- RNA_def_property_ui_text(prop, "Duplicate Action", "Causes actions to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Action"), N_("Causes actions to be duplicated with the object"));
prop= RNA_def_property(srna, "use_duplicate_particle", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "dupflag", USER_DUP_PSYS);
- RNA_def_property_ui_text(prop, "Duplicate Particle", "Causes particle systems to be duplicated with the object");
+ RNA_def_property_ui_text(prop, N_("Duplicate Particle"), N_("Causes particle systems to be duplicated with the object"));
}
static void rna_def_userdef_system(BlenderRNA *brna)
@@ -2336,7 +2337,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem gl_texture_clamp_items[] = {
- {0, "CLAMP_OFF", 0, "Off", ""},
+ {0, "CLAMP_OFF", 0, N_("Off"), ""},
{8192, "CLAMP_8192", 0, "8192", ""},
{4096, "CLAMP_4096", 0, "4096", ""},
{2048, "CLAMP_2048", 0, "2048", ""},
@@ -2347,26 +2348,26 @@ static void rna_def_userdef_system(BlenderRNA *brna)
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_mixing_samples_items[] = {
- {256, "SAMPLES_256", 0, "256", "Set audio mixing buffer size to 256 samples"},
- {512, "SAMPLES_512", 0, "512", "Set audio mixing buffer size to 512 samples"},
- {1024, "SAMPLES_1024", 0, "1024", "Set audio mixing buffer size to 1024 samples"},
- {2048, "SAMPLES_2048", 0, "2048", "Set audio mixing buffer size to 2048 samples"},
- {4096, "SAMPLES_4096", 0, "4096", "Set audio mixing buffer size to 4096 samples"},
- {8192, "SAMPLES_8192", 0, "8192", "Set audio mixing buffer size to 8192 samples"},
- {16384, "SAMPLES_16384", 0, "16384", "Set audio mixing buffer size to 16384 samples"},
- {32768, "SAMPLES_32768", 0, "32768", "Set audio mixing buffer size to 32768 samples"},
+ {256, "SAMPLES_256", 0, "256", N_("Set audio mixing buffer size to 256 samples")},
+ {512, "SAMPLES_512", 0, "512", N_("Set audio mixing buffer size to 512 samples")},
+ {1024, "SAMPLES_1024", 0, "1024", N_("Set audio mixing buffer size to 1024 samples")},
+ {2048, "SAMPLES_2048", 0, "2048", N_("Set audio mixing buffer size to 2048 samples")},
+ {4096, "SAMPLES_4096", 0, "4096", N_("Set audio mixing buffer size to 4096 samples")},
+ {8192, "SAMPLES_8192", 0, "8192", N_("Set audio mixing buffer size to 8192 samples")},
+ {16384, "SAMPLES_16384", 0, "16384", N_("Set audio mixing buffer size to 16384 samples")},
+ {32768, "SAMPLES_32768", 0, "32768", N_("Set audio mixing buffer size to 32768 samples")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_device_items[] = {
- {0, "NONE", 0, "None", "Null device - there will be no audio output"},
+ {0, "NONE", 0, N_("None"), N_("Null device - there will be no audio output")},
#ifdef WITH_SDL
- {1, "SDL", 0, "SDL", "SDL device - simple direct media layer, recommended for sequencer usage"},
+ {1, "SDL", 0, "SDL", N_("SDL device - simple direct media layer, recommended for sequencer usage")},
#endif
#ifdef WITH_OPENAL
- {2, "OPENAL", 0, "OpenAL", "OpenAL device - supports 3D audio, recommended for game engine usage"},
+ {2, "OPENAL", 0, "OpenAL", N_("OpenAL device - supports 3D audio, recommended for game engine usage")},
#endif
#ifdef WITH_JACK
- {3, "JACK", 0, "Jack", "Jack device - open source pro audio, recommended for pro audio users"},
+ {3, "JACK", 0, N_("Jack"), N_("Jack device - open source pro audio, recommended for pro audio users")},
#endif
{0, NULL, 0, NULL, NULL}};
@@ -2376,43 +2377,43 @@ static void rna_def_userdef_system(BlenderRNA *brna)
// {16000, "RATE_16000", 0, "16 kHz", "Set audio sampling rate to 16000 samples per second"},
// {22050, "RATE_22050", 0, "22.05 kHz", "Set audio sampling rate to 22050 samples per second"},
// {32000, "RATE_32000", 0, "32 kHz", "Set audio sampling rate to 32000 samples per second"},
- {44100, "RATE_44100", 0, "44.1 kHz", "Set audio sampling rate to 44100 samples per second"},
- {48000, "RATE_48000", 0, "48 kHz", "Set audio sampling rate to 48000 samples per second"},
+ {44100, "RATE_44100", 0, "44.1 kHz", N_("Set audio sampling rate to 44100 samples per second")},
+ {48000, "RATE_48000", 0, "48 kHz", N_("Set audio sampling rate to 48000 samples per second")},
// {88200, "RATE_88200", 0, "88.2 kHz", "Set audio sampling rate to 88200 samples per second"},
- {96000, "RATE_96000", 0, "96 kHz", "Set audio sampling rate to 96000 samples per second"},
- {192000, "RATE_192000", 0, "192 kHz", "Set audio sampling rate to 192000 samples per second"},
+ {96000, "RATE_96000", 0, "96 kHz", N_("Set audio sampling rate to 96000 samples per second")},
+ {192000, "RATE_192000", 0, "192 kHz", N_("Set audio sampling rate to 192000 samples per second")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_format_items[] = {
- {0x01, "U8", 0, "8-bit Unsigned", "Set audio sample format to 8 bit unsigned integer"},
- {0x12, "S16", 0, "16-bit Signed", "Set audio sample format to 16 bit signed integer"},
- {0x13, "S24", 0, "24-bit Signed", "Set audio sample format to 24 bit signed integer"},
- {0x14, "S32", 0, "32-bit Signed", "Set audio sample format to 32 bit signed integer"},
- {0x24, "FLOAT", 0, "32-bit Float", "Set audio sample format to 32 bit float"},
- {0x28, "DOUBLE", 0, "64-bit Float", "Set audio sample format to 64 bit float"},
+ {0x01, "U8", 0, N_("8-bit Unsigned"), N_("Set audio sample format to 8 bit unsigned integer")},
+ {0x12, "S16", 0, N_("16-bit Signed"), N_("Set audio sample format to 16 bit signed integer")},
+ {0x13, "S24", 0, N_("24-bit Signed"), N_("Set audio sample format to 24 bit signed integer")},
+ {0x14, "S32", 0, N_("32-bit Signed"), N_("Set audio sample format to 32 bit signed integer")},
+ {0x24, "FLOAT", 0, N_("32-bit Float"), N_("Set audio sample format to 32 bit float")},
+ {0x28, "DOUBLE", 0, N_("64-bit Float"), N_("Set audio sample format to 64 bit float")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem audio_channel_items[] = {
- {1, "MONO", 0, "Mono", "Set audio channels to mono"},
- {2, "STEREO", 0, "Stereo", "Set audio channels to stereo"},
- {4, "SURROUND4", 0, "4 Channels", "Set audio channels to 4 channels"},
- {6, "SURROUND51", 0, "5.1 Surround", "Set audio channels to 5.1 surround sound"},
- {8, "SURROUND71", 0, "7.1 Surround", "Set audio channels to 7.1 surround sound"},
+ {1, "MONO", 0, N_("Mono"), N_("Set audio channels to mono")},
+ {2, "STEREO", 0, N_("Stereo"), N_("Set audio channels to stereo")},
+ {4, "SURROUND4", 0, N_("4 Channels"), N_("Set audio channels to 4 channels")},
+ {6, "SURROUND51", 0, N_("5.1 Surround"), N_("Set audio channels to 5.1 surround sound")},
+ {8, "SURROUND71", 0, N_("7.1 Surround"), N_("Set audio channels to 7.1 surround sound")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem draw_method_items[] = {
- {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, "Automatic", "Automatically set based on graphics card and driver"},
- {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, "Triple Buffer", "Use a third buffer for minimal redraws at the cost of more memory"},
- {USER_DRAW_OVERLAP, "OVERLAP", 0, "Overlap", "Redraw all overlapping regions, minimal memory usage but more redraws"},
- {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, "Overlap Flip", "Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)"},
- {USER_DRAW_FULL, "FULL", 0, "Full", "Do a full redraw each time, slow, only use for reference or when all else fails"},
+ {USER_DRAW_AUTOMATIC, "AUTOMATIC", 0, N_("Automatic"), N_("Automatically set based on graphics card and driver")},
+ {USER_DRAW_TRIPLE, "TRIPLE_BUFFER", 0, N_("Triple Buffer"), N_("Use a third buffer for minimal redraws at the cost of more memory")},
+ {USER_DRAW_OVERLAP, "OVERLAP", 0, N_("Overlap"), N_("Redraw all overlapping regions, minimal memory usage but more redraws")},
+ {USER_DRAW_OVERLAP_FLIP, "OVERLAP_FLIP", 0, N_("Overlap Flip"), N_("Redraw all overlapping regions, minimal memory usage but more redraws (for graphics drivers that do flipping)")},
+ {USER_DRAW_FULL, "FULL", 0, N_("Full"), N_("Do a full redraw each time, slow, only use for reference or when all else fails")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem color_picker_types[] = {
- {USER_CP_CIRCLE, "CIRCLE", 0, "Circle", "A circular Hue/Saturation color wheel, with Value slider"},
- {USER_CP_SQUARE_SV, "SQUARE_SV", 0, "Square (SV + H)", "A square showing Saturation/Value, with Hue slider"},
- {USER_CP_SQUARE_HS, "SQUARE_HS", 0, "Square (HS + V)", "A square showing Hue/Saturation, with Value slider"},
- {USER_CP_SQUARE_HV, "SQUARE_HV", 0, "Square (HV + S)", "A square showing Hue/Value, with Saturation slider"},
+ {USER_CP_CIRCLE, "CIRCLE", 0, N_("Circle"), N_("A circular Hue/Saturation color wheel, with Value slider")},
+ {USER_CP_SQUARE_SV, "SQUARE_SV", 0, N_("Square (SV + H)"), N_("A square showing Saturation/Value, with Hue slider")},
+ {USER_CP_SQUARE_HS, "SQUARE_HS", 0, N_("Square (HS + V)"), N_("A square showing Hue/Saturation, with Value slider")},
+ {USER_CP_SQUARE_HV, "SQUARE_HV", 0, N_("Square (HV + S)"), N_("A square showing Hue/Value, with Saturation slider")},
{0, NULL, 0, NULL, NULL}};
/* hardcoded here, could become dynamic somehow */
@@ -2451,50 +2452,50 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_international_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_DOTRANSLATE);
- RNA_def_property_ui_text(prop, "International Fonts", "Use international fonts");
+ RNA_def_property_ui_text(prop, N_("International Fonts"), N_("Use international fonts"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "dpi", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dpi");
RNA_def_property_range(prop, 48, 128);
- RNA_def_property_ui_text(prop, "DPI", "Font size and resolution for display");
+ RNA_def_property_ui_text(prop, "DPI", N_("Font size and resolution for display"));
RNA_def_property_update(prop, 0, "rna_userdef_dpi_update");
prop= RNA_def_property(srna, "scrollback", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "scrollback");
RNA_def_property_range(prop, 32, 32768);
- RNA_def_property_ui_text(prop, "Scrollback", "Maximum number of lines to store for the console buffer");
+ RNA_def_property_ui_text(prop, N_("Scrollback"), N_("Maximum number of lines to store for the console buffer"));
prop= RNA_def_property(srna, "author", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "author");
RNA_def_property_string_maxlength(prop, 80);
- RNA_def_property_ui_text(prop, "Author", "Name that will be used in exported files when format supports such feature");
+ RNA_def_property_ui_text(prop, N_("Author"), N_("Name that will be used in exported files when format supports such feature"));
/* Language Selection */
prop= RNA_def_property(srna, "language", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, language_items);
- RNA_def_property_ui_text(prop, "Language", "Language use for translation");
+ RNA_def_property_ui_text(prop, N_("Language"), N_("Language use for translation"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_translate_tooltips", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_TOOLTIPS);
- RNA_def_property_ui_text(prop, "Translate Tooltips", "Translate Tooltips");
+ RNA_def_property_ui_text(prop, N_("Translate Tooltips"), N_("Translate Tooltips"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_translate_buttons", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_BUTTONS);
- RNA_def_property_ui_text(prop, "Translate Buttons", "Translate button labels");
+ RNA_def_property_ui_text(prop, N_("Translate Buttons"), N_("Translate button labels"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_translate_toolbox", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_TR_MENUS);
- RNA_def_property_ui_text(prop, "Translate Toolbox", "Translate toolbox menu");
+ RNA_def_property_ui_text(prop, N_("Translate Toolbox"), N_("Translate toolbox menu"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT);
- RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts");
+ RNA_def_property_ui_text(prop, N_("Textured Fonts"), N_("Use textures for drawing international fonts"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
/* System & OpenGL */
@@ -2502,148 +2503,148 @@ static void rna_def_userdef_system(BlenderRNA *brna)
prop= RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "light", "");
RNA_def_property_struct_type(prop, "UserSolidLight");
- RNA_def_property_ui_text(prop, "Solid Lights", "Lights user to display objects in solid draw mode");
+ RNA_def_property_ui_text(prop, N_("Solid Lights"), N_("Lights user to display objects in solid draw mode"));
prop= RNA_def_property(srna, "use_weight_color_range", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_CUSTOM_RANGE);
- RNA_def_property_ui_text(prop, "Use Weight Color Range", "Enable color range used for weight visualization in weight painting mode");
+ RNA_def_property_ui_text(prop, N_("Use Weight Color Range"), N_("Enable color range used for weight visualization in weight painting mode"));
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
prop= RNA_def_property(srna, "weight_color_range", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "coba_weight");
RNA_def_property_struct_type(prop, "ColorRamp");
- RNA_def_property_ui_text(prop, "Weight Color Range", "Color range used for weight visualization in weight painting mode");
+ RNA_def_property_ui_text(prop, N_("Weight Color Range"), N_("Color range used for weight visualization in weight painting mode"));
RNA_def_property_update(prop, 0, "rna_UserDef_weight_color_update");
prop= RNA_def_property(srna, "color_picker_type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, color_picker_types);
RNA_def_property_enum_sdna(prop, NULL, "color_picker_type");
- RNA_def_property_ui_text(prop, "Color Picker Type", "Different styles of displaying the color picker widget");
+ RNA_def_property_ui_text(prop, N_("Color Picker Type"), N_("Different styles of displaying the color picker widget"));
prop= RNA_def_property(srna, "use_preview_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ALLWINCODECS);
- RNA_def_property_ui_text(prop, "Enable All Codecs", "Enables automatic saving of preview images in the .blend file (Windows only)");
+ RNA_def_property_ui_text(prop, N_("Enable All Codecs"), N_("Enables automatic saving of preview images in the .blend file (Windows only)"));
prop= RNA_def_property(srna, "use_scripts_auto_execute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_SCRIPT_AUTOEXEC_DISABLE);
- RNA_def_property_ui_text(prop, "Auto Run Python Scripts", "Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)");
+ RNA_def_property_ui_text(prop, N_("Auto Run Python Scripts"), N_("Allow any .blend file to run scripts automatically (unsafe with blend files from an untrusted source)"));
RNA_def_property_update(prop, 0, "rna_userdef_script_autoexec_update");
prop= RNA_def_property(srna, "use_tabs_as_spaces", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_TXT_TABSTOSPACES_DISABLE);
- RNA_def_property_ui_text(prop, "Tabs as Spaces", "Automatically converts all new tabs into spaces for new and loaded text files");
+ RNA_def_property_ui_text(prop, N_("Tabs as Spaces"), N_("Automatically converts all new tabs into spaces for new and loaded text files"));
prop= RNA_def_property(srna, "prefetch_frames", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "prefetchframes");
RNA_def_property_range(prop, 0, 500);
- RNA_def_property_ui_text(prop, "Prefetch Frames", "Number of frames to render ahead during playback");
+ RNA_def_property_ui_text(prop, N_("Prefetch Frames"), N_("Number of frames to render ahead during playback"));
prop= RNA_def_property(srna, "memory_cache_limit", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "memcachelimit");
RNA_def_property_range(prop, 0, (sizeof(void *) ==8)? 1024*16: 1024); /* 32 bit 2 GB, 64 bit 16 GB */
- RNA_def_property_ui_text(prop, "Memory Cache Limit", "Memory cache limit in sequencer (megabytes)");
+ RNA_def_property_ui_text(prop, N_("Memory Cache Limit"), N_("Memory cache limit in sequencer (megabytes)"));
RNA_def_property_update(prop, 0, "rna_Userdef_memcache_update");
prop= RNA_def_property(srna, "frame_server_port", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "frameserverport");
RNA_def_property_range(prop, 0, 32727);
- RNA_def_property_ui_text(prop, "Frame Server Port", "Frameserver Port for Frameserver Rendering");
+ RNA_def_property_ui_text(prop, N_("Frame Server Port"), N_("Frameserver Port for Frameserver Rendering"));
prop= RNA_def_property(srna, "gl_clip_alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "glalphaclip");
RNA_def_property_range(prop, 0.0f, 1.0f);
- RNA_def_property_ui_text(prop, "Clip Alpha", "Clip alpha below this threshold in the 3D textured view");
+ RNA_def_property_ui_text(prop, N_("Clip Alpha"), N_("Clip alpha below this threshold in the 3D textured view"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "use_mipmaps", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_MIPMAP);
- RNA_def_property_ui_text(prop, "Mipmaps", "Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)");
+ RNA_def_property_ui_text(prop, N_("Mipmaps"), N_("Scale textures for the 3D View (looks nicer but uses more memory and slows image reloading)"));
RNA_def_property_update(prop, 0, "rna_userdef_mipmap_update");
prop= RNA_def_property(srna, "use_vertex_buffer_objects", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_VBO);
- RNA_def_property_ui_text(prop, "VBOs", "Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering");
+ RNA_def_property_ui_text(prop, N_("VBOs"), N_("Use Vertex Buffer Objects (or Vertex Arrays, if unsupported) for viewport rendering"));
prop= RNA_def_property(srna, "use_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "gameflags", USER_DISABLE_AA);
- RNA_def_property_ui_text(prop, "Anti-aliasing", "Use anti-aliasing for the 3D view (may impact redraw performance)");
+ RNA_def_property_ui_text(prop, N_("Anti-aliasing"), N_("Use anti-aliasing for the 3D view (may impact redraw performance)"));
prop= RNA_def_property(srna, "gl_texture_limit", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "glreslimit");
RNA_def_property_enum_items(prop, gl_texture_clamp_items);
- RNA_def_property_ui_text(prop, "GL Texture Limit", "Limit the texture size to save graphics memory");
+ RNA_def_property_ui_text(prop, N_("GL Texture Limit"), N_("Limit the texture size to save graphics memory"));
RNA_def_property_update(prop, 0, "rna_userdef_gl_texture_limit_update");
prop= RNA_def_property(srna, "texture_time_out", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "textimeout");
RNA_def_property_range(prop, 0, 3600);
- RNA_def_property_ui_text(prop, "Texture Time Out", "Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)");
+ RNA_def_property_ui_text(prop, N_("Texture Time Out"), N_("Time since last access of a GL texture in seconds after which it is freed. (Set to 0 to keep textures allocated.)"));
prop= RNA_def_property(srna, "texture_collection_rate", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "texcollectrate");
RNA_def_property_range(prop, 1, 3600);
- RNA_def_property_ui_text(prop, "Texture Collection Rate", "Number of seconds between each run of the GL texture garbage collector");
+ RNA_def_property_ui_text(prop, N_("Texture Collection Rate"), N_("Number of seconds between each run of the GL texture garbage collector"));
prop= RNA_def_property(srna, "window_draw_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "wmdrawmethod");
RNA_def_property_enum_items(prop, draw_method_items);
- RNA_def_property_ui_text(prop, "Window Draw Method", "Drawing method used by the window manager");
+ RNA_def_property_ui_text(prop, N_("Window Draw Method"), N_("Drawing method used by the window manager"));
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "audio_mixing_buffer", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "mixbufsize");
RNA_def_property_enum_items(prop, audio_mixing_samples_items);
- RNA_def_property_ui_text(prop, "Audio Mixing Buffer", "Sets the number of samples used by the audio mixing buffer");
+ RNA_def_property_ui_text(prop, N_("Audio Mixing Buffer"), N_("Sets the number of samples used by the audio mixing buffer"));
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_device", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiodevice");
RNA_def_property_enum_items(prop, audio_device_items);
- RNA_def_property_ui_text(prop, "Audio Device", "Sets the audio output device");
+ RNA_def_property_ui_text(prop, N_("Audio Device"), N_("Sets the audio output device"));
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_sample_rate", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiorate");
RNA_def_property_enum_items(prop, audio_rate_items);
- RNA_def_property_ui_text(prop, "Audio Sample Rate", "Sets the audio sample rate");
+ RNA_def_property_ui_text(prop, N_("Audio Sample Rate"), N_("Sets the audio sample rate"));
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_sample_format", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audioformat");
RNA_def_property_enum_items(prop, audio_format_items);
- RNA_def_property_ui_text(prop, "Audio Sample Format", "Sets the audio sample format");
+ RNA_def_property_ui_text(prop, N_("Audio Sample Format"), N_("Sets the audio sample format"));
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "audio_channels", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "audiochannels");
RNA_def_property_enum_items(prop, audio_channel_items);
- RNA_def_property_ui_text(prop, "Audio Channels", "Sets the audio channel count");
+ RNA_def_property_ui_text(prop, N_("Audio Channels"), N_("Sets the audio channel count"));
RNA_def_property_update(prop, 0, "rna_UserDef_audio_update");
prop= RNA_def_property(srna, "screencast_fps", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "scrcastfps");
RNA_def_property_range(prop, 10, 50);
- RNA_def_property_ui_text(prop, "FPS", "Frame rate for the screencast to be played back");
+ RNA_def_property_ui_text(prop, N_("FPS"), N_("Frame rate for the screencast to be played back"));
prop= RNA_def_property(srna, "screencast_wait_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "scrcastwait");
RNA_def_property_range(prop, 50, 1000);
- RNA_def_property_ui_text(prop, "Wait Timer (ms)", "Time in milliseconds between each frame recorded for screencast");
+ RNA_def_property_ui_text(prop, N_("Wait Timer (ms)"), N_("Time in milliseconds between each frame recorded for screencast"));
prop= RNA_def_property(srna, "use_text_antialiasing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "text_render", USER_TEXT_DISABLE_AA);
- RNA_def_property_ui_text(prop, "Text Anti-aliasing", "Draw user interface text anti-aliased");
+ RNA_def_property_ui_text(prop, N_("Text Anti-aliasing"), N_("Draw user interface text anti-aliased"));
RNA_def_property_update(prop, 0, "rna_userdef_text_update");
#if 0
prop= RNA_def_property(srna, "verse_master", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "versemaster");
- RNA_def_property_ui_text(prop, "Verse Master", "The Verse Master-server IP");
+ RNA_def_property_ui_text(prop, N_("Verse Master"), N_("The Verse Master-server IP"));
prop= RNA_def_property(srna, "verse_username", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "verseuser");
- RNA_def_property_ui_text(prop, "Verse Username", "The Verse user name");
+ RNA_def_property_ui_text(prop, N_("Verse Username"), N_("The Verse user name"));
#endif
}
@@ -2653,112 +2654,112 @@ static void rna_def_userdef_input(BlenderRNA *brna)
StructRNA *srna;
static EnumPropertyItem select_mouse_items[] = {
- {USER_LMOUSESELECT, "LEFT", 0, "Left", "Use left Mouse Button for selection"},
- {0, "RIGHT", 0, "Right", "Use Right Mouse Button for selection"},
+ {USER_LMOUSESELECT, "LEFT", 0, N_("Left"), N_("Use left Mouse Button for selection")},
+ {0, "RIGHT", 0, N_("Right"), N_("Use Right Mouse Button for selection")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_rotation_items[] = {
- {0, "TURNTABLE", 0, "Turntable", "Use turntable style rotation in the viewport"},
- {USER_TRACKBALL, "TRACKBALL", 0, "Trackball", "Use trackball style rotation in the viewport"},
+ {0, "TURNTABLE", 0, N_("Turntable"), N_("Use turntable style rotation in the viewport")},
+ {USER_TRACKBALL, "TRACKBALL", 0, N_("Trackball"), N_("Use trackball style rotation in the viewport")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_zoom_styles[] = {
- {USER_ZOOM_CONT, "CONTINUE", 0, "Continue", "Old style zoom, continues while moving mouse up or down"},
- {USER_ZOOM_DOLLY, "DOLLY", 0, "Dolly", "Zooms in and out based on vertical mouse movement"},
- {USER_ZOOM_SCALE, "SCALE", 0, "Scale", "Zooms in and out like scaling the view, mouse movements relative to center"},
+ {USER_ZOOM_CONT, "CONTINUE", 0, N_("Continue"), N_("Old style zoom, continues while moving mouse up or down")},
+ {USER_ZOOM_DOLLY, "DOLLY", 0, N_("Dolly"), N_("Zooms in and out based on vertical mouse movement")},
+ {USER_ZOOM_SCALE, "SCALE", 0, N_("Scale"), N_("Zooms in and out like scaling the view, mouse movements relative to center")},
{0, NULL, 0, NULL, NULL}};
static EnumPropertyItem view_zoom_axes[] = {
- {0, "VERTICAL", 0, "Vertical", "Zooms in and out based on vertical mouse movement"},
- {USER_ZOOM_HORIZ, "HORIZONTAL", 0, "Horizontal", "Zooms in and out based on horizontal mouse movement"},
+ {0, "VERTICAL", 0, N_("Vertical"), N_("Zooms in and out based on vertical mouse movement")},
+ {USER_ZOOM_HORIZ, "HORIZONTAL", 0, N_("Horizontal"), N_("Zooms in and out based on horizontal mouse movement")},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesInput", NULL);
RNA_def_struct_sdna(srna, "UserDef");
RNA_def_struct_nested(brna, srna, "UserPreferences");
- RNA_def_struct_ui_text(srna, "Input", "Settings for input devices");
+ RNA_def_struct_ui_text(srna, N_("Input"), N_("Settings for input devices"));
prop= RNA_def_property(srna, "select_mouse", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, select_mouse_items);
RNA_def_property_enum_funcs(prop, NULL, "rna_userdef_select_mouse_set", NULL);
- RNA_def_property_ui_text(prop, "Select Mouse", "The mouse button used for selection");
+ RNA_def_property_ui_text(prop, N_("Select Mouse"), N_("The mouse button used for selection"));
prop= RNA_def_property(srna, "view_zoom_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "viewzoom");
RNA_def_property_enum_items(prop, view_zoom_styles);
- RNA_def_property_ui_text(prop, "Zoom Style", "Which style to use for viewport scaling");
+ RNA_def_property_ui_text(prop, N_("Zoom Style"), N_("Which style to use for viewport scaling"));
prop= RNA_def_property(srna, "view_zoom_axis", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "uiflag");
RNA_def_property_enum_items(prop, view_zoom_axes);
- RNA_def_property_ui_text(prop, "Zoom Axis", "Axis of mouse movement to zoom in or out on");
+ RNA_def_property_ui_text(prop, N_("Zoom Axis"), N_("Axis of mouse movement to zoom in or out on"));
prop= RNA_def_property(srna, "invert_mouse_zoom", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZOOM_INVERT);
- RNA_def_property_ui_text(prop, "Invert Zoom Direction", "Invert the axis of mouse movement for zooming");
+ RNA_def_property_ui_text(prop, N_("Invert Zoom Direction"), N_("Invert the axis of mouse movement for zooming"));
prop= RNA_def_property(srna, "view_rotate_method", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag");
RNA_def_property_enum_items(prop, view_rotation_items);
- RNA_def_property_ui_text(prop, "View Rotation", "Rotation style in the viewport");
+ RNA_def_property_ui_text(prop, N_("View Rotation"), N_("Rotation style in the viewport"));
prop= RNA_def_property(srna, "use_mouse_continuous", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_CONTINUOUS_MOUSE);
- RNA_def_property_ui_text(prop, "Continuous Grab", "Allow moving the mouse outside the view on some manipulations (transform, ui control drag)");
+ RNA_def_property_ui_text(prop, N_("Continuous Grab"), N_("Allow moving the mouse outside the view on some manipulations (transform, ui control drag)"));
/* tweak tablet & mouse preset */
prop= RNA_def_property(srna, "drag_threshold", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dragthreshold");
RNA_def_property_range(prop, 3, 40);
- RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you have to drag before dragging UI items happens");
+ RNA_def_property_ui_text(prop, N_("Drag Threshold"), N_("Amount of pixels you have to drag before dragging UI items happens"));
prop= RNA_def_property(srna, "ndof_pan_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_pan");
RNA_def_property_range(prop, 0, 200);
- RNA_def_property_ui_text(prop, "NDof Pan Speed", "The overall panning speed of an NDOF device, as percent of standard");
+ RNA_def_property_ui_text(prop, N_("NDof Pan Speed"), N_("The overall panning speed of an NDOF device, as percent of standard"));
prop= RNA_def_property(srna, "ndof_rotate_speed", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "ndof_rotate");
RNA_def_property_range(prop, 0, 200);
- RNA_def_property_ui_text(prop, "NDof Rotation Speed", "The overall rotation speed of an NDOF device, as percent of standard");
+ RNA_def_property_ui_text(prop, N_("NDof Rotation Speed"), N_("The overall rotation speed of an NDOF device, as percent of standard"));
prop= RNA_def_property(srna, "mouse_double_click_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "dbl_click_time");
RNA_def_property_range(prop, 1, 1000);
- RNA_def_property_ui_text(prop, "Double Click Timeout", "The time (in ms) for a double click");
+ RNA_def_property_ui_text(prop, N_("Double Click Timeout"), N_("The time (in ms) for a double click"));
prop= RNA_def_property(srna, "use_mouse_emulate_3_button", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_TWOBUTTONMOUSE);
- RNA_def_property_ui_text(prop, "Emulate 3 Button Mouse", "Emulates Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)");
+ RNA_def_property_ui_text(prop, N_("Emulate 3 Button Mouse"), N_("Emulates Middle Mouse with Alt+Left Mouse (doesn't work with Left Mouse Select option)"));
prop= RNA_def_property(srna, "use_emulate_numpad", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_NONUMPAD);
- RNA_def_property_ui_text(prop, "Emulate Numpad", "Causes the 1 to 0 keys to act as the numpad (useful for laptops)");
+ RNA_def_property_ui_text(prop, N_("Emulate Numpad"), N_("Causes the 1 to 0 keys to act as the numpad (useful for laptops)"));
/* middle mouse button */
prop= RNA_def_property(srna, "use_mouse_mmb_paste", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_MMB_PASTE);
- RNA_def_property_ui_text(prop, "Middle Mouse Paste", "In text window, paste with middle mouse button instead of panning");
+ RNA_def_property_ui_text(prop, N_("Middle Mouse Paste"), N_("In text window, paste with middle mouse button instead of panning"));
prop= RNA_def_property(srna, "invert_zoom_wheel", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_WHEELZOOMDIR);
- RNA_def_property_ui_text(prop, "Wheel Invert Zoom", "Swap the Mouse Wheel zoom direction");
+ RNA_def_property_ui_text(prop, N_("Wheel Invert Zoom"), N_("Swap the Mouse Wheel zoom direction"));
prop= RNA_def_property(srna, "wheel_scroll_lines", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "wheellinescroll");
RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Wheel Scroll Lines", "The number of lines scrolled at a time with the mouse wheel");
+ RNA_def_property_ui_text(prop, N_("Wheel Scroll Lines"), N_("The number of lines scrolled at a time with the mouse wheel"));
/* U.keymaps - custom keymaps that have been edited from default configs */
prop= RNA_def_property(srna, "edited_keymaps", PROP_COLLECTION, PROP_NONE);
RNA_def_property_collection_sdna(prop, NULL, "keymaps", NULL);
RNA_def_property_struct_type(prop, "KeyMap");
- RNA_def_property_ui_text(prop, "Edited Keymaps", "");
+ RNA_def_property_ui_text(prop, N_("Edited Keymaps"), "");
prop= RNA_def_property(srna, "active_keyconfig", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "keyconfigstr");
- RNA_def_property_ui_text(prop, "Key Config", "The name of the active key configuration");
+ RNA_def_property_ui_text(prop, N_("Key Config"), N_("The name of the active key configuration"));
}
static void rna_def_userdef_filepaths(BlenderRNA *brna)
@@ -2768,12 +2769,12 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
static EnumPropertyItem anim_player_presets[] = {
//{0, "INTERNAL", 0, "Internal", "Built-in animation player"}, // doesn't work yet!
- {1, "BLENDER24", 0, "Blender 2.4", "Blender command line animation playback - path to Blender 2.4"},
- {2, "DJV", 0, "Djv", "Open source frame player: http://djv.sourceforge.net"},
- {3, "FRAMECYCLER", 0, "FrameCycler", "Frame player from IRIDAS"},
- {4, "RV", 0, "rv", "Frame player from Tweak Software"},
- {5, "MPLAYER", 0, "MPlayer", "Media player for video & png/jpeg/sgi image sequences"},
- {50, "CUSTOM", 0, "Custom", "Custom animation player executable path"},
+ {1, "BLENDER24", 0, "Blender 2.4", N_("Blender command line animation playback - path to Blender 2.4")},
+ {2, "DJV", 0, "Djv", N_("Open source frame player: http://djv.sourceforge.net")},
+ {3, "FRAMECYCLER", 0, N_("FrameCycler"), N_("Frame player from IRIDAS")},
+ {4, "RV", 0, "rv", N_("Frame player from Tweak Software")},
+ {5, "MPLAYER", 0, "MPlayer", N_("Media player for video & png/jpeg/sgi image sequences")},
+ {50, "CUSTOM", 0, N_("Custom"), N_("Custom animation player executable path")},
{0, NULL, 0, NULL, NULL}};
srna= RNA_def_struct(brna, "UserPreferencesFilePaths", NULL);
@@ -2783,78 +2784,78 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
prop= RNA_def_property(srna, "show_hidden_files_datablocks", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_DOT);
- RNA_def_property_ui_text(prop, "Hide Dot Files/Datablocks", "Hide files/datablocks that start with a dot(.*)");
+ RNA_def_property_ui_text(prop, N_("Hide Dot Files/Datablocks"), N_("Hide files/datablocks that start with a dot(.*)"));
prop= RNA_def_property(srna, "use_filter_files", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_FILTERFILEEXTS);
- RNA_def_property_ui_text(prop, "Filter File Extensions", "Display only files with extensions in the image select window");
+ RNA_def_property_ui_text(prop, N_("Filter File Extensions"), N_("Display only files with extensions in the image select window"));
prop= RNA_def_property(srna, "hide_recent_locations", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_HIDE_RECENT);
- RNA_def_property_ui_text(prop, "Hide Recent Locations", "Hide recent locations in the file selector");
+ RNA_def_property_ui_text(prop, N_("Hide Recent Locations"), N_("Hide recent locations in the file selector"));
prop= RNA_def_property(srna, "show_thumbnails", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_THUMBNAILS);
- RNA_def_property_ui_text(prop, "Show Thumbnails", "Open in thumbnail view for images and movies");
+ RNA_def_property_ui_text(prop, N_("Show Thumbnails"), N_("Open in thumbnail view for images and movies"));
prop= RNA_def_property(srna, "use_relative_paths", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_RELPATHS);
- RNA_def_property_ui_text(prop, "Relative Paths", "Default relative path option for the file selector");
+ RNA_def_property_ui_text(prop, N_("Relative Paths"), N_("Default relative path option for the file selector"));
prop= RNA_def_property(srna, "use_file_compression", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_FILECOMPRESS);
- RNA_def_property_ui_text(prop, "Compress File", "Enable file compression when saving .blend files");
+ RNA_def_property_ui_text(prop, N_("Compress File"), N_("Enable file compression when saving .blend files"));
prop= RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI);
- RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files");
+ RNA_def_property_ui_text(prop, N_("Load UI"), N_("Load user interface setup when loading .blend files"));
prop= RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "fontdir");
- RNA_def_property_ui_text(prop, "Fonts Directory", "The default directory to search for loading fonts");
+ RNA_def_property_ui_text(prop, N_("Fonts Directory"), N_("The default directory to search for loading fonts"));
prop= RNA_def_property(srna, "texture_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "textudir");
- RNA_def_property_ui_text(prop, "Textures Directory", "The default directory to search for textures");
+ RNA_def_property_ui_text(prop, N_("Textures Directory"), N_("The default directory to search for textures"));
prop= RNA_def_property(srna, "texture_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugtexdir");
- RNA_def_property_ui_text(prop, "Texture Plugin Directory", "The default directory to search for texture plugins");
+ RNA_def_property_ui_text(prop, N_("Texture Plugin Directory"), N_("The default directory to search for texture plugins"));
prop= RNA_def_property(srna, "sequence_plugin_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "plugseqdir");
- RNA_def_property_ui_text(prop, "Sequence Plugin Directory", "The default directory to search for sequence plugins");
+ RNA_def_property_ui_text(prop, N_("Sequence Plugin Directory"), N_("The default directory to search for sequence plugins"));
prop= RNA_def_property(srna, "render_output_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "renderdir");
- RNA_def_property_ui_text(prop, "Render Output Directory", "The default directory for rendering output, for new scenes");
+ RNA_def_property_ui_text(prop, N_("Render Output Directory"), N_("The default directory for rendering output, for new scenes"));
prop= RNA_def_property(srna, "script_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "pythondir");
- RNA_def_property_ui_text(prop, "Python Scripts Directory", "Alternate script path, matching the default layout with subdirs: startup, addons & modules (requires restart)");
+ RNA_def_property_ui_text(prop, N_("Python Scripts Directory"), N_("Alternate script path, matching the default layout with subdirs: startup, addons & modules (requires restart)"));
/* TODO, editing should reset sys.path! */
prop= RNA_def_property(srna, "sound_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "sounddir");
- RNA_def_property_ui_text(prop, "Sounds Directory", "The default directory to search for sounds");
+ RNA_def_property_ui_text(prop, N_("Sounds Directory"), N_("The default directory to search for sounds"));
prop= RNA_def_property(srna, "temporary_directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "tempdir");
- RNA_def_property_ui_text(prop, "Temporary Directory", "The directory for storing temporary save files");
+ RNA_def_property_ui_text(prop, N_("Temporary Directory"), N_("The directory for storing temporary save files"));
RNA_def_property_update(prop, 0, "rna_userdef_temp_update");
prop= RNA_def_property(srna, "image_editor", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "image_editor");
- RNA_def_property_ui_text(prop, "Image Editor", "Path to an image editor");
+ RNA_def_property_ui_text(prop, N_("Image Editor"), N_("Path to an image editor"));
prop= RNA_def_property(srna, "animation_player", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "anim_player");
- RNA_def_property_ui_text(prop, "Animation Player", "Path to a custom animation/frame sequence player");
+ RNA_def_property_ui_text(prop, N_("Animation Player"), N_("Path to a custom animation/frame sequence player"));
prop= RNA_def_property(srna, "animation_player_preset", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_sdna(prop, NULL, "anim_player_preset");
RNA_def_property_enum_items(prop, anim_player_presets);
- RNA_def_property_ui_text(prop, "Animation Player Preset", "Preset configs for external animation players");
+ RNA_def_property_ui_text(prop, N_("Animation Player Preset"), N_("Preset configs for external animation players"));
RNA_def_property_enum_default(prop, 1); /* set default to blender 2.4 player until an internal one is back */
/* Autosave */
@@ -2862,26 +2863,26 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna)
prop= RNA_def_property(srna, "save_version", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "versions");
RNA_def_property_range(prop, 0, 32);
- RNA_def_property_ui_text(prop, "Save Versions", "The number of old versions to maintain in the current directory, when manually saving");
+ RNA_def_property_ui_text(prop, N_("Save Versions"), N_("The number of old versions to maintain in the current directory, when manually saving"));
prop= RNA_def_property(srna, "use_auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
- RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files in temp directory, uses process ID");
+ RNA_def_property_ui_text(prop, N_("Auto Save Temporary Files"), N_("Automatic saving of temporary files in temp directory, uses process ID"));
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
prop= RNA_def_property(srna, "auto_save_time", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "savetime");
RNA_def_property_range(prop, 1, 60);
- RNA_def_property_ui_text(prop, "Auto Save Time", "The time (in minutes) to wait between automatic temporary saves");
+ RNA_def_property_ui_text(prop, N_("Auto Save Time"), N_("The time (in minutes) to wait between automatic temporary saves"));
RNA_def_property_update(prop, 0, "rna_userdef_autosave_update");
prop= RNA_def_property(srna, "recent_files", PROP_INT, PROP_NONE);
RNA_def_property_range(prop, 0, 30);
- RNA_def_property_ui_text(prop, "Recent Files", "Maximum number of recently opened files to remember");
+ RNA_def_property_ui_text(prop, N_("Recent Files"), N_("Maximum number of recently opened files to remember"));
prop= RNA_def_property(srna, "use_save_preview_images", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_SAVE_PREVIEWS);
- RNA_def_property_ui_text(prop, "Save Preview Images", "Enables automatic saving of preview images in the .blend file");
+ RNA_def_property_ui_text(prop, N_("Save Preview Images"), N_("Enables automatic saving of preview images in the .blend file"));
}
void rna_def_userdef_addon_collection(BlenderRNA *brna, PropertyRNA *cprop)
@@ -2914,13 +2915,13 @@ void RNA_def_userdef(BlenderRNA *brna)
PropertyRNA *prop;
static EnumPropertyItem user_pref_sections[] = {
- {USER_SECTION_INTERFACE, "INTERFACE", 0, "Interface", ""},
- {USER_SECTION_EDIT, "EDITING", 0, "Editing", ""},
- {USER_SECTION_INPUT, "INPUT", 0, "Input", ""},
- {USER_SECTION_ADDONS, "ADDONS", 0, "Add-Ons", ""},
- {USER_SECTION_THEME, "THEMES", 0, "Themes", ""},
- {USER_SECTION_FILE, "FILES", 0, "File", ""},
- {USER_SECTION_SYSTEM, "SYSTEM", 0, "System", ""},
+ {USER_SECTION_INTERFACE, "INTERFACE", 0, N_("Interface"), ""},
+ {USER_SECTION_EDIT, "EDITING", 0, N_("Editing"), ""},
+ {USER_SECTION_INPUT, "INPUT", 0, N_("Input"), ""},
+ {USER_SECTION_ADDONS, "ADDONS", 0, N_("Add-Ons"), ""},
+ {USER_SECTION_THEME, "THEMES", 0, N_("Themes"), ""},
+ {USER_SECTION_FILE, "FILES", 0, N_("File"), ""},
+ {USER_SECTION_SYSTEM, "SYSTEM", 0, N_("System"), ""},
{0, NULL, 0, NULL, NULL}};
rna_def_userdef_dothemes(brna);
diff --git a/source/blender/python/generic/blf_py_api.c b/source/blender/python/generic/blf_py_api.c
index f7b49ad28dc..a6bbb26be86 100644
--- a/source/blender/python/generic/blf_py_api.c
+++ b/source/blender/python/generic/blf_py_api.c
@@ -391,6 +391,27 @@ static PyObject *py_blf_gettext(PyObject *UNUSED(self), PyObject *args)
return PyUnicode_DecodeUTF8( msgstr, strlen(msgstr), error_handle );
}
+PyDoc_STRVAR(py_blf_fake_gettext_doc,
+".. function:: fake_gettext(msgid)\n"
+"\n"
+" Just tag the msgid.\n"
+"\n"
+" :arg msgid: the source string.\n"
+" :type msgid: string\n"
+" :return: the source string.\n"
+" :rtype: string\n"
+);
+static PyObject *py_blf_fake_gettext(PyObject *UNUSED(self), PyObject *args)
+{
+ char* msgid;
+ char* error_handle;
+
+ if (!PyArg_ParseTuple(args, "s:blf.gettext", &msgid))
+ return NULL;
+
+ return PyUnicode_DecodeUTF8( msgid, strlen(msgid), error_handle );
+}
+
/*----------------------------MODULE INIT-------------------------*/
static PyMethodDef BLF_methods[] = {
{"aspect", (PyCFunction) py_blf_aspect, METH_VARARGS, py_blf_aspect_doc},
@@ -407,6 +428,7 @@ static PyMethodDef BLF_methods[] = {
{"size", (PyCFunction) py_blf_size, METH_VARARGS, py_blf_size_doc},
{"load", (PyCFunction) py_blf_load, METH_VARARGS, py_blf_load_doc},
{"gettext", (PyCFunction) py_blf_gettext, METH_VARARGS, py_blf_gettext_doc},
+ {"fake_gettext", (PyCFunction) py_blf_fake_gettext, METH_VARARGS, py_blf_fake_gettext_doc},
{NULL, NULL, 0, NULL}
};
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 583518a4eac..3eb4e624bd3 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -79,6 +79,7 @@
#include "GHOST_C-api.h"
#include "RNA_define.h"
+#include "RNA_access.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -132,6 +133,8 @@ void WM_init(bContext *C, int argc, const char **argv)
BLF_lang_encoding("");
BLF_lang_set("");
+ RNA_types_init_gettext();
+
wm_operatortype_init();
set_free_windowmanager_cb(wm_close_and_free); /* library.c */
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 4d261d6a566..b4b299575d6 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1264,9 +1264,9 @@ static int wm_splash_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *UNUSED
static void WM_OT_splash(wmOperatorType *ot)
{
- ot->name= "Splash Screen";
+ ot->name= _("Splash Screen");
ot->idname= "WM_OT_splash";
- ot->description= "Opens a blocking popup region with release info";
+ ot->description= _("Opens a blocking popup region with release info");
ot->invoke= wm_splash_invoke;
ot->poll= WM_operator_winactive;
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index f0806c8f3cf..e2e08c8f546 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -510,7 +510,7 @@ void WM_window_open_temp(bContext *C, rcti *position, int type)
else if(ELEM(sa->spacetype, SPACE_OUTLINER, SPACE_USERPREF))
GHOST_SetTitle(win->ghostwin, _("Blender User Preferences"));
else if(sa->spacetype==SPACE_FILE)
- GHOST_SetTitle(win->ghostwin, "Blender File View");
+ GHOST_SetTitle(win->ghostwin, _("Blender File View"));
else
GHOST_SetTitle(win->ghostwin, "Blender");
}
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 27fb3368878..1436f18ae6c 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -400,7 +400,15 @@ int main(int argc, char** argv)
*/
#endif // __APPLE__
+ // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c)
+ BLF_init(11, U.dpi);
+ BLF_lang_init();
+ // use default settings
+ BLF_lang_encoding("");
+ BLF_lang_set("");
+
RNA_init();
+ RNA_structs_gettexted()
init_nodesystem();
@@ -411,13 +419,6 @@ int main(int argc, char** argv)
IMB_init();
- // Setup builtin font for BLF (mostly copied from creator.c, wm_init_exit.c and interface_style.c)
- BLF_init(11, U.dpi);
- BLF_lang_init();
- // use default settings
- BLF_lang_encoding("");
- BLF_lang_set("");
-
BLF_load_mem("default", (unsigned char*)datatoc_bfont_ttf, datatoc_bfont_ttf_size);
// Parse command line options