forked from openlp/openlp
Fixed translate() function in PresentationPlugin
This commit is contained in:
parent
4571e808ba
commit
3c096b4d0a
@ -61,11 +61,14 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
self.message_listener = MessageListener(self)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = translate('MediaItem','Presentation')
|
||||
self.PluginNameVisible = translate(u'PresentationPlugin.MediaItem',
|
||||
u'Presentation')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = translate('MediaItem','Select Presentation(s)')
|
||||
self.Automatic = translate('MediaItem','Automatic')
|
||||
self.OnNewPrompt = translate(u'PresentationPlugin.MediaItem',
|
||||
u'Select Presentation(s)')
|
||||
self.Automatic = translate(u'PresentationPlugin.MediaItem',
|
||||
u'Automatic')
|
||||
fileType = u''
|
||||
for controller in self.controllers:
|
||||
if self.controllers[controller].enabled:
|
||||
@ -75,7 +78,8 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
if fileType.find(type) == -1:
|
||||
fileType += u'*%s ' % type
|
||||
self.parent.service_manager.supportedSuffixes(type)
|
||||
self.OnNewFileMasks = translate('MediaItem','Presentations (%s)' % fileType)
|
||||
self.OnNewFileMasks = translate(u'PresentationPlugin.MediaItem',
|
||||
u'Presentations (%s)' % fileType)
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
@ -101,7 +105,8 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
self.DisplayTypeLabel = QtGui.QLabel(self.PresentationWidget)
|
||||
self.DisplayTypeLabel.setObjectName(u'SearchTypeLabel')
|
||||
self.DisplayLayout.addWidget(self.DisplayTypeLabel, 0, 0, 1, 1)
|
||||
self.DisplayTypeLabel.setText(translate('MediaItem','Present using:'))
|
||||
self.DisplayTypeLabel.setText(
|
||||
translate(u'PresentationPlugin.MediaItem', u'Present using:'))
|
||||
# Add the Presentation widget to the page layout
|
||||
self.PageLayout.addWidget(self.PresentationWidget)
|
||||
|
||||
@ -134,8 +139,10 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
(path, filename) = os.path.split(unicode(file))
|
||||
if titles.count(filename) > 0:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, translate('MediaItem','File exists'), translate('MediaItem',
|
||||
'A presentation with that filename already exists.'),
|
||||
self, translate(u'PresentationPlugin.MediaItem',
|
||||
u'File exists'),
|
||||
translate(u'PresentationPlugin.MediaItem',
|
||||
u'A presentation with that filename already exists.'),
|
||||
QtGui.QMessageBox.Ok)
|
||||
else:
|
||||
icon = None
|
||||
|
@ -37,7 +37,8 @@ class PresentationTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'PresentationTab')
|
||||
self.tabTitleVisible = translate('PresentationTab','Presentations')
|
||||
self.tabTitleVisible = translate(u'PresentationPlugin.PresentationTab',
|
||||
u'Presentations')
|
||||
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
||||
self.PresentationLayout.setSpacing(8)
|
||||
self.PresentationLayout.setMargin(8)
|
||||
@ -88,12 +89,15 @@ class PresentationTab(SettingsTab):
|
||||
self.PresentationLayout.addWidget(self.PresentationRightWidget)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.VerseDisplayGroupBox.setTitle(translate('PresentationTab','Available Controllers'))
|
||||
self.VerseDisplayGroupBox.setTitle(
|
||||
translate(u'PresentationPlugin.PresentationTab',
|
||||
u'Available Controllers'))
|
||||
for key in self.controllers:
|
||||
controller = self.controllers[key]
|
||||
checkbox = self.PresenterCheckboxes[controller.name]
|
||||
checkbox.setText(
|
||||
u'%s %s' % (controller.name, translate('PresentationTab','available')))
|
||||
u'%s %s' % (controller.name,
|
||||
translate(u'PresentationPlugin.PresentationTab', u'available')))
|
||||
|
||||
def load(self):
|
||||
for key in self.controllers:
|
||||
|
@ -108,9 +108,10 @@ class PresentationPlugin(Plugin):
|
||||
return False
|
||||
|
||||
def about(self):
|
||||
about_text = translate('PresentationPlugin','<b>Presentation Plugin</b> <br> Delivers '
|
||||
'the ability to show presentations using a number of different '
|
||||
'programs. The choice of available presentation programs is '
|
||||
'available to the user in a drop down box.')
|
||||
about_text = translate(u'PresentationPlugin.PresentationPlugin',
|
||||
u'<b>Presentation Plugin</b> <br> Delivers '
|
||||
u'the ability to show presentations using a number of different '
|
||||
u'programs. The choice of available presentation programs is '
|
||||
u'available to the user in a drop down box.')
|
||||
return about_text
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user