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:
authorBastien Montagne <montagne29@wanadoo.fr>2013-02-10 14:29:38 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-02-10 14:29:38 +0400
commitd0f4a2396b38c122b7e56de83532515ae8fa4381 (patch)
treec10f9983e987090f73ce8a39e368f5d265d670ac /release/scripts/startup/bl_ui/space_clip.py
parent3b8a0f3d674a0da3bb17cbda30f0a2dc19a40e4f (diff)
Actually, UI scripts should not use directly pgettext, but rather the iface or tooltip variants. Added those to bpy.app.translations, and used pgettext_iface.
(Did not add those when I created that module, because I did not thought we would actually need them in usual UI code, but turned out I was wrong). Also made some optimizations in those py gettext funcs, when i18n is disabled at build time, no need to do pyobject -> cstring -> pyobject conversions!.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_clip.py')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index e26f44675fb..bc5d89fd45b 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -20,8 +20,7 @@
import bpy
from bpy.types import Panel, Header, Menu, UIList
-
-from bpy.app.translations import pgettext as _
+from bpy.app.translations import pgettext_iface as iface_
class CLIP_UL_tracking_objects(UIList):
@@ -913,9 +912,11 @@ class CLIP_MT_view(Menu):
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
- text = _("Zoom %d:%d")
+ text = iface_("Zoom %d:%d")
for a, b in ratios:
- layout.operator("clip.view_zoom_ratio", text=text % (a, b), translate=False).ratio = a / b
+ layout.operator("clip.view_zoom_ratio",
+ text=text % (a, b),
+ translate=False).ratio = a / b
else:
if sc.view == 'GRAPH':
layout.operator_context = 'INVOKE_REGION_PREVIEW'