This commit is contained in:
Jon Tibble 2011-02-12 18:43:23 +00:00
parent 34cf16fd06
commit 0561fa2525
3 changed files with 13 additions and 11 deletions

View File

@ -52,13 +52,14 @@ class UiStrings(object):
Delete = translate('OpenLP.Ui', '&Delete') Delete = translate('OpenLP.Ui', '&Delete')
DeleteSelect = unicode(translate('OpenLP.Ui', 'Delete the selected %s.')) DeleteSelect = unicode(translate('OpenLP.Ui', 'Delete the selected %s.'))
DeleteType = unicode(translate('OpenLP.Ui', 'Delete %s')) DeleteType = unicode(translate('OpenLP.Ui', 'Delete %s'))
AmpDeleteType = unicode(translate('OpenLP.Ui', '&Delete %s'))
Edit = translate('OpenLP.Ui', '&Edit') Edit = translate('OpenLP.Ui', '&Edit')
EditSelect = unicode(translate('OpenLP.Ui', 'Edit the selected %s.')) EditSelect = unicode(translate('OpenLP.Ui', 'Edit the selected %s.'))
EditType = unicode(translate('OpenLP.Ui', 'Edit %s')) EditType = unicode(translate('OpenLP.Ui', '&Edit %s'))
EmptyField = translate('OpenLP.Ui', 'Empty Field') EmptyField = translate('OpenLP.Ui', 'Empty Field')
Error = translate('OpenLP.Ui', 'Error') Error = translate('OpenLP.Ui', 'Error')
Export = translate('OpenLP.Ui', 'Export') Export = translate('OpenLP.Ui', 'Export')
ExportType = unicode(translate('OpenLP.Ui', 'Export %s')) ExportType = unicode(translate('OpenLP.Ui', '&Export %s'))
Image = translate('OpenLP.Ui', 'Image') Image = translate('OpenLP.Ui', 'Image')
Import = translate('OpenLP.Ui', 'Import') Import = translate('OpenLP.Ui', 'Import')
ImportType = unicode(translate('OpenLP.Ui', 'Import %s')) ImportType = unicode(translate('OpenLP.Ui', 'Import %s'))

View File

@ -105,7 +105,7 @@ class ThemeManager(QtGui.QWidget):
# build the context menu # build the context menu
self.menu = QtGui.QMenu() self.menu = QtGui.QMenu()
self.editAction = self.menu.addAction( self.editAction = self.menu.addAction(
translate('OpenLP.ThemeManager', '&Edit Theme')) UiStrings.EditType % UiStrings.Theme)
self.editAction.setIcon(build_icon(u':/themes/theme_edit.png')) self.editAction.setIcon(build_icon(u':/themes/theme_edit.png'))
self.copyAction = self.menu.addAction( self.copyAction = self.menu.addAction(
translate('OpenLP.ThemeManager', '&Copy Theme')) translate('OpenLP.ThemeManager', '&Copy Theme'))
@ -114,14 +114,14 @@ class ThemeManager(QtGui.QWidget):
translate('OpenLP.ThemeManager', '&Rename Theme')) translate('OpenLP.ThemeManager', '&Rename Theme'))
self.renameAction.setIcon(build_icon(u':/themes/theme_edit.png')) self.renameAction.setIcon(build_icon(u':/themes/theme_edit.png'))
self.deleteAction = self.menu.addAction( self.deleteAction = self.menu.addAction(
translate('OpenLP.ThemeManager', '&Delete Theme')) UiStrings.AmpDeleteType % UiStrings.Theme)
self.deleteAction.setIcon(build_icon(u':/general/general_delete.png')) self.deleteAction.setIcon(build_icon(u':/general/general_delete.png'))
self.separator = self.menu.addSeparator() self.separator = self.menu.addSeparator()
self.globalAction = self.menu.addAction( self.globalAction = self.menu.addAction(
translate('OpenLP.ThemeManager', 'Set As &Global Default')) translate('OpenLP.ThemeManager', 'Set As &Global Default'))
self.globalAction.setIcon(build_icon(u':/general/general_export.png')) self.globalAction.setIcon(build_icon(u':/general/general_export.png'))
self.exportAction = self.menu.addAction( self.exportAction = self.menu.addAction(
translate('OpenLP.ThemeManager', '&Export Theme')) UiStrings.ExportType % UiStrings.Theme)
self.exportAction.setIcon(build_icon(u':/general/general_export.png')) self.exportAction.setIcon(build_icon(u':/general/general_export.png'))
# Signals # Signals
QtCore.QObject.connect(self.themeListWidget, QtCore.QObject.connect(self.themeListWidget,

View File

@ -29,9 +29,10 @@ from PyQt4 import QtGui, QtCore
from sqlalchemy.sql import and_ from sqlalchemy.sql import and_
from openlp.core.lib import Receiver, translate from openlp.core.lib import Receiver, translate
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import UiStrings, critical_error_message_box
from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm from openlp.plugins.songs.forms import AuthorsForm, TopicsForm, SongBookForm
from openlp.plugins.songs.lib.db import Author, Book, Topic, Song from openlp.plugins.songs.lib.db import Author, Book, Topic, Song
from openlp.plugins.songs.lib.ui import SongStrings
from songmaintenancedialog import Ui_SongMaintenanceDialog from songmaintenancedialog import Ui_SongMaintenanceDialog
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -447,7 +448,7 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
Delete the author if the author is not attached to any songs. Delete the author if the author is not attached to any songs.
""" """
self._deleteItem(Author, self.authorsListWidget, self.resetAuthors, self._deleteItem(Author, self.authorsListWidget, self.resetAuthors,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Author'), UiStrings.DeleteType % SongStrings.Author,
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected author?'), 'Are you sure you want to delete the selected author?'),
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',
@ -457,10 +458,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
def onTopicDeleteButtonClick(self): def onTopicDeleteButtonClick(self):
""" """
Delete the Book is the Book is not attached to any songs. Delete the Book if the Book is not attached to any songs.
""" """
self._deleteItem(Topic, self.topicsListWidget, self.resetTopics, self._deleteItem(Topic, self.topicsListWidget, self.resetTopics,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Topic'), UiStrings.DeleteType % SongStrings.Topic,
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected topic?'), 'Are you sure you want to delete the selected topic?'),
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',
@ -470,10 +471,10 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
def onBookDeleteButtonClick(self): def onBookDeleteButtonClick(self):
""" """
Delete the Book is the Book is not attached to any songs. Delete the Book if the Book is not attached to any songs.
""" """
self._deleteItem(Book, self.booksListWidget, self.resetBooks, self._deleteItem(Book, self.booksListWidget, self.resetBooks,
translate('SongsPlugin.SongMaintenanceForm', 'Delete Book'), UiStrings.DeleteType % SongStrings.SongBook,
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',
'Are you sure you want to delete the selected book?'), 'Are you sure you want to delete the selected book?'),
translate('SongsPlugin.SongMaintenanceForm', translate('SongsPlugin.SongMaintenanceForm',