Another fix for r54414 (cleaner to "import" pgettext once at top of files, also now using usual '_' shortcut).
This commit is contained in:
@@ -20,6 +20,8 @@
|
||||
import bpy
|
||||
from bpy.types import Header, Menu, Panel
|
||||
|
||||
_ = bpy.app.translations.pgettext
|
||||
|
||||
|
||||
def act_strip(context):
|
||||
try:
|
||||
@@ -420,19 +422,15 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
sub.prop(strip, "frame_start")
|
||||
sub.prop(strip, "frame_final_duration")
|
||||
|
||||
pgettext = bpy.app.translations.pgettext
|
||||
col = layout.column(align=True)
|
||||
row = col.row()
|
||||
row.label(text=pgettext("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration),
|
||||
translate=False)
|
||||
row.label(text=_("Final Length: %s") % bpy.utils.smpte_from_frame(strip.frame_final_duration), translate=False)
|
||||
row = col.row()
|
||||
row.active = (frame_current >= strip.frame_start and frame_current <= strip.frame_start + strip.frame_duration)
|
||||
row.label(text=pgettext("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
|
||||
row.label(text=_("Playhead: %d") % (frame_current - strip.frame_start), translate=False)
|
||||
|
||||
col.label(text=pgettext("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end),
|
||||
translate=False)
|
||||
col.label(text=pgettext("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end),
|
||||
translate=False)
|
||||
col.label(text=_("Frame Offset %d:%d") % (strip.frame_offset_start, strip.frame_offset_end), translate=False)
|
||||
col.label(text=_("Frame Still %d:%d") % (strip.frame_still_start, strip.frame_still_end), translate=False)
|
||||
|
||||
elem = False
|
||||
|
||||
@@ -442,7 +440,7 @@ class SEQUENCER_PT_edit(SequencerButtonsPanel, Panel):
|
||||
elem = strip.elements[0]
|
||||
|
||||
if elem and elem.orig_width > 0 and elem.orig_height > 0:
|
||||
col.label(text=pgettext("Original Dimension: %dx%d") % (elem.orig_width, elem.orig_height), translate=False)
|
||||
col.label(text=_("Original Dimension: %dx%d") % (elem.orig_width, elem.orig_height), translate=False)
|
||||
else:
|
||||
col.label(text="Original Dimension: None")
|
||||
|
||||
@@ -719,8 +717,7 @@ class SEQUENCER_PT_scene(SequencerButtonsPanel, Panel):
|
||||
if scene:
|
||||
sta = scene.frame_start
|
||||
end = scene.frame_end
|
||||
pgettext = bpy.app.translations.pgettext
|
||||
layout.label(text=pgettext("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
|
||||
layout.label(text=_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
|
||||
|
||||
|
||||
class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
|
||||
@@ -749,8 +746,7 @@ class SEQUENCER_PT_mask(SequencerButtonsPanel, Panel):
|
||||
if mask:
|
||||
sta = mask.frame_start
|
||||
end = mask.frame_end
|
||||
pgettext = bpy.app.translations.pgettext
|
||||
layout.label(text=pgettext("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
|
||||
layout.label(text=_("Original frame range: %d-%d (%d)") % (sta, end, end - sta + 1), translate=False)
|
||||
|
||||
|
||||
class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
|
||||
|
Reference in New Issue
Block a user