UiStrings

This commit is contained in:
Jon Tibble 2011-02-18 01:07:55 +00:00
parent 9b48761590
commit 0d498bc3f0
8 changed files with 17 additions and 18 deletions

View File

@ -45,7 +45,8 @@ class UiStrings(object):
Advanced = translate('OpenLP.Ui', 'Advanced') Advanced = translate('OpenLP.Ui', 'Advanced')
AllFiles = translate('OpenLP.Ui', 'All Files') AllFiles = translate('OpenLP.Ui', 'All Files')
Browse = translate('OpenLP.Ui', 'Browse...') Browse = translate('OpenLP.Ui', 'Browse...')
Authors = translate('OpenLP.Ui', 'Authors') Cancel = translate('OpenLP.Ui', 'Cancel')
CCLINumberLabel = translate('OpenLP.Ui', 'CCLI number:')
CreateService = translate('OpenLP.Ui', 'Create a new service.') CreateService = translate('OpenLP.Ui', 'Create a new service.')
Delete = translate('OpenLP.Ui', '&Delete') Delete = translate('OpenLP.Ui', '&Delete')
Edit = translate('OpenLP.Ui', '&Edit') Edit = translate('OpenLP.Ui', '&Edit')
@ -63,6 +64,7 @@ class UiStrings(object):
Load = translate('OpenLP.Ui', 'Load') Load = translate('OpenLP.Ui', 'Load')
New = translate('OpenLP.Ui', 'New') New = translate('OpenLP.Ui', 'New')
NewService = translate('OpenLP.Ui', 'New Service') NewService = translate('OpenLP.Ui', 'New Service')
NewTheme = translate('OpenLP.Ui', 'New Theme')
NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular') NFSs = translate('OpenLP.Ui', 'No File Selected', 'Singular')
NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural') NFSp = translate('OpenLP.Ui', 'No Files Selected', 'Plural')
NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular') NISs = translate('OpenLP.Ui', 'No Item Selected', 'Singular')

View File

@ -28,6 +28,7 @@ import logging
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from openlp.core.lib import SettingsTab, Receiver, translate from openlp.core.lib import SettingsTab, Receiver, translate
from openlp.core.lib.ui import UiStrings
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -267,8 +268,7 @@ class GeneralTab(SettingsTab):
translate('OpenLP.GeneralTab', ' sec')) translate('OpenLP.GeneralTab', ' sec'))
self.ccliGroupBox.setTitle( self.ccliGroupBox.setTitle(
translate('OpenLP.GeneralTab', 'CCLI Details')) translate('OpenLP.GeneralTab', 'CCLI Details'))
self.numberLabel.setText( self.numberLabel.setText(UiStrings.CCLINumberLabel)
translate('OpenLP.GeneralTab', 'CCLI number:'))
self.usernameLabel.setText( self.usernameLabel.setText(
translate('OpenLP.GeneralTab', 'SongSelect username:')) translate('OpenLP.GeneralTab', 'SongSelect username:'))
self.passwordLabel.setText( self.passwordLabel.setText(

View File

@ -132,6 +132,6 @@ class Ui_PrintServiceOrderDialog(object):
self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager', self.serviceTitleLineEdit.setText(translate('OpenLP.ServiceManager',
'Service Order Sheet')) 'Service Order Sheet'))
self.printButton.setText(translate('OpenLP.ServiceManager', 'Print')) self.printButton.setText(translate('OpenLP.ServiceManager', 'Print'))
self.cancelButton.setText(translate('OpenLP.ServiceManager', 'Cancel')) self.cancelButton.setText(UiStrings.Cancel)
self.customNotesLabel.setText( self.customNotesLabel.setText(
translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>')) translate('OpenLP.ServiceManager', '<b>Custom Service Notes:</b>'))

View File

@ -301,7 +301,7 @@ class ThemeForm(QtGui.QWizard, Ui_ThemeWizard):
'Edit Theme - %s')) % self.theme.theme_name) 'Edit Theme - %s')) % self.theme.theme_name)
self.next() self.next()
else: else:
self.setWindowTitle(translate('OpenLP.ThemeWizard', 'New Theme')) self.setWindowTitle(UiStrings.NewTheme)
return QtGui.QWizard.exec_(self) return QtGui.QWizard.exec_(self)
def initializePage(self, id): def initializePage(self, id):

View File

@ -36,7 +36,7 @@ from openlp.core.lib import OpenLPToolbar, ThemeXML, get_text_file_string, \
build_icon, Receiver, SettingsManager, translate, check_item_selected, \ build_icon, Receiver, SettingsManager, translate, check_item_selected, \
BackgroundType, BackgroundGradientType, check_directory_exists, \ BackgroundType, BackgroundGradientType, check_directory_exists, \
VerticalType VerticalType
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import UiStrings, critical_error_message_box
from openlp.core.theme import Theme from openlp.core.theme import Theme
from openlp.core.ui import FileRenameForm, ThemeForm from openlp.core.ui import FileRenameForm, ThemeForm
from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \ from openlp.core.utils import AppLocation, delete_file, file_is_unicode, \
@ -62,8 +62,7 @@ class ThemeManager(QtGui.QWidget):
self.layout.setMargin(0) self.layout.setMargin(0)
self.layout.setObjectName(u'layout') self.layout.setObjectName(u'layout')
self.toolbar = OpenLPToolbar(self) self.toolbar = OpenLPToolbar(self)
self.toolbar.addToolbarButton( self.toolbar.addToolbarButton(UiStrings.NewTheme,
translate('OpenLP.ThemeManager', 'New Theme'),
u':/themes/theme_new.png', u':/themes/theme_new.png',
translate('OpenLP.ThemeManager', 'Create a new theme.'), translate('OpenLP.ThemeManager', 'Create a new theme.'),
self.onAddTheme) self.onAddTheme)

View File

@ -448,17 +448,17 @@ class Ui_ThemeWizard(object):
self.mainFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:')) self.mainFontLabel.setText(translate('OpenLP.ThemeWizard', 'Font:'))
self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:')) self.mainColorLabel.setText(translate('OpenLP.ThemeWizard', 'Color:'))
self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:')) self.mainSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
self.mainSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt')) self.mainSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
self.lineSpacingLabel.setText( self.lineSpacingLabel.setText(
translate('OpenLP.ThemeWizard', 'Line Spacing:')) translate('OpenLP.ThemeWizard', 'Line Spacing:'))
self.lineSpacingSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt')) self.lineSpacingSpinBox.setSuffix(UiStrings.FontSizePtUnit)
self.outlineCheckBox.setText( self.outlineCheckBox.setText(
translate('OpenLP.ThemeWizard', '&Outline:')) translate('OpenLP.ThemeWizard', '&Outline:'))
self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:')) self.outlineSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
self.outlineSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt')) self.outlineSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:')) self.shadowCheckBox.setText(translate('OpenLP.ThemeWizard', '&Shadow:'))
self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:')) self.shadowSizeLabel.setText(translate('OpenLP.ThemeWizard', 'Size:'))
self.shadowSizeSpinBox.setSuffix(translate('OpenLP.ThemeWizard', 'pt')) self.shadowSizeSpinBox.setSuffix(UiStrings.FontSizePtUnit)
self.mainBoldCheckBox.setText(translate('OpenLP.ThemeWizard', 'Bold')) self.mainBoldCheckBox.setText(translate('OpenLP.ThemeWizard', 'Bold'))
self.mainItalicsCheckBox.setText( self.mainItalicsCheckBox.setText(
translate('OpenLP.ThemeWizard', 'Italic')) translate('OpenLP.ThemeWizard', 'Italic'))

View File

@ -292,10 +292,8 @@ class Ui_EditSongDialog(object):
translate('SongsPlugin.EditSongForm', 'New &Theme')) translate('SongsPlugin.EditSongForm', 'New &Theme'))
self.rightsGroupBox.setTitle( self.rightsGroupBox.setTitle(
translate('SongsPlugin.EditSongForm', 'Copyright Information')) translate('SongsPlugin.EditSongForm', 'Copyright Information'))
self.copyrightInsertButton.setText( self.copyrightInsertButton.setText(SongStrings.CopyrightSymbol)
translate('SongsPlugin.EditSongForm', '\xa9')) self.CCLILabel.setText(UiStrings.CCLINumberLabel)
self.CCLILabel.setText(
translate('SongsPlugin.EditSongForm', 'CCLI number:'))
self.commentsGroupBox.setTitle( self.commentsGroupBox.setTitle(
translate('SongsPlugin.EditSongForm', 'Comments')) translate('SongsPlugin.EditSongForm', 'Comments'))
self.songTabWidget.setTabText( self.songTabWidget.setTabText(

View File

@ -31,6 +31,7 @@ from PyQt4 import QtCore, QtGui
from openlp.core.lib import Plugin, StringContent, build_icon, translate from openlp.core.lib import Plugin, StringContent, build_icon, translate
from openlp.core.lib.db import Manager from openlp.core.lib.db import Manager
from openlp.core.lib.ui import UiStrings
from openlp.plugins.songs.lib import SongMediaItem, SongsTab, SongXML from openlp.plugins.songs.lib import SongMediaItem, SongsTab, SongXML
from openlp.plugins.songs.lib.db import init_schema, Song from openlp.plugins.songs.lib.db import init_schema, Song
from openlp.plugins.songs.lib.importer import SongFormat from openlp.plugins.songs.lib.importer import SongFormat
@ -137,8 +138,7 @@ class SongsPlugin(Plugin):
""" """
maxSongs = self.manager.get_object_count(Song) maxSongs = self.manager.get_object_count(Song)
progressDialog = QtGui.QProgressDialog( progressDialog = QtGui.QProgressDialog(
translate('SongsPlugin', 'Reindexing songs...'), translate('SongsPlugin', 'Reindexing songs...'), UiStrings.Cancel,
translate('SongsPlugin', 'Cancel'),
0, maxSongs + 1, self.formparent) 0, maxSongs + 1, self.formparent)
progressDialog.setWindowModality(QtCore.Qt.WindowModal) progressDialog.setWindowModality(QtCore.Qt.WindowModal)
songs = self.manager.get_all_objects(Song) songs = self.manager.get_all_objects(Song)