forked from openlp/openlp
Final extermination of translate u"s
This commit is contained in:
parent
13a8c86e31
commit
a4d7ae1600
@ -94,7 +94,7 @@ class alertsPlugin(Plugin):
|
|||||||
self.alertForm.exec_()
|
self.alertForm.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'AlertsPlugin',
|
about_text = translate('AlertsPlugin',
|
||||||
u'<b>Alerts Plugin</b><br>This plugin '
|
'<b>Alerts Plugin</b><br>This plugin '
|
||||||
u'controls the displaying of alerts on the presentations screen')
|
'controls the displaying of alerts on the presentations screen')
|
||||||
return about_text
|
return about_text
|
@ -93,8 +93,8 @@ class AlertsManager(QtCore.QObject):
|
|||||||
self.alertList.append(text)
|
self.alertList.append(text)
|
||||||
if self.timer_id != 0:
|
if self.timer_id != 0:
|
||||||
Receiver.send_message(u'maindisplay_status_text',
|
Receiver.send_message(u'maindisplay_status_text',
|
||||||
translate(u'AlertsPlugin.AlertsManager',
|
translate('AlertsPlugin.AlertsManager',
|
||||||
u'Alert message created and delayed'))
|
'Alert message created and delayed'))
|
||||||
return
|
return
|
||||||
Receiver.send_message(u'maindisplay_status_text', u'')
|
Receiver.send_message(u'maindisplay_status_text', u'')
|
||||||
self.generateAlert()
|
self.generateAlert()
|
||||||
|
@ -90,10 +90,10 @@ class BiblePlugin(Plugin):
|
|||||||
self.media_item.onImportClick()
|
self.media_item.onImportClick()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'BiblePlugin',
|
about_text = translate('BiblePlugin',
|
||||||
u'<strong>Bible Plugin</strong><br />This '
|
'<strong>Bible Plugin</strong><br />This '
|
||||||
u'plugin allows bible verses from different sources to be '
|
'plugin allows bible verses from different sources to be '
|
||||||
u'displayed on the screen during the service.')
|
'displayed on the screen during the service.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def can_delete_theme(self, theme):
|
def can_delete_theme(self, theme):
|
||||||
|
@ -312,18 +312,18 @@ class Ui_BibleImportWizard(object):
|
|||||||
translate('BiblesPlugin.ImportWizardForm', 'Bible Import Wizard'))
|
translate('BiblesPlugin.ImportWizardForm', 'Bible Import Wizard'))
|
||||||
self.TitleLabel.setText(
|
self.TitleLabel.setText(
|
||||||
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Welcome to the Bible Import Wizard'))
|
'Welcome to the Bible Import Wizard'))
|
||||||
self.InformationLabel.setText(
|
self.InformationLabel.setText(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'This wizard will help you to import Bibles from a '
|
'This wizard will help you to import Bibles from a '
|
||||||
u'variety of formats. Click the next button below to start the '
|
'variety of formats. Click the next button below to start the '
|
||||||
u'process by selecting a format to import from.'))
|
'process by selecting a format to import from.'))
|
||||||
self.SelectPage.setTitle(translate(u'BiblesPlugin.ImportWizardForm',
|
self.SelectPage.setTitle(translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Select Import Source'))
|
'Select Import Source'))
|
||||||
self.SelectPage.setSubTitle(
|
self.SelectPage.setSubTitle(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Select the import format, and where to import from.'))
|
'Select the import format, and where to import from.'))
|
||||||
self.FormatLabel.setText(
|
self.FormatLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Format:'))
|
translate('BiblesPlugin.ImportWizardForm', 'Format:'))
|
||||||
self.FormatComboBox.setItemText(0,
|
self.FormatComboBox.setItemText(0,
|
||||||
@ -361,13 +361,13 @@ class Ui_BibleImportWizard(object):
|
|||||||
translate('BiblesPlugin.ImportWizardForm', 'Password:'))
|
translate('BiblesPlugin.ImportWizardForm', 'Password:'))
|
||||||
self.WebDownloadTabWidget.setTabText(
|
self.WebDownloadTabWidget.setTabText(
|
||||||
self.WebDownloadTabWidget.indexOf(self.ProxyServerTab),
|
self.WebDownloadTabWidget.indexOf(self.ProxyServerTab),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Proxy Server (Optional)'))
|
'Proxy Server (Optional)'))
|
||||||
self.LicenseDetailsPage.setTitle(
|
self.LicenseDetailsPage.setTitle(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'License Details'))
|
translate('BiblesPlugin.ImportWizardForm', 'License Details'))
|
||||||
self.LicenseDetailsPage.setSubTitle(
|
self.LicenseDetailsPage.setSubTitle(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Set up the Bible\'s license details.'))
|
'Set up the Bible\'s license details.'))
|
||||||
self.VersionNameLabel.setText(
|
self.VersionNameLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Version Name:'))
|
translate('BiblesPlugin.ImportWizardForm', 'Version Name:'))
|
||||||
self.CopyrightLabel.setText(
|
self.CopyrightLabel.setText(
|
||||||
@ -377,8 +377,8 @@ class Ui_BibleImportWizard(object):
|
|||||||
self.ImportPage.setTitle(
|
self.ImportPage.setTitle(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Importing'))
|
translate('BiblesPlugin.ImportWizardForm', 'Importing'))
|
||||||
self.ImportPage.setSubTitle(
|
self.ImportPage.setSubTitle(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Please wait while your Bible is imported.'))
|
'Please wait while your Bible is imported.'))
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate('BiblesPlugin.ImportWizardForm', 'Ready.'))
|
translate('BiblesPlugin.ImportWizardForm', 'Ready.'))
|
||||||
self.ImportProgressBar.setFormat(u'%p%')
|
self.ImportProgressBar.setFormat(u'%p%')
|
||||||
|
@ -123,32 +123,32 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
||||||
if self.field(u'osis_location').toString() == u'':
|
if self.field(u'osis_location').toString() == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Invalid Bible Location'),
|
'Invalid Bible Location'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to specify a file to import your '
|
'You need to specify a file to import your '
|
||||||
u'Bible from.'),
|
'Bible from.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.OSISLocationEdit.setFocus()
|
self.OSISLocationEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
||||||
if self.field(u'csv_booksfile').toString() == u'':
|
if self.field(u'csv_booksfile').toString() == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Invalid Books File'),
|
'Invalid Books File'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to specify a file with books of '
|
'You need to specify a file with books of '
|
||||||
u'the Bible to use in the import.'),
|
'the Bible to use in the import.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.BooksLocationEdit.setFocus()
|
self.BooksLocationEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.field(u'csv_versefile').toString() == u'':
|
elif self.field(u'csv_versefile').toString() == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Invalid Verse File'),
|
'Invalid Verse File'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to specify a file of Bible '
|
'You need to specify a file of Bible '
|
||||||
u'verses to import.'),
|
'verses to import.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.CsvVerseLocationEdit.setFocus()
|
self.CsvVerseLocationEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
@ -156,11 +156,11 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
BibleFormat.OpenSong:
|
BibleFormat.OpenSong:
|
||||||
if self.field(u'opensong_file').toString() == u'':
|
if self.field(u'opensong_file').toString() == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Invalid OpenSong Bible'),
|
'Invalid OpenSong Bible'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to specify an OpenSong Bible '
|
'You need to specify an OpenSong Bible '
|
||||||
u'file to import.'),
|
'file to import.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.OpenSongFileEdit.setFocus()
|
self.OpenSongFileEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
@ -172,32 +172,32 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
unicode(self.field(u'license_copyright').toString())
|
unicode(self.field(u'license_copyright').toString())
|
||||||
if license_version == u'':
|
if license_version == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Empty Version Name'),
|
'Empty Version Name'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to specify a version name for your '
|
'You need to specify a version name for your '
|
||||||
u'Bible.'),
|
'Bible.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.VersionNameEdit.setFocus()
|
self.VersionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif license_copyright == u'':
|
elif license_copyright == u'':
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Empty Copyright'),
|
'Empty Copyright'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'You need to set a copyright for your Bible! '
|
'You need to set a copyright for your Bible! '
|
||||||
u'Bibles in the Public Domain need to be marked as '
|
'Bibles in the Public Domain need to be marked as '
|
||||||
u'such.'),
|
'such.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.CopyrightEdit.setFocus()
|
self.CopyrightEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
elif self.manager.exists(license_version):
|
elif self.manager.exists(license_version):
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Bible Exists'),
|
'Bible Exists'),
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'This Bible already exists! Please import '
|
'This Bible already exists! Please import '
|
||||||
u'a different Bible or first delete the existing one.'),
|
'a different Bible or first delete the existing one.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.VersionNameEdit.setFocus()
|
self.VersionNameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
@ -217,7 +217,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
self.BibleComboBox.clear()
|
self.BibleComboBox.clear()
|
||||||
for bible in self.web_bible_list[index].keys():
|
for bible in self.web_bible_list[index].keys():
|
||||||
self.BibleComboBox.addItem(unicode(
|
self.BibleComboBox.addItem(unicode(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm', bible)))
|
translate('BiblesPlugin.ImportWizardForm', bible)))
|
||||||
|
|
||||||
def onOsisFileButtonClicked(self):
|
def onOsisFileButtonClicked(self):
|
||||||
"""
|
"""
|
||||||
@ -240,8 +240,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
Show the file open dialog for the verses CSV file.
|
Show the file open dialog for the verses CSV file.
|
||||||
"""
|
"""
|
||||||
self.getFileName(
|
self.getFileName(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Open Verses CSV File'),
|
'Open Verses CSV File'),
|
||||||
self.CsvVerseLocationEdit)
|
self.CsvVerseLocationEdit)
|
||||||
|
|
||||||
def onOpenSongBrowseButtonClicked(self):
|
def onOpenSongBrowseButtonClicked(self):
|
||||||
@ -445,12 +445,12 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
|||||||
license_copyright, license_permission)
|
license_copyright, license_permission)
|
||||||
self.manager.reload_bibles()
|
self.manager.reload_bibles()
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Finished import.'))
|
'Finished import.'))
|
||||||
else:
|
else:
|
||||||
self.ImportProgressLabel.setText(
|
self.ImportProgressLabel.setText(
|
||||||
translate(u'BiblesPlugin.ImportWizardForm',
|
translate('BiblesPlugin.ImportWizardForm',
|
||||||
u'Your Bible import failed.'))
|
'Your Bible import failed.'))
|
||||||
importer.delete()
|
importer.delete()
|
||||||
|
|
||||||
def postImport(self):
|
def postImport(self):
|
||||||
|
@ -152,8 +152,8 @@ class BiblesTab(SettingsTab):
|
|||||||
self.VerseDisplayGroupBox.setTitle(
|
self.VerseDisplayGroupBox.setTitle(
|
||||||
translate('BiblesPlugin,BiblesTab', 'Verse Display'))
|
translate('BiblesPlugin,BiblesTab', 'Verse Display'))
|
||||||
self.NewChaptersCheckBox.setText(
|
self.NewChaptersCheckBox.setText(
|
||||||
translate(u'BiblesPlugin,BiblesTab',
|
translate('BiblesPlugin,BiblesTab',
|
||||||
u'Only show new chapter numbers'))
|
'Only show new chapter numbers'))
|
||||||
self.LayoutStyleLabel.setText(
|
self.LayoutStyleLabel.setText(
|
||||||
translate('BiblesPlugin,BiblesTab', 'Layout Style:'))
|
translate('BiblesPlugin,BiblesTab', 'Layout Style:'))
|
||||||
self.DisplayStyleLabel.setText(
|
self.DisplayStyleLabel.setText(
|
||||||
@ -174,8 +174,8 @@ class BiblesTab(SettingsTab):
|
|||||||
translate('BiblesPlugin,BiblesTab', '{ and }'))
|
translate('BiblesPlugin,BiblesTab', '{ and }'))
|
||||||
self.DisplayStyleComboBox.setItemText(3,
|
self.DisplayStyleComboBox.setItemText(3,
|
||||||
translate('BiblesPlugin,BiblesTab', '[ and ]'))
|
translate('BiblesPlugin,BiblesTab', '[ and ]'))
|
||||||
self.ChangeNoteLabel.setText(translate(u'BiblesPlugin.BiblesTab',
|
self.ChangeNoteLabel.setText(translate('BiblesPlugin.BiblesTab',
|
||||||
u'Note:\nChanges don\'t affect verses already in the service'))
|
'Note:\nChanges don\'t affect verses already in the service'))
|
||||||
self.BibleDualCheckBox.setText(
|
self.BibleDualCheckBox.setText(
|
||||||
translate('BiblesPlugin,BiblesTab', 'Display Dual Bible Verses'))
|
translate('BiblesPlugin,BiblesTab', 'Display Dual Bible Verses'))
|
||||||
|
|
||||||
|
@ -317,10 +317,10 @@ class BibleDB(QtCore.QObject):
|
|||||||
log.debug(u'OpenLP failed to find book %s', book)
|
log.debug(u'OpenLP failed to find book %s', book)
|
||||||
QtGui.QMessageBox.information(self.bible_plugin.media_item,
|
QtGui.QMessageBox.information(self.bible_plugin.media_item,
|
||||||
translate('BibleDB', 'Book not found'),
|
translate('BibleDB', 'Book not found'),
|
||||||
translate(u'BibleDB', u'The book you requested could not '
|
translate('BibleDB', u'The book you requested could not '
|
||||||
u'be found in this bible. Please check your spelling '
|
'be found in this bible. Please check your spelling '
|
||||||
u'and that this is a complete bible not just one '
|
'and that this is a complete bible not just one '
|
||||||
u'testament.'))
|
'testament.'))
|
||||||
return verse_list
|
return verse_list
|
||||||
|
|
||||||
def verse_search(self, text):
|
def verse_search(self, text):
|
||||||
|
@ -386,8 +386,8 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
def onNoBookFound(self):
|
def onNoBookFound(self):
|
||||||
QtGui.QMessageBox.critical(self,
|
QtGui.QMessageBox.critical(self,
|
||||||
translate('BiblesPlugin.MediaItem', 'No Book Found'),
|
translate('BiblesPlugin.MediaItem', 'No Book Found'),
|
||||||
translate(u'BiblesPlugin.MediaItem',
|
translate('BiblesPlugin.MediaItem',
|
||||||
u'No matching book could be found in this Bible.'),
|
'No matching book could be found in this Bible.'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||||
QtGui.QMessageBox.Ok
|
QtGui.QMessageBox.Ok
|
||||||
)
|
)
|
||||||
|
@ -67,11 +67,11 @@ class CustomPlugin(Plugin):
|
|||||||
self.remove_toolbox_item()
|
self.remove_toolbox_item()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'CustomPlugin',
|
about_text = translate('CustomPlugin',
|
||||||
u'<b>Custom Plugin</b><br>This plugin '
|
'<b>Custom Plugin</b><br>This plugin '
|
||||||
u'allows slides to be displayed on the screen in the same way '
|
'allows slides to be displayed on the screen in the same way '
|
||||||
u'songs are. This plugin provides greater freedom over the '
|
'songs are. This plugin provides greater freedom over the '
|
||||||
u'songs plugin.<br>')
|
'songs plugin.<br>')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def can_delete_theme(self, theme):
|
def can_delete_theme(self, theme):
|
||||||
|
@ -55,8 +55,8 @@ class CustomTab(SettingsTab):
|
|||||||
self.onDisplayFooterCheckBoxChanged)
|
self.onDisplayFooterCheckBoxChanged)
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.CustomModeGroupBox.setTitle(translate(u'CustomPlugin.CustomTab',
|
self.CustomModeGroupBox.setTitle(translate('CustomPlugin.CustomTab',
|
||||||
u'Custom Display'))
|
'Custom Display'))
|
||||||
self.DisplayFooterCheckBox.setText(
|
self.DisplayFooterCheckBox.setText(
|
||||||
translate('CustomPlugin.CustomTab', 'Display Footer'))
|
translate('CustomPlugin.CustomTab', 'Display Footer'))
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Edit a custom item
|
Edit a custom item
|
||||||
"""
|
"""
|
||||||
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
|
if self.checkItemSelected(translate('CustomPlugin.MediaItem',
|
||||||
u'You must select an item to edit.')):
|
'You must select an item to edit.')):
|
||||||
item = self.ListView.currentItem()
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.edit_custom_form.loadCustom(item_id, False)
|
self.parent.edit_custom_form.loadCustom(item_id, False)
|
||||||
@ -130,8 +130,8 @@ class CustomMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a custom item from the list and database
|
Remove a custom item from the list and database
|
||||||
"""
|
"""
|
||||||
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
|
if self.checkItemSelected(translate('CustomPlugin.MediaItem',
|
||||||
u'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.parent.custommanager.delete_custom(item_id)
|
self.parent.custommanager.delete_custom(item_id)
|
||||||
|
@ -61,14 +61,14 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
self.message_listener = MessageListener(self)
|
self.message_listener = MessageListener(self)
|
||||||
|
|
||||||
def initPluginNameVisible(self):
|
def initPluginNameVisible(self):
|
||||||
self.PluginNameVisible = translate(u'PresentationPlugin.MediaItem',
|
self.PluginNameVisible = translate('PresentationPlugin.MediaItem',
|
||||||
u'Presentation')
|
'Presentation')
|
||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.OnNewPrompt = translate(u'PresentationPlugin.MediaItem',
|
self.OnNewPrompt = translate('PresentationPlugin.MediaItem',
|
||||||
u'Select Presentation(s)')
|
'Select Presentation(s)')
|
||||||
self.Automatic = translate(u'PresentationPlugin.MediaItem',
|
self.Automatic = translate('PresentationPlugin.MediaItem',
|
||||||
u'Automatic')
|
'Automatic')
|
||||||
fileType = u''
|
fileType = u''
|
||||||
for controller in self.controllers:
|
for controller in self.controllers:
|
||||||
if self.controllers[controller].enabled:
|
if self.controllers[controller].enabled:
|
||||||
@ -78,8 +78,8 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
if fileType.find(type) == -1:
|
if fileType.find(type) == -1:
|
||||||
fileType += u'*%s ' % type
|
fileType += u'*%s ' % type
|
||||||
self.parent.service_manager.supportedSuffixes(type)
|
self.parent.service_manager.supportedSuffixes(type)
|
||||||
self.OnNewFileMasks = translate(u'PresentationPlugin.MediaItem',
|
self.OnNewFileMasks = translate('PresentationPlugin.MediaItem',
|
||||||
u'Presentations (%s)' % fileType)
|
'Presentations (%s)' % fileType)
|
||||||
|
|
||||||
def requiredIcons(self):
|
def requiredIcons(self):
|
||||||
MediaManagerItem.requiredIcons(self)
|
MediaManagerItem.requiredIcons(self)
|
||||||
@ -139,10 +139,10 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
filename = os.path.split(unicode(file))[1]
|
filename = os.path.split(unicode(file))[1]
|
||||||
if titles.count(filename) > 0:
|
if titles.count(filename) > 0:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'PresentationPlugin.MediaItem',
|
self, translate('PresentationPlugin.MediaItem',
|
||||||
u'File exists'),
|
'File exists'),
|
||||||
translate(u'PresentationPlugin.MediaItem',
|
translate('PresentationPlugin.MediaItem',
|
||||||
u'A presentation with that filename already exists.'),
|
'A presentation with that filename already exists.'),
|
||||||
QtGui.QMessageBox.Ok)
|
QtGui.QMessageBox.Ok)
|
||||||
else:
|
else:
|
||||||
icon = None
|
icon = None
|
||||||
@ -177,8 +177,8 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a presentation item from the list
|
Remove a presentation item from the list
|
||||||
"""
|
"""
|
||||||
if self.checkItemSelected(translate(u'PresentationPlugin.MediaItem',
|
if self.checkItemSelected(translate('PresentationPlugin.MediaItem',
|
||||||
u'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
item = self.ListView.currentItem()
|
item = self.ListView.currentItem()
|
||||||
row = self.ListView.row(item)
|
row = self.ListView.row(item)
|
||||||
self.ListView.takeItem(row)
|
self.ListView.takeItem(row)
|
||||||
|
@ -37,8 +37,8 @@ class PresentationTab(SettingsTab):
|
|||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
self.setObjectName(u'PresentationTab')
|
self.setObjectName(u'PresentationTab')
|
||||||
self.tabTitleVisible = translate(u'PresentationPlugin.PresentationTab',
|
self.tabTitleVisible = translate('PresentationPlugin.PresentationTab',
|
||||||
u'Presentations')
|
'Presentations')
|
||||||
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
||||||
self.PresentationLayout.setSpacing(8)
|
self.PresentationLayout.setSpacing(8)
|
||||||
self.PresentationLayout.setMargin(8)
|
self.PresentationLayout.setMargin(8)
|
||||||
@ -90,8 +90,8 @@ class PresentationTab(SettingsTab):
|
|||||||
|
|
||||||
def retranslateUi(self):
|
def retranslateUi(self):
|
||||||
self.VerseDisplayGroupBox.setTitle(
|
self.VerseDisplayGroupBox.setTitle(
|
||||||
translate(u'PresentationPlugin.PresentationTab',
|
translate('PresentationPlugin.PresentationTab',
|
||||||
u'Available Controllers'))
|
'Available Controllers'))
|
||||||
for key in self.controllers:
|
for key in self.controllers:
|
||||||
controller = self.controllers[key]
|
controller = self.controllers[key]
|
||||||
checkbox = self.PresenterCheckboxes[controller.name]
|
checkbox = self.PresenterCheckboxes[controller.name]
|
||||||
|
@ -108,10 +108,10 @@ class PresentationPlugin(Plugin):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'PresentationPlugin',
|
about_text = translate('PresentationPlugin',
|
||||||
u'<b>Presentation Plugin</b> <br> Delivers '
|
'<b>Presentation Plugin</b> <br> Delivers '
|
||||||
u'the ability to show presentations using a number of different '
|
'the ability to show presentations using a number of different '
|
||||||
u'programs. The choice of available presentation programs is '
|
'programs. The choice of available presentation programs is '
|
||||||
u'available to the user in a drop down box.')
|
'available to the user in a drop down box.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
|
@ -69,9 +69,9 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
Information about this plugin
|
Information about this plugin
|
||||||
"""
|
"""
|
||||||
about_text = translate(u'RemotePlugin',
|
about_text = translate('RemotePlugin',
|
||||||
u'<b>Remote Plugin</b><br>This plugin '
|
'<b>Remote Plugin</b><br>This plugin '
|
||||||
u'provides the ability to send messages to a running version of '
|
'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>'
|
'openlp on a different computer via a web browser or other app<br>'
|
||||||
u'The Primary use for this would be to send alerts from a creche')
|
'The Primary use for this would be to send alerts from a creche')
|
||||||
return about_text
|
return about_text
|
||||||
|
@ -137,10 +137,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetAuthors()
|
self.resetAuthors()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t add your author.'))
|
'Couldn\'t add your author.'))
|
||||||
|
|
||||||
def onTopicAddButtonClick(self):
|
def onTopicAddButtonClick(self):
|
||||||
if self.topicform.exec_():
|
if self.topicform.exec_():
|
||||||
@ -149,10 +149,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetTopics()
|
self.resetTopics()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t add your topic.'))
|
'Couldn\'t add your topic.'))
|
||||||
|
|
||||||
def onBookAddButtonClick(self):
|
def onBookAddButtonClick(self):
|
||||||
if self.bookform.exec_():
|
if self.bookform.exec_():
|
||||||
@ -163,10 +163,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetBooks()
|
self.resetBooks()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t add your book.'))
|
'Couldn\'t add your book.'))
|
||||||
|
|
||||||
def onAuthorEditButtonClick(self):
|
def onAuthorEditButtonClick(self):
|
||||||
author_id = self._getCurrentItemId(self.AuthorsListWidget)
|
author_id = self._getCurrentItemId(self.AuthorsListWidget)
|
||||||
@ -193,10 +193,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetAuthors()
|
self.resetAuthors()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t save your author.'))
|
'Couldn\'t save your author.'))
|
||||||
|
|
||||||
def onTopicEditButtonClick(self):
|
def onTopicEditButtonClick(self):
|
||||||
topic_id = self._getCurrentItemId(self.TopicsListWidget)
|
topic_id = self._getCurrentItemId(self.TopicsListWidget)
|
||||||
@ -209,10 +209,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetTopics()
|
self.resetTopics()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t save your topic.'))
|
'Couldn\'t save your topic.'))
|
||||||
|
|
||||||
def onBookEditButtonClick(self):
|
def onBookEditButtonClick(self):
|
||||||
book_id = self._getCurrentItemId(self.BooksListWidget)
|
book_id = self._getCurrentItemId(self.BooksListWidget)
|
||||||
@ -227,10 +227,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.resetBooks()
|
self.resetBooks()
|
||||||
else:
|
else:
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate(u'SongsPlugin.SongMaintenanceForm',
|
self, translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Error'),
|
'Error'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Couldn\'t save your book.'))
|
'Couldn\'t save your book.'))
|
||||||
|
|
||||||
def onAuthorDeleteButtonClick(self):
|
def onAuthorDeleteButtonClick(self):
|
||||||
"""
|
"""
|
||||||
@ -240,13 +240,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.AuthorsListWidget, self.songmanager.get_author,
|
self.AuthorsListWidget, self.songmanager.get_author,
|
||||||
self.songmanager.delete_author, self.resetAuthors,
|
self.songmanager.delete_author, self.resetAuthors,
|
||||||
translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'),
|
translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Are you sure you want to delete the selected author?'),
|
'Are you sure you want to delete the selected author?'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'This author can\'t be deleted, they are currently '
|
'This author can\'t be deleted, they are currently '
|
||||||
u'assigned to at least one song.'),
|
'assigned to at least one song.'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'No author selected!'))
|
'No author selected!'))
|
||||||
|
|
||||||
def onTopicDeleteButtonClick(self):
|
def onTopicDeleteButtonClick(self):
|
||||||
"""
|
"""
|
||||||
@ -256,13 +256,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.TopicsListWidget, self.songmanager.get_topic,
|
self.TopicsListWidget, self.songmanager.get_topic,
|
||||||
self.songmanager.delete_topic, self.resetTopics,
|
self.songmanager.delete_topic, self.resetTopics,
|
||||||
translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
|
translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Are you sure you want to delete the selected topic?'),
|
'Are you sure you want to delete the selected topic?'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'This topic can\'t be deleted, it is currently '
|
'This topic can\'t be deleted, it is currently '
|
||||||
u'assigned to at least one song.'),
|
'assigned to at least one song.'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'No topic selected!'))
|
'No topic selected!'))
|
||||||
|
|
||||||
def onBookDeleteButtonClick(self):
|
def onBookDeleteButtonClick(self):
|
||||||
"""
|
"""
|
||||||
@ -272,9 +272,9 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
|||||||
self.BooksListWidget, self.songmanager.get_book,
|
self.BooksListWidget, self.songmanager.get_book,
|
||||||
self.songmanager.delete_book, self.resetBooks,
|
self.songmanager.delete_book, self.resetBooks,
|
||||||
translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),
|
translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'Are you sure you want to delete the selected book?'),
|
'Are you sure you want to delete the selected book?'),
|
||||||
translate(u'SongsPlugin.SongMaintenanceForm',
|
translate('SongsPlugin.SongMaintenanceForm',
|
||||||
u'This book can\'t be deleted, it is currently '
|
'This book can\'t be deleted, it is currently '
|
||||||
u'assigned to at least one song.'),
|
'assigned to at least one song.'),
|
||||||
translate('SongsPlugin.SongMaintenanceForm', 'No book selected!'))
|
translate('SongsPlugin.SongMaintenanceForm', 'No book selected!'))
|
@ -50,8 +50,8 @@ class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
|
|||||||
if not self.NameEdit.text():
|
if not self.NameEdit.text():
|
||||||
QtGui.QMessageBox.critical(
|
QtGui.QMessageBox.critical(
|
||||||
self, translate('SongsPlugin.TopicsForm', 'Error'),
|
self, translate('SongsPlugin.TopicsForm', 'Error'),
|
||||||
translate(u'SongsPlugin.TopicsForm',
|
translate('SongsPlugin.TopicsForm',
|
||||||
u'You need to type in a topic name!'),
|
'You need to type in a topic name!'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||||
self.NameEdit.setFocus()
|
self.NameEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
|
@ -70,8 +70,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
## Song Maintenance Button ##
|
## Song Maintenance Button ##
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
translate('SongsPlugin.MediaItem', 'Song Maintenance'),
|
translate('SongsPlugin.MediaItem', 'Song Maintenance'),
|
||||||
translate(u'SongsPlugin.MediaItem',
|
translate('SongsPlugin.MediaItem',
|
||||||
u'Maintain the lists of authors, topics and books'),
|
'Maintain the lists of authors, topics and books'),
|
||||||
':/songs/song_maintenance.png', self.onSongMaintenanceClick)
|
':/songs/song_maintenance.png', self.onSongMaintenanceClick)
|
||||||
self.PageLayout.setSpacing(4)
|
self.PageLayout.setSpacing(4)
|
||||||
self.SearchLayout = QtGui.QFormLayout()
|
self.SearchLayout = QtGui.QFormLayout()
|
||||||
@ -279,8 +279,8 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Edit a song
|
Edit a song
|
||||||
"""
|
"""
|
||||||
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
|
if self.checkItemSelected(translate('SongsPlugin.MediaItem',
|
||||||
u'You must select an item to edit.')):
|
'You must select an item to edit.')):
|
||||||
item = self.ListView.currentItem()
|
item = self.ListView.currentItem()
|
||||||
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
|
||||||
self.edit_song_form.loadSong(item_id, False)
|
self.edit_song_form.loadSong(item_id, False)
|
||||||
@ -290,16 +290,16 @@ class SongMediaItem(MediaManagerItem):
|
|||||||
"""
|
"""
|
||||||
Remove a song from the list and database
|
Remove a song from the list and database
|
||||||
"""
|
"""
|
||||||
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
|
if self.checkItemSelected(translate('SongsPlugin.MediaItem',
|
||||||
u'You must select an item to delete.')):
|
'You must select an item to delete.')):
|
||||||
items = self.ListView.selectedIndexes()
|
items = self.ListView.selectedIndexes()
|
||||||
if len(items) == 1:
|
if len(items) == 1:
|
||||||
del_message = translate(u'SongsPlugin.MediaItem',
|
del_message = translate('SongsPlugin.MediaItem',
|
||||||
u'Delete song?')
|
'Delete song?')
|
||||||
else:
|
else:
|
||||||
del_message = unicode(
|
del_message = unicode(
|
||||||
translate(u'SongsPlugin.MediaItem',
|
translate('SongsPlugin.MediaItem',
|
||||||
u'Delete %d songs?')) % len(items)
|
'Delete %d songs?')) % len(items)
|
||||||
ans = QtGui.QMessageBox.question(self,
|
ans = QtGui.QMessageBox.question(self,
|
||||||
translate('SongsPlugin.MediaItem', 'Delete Confirmation'),
|
translate('SongsPlugin.MediaItem', 'Delete Confirmation'),
|
||||||
del_message,
|
del_message,
|
||||||
|
@ -65,8 +65,8 @@ class SongsTab(SettingsTab):
|
|||||||
translate('SongsPlugin.SongsTab', 'Songs Mode'))
|
translate('SongsPlugin.SongsTab', 'Songs Mode'))
|
||||||
self.SearchAsTypeCheckBox.setText(
|
self.SearchAsTypeCheckBox.setText(
|
||||||
translate('SongsPlugin.SongsTab', 'Enable search as you type'))
|
translate('SongsPlugin.SongsTab', 'Enable search as you type'))
|
||||||
self.SongBarActiveCheckBox.setText(translate(u'SongsPlugin.SongsTab',
|
self.SongBarActiveCheckBox.setText(translate('SongsPlugin.SongsTab',
|
||||||
u'Display Verses on Live Tool bar'))
|
'Display Verses on Live Tool bar'))
|
||||||
|
|
||||||
def onSearchAsTypeCheckBoxChanged(self, check_state):
|
def onSearchAsTypeCheckBoxChanged(self, check_state):
|
||||||
self.song_search = False
|
self.song_search = False
|
||||||
|
@ -93,41 +93,41 @@ class SongsPlugin(Plugin):
|
|||||||
self.SongImportItem.setText(translate(
|
self.SongImportItem.setText(translate(
|
||||||
u'SongsPlugin', u'&Song'))
|
u'SongsPlugin', u'&Song'))
|
||||||
self.SongImportItem.setToolTip(
|
self.SongImportItem.setToolTip(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import songs using the import wizard.'))
|
'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(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Songs of Fellowship (temp menu item)'))
|
'Songs of Fellowship (temp menu item)'))
|
||||||
self.ImportSofItem.setToolTip(
|
self.ImportSofItem.setToolTip(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
+ '.rtf and sof4words.rtf supplied with the music books'))
|
||||||
self.ImportSofItem.setStatusTip(
|
self.ImportSofItem.setStatusTip(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import songs from the VOLS1_2.RTF, sof3words' \
|
'Import songs from the VOLS1_2.RTF, sof3words' \
|
||||||
+ u'.rtf and sof4words.rtf supplied with the music books'))
|
+ '.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(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Generic Document/Presentation Import '
|
'Generic Document/Presentation Import '
|
||||||
u'(temp menu item)'))
|
'(temp menu item)'))
|
||||||
self.ImportOooItem.setToolTip(
|
self.ImportOooItem.setToolTip(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import songs from '
|
'Import songs from '
|
||||||
u'Word/Writer/Powerpoint/Impress'))
|
'Word/Writer/Powerpoint/Impress'))
|
||||||
self.ImportOooItem.setStatusTip(
|
self.ImportOooItem.setStatusTip(
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import songs from '
|
'Import songs from '
|
||||||
u'Word/Writer/Powerpoint/Impress'))
|
'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,
|
||||||
@ -155,8 +155,8 @@ class SongsPlugin(Plugin):
|
|||||||
|
|
||||||
def onImportSofItemClick(self):
|
def onImportSofItemClick(self):
|
||||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||||
None, translate(u'SongsPlugin',
|
None, translate('SongsPlugin',
|
||||||
u'Open Songs of Fellowship file'),
|
'Open Songs of Fellowship file'),
|
||||||
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
||||||
try:
|
try:
|
||||||
for filename in filenames:
|
for filename in filenames:
|
||||||
@ -165,30 +165,30 @@ 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,
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Import Error'),
|
'Import Error'),
|
||||||
translate(u'SongsPlugin',
|
translate('SongsPlugin',
|
||||||
u'Error importing Songs of '
|
'Error importing Songs of '
|
||||||
u'Fellowship file.\nOpenOffice.org must be installed'
|
'Fellowship file.\nOpenOffice.org must be installed'
|
||||||
u' and you must be using an unedited copy of the RTF'
|
' and you must be using an unedited copy of the RTF'
|
||||||
u' included with the Songs of Fellowship Music Editions'),
|
' 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',
|
None, translate('SongsPlugin',
|
||||||
u'Open documents or presentations'),
|
'Open documents or presentations'),
|
||||||
u'', u'All Files(*.*)')
|
'', u'All Files(*.*)')
|
||||||
oooimport = OooImport(self.manager)
|
oooimport = OooImport(self.manager)
|
||||||
oooimport.import_docs(filenames)
|
oooimport.import_docs(filenames)
|
||||||
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',
|
about_text = translate('SongsPlugin',
|
||||||
u'<strong>Song Plugin</strong><br />'
|
'<strong>Song Plugin</strong><br />'
|
||||||
u'This plugin allows songs to be managed and displayed.')
|
'This plugin allows songs to be managed and displayed.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def can_delete_theme(self, theme):
|
def can_delete_theme(self, theme):
|
||||||
|
@ -42,10 +42,10 @@ class SongUsageDeleteForm(QtGui.QDialog, Ui_SongUsageDeleteDialog):
|
|||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
ret = QtGui.QMessageBox.question(self,
|
ret = QtGui.QMessageBox.question(self,
|
||||||
translate(u'SongsPlugin.SongUsageDeleteForm',
|
translate('SongsPlugin.SongUsageDeleteForm',
|
||||||
u'Delete Selected Song Usage Events?'),
|
'Delete Selected Song Usage Events?'),
|
||||||
translate(u'SongsPlugin.SongUsageDeleteForm',
|
translate('SongsPlugin.SongUsageDeleteForm',
|
||||||
u'Are you sure you want to delete selected Song Usage data?'),
|
'Are you sure you want to delete selected Song Usage data?'),
|
||||||
QtGui.QMessageBox.StandardButtons(
|
QtGui.QMessageBox.StandardButtons(
|
||||||
QtGui.QMessageBox.Ok |
|
QtGui.QMessageBox.Ok |
|
||||||
QtGui.QMessageBox.Cancel),
|
QtGui.QMessageBox.Cancel),
|
||||||
|
@ -87,8 +87,8 @@ class Ui_SongUsageDetailDialog(object):
|
|||||||
|
|
||||||
def retranslateUi(self, SongUsageDetailDialog):
|
def retranslateUi(self, SongUsageDetailDialog):
|
||||||
SongUsageDetailDialog.setWindowTitle(
|
SongUsageDetailDialog.setWindowTitle(
|
||||||
translate(u'SongsPlugin.AuditDetailDialog',
|
translate('SongsPlugin.AuditDetailDialog',
|
||||||
u'Song Usage Extraction'))
|
'Song Usage Extraction'))
|
||||||
self.DateRangeGroupBox.setTitle(
|
self.DateRangeGroupBox.setTitle(
|
||||||
translate('SongsPlugin.AuditDetailDialog', 'Select Date Range'))
|
translate('SongsPlugin.AuditDetailDialog', 'Select Date Range'))
|
||||||
self.ToLabel.setText(
|
self.ToLabel.setText(
|
||||||
|
@ -61,8 +61,8 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
|
|||||||
|
|
||||||
def defineOutputLocation(self):
|
def defineOutputLocation(self):
|
||||||
path = QtGui.QFileDialog.getExistingDirectory(self,
|
path = QtGui.QFileDialog.getExistingDirectory(self,
|
||||||
translate(u'SongsPlugin.SongUsageDetailForm',
|
translate('SongsPlugin.SongUsageDetailForm',
|
||||||
u'Output File Location'),
|
'Output File Location'),
|
||||||
SettingsManager.get_last_dir(self.parent.settingsSection, 1))
|
SettingsManager.get_last_dir(self.parent.settingsSection, 1))
|
||||||
path = unicode(path)
|
path = unicode(path)
|
||||||
if path != u'':
|
if path != u'':
|
||||||
|
@ -64,20 +64,20 @@ class SongUsagePlugin(Plugin):
|
|||||||
#SongUsage Delete
|
#SongUsage Delete
|
||||||
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
self.SongUsageDelete = QtGui.QAction(tools_menu)
|
||||||
self.SongUsageDelete.setText(
|
self.SongUsageDelete.setText(
|
||||||
translate(u'SongUsagePlugin',
|
translate('SongUsagePlugin',
|
||||||
u'&Delete recorded data'))
|
'&Delete recorded data'))
|
||||||
self.SongUsageDelete.setStatusTip(
|
self.SongUsageDelete.setStatusTip(
|
||||||
translate(u'SongUsagePlugin',
|
translate('SongUsagePlugin',
|
||||||
u'Delete song usage to specified date'))
|
'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(
|
||||||
translate(u'SongUsagePlugin',
|
translate('SongUsagePlugin',
|
||||||
u'&Extract recorded data'))
|
'&Extract recorded data'))
|
||||||
self.SongUsageReport.setStatusTip(
|
self.SongUsageReport.setStatusTip(
|
||||||
translate(u'SongUsagePlugin',
|
translate('SongUsagePlugin',
|
||||||
u'Generate report on Song Usage'))
|
'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')
|
||||||
@ -86,10 +86,10 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsageStatus.setCheckable(True)
|
self.SongUsageStatus.setCheckable(True)
|
||||||
self.SongUsageStatus.setChecked(False)
|
self.SongUsageStatus.setChecked(False)
|
||||||
self.SongUsageStatus.setText(translate(
|
self.SongUsageStatus.setText(translate(
|
||||||
u'SongUsagePlugin', u'Song Usage Status'))
|
'SongUsagePlugin', 'Song Usage Status'))
|
||||||
self.SongUsageStatus.setStatusTip(
|
self.SongUsageStatus.setStatusTip(
|
||||||
translate(u'SongUsagePlugin',
|
translate('SongUsagePlugin',
|
||||||
u'Start/Stop live song usage recording'))
|
'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
|
||||||
@ -163,8 +163,8 @@ class SongUsagePlugin(Plugin):
|
|||||||
self.SongUsagedetailform.exec_()
|
self.SongUsagedetailform.exec_()
|
||||||
|
|
||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate(u'SongUsagePlugin',
|
about_text = translate('SongUsagePlugin',
|
||||||
u'<b>SongUsage Plugin</b><br>This plugin '
|
'<b>SongUsage Plugin</b><br>This plugin '
|
||||||
u'records the use of songs and when they have been used during '
|
'records the use of songs and when they have been used during '
|
||||||
u'a live service')
|
'a live service')
|
||||||
return about_text
|
return about_text
|
||||||
|
Loading…
Reference in New Issue
Block a user