Final extermination of translate u"s

This commit is contained in:
Tim Bentley 2010-06-21 19:28:36 +01:00
parent 13a8c86e31
commit a4d7ae1600
24 changed files with 260 additions and 260 deletions

View File

@ -94,7 +94,7 @@ class alertsPlugin(Plugin):
self.alertForm.exec_()
def about(self):
about_text = translate(u'AlertsPlugin',
u'<b>Alerts Plugin</b><br>This plugin '
u'controls the displaying of alerts on the presentations screen')
return about_text
about_text = translate('AlertsPlugin',
'<b>Alerts Plugin</b><br>This plugin '
'controls the displaying of alerts on the presentations screen')
return about_text

View File

@ -79,7 +79,7 @@ class AlertsManager(QtCore.QObject):
self.displayAlert(message[0])
else:
self.displayAlert(u'')
def displayAlert(self, text=u''):
"""
Called from the Alert Tab to display an alert
@ -93,8 +93,8 @@ class AlertsManager(QtCore.QObject):
self.alertList.append(text)
if self.timer_id != 0:
Receiver.send_message(u'maindisplay_status_text',
translate(u'AlertsPlugin.AlertsManager',
u'Alert message created and delayed'))
translate('AlertsPlugin.AlertsManager',
'Alert message created and delayed'))
return
Receiver.send_message(u'maindisplay_status_text', u'')
self.generateAlert()

View File

@ -90,13 +90,13 @@ class BiblePlugin(Plugin):
self.media_item.onImportClick()
def about(self):
about_text = translate(u'BiblePlugin',
u'<strong>Bible Plugin</strong><br />This '
u'plugin allows bible verses from different sources to be '
u'displayed on the screen during the service.')
about_text = translate('BiblePlugin',
'<strong>Bible Plugin</strong><br />This '
'plugin allows bible verses from different sources to be '
'displayed on the screen during the service.')
return about_text
def can_delete_theme(self, theme):
if self.settings_tab.bible_theme == theme:
return False
return True
return True

View File

@ -312,25 +312,25 @@ class Ui_BibleImportWizard(object):
translate('BiblesPlugin.ImportWizardForm', 'Bible Import Wizard'))
self.TitleLabel.setText(
u'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
translate(u'BiblesPlugin.ImportWizardForm',
u'Welcome to the Bible Import Wizard'))
translate('BiblesPlugin.ImportWizardForm',
'Welcome to the Bible Import Wizard'))
self.InformationLabel.setText(
translate(u'BiblesPlugin.ImportWizardForm',
u'This wizard will help you to import Bibles from a '
u'variety of formats. Click the next button below to start the '
u'process by selecting a format to import from.'))
self.SelectPage.setTitle(translate(u'BiblesPlugin.ImportWizardForm',
u'Select Import Source'))
translate('BiblesPlugin.ImportWizardForm',
'This wizard will help you to import Bibles from a '
'variety of formats. Click the next button below to start the '
'process by selecting a format to import from.'))
self.SelectPage.setTitle(translate('BiblesPlugin.ImportWizardForm',
'Select Import Source'))
self.SelectPage.setSubTitle(
translate(u'BiblesPlugin.ImportWizardForm',
u'Select the import format, and where to import from.'))
translate('BiblesPlugin.ImportWizardForm',
'Select the import format, and where to import from.'))
self.FormatLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Format:'))
self.FormatComboBox.setItemText(0,
self.FormatComboBox.setItemText(0,
translate('BiblesPlugin.ImportWizardForm', 'OSIS'))
self.FormatComboBox.setItemText(1,
self.FormatComboBox.setItemText(1,
translate('BiblesPlugin.ImportWizardForm', 'CSV'))
self.FormatComboBox.setItemText(2,
self.FormatComboBox.setItemText(2,
translate('BiblesPlugin.ImportWizardForm', 'OpenSong'))
self.FormatComboBox.setItemText(3,
translate('BiblesPlugin.ImportWizardForm', 'Web Download'))
@ -344,9 +344,9 @@ class Ui_BibleImportWizard(object):
translate('BiblesPlugin.ImportWizardForm', 'Bible Filename:'))
self.LocationLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Location:'))
self.LocationComboBox.setItemText(0,
self.LocationComboBox.setItemText(0,
translate('BiblesPlugin.ImportWizardForm', 'Crosswalk'))
self.LocationComboBox.setItemText(1,
self.LocationComboBox.setItemText(1,
translate('BiblesPlugin.ImportWizardForm', 'BibleGateway'))
self.BibleLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Bible:'))
@ -361,13 +361,13 @@ class Ui_BibleImportWizard(object):
translate('BiblesPlugin.ImportWizardForm', 'Password:'))
self.WebDownloadTabWidget.setTabText(
self.WebDownloadTabWidget.indexOf(self.ProxyServerTab),
translate(u'BiblesPlugin.ImportWizardForm',
u'Proxy Server (Optional)'))
translate('BiblesPlugin.ImportWizardForm',
'Proxy Server (Optional)'))
self.LicenseDetailsPage.setTitle(
translate('BiblesPlugin.ImportWizardForm', 'License Details'))
self.LicenseDetailsPage.setSubTitle(
translate(u'BiblesPlugin.ImportWizardForm',
u'Set up the Bible\'s license details.'))
translate('BiblesPlugin.ImportWizardForm',
'Set up the Bible\'s license details.'))
self.VersionNameLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Version Name:'))
self.CopyrightLabel.setText(
@ -377,8 +377,8 @@ class Ui_BibleImportWizard(object):
self.ImportPage.setTitle(
translate('BiblesPlugin.ImportWizardForm', 'Importing'))
self.ImportPage.setSubTitle(
translate(u'BiblesPlugin.ImportWizardForm',
u'Please wait while your Bible is imported.'))
translate('BiblesPlugin.ImportWizardForm',
'Please wait while your Bible is imported.'))
self.ImportProgressLabel.setText(
translate('BiblesPlugin.ImportWizardForm', 'Ready.'))
self.ImportProgressBar.setFormat(u'%p%')

View File

@ -123,32 +123,32 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
if self.field(u'osis_location').toString() == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Invalid Bible Location'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to specify a file to import your '
u'Bible from.'),
translate('BiblesPlugin.ImportWizardForm',
'Invalid Bible Location'),
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file to import your '
'Bible from.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.OSISLocationEdit.setFocus()
return False
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
if self.field(u'csv_booksfile').toString() == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Invalid Books File'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to specify a file with books of '
u'the Bible to use in the import.'),
translate('BiblesPlugin.ImportWizardForm',
'Invalid Books File'),
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file with books of '
'the Bible to use in the import.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.BooksLocationEdit.setFocus()
return False
elif self.field(u'csv_versefile').toString() == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Invalid Verse File'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to specify a file of Bible '
u'verses to import.'),
translate('BiblesPlugin.ImportWizardForm',
'Invalid Verse File'),
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file of Bible '
'verses to import.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.CsvVerseLocationEdit.setFocus()
return False
@ -156,11 +156,11 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
BibleFormat.OpenSong:
if self.field(u'opensong_file').toString() == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Invalid OpenSong Bible'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to specify an OpenSong Bible '
u'file to import.'),
translate('BiblesPlugin.ImportWizardForm',
'Invalid OpenSong Bible'),
translate('BiblesPlugin.ImportWizardForm',
'You need to specify an OpenSong Bible '
'file to import.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.OpenSongFileEdit.setFocus()
return False
@ -172,32 +172,32 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
unicode(self.field(u'license_copyright').toString())
if license_version == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Empty Version Name'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to specify a version name for your '
u'Bible.'),
translate('BiblesPlugin.ImportWizardForm',
'Empty Version Name'),
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a version name for your '
'Bible.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.VersionNameEdit.setFocus()
return False
elif license_copyright == u'':
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Empty Copyright'),
translate(u'BiblesPlugin.ImportWizardForm',
u'You need to set a copyright for your Bible! '
u'Bibles in the Public Domain need to be marked as '
u'such.'),
translate('BiblesPlugin.ImportWizardForm',
'Empty Copyright'),
translate('BiblesPlugin.ImportWizardForm',
'You need to set a copyright for your Bible! '
'Bibles in the Public Domain need to be marked as '
'such.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.CopyrightEdit.setFocus()
return False
elif self.manager.exists(license_version):
QtGui.QMessageBox.critical(self,
translate(u'BiblesPlugin.ImportWizardForm',
u'Bible Exists'),
translate(u'BiblesPlugin.ImportWizardForm',
u'This Bible already exists! Please import '
u'a different Bible or first delete the existing one.'),
translate('BiblesPlugin.ImportWizardForm',
'Bible Exists'),
translate('BiblesPlugin.ImportWizardForm',
'This Bible already exists! Please import '
'a different Bible or first delete the existing one.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.VersionNameEdit.setFocus()
return False
@ -217,7 +217,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
self.BibleComboBox.clear()
for bible in self.web_bible_list[index].keys():
self.BibleComboBox.addItem(unicode(
translate(u'BiblesPlugin.ImportWizardForm', bible)))
translate('BiblesPlugin.ImportWizardForm', bible)))
def onOsisFileButtonClicked(self):
"""
@ -240,8 +240,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
Show the file open dialog for the verses CSV file.
"""
self.getFileName(
translate(u'BiblesPlugin.ImportWizardForm',
u'Open Verses CSV File'),
translate('BiblesPlugin.ImportWizardForm',
'Open Verses CSV File'),
self.CsvVerseLocationEdit)
def onOpenSongBrowseButtonClicked(self):
@ -445,12 +445,12 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
license_copyright, license_permission)
self.manager.reload_bibles()
self.ImportProgressLabel.setText(
translate(u'BiblesPlugin.ImportWizardForm',
u'Finished import.'))
translate('BiblesPlugin.ImportWizardForm',
'Finished import.'))
else:
self.ImportProgressLabel.setText(
translate(u'BiblesPlugin.ImportWizardForm',
u'Your Bible import failed.'))
translate('BiblesPlugin.ImportWizardForm',
'Your Bible import failed.'))
importer.delete()
def postImport(self):

View File

@ -152,30 +152,30 @@ class BiblesTab(SettingsTab):
self.VerseDisplayGroupBox.setTitle(
translate('BiblesPlugin,BiblesTab', 'Verse Display'))
self.NewChaptersCheckBox.setText(
translate(u'BiblesPlugin,BiblesTab',
u'Only show new chapter numbers'))
translate('BiblesPlugin,BiblesTab',
'Only show new chapter numbers'))
self.LayoutStyleLabel.setText(
translate('BiblesPlugin,BiblesTab', 'Layout Style:'))
self.DisplayStyleLabel.setText(
translate('BiblesPlugin,BiblesTab', 'Display Style:'))
self.BibleThemeLabel.setText(
translate('BiblesPlugin,BiblesTab', 'Bible Theme:'))
self.LayoutStyleComboBox.setItemText(0,
self.LayoutStyleComboBox.setItemText(0,
translate('BiblesPlugin,BiblesTab', 'verse per slide'))
self.LayoutStyleComboBox.setItemText(1,
self.LayoutStyleComboBox.setItemText(1,
translate('BiblesPlugin,BiblesTab', 'verse per line'))
self.LayoutStyleComboBox.setItemText(2,
self.LayoutStyleComboBox.setItemText(2,
translate('BiblesPlugin,BiblesTab', 'continuous'))
self.DisplayStyleComboBox.setItemText(0,
self.DisplayStyleComboBox.setItemText(0,
translate('BiblesPlugin,BiblesTab', 'No brackets'))
self.DisplayStyleComboBox.setItemText(1,
self.DisplayStyleComboBox.setItemText(1,
translate('BiblesPlugin,BiblesTab', '( and )'))
self.DisplayStyleComboBox.setItemText(2,
translate('BiblesPlugin,BiblesTab', '{ and }'))
self.DisplayStyleComboBox.setItemText(3,
self.DisplayStyleComboBox.setItemText(3,
translate('BiblesPlugin,BiblesTab', '[ and ]'))
self.ChangeNoteLabel.setText(translate(u'BiblesPlugin.BiblesTab',
u'Note:\nChanges don\'t affect verses already in the service'))
self.ChangeNoteLabel.setText(translate('BiblesPlugin.BiblesTab',
'Note:\nChanges don\'t affect verses already in the service'))
self.BibleDualCheckBox.setText(
translate('BiblesPlugin,BiblesTab', 'Display Dual Bible Verses'))
@ -246,4 +246,4 @@ class BiblesTab(SettingsTab):
# Not Found
id = 0
self.bible_theme = u''
self.BibleThemeComboBox.setCurrentIndex(id)
self.BibleThemeComboBox.setCurrentIndex(id)

View File

@ -317,10 +317,10 @@ class BibleDB(QtCore.QObject):
log.debug(u'OpenLP failed to find book %s', book)
QtGui.QMessageBox.information(self.bible_plugin.media_item,
translate('BibleDB', 'Book not found'),
translate(u'BibleDB', u'The book you requested could not '
u'be found in this bible. Please check your spelling '
u'and that this is a complete bible not just one '
u'testament.'))
translate('BibleDB', u'The book you requested could not '
'be found in this bible. Please check your spelling '
'and that this is a complete bible not just one '
'testament.'))
return verse_list
def verse_search(self, text):
@ -391,4 +391,4 @@ class BibleDB(QtCore.QObject):
log.debug(books)
log.debug(u'...............................Verses ')
verses = self.session.query(Verse).all()
log.debug(verses)
log.debug(verses)

View File

@ -386,8 +386,8 @@ class BibleMediaItem(MediaManagerItem):
def onNoBookFound(self):
QtGui.QMessageBox.critical(self,
translate('BiblesPlugin.MediaItem', 'No Book Found'),
translate(u'BiblesPlugin.MediaItem',
u'No matching book could be found in this Bible.'),
translate('BiblesPlugin.MediaItem',
'No matching book could be found in this Bible.'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok
)

View File

@ -67,11 +67,11 @@ class CustomPlugin(Plugin):
self.remove_toolbox_item()
def about(self):
about_text = translate(u'CustomPlugin',
u'<b>Custom Plugin</b><br>This plugin '
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 plugin.<br>')
about_text = translate('CustomPlugin',
'<b>Custom Plugin</b><br>This plugin '
'allows slides to be displayed on the screen in the same way '
'songs are. This plugin provides greater freedom over the '
'songs plugin.<br>')
return about_text
def can_delete_theme(self, theme):

View File

@ -55,8 +55,8 @@ class CustomTab(SettingsTab):
self.onDisplayFooterCheckBoxChanged)
def retranslateUi(self):
self.CustomModeGroupBox.setTitle(translate(u'CustomPlugin.CustomTab',
u'Custom Display'))
self.CustomModeGroupBox.setTitle(translate('CustomPlugin.CustomTab',
'Custom Display'))
self.DisplayFooterCheckBox.setText(
translate('CustomPlugin.CustomTab', 'Display Footer'))
@ -74,4 +74,4 @@ class CustomTab(SettingsTab):
def save(self):
QtCore.QSettings().setValue(self.settingsSection + u'/display footer',
QtCore.QVariant(self.displayFooter))
QtCore.QVariant(self.displayFooter))

View File

@ -118,8 +118,8 @@ class CustomMediaItem(MediaManagerItem):
"""
Edit a custom item
"""
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
u'You must select an item to edit.')):
if self.checkItemSelected(translate('CustomPlugin.MediaItem',
'You must select an item to edit.')):
item = self.ListView.currentItem()
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
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
"""
if self.checkItemSelected(translate(u'CustomPlugin.MediaItem',
u'You must select an item to delete.')):
if self.checkItemSelected(translate('CustomPlugin.MediaItem',
'You must select an item to delete.')):
item = self.ListView.currentItem()
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
self.parent.custommanager.delete_custom(item_id)
@ -176,4 +176,4 @@ class CustomMediaItem(MediaManagerItem):
else:
raw_footer.append(u'')
service_item.raw_footer = raw_footer
return True
return True

