Bunch of fixes for py ui messages (all those using 'formating' were not translated previously, now they use bpy.app.translations.pgettext). Also pleas avoid complex py statements in 'text' values (like 'text="foo" if cond else "bar"'), thes make message extraction script fails!

And another "final point in UI message" removal!
This commit is contained in:
Bastien Montagne
2013-02-09 18:26:40 +00:00
parent 1083a06900
commit 82c86af7f7
11 changed files with 45 additions and 31 deletions

View File

@@ -70,8 +70,10 @@ 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="Zoom" + " %d:%d" % (a, b)).ratio = a / b
layout.operator("image.view_zoom_ratio", text=pgettext("Zoom %d:%d") % (a, b),
translate=False).ratio = a / b
layout.separator()