From f5b02659b6c064dfc2bf248ba1c1594c52cd7901 Mon Sep 17 00:00:00 2001 From: Frode Woldsund Date: Wed, 9 Jun 2010 13:11:01 +0200 Subject: [PATCH 1/5] Replaces missed trUtf8('...') -> translate(u'PluginName.ClassName', '...') --- openlp/core/lib/mediamanageritem.py | 72 ++++++++++++--------- openlp/core/ui/splashscreen.py | 5 +- openlp/plugins/bibles/bibleplugin.py | 6 +- openlp/plugins/songs/songsplugin.py | 46 +++++++------ openlp/plugins/songusage/songusageplugin.py | 21 ++++-- 5 files changed, 92 insertions(+), 58 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 8bfefceb0..f7b574be1 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -30,7 +30,7 @@ import os from PyQt4 import QtCore, QtGui from openlp.core.lib import contextMenuAction, contextMenuSeparator, \ - SettingsManager, OpenLPToolbar, ServiceItem, build_icon + SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate log = logging.getLogger(__name__) @@ -210,49 +210,54 @@ class MediaManagerItem(QtGui.QWidget): if self.hasImportIcon: self.addToolbarButton( u'Import %s' % self.PluginNameShort, - u'%s %s' % (self.trUtf8('Import a'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'Import a'), + self.PluginNameVisible), u':/general/general_import.png', self.onImportClick) ## File Button ## if self.hasFileIcon: self.addToolbarButton( u'Load %s' % self.PluginNameShort, - u'%s %s' % (self.trUtf8('Load a new'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'Load a new'), + self.PluginNameVisible), u':/general/general_open.png', self.onFileClick) ## New Button ## if self.hasNewIcon: self.addToolbarButton( u'New %s' % self.PluginNameShort, - u'%s %s' % (self.trUtf8('Add a new'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'Add a new'), + self.PluginNameVisible), u':/general/general_new.png', self.onNewClick) ## Edit Button ## if self.hasEditIcon: self.addToolbarButton( u'Edit %s' % self.PluginNameShort, - u'%s %s' % (self.trUtf8('Edit the selected'), + u'%s %s' % ( + translate(u'MediaManagerItem', u'Edit the selected'), self.PluginNameVisible), u':/general/general_edit.png', self.onEditClick) ## Delete Button ## if self.hasDeleteIcon: self.addToolbarButton( u'Delete %s' % self.PluginNameShort, - self.trUtf8('Delete the selected item'), + translate(u'MediaManagerItem', u'Delete the selected item'), u':/general/general_delete.png', self.onDeleteClick) ## Separator Line ## self.addToolbarSeparator() ## Preview ## self.addToolbarButton( u'Preview %s' % self.PluginNameShort, - self.trUtf8('Preview the selected item'), + translate(u'MediaManagerItem', u'Preview the selected item'), u':/general/general_preview.png', self.onPreviewClick) ## Live Button ## self.addToolbarButton( 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) ## Add to service Button ## self.addToolbarButton( u'Add %s to Service' % self.PluginNameShort, - self.trUtf8('Add the selected item(s) to the service'), + translate(u'MediaManagerItem', + u'Add the selected item(s) to the service'), u':/general/general_add.png', self.onAddClick) def addListViewToToolBar(self): @@ -274,34 +279,39 @@ class MediaManagerItem(QtGui.QWidget): self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_edit.png', - u'%s %s' % (self.trUtf8('&Edit'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'&Edit'), + self.PluginNameVisible), self.onEditClick)) self.ListView.addAction(contextMenuSeparator(self.ListView)) if self.hasDeleteIcon: self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_delete.png', - u'%s %s' % (self.trUtf8('&Delete'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'&Delete'), + self.PluginNameVisible), self.onDeleteClick)) self.ListView.addAction(contextMenuSeparator(self.ListView)) self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_preview.png', - u'%s %s' % (self.trUtf8('&Preview'), self.PluginNameVisible), + u'%s %s' % (translate(u'MediaManagerItem', u'&Preview'), + self.PluginNameVisible), self.onPreviewClick)) self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_live.png', - self.trUtf8('&Show Live'), self.onLiveClick)) + translate(u'MediaManagerItem', u'&Show Live'), self.onLiveClick)) self.ListView.addAction( contextMenuAction( 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: self.ListView.addAction( contextMenuAction( 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)) QtCore.QObject.connect( self.ListView, QtCore.SIGNAL(u'doubleClicked(QModelIndex)'), @@ -394,8 +404,9 @@ class MediaManagerItem(QtGui.QWidget): def onPreviewClick(self): if not self.ListView.selectedIndexes() and not self.remoteTriggered: QtGui.QMessageBox.information(self, - self.trUtf8('No Items Selected'), - self.trUtf8('You must select one or more items.')) + translate(u'MediaManagerItem', u'No Items Selected'), + translate(u'MediaManagerItem', + u'You must select one or more items.')) else: log.debug(self.PluginNameShort + u' Preview requested') service_item = self.buildServiceItem() @@ -406,8 +417,9 @@ class MediaManagerItem(QtGui.QWidget): def onLiveClick(self): if not self.ListView.selectedIndexes(): QtGui.QMessageBox.information(self, - self.trUtf8('No Items Selected'), - self.trUtf8('You must select one or more items.')) + translate(u'MediaManagerItem', u'No Items Selected'), + translate(u'MediaManagerItem', + u'You must select one or more items.')) else: log.debug(self.PluginNameShort + u' Live requested') service_item = self.buildServiceItem() @@ -418,8 +430,9 @@ class MediaManagerItem(QtGui.QWidget): def onAddClick(self): if not self.ListView.selectedIndexes() and not self.remoteTriggered: QtGui.QMessageBox.information(self, - self.trUtf8('No Items Selected'), - self.trUtf8('You must select one or more items.')) + translate(u'MediaManagerItem', u'No Items Selected'), + translate(u'MediaManagerItem', + u'You must select one or more items.')) else: #Is it posssible to process multiple list items to generate multiple #service items? @@ -441,16 +454,17 @@ class MediaManagerItem(QtGui.QWidget): def onAddEditClick(self): if not self.ListView.selectedIndexes() and not self.remoteTriggered: QtGui.QMessageBox.information(self, - self.trUtf8('No items selected'), - self.trUtf8('You must select one or more items')) + translate(u'MediaManagerItem', u'No items selected'), + translate(u'MediaManagerItem', + u'You must select one or more items')) else: log.debug(self.PluginNameShort + u' Add requested') service_item = self.parent.service_manager.getServiceItem() if not service_item: QtGui.QMessageBox.information(self, - self.trUtf8('No Service Item Selected'), - self.trUtf8( - 'You must select an existing service item to add to.')) + translate(u'MediaManagerItem', u'No Service Item Selected'), + translate(u'MediaManagerItem', + u'You must select an existing service item to add to.')) elif self.title.lower() == service_item.name.lower(): self.generateSlideData(service_item) self.parent.service_manager.addServiceItem(service_item, @@ -458,9 +472,9 @@ class MediaManagerItem(QtGui.QWidget): else: #Turn off the remote edit update message indicator QtGui.QMessageBox.information(self, - self.trUtf8('Invalid Service Item'), - self.trUtf8(unicode( - 'You must select a %s service item.' % self.title))) + translate(u'MediaManagerItem', u'Invalid Service Item'), + translate(unicode(u'MediaManagerItem', + u'You must select a %s service item.' % self.title))) def buildServiceItem(self, item=None): """ diff --git a/openlp/core/ui/splashscreen.py b/openlp/core/ui/splashscreen.py index 10cea5a11..b13c3c8c4 100644 --- a/openlp/core/ui/splashscreen.py +++ b/openlp/core/ui/splashscreen.py @@ -30,7 +30,8 @@ class SplashScreen(object): def __init__(self, version): self.splash_screen = QtGui.QSplashScreen() self.setupUi() - self.message = self.splash_screen.trUtf8('Starting')\ + self.message = self.splash_screen.translate( + u'Splashscreen', u'Starting')\ + '..... ' + version def setupUi(self): @@ -58,7 +59,7 @@ class SplashScreen(object): def retranslateUi(self): self.splash_screen.setWindowTitle( - self.splash_screen.trUtf8('Splash Screen')) + self.splash_screen.translate(u'Splashscreen', u'Splash Screen')) def show(self): self.splash_screen.show() diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index ca018cabd..cfc6aa361 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -70,7 +70,8 @@ class BiblePlugin(Plugin): self.ImportBibleItem = QtGui.QAction(import_menu) self.ImportBibleItem.setObjectName(u'ImportBibleItem') import_menu.addAction(self.ImportBibleItem) - self.ImportBibleItem.setText(import_menu.trUtf8('&Bible')) + self.ImportBibleItem.setText( + import_menu.translate(u'BiblesPlugin.BiblePlugin', u'&Bible')) # Signals and slots QtCore.QObject.connect(self.ImportBibleItem, QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick) @@ -80,7 +81,8 @@ class BiblePlugin(Plugin): self.ExportBibleItem = QtGui.QAction(export_menu) self.ExportBibleItem.setObjectName(u'ExportBibleItem') export_menu.addAction(self.ExportBibleItem) - self.ExportBibleItem.setText(export_menu.trUtf8('&Bible')) + self.ExportBibleItem.setText(export_menu.translate( + u'BiblesPlugin.BiblePlugin', u'&Bible')) self.ExportBibleItem.setVisible(False) def onBibleImportClick(self): diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index 993b18bb9..f311d7072 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -94,36 +94,44 @@ class SongsPlugin(Plugin): # Main song import menu item - will eventually be the only one self.SongImportItem = QtGui.QAction(import_menu) self.SongImportItem.setObjectName(u'SongImportItem') - self.SongImportItem.setText(import_menu.trUtf8('&Song')) + self.SongImportItem.setText(import_menu.translate( + u'SongsPlugin.SongsPlugin', u'&Song')) self.SongImportItem.setToolTip( - import_menu.trUtf8('Import songs using the import wizard.')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'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( - import_menu.trUtf8('Songs of Fellowship (temp menu item)')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Songs of Fellowship (temp menu item)')) self.ImportSofItem.setToolTip( - import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \ - + '.rtf and sof4words.rtf supplied with the music books')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Import songs from the VOLS1_2.RTF, sof3words' \ + + u'.rtf and sof4words.rtf supplied with the music books')) self.ImportSofItem.setStatusTip( - import_menu.trUtf8('Import songs from the VOLS1_2.RTF, sof3words' \ - + '.rtf and sof4words.rtf supplied with the music books')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Import songs from the VOLS1_2.RTF, sof3words' \ + + u'.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( - import_menu.trUtf8('Generic Document/Presentation Import ' - '(temp menu item)')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Generic Document/Presentation Import ' + u'(temp menu item)')) self.ImportOooItem.setToolTip( - import_menu.trUtf8('Import songs from ' - 'Word/Writer/Powerpoint/Impress')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Import songs from ' + u'Word/Writer/Powerpoint/Impress')) self.ImportOooItem.setStatusTip( - import_menu.trUtf8('Import songs from ' - 'Word/Writer/Powerpoint/Impress')) + import_menu.translate(u'SongsPlugin.SongsPlugin', + u'Import songs from ' + u'Word/Writer/Powerpoint/Impress')) import_menu.addAction(self.ImportOooItem) # Signals and slots QtCore.QObject.connect(self.SongImportItem, @@ -161,11 +169,13 @@ class SongsPlugin(Plugin): except: log.exception('Could not import SoF file') QtGui.QMessageBox.critical(None, - self.ImportSongMenu.trUtf8('Import Error'), - self.ImportSongMenu.trUtf8('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'), + self.ImportSongMenu.translate(u'SongsPlugin.SongsPlugin', + u'Import Error'), + self.ImportSongMenu.translate(u'SongsPlugin.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'), QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok), QtGui.QMessageBox.Ok) Receiver.send_message(u'songs_load_list') diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index 6cbb08e1a..35d86a16a 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -59,20 +59,25 @@ class SongUsagePlugin(Plugin): self.toolsMenu = tools_menu self.SongUsageMenu = QtGui.QMenu(tools_menu) self.SongUsageMenu.setObjectName(u'SongUsageMenu') - self.SongUsageMenu.setTitle(tools_menu.trUtf8('&Song Usage')) + self.SongUsageMenu.setTitle(tools_menu.translate( + u'SongUsagePlugin.SongUsagePlugin', u'&Song Usage')) #SongUsage Delete self.SongUsageDelete = QtGui.QAction(tools_menu) self.SongUsageDelete.setText( - tools_menu.trUtf8('&Delete recorded data')) + tools_menu.translate(u'SongUsagePlugin.SongUsagePlugin', + u'&Delete recorded data')) self.SongUsageDelete.setStatusTip( - tools_menu.trUtf8('Delete song usage to specified date')) + tools_menu.translate(u'SongUsagePlugin.SongUsagePlugin', + u'Delete song usage to specified date')) self.SongUsageDelete.setObjectName(u'SongUsageDelete') #SongUsage Report self.SongUsageReport = QtGui.QAction(tools_menu) self.SongUsageReport.setText( - tools_menu.trUtf8('&Extract recorded data')) + tools_menu.translate(u'SongUsagePlugin.SongUsagePlugin', + u'&Extract recorded data')) self.SongUsageReport.setStatusTip( - tools_menu.trUtf8('Generate report on Song Usage')) + tools_menu.translate(u'SongUsagePlugin.SongUsagePlugin', + u'Generate report on Song Usage')) self.SongUsageReport.setObjectName(u'SongUsageReport') #SongUsage activation SongUsageIcon = build_icon(u':/tools/tools_alert.png') @@ -80,9 +85,11 @@ class SongUsagePlugin(Plugin): self.SongUsageStatus.setIcon(SongUsageIcon) self.SongUsageStatus.setCheckable(True) self.SongUsageStatus.setChecked(False) - self.SongUsageStatus.setText(tools_menu.trUtf8('Song Usage Status')) + self.SongUsageStatus.setText(tools_menu.translate( + u'SongUsagePlugin.SongUsagePlugin', u'Song Usage Status')) self.SongUsageStatus.setStatusTip( - tools_menu.trUtf8('Start/Stop live song usage recording')) + tools_menu.translate(u'SongUsagePlugin.SongUsagePlugin', + u'Start/Stop live song usage recording')) self.SongUsageStatus.setShortcut(u'F4') self.SongUsageStatus.setObjectName(u'SongUsageStatus') #Add Menus together From 752e06383767f75535fe6446183a1b1560808e54 Mon Sep 17 00:00:00 2001 From: Frode Woldsund Date: Fri, 11 Jun 2010 09:36:08 +0200 Subject: [PATCH 2/5] Fixed doublespace in import --- openlp/core/lib/mediamanageritem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index f7b574be1..c9725ab62 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -30,7 +30,7 @@ import os from PyQt4 import QtCore, QtGui from openlp.core.lib import contextMenuAction, contextMenuSeparator, \ - SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate + SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate log = logging.getLogger(__name__) From 40fbf5ad6369590adfe1120c4323a6ac0a1c5835 Mon Sep 17 00:00:00 2001 From: Frode Woldsund Date: Thu, 17 Jun 2010 00:11:11 +0200 Subject: [PATCH 3/5] Fixed syntax in translate() function that contained u'%s' and % stuff --- openlp/core/lib/mediamanageritem.py | 53 ++++++++++++++++------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 1d2c6bd41..0715a0c7f 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -208,43 +208,49 @@ class MediaManagerItem(QtGui.QWidget): ## Import Button ## if self.hasImportIcon: self.addToolbarButton( - u'Import %s' % self.PluginNameShort, - u'%s %s' % (translate(u'MediaManagerItem', u'Import a'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'Import %s')) % \ + self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Import a %s')) % \ + self.PluginNameVisible, u':/general/general_import.png', self.onImportClick) ## File Button ## if self.hasFileIcon: self.addToolbarButton( - u'Load %s' % self.PluginNameShort, - u'%s %s' % (translate(u'MediaManagerItem', u'Load a new'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'Load %s')) % \ + self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Load a new %s')) % \ + self.PluginNameVisible, u':/general/general_open.png', self.onFileClick) ## New Button ## if self.hasNewIcon: self.addToolbarButton( - u'New %s' % self.PluginNameShort, - u'%s %s' % (translate(u'MediaManagerItem', u'Add a new'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'New %s')) % \ + self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Add a new %s')) % \ + self.PluginNameVisible, u':/general/general_new.png', self.onNewClick) ## Edit Button ## if self.hasEditIcon: self.addToolbarButton( - u'Edit %s' % self.PluginNameShort, - u'%s %s' % ( - translate(u'MediaManagerItem', u'Edit the selected'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'Edit %s')) % \ + self.PluginNameShort, + unicode(translate( + u'MediaManagerItem', u'Edit the selected %s')) % \ + self.PluginNameVisible, u':/general/general_edit.png', self.onEditClick) ## Delete Button ## if self.hasDeleteIcon: self.addToolbarButton( - u'Delete %s' % self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Delete %s')) % \ + self.PluginNameShort, translate(u'MediaManagerItem', u'Delete the selected item'), u':/general/general_delete.png', self.onDeleteClick) ## Separator Line ## self.addToolbarSeparator() ## Preview ## self.addToolbarButton( - u'Preview %s' % self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Preview %s')) % \ + self.PluginNameShort, translate(u'MediaManagerItem', u'Preview the selected item'), u':/general/general_preview.png', self.onPreviewClick) ## Live Button ## @@ -254,7 +260,8 @@ class MediaManagerItem(QtGui.QWidget): u':/general/general_live.png', self.onLiveClick) ## Add to service Button ## self.addToolbarButton( - u'Add %s to Service' % self.PluginNameShort, + unicode(translate(u'MediaManagerItem', u'Add %s to Service')) % \ + self.PluginNameShort, translate(u'MediaManagerItem', u'Add the selected item(s) to the service'), u':/general/general_add.png', self.onAddClick) @@ -278,23 +285,23 @@ class MediaManagerItem(QtGui.QWidget): self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_edit.png', - u'%s %s' % (translate(u'MediaManagerItem', u'&Edit'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'&Edit %s')) % \ + self.PluginNameVisible, self.onEditClick)) self.ListView.addAction(contextMenuSeparator(self.ListView)) if self.hasDeleteIcon: self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_delete.png', - u'%s %s' % (translate(u'MediaManagerItem', u'&Delete'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'&Delete %s')) % \ + self.PluginNameVisible, self.onDeleteClick)) self.ListView.addAction(contextMenuSeparator(self.ListView)) self.ListView.addAction( contextMenuAction( self.ListView, u':/general/general_preview.png', - u'%s %s' % (translate(u'MediaManagerItem', u'&Preview'), - self.PluginNameVisible), + unicode(translate(u'MediaManagerItem', u'&Preview %s')) % \ + self.PluginNameVisible, self.onPreviewClick)) self.ListView.addAction( contextMenuAction( @@ -471,7 +478,7 @@ class MediaManagerItem(QtGui.QWidget): QtGui.QMessageBox.information(self, translate(u'MediaManagerItem', u'Invalid Service Item'), translate(unicode(u'MediaManagerItem', - u'You must select a %s service item.' % self.title))) + u'You must select a %s service item.')) % self.title) def buildServiceItem(self, item=None): """ From 99d97a95a31aa1b4e5b88902b8c7d2939f98650e Mon Sep 17 00:00:00 2001 From: Frode Woldsund Date: Thu, 17 Jun 2010 00:17:50 +0200 Subject: [PATCH 4/5] removed a "enter-space" --- openlp/core/lib/mediamanageritem.py | 1 - 1 file changed, 1 deletion(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index fae9143b3..93cf1f92c 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -31,7 +31,6 @@ from PyQt4 import QtCore, QtGui from openlp.core.lib import context_menu_action, context_menu_separator, \ SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate - log = logging.getLogger(__name__) class MediaManagerItem(QtGui.QWidget): From 7c6b5c0b9991ce4814e5f71b300a269927548979 Mon Sep 17 00:00:00 2001 From: Frode Woldsund Date: Thu, 17 Jun 2010 14:02:18 +0200 Subject: [PATCH 5/5] translate(pluginName.pluginName) -> translate(pluginName) and removed some spaces --- openlp/core/lib/mediamanageritem.py | 8 +++--- openlp/plugins/alerts/alertsplugin.py | 6 ++--- openlp/plugins/bibles/bibleplugin.py | 6 ++--- openlp/plugins/custom/customplugin.py | 2 +- openlp/plugins/images/imageplugin.py | 2 +- openlp/plugins/media/mediaplugin.py | 2 +- .../presentations/presentationplugin.py | 2 +- openlp/plugins/remotes/remoteplugin.py | 2 +- openlp/plugins/songs/songsplugin.py | 26 +++++++++---------- openlp/plugins/songusage/songusageplugin.py | 16 ++++++------ 10 files changed, 36 insertions(+), 36 deletions(-) diff --git a/openlp/core/lib/mediamanageritem.py b/openlp/core/lib/mediamanageritem.py index 93cf1f92c..516dd6f44 100644 --- a/openlp/core/lib/mediamanageritem.py +++ b/openlp/core/lib/mediamanageritem.py @@ -224,7 +224,7 @@ class MediaManagerItem(QtGui.QWidget): ## New Button ## if self.hasNewIcon: self.addToolbarButton( - unicode(translate(u'MediaManagerItem', u'New %s')) % \ + unicode(translate(u'MediaManagerItem', u'New %s')) % \ self.PluginNameShort, unicode(translate(u'MediaManagerItem', u'Add a new %s')) % \ self.PluginNameVisible, @@ -232,7 +232,7 @@ class MediaManagerItem(QtGui.QWidget): ## Edit Button ## if self.hasEditIcon: self.addToolbarButton( - unicode(translate(u'MediaManagerItem', u'Edit %s')) % \ + unicode(translate(u'MediaManagerItem', u'Edit %s')) % \ self.PluginNameShort, unicode(translate( u'MediaManagerItem', u'Edit the selected %s')) % \ @@ -241,7 +241,7 @@ class MediaManagerItem(QtGui.QWidget): ## Delete Button ## if self.hasDeleteIcon: self.addToolbarButton( - unicode(translate(u'MediaManagerItem', u'Delete %s')) % \ + unicode(translate(u'MediaManagerItem', u'Delete %s')) % \ self.PluginNameShort, translate(u'MediaManagerItem', u'Delete the selected item'), u':/general/general_delete.png', self.onDeleteClick) @@ -260,7 +260,7 @@ class MediaManagerItem(QtGui.QWidget): u':/general/general_live.png', self.onLiveClick) ## Add to service Button ## self.addToolbarButton( - unicode(translate(u'MediaManagerItem', u'Add %s to Service')) % \ + unicode(translate(u'MediaManagerItem', u'Add %s to Service')) % \ self.PluginNameShort, translate(u'MediaManagerItem', u'Add the selected item(s) to the service'), diff --git a/openlp/plugins/alerts/alertsplugin.py b/openlp/plugins/alerts/alertsplugin.py index 7474a0564..eb6d1f116 100644 --- a/openlp/plugins/alerts/alertsplugin.py +++ b/openlp/plugins/alerts/alertsplugin.py @@ -64,9 +64,9 @@ class alertsPlugin(Plugin): self.toolsAlertItem.setIcon(AlertIcon) self.toolsAlertItem.setObjectName(u'toolsAlertItem') self.toolsAlertItem.setText( - translate(u'AlertsPlugin.AlertsPlugin', u'&Alert')) + translate(u'AlertsPlugin', u'&Alert')) 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.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem) QtCore.QObject.connect(self.toolsAlertItem, @@ -94,7 +94,7 @@ class alertsPlugin(Plugin): self.alertForm.exec_() def about(self): - about_text = translate(u'AlertsPlugin.AlertsPlugin', + about_text = translate(u'AlertsPlugin', u'Alerts Plugin
This plugin ' u'controls the displaying of alerts on the presentations screen') return about_text diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py index bfaa535a9..f3998e5a5 100644 --- a/openlp/plugins/bibles/bibleplugin.py +++ b/openlp/plugins/bibles/bibleplugin.py @@ -71,7 +71,7 @@ class BiblePlugin(Plugin): self.ImportBibleItem.setObjectName(u'ImportBibleItem') import_menu.addAction(self.ImportBibleItem) self.ImportBibleItem.setText( - translate(u'BiblesPlugin.BiblePlugin', u'&Bible')) + translate(u'BiblePlugin', u'&Bible')) # Signals and slots QtCore.QObject.connect(self.ImportBibleItem, QtCore.SIGNAL(u'triggered()'), self.onBibleImportClick) @@ -82,7 +82,7 @@ class BiblePlugin(Plugin): self.ExportBibleItem.setObjectName(u'ExportBibleItem') export_menu.addAction(self.ExportBibleItem) self.ExportBibleItem.setText(translate( - u'BiblesPlugin.BiblePlugin', u'&Bible')) + u'BiblePlugin', u'&Bible')) self.ExportBibleItem.setVisible(False) def onBibleImportClick(self): @@ -90,7 +90,7 @@ class BiblePlugin(Plugin): self.media_item.onImportClick() def about(self): - about_text = translate(u'BiblesPlugin.BiblePlugin', + about_text = translate(u'BiblePlugin', u'Bible Plugin
This ' u'plugin allows bible verses from different sources to be ' u'displayed on the screen during the service.') diff --git a/openlp/plugins/custom/customplugin.py b/openlp/plugins/custom/customplugin.py index 9ae208a28..2ad95b026 100644 --- a/openlp/plugins/custom/customplugin.py +++ b/openlp/plugins/custom/customplugin.py @@ -67,7 +67,7 @@ class CustomPlugin(Plugin): self.remove_toolbox_item() def about(self): - about_text = translate(u'CustomPlugin.CustomPlugin', + about_text = translate(u'CustomPlugin', u'Custom Plugin
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 ' diff --git a/openlp/plugins/images/imageplugin.py b/openlp/plugins/images/imageplugin.py index ca375ed6c..343a87491 100644 --- a/openlp/plugins/images/imageplugin.py +++ b/openlp/plugins/images/imageplugin.py @@ -56,7 +56,7 @@ class ImagePlugin(Plugin): return ImageMediaItem(self, self.icon, self.name) def about(self): - about_text = translate(u'ImagePlugin.ImagePlugin', u'Image Plugin' + about_text = translate(u'ImagePlugin', u'Image Plugin' u'
Allows images of all types to be displayed. If a number ' u'of images are selected together and presented on the live ' u'controller it is possible to turn them into a timed loop.' diff --git a/openlp/plugins/media/mediaplugin.py b/openlp/plugins/media/mediaplugin.py index 7c773c5a7..7f6e54472 100644 --- a/openlp/plugins/media/mediaplugin.py +++ b/openlp/plugins/media/mediaplugin.py @@ -81,7 +81,7 @@ class MediaPlugin(Plugin): return MediaMediaItem(self, self.icon, self.name) def about(self): - about_text = translate(u'MediaPlugin.MediaPlugin', + about_text = translate(u'MediaPlugin', u'Media Plugin
This plugin ' u'allows the playing of audio and video media') return about_text diff --git a/openlp/plugins/presentations/presentationplugin.py b/openlp/plugins/presentations/presentationplugin.py index 036e8fc42..f59968287 100644 --- a/openlp/plugins/presentations/presentationplugin.py +++ b/openlp/plugins/presentations/presentationplugin.py @@ -108,7 +108,7 @@ class PresentationPlugin(Plugin): return False def about(self): - about_text = translate(u'PresentationPlugin.PresentationPlugin', + about_text = translate(u'PresentationPlugin', u'Presentation Plugin
Delivers ' u'the ability to show presentations using a number of different ' u'programs. The choice of available presentation programs is ' diff --git a/openlp/plugins/remotes/remoteplugin.py b/openlp/plugins/remotes/remoteplugin.py index e3d68a9a3..c839f1595 100644 --- a/openlp/plugins/remotes/remoteplugin.py +++ b/openlp/plugins/remotes/remoteplugin.py @@ -69,7 +69,7 @@ class RemotesPlugin(Plugin): """ Information about this plugin """ - about_text = translate(u'RemotePlugin.RemotePlugin', + about_text = translate(u'RemotePlugin', u'Remote Plugin
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
' diff --git a/openlp/plugins/songs/songsplugin.py b/openlp/plugins/songs/songsplugin.py index dad471043..21ec610b2 100644 --- a/openlp/plugins/songs/songsplugin.py +++ b/openlp/plugins/songs/songsplugin.py @@ -95,9 +95,9 @@ class SongsPlugin(Plugin): self.SongImportItem = QtGui.QAction(import_menu) self.SongImportItem.setObjectName(u'SongImportItem') self.SongImportItem.setText(translate( - u'SongsPlugin.SongsPlugin', u'&Song')) + u'SongsPlugin', u'&Song')) self.SongImportItem.setToolTip( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import songs using the import wizard.')) import_menu.addAction(self.SongImportItem) # Songs of Fellowship import menu item - will be removed and the @@ -105,14 +105,14 @@ class SongsPlugin(Plugin): self.ImportSofItem = QtGui.QAction(import_menu) self.ImportSofItem.setObjectName(u'ImportSofItem') self.ImportSofItem.setText( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Songs of Fellowship (temp menu item)')) self.ImportSofItem.setToolTip( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import songs from the VOLS1_2.RTF, sof3words' \ + u'.rtf and sof4words.rtf supplied with the music books')) self.ImportSofItem.setStatusTip( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import songs from the VOLS1_2.RTF, sof3words' \ + u'.rtf and sof4words.rtf supplied with the music books')) import_menu.addAction(self.ImportSofItem) @@ -121,15 +121,15 @@ class SongsPlugin(Plugin): self.ImportOooItem = QtGui.QAction(import_menu) self.ImportOooItem.setObjectName(u'ImportOooItem') self.ImportOooItem.setText( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Generic Document/Presentation Import ' u'(temp menu item)')) self.ImportOooItem.setToolTip( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import songs from ' u'Word/Writer/Powerpoint/Impress')) self.ImportOooItem.setStatusTip( - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import songs from ' u'Word/Writer/Powerpoint/Impress')) import_menu.addAction(self.ImportOooItem) @@ -159,7 +159,7 @@ class SongsPlugin(Plugin): def onImportSofItemClick(self): filenames = QtGui.QFileDialog.getOpenFileNames( - None, translate(u'SongsPlugin.Songsplugin', + None, translate(u'SongsPlugin', u'Open Songs of Fellowship file'), u'', u'Songs of Fellowship file (*.rtf *.RTF)') try: @@ -169,9 +169,9 @@ class SongsPlugin(Plugin): except: log.exception('Could not import SoF file') QtGui.QMessageBox.critical(None, - translate(u'SongsPlugin.SongsPlugin', + translate(u'SongsPlugin', u'Import Error'), - translate(u'SongsPlugin.SongsPlugin', + 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' @@ -182,7 +182,7 @@ class SongsPlugin(Plugin): def onImportOooItemClick(self): filenames = QtGui.QFileDialog.getOpenFileNames( - None, translate(u'SongsPlugin.Songsplugin', + None, translate(u'SongsPlugin', u'Open documents or presentations'), u'', u'All Files(*.*)') oooimport = OooImport(self.manager) @@ -190,7 +190,7 @@ class SongsPlugin(Plugin): Receiver.send_message(u'songs_load_list') def about(self): - about_text = translate(u'SongsPlugin.Songsplugin', + about_text = translate(u'SongsPlugin', u'Song Plugin
' u'This plugin allows songs to be managed and displayed.') return about_text diff --git a/openlp/plugins/songusage/songusageplugin.py b/openlp/plugins/songusage/songusageplugin.py index 7cc75f764..0b3d7971c 100644 --- a/openlp/plugins/songusage/songusageplugin.py +++ b/openlp/plugins/songusage/songusageplugin.py @@ -60,23 +60,23 @@ class SongUsagePlugin(Plugin): self.SongUsageMenu = QtGui.QMenu(tools_menu) self.SongUsageMenu.setObjectName(u'SongUsageMenu') self.SongUsageMenu.setTitle(translate( - u'SongUsagePlugin.SongUsagePlugin', u'&Song Usage')) + u'SongUsagePlugin', u'&Song Usage')) #SongUsage Delete self.SongUsageDelete = QtGui.QAction(tools_menu) self.SongUsageDelete.setText( - translate(u'SongUsagePlugin.SongUsagePlugin', + translate(u'SongUsagePlugin', u'&Delete recorded data')) self.SongUsageDelete.setStatusTip( - translate(u'SongUsagePlugin.SongUsagePlugin', + translate(u'SongUsagePlugin', u'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.SongUsagePlugin', + translate(u'SongUsagePlugin', u'&Extract recorded data')) self.SongUsageReport.setStatusTip( - translate(u'SongUsagePlugin.SongUsagePlugin', + translate(u'SongUsagePlugin', u'Generate report on Song Usage')) self.SongUsageReport.setObjectName(u'SongUsageReport') #SongUsage activation @@ -86,9 +86,9 @@ class SongUsagePlugin(Plugin): self.SongUsageStatus.setCheckable(True) self.SongUsageStatus.setChecked(False) self.SongUsageStatus.setText(translate( - u'SongUsagePlugin.SongUsagePlugin', u'Song Usage Status')) + u'SongUsagePlugin', u'Song Usage Status')) self.SongUsageStatus.setStatusTip( - translate(u'SongUsagePlugin.SongUsagePlugin', + translate(u'SongUsagePlugin', u'Start/Stop live song usage recording')) self.SongUsageStatus.setShortcut(u'F4') self.SongUsageStatus.setObjectName(u'SongUsageStatus') @@ -163,7 +163,7 @@ class SongUsagePlugin(Plugin): self.SongUsagedetailform.exec_() def about(self): - about_text = translate(u'SongsPlugin.SongUsagePlugin', + about_text = translate(u'SongUsagePlugin', u'SongUsage Plugin
This plugin ' u'records the use of songs and when they have been used during ' u'a live service')