View File

@ -61,14 +61,14 @@ class PresentationMediaItem(MediaManagerItem):
self.message_listener = MessageListener(self)
def initPluginNameVisible(self):
self.PluginNameVisible = translate(u'PresentationPlugin.MediaItem',
u'Presentation')
self.PluginNameVisible = translate('PresentationPlugin.MediaItem',
'Presentation')
def retranslateUi(self):
self.OnNewPrompt = translate(u'PresentationPlugin.MediaItem',
u'Select Presentation(s)')
self.Automatic = translate(u'PresentationPlugin.MediaItem',
u'Automatic')
self.OnNewPrompt = translate('PresentationPlugin.MediaItem',
'Select Presentation(s)')
self.Automatic = translate('PresentationPlugin.MediaItem',
'Automatic')
fileType = u''
for controller in self.controllers:
if self.controllers[controller].enabled:
@ -78,8 +78,8 @@ class PresentationMediaItem(MediaManagerItem):
if fileType.find(type) == -1:
fileType += u'*%s ' % type
self.parent.service_manager.supportedSuffixes(type)
self.OnNewFileMasks = translate(u'PresentationPlugin.MediaItem',
u'Presentations (%s)' % fileType)
self.OnNewFileMasks = translate('PresentationPlugin.MediaItem',
'Presentations (%s)' % fileType)
def requiredIcons(self):
MediaManagerItem.requiredIcons(self)
@ -139,10 +139,10 @@ class PresentationMediaItem(MediaManagerItem):
filename = os.path.split(unicode(file))[1]
if titles.count(filename) > 0:
QtGui.QMessageBox.critical(
self, translate(u'PresentationPlugin.MediaItem',
u'File exists'),
translate(u'PresentationPlugin.MediaItem',
u'A presentation with that filename already exists.'),
self, translate('PresentationPlugin.MediaItem',
'File exists'),
translate('PresentationPlugin.MediaItem',
'A presentation with that filename already exists.'),
QtGui.QMessageBox.Ok)
else:
icon = None
@ -177,8 +177,8 @@ class PresentationMediaItem(MediaManagerItem):
"""
Remove a presentation item from the list
"""
if self.checkItemSelected(translate(u'PresentationPlugin.MediaItem',
u'You must select an item to delete.')):
if self.checkItemSelected(translate('PresentationPlugin.MediaItem',
'You must select an item to delete.')):
item = self.ListView.currentItem()
row = self.ListView.row(item)
self.ListView.takeItem(row)
@ -235,4 +235,4 @@ class PresentationMediaItem(MediaManagerItem):
if self.controllers[controller].enabled:
if filetype in self.controllers[controller].alsosupports:
return controller
return None
return None

