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-09 22:26:40 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-02-09 22:26:40 +0400
commit82c86af7f7b37e940748e99efe3b19fd5b92d6ca (patch)
tree76699950d46a3084077ed71f3a95c2169d36d761 /release/scripts/startup/bl_ui/space_clip.py
parent1083a069004490b0ed8679679adb2a7ea881ba62 (diff)
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!
Diffstat (limited to 'release/scripts/startup/bl_ui/space_clip.py')
-rw-r--r--release/scripts/startup/bl_ui/space_clip.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py
index ba38e776ddc..303f47b295d 100644
--- a/release/scripts/startup/bl_ui/space_clip.py
+++ b/release/scripts/startup/bl_ui/space_clip.py
@@ -313,9 +313,11 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel):
col = layout.column(align=True)
- col.operator("clip.solve_camera",
- text="Camera Motion" if tracking_object.is_camera
- else "Object Motion")
+ # Note: avoid complex code in "text" values, they can't be handled right by i18n messages extractor script!
+ if tracking_object.is_camera:
+ col.operator("clip.solve_camera", text="Camera Motion")
+ else:
+ col.operator("clip.solve_camera", text="Object Motion")
col.operator("clip.clear_solution")
col = layout.column()
@@ -907,10 +909,9 @@ class CLIP_MT_view(Menu):
ratios = ((1, 8), (1, 4), (1, 2), (1, 1), (2, 1), (4, 1), (8, 1))
+ text = bpy.app.translations.pgettext("Zoom %d:%d")
for a, b in ratios:
- text = "Zoom %d:%d" % (a, b)
- layout.operator("clip.view_zoom_ratio",
- text=text).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'