Fix outstanding strings prior to string freeze

bzr-revno: 1624
This commit is contained in:
Jonathan Corwin 2011-06-10 20:25:57 +01:00
commit 865ccd867a
5 changed files with 35 additions and 25 deletions

View File

@ -85,7 +85,6 @@ class UiStrings(object):
self.LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
self.Live = translate('OpenLP.Ui', 'Live')
self.LiveBGError = translate('OpenLP.Ui', 'Live Background Error')
self.LivePanel = translate('OpenLP.Ui', 'Live Panel')
self.LiveToolbar = translate('OpenLP.Ui', 'Live Toolbar')
self.Load = translate('OpenLP.Ui', 'Load')
self.Minutes = translate('OpenLP.Ui', 'm',
@ -102,14 +101,13 @@ class UiStrings(object):
self.OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
self.OpenLPStart = translate('OpenLP.Ui', 'OpenLP is already running. '
'Do you wish to continue?')
self.OpenService = translate('OpenLP.Ui', 'Open Service')
self.OpenService = translate('OpenLP.Ui', 'Open service.')
self.Preview = translate('OpenLP.Ui', 'Preview')
self.PreviewPanel = translate('OpenLP.Ui', 'Preview Panel')
self.PrintServiceOrder = translate('OpenLP.Ui', 'Print Service Order')
self.PrintService = translate('OpenLP.Ui', 'Print Service')
self.ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
self.ReplaceLiveBG = translate('OpenLP.Ui', 'Replace live background.')
self.ResetBG = translate('OpenLP.Ui', 'Reset Background')
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
self.ResetLiveBG = translate('OpenLP.Ui', 'Reset live background.')
self.Seconds = translate('OpenLP.Ui', 's',
'The abbreviated unit for seconds')
self.SaveAndPreview = translate('OpenLP.Ui', 'Save && Preview')

View File

@ -200,15 +200,14 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
"""
Prepare the UI for the process.
"""
# We start on 2 for plugins status setting plus a "finished" point.
max_progress = 2
self.max_progress = 0
# Loop through the songs list and increase for each selected item
for i in xrange(self.songsListWidget.count()):
item = self.songsListWidget.item(i)
if item.checkState() == QtCore.Qt.Checked:
filename = item.data(QtCore.Qt.UserRole).toString()
size = self._getFileSize(u'%s%s' % (self.web, filename))
max_progress += size
self.max_progress += size
# Loop through the Bibles list and increase for each selected item
iterator = QtGui.QTreeWidgetItemIterator(self.biblesTreeWidget)
while iterator.value():
@ -216,7 +215,7 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
if item.parent() and item.checkState(0) == QtCore.Qt.Checked:
filename = item.data(0, QtCore.Qt.UserRole).toString()
size = self._getFileSize(u'%s%s' % (self.web, filename))
max_progress += size
self.max_progress += size
iterator += 1
# Loop through the themes list and increase for each selected item
for i in xrange(self.themesListWidget.count()):
@ -224,23 +223,40 @@ class FirstTimeForm(QtGui.QWizard, Ui_FirstTimeWizard):
if item.checkState() == QtCore.Qt.Checked:
filename = item.data(QtCore.Qt.UserRole).toString()
size = self._getFileSize(u'%s%s' % (self.web, filename))
max_progress += size
self.max_progress += size
self.finishButton.setVisible(False)
self.progressBar.setValue(0)
self.progressBar.setMinimum(0)
self.progressBar.setMaximum(max_progress)
if self.max_progress:
# Add on 2 for plugins status setting plus a "finished" point.
self.max_progress = self.max_progress + 2
self.progressBar.setValue(0)
self.progressBar.setMinimum(0)
self.progressBar.setMaximum(self.max_progress)
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
'Setting Up And Downloading'))
self.progressPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
'Please wait while OpenLP is set up '
'and your data is downloaded.'))
else:
self.progressBar.setVisible(False)
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
'Setting Up'))
self.progressPage.setSubTitle(u'Setup complete.')
def _postWizard(self):
"""
Clean up the UI after the process has finished.
"""
self.progressBar.setValue(self.progressBar.maximum())
if self.max_progress:
self.progressBar.setValue(self.progressBar.maximum())
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
'Download complete. Click the finish button to start OpenLP.'))
else:
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
'Click the finish button to start OpenLP.'))
self.finishButton.setVisible(True)
self.finishButton.setEnabled(True)
self.cancelButton.setVisible(False)
self.nextButton.setVisible(False)
self.progressLabel.setText(translate('OpenLP.FirstTimeWizard',
'Download complete. Click the finish button to start OpenLP.'))
Receiver.send_message(u'openlp_process_events')
def _performWizard(self):

View File

@ -254,10 +254,6 @@ class Ui_FirstTimeWizard(object):
'Default Settings'))
self.defaultsPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
'Set up default settings to be used by OpenLP.'))
self.progressPage.setTitle(translate('OpenLP.FirstTimeWizard',
'Setting Up And Importing'))
self.progressPage.setSubTitle(translate('OpenLP.FirstTimeWizard',
'Please wait while OpenLP is set up and your data is imported.'))
self.displayLabel.setText(translate('OpenLP.FirstTimeWizard',
'Default output display:'))
self.themeLabel.setText(translate('OpenLP.FirstTimeWizard',

View File

@ -356,9 +356,9 @@ class Ui_MainWindow(object):
translate('OpenLP.MainWindow', 'Save Service As'))
self.fileSaveAsItem.setStatusTip(translate('OpenLP.MainWindow',
'Save the current service under a new name.'))
self.printServiceOrderItem.setText(UiStrings().PrintServiceOrder)
self.printServiceOrderItem.setText(UiStrings().PrintService)
self.printServiceOrderItem.setStatusTip(translate('OpenLP.MainWindow',
'Print the current Service Order.'))
'Print the current service.'))
self.fileExitItem.setText(
translate('OpenLP.MainWindow', 'E&xit'))
self.fileExitItem.setStatusTip(

View File

@ -149,7 +149,7 @@ class Ui_PrintServiceDialog(object):
QtCore.SIGNAL(u'toggled(bool)'), self.toggleOptions)
def retranslateUi(self, printServiceDialog):
printServiceDialog.setWindowTitle(UiStrings().PrintServiceOrder)
printServiceDialog.setWindowTitle(UiStrings().PrintService)
self.slideTextCheckBox.setText(translate('OpenLP.PrintServiceForm',
'Include slide text if available'))
self.pageBreakAfterText.setText(translate('OpenLP.PrintServiceForm',
@ -159,7 +159,7 @@ class Ui_PrintServiceDialog(object):
self.metaDataCheckBox.setText(translate('OpenLP.PrintServiceForm',
'Include play length of media items'))
self.titleLineEdit.setText(translate('OpenLP.PrintServiceForm',
'Service Order Sheet'))
'Service Sheet'))
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Page])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.Width])
self.zoomComboBox.addItem(ZoomSize.Sizes[ZoomSize.OneHundred])