UiStrings and SongStrings

This commit is contained in:
Jon Tibble 2011-02-11 21:17:56 +00:00
parent 2bcc01f35d
commit 9366155924
17 changed files with 114 additions and 103 deletions

View File

@ -449,8 +449,7 @@ class MediaManagerItem(QtGui.QWidget):
Add a selected item to the current service
"""
if not self.listView.selectedIndexes() and not self.remoteTriggered:
QtGui.QMessageBox.information(self,
translate('OpenLP.MediaManagerItem', 'No Items Selected'),
QtGui.QMessageBox.information(self, UiStrings.NISp,
translate('OpenLP.MediaManagerItem',
'You must select one or more items.'))
else:
@ -476,17 +475,14 @@ class MediaManagerItem(QtGui.QWidget):
Add a selected item to an existing item in the current service.
"""
if not self.listView.selectedIndexes() and not self.remoteTriggered:
QtGui.QMessageBox.information(self,
translate('OpenLP.MediaManagerItem', 'No Items Selected'),
QtGui.QMessageBox.information(self, UiStrings.NISp,
translate('OpenLP.MediaManagerItem',
'You must select one or more items'))
else:
log.debug(u'%s Add requested', self.plugin.name)
serviceItem = self.parent.serviceManager.getServiceItem()
if not serviceItem:
QtGui.QMessageBox.information(self,
translate('OpenLP.MediaManagerItem',
'No Service Item Selected'),
QtGui.QMessageBox.information(self, UiStrings.NISs,
translate('OpenLP.MediaManagerItem',
'You must select an existing service item to add to.'))
elif self.plugin.name.lower() == serviceItem.name.lower():

View File

@ -178,9 +178,9 @@ class HorizontalType(object):
"""
Return a string representation of a horizontal type.
"""
if horizontal_type == Horizontal.Right:
if horizontal_type == HorizontalType.Right:
return u'right'
elif horizontal_type == Horizontal.Center:
elif horizontal_type == HorizontalType.Center:
return u'center'
else:
return u'left'

View File

@ -46,7 +46,6 @@ class UiStrings(object):
'Add the selected %s to the service.'))
Advanced = translate('OpenLP.Ui', 'Advanced')
AllFiles = translate('OpenLP.Ui', 'All Files')
Authors = translate('OpenLP.Ui', 'Authors')
CreateANew = unicode(translate('OpenLP.Ui', 'Create a new %s.'))
Delete = translate('OpenLP.Ui', '&Delete')
DeleteSelect = unicode(translate('OpenLP.Ui', 'Delete the selected %s.'))
@ -54,6 +53,7 @@ class UiStrings(object):
Edit = translate('OpenLP.Ui', '&Edit')
EditSelect = unicode(translate('OpenLP.Ui', 'Edit the selected %s.'))
EditType = unicode(translate('OpenLP.Ui', 'Edit %s'))
EmptyField = translate('OpenLP.Ui', 'Empty Field')
Error = translate('OpenLP.Ui', 'Error')
ExportType = unicode(translate('OpenLP.Ui', 'Export %s'))
Import = translate('OpenLP.Ui', 'Import')
@ -63,6 +63,10 @@ class UiStrings(object):
LoadANew = unicode(translate('OpenLP.Ui', 'Load a new %s.'))
New = translate('OpenLP.Ui', 'New')
NewType = unicode(translate('OpenLP.Ui', 'New %s'))
NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')
NISp = translate('OpenLP.Ui', 'No Items Selected', 'Plural')
OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
OpenType = unicode(translate('OpenLP.Ui', 'Open %s'))
Preview = translate('OpenLP.Ui', 'Preview')
@ -75,8 +79,8 @@ class UiStrings(object):
SendSelectLive = unicode(translate('OpenLP.Ui',
'Send the selected %s live.'))
Service = translate('OpenLP.Ui', 'Service')
Theme = translate('OpenLP.Ui', 'Theme')
Themes = translate('OpenLP.Ui', 'Themes')
Theme = translate('OpenLP.Ui', 'Theme', 'Singular')
Themes = translate('OpenLP.Ui', 'Themes', 'Plural')
def add_welcome_page(parent, image):
@ -168,7 +172,7 @@ def media_item_combo_box(parent, name):
combo.setSizePolicy(QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Fixed)
return combo
def create_delete_push_button(parent, icon=None):
def create_delete_push_button(parent, item_name, icon=None):
"""
Creates a standard push button with a delete label and optional icon. The
button is connected to the parent's ``onDeleteButtonClicked()`` method to
@ -186,8 +190,7 @@ def create_delete_push_button(parent, icon=None):
delete_icon = icon if icon else u':/general/general_delete.png'
delete_button.setIcon(build_icon(delete_icon))
delete_button.setText(UiStrings.Delete)
delete_button.setToolTip(
translate('OpenLP.Ui', 'Delete the selected item.'))
delete_button.setToolTip(UiStrings.DeleteSelect % item_name)
QtCore.QObject.connect(delete_button,
QtCore.SIGNAL(u'clicked()'), parent.onDeleteButtonClicked)
return delete_button

View File

@ -27,7 +27,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib.ui import create_accept_reject_button_box, \
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box, \
create_delete_push_button, create_up_down_push_button_set
class Ui_ServiceItemEditDialog(object):
@ -41,7 +41,8 @@ class Ui_ServiceItemEditDialog(object):
self.dialogLayout.addWidget(self.listWidget, 0, 0)
self.buttonLayout = QtGui.QVBoxLayout()
self.buttonLayout.setObjectName(u'buttonLayout')
self.deleteButton = create_delete_push_button(serviceItemEditDialog)
self.deleteButton = create_delete_push_button(
serviceItemEditDialog, UiStrings.Service.toLower())
self.buttonLayout.addWidget(self.deleteButton)
self.buttonLayout.addStretch()
self.upButton, self.downButton = create_up_down_push_button_set(

View File

@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate
from openlp.core.lib import StringContent, build_icon, translate
from openlp.core.lib.ui import create_delete_push_button
class Ui_AlertDialog(object):
@ -66,7 +66,8 @@ class Ui_AlertDialog(object):
self.saveButton.setIcon(build_icon(u':/general/general_save.png'))
self.saveButton.setObjectName(u'saveButton')
self.manageButtonLayout.addWidget(self.saveButton)
self.deleteButton = create_delete_push_button(alertDialog)
self.deleteButton = create_delete_push_button(alertDialog,
self.parent.getString(StringContent.Name)[u'singular'].toLower())
self.deleteButton.setEnabled(False)
self.manageButtonLayout.addWidget(self.deleteButton)
self.manageButtonLayout.addStretch()

View File

@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import Receiver, translate
from openlp.core.lib.db import delete_database
from openlp.core.lib.ui import critical_error_message_box
from openlp.core.lib.ui import UiStrings, critical_error_message_box
from openlp.core.ui.wizard import OpenLPWizard
from openlp.core.utils import AppLocation, string_is_unicode
from openlp.plugins.bibles.lib.manager import BibleFormat
@ -468,9 +468,7 @@ class BibleImportForm(OpenLPWizard):
elif self.currentPage() == self.selectPage:
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
if not self.field(u'osis_location').toString():
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Invalid Bible Location'),
critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file to import your '
'Bible from.'))
@ -478,8 +476,7 @@ class BibleImportForm(OpenLPWizard):
return False
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
if not self.field(u'csv_testamentsfile').toString():
answer = critical_error_message_box(translate(
'BiblesPlugin.ImportWizardForm', 'No Testaments File'),
answer = critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You have not specified a testaments file. Do you '
'want to proceed with the import?'), question=True)
@ -487,18 +484,14 @@ class BibleImportForm(OpenLPWizard):
self.csvTestamentsEdit.setFocus()
return False
elif not self.field(u'csv_booksfile').toString():
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Invalid Books File'),
critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file with books of '
'the Bible to use in the import.'))
self.csvBooksEdit.setFocus()
return False
elif not self.field(u'csv_versefile').toString():
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Invalid Verse File'),
critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file of Bible '
'verses to import.'))
@ -507,9 +500,7 @@ class BibleImportForm(OpenLPWizard):
elif self.field(u'source_format').toInt()[0] == \
BibleFormat.OpenSong:
if not self.field(u'opensong_file').toString():
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Invalid OpenSong Bible'),
critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify an OpenSong Bible '
'file to import.'))
@ -517,9 +508,7 @@ class BibleImportForm(OpenLPWizard):
return False
elif self.field(u'source_format').toInt()[0] == BibleFormat.OpenLP1:
if not self.field(u'openlp1_location').toString():
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Invalid Bible Location'),
critical_error_message_box(UiStrings.NFSs,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a file to import your '
'Bible from.'))
@ -531,17 +520,13 @@ class BibleImportForm(OpenLPWizard):
license_copyright = \
unicode(self.field(u'license_copyright').toString())
if not license_version:
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Empty Version Name'),
critical_error_message_box(UiStrings.EmptyField,
translate('BiblesPlugin.ImportWizardForm',
'You need to specify a version name for your Bible.'))
self.versionNameEdit.setFocus()
return False
elif not license_copyright:
critical_error_message_box(
translate('BiblesPlugin.ImportWizardForm',
'Empty Copyright'),
critical_error_message_box(UiStrings.EmptyField,
translate('BiblesPlugin.ImportWizardForm',
'You need to set a copyright for your Bible. '
'Bibles in the Public Domain need to be marked as such.'))

View File

@ -52,7 +52,7 @@ class CustomPlugin(Plugin):
CustomMediaItem, CustomTab)
self.weight = -5
self.manager = Manager(u'custom', init_schema)
self.edit_custom_form = EditCustomForm(self.manager)
self.edit_custom_form = EditCustomForm(self)
self.icon_path = u':/plugins/plugin_custom.png'
self.icon = build_icon(self.icon_path)

View File

@ -26,7 +26,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate
from openlp.core.lib import StringContent, build_icon, translate
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box, \
create_delete_push_button, create_up_down_push_button_set
@ -66,7 +66,9 @@ class Ui_CustomEditDialog(object):
self.editAllButton = QtGui.QPushButton(customEditDialog)
self.editAllButton.setObjectName(u'editAllButton')
self.buttonLayout.addWidget(self.editAllButton)
self.deleteButton = create_delete_push_button(customEditDialog)
self.deleteButton = create_delete_push_button(customEditDialog,
customEditDialog.parent.getString(
StringContent.Name)[u'singular'].toLower())
self.deleteButton.setEnabled(False)
self.buttonLayout.addWidget(self.deleteButton)
self.buttonLayout.addStretch()

View File

@ -42,14 +42,15 @@ class EditCustomForm(QtGui.QDialog, Ui_CustomEditDialog):
Class documentation goes here.
"""
log.info(u'Custom Editor loaded')
def __init__(self, manager, parent=None):
def __init__(self, parent):
"""
Constructor
"""
QtGui.QDialog.__init__(self, parent)
QtGui.QDialog.__init__(self)
self.parent = parent
self.manager = self.parent.manager
self.setupUi(self)
# Create other objects and forms.
self.manager = manager
self.editSlideForm = EditCustomSlideForm(self)
# Connecting signals and slots
QtCore.QObject.connect(self.previewButton,

View File

@ -28,6 +28,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib.ui import create_accept_reject_button_box
from openlp.plugins.songs.lib.ui import SongStrings
class Ui_AuthorsDialog(object):
def setupUi(self, authorsDialog):
@ -64,7 +65,7 @@ class Ui_AuthorsDialog(object):
def retranslateUi(self, authorsDialog):
authorsDialog.setWindowTitle(
translate('SongsPlugin.AuthorsForm', 'Author Maintenance'))
SongStrings.TypeMaintenance % SongStrings.Author)
self.displayLabel.setText(
translate('SongsPlugin.AuthorsForm', 'Display name:'))
self.firstNameLabel.setText(

View File

@ -28,6 +28,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate
from openlp.core.lib.ui import UiStrings, create_accept_reject_button_box
from openlp.plugins.songs.lib.ui import SongStrings
class Ui_EditSongDialog(object):
def setupUi(self, editSongDialog):
@ -265,21 +266,19 @@ class Ui_EditSongDialog(object):
self.songTabWidget.setTabText(
self.songTabWidget.indexOf(self.lyricsTab),
translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
self.authorsGroupBox.setTitle(UiStrings.Authors)
self.authorsGroupBox.setTitle(SongStrings.Authors)
self.authorAddButton.setText(
translate('SongsPlugin.EditSongForm', '&Add to Song'))
self.authorRemoveButton.setText(
translate('SongsPlugin.EditSongForm', '&Remove'))
self.maintenanceButton.setText(translate('SongsPlugin.EditSongForm',
'&Manage Authors, Topics, Song Books'))
self.topicsGroupBox.setTitle(
translate('SongsPlugin.EditSongForm', 'Topic'))
self.topicsGroupBox.setTitle(SongStrings.Topic)
self.topicAddButton.setText(
translate('SongsPlugin.EditSongForm', 'A&dd to Song'))
self.topicRemoveButton.setText(
translate('SongsPlugin.EditSongForm', 'R&emove'))
self.songBookGroupBox.setTitle(
translate('SongsPlugin.EditSongForm', 'Song Book'))
self.songBookGroupBox.setTitle(SongStrings.SongBook)
self.songBookNameLabel.setText(translate('SongsPlugin.EditSongForm',
'Book:'))
self.songBookNumberLabel.setText(translate('SongsPlugin.EditSongForm',

View File

@ -28,6 +28,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib.ui import create_accept_reject_button_box
from openlp.plugins.songs.lib.ui import SongStrings
class Ui_SongBookDialog(object):
def setupUi(self, songBookDialog):
@ -58,7 +59,7 @@ class Ui_SongBookDialog(object):
def retranslateUi(self, songBookDialog):
songBookDialog.setWindowTitle(
translate('SongsPlugin.SongBookForm', 'Song Book Maintenance'))
SongStrings.TypeMaintenance % SongStrings.SongBook)
self.nameLabel.setText(translate('SongsPlugin.SongBookForm', '&Name:'))
self.publisherLabel.setText(
translate('SongsPlugin.SongBookForm', '&Publisher:'))

View File

@ -330,9 +330,7 @@ class SongImportForm(OpenLPWizard):
source_format = self.formatComboBox.currentIndex()
if source_format == SongFormat.OpenLP2:
if self.openLP2FilenameEdit.text().isEmpty():
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No OpenLP 2.0 Song Database Selected'),
critical_error_message_box(UiStrings.NFSs,
translate('SongsPlugin.ImportWizardForm',
'You need to select an OpenLP 2.0 song database '
'file to import from.'))
@ -340,9 +338,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.OpenLP1:
if self.openLP1FilenameEdit.text().isEmpty():
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No openlp.org 1.x Song Database Selected'),
critical_error_message_box(UiStrings.NFSs,
translate('SongsPlugin.ImportWizardForm',
'You need to select an openlp.org 1.x song '
'database file to import from.'))
@ -350,9 +346,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.OpenLyrics:
if self.openLyricsFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No OpenLyrics Files Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one OpenLyrics '
'song file to import from.'))
@ -360,9 +354,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.OpenSong:
if self.openSongFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No OpenSong Files Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one OpenSong '
'song file to import from.'))
@ -370,9 +362,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.WordsOfWorship:
if self.wordsOfWorshipFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No Words of Worship Files Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one Words of Worship '
'file to import from.'))
@ -380,9 +370,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.CCLI:
if self.ccliFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No CCLI Files Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one CCLI file '
'to import from.'))
@ -390,9 +378,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.SongsOfFellowship:
if self.songsOfFellowshipFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No Songs of Fellowship File Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one Songs of Fellowship '
'file to import from.'))
@ -400,9 +386,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.Generic:
if self.genericFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No Document/Presentation Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one document or '
'presentation file to import from.'))
@ -410,9 +394,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.EasiSlides:
if self.easiSlidesFilenameEdit.text().isEmpty():
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No Easislides Songs file selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to select an xml song file exported from '
'EasiSlides, to import from.'))
@ -420,9 +402,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.EasyWorship:
if self.ewFilenameEdit.text().isEmpty():
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No EasyWorship Song Database Selected'),
critical_error_message_box(UiStrings.NFSs,
translate('SongsPlugin.ImportWizardForm',
'You need to select an EasyWorship song database '
'file to import from.'))
@ -430,9 +410,7 @@ class SongImportForm(OpenLPWizard):
return False
elif source_format == SongFormat.SongBeamer:
if self.songBeamerFileListWidget.count() == 0:
critical_error_message_box(
translate('SongsPlugin.ImportWizardForm',
'No SongBeamer File Selected'),
critical_error_message_box(UiStrings.NFSp,
translate('SongsPlugin.ImportWizardForm',
'You need to add at least one SongBeamer '
'file to import from.'))
@ -585,7 +563,7 @@ class SongImportForm(OpenLPWizard):
'Select Songs of Fellowship Files'),
self.songsOfFellowshipFileListWidget, u'%s (*.rtf)'
% translate('SongsPlugin.ImportWizardForm',
'Songs Of Felloship Song Files')
'Songs Of Fellowship Song Files')
)
def onSongsOfFellowshipRemoveButtonClicked(self):

View File

@ -28,6 +28,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon, translate
from openlp.core.lib.ui import UiStrings
from openlp.plugins.songs.lib.ui import SongStrings
class Ui_SongMaintenanceDialog(object):
def setupUi(self, songMaintenanceDialog):
@ -145,13 +146,10 @@ class Ui_SongMaintenanceDialog(object):
def retranslateUi(self, songMaintenanceDialog):
songMaintenanceDialog.setWindowTitle(
translate('SongsPlugin.SongMaintenanceForm', 'Song Maintenance'))
authorsString = UiStrings.Authors
topicsString = translate('SongsPlugin.SongMaintenanceForm', 'Topics')
booksString = translate('SongsPlugin.SongMaintenanceForm', 'Song Books')
self.listItemAuthors.setText(authorsString)
self.listItemTopics.setText(topicsString)
self.listItemBooks.setText(booksString)
SongStrings.TypeMaintenance % SongStrings.Song)
self.listItemAuthors.setText(SongStrings.Authors)
self.listItemTopics.setText(SongStrings.Topics)
self.listItemBooks.setText(SongStrings.SongBooks)
self.authorsAddButton.setText(UiStrings.Add)
self.authorsEditButton.setText(UiStrings.Edit)
self.authorsDeleteButton.setText(UiStrings.Delete)
@ -161,8 +159,8 @@ class Ui_SongMaintenanceDialog(object):
self.booksAddButton.setText(UiStrings.Add)
self.booksEditButton.setText(UiStrings.Edit)
self.booksDeleteButton.setText(UiStrings.Delete)
typeListWidth = max(self.fontMetrics().width(authorsString),
self.fontMetrics().width(topicsString),
self.fontMetrics().width(booksString))
typeListWidth = max(self.fontMetrics().width(SongStrings.Authors),
self.fontMetrics().width(SongStrings.Topics),
self.fontMetrics().width(SongStrings.SongBooks))
self.typeListWidget.setFixedWidth(typeListWidth +
self.typeListWidget.iconSize().width() + 32)

View File

@ -28,6 +28,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib.ui import create_accept_reject_button_box
from openlp.plugins.songs.lib.ui import SongStrings
class Ui_TopicsDialog(object):
def setupUi(self, topicsDialog):
@ -52,6 +53,6 @@ class Ui_TopicsDialog(object):
def retranslateUi(self, topicsDialog):
topicsDialog.setWindowTitle(
translate('SongsPlugin.TopicsForm', 'Topic Maintenance'))
SongStrings.TypeMaintenance % SongStrings.Topic)
self.nameLabel.setText(
translate('SongsPlugin.TopicsForm', 'Topic name:'))

View File

@ -38,6 +38,7 @@ from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \
SongImportForm, SongExportForm
from openlp.plugins.songs.lib import OpenLyrics, SongXML
from openlp.plugins.songs.lib.db import Author, Song
from openlp.plugins.songs.lib.ui import SongStrings
from openlp.core.lib.searchedit import SearchEdit
log = logging.getLogger(__name__)
@ -129,7 +130,7 @@ class SongMediaItem(MediaManagerItem):
self.searchTextButton.setText(
translate('SongsPlugin.MediaItem', 'Search'))
self.maintenanceAction.setText(
translate('SongsPlugin.MediaItem', 'Song Maintenance'))
SongStrings.TypeMaintenance % SongString.Song)
self.maintenanceAction.setToolTip(translate('SongsPlugin.MediaItem',
'Maintain the lists of authors, topics and books'))
@ -141,7 +142,7 @@ class SongMediaItem(MediaManagerItem):
translate('SongsPlugin.MediaItem', 'Titles')),
(3, u':/songs/song_search_lyrics.png',
translate('SongsPlugin.MediaItem', 'Lyrics')),
(4, u':/songs/song_search_author.png', UiStrings.Authors),
(4, u':/songs/song_search_author.png', SongStrings.Authors),
(5, u':/slides/slide_theme.png', UiStrings.Themes)
])
self.configUpdated()

View File

@ -0,0 +1,43 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2011 Raoul Snyman #
# Portions copyright (c) 2008-2011 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Meinert Jordan, Andreas Preikschat, Christian #
# Richter, Philip Ridout, Maikel Stuivenberg, Martin Thompson, Jon Tibble, #
# Carsten Tinggaard, Frode Woldsund #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
"""
The :mod:`openlp.plugins.songs.lib.ui` module provides standard UI components
for the songs plugin.
"""
from openlp.core.lib import translate
class SongStrings(object):
"""
Provide standard strings for use throughout the songs plugin.
"""
# These strings should need a good reason to be retranslated elsewhere.
Author = translate('OpenLP.Ui', 'Author', 'Singular')
Authors = translate('OpenLP.Ui', 'Authors', 'Plural')
SongBook = translate('OpenLP.Ui', 'Song Book', 'Singular')
SongBooks = translate('OpenLP.Ui', 'Song Books', 'Plural')
Topic = translate('OpenLP.Ui', 'Topic', 'Singular')
Topics = translate('OpenLP.Ui', 'Topics', 'Plural')
TypeMaintenance = unicode(translate('OpenLP.Ui', '%s Maintenance'))