forked from openlp/openlp
Complete trUtf8 -> translate conversion
bzr-revno: 849
This commit is contained in:
commit
d5bd675489
@ -29,7 +29,7 @@ import os
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
||||||
SettingsManager, OpenLPToolbar, ServiceItem, build_icon
|
SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -208,50 +208,62 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
## Import Button ##
|
## Import Button ##
|
||||||
if self.hasImportIcon:
|
if self.hasImportIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Import %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Import %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Import a'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Import a %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_import.png', self.onImportClick)
|
u':/general/general_import.png', self.onImportClick)
|
||||||
## File Button ##
|
## File Button ##
|
||||||
if self.hasFileIcon:
|
if self.hasFileIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Load %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Load %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Load a new'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Load a new %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_open.png', self.onFileClick)
|
u':/general/general_open.png', self.onFileClick)
|
||||||
## New Button ##
|
## New Button ##
|
||||||
if self.hasNewIcon:
|
if self.hasNewIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'New %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'New %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Add a new'), self.PluginNameVisible),
|
self.PluginNameShort,
|
||||||
|
unicode(translate(u'MediaManagerItem', u'Add a new %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_new.png', self.onNewClick)
|
u':/general/general_new.png', self.onNewClick)
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Edit %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Edit %s')) % \
|
||||||
u'%s %s' % (self.trUtf8('Edit the selected'),
|
self.PluginNameShort,
|
||||||
self.PluginNameVisible),
|
unicode(translate(
|
||||||
|
u'MediaManagerItem', u'Edit the selected %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
u':/general/general_edit.png', self.onEditClick)
|
u':/general/general_edit.png', self.onEditClick)
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Delete %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Delete %s')) % \
|
||||||
self.trUtf8('Delete the selected item'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem', u'Delete the selected item'),
|
||||||
u':/general/general_delete.png', self.onDeleteClick)
|
u':/general/general_delete.png', self.onDeleteClick)
|
||||||
## Separator Line ##
|
## Separator Line ##
|
||||||
self.addToolbarSeparator()
|
self.addToolbarSeparator()
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Preview %s' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Preview %s')) % \
|
||||||
self.trUtf8('Preview the selected item'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem', u'Preview the selected item'),
|
||||||
u':/general/general_preview.png', self.onPreviewClick)
|
u':/general/general_preview.png', self.onPreviewClick)
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Go Live',
|
u'Go Live',
|
||||||
self.trUtf8('Send the selected item live'),
|
translate(u'MediaManagerItem', u'Send the selected item live'),
|
||||||
u':/general/general_live.png', self.onLiveClick)
|
u':/general/general_live.png', self.onLiveClick)
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
u'Add %s to Service' % self.PluginNameShort,
|
unicode(translate(u'MediaManagerItem', u'Add %s to Service')) % \
|
||||||
self.trUtf8('Add the selected item(s) to the service'),
|
self.PluginNameShort,
|
||||||
|
translate(u'MediaManagerItem',
|
||||||
|
u'Add the selected item(s) to the service'),
|
||||||
u':/general/general_add.png', self.onAddClick)
|
u':/general/general_add.png', self.onAddClick)
|
||||||
|
|
||||||
def addListViewToToolBar(self):
|
def addListViewToToolBar(self):
|
||||||
@ -273,34 +285,39 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_edit.png',
|
self.ListView, u':/general/general_edit.png',
|
||||||
u'%s %s' % (self.trUtf8('&Edit'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Edit %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onEditClick))
|
self.onEditClick))
|
||||||
self.ListView.addAction(context_menu_separator(self.ListView))
|
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_delete.png',
|
self.ListView, u':/general/general_delete.png',
|
||||||
u'%s %s' % (self.trUtf8('&Delete'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Delete %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onDeleteClick))
|
self.onDeleteClick))
|
||||||
self.ListView.addAction(context_menu_separator(self.ListView))
|
self.ListView.addAction(context_menu_separator(self.ListView))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_preview.png',
|
self.ListView, u':/general/general_preview.png',
|
||||||
u'%s %s' % (self.trUtf8('&Preview'), self.PluginNameVisible),
|
unicode(translate(u'MediaManagerItem', u'&Preview %s')) % \
|
||||||
|
self.PluginNameVisible,
|
||||||
self.onPreviewClick))
|
self.onPreviewClick))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_live.png',
|
self.ListView, u':/general/general_live.png',
|
||||||
self.trUtf8('&Show Live'), self.onLiveClick))
|
translate(u'MediaManagerItem', u'&Show Live'), self.onLiveClick))
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_add.png',
|
self.ListView, u':/general/general_add.png',
|
||||||
self.trUtf8('&Add to Service'), self.onAddClick))
|
translate(u'MediaManagerItem', u'&Add to Service'),
|
||||||
|
self.onAddClick))
|
||||||
if self.addToServiceItem:
|
if self.addToServiceItem:
|
||||||
self.ListView.addAction(
|
self.ListView.addAction(
|
||||||
context_menu_action(
|
context_menu_action(
|
||||||
self.ListView, u':/general/general_add.png',
|
self.ListView, u':/general/general_add.png',
|
||||||
self.trUtf8('&Add to selected Service Item'),
|
translate(u'MediaManagerItem',
|
||||||
|
u'&Add to selected Service Item'),
|
||||||
self.onAddEditClick))
|
self.onAddEditClick))
|
||||||
QtCore.QObject.connect(
|
QtCore.QObject.connect(
|
||||||
self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'),
|
||||||
@ -391,8 +408,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onPreviewClick(self):
|
def onPreviewClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Preview requested')
|
log.debug(self.PluginNameShort + u' Preview requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
@ -403,8 +421,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onLiveClick(self):
|
def onLiveClick(self):
|
||||||
if not self.ListView.selectedIndexes():
|
if not self.ListView.selectedIndexes():
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Live requested')
|
log.debug(self.PluginNameShort + u' Live requested')
|
||||||
service_item = self.buildServiceItem()
|
service_item = self.buildServiceItem()
|
||||||
@ -415,8 +434,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onAddClick(self):
|
def onAddClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Items Selected'),
|
translate(u'MediaManagerItem', u'No Items Selected'),
|
||||||
self.trUtf8('You must select one or more items.'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items.'))
|
||||||
else:
|
else:
|
||||||
#Is it posssible to process multiple list items to generate multiple
|
#Is it posssible to process multiple list items to generate multiple
|
||||||
#service items?
|
#service items?
|
||||||
@ -438,16 +458,17 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
def onAddEditClick(self):
|
def onAddEditClick(self):
|
||||||
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
if not self.ListView.selectedIndexes() and not self.remoteTriggered:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No items selected'),
|
translate(u'MediaManagerItem', u'No items selected'),
|
||||||
self.trUtf8('You must select one or more items'))
|
translate(u'MediaManagerItem',
|
||||||
|
u'You must select one or more items'))
|
||||||
else:
|
else:
|
||||||
log.debug(self.PluginNameShort + u' Add requested')
|
log.debug(self.PluginNameShort + u' Add requested')
|
||||||
service_item = self.parent.service_manager.getServiceItem()
|
service_item = self.parent.service_manager.getServiceItem()
|
||||||
if not service_item:
|
if not service_item:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('No Service Item Selected'),
|
translate(u'MediaManagerItem', u'No Service Item Selected'),
|
||||||
self.trUtf8(
|
translate(u'MediaManagerItem',
|
||||||
'You must select an existing service item to add to.'))
|
u'You must select an existing service item to add to.'))
|
||||||
elif self.title.lower() == service_item.name.lower():
|
elif self.title.lower() == service_item.name.lower():
|
||||||
self.generateSlideData(service_item)
|
self.generateSlideData(service_item)
|
||||||
self.parent.service_manager.addServiceItem(service_item,
|
self.parent.service_manager.addServiceItem(service_item,
|
||||||
@ -455,9 +476,9 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
#Turn off the remote edit update message indicator
|
#Turn off the remote edit update message indicator
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
self.trUtf8('Invalid Service Item'),
|
translate(u'MediaManagerItem', u'Invalid Service Item'),
|
||||||
self.trUtf8(unicode(
|
translate(unicode(u'MediaManagerItem',
|
||||||
'You must select a %s service item.' % self.title)))
|
u'You must select a %s service item.')) % self.title)
|
||||||
|
|
||||||
def buildServiceItem(self, item=None):
|
def buildServiceItem(self, item=None):
|
||||||
"""
|
"""
|
||||||
|
@ -30,7 +30,8 @@ class SplashScreen(object):
|
|||||||
def __init__(self, version):
|
def __init__(self, version):
|
||||||
self.splash_screen = QtGui.QSplashScreen()
|
self.splash_screen = QtGui.QSplashScreen()
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
self.message = self.splash_screen.trUtf8('Starting')\
|
self.message = translate(
|
||||||
|
u'Splashscreen', u'Starting')\
|
||||||
+ '..... ' + version
|
+ '..... ' + version
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
@ -58,7 +59,7 @@ class SplashScreen(object):
|
|||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.splash_screen.setWindowTitle(
|
self.splash_screen.setWindowTitle(
|
||||||
self.splash_screen.trUtf8('Splash Screen'))
|
translate(u'Splashscreen', u'Splash Screen'))
|
||||||
|
|
||||||
def show(self):
|
def show(self):
|
||||||
self.splash_screen.show()
|
self.splash_screen.show()
|
||||||
|
@ -64,9 +64,9 @@ class alertsPlugin(Plugin):
|
|||||||
self.toolsAlertItem.setIcon(AlertIcon)
|
self.toolsAlertItem.setIcon(AlertIcon)
|
||||||
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
||||||
self.toolsAlertItem.setText(
|
self.toolsAlertItem.setText(
|
||||||
translate(u'AlertsPlugin.AlertsPlugin', u'&Alert'))
|
translate(u'AlertsPlugin', u'&Alert'))
|
||||||
self.toolsAlertItem.setStatusTip(
|
self.toolsAlertItem.setStatusTip(
|
||||||
translate(u'AlertsPlugin.AlertsPlugin', u'Show an alert message'))
|
translate(u'AlertsPlugin', u'Show an alert message'))
|
||||||
self.toolsAlertItem.setShortcut(u'F7')
|
self.toolsAlertItem.setShortcut(u'F7')
|
||||||
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
||||||
QtCore.QObject.connect(self.toolsAlertItem,
|
QtCore.QObject.connect(self.toolsAlertItem,
|
||||||
@ -94,7 +94,7 @@ class alertsPlugin(Plugin):
|
|||||||
self.alertForm.exec_()
|
self.alertForm.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'AlertsPlugin.AlertsPlugin',
|
about_text = translate(u'AlertsPlugin',
|
||||||
u'<b>Alerts Plugin</b><br>This plugin '
|
u'<b>Alerts Plugin</b><br>This plugin '
|
||||||
u'controls the displaying of alerts on the presentations screen')
|
u'controls the displaying of alerts on the presentations screen')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -70,7 +70,8 @@ class BiblePlugin(Plugin):
|
|||||||
self.ImportBibleItem = QtGui.QAction(import_menu)
|
self.ImportBibleItem = QtGui.QAction(import_menu)
|
||||||
self.ImportBibleItem.setObjectName(u'ImportBibleItem')
|
self.ImportBibleItem.setObjectName(u'ImportBibleItem')
|
||||||
import_menu.addAction(self.ImportBibleItem)
|
import_menu.addAction(self.ImportBibleItem)
|
||||||
self.ImportBibleItem.setText(import_menu.trUtf8('&Bible'))
|
self.ImportBibleItem.setText(
|
||||||
|
translate(u'BiblePlugin', u'&Bible'))
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.ImportBibleItem,
|
QtCore.QObject.connect(self.ImportBibleItem,
|
||||||
QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
|
QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick)
|
||||||
@ -80,7 +81,8 @@ class BiblePlugin(Plugin):
|
|||||||
self.ExportBibleItem = QtGui.QAction(export_menu)
|
self.ExportBibleItem = QtGui.QAction(export_menu)
|
||||||
self.ExportBibleItem.setObjectName(u'ExportBibleItem')
|
self.ExportBibleItem.setObjectName(u'ExportBibleItem')
|
||||||
export_menu.addAction(self.ExportBibleItem)
|
export_menu.addAction(self.ExportBibleItem)
|
||||||
self.ExportBibleItem.setText(export_menu.trUtf8('&Bible'))
|
self.ExportBibleItem.setText(translate(
|
||||||
|
u'BiblePlugin', u'&Bible'))
|
||||||
self.ExportBibleItem.setVisible(False)
|
self.ExportBibleItem.setVisible(False)
|
||||||
|
|
||||||
def onBibleImportClick(self):
|
def onBibleImportClick(self):
|
||||||
@ -88,7 +90,7 @@ class BiblePlugin(Plugin):
|
|||||||
self.media_item.onImportClick()
|
self.media_item.onImportClick()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'BiblesPlugin.BiblePlugin',
|
about_text = translate(u'BiblePlugin',
|
||||||
u'<strong>Bible Plugin</strong><br />This '
|
u'<strong>Bible Plugin</strong><br />This '
|
||||||
u'plugin allows bible verses from different sources to be '
|
u'plugin allows bible verses from different sources to be '
|
||||||
u'displayed on the screen during the service.')
|
u'displayed on the screen during the service.')
|
||||||
|
@ -67,7 +67,7 @@ class CustomPlugin(Plugin):
|
|||||||
self.remove_toolbox_item()
|
self.remove_toolbox_item()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'CustomPlugin.CustomPlugin',
|
about_text = translate(u'CustomPlugin',
|
||||||
u'<b>Custom Plugin</b><br>This plugin '
|
u'<b>Custom Plugin</b><br>This plugin '
|
||||||
u'allows slides to be displayed on the screen in the same way '
|
u'allows slides to be displayed on the screen in the same way '
|
||||||
u'songs are. This plugin provides greater freedom over the '
|
u'songs are. This plugin provides greater freedom over the '
|
||||||
|
@ -56,7 +56,7 @@ class ImagePlugin(Plugin):
|
|||||||
return ImageMediaItem(self, self.icon, self.name)
|
return ImageMediaItem(self, self.icon, self.name)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'ImagePlugin.ImagePlugin', u'<b>Image Plugin'
|
about_text = translate(u'ImagePlugin', u'<b>Image Plugin'
|
||||||
u'</b><br>Allows images of all types to be displayed. If a number '
|
u'</b><br>Allows images of all types to be displayed. If a number '
|
||||||
u'of images are selected together and presented on the live '
|
u'of images are selected together and presented on the live '
|
||||||
u'controller it is possible to turn them into a timed loop.<br<br>'
|
u'controller it is possible to turn them into a timed loop.<br<br>'
|
||||||
|
@ -81,7 +81,7 @@ class MediaPlugin(Plugin):
|
|||||||
return MediaMediaItem(self, self.icon, self.name)
|
return MediaMediaItem(self, self.icon, self.name)
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'MediaPlugin.MediaPlugin',
|
about_text = translate(u'MediaPlugin',
|
||||||
u'<b>Media Plugin</b><br>This plugin '
|
u'<b>Media Plugin</b><br>This plugin '
|
||||||
u'allows the playing of audio and video media')
|
u'allows the playing of audio and video media')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -108,7 +108,7 @@ class PresentationPlugin(Plugin):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'PresentationPlugin.PresentationPlugin',
|
about_text = translate(u'PresentationPlugin',
|
||||||
u'<b>Presentation Plugin</b> <br> Delivers '
|
u'<b>Presentation Plugin</b> <br> Delivers '
|
||||||
u'the ability to show presentations using a number of different '
|
u'the ability to show presentations using a number of different '
|
||||||
u'programs. The choice of available presentation programs is '
|
u'programs. The choice of available presentation programs is '
|
||||||
|
@ -69,7 +69,7 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
Information about this plugin
|
Information about this plugin
|
||||||
"""
|
"""
|
||||||
about_text = translate(u'RemotePlugin.RemotePlugin',
|
about_text = translate(u'RemotePlugin',
|
||||||
u'<b>Remote Plugin</b><br>This plugin '
|
u'<b>Remote Plugin</b><br>This plugin '
|
||||||
u'provides the ability to send messages to a running version of '
|
u'provides the ability to send messages to a running version of '
|
||||||
u'openlp on a different computer via a web browser or other app<br>'
|
u'openlp on a different computer via a web browser or other app<br>'
|
||||||
|
@ -94,36 +94,44 @@ class SongsPlugin(Plugin):
|
|||||||
# Main song import menu item - will eventually be the only one
|
# Main song import menu item - will eventually be the only one
|
||||||
self.SongImportItem = QtGui.QAction(import_menu)
|
self.SongImportItem = QtGui.QAction(import_menu)
|
||||||
self.SongImportItem.setObjectName(u'SongImportItem')
|
self.SongImportItem.setObjectName(u'SongImportItem')
|
||||||
self.SongImportItem.setText(import_menu.trUtf8('&Song'))
|
self.SongImportItem.setText(translate(
|
||||||
|
u'SongsPlugin', u'&Song'))
|
||||||
self.SongImportItem.setToolTip(
|
self.SongImportItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs using the import wizard.'))
|
translate(u'SongsPlugin',
|
||||||
|
u'Import songs using the import wizard.'))
|
||||||
import_menu.addAction(self.SongImportItem)
|
import_menu.addAction(self.SongImportItem)
|
||||||
# Songs of Fellowship import menu item - will be removed and the
|
# Songs of Fellowship import menu item - will be removed and the
|
||||||
# functionality will be contained within the import wizard
|
# functionality will be contained within the import wizard
|
||||||
self.ImportSofItem = QtGui.QAction(import_menu)
|
self.ImportSofItem = QtGui.QAction(import_menu)
|
||||||
self.ImportSofItem.setObjectName(u'ImportSofItem')
|
self.ImportSofItem.setObjectName(u'ImportSofItem')
|
||||||
self.ImportSofItem.setText(
|
self.ImportSofItem.setText(
|
||||||
import_menu.trUtf8('Songs of Fellowship (temp menu item)'))
|
translate(u'SongsPlugin',
|
||||||
|
u'Songs of Fellowship (temp menu item)'))
|
||||||
self.ImportSofItem.setToolTip(
|
self.ImportSofItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \
|
translate(u'SongsPlugin',
|
||||||
+ '.rtf and sof4words.rtf supplied with the music books'))
|
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
|
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
||||||
self.ImportSofItem.setStatusTip(
|
self.ImportSofItem.setStatusTip(
|
||||||
import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \
|
translate(u'SongsPlugin',
|
||||||
+ '.rtf and sof4words.rtf supplied with the music books'))
|
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
|
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
||||||
import_menu.addAction(self.ImportSofItem)
|
import_menu.addAction(self.ImportSofItem)
|
||||||
# OpenOffice.org import menu item - will be removed and the
|
# OpenOffice.org import menu item - will be removed and the
|
||||||
# functionality will be contained within the import wizard
|
# functionality will be contained within the import wizard
|
||||||
self.ImportOooItem = QtGui.QAction(import_menu)
|
self.ImportOooItem = QtGui.QAction(import_menu)
|
||||||
self.ImportOooItem.setObjectName(u'ImportOooItem')
|
self.ImportOooItem.setObjectName(u'ImportOooItem')
|
||||||
self.ImportOooItem.setText(
|
self.ImportOooItem.setText(
|
||||||
import_menu.trUtf8('Generic Document/Presentation Import '
|
translate(u'SongsPlugin',
|
||||||
'(temp menu item)'))
|
u'Generic Document/Presentation Import '
|
||||||
|
u'(temp menu item)'))
|
||||||
self.ImportOooItem.setToolTip(
|
self.ImportOooItem.setToolTip(
|
||||||
import_menu.trUtf8('Import songs from '
|
translate(u'SongsPlugin',
|
||||||
'Word/Writer/Powerpoint/Impress'))
|
u'Import songs from '
|
||||||
|
u'Word/Writer/Powerpoint/Impress'))
|
||||||
self.ImportOooItem.setStatusTip(
|
self.ImportOooItem.setStatusTip(
|
||||||
import_menu.trUtf8('Import songs from '
|
translate(u'SongsPlugin',
|
||||||
'Word/Writer/Powerpoint/Impress'))
|
u'Import songs from '
|
||||||
|
u'Word/Writer/Powerpoint/Impress'))
|
||||||
import_menu.addAction(self.ImportOooItem)
|
import_menu.addAction(self.ImportOooItem)
|
||||||
# Signals and slots
|
# Signals and slots
|
||||||
QtCore.QObject.connect(self.SongImportItem,
|
QtCore.QObject.connect(self.SongImportItem,
|
||||||
@ -151,7 +159,7 @@ class SongsPlugin(Plugin):
|
|||||||
|
|
||||||
def onImportSofItemClick(self):
|
def onImportSofItemClick(self):
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||||
None, translate(u'SongsPlugin.Songsplugin',
|
None, translate(u'SongsPlugin',
|
||||||
u'Open Songs of Fellowship file'),
|
u'Open Songs of Fellowship file'),
|
||||||
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
||||||
try:
|
try:
|
||||||
@ -161,18 +169,20 @@ class SongsPlugin(Plugin):
|
|||||||
except:
|
except:
|
||||||
log.exception('Could not import SoF file')
|
log.exception('Could not import SoF file')
|
||||||
QtGui.QMessageBox.critical(None,
|
QtGui.QMessageBox.critical(None,
|
||||||
self.ImportSongMenu.trUtf8('Import Error'),
|
translate(u'SongsPlugin',
|
||||||
self.ImportSongMenu.trUtf8('Error importing Songs of '
|
u'Import Error'),
|
||||||
'Fellowship file.\nOpenOffice.org must be installed'
|
translate(u'SongsPlugin',
|
||||||
' and you must be using an unedited copy of the RTF'
|
u'Error importing Songs of '
|
||||||
' included with the Songs of Fellowship Music Editions'),
|
u'Fellowship file.\nOpenOffice.org must be installed'
|
||||||
|
u' and you must be using an unedited copy of the RTF'
|
||||||
|
u' included with the Songs of Fellowship Music Editions'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
|
|
||||||
def onImportOooItemClick(self):
|
def onImportOooItemClick(self):
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||||
None, translate(u'SongsPlugin.Songsplugin',
|
None, translate(u'SongsPlugin',
|
||||||
u'Open documents or presentations'),
|
u'Open documents or presentations'),
|
||||||
u'', u'All Files(*.*)')
|
u'', u'All Files(*.*)')
|
||||||
oooimport = OooImport(self.manager)
|
oooimport = OooImport(self.manager)
|
||||||
@ -180,7 +190,7 @@ class SongsPlugin(Plugin):
|
|||||||
Receiver.send_message(u'songs_load_list')
|
Receiver.send_message(u'songs_load_list')
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'SongsPlugin.Songsplugin',
|
about_text = translate(u'SongsPlugin',
|
||||||
u'<strong>Song Plugin</strong><br />'
|
u'<strong>Song Plugin</strong><br />'
|
||||||
u'This plugin allows songs to be managed and displayed.')
|
u'This plugin allows songs to be managed and displayed.')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -59,20 +59,25 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.toolsMenu = tools_menu
|
self.toolsMenu = tools_menu
|
||||||
self.SongUsageMenu = QtGui.QMenu(tools_menu)
|
self.SongUsageMenu = QtGui.QMenu(tools_menu)
|
||||||
self.SongUsageMenu.setObjectName(u'SongUsageMenu')
|
self.SongUsageMenu.setObjectName(u'SongUsageMenu')
|
||||||
self.SongUsageMenu.setTitle(tools_menu.trUtf8('&Song Usage'))
|
self.SongUsageMenu.setTitle(translate(
|
||||||
|
u'SongUsagePlugin', u'&Song Usage'))
|
||||||
#SongUsage Delete
|
#SongUsage Delete
|
||||||
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageDelete.setText(
|
self.SongUsageDelete.setText(
|
||||||
tools_menu.trUtf8('&Delete recorded data'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'&Delete recorded data'))
|
||||||
self.SongUsageDelete.setStatusTip(
|
self.SongUsageDelete.setStatusTip(
|
||||||
tools_menu.trUtf8('Delete song usage to specified date'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Delete song usage to specified date'))
|
||||||
self.SongUsageDelete.setObjectName(u'SongUsageDelete')
|
self.SongUsageDelete.setObjectName(u'SongUsageDelete')
|
||||||
#SongUsage Report
|
#SongUsage Report
|
||||||
self.SongUsageReport = QtGui.QAction(tools_menu)
|
self.SongUsageReport = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageReport.setText(
|
self.SongUsageReport.setText(
|
||||||
tools_menu.trUtf8('&Extract recorded data'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'&Extract recorded data'))
|
||||||
self.SongUsageReport.setStatusTip(
|
self.SongUsageReport.setStatusTip(
|
||||||
tools_menu.trUtf8('Generate report on Song Usage'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Generate report on Song Usage'))
|
||||||
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
self.SongUsageReport.setObjectName(u'SongUsageReport')
|
||||||
#SongUsage activation
|
#SongUsage activation
|
||||||
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
|
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
|
||||||
@ -80,9 +85,11 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsageStatus.setIcon(SongUsageIcon)
|
self.SongUsageStatus.setIcon(SongUsageIcon)
|
||||||
self.SongUsageStatus.setCheckable(True)
|
self.SongUsageStatus.setCheckable(True)
|
||||||
self.SongUsageStatus.setChecked(False)
|
self.SongUsageStatus.setChecked(False)
|
||||||
self.SongUsageStatus.setText(tools_menu.trUtf8('Song Usage Status'))
|
self.SongUsageStatus.setText(translate(
|
||||||
|
u'SongUsagePlugin', u'Song Usage Status'))
|
||||||
self.SongUsageStatus.setStatusTip(
|
self.SongUsageStatus.setStatusTip(
|
||||||
tools_menu.trUtf8('Start/Stop live song usage recording'))
|
translate(u'SongUsagePlugin',
|
||||||
|
u'Start/Stop live song usage recording'))
|
||||||
self.SongUsageStatus.setShortcut(u'F4')
|
self.SongUsageStatus.setShortcut(u'F4')
|
||||||
self.SongUsageStatus.setObjectName(u'SongUsageStatus')
|
self.SongUsageStatus.setObjectName(u'SongUsageStatus')
|
||||||
#Add Menus together
|
#Add Menus together
|
||||||
@ -156,7 +163,7 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsagedetailform.exec_()
|
self.SongUsagedetailform.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'SongsPlugin.SongUsagePlugin',
|
about_text = translate(u'SongUsagePlugin',
|
||||||
u'<b>SongUsage Plugin</b><br>This plugin '
|
u'<b>SongUsage Plugin</b><br>This plugin '
|
||||||
u'records the use of songs and when they have been used during '
|
u'records the use of songs and when they have been used during '
|
||||||
u'a live service')
|
u'a live service')
|
||||||
|
Loading…
Reference in New Issue
Block a user