View File

@ -37,8 +37,8 @@ class PresentationTab(SettingsTab):
def setupUi(self):
self.setObjectName(u'PresentationTab')
self.tabTitleVisible = translate(u'PresentationPlugin.PresentationTab',
u'Presentations')
self.tabTitleVisible = translate('PresentationPlugin.PresentationTab',
'Presentations')
self.PresentationLayout = QtGui.QHBoxLayout(self)
self.PresentationLayout.setSpacing(8)
self.PresentationLayout.setMargin(8)
@ -90,13 +90,13 @@ class PresentationTab(SettingsTab):
def retranslateUi(self):
self.VerseDisplayGroupBox.setTitle(
translate(u'PresentationPlugin.PresentationTab',
u'Available Controllers'))
translate('PresentationPlugin.PresentationTab',
'Available Controllers'))
for key in self.controllers:
controller = self.controllers[key]
checkbox = self.PresenterCheckboxes[controller.name]
checkbox.setText(
u'%s %s' % (controller.name,
u'%s %s' % (controller.name,
translate('PresentationPlugin.PresentationTab', 'available')))
def load(self):
@ -114,4 +114,4 @@ class PresentationTab(SettingsTab):
checkbox = self.PresenterCheckboxes[controller.name]
QtCore.QSettings().setValue(
self.settingsSection + u'/' + controller.name,
QtCore.QVariant(checkbox.checkState()))
QtCore.QVariant(checkbox.checkState()))

View File

@ -108,10 +108,10 @@ class PresentationPlugin(Plugin):
return False
def about(self):
about_text = translate(u'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.')
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.')
return about_text

View File

@ -64,14 +64,14 @@ class RemotesPlugin(Plugin):
Create the settings Tab
"""
return RemoteTab(self.name)
def about(self):
"""
Information about this plugin
"""
about_text = translate(u'RemotePlugin',
u'<b>Remote Plugin</b><br>This plugin '
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'The Primary use for this would be to send alerts from a creche')
about_text = translate('RemotePlugin',
'<b>Remote Plugin</b><br>This plugin '
'provides the ability to send messages to a running version of '
'openlp on a different computer via a web browser or other app<br>'
'The Primary use for this would be to send alerts from a creche')
return about_text

View File

@ -137,10 +137,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.resetAuthors()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t add your author.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t add your author.'))
def onTopicAddButtonClick(self):
if self.topicform.exec_():
@ -149,10 +149,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.resetTopics()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t add your topic.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t add your topic.'))
def onBookAddButtonClick(self):
if self.bookform.exec_():
@ -163,10 +163,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.resetBooks()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t add your book.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t add your book.'))
def onAuthorEditButtonClick(self):
author_id = self._getCurrentItemId(self.AuthorsListWidget)
@ -184,19 +184,19 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.authorform.LastNameEdit.setText(author.last_name)
self.authorform.DisplayEdit.setText(author.display_name)
if self.authorform.exec_(False):
author.first_name = unicode(
author.first_name = unicode(
self.authorform.FirstNameEdit.text())
author.last_name = unicode(self.authorform.LastNameEdit.text())
author.display_name = unicode(
author.display_name = unicode(
self.authorform.DisplayEdit.text())
if self.songmanager.save_author(author):
self.resetAuthors()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t save your author.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t save your author.'))
def onTopicEditButtonClick(self):
topic_id = self._getCurrentItemId(self.TopicsListWidget)
@ -209,10 +209,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.resetTopics()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t save your topic.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t save your topic.'))
def onBookEditButtonClick(self):
book_id = self._getCurrentItemId(self.BooksListWidget)
@ -227,10 +227,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.resetBooks()
else:
QtGui.QMessageBox.critical(
self, translate(u'SongsPlugin.SongMaintenanceForm',
u'Error'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Couldn\'t save your book.'))
self, translate('SongsPlugin.SongMaintenanceForm',
'Error'),
translate('SongsPlugin.SongMaintenanceForm',
'Couldn\'t save your book.'))
def onAuthorDeleteButtonClick(self):
"""
@ -240,13 +240,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.AuthorsListWidget, self.songmanager.get_author,
self.songmanager.delete_author, self.resetAuthors,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Are you sure you want to delete the selected author?'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'This author can\'t be deleted, they are currently '
u'assigned to at least one song.'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'No author selected!'))
translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected author?'),
translate('SongsPlugin.SongMaintenanceForm',
'This author can\'t be deleted, they are currently '
'assigned to at least one song.'),
translate('SongsPlugin.SongMaintenanceForm',
'No author selected!'))
def onTopicDeleteButtonClick(self):
"""
@ -256,13 +256,13 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.TopicsListWidget, self.songmanager.get_topic,
self.songmanager.delete_topic, self.resetTopics,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Are you sure you want to delete the selected topic?'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'This topic can\'t be deleted, it is currently '
u'assigned to at least one song.'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'No topic selected!'))
translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected topic?'),
translate('SongsPlugin.SongMaintenanceForm',
'This topic can\'t be deleted, it is currently '
'assigned to at least one song.'),
translate('SongsPlugin.SongMaintenanceForm',
'No topic selected!'))
def onBookDeleteButtonClick(self):
"""
@ -272,9 +272,9 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
self.BooksListWidget, self.songmanager.get_book,
self.songmanager.delete_book, self.resetBooks,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'Are you sure you want to delete the selected book?'),
translate(u'SongsPlugin.SongMaintenanceForm',
u'This book can\'t be deleted, it is currently '
u'assigned to at least one song.'),
translate('SongsPlugin.SongMaintenanceForm', 'No book selected!'))
translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected book?'),
translate('SongsPlugin.SongMaintenanceForm',
'This book can\'t be deleted, it is currently '
'assigned to at least one song.'),
translate('SongsPlugin.SongMaintenanceForm', 'No book selected!'))

View File

@ -50,10 +50,10 @@ class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
if not self.NameEdit.text():
QtGui.QMessageBox.critical(
self, translate('SongsPlugin.TopicsForm', 'Error'),
translate(u'SongsPlugin.TopicsForm',
u'You need to type in a topic name!'),
translate('SongsPlugin.TopicsForm',
'You need to type in a topic name!'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
self.NameEdit.setFocus()
return False
else:
return QtGui.QDialog.accept(self)
return QtGui.QDialog.accept(self)

View File

@ -70,8 +70,8 @@ class SongMediaItem(MediaManagerItem):
## Song Maintenance Button ##
self.addToolbarButton(
translate('SongsPlugin.MediaItem', 'Song Maintenance'),
translate(u'SongsPlugin.MediaItem',
u'Maintain the lists of authors, topics and books'),
translate('SongsPlugin.MediaItem',
'Maintain the lists of authors, topics and books'),
':/songs/song_maintenance.png', self.onSongMaintenanceClick)
self.PageLayout.setSpacing(4)
self.SearchLayout = QtGui.QFormLayout()
@ -279,8 +279,8 @@ class SongMediaItem(MediaManagerItem):
"""
Edit a song
"""
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
u'You must select an item to edit.')):
if self.checkItemSelected(translate('SongsPlugin.MediaItem',
'You must select an item to edit.')):
item = self.ListView.currentItem()
item_id = (item.data(QtCore.Qt.UserRole)).toInt()[0]
self.edit_song_form.loadSong(item_id, False)
@ -290,16 +290,16 @@ class SongMediaItem(MediaManagerItem):
"""
Remove a song from the list and database
"""
if self.checkItemSelected(translate(u'SongsPlugin.MediaItem',
u'You must select an item to delete.')):
if self.checkItemSelected(translate('SongsPlugin.MediaItem',
'You must select an item to delete.')):
items = self.ListView.selectedIndexes()
if len(items) == 1:
del_message = translate(u'SongsPlugin.MediaItem',
u'Delete song?')
del_message = translate('SongsPlugin.MediaItem',
'Delete song?')
else:
del_message = unicode(
translate(u'SongsPlugin.MediaItem',
u'Delete %d songs?')) % len(items)
translate('SongsPlugin.MediaItem',
'Delete %d songs?')) % len(items)
ans = QtGui.QMessageBox.question(self,
translate('SongsPlugin.MediaItem', 'Delete Confirmation'),
del_message,
@ -379,4 +379,4 @@ class SongMediaItem(MediaManagerItem):
service_item.audit = [
song.title, author_audit, song.copyright, song.ccli_number
]
return True
return True

View File

@ -65,8 +65,8 @@ class SongsTab(SettingsTab):
translate('SongsPlugin.SongsTab', 'Songs Mode'))
self.SearchAsTypeCheckBox.setText(
translate('SongsPlugin.SongsTab', 'Enable search as you type'))
self.SongBarActiveCheckBox.setText(translate(u'SongsPlugin.SongsTab',
u'Display Verses on Live Tool bar'))
self.SongBarActiveCheckBox.setText(translate('SongsPlugin.SongsTab',
'Display Verses on Live Tool bar'))
def onSearchAsTypeCheckBoxChanged(self, check_state):
self.song_search = False
@ -96,4 +96,4 @@ class SongsTab(SettingsTab):
settings.beginGroup(self.settingsSection)
settings.setValue(u'search as type', QtCore.QVariant(self.song_search))
settings.setValue(u'display songbar', QtCore.QVariant(self.song_bar))
settings.endGroup()
settings.endGroup()

View File

@ -93,41 +93,41 @@ class SongsPlugin(Plugin):
self.SongImportItem.setText(translate(
u'SongsPlugin', u'&Song'))
self.SongImportItem.setToolTip(
translate(u'SongsPlugin',
u'Import songs using the import wizard.'))
translate('SongsPlugin',
'Import songs using the import wizard.'))
import_menu.addAction(self.SongImportItem)
# Songs of Fellowship import menu item - will be removed and the
# functionality will be contained within the import wizard
self.ImportSofItem = QtGui.QAction(import_menu)
self.ImportSofItem.setObjectName(u'ImportSofItem')
self.ImportSofItem.setText(
translate(u'SongsPlugin',
u'Songs of Fellowship (temp menu item)'))
translate('SongsPlugin',
'Songs of Fellowship (temp menu item)'))
self.ImportSofItem.setToolTip(
translate(u'SongsPlugin',
u'Import songs from the VOLS1_2.RTF, sof3words' \
+ u'.rtf and sof4words.rtf supplied with the music books'))
translate('SongsPlugin',
'Import songs from the VOLS1_2.RTF, sof3words' \
+ '.rtf and sof4words.rtf supplied with the music books'))
self.ImportSofItem.setStatusTip(
translate(u'SongsPlugin',
u'Import songs from the VOLS1_2.RTF, sof3words' \
+ u'.rtf and sof4words.rtf supplied with the music books'))
translate('SongsPlugin',
'Import songs from the VOLS1_2.RTF, sof3words' \
+ '.rtf and sof4words.rtf supplied with the music books'))
import_menu.addAction(self.ImportSofItem)
# OpenOffice.org import menu item - will be removed and the
# functionality will be contained within the import wizard
self.ImportOooItem = QtGui.QAction(import_menu)
self.ImportOooItem.setObjectName(u'ImportOooItem')
self.ImportOooItem.setText(
translate(u'SongsPlugin',
u'Generic Document/Presentation Import '
u'(temp menu item)'))
translate('SongsPlugin',
'Generic Document/Presentation Import '
'(temp menu item)'))
self.ImportOooItem.setToolTip(
translate(u'SongsPlugin',
u'Import songs from '
u'Word/Writer/Powerpoint/Impress'))
translate('SongsPlugin',
'Import songs from '
'Word/Writer/Powerpoint/Impress'))
self.ImportOooItem.setStatusTip(
translate(u'SongsPlugin',
u'Import songs from '
u'Word/Writer/Powerpoint/Impress'))
translate('SongsPlugin',
'Import songs from '
'Word/Writer/Powerpoint/Impress'))
import_menu.addAction(self.ImportOooItem)
# Signals and slots
QtCore.QObject.connect(self.SongImportItem,
@ -155,8 +155,8 @@ class SongsPlugin(Plugin):
def onImportSofItemClick(self):
filenames = QtGui.QFileDialog.getOpenFileNames(
None, translate(u'SongsPlugin',
u'Open Songs of Fellowship file'),
None, translate('SongsPlugin',
'Open Songs of Fellowship file'),
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
try:
for filename in filenames:
@ -165,30 +165,30 @@ class SongsPlugin(Plugin):
except:
log.exception('Could not import SoF file')
QtGui.QMessageBox.critical(None,
translate(u'SongsPlugin',
u'Import Error'),
translate(u'SongsPlugin',
u'Error importing Songs of '
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'),
translate('SongsPlugin',
'Import Error'),
translate('SongsPlugin',
'Error importing Songs of '
'Fellowship file.\nOpenOffice.org must be installed'
' and you must be using an unedited copy of the RTF'
' included with the Songs of Fellowship Music Editions'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
Receiver.send_message(u'songs_load_list')
def onImportOooItemClick(self):
filenames = QtGui.QFileDialog.getOpenFileNames(
None, translate(u'SongsPlugin',
u'Open documents or presentations'),
u'', u'All Files(*.*)')
None, translate('SongsPlugin',
'Open documents or presentations'),
'', u'All Files(*.*)')
oooimport = OooImport(self.manager)
oooimport.import_docs(filenames)
Receiver.send_message(u'songs_load_list')
def about(self):
about_text = translate(u'SongsPlugin',
u'<strong>Song Plugin</strong><br />'
u'This plugin allows songs to be managed and displayed.')
about_text = translate('SongsPlugin',
'<strong>Song Plugin</strong><br />'
'This plugin allows songs to be managed and displayed.')
return about_text
def can_delete_theme(self, theme):

View File

@ -42,10 +42,10 @@ class SongUsageDeleteForm(QtGui.QDialog, Ui_SongUsageDeleteDialog):
def accept(self):
ret = QtGui.QMessageBox.question(self,
translate(u'SongsPlugin.SongUsageDeleteForm',
u'Delete Selected Song Usage Events?'),
translate(u'SongsPlugin.SongUsageDeleteForm',
u'Are you sure you want to delete selected Song Usage data?'),
translate('SongsPlugin.SongUsageDeleteForm',
'Delete Selected Song Usage Events?'),
translate('SongsPlugin.SongUsageDeleteForm',
'Are you sure you want to delete selected Song Usage data?'),
QtGui.QMessageBox.StandardButtons(
QtGui.QMessageBox.Ok |
QtGui.QMessageBox.Cancel),

View File

@ -87,11 +87,11 @@ class Ui_SongUsageDetailDialog(object):
def retranslateUi(self, SongUsageDetailDialog):
SongUsageDetailDialog.setWindowTitle(
translate(u'SongsPlugin.AuditDetailDialog',
u'Song Usage Extraction'))
translate('SongsPlugin.AuditDetailDialog',
'Song Usage Extraction'))
self.DateRangeGroupBox.setTitle(
translate('SongsPlugin.AuditDetailDialog', 'Select Date Range'))
self.ToLabel.setText(
translate('SongsPlugin.AuditDetailDialog', 'to'))
self.FileGroupBox.setTitle(
translate('SongsPlugin.AuditDetailDialog', 'Report Location'))
translate('SongsPlugin.AuditDetailDialog', 'Report Location'))

View File

@ -61,8 +61,8 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
def defineOutputLocation(self):
path = QtGui.QFileDialog.getExistingDirectory(self,
translate(u'SongsPlugin.SongUsageDetailForm',
u'Output File Location'),
translate('SongsPlugin.SongUsageDetailForm',
'Output File Location'),
SettingsManager.get_last_dir(self.parent.settingsSection, 1))
path = unicode(path)
if path != u'':

View File

@ -64,20 +64,20 @@ class SongUsagePlugin(Plugin):
#SongUsage Delete
self.SongUsageDelete = QtGui.QAction(tools_menu)
self.SongUsageDelete.setText(
translate(u'SongUsagePlugin',
u'&Delete recorded data'))
translate('SongUsagePlugin',
'&Delete recorded data'))
self.SongUsageDelete.setStatusTip(
translate(u'SongUsagePlugin',
u'Delete song usage to specified date'))
translate('SongUsagePlugin',
'Delete song usage to specified date'))
self.SongUsageDelete.setObjectName(u'SongUsageDelete')
#SongUsage Report
self.SongUsageReport = QtGui.QAction(tools_menu)
self.SongUsageReport.setText(
translate(u'SongUsagePlugin',
u'&Extract recorded data'))
translate('SongUsagePlugin',
'&Extract recorded data'))
self.SongUsageReport.setStatusTip(
translate(u'SongUsagePlugin',
u'Generate report on Song Usage'))
translate('SongUsagePlugin',
'Generate report on Song Usage'))
self.SongUsageReport.setObjectName(u'SongUsageReport')
#SongUsage activation
SongUsageIcon = build_icon(u':/tools/tools_alert.png')
@ -86,10 +86,10 @@ class SongUsagePlugin(Plugin):
self.SongUsageStatus.setCheckable(True)
self.SongUsageStatus.setChecked(False)
self.SongUsageStatus.setText(translate(
u'SongUsagePlugin', u'Song Usage Status'))
'SongUsagePlugin', 'Song Usage Status'))
self.SongUsageStatus.setStatusTip(
translate(u'SongUsagePlugin',
u'Start/Stop live song usage recording'))
translate('SongUsagePlugin',
'Start/Stop live song usage recording'))
self.SongUsageStatus.setShortcut(u'F4')
self.SongUsageStatus.setObjectName(u'SongUsageStatus')
#Add Menus together
@ -163,8 +163,8 @@ class SongUsagePlugin(Plugin):
self.SongUsagedetailform.exec_()
def about(self):
about_text = translate(u'SongUsagePlugin',
u'<b>SongUsage Plugin</b><br>This plugin '
u'records the use of songs and when they have been used during '
u'a live service')
about_text = translate('SongUsagePlugin',
'<b>SongUsage Plugin</b><br>This plugin '
'records the use of songs and when they have been used during '
'a live service')
return about_text