diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-08 20:01:21 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-02-08 20:01:21 +0400 |
commit | 23aa0c90678061a98dbc800780ca0490c57d5d31 (patch) | |
tree | 080d0c78da88adb5338c37b04cc1918f198b617f /release/scripts/startup/bl_ui | |
parent | 32a6a3eb63b80e47fb083d49814090b89541e9ab (diff) |
Fix uilists showing data names translated (reported on bf-translations ML by Satoshi Yamasaki aka yamyam, thanks!).
Diffstat (limited to 'release/scripts/startup/bl_ui')
8 files changed, 24 insertions, 30 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py index dcef5aaa096..86a48999663 100644 --- a/release/scripts/startup/bl_ui/properties_data_mesh.py +++ b/release/scripts/startup/bl_ui/properties_data_mesh.py @@ -60,12 +60,12 @@ class MESH_UL_vgroups(UIList): # assert(isinstance(item, bpy.types.VertexGroup) vgroup = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(vgroup.name, icon_value=icon) + layout.label(text=vgroup.name, translate=False, icon_value=icon) icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED' layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class MESH_UL_shape_keys(UIList): @@ -76,30 +76,30 @@ class MESH_UL_shape_keys(UIList): key_block = item if self.layout_type in {'DEFAULT', 'COMPACT'}: split = layout.split(0.66, False) - split.label(item.name, icon_value=icon) + split.label(text=item.name, translate=False, icon_value=icon) row = split.row(True) if key_block.mute or (obj.mode == 'EDIT' and not (obj.use_shape_key_edit_mode and obj.type == 'MESH')): row.active = False if not item.relative_key or index > 0: row.prop(key_block, "value", text="", emboss=False) else: - row.label("") + row.label(text="") row.prop(key_block, "mute", text="", emboss=False) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class MESH_UL_uvmaps_vcols(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, (bpy.types.MeshTexturePolyLayer, bpy.types.MeshLoopColorLayer)) if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(item.name, icon_value=icon) + layout.label(text=item.name, translate=False, icon_value=icon) icon = 'RESTRICT_RENDER_OFF' if item.active_render else 'RESTRICT_RENDER_ON' layout.prop(item, "active_render", text="", icon=icon, emboss=False) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class MeshButtonsPanel(): diff --git a/release/scripts/startup/bl_ui/properties_mask_common.py b/release/scripts/startup/bl_ui/properties_mask_common.py index 3bdb6f32076..4ceaffbaf8d 100644 --- a/release/scripts/startup/bl_ui/properties_mask_common.py +++ b/release/scripts/startup/bl_ui/properties_mask_common.py @@ -32,7 +32,7 @@ class MASK_UL_layers(UIList): mask = item if self.layout_type in {'DEFAULT', 'COMPACT'}: split = layout.split() - split.label(mask.name, icon_value=icon) + split.label(text=mask.name, translate=False, icon_value=icon) row = split.row(align=True) row.prop(mask, "alpha", text="", emboss=False) row.prop(mask, "hide", text="", emboss=False) @@ -40,7 +40,7 @@ class MASK_UL_layers(UIList): row.prop(mask, "hide_render", text="", emboss=False) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class MASK_PT_mask: diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 7e18cf89080..3a3cd88953c 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -76,16 +76,18 @@ class MATERIAL_UL_matslots(UIList): slot = item ma = slot.material if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(ma.name if ma else "", icon_value=icon) + layout.label(text=ma.name if ma else "", translate=False, icon_value=icon) if ma and not context.scene.render.use_shading_nodes: manode = ma.active_node_material if manode: - layout.label("Node %s" % manode.name, icon_value=layout.icon(manode)) + layout.label(text="Node %s" % manode.name, translate=False, icon_value=layout.icon(manode)) elif ma.use_nodes: - layout.label("Node <none>") + layout.label(text="Node <none>", translate=False) + else: + layout.label(text="") elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class MaterialButtonsPanel(): diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index efc675ffe83..7ee63ee7a2f 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -33,7 +33,7 @@ class PHYSICS_UL_dynapaint_surfaces(UIList): if self.layout_type in {'DEFAULT', 'COMPACT'}: row = layout.row(align=True) row.label(text="", icon_value=icon) - row.label(text=surf.name, icon_value=sticon) + row.label(text=surf.name, translate=False, icon_value=sticon) row = layout.row(align=True) if surf.use_color_preview: row.prop(surf, "show_preview", text="", emboss=False, diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 29e32401d2b..1cd58328332 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -48,17 +48,11 @@ class RENDER_UL_renderlayers(UIList): # assert(isinstance(item, bpy.types.SceneRenderLayer) layer = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(layer.name, icon_value=icon) + layout.label(text=layer.name, translate=False, icon_value=icon) layout.prop(layer, "use", text="", index=index) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) - -# else if (RNA_struct_is_a(itemptr->type, &RNA_SceneRenderLayer)) { -# uiItemL(sub, name, icon); -# uiBlockSetEmboss(block, UI_EMBOSS); -# uiDefButR(block, OPTION, 0, "", 0, 0, UI_UNIT_X, UI_UNIT_Y, itemptr, "use", 0, 0, 0, 0, 0, NULL); -# } + layout.label(text="", icon_value=icon) class RenderButtonsPanel(): diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index e0f4fd1f75b..b9b57923420 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -32,10 +32,10 @@ class SCENE_UL_keying_set_paths(UIList): kspath = item icon = layout.enum_item_icon(kspath, "id_type", kspath.id_type) if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(kspath.data_path, icon_value=icon) + layout.label(text=kspath.data_path, translate=False, icon_value=icon) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) class SceneButtonsPanel(): diff --git a/release/scripts/startup/bl_ui/properties_texture.py b/release/scripts/startup/bl_ui/properties_texture.py index 9e8fd0470cf..dd30627abff 100644 --- a/release/scripts/startup/bl_ui/properties_texture.py +++ b/release/scripts/startup/bl_ui/properties_texture.py @@ -63,12 +63,12 @@ class TEXTURE_UL_texslots(UIList): slot = item tex = slot.texture if slot else None if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(tex.name if tex else "", icon_value=icon) + layout.label(text=tex.name if tex else "", translate=False, icon_value=icon) if tex and isinstance(item, bpy.types.MaterialTextureSlot): layout.prop(ma, "use_textures", text="", index=index) elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon_value=icon) + layout.label(text="", icon_value=icon) from bl_ui.properties_material import active_node_mat diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index db71bbe2390..ba38e776ddc 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -28,12 +28,10 @@ class CLIP_UL_tracking_objects(UIList): # assert(isinstance(item, bpy.types.MovieTrackingObject) tobj = item if self.layout_type in {'DEFAULT', 'COMPACT'}: - layout.label(tobj.name, icon='CAMERA_DATA' - if tobj.is_camera else 'OBJECT_DATA') + layout.label(text=tobj.name, translate=False, icon='CAMERA_DATA' if tobj.is_camera else 'OBJECT_DATA') elif self.layout_type in {'GRID'}: layout.alignment = 'CENTER' - layout.label("", icon='CAMERA_DATA' - if tobj.is_camera else 'OBJECT_DATA') + layout.label(text="", icon='CAMERA_DATA' if tobj.is_camera else 'OBJECT_DATA') class CLIP_HT_header(Header): |