Remove not needed var and fix 195 strings

This commit is contained in:
Tim Bentley 2011-04-30 09:37:28 +01:00
parent 15bca1628a
commit 54a3dd8412
3 changed files with 8 additions and 14 deletions

View File

@ -124,6 +124,7 @@ class UiStrings(object):
self.Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
self.Tools = translate('OpenLP.Ui', 'Tools')
self.Top = translate('OpenLP.Ui', 'Top')
self.UnsupportedFile = translate('OpenLP.Ui', 'Unsupported File')
self.VersePerSlide = translate('OpenLP.Ui', 'Verse Per Slide')
self.VersePerLine = translate('OpenLP.Ui', 'Verse Per Line')
self.Version = translate('OpenLP.Ui', 'Version')

View File

@ -138,10 +138,8 @@ class MediaMediaItem(MediaManagerItem):
if not self.mediaStateWait(Phonon.StoppedState):
# Due to string freeze, borrow a message from presentations
# This will be corrected in 1.9.6
critical_error_message_box(
translate('PresentationPlugin.MediaItem', 'Unsupported File'),
unicode(translate('PresentationPlugin.MediaItem',
'Unsupported File')))
critical_error_message_box(UiStrings().UnsupportedFile,
UiStrings().UnsupportedFile)
return False
# File too big for processing
if os.path.getsize(filename) <= 52428800: # 50MiB
@ -152,15 +150,12 @@ class MediaMediaItem(MediaManagerItem):
# Due to string freeze, borrow a message from presentations
# This will be corrected in 1.9.6
self.mediaObject.stop()
critical_error_message_box(
translate('PresentationPlugin.MediaItem',
'Unsupported File'),
unicode(translate('PresentationPlugin.MediaItem',
'Unsupported File')))
critical_error_message_box(UiStrings().UnsupportedFile,
UiStrings().UnsupportedFile)
return False
self.mediaLength = self.mediaObject.totalTime() / 1000
#self.mediaLength = self.mediaObject.totalTime() / 1000
self.mediaObject.stop()
service_item.media_length = self.mediaLength
service_item.media_length = self.mediaObject.totalTime() / 1000
service_item.add_capability(
ItemCapabilities.AllowsVariableStartTime)
service_item.title = unicode(self.plugin.nameStrings[u'singular'])

View File

@ -193,9 +193,7 @@ class PresentationMediaItem(MediaManagerItem):
if initialLoad:
icon = build_icon(u':/general/general_delete.png')
else:
critical_error_message_box(
translate('PresentationPlugin.MediaItem',
'Unsupported File'),
critical_error_message_box(UiStrings().UnsupportedFile,
translate('PresentationPlugin.MediaItem',
'This type of presentation is not supported.'))
continue