Another fix for r54414 (cleaner to "import" pgettext once at top of files, also now using usual '_' shortcut).

This commit is contained in:
Bastien Montagne
2013-02-10 09:09:26 +00:00
parent 5d4df1a999
commit c0fa16f2c9
10 changed files with 38 additions and 35 deletions

View File

@@ -22,6 +22,8 @@ from bpy.types import Header, Menu, Panel
from bl_ui.properties_paint_common import UnifiedPaintPanel
from bl_ui.properties_paint_common import brush_texture_settings
_ = bpy.app.translations.pgettext
class ImagePaintPanel(UnifiedPaintPanel):
bl_space_type = 'IMAGE_EDITOR'
@@ -71,10 +73,8 @@ class IMAGE_MT_view(Menu):
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
pgettext = bpy.app.translations.pgettext
for a, b in ratios:
layout.operator("image.view_zoom_ratio", text=pgettext("Zoom %d:%d") % (a, b),
translate=False).ratio = a / b
layout.operator("image.view_zoom_ratio", text=_("Zoom %d:%d") % (a, b), translate=False).ratio = a / b
layout.separator()
@@ -723,7 +723,7 @@ class IMAGE_PT_tools_brush_texture(BrushButtonsPanel, Panel):
col = layout.column()
col.template_ID_preview(brush, "texture", new="texture.new", rows=3, cols=8)
brush_texture_settings(col, brush, 0)