diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-02-10 12:26:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-02-10 12:26:48 +0400 |
commit | 63af7068ad17f30a526ccb81fbe74253b064bc89 (patch) | |
tree | 16a7401a86138489a88f249e00162d31b00f715e | |
parent | d65135ed93df0f333989c91d7f2e78bc8c6fbd96 (diff) |
revert removal of ternary operators from r54414
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 12 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_text.py | 12 |
2 files changed, 13 insertions, 11 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 303f47b295d..84f26acb4cc 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -313,11 +313,9 @@ class CLIP_PT_tools_solve(CLIP_PT_tracking_panel, Panel): col = layout.column(align=True) - # 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.solve_camera", + text="Camera Motion" if tracking_object.is_camera + else "Object Motion") col.operator("clip.clear_solution") col = layout.column() @@ -911,7 +909,9 @@ class CLIP_MT_view(Menu): text = bpy.app.translations.pgettext("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' diff --git a/release/scripts/startup/bl_ui/space_text.py b/release/scripts/startup/bl_ui/space_text.py index d976475c29e..b32172e25e0 100644 --- a/release/scripts/startup/bl_ui/space_text.py +++ b/release/scripts/startup/bl_ui/space_text.py @@ -73,13 +73,15 @@ class TEXT_HT_header(Header): if text.filepath: pgettext = bpy.app.translations.pgettext if text.is_dirty: - row.label(text=pgettext("File: *%r (unsaved)") % text.filepath, translate=False) + row.label(text=pgettext("File: *%r (unsaved)") % + text.filepath, translate=False) else: - row.label(text=pgettext("File: %r") % text.filepath, translate=False) - elif text.library: - row.label(text="Text: External") + row.label(text=pgettext("File: %r") % + text.filepath, translate=False) else: - row.label(text="Text: Internal") + row.label(text="Text: External" + if text.library + else "Text: Internal") class TEXT_PT_properties(Panel): |