remove use of gettext: _("...") style translation now its handled by rna.
[blender.git] / release / scripts / startup / bl_ui / space_userpref.py
index 148338368feafbe65a43a6d5dbf6987da53df8ec..9573f6b0f5c96ef3cec413017096f69e36741274 100644 (file)
@@ -417,20 +417,6 @@ class USERPREF_PT_system(Panel):
         col.separator()
         col.separator()
 
-        #column = split.column()
-        #colsplit = column.split(percentage=0.85)
-
-        # No translation in 2.5 yet
-        #col.prop(system, "language")
-        #col.label(text="Translate:")
-        #col.prop(system, "use_translate_tooltips", text="Tooltips")
-        #col.prop(system, "use_translate_buttons", text="Labels")
-        #col.prop(system, "use_translate_toolbox", text="Toolbox")
-
-        #col.separator()
-
-        #col.prop(system, "use_textured_fonts")
-
         # 2. Column
         column = split.column()
         colsplit = column.split(percentage=0.85)
@@ -480,15 +466,11 @@ class USERPREF_PT_system(Panel):
         lamp = system.solid_lights[2]
         opengl_lamp_buttons(column, lamp)
 
-        column.separator()
-        column.separator()
         column.separator()
 
         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")
@@ -496,6 +478,16 @@ class USERPREF_PT_system(Panel):
         sub.active = system.use_weight_color_range
         sub.template_color_ramp(system, "weight_color_range", expand=True)
 
+        column.separator()
+
+        column.prop(system, "use_international_fonts")
+        if system.use_international_fonts:
+            column.prop(system, "language")
+            row = column.row()
+            row.label(text="Translate:")
+            row.prop(system, "use_translate_interface", text="Interface")
+            row.prop(system, "use_translate_tooltips", text="Tooltips")
+
 
 class USERPREF_PT_theme(Panel):
     bl_space_type = 'USER_PREFERENCES'
@@ -657,7 +649,7 @@ class USERPREF_PT_theme(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()
 
@@ -773,7 +765,18 @@ class USERPREF_MT_ndof_settings(Menu):
 
             layout.separator()
             layout.label(text="orbit options")
-            layout.prop(input_prefs, "ndof_orbit_invert_axes")
+            if input_prefs.view_rotate_method == 'TRACKBALL':
+                layout.prop(input_prefs, "ndof_roll_invert_axis")
+                layout.prop(input_prefs, "ndof_tilt_invert_axis")
+                layout.prop(input_prefs, "ndof_rotate_invert_axis")
+            else:
+                layout.prop(input_prefs, "ndof_orbit_invert_axes")
+
+            layout.separator()
+            layout.label(text="pan options")
+            layout.prop(input_prefs, "ndof_panx_invert_axis")
+            layout.prop(input_prefs, "ndof_pany_invert_axis")
+            layout.prop(input_prefs, "ndof_panz_invert_axis")
 
             layout.separator()
             layout.label(text="fly options")
@@ -877,9 +880,9 @@ class USERPREF_MT_addons_dev_guides(Menu):
     # menu to open webpages with addons development guides
     def draw(self, context):
         layout = self.layout
-        layout.operator('wm.url_open', text='API Concepts', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro'
-        layout.operator('wm.url_open', text='Addon Guidelines', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons'
-        layout.operator('wm.url_open', text='How to share your addon', icon='URL').url = 'http://wiki.blender.org/index.php/Dev:Py/Sharing'
+        layout.operator("wm.url_open", text="API Concepts", icon='URL').url = "http://wiki.blender.org/index.php/Dev:2.5/Py/API/Intro"
+        layout.operator("wm.url_open", text="Addon Guidelines", icon='URL').url = "http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Guidelines/Addons"
+        layout.operator("wm.url_open", text="How to share your addon", icon='URL').url = "http://wiki.blender.org/index.php/Dev:Py/Sharing"
 
 
 class USERPREF_PT_addons(Panel):
@@ -1014,19 +1017,19 @@ class USERPREF_PT_addons(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)
@@ -1093,8 +1096,8 @@ class WM_OT_addon_enable(Operator):
             if info_ver > bpy.app.version:
                 self.report({'WARNING'}, ("This script was written Blender "
                                           "version %d.%d.%d and might not "
-                                          "function (correctly).\n"
-                                          "The script is enabled though.") %
+                                          "function (correctly)"
+                                          "though it is enabled") %
                                          info_ver)
             return {'FINISHED'}
         else:
@@ -1106,7 +1109,10 @@ class WM_OT_addon_disable(Operator):
     bl_idname = "wm.addon_disable"
     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)
@@ -1118,16 +1124,35 @@ class WM_OT_addon_install(Operator):
     bl_idname = "wm.addon_install"
     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", "")))
+                   ('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'})
-    filter_glob = StringProperty(default="*.py;*.zip", options={'HIDDEN'})
+    filepath = StringProperty(
+            name="File Path",
+            description="File path to write file to",
+            )
+    filter_folder = BoolProperty(
+            name="Filter folders",
+            default=True,
+            options={'HIDDEN'},
+            )
+    filter_python = BoolProperty(
+            name="Filter python",
+            default=True,
+            options={'HIDDEN'},
+            )
+    filter_glob = StringProperty(
+            default="*.py;*.zip",
+            options={'HIDDEN'},
+            )
 
     @staticmethod
     def _module_remove(path_addons, module):
@@ -1264,7 +1289,10 @@ class WM_OT_addon_remove(Operator):
     bl_idname = "wm.addon_remove"
     bl_label = "Remove Add-On"
 
-    module = StringProperty(name="Module", description="Module name of the addon to remove")
+    module = StringProperty(
+            name="Module",
+            description="Module name of the addon to remove",
+            )
 
     @staticmethod
     def path_from_addon(module):
@@ -1312,7 +1340,10 @@ class WM_OT_addon_expand(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