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+
+
+
+
+
+ SongBookDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SongExportDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SongMaintenanceDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SplashScreen
+
+
+
+
+
+
+
+ ThemeWizard
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ TopicsDialog
+
+
+
+
+
+
+
+
+
+
+
+
+ Ui_MainWindow
+
+
+
+
+
+
+
+ customEditDialog
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/openlp/core/lib/settingstab.py b/openlp/core/lib/settingstab.py
index ef46ba781..bd9f22661 100644
--- a/openlp/core/lib/settingstab.py
+++ b/openlp/core/lib/settingstab.py
@@ -44,7 +44,9 @@ class SettingsTab(QtGui.QWidget):
to write to when the ``save`` method is called.
"""
QtGui.QWidget.__init__(self)
- self.tabTitle = title
+ self.tabTitle = self.trUtf8(title)
+ # Use the line below when pulling the translation template file.
+ #self.tabTitle = title
self.setupUi()
self.retranslateUi()
self.initialise()
diff --git a/openlp/core/test/test_mediamanageritem.py b/openlp/core/test/test_mediamanageritem.py
index 369b81dba..85aab943d 100644
--- a/openlp/core/test/test_mediamanageritem.py
+++ b/openlp/core/test/test_mediamanageritem.py
@@ -31,31 +31,31 @@ class TestMediaManager:
self.main_window.resize(200, 600)
self.MediaManagerDock = QtGui.QDockWidget(self.main_window)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
- QtGui.QSizePolicy.Expanding)
+ QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
- self.MediaManagerDock.sizePolicy().hasHeightForWidth())
+ self.MediaManagerDock.sizePolicy().hasHeightForWidth())
self.MediaManagerDock.setSizePolicy(sizePolicy)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/system/system_mediamanager.png'),
- QtGui.QIcon.Normal, QtGui.QIcon.Off)
+ QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.MediaManagerDock.setWindowIcon(icon)
self.MediaManagerDock.setFloating(False)
self.MediaManagerContents = QtGui.QWidget()
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding,
- QtGui.QSizePolicy.Expanding)
+ QtGui.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(
- self.MediaManagerContents.sizePolicy().hasHeightForWidth())
+ self.MediaManagerContents.sizePolicy().hasHeightForWidth())
self.MediaManagerContents.setSizePolicy(sizePolicy)
self.MediaManagerLayout = QtGui.QHBoxLayout(self.MediaManagerContents)
self.MediaManagerLayout.setContentsMargins(0, 2, 0, 0)
self.MediaToolBox = QtGui.QToolBox(self.MediaManagerContents)
self.MediaManagerDock.setWidget(self.MediaManagerContents)
self.main_window.addDockWidget(QtCore.Qt.DockWidgetArea(1),
- self.MediaManagerDock)
+ self.MediaManagerDock)
self.MediaManagerLayout.addWidget(self.MediaToolBox)
def test1(self):
log=logging.getLogger(u'test1')
@@ -68,10 +68,10 @@ class TestMediaManager:
i1.addToolbarButton(u'Test1', u'Test1', None)
i2.addToolbar()
i2.addToolbarButton(u'Test2', u'Test2', None)
- self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i1),
- translate(u'main_window', u'Item1'))
- self.MediaToolBox.setItemText(self.MediaToolBox.indexOf(i2),
- translate(u'main_window', u'Item2'))
+ self.MediaToolBox.setItemText(
+ self.MediaToolBox.indexOf(i1), self.trUtf8(u'Item1'))
+ self.MediaToolBox.setItemText(
+ self.MediaToolBox.indexOf(i2), self.trUtf8(u'Item2'))
log.info(u'Show window')
self.main_window.show()
log.info(u'End')
diff --git a/openlp/core/ui/about.py b/openlp/core/ui/about.py
index 633e43344..1ab2dc430 100644
--- a/openlp/core/ui/about.py
+++ b/openlp/core/ui/about.py
@@ -94,6 +94,9 @@ class AboutForm(QtGui.QDialog):
self.License3Label.setWordWrap(True)
self.License3Label.setObjectName(u'License3Label')
self.LicenseTabLayout.addWidget(self.License3Label)
+ self.LicenseSpacer = QtGui.QSpacerItem(20, 40,
+ QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+ self.LicenseTabLayout.addItem(self.LicenseSpacer)
self.AboutNotebook.addTab(self.LicenseTab, u'License')
self.CreditsTab = QtGui.QWidget()
self.CreditsTab.setObjectName(u'CreditsTab')
@@ -138,21 +141,31 @@ class AboutForm(QtGui.QDialog):
"""
Set up translation
"""
- AboutForm.setWindowTitle(translate(u'AboutDialog', u'About openlp.org'))
- self.CopyrightLabel.setText(translate(u'AboutDialog',
- u'Copyright (c) 2004-2009 openlp.org Foundation'))
- self.AboutAuthors.setText(translate(u'AboutDialog',
- u'openlp.org is written and maintained by volunteers. If you would like to see more free Christian software being written, please consider contributing by using the button below.'))
- self.License1Label.setText(translate(u'AboutDialog',
- u'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; either version 2 of the License, or (at your option) any later version.'))
- self.License2Label.setText(translate(u'AboutDialog',
- u'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.'))
- self.License3Label.setText(translate(u'AboutDialog',
- u'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.'))
+ AboutForm.setWindowTitle(self.trUtf8(u'About openlp.org'))
+ self.CopyrightLabel.setText(
+ self.trUtf8(u'Copyright \xa9 2004-2009 openlp.org Foundation'))
+ self.AboutAuthors.setText(self.trUtf8(
+ u'openlp.org is written and maintained by volunteers. If you would '
+ u'like to see more free Christian software being written, please '
+ u'consider contributing by using the button below.'))
+ self.License1Label.setText(self.trUtf8(
+ u'This program is free software; you can redistribute it and/or '
+ u'modify it under the terms of the GNU General Public License as '
+ u'published by the Free Software Foundation; either version 2 of '
+ u'the License, or (at your option) any later version.'))
+ self.License2Label.setText(self.trUtf8(
+ u'You should have received a copy of the GNU General Public '
+ u'License along with this program; if not, write to the Free '
+ u'Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, '
+ u'MA 02111-1307 USA.'))
+ self.License3Label.setText(self.trUtf8(
+ u'This program is distributed in the hope that it will be useful, '
+ u'but WITHOUT ANY WARRANTY; without even the implied warranty of '
+ u'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU '
+ u'General Public License for more details.'))
self.AboutNotebook.setTabText(
- self.AboutNotebook.indexOf(self.LicenseTab),
- translate(u'AboutDialog', u'License'))
- self.CreditsTextEdit.setPlainText(translate(u'AboutDialog',
+ self.AboutNotebook.indexOf(self.LicenseTab), self.trUtf8(u'License'))
+ self.CreditsTextEdit.setPlainText(self.trUtf8(
u'Project Lead\n'
u' Raoul \"superfly\" Snyman\n'
u'\n'
@@ -165,11 +178,10 @@ class AboutForm(QtGui.QDialog):
u' Jon \"Meths\" Tibble\n'
u' Carsten \"catini\" Tingaard'))
self.AboutNotebook.setTabText(
- self.AboutNotebook.indexOf(self.CreditsTab),
- translate(u'AboutDialog', u'Credits'))
- self.ContributeButton.setText(translate(u'AboutDialog', u'Contribute'))
- self.CloseButton.setText(translate(u'AboutDialog', u'Close'))
- self.extContributeItem.setText(translate(u'AboutDialog', u'&Contribute'))
+ self.AboutNotebook.indexOf(self.CreditsTab), self.trUtf8(u'Credits'))
+ self.ContributeButton.setText(self.trUtf8(u'Contribute'))
+ self.CloseButton.setText(self.trUtf8(u'Close'))
+ self.extContributeItem.setText(self.trUtf8(u'&Contribute'))
def onContributeButtonClicked(self):
"""
@@ -178,3 +190,4 @@ class AboutForm(QtGui.QDialog):
import webbrowser
url = "http://www.openlp.org/en/documentation/introduction/contributing.html"
webbrowser.open_new(url)
+
diff --git a/openlp/core/ui/alertform.py b/openlp/core/ui/alertform.py
index fdc6066d1..e6c2cacbc 100644
--- a/openlp/core/ui/alertform.py
+++ b/openlp/core/ui/alertform.py
@@ -92,10 +92,10 @@ class AlertForm(QtGui.QDialog):
QtCore.QMetaObject.connectSlotsByName(AlertForm)
def retranslateUi(self, AlertForm):
- AlertForm.setWindowTitle(translate(u'AlertForm', u'Alert Message'))
- self.AlertEntryLabel.setText(translate(u'AlertForm', u'Alert Text:'))
- self.DisplayButton.setText(translate(u'AlertForm', u'Display'))
- self.CancelButton.setText(translate(u'AlertForm', u'Cancel'))
+ AlertForm.setWindowTitle(self.trUtf8(u'Alert Message'))
+ self.AlertEntryLabel.setText(self.trUtf8(u'Alert Text:'))
+ self.DisplayButton.setText(self.trUtf8(u'Display'))
+ self.CancelButton.setText(self.trUtf8(u'Cancel'))
def onDisplayClicked(self):
self.parent.mainDisplay.displayAlert(self.AlertEntryEditItem.text())
diff --git a/openlp/core/ui/alertstab.py b/openlp/core/ui/alertstab.py
index 251033966..206826a09 100644
--- a/openlp/core/ui/alertstab.py
+++ b/openlp/core/ui/alertstab.py
@@ -31,10 +31,11 @@ class AlertsTab(SettingsTab):
AlertsTab is the alerts settings tab in the settings dialog.
"""
def __init__(self):
+ SettingsTab.__init__(self, u'Alerts', u'Alerts')
+ # Use the line below when pulling the translation template file.
+ #SettingsTab.__init__(self, self.trUtf8(u'Alerts'), u'Alerts')
self.font_color = '#ffffff'
self.bg_color = '#660000'
- SettingsTab.__init__(
- self, translate(u'AlertsTab', u'Alerts'), u'Alerts')
def setupUi(self):
self.setObjectName(u'AlertsTab')
@@ -147,16 +148,14 @@ class AlertsTab(SettingsTab):
QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
def retranslateUi(self):
- self.FontGroupBox.setTitle(translate(u'AlertsTab', u'Font'))
- self.FontLabel.setText(translate(u'AlertsTab', u'Font Name:'))
- self.FontColorLabel.setText(translate(u'AlertsTab', u'Font Color:'))
- self.BackgroundColorLabel.setText(
- translate(u'AlertsTab', u'Background Color:'))
- self.TimeoutLabel.setText(translate(u'AlertsTab', u'Alert timeout:'))
- self.TimeoutSpinBox.setSuffix(translate(u'AlertsTab', u's'))
- self.PreviewGroupBox.setTitle(translate(u'AlertsTab', u'Preview'))
- self.FontPreview.setText(
- translate(u'AlertsTab', u'openlp.org 2.0 rocks!'))
+ self.FontGroupBox.setTitle(self.trUtf8(u'Font'))
+ self.FontLabel.setText(self.trUtf8(u'Font Name:'))
+ self.FontColorLabel.setText(self.trUtf8(u'Font Color:'))
+ self.BackgroundColorLabel.setText(self.trUtf8(u'Background Color:'))
+ self.TimeoutLabel.setText(self.trUtf8(u'Alert timeout:'))
+ self.TimeoutSpinBox.setSuffix(self.trUtf8(u's'))
+ self.PreviewGroupBox.setTitle(self.trUtf8(u'Preview'))
+ self.FontPreview.setText(self.trUtf8(u'openlp.org 2.0 rocks!'))
def onBackgroundColorButtonClicked(self):
self.bg_color = QtGui.QColorDialog.getColor(
diff --git a/openlp/core/ui/amendthemedialog.py b/openlp/core/ui/amendthemedialog.py
index 4b99b6969..9e5c4e4b5 100644
--- a/openlp/core/ui/amendthemedialog.py
+++ b/openlp/core/ui/amendthemedialog.py
@@ -562,79 +562,91 @@ class Ui_AmendThemeDialog(object):
AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox)
def retranslateUi(self, AmendThemeDialog):
- AmendThemeDialog.setWindowTitle(translate(u'AmendThemeDialog', u'Theme Maintenance'))
- self.ThemeNameLabel.setText(translate(u'AmendThemeDialog', u'Theme Name:'))
- self.BackgroundLabel.setText(translate(u'AmendThemeDialog', u'Background:'))
- self.BackgroundComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Opaque'))
- self.BackgroundComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Transparent'))
- self.BackgroundTypeLabel.setText(translate(u'AmendThemeDialog', u'Background Type:'))
- self.BackgroundTypeComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Solid Color'))
- self.BackgroundTypeComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Gradient'))
- self.BackgroundTypeComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Image'))
- self.Color1Label.setText(translate(u'AmendThemeDialog', u''))
- self.Color2Label.setText(translate(u'AmendThemeDialog', u''))
- self.ImageLabel.setText(translate(u'AmendThemeDialog', u'Image:'))
- self.GradientLabel.setText(translate(u'AmendThemeDialog', u'Gradient :'))
- self.GradientComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Horizontal'))
- self.GradientComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Vertical'))
- self.GradientComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Circular'))
- self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.BackgroundTab), translate(u'AmendThemeDialog', u'Background'))
- self.FontMainGroupBox.setTitle(translate(u'AmendThemeDialog', u'Main Font'))
- self.FontMainlabel.setText(translate(u'AmendThemeDialog', u'Font:'))
- self.FontMainColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:'))
- self.FontMainSize.setText(translate(u'AmendThemeDialog', u'Size:'))
- self.FontMainSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt'))
- self.FontMainWrapIndentationLabel.setText(translate(u'AmendThemeDialog', u'Wrap Indentation'))
- self.FontMainWeightComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Normal'))
- self.FontMainWeightComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Bold'))
- self.FontMainWeightComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Italics'))
- self.FontMainWeightComboBox.setItemText(3, translate(u'AmendThemeDialog', u'Bold/Italics'))
+ AmendThemeDialog.setWindowTitle(self.trUtf8(u'Theme Maintenance'))
+ self.ThemeNameLabel.setText(self.trUtf8(u'Theme Name:'))
+ self.BackgroundLabel.setText(self.trUtf8(u'Background:'))
+ self.BackgroundComboBox.setItemText(0, self.trUtf8(u'Opaque'))
+ self.BackgroundComboBox.setItemText(1, self.trUtf8(u'Transparent'))
+ self.BackgroundTypeLabel.setText(self.trUtf8(u'Background Type:'))
+ self.BackgroundTypeComboBox.setItemText(0, self.trUtf8(u'Solid Color'))
+ self.BackgroundTypeComboBox.setItemText(1, self.trUtf8(u'Gradient'))
+ self.BackgroundTypeComboBox.setItemText(2, self.trUtf8(u'Image'))
+ self.Color1Label.setText(self.trUtf8(u''))
+ self.Color2Label.setText(self.trUtf8(u''))
+ self.ImageLabel.setText(self.trUtf8(u'Image:'))
+ self.GradientLabel.setText(self.trUtf8(u'Gradient :'))
+ self.GradientComboBox.setItemText(0, self.trUtf8(u'Horizontal'))
+ self.GradientComboBox.setItemText(1, self.trUtf8(u'Vertical'))
+ self.GradientComboBox.setItemText(2, self.trUtf8(u'Circular'))
+ self.ThemeTabWidget.setTabText(
+ self.ThemeTabWidget.indexOf(self.BackgroundTab),
+ self.trUtf8(u'Background'))
+ self.FontMainGroupBox.setTitle(self.trUtf8(u'Main Font'))
+ self.FontMainlabel.setText(self.trUtf8(u'Font:'))
+ self.FontMainColorLabel.setText(self.trUtf8(u'Font Color:'))
+ self.FontMainSize.setText(self.trUtf8(u'Size:'))
+ self.FontMainSizeSpinBox.setSuffix(self.trUtf8(u'pt'))
+ self.FontMainWrapIndentationLabel.setText(self.trUtf8(u'Wrap Indentation'))
+ self.FontMainWeightComboBox.setItemText(0, self.trUtf8(u'Normal'))
+ self.FontMainWeightComboBox.setItemText(1, self.trUtf8(u'Bold'))
+ self.FontMainWeightComboBox.setItemText(2, self.trUtf8(u'Italics'))
+ self.FontMainWeightComboBox.setItemText(3, self.trUtf8(u'Bold/Italics'))
self.FontMainWeightLabel.setText(translate("AmendThemeDialog", u'Font Weight:'))
- self.MainLocationGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location'))
- self.DefaultLocationLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:'))
- self.FontMainXLabel.setText(translate(u'AmendThemeDialog', u'X Position:'))
- self.FontMainYLabel.setText(translate(u'AmendThemeDialog', u'Y Position:'))
- self.FontMainWidthLabel.setText(translate(u'AmendThemeDialog', u'Width:'))
- self.FontMainHeightLabel.setText(translate(u'AmendThemeDialog', u'Height:'))
- self.FontMainXSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontMainYSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontMainWidthSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontMainHeightSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontMainTab), translate(u'AmendThemeDialog', u'Font Main'))
- self.FooterFontGroupBox.setTitle(translate(u'AmendThemeDialog', u'Footer Font'))
- self.FontFooterLabel.setText(translate(u'AmendThemeDialog', u'Font:'))
- self.FontFooterColorLabel.setText(translate(u'AmendThemeDialog', u'Font Color:'))
- self.FontFooterSizeLabel.setText(translate(u'AmendThemeDialog', u'Size:'))
- self.FontFooterSizeSpinBox.setSuffix(translate(u'AmendThemeDialog', u'pt'))
- self.FontFooterWeightComboBox.setItemText(0, translate("AmendThemeDialog", u'Normal'))
- self.FontFooterWeightComboBox.setItemText(1, translate("AmendThemeDialog", u'Bold'))
- self.FontFooterWeightComboBox.setItemText(2, translate("AmendThemeDialog", u'Italics'))
- self.FontFooterWeightComboBox.setItemText(3, translate("AmendThemeDialog", u'Bold/Italics'))
- self.FontFooterWeightLabel.setText(translate("AmendThemeDialog", u'Font Weight:'))
- self.LocationFooterGroupBox.setTitle(translate(u'AmendThemeDialog', u'Display Location'))
- self.FontFooterDefaultLabel.setText(translate(u'AmendThemeDialog', u'Use Default Location:'))
- self.FontFooterXLabel.setText(translate(u'AmendThemeDialog', u'X Position:'))
- self.FontFooterYLabel.setText(translate(u'AmendThemeDialog', u'Y Position:'))
- self.FontFooterWidthLabel.setText(translate(u'AmendThemeDialog', u'Width:'))
- self.FontFooterHeightLabel.setText(translate(u'AmendThemeDialog', u'Height:'))
- self.FontFooterXSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontFooterYSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontFooterWidthSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.FontFooterHeightSpinBox.setSuffix(translate(u'AmendThemeDialog', u'px'))
- self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.FontFooterTab), translate(u'AmendThemeDialog', u'Font Footer'))
- self.ShadowGroupBox.setTitle(translate(u'AmendThemeDialog', u'Shadow && Outline'))
- self.OutlineColorLabel.setText(translate(u'AmendThemeDialog', u'Outline Color:'))
- self.OutlineEnabledLabel.setText(translate(u'AmendThemeDialog', u'Show Outline:'))
- self.ShadowColorLabel.setText(translate(u'AmendThemeDialog', u'Shadow Color:'))
- self.ShadowEnabledLabel.setText(translate(u'AmendThemeDialog', u'Show Shadow:'))
- self.AlignmentGroupBox.setTitle(translate(u'AmendThemeDialog', u'Alignment'))
- self.HorizontalLabel.setText(translate(u'AmendThemeDialog', u'Horizontal Align:'))
- self.HorizontalComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Left'))
- self.HorizontalComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Right'))
- self.HorizontalComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Center'))
- self.VerticalLabel.setText(translate(u'AmendThemeDialog', u'Vertical Align:'))
- self.VerticalComboBox.setItemText(0, translate(u'AmendThemeDialog', u'Top'))
- self.VerticalComboBox.setItemText(1, translate(u'AmendThemeDialog', u'Middle'))
- self.VerticalComboBox.setItemText(2, translate(u'AmendThemeDialog', u'Bottom'))
- self.ThemeTabWidget.setTabText(self.ThemeTabWidget.indexOf(self.OtherOptionsTab), translate(u'AmendThemeDialog', u'Other Options'))
- self.PreviewGroupBox.setTitle(translate(u'AmendThemeDialog', u'Preview'))
+ self.MainLocationGroupBox.setTitle(self.trUtf8(u'Display Location'))
+ self.DefaultLocationLabel.setText(self.trUtf8(u'Use Default Location:'))
+ self.FontMainXLabel.setText(self.trUtf8(u'X Position:'))
+ self.FontMainYLabel.setText(self.trUtf8(u'Y Position:'))
+ self.FontMainWidthLabel.setText(self.trUtf8(u'Width:'))
+ self.FontMainHeightLabel.setText(self.trUtf8(u'Height:'))
+ self.FontMainXSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontMainYSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontMainWidthSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontMainHeightSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.ThemeTabWidget.setTabText(
+ self.ThemeTabWidget.indexOf(self.FontMainTab),
+ self.trUtf8(u'Font Main'))
+ self.FooterFontGroupBox.setTitle(self.trUtf8(u'Footer Font'))
+ self.FontFooterLabel.setText(self.trUtf8(u'Font:'))
+ self.FontFooterColorLabel.setText(self.trUtf8(u'Font Color:'))
+ self.FontFooterSizeLabel.setText(self.trUtf8(u'Size:'))
+ self.FontFooterSizeSpinBox.setSuffix(self.trUtf8(u'pt'))
+ self.FontFooterWeightComboBox.setItemText(
+ 0, translate("AmendThemeDialog", u'Normal'))
+ self.FontFooterWeightComboBox.setItemText(
+ 1, translate("AmendThemeDialog", u'Bold'))
+ self.FontFooterWeightComboBox.setItemText(
+ 2, translate("AmendThemeDialog", u'Italics'))
+ self.FontFooterWeightComboBox.setItemText(
+ 3, translate("AmendThemeDialog", u'Bold/Italics'))
+ self.FontFooterWeightLabel.setText(self.trUtf8(u'Font Weight:'))
+ self.LocationFooterGroupBox.setTitle(self.trUtf8(u'Display Location'))
+ self.FontFooterDefaultLabel.setText(self.trUtf8(u'Use Default Location:'))
+ self.FontFooterXLabel.setText(self.trUtf8(u'X Position:'))
+ self.FontFooterYLabel.setText(self.trUtf8(u'Y Position:'))
+ self.FontFooterWidthLabel.setText(self.trUtf8(u'Width:'))
+ self.FontFooterHeightLabel.setText(self.trUtf8(u'Height:'))
+ self.FontFooterXSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontFooterYSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontFooterWidthSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.FontFooterHeightSpinBox.setSuffix(self.trUtf8(u'px'))
+ self.ThemeTabWidget.setTabText(
+ self.ThemeTabWidget.indexOf(self.FontFooterTab),
+ self.trUtf8(u'Font Footer'))
+ self.ShadowGroupBox.setTitle(self.trUtf8(u'Shadow && Outline'))
+ self.OutlineColorLabel.setText(self.trUtf8(u'Outline Color:'))
+ self.OutlineEnabledLabel.setText(self.trUtf8(u'Show Outline:'))
+ self.ShadowColorLabel.setText(self.trUtf8(u'Shadow Color:'))
+ self.ShadowEnabledLabel.setText(self.trUtf8(u'Show Shadow:'))
+ self.AlignmentGroupBox.setTitle(self.trUtf8(u'Alignment'))
+ self.HorizontalLabel.setText(self.trUtf8(u'Horizontal Align:'))
+ self.HorizontalComboBox.setItemText(0, self.trUtf8(u'Left'))
+ self.HorizontalComboBox.setItemText(1, self.trUtf8(u'Right'))
+ self.HorizontalComboBox.setItemText(2, self.trUtf8(u'Center'))
+ self.VerticalLabel.setText(self.trUtf8(u'Vertical Align:'))
+ self.VerticalComboBox.setItemText(0, self.trUtf8(u'Top'))
+ self.VerticalComboBox.setItemText(1, self.trUtf8(u'Middle'))
+ self.VerticalComboBox.setItemText(2, self.trUtf8(u'Bottom'))
+ self.ThemeTabWidget.setTabText(
+ self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
+ self.trUtf8(u'Other Options'))
+ self.PreviewGroupBox.setTitle(self.trUtf8(u'Preview'))
diff --git a/openlp/core/ui/amendthemeform.py b/openlp/core/ui/amendthemeform.py
index af039852e..82afbd332 100644
--- a/openlp/core/ui/amendthemeform.py
+++ b/openlp/core/ui/amendthemeform.py
@@ -199,7 +199,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
self.previewTheme(self.theme)
def onImageToolButtonClicked(self):
- filename = QtGui.QFileDialog.getOpenFileName(self, 'Open file')
+ filename = QtGui.QFileDialog.getOpenFileName(
+ self, self.trUtf8('Open file'))
if filename != u'':
self.ImageLineEdit.setText(filename)
self.theme.background_filename = filename
@@ -592,8 +593,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
if theme.background_type == u'solid':
self.Color1PushButton.setStyleSheet(
u'background-color: %s' % unicode(theme.background_color))
- self.Color1Label.setText(translate(u'ThemeManager',
- u'Background Color:'))
+ self.Color1Label.setText(self.trUtf8(u'Background Color:'))
self.Color1Label.setVisible(True)
self.Color1PushButton.setVisible(True)
self.Color2Label.setVisible(False)
@@ -608,10 +608,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
% unicode(theme.background_startColor))
self.Color2PushButton.setStyleSheet(u'background-color: %s' \
% unicode(theme.background_endColor))
- self.Color1Label.setText(translate(u'ThemeManager',
- u'First Color:'))
- self.Color2Label.setText(translate(u'ThemeManager',
- u'Second Color:'))
+ self.Color1Label.setText(self.trUtf8(u'First Color:'))
+ self.Color2Label.setText(self.trUtf8(u'Second Color:'))
self.Color1Label.setVisible(True)
self.Color1PushButton.setVisible(True)
self.Color2Label.setVisible(True)
@@ -675,8 +673,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
int(main_weight), # weight
self.theme.font_main_italics)# italic
metrics = QtGui.QFontMetrics(mainFont)
- page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2 ) - 1
+ page_length = (int(self.FontMainHeightSpinBox.value()) / metrics.height() - 2) - 1
self.FontMainLinesPageLabel.setText(
- translate(u'ThemeManager', u'Slide Height is %s rows' % page_length ))
+ self.trUtf8(u'Slide Height is %s rows') % page_length)
frame = self.thememanager.generateImage(theme)
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
diff --git a/openlp/core/ui/generaltab.py b/openlp/core/ui/generaltab.py
index 0c3af4c5d..63e9eeae7 100644
--- a/openlp/core/ui/generaltab.py
+++ b/openlp/core/ui/generaltab.py
@@ -32,7 +32,9 @@ class GeneralTab(SettingsTab):
"""
def __init__(self, screen_list):
self.screen_list = screen_list
- SettingsTab.__init__(self, translate(u'GeneralTab', u'General'), u'General')
+ SettingsTab.__init__(self, u'General', u'General')
+ # Use this line when pulling the translation template
+ #SettingsTab.__init__(self, self.trUtf8(u'General'), u'General')
def setupUi(self):
self.setObjectName(u'GeneralTab')
@@ -131,16 +133,16 @@ class GeneralTab(SettingsTab):
QtCore.SIGNAL(u'editingFinished()'), self.onPasswordEditLostFocus)
def retranslateUi(self):
- self.MonitorGroupBox.setTitle(translate(u'GeneralTab', u'Monitors'))
- self.MonitorLabel.setText(translate(u'GeneralTab', u'Select monitor for output display:'))
- self.StartupGroupBox.setTitle(translate(u'GeneralTab', u'Application Startup'))
- self.WarningCheckBox.setText(translate(u'GeneralTab', u'Show blank screen warning'))
- self.AutoOpenCheckBox.setText(translate(u'GeneralTab', u'Automatically open the last service'))
- self.ShowSplashCheckBox.setText(translate(u'GeneralTab', u'Show the splash screen'))
- self.CCLIGroupBox.setTitle(translate(u'GeneralTab', u'CCLI Details'))
- self.NumberLabel.setText(translate(u'GeneralTab', u'CCLI Number:'))
- self.UsernameLabel.setText(translate(u'GeneralTab', u'SongSelect Username:'))
- self.PasswordLabel.setText(translate(u'GeneralTab', u'SongSelect Password:'))
+ self.MonitorGroupBox.setTitle(self.trUtf8(u'Monitors'))
+ self.MonitorLabel.setText(self.trUtf8(u'Select monitor for output display:'))
+ self.StartupGroupBox.setTitle(self.trUtf8(u'Application Startup'))
+ self.WarningCheckBox.setText(self.trUtf8(u'Show blank screen warning'))
+ self.AutoOpenCheckBox.setText(self.trUtf8(u'Automatically open the last service'))
+ self.ShowSplashCheckBox.setText(self.trUtf8(u'Show the splash screen'))
+ self.CCLIGroupBox.setTitle(self.trUtf8(u'CCLI Details'))
+ self.NumberLabel.setText(self.trUtf8(u'CCLI Number:'))
+ self.UsernameLabel.setText(self.trUtf8(u'SongSelect Username:'))
+ self.PasswordLabel.setText(self.trUtf8(u'SongSelect Password:'))
def onMonitorComboBoxChanged(self):
self.MonitorNumber = self.MonitorComboBox.currentIndex()
@@ -165,11 +167,9 @@ class GeneralTab(SettingsTab):
def load(self):
for screen in self.screen_list:
- screen_name = translate(u'GeneralTab', u'Screen') + u' ' + \
- unicode(screen[u'number'] + 1)
+ screen_name = self.trUtf8(u'Screen %d') % (screen[u'number'] + 1)
if screen[u'primary']:
- screen_name = screen_name + u' (' + \
- translate(u'GeneralTab', u'primary') + u')'
+ screen_name = self.trUtf8(u'%s (primary)') % screen_name
self.MonitorComboBox.addItem(screen_name)
# Get the configs
self.MonitorNumber = int(self.config.get_config(u'Monitor', u'0'))
diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py
index 00d0f982a..c768210a0 100644
--- a/openlp/core/ui/mainwindow.py
+++ b/openlp/core/ui/mainwindow.py
@@ -307,114 +307,98 @@ class Ui_MainWindow(object):
"""
Set up the translation system
"""
- MainWindow.mainTitle = translate(u'mainWindow', u'OpenLP 2.0')
- MainWindow.defaultThemeText = translate(u'mainWindow',
+ MainWindow.mainTitle = self.trUtf8(u'OpenLP 2.0')
+ MainWindow.defaultThemeText = self.trUtf8(
'Default Theme: ')
MainWindow.setWindowTitle(MainWindow.mainTitle)
- self.FileMenu.setTitle(translate(u'mainWindow', u'&File'))
- self.FileImportMenu.setTitle(translate(u'mainWindow', u'&Import'))
- self.FileExportMenu.setTitle(translate(u'mainWindow', u'&Export'))
- self.OptionsMenu.setTitle(translate(u'mainWindow', u'&Options'))
- self.OptionsViewMenu.setTitle(translate(u'mainWindow', u'&View'))
- self.ViewModeMenu.setTitle(translate(u'mainWindow', u'M&ode'))
- self.OptionsLanguageMenu.setTitle(translate(u'mainWindow',
+ self.FileMenu.setTitle(self.trUtf8(u'&File'))
+ self.FileImportMenu.setTitle(self.trUtf8(u'&Import'))
+ self.FileExportMenu.setTitle(self.trUtf8(u'&Export'))
+ self.OptionsMenu.setTitle(self.trUtf8(u'&Options'))
+ self.OptionsViewMenu.setTitle(self.trUtf8(u'&View'))
+ self.ViewModeMenu.setTitle(self.trUtf8(u'M&ode'))
+ self.OptionsLanguageMenu.setTitle(self.trUtf8(
u'&Language'))
- self.ToolsMenu.setTitle(translate(u'mainWindow', u'&Tools'))
- self.HelpMenu.setTitle(translate(u'mainWindow', u'&Help'))
+ self.ToolsMenu.setTitle(self.trUtf8(u'&Tools'))
+ self.HelpMenu.setTitle(self.trUtf8(u'&Help'))
self.MediaManagerDock.setWindowTitle(
- translate(u'mainWindow', u'Media Manager'))
+ self.trUtf8(u'Media Manager'))
self.ServiceManagerDock.setWindowTitle(
- translate(u'mainWindow', u'Service Manager'))
+ self.trUtf8(u'Service Manager'))
self.ThemeManagerDock.setWindowTitle(
- translate(u'mainWindow', u'Theme Manager'))
- self.FileNewItem.setText(translate(u'mainWindow', u'&New'))
- self.FileNewItem.setToolTip(translate(u'mainWindow', u'New Service'))
- self.FileNewItem.setStatusTip(
- translate(u'mainWindow', u'Create a new Service'))
- self.FileNewItem.setShortcut(translate(u'mainWindow', u'Ctrl+N'))
- self.FileOpenItem.setText(translate(u'mainWindow', u'&Open'))
- self.FileOpenItem.setToolTip(translate(u'mainWindow', u'Open Service'))
- self.FileOpenItem.setStatusTip(
- translate(u'mainWindow', u'Open an existing service'))
- self.FileOpenItem.setShortcut(translate(u'mainWindow', u'Ctrl+O'))
- self.FileSaveItem.setText(translate(u'mainWindow', u'&Save'))
- self.FileSaveItem.setToolTip(translate(u'mainWindow', u'Save Service'))
+ self.trUtf8(u'Theme Manager'))
+ self.FileNewItem.setText(self.trUtf8(u'&New'))
+ self.FileNewItem.setToolTip(self.trUtf8(u'New Service'))
+ self.FileNewItem.setStatusTip(self.trUtf8(u'Create a new Service'))
+ self.FileNewItem.setShortcut(self.trUtf8(u'Ctrl+N'))
+ self.FileOpenItem.setText(self.trUtf8(u'&Open'))
+ self.FileOpenItem.setToolTip(self.trUtf8(u'Open Service'))
+ self.FileOpenItem.setStatusTip(self.trUtf8(u'Open an existing service'))
+ self.FileOpenItem.setShortcut(self.trUtf8(u'Ctrl+O'))
+ self.FileSaveItem.setText(self.trUtf8(u'&Save'))
+ self.FileSaveItem.setToolTip(self.trUtf8(u'Save Service'))
self.FileSaveItem.setStatusTip(
- translate(u'mainWindow', u'Save the current service to disk'))
- self.FileSaveItem.setShortcut(translate(u'mainWindow', u'Ctrl+S'))
- self.FileSaveAsItem.setText(translate(u'mainWindow', u'Save &As...'))
- self.FileSaveAsItem.setToolTip(
- translate(u'mainWindow', u'Save Service As'))
- self.FileSaveAsItem.setStatusTip(translate(u'mainWindow',
- u'Save the current service under a new name'))
- self.FileSaveAsItem.setShortcut(translate(u'mainWindow', u'F12'))
- self.FileExitItem.setText(translate(u'mainWindow', u'E&xit'))
- self.FileExitItem.setStatusTip(translate(u'mainWindow', u'Quit OpenLP'))
- self.FileExitItem.setShortcut(translate(u'mainWindow', u'Alt+F4'))
- self.ImportThemeItem.setText(translate(u'mainWindow', u'&Theme'))
- self.ImportLanguageItem.setText(translate(u'mainWindow', u'&Language'))
- self.ExportThemeItem.setText(translate(u'mainWindow', u'&Theme'))
- self.ExportLanguageItem.setText(translate(u'mainWindow', u'&Language'))
- self.actionLook_Feel.setText(translate(u'mainWindow', u'Look && &Feel'))
- self.OptionsSettingsItem.setText(translate(u'mainWindow', u'&Settings'))
- self.ViewMediaManagerItem.setText(
- translate(u'mainWindow', u'&Media Manager'))
- self.ViewMediaManagerItem.setToolTip(
- translate(u'mainWindow', u'Toggle Media Manager'))
- self.ViewMediaManagerItem.setStatusTip(translate(u'mainWindow',
- u'Toggle the visibility of the Media Manager'))
- self.ViewMediaManagerItem.setShortcut(translate(u'mainWindow', u'F8'))
- self.ViewThemeManagerItem.setText(
- translate(u'mainWindow', u'&Theme Manager'))
- self.ViewThemeManagerItem.setToolTip(
- translate(u'mainWindow', u'Toggle Theme Manager'))
- self.ViewThemeManagerItem.setStatusTip(translate(u'mainWindow',
- u'Toggle the visibility of the Theme Manager'))
- self.ViewThemeManagerItem.setShortcut(translate(u'mainWindow', u'F10'))
- self.ViewServiceManagerItem.setText(
- translate(u'mainWindow', u'&Service Manager'))
+ self.trUtf8(u'Save the current service to disk'))
+ self.FileSaveItem.setShortcut(self.trUtf8(u'Ctrl+S'))
+ self.FileSaveAsItem.setText(self.trUtf8(u'Save &As...'))
+ self.FileSaveAsItem.setToolTip(self.trUtf8(u'Save Service As'))
+ self.FileSaveAsItem.setStatusTip(
+ self.trUtf8(u'Save the current service under a new name'))
+ self.FileSaveAsItem.setShortcut(self.trUtf8(u'F12'))
+ self.FileExitItem.setText(self.trUtf8(u'E&xit'))
+ self.FileExitItem.setStatusTip(self.trUtf8(u'Quit OpenLP'))
+ self.FileExitItem.setShortcut(self.trUtf8(u'Alt+F4'))
+ self.ImportThemeItem.setText(self.trUtf8(u'&Theme'))
+ self.ImportLanguageItem.setText(self.trUtf8(u'&Language'))
+ self.ExportThemeItem.setText(self.trUtf8(u'&Theme'))
+ self.ExportLanguageItem.setText(self.trUtf8(u'&Language'))
+ self.actionLook_Feel.setText(self.trUtf8(u'Look && &Feel'))
+ self.OptionsSettingsItem.setText(self.trUtf8(u'&Settings'))
+ self.ViewMediaManagerItem.setText(self.trUtf8(u'&Media Manager'))
+ self.ViewMediaManagerItem.setToolTip(self.trUtf8(u'Toggle Media Manager'))
+ self.ViewMediaManagerItem.setStatusTip(
+ self.trUtf8(u'Toggle the visibility of the Media Manager'))
+ self.ViewMediaManagerItem.setShortcut(self.trUtf8(u'F8'))
+ self.ViewThemeManagerItem.setText(self.trUtf8(u'&Theme Manager'))
+ self.ViewThemeManagerItem.setToolTip(self.trUtf8(u'Toggle Theme Manager'))
+ self.ViewThemeManagerItem.setStatusTip(
+ self.trUtf8(u'Toggle the visibility of the Theme Manager'))
+ self.ViewThemeManagerItem.setShortcut(self.trUtf8(u'F10'))
+ self.ViewServiceManagerItem.setText(self.trUtf8(u'&Service Manager'))
self.ViewServiceManagerItem.setToolTip(
- translate(u'mainWindow', u'Toggle Service Manager'))
- self.ViewServiceManagerItem.setStatusTip(translate(u'mainWindow',
- u'Toggle the visibility of the Service Manager'))
- self.ViewServiceManagerItem.setShortcut(translate(u'mainWindow', u'F9'))
- self.action_Preview_Panel.setText(
- translate(u'mainWindow', u'&Preview Panel'))
- self.action_Preview_Panel.setToolTip(
- translate(u'mainWindow', u'Toggle Preview Panel'))
- self.action_Preview_Panel.setStatusTip(translate(u'mainWindow',
- u'Toggle the visibility of the Preview Panel'))
- self.action_Preview_Panel.setShortcut(translate(u'mainWindow', u'F11'))
- self.ToolsAlertItem.setText(translate(u'mainWindow', u'&Alert'))
- self.ToolsAlertItem.setStatusTip(
- translate(u'mainWindow', u'Show an alert message'))
- self.ToolsAlertItem.setShortcut(translate(u'mainWindow', u'F7'))
- self.PluginItem.setText(translate(u'mainWindow', u'&Plugin List'))
- self.PluginItem.setStatusTip(
- translate(u'mainWindow', u'List the Plugins'))
- self.PluginItem.setShortcut(translate(u'mainWindow', u'Alt+F7'))
- self.HelpDocumentationItem.setText(
- translate(u'mainWindow', u'&User Guide'))
- self.HelpAboutItem.setText(translate(u'mainWindow', u'&About'))
+ self.trUtf8(u'Toggle Service Manager'))
+ self.ViewServiceManagerItem.setStatusTip(
+ self.trUtf8(u'Toggle the visibility of the Service Manager'))
+ self.ViewServiceManagerItem.setShortcut(self.trUtf8(u'F9'))
+ self.action_Preview_Panel.setText(self.trUtf8(u'&Preview Panel'))
+ self.action_Preview_Panel.setToolTip(self.trUtf8(u'Toggle Preview Panel'))
+ self.action_Preview_Panel.setStatusTip(
+ self.trUtf8(u'Toggle the visibility of the Preview Panel'))
+ self.action_Preview_Panel.setShortcut(self.trUtf8(u'F11'))
+ self.ToolsAlertItem.setText(self.trUtf8(u'&Alert'))
+ self.ToolsAlertItem.setStatusTip(self.trUtf8(u'Show an alert message'))
+ self.ToolsAlertItem.setShortcut(self.trUtf8(u'F7'))
+ self.PluginItem.setText(self.trUtf8(u'&Plugin List'))
+ self.PluginItem.setStatusTip(self.trUtf8(u'List the Plugins'))
+ self.PluginItem.setShortcut(self.trUtf8(u'Alt+F7'))
+ self.HelpDocumentationItem.setText(self.trUtf8(u'&User Guide'))
+ self.HelpAboutItem.setText(self.trUtf8(u'&About'))
self.HelpAboutItem.setStatusTip(
- translate(u'mainWindow', u'More information about OpenLP'))
- self.HelpAboutItem.setShortcut(translate(u'mainWindow', u'Ctrl+F1'))
- self.HelpOnlineHelpItem.setText(
- translate(u'mainWindow', u'&Online Help'))
- self.HelpWebSiteItem.setText(translate(u'mainWindow', u'&Web Site'))
- self.LanguageTranslateItem.setText(
- translate(u'mainWindow', u'&Translate'))
- self.LanguageTranslateItem.setStatusTip(translate(u'mainWindow',
- u'Translate the interface to your language'))
- self.LanguageEnglishItem.setText(translate(u'mainWindow', u'English'))
- self.LanguageEnglishItem.setStatusTip(translate(u'mainWindow',
- u'Set the interface language to English'))
- self.ToolsAddToolItem.setText(translate(u'mainWindow', u'&Add Tool...'))
- self.ToolsAddToolItem.setStatusTip(translate(u'mainWindow',
- u'Add an application to the list of tools'))
- self.action_Preview_Panel.setText(
- translate(u'mainWindow', u'&Preview Pane'))
- self.ModeLiveItem.setText(translate(u'mainWindow', u'&Live'))
+ self.trUtf8(u'More information about OpenLP'))
+ self.HelpAboutItem.setShortcut(self.trUtf8(u'Ctrl+F1'))
+ self.HelpOnlineHelpItem.setText(self.trUtf8(u'&Online Help'))
+ self.HelpWebSiteItem.setText(self.trUtf8(u'&Web Site'))
+ self.LanguageTranslateItem.setText(self.trUtf8(u'&Translate'))
+ self.LanguageTranslateItem.setStatusTip(
+ self.trUtf8(u'Translate the interface to your language'))
+ self.LanguageEnglishItem.setText(self.trUtf8(u'English'))
+ self.LanguageEnglishItem.setStatusTip(
+ self.trUtf8(u'Set the interface language to English'))
+ self.ToolsAddToolItem.setText(self.trUtf8(u'&Add Tool...'))
+ self.ToolsAddToolItem.setStatusTip(
+ self.trUtf8(u'Add an application to the list of tools'))
+ self.action_Preview_Panel.setText(self.trUtf8(u'&Preview Pane'))
+ self.ModeLiveItem.setText(self.trUtf8(u'&Live'))
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
@@ -546,9 +530,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
version = check_latest_version(self.generalConfig, applicationVersion)
if applicationVersion != version:
QtGui.QMessageBox.question(None,
- translate(u'mainWindow', u'OpenLP version Updated'),
- translate(u'mainWindow', u'OpenLP version %s has been updated to version %s'
- % (applicationVersion, version)),
+ self.trUtf8(u'OpenLP version Updated'),
+ self.trUtf8(u'OpenLP version %s has been updated to version %s')
+ % (applicationVersion, version),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
self.generalConfig.set_config(u'Application version', version)
@@ -584,8 +568,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
if str_to_bool(self.generalConfig.get_config(u'Screen Blank', False)) \
and str_to_bool(self.generalConfig.get_config(u'Blank Warning', False)):
QtGui.QMessageBox.question(None,
- translate(u'mainWindow', u'OpenLP Main Display Blanked'),
- translate(u'mainWindow', u'The Main Display has been blanked out'),
+ self.trUtf8(u'OpenLP Main Display Blanked'),
+ self.trUtf8(u'The Main Display has been blanked out'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
QtGui.QMessageBox.Ok)
self.LiveController.blackPushButton.setChecked(True)
@@ -624,8 +608,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
"""
if self.serviceNotSaved == True:
ret = QtGui.QMessageBox.question(None,
- translate(u'mainWindow', u'Save Changes to Service?'),
- translate(u'mainWindow', u'Your service has changed, do you want to save those changes?'),
+ self.trUtf8(u'Save Changes to Service?'),
+ self.trUtf8(u'Your service has changed, do you want to save those changes?'),
QtGui.QMessageBox.StandardButtons(
QtGui.QMessageBox.Cancel |
QtGui.QMessageBox.Discard |
diff --git a/openlp/core/ui/plugindialog.py b/openlp/core/ui/plugindialog.py
index ba7491912..5d9ca5ef2 100644
--- a/openlp/core/ui/plugindialog.py
+++ b/openlp/core/ui/plugindialog.py
@@ -93,25 +93,17 @@ class Ui_PluginViewDialog(object):
self.PluginLayout.addWidget(self.PluginListButtonBox)
self.retranslateUi(PluginViewDialog)
- QtCore.QObject.connect(
- self.PluginListButtonBox,
- QtCore.SIGNAL(u'accepted()'),
- PluginViewDialog.close)
+ QtCore.QObject.connect(self.PluginListButtonBox,
+ QtCore.SIGNAL(u'accepted()'), PluginViewDialog.close)
QtCore.QMetaObject.connectSlotsByName(PluginViewDialog)
def retranslateUi(self, PluginViewDialog):
- PluginViewDialog.setWindowTitle(
- translate(u'PluginViewDialog', u'Plugin List'))
- self.PluginInfoGroupBox.setTitle(
- translate(u'PluginViewDialog', u'Plugin Details'))
- self.VersionLabel.setText(
- translate(u'PluginViewDialog', u'Version:'))
- self.VersionNumberLabel.setText(
- translate(u'PluginViewDialog', u'TextLabel'))
- self.AboutLabel.setText(translate(u'PluginViewDialog', u'About:'))
- self.StatusLabel.setText(translate(u'PluginViewDialog', u'Status:'))
- self.StatusComboBox.setItemText(
- 0, translate(u'PluginViewDialog', u'Active'))
- self.StatusComboBox.setItemText(
- 1, translate(u'PluginViewDialog', u'Inactive'))
+ PluginViewDialog.setWindowTitle(self.trUtf8(u'Plugin List'))
+ self.PluginInfoGroupBox.setTitle(self.trUtf8(u'Plugin Details'))
+ self.VersionLabel.setText(self.trUtf8(u'Version:'))
+ self.VersionNumberLabel.setText(self.trUtf8(u'TextLabel'))
+ self.AboutLabel.setText(self.trUtf8(u'About:'))
+ self.StatusLabel.setText(self.trUtf8(u'Status:'))
+ self.StatusComboBox.setItemText(0, self.trUtf8(u'Active'))
+ self.StatusComboBox.setItemText(1, self.trUtf8(u'Inactive'))
diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py
index 2b5838b3f..4355667af 100644
--- a/openlp/core/ui/servicemanager.py
+++ b/openlp/core/ui/servicemanager.py
@@ -116,25 +116,22 @@ class ServiceManager(QtGui.QWidget):
self.Layout.setMargin(0)
# Create the top toolbar
self.Toolbar = OpenLPToolbar(self)
- self.Toolbar.addToolbarButton(u'New Service',
- u':/services/service_new.png',
- translate(u'ServiceManager', u'Create a new service'),
- self.onNewService)
- self.Toolbar.addToolbarButton(u'Open Service',
- u':/services/service_open.png',
- translate(u'ServiceManager', u'Load an existing service'),
- self.onLoadService)
- self.Toolbar.addToolbarButton(u'Save Service',
- u':/services/service_save.png',
- translate(u'ServiceManager', u'Save this service'),
- self.onSaveService)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'New Service'), u':/services/service_new.png',
+ self.trUtf8(u'Create a new service'), self.onNewService)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Open Service'), u':/services/service_open.png',
+ self.trUtf8(u'Load an existing service'), self.onLoadService)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Save Service'), u':/services/service_save.png',
+ self.trUtf8(u'Save this service'), self.onSaveService)
self.Toolbar.addSeparator()
- self.ThemeLabel = QtGui.QLabel(translate(u'ServiceManager', u'Theme:'),
+ self.ThemeLabel = QtGui.QLabel(self.trUtf8(u'Theme:'),
self)
self.ThemeLabel.setMargin(3)
self.Toolbar.addWidget(self.ThemeLabel)
self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
- self.ThemeComboBox.setToolTip(translate(u'ServiceManager',
+ self.ThemeComboBox.setToolTip(self.trUtf8(
u'Select a theme for the service'))
self.ThemeComboBox.setSizeAdjustPolicy(
QtGui.QComboBox.AdjustToContents)
@@ -162,37 +159,34 @@ class ServiceManager(QtGui.QWidget):
QtCore.Qt.ActionsContextMenu)
self.ServiceManagerList.addAction(contextMenuAction(
self.ServiceManagerList, ':/system/system_preview.png',
- translate(u'ServiceManager',u'&Preview Verse'), self.makePreview))
+ self.trUtf8(u'&Preview Verse'), self.makePreview))
self.ServiceManagerList.addAction(contextMenuAction(
self.ServiceManagerList, ':/system/system_live.png',
- translate(u'ServiceManager',u'&Show Live'), self.makeLive))
+ self.trUtf8(u'&Show Live'), self.makeLive))
self.ServiceManagerList.addAction(contextMenuSeparator(
self.ServiceManagerList))
self.ServiceManagerList.addAction(contextMenuAction(
self.ServiceManagerList, ':/services/service_delete',
- translate(u'ServiceManager',u'&Remove from Service'),
- self.onDeleteFromService))
+ self.trUtf8(u'&Remove from Service'), self.onDeleteFromService))
self.Layout.addWidget(self.ServiceManagerList)
# Add the bottom toolbar
self.OrderToolbar = OpenLPToolbar(self)
- self.OrderToolbar.addToolbarButton(u'Move to top',
- u':/services/service_top.png',
- translate(u'ServiceManager', u'Move to top'), self.onServiceTop)
- self.OrderToolbar.addToolbarButton(u'Move up',
- u':/services/service_up.png',
- translate(u'ServiceManager', u'Move up order'), self.onServiceUp)
- self.OrderToolbar.addToolbarButton(u'Move down',
- u':/services/service_down.png',
- translate(u'ServiceManager', u'Move down order'),
- self.onServiceDown)
- self.OrderToolbar.addToolbarButton(u'Move to bottom',
- u':/services/service_bottom.png',
- translate(u'ServiceManager', u'Move to end'), self.onServiceEnd)
+ self.OrderToolbar.addToolbarButton(
+ self.trUtf8(u'Move to top'), u':/services/service_top.png',
+ self.trUtf8(u'Move to top'), self.onServiceTop)
+ self.OrderToolbar.addToolbarButton(
+ self.trUtf8(u'Move up'), u':/services/service_up.png',
+ self.trUtf8(u'Move up order'), self.onServiceUp)
+ self.OrderToolbar.addToolbarButton(
+ self.trUtf8(u'Move down'), u':/services/service_down.png',
+ self.trUtf8(u'Move down order'), self.onServiceDown)
+ self.OrderToolbar.addToolbarButton(
+ self.trUtf8(u'Move to bottom'), u':/services/service_bottom.png',
+ self.trUtf8(u'Move to end'), self.onServiceEnd)
self.OrderToolbar.addSeparator()
- self.OrderToolbar.addToolbarButton(u'Delete From Service',
- u':/services/service_delete.png',
- translate(u'ServiceManager', u'Delete From Service'),
- self.onDeleteFromService)
+ self.OrderToolbar.addToolbarButton(
+ self.trUtf8(u'Delete From Service'), u':/services/service_delete.png',
+ self.trUtf8(u'Delete From Service'), self.onDeleteFromService)
self.Layout.addWidget(self.OrderToolbar)
# Connect up our signals and slots
QtCore.QObject.connect(self.ThemeComboBox,
@@ -429,10 +423,9 @@ class ServiceManager(QtGui.QWidget):
if lastService:
filename = self.config.get_last_dir()
else:
- filename = QtGui.QFileDialog.getOpenFileName(self,
- translate(u'ThemeManager', u'Open Service'),
- self.config.get_last_dir(),
- u'Services (*.osz)')
+ filename = QtGui.QFileDialog.getOpenFileName(
+ self, self.trUtf8(u'Open Service'),
+ self.config.get_last_dir(), u'Services (*.osz)')
filename = unicode(filename)
name = filename.split(os.path.sep)
if filename != u'':
diff --git a/openlp/core/ui/settingsdialog.py b/openlp/core/ui/settingsdialog.py
index bf385bb37..a11c87fee 100644
--- a/openlp/core/ui/settingsdialog.py
+++ b/openlp/core/ui/settingsdialog.py
@@ -54,4 +54,4 @@ class Ui_SettingsDialog(object):
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
def retranslateUi(self, SettingsDialog):
- SettingsDialog.setWindowTitle(translate(u'SettingsDialog', u'Settings'))
+ SettingsDialog.setWindowTitle(self.trUtf8(u'Settings'))
diff --git a/openlp/core/ui/slidecontroller.py b/openlp/core/ui/slidecontroller.py
index 4f7163ba0..84aeca7e6 100644
--- a/openlp/core/ui/slidecontroller.py
+++ b/openlp/core/ui/slidecontroller.py
@@ -98,9 +98,9 @@ class SlideController(QtGui.QWidget):
# Type label for the top of the slide controller
self.TypeLabel = QtGui.QLabel(self.Panel)
if self.isLive:
- self.TypeLabel.setText(u'%s' % translate(u'SlideController', u'Live'))
+ self.TypeLabel.setText(u'%s' % self.trUtf8(u'Live'))
else:
- self.TypeLabel.setText(u'%s' % translate(u'SlideController', u'Preview'))
+ self.TypeLabel.setText(u'%s' % self.trUtf8(u'Preview'))
self.TypeLabel.setAlignment(QtCore.Qt.AlignCenter)
self.PanelLayout.addWidget(self.TypeLabel)
# Splitter
@@ -135,46 +135,39 @@ class SlideController(QtGui.QWidget):
self.Toolbar.sizePolicy().hasHeightForWidth())
self.Toolbar.setSizePolicy(sizeToolbarPolicy)
if self.isLive:
- self.Toolbar.addToolbarButton(u'First Slide',
- u':/slides/slide_first.png',
- translate(u'SlideController', u'Move to first'),
- self.onSlideSelectedFirst)
- self.Toolbar.addToolbarButton(u'Previous Slide',
- u':/slides/slide_previous.png',
- translate(u'SlideController', u'Move to previous'),
- self.onSlideSelectedPrevious)
- self.Toolbar.addToolbarButton(u'Next Slide',
- u':/slides/slide_next.png',
- translate(u'SlideController', u'Move to next'),
- self.onSlideSelectedNext)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'First Slide'), u':/slides/slide_first.png',
+ self.trUtf8(u'Move to first'), self.onSlideSelectedFirst)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Previous Slide'), u':/slides/slide_previous.png',
+ self.trUtf8(u'Move to previous'), self.onSlideSelectedPrevious)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Next Slide'), u':/slides/slide_next.png',
+ self.trUtf8(u'Move to next'), self.onSlideSelectedNext)
if self.isLive:
- self.Toolbar.addToolbarButton(u'Last Slide',
- u':/slides/slide_last.png',
- translate(u'SlideController', u'Move to last'),
- self.onSlideSelectedLast)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Last Slide'), u':/slides/slide_last.png',
+ self.trUtf8(u'Move to last'), self.onSlideSelectedLast)
if self.isLive:
self.Toolbar.addToolbarSeparator(u'Close Separator')
self.blackPushButton = self.Toolbar.addPushButton(
u':/slides/slide_close.png')
if not self.isLive:
self.Toolbar.addToolbarSeparator(u'Close Separator')
- self.Toolbar.addToolbarButton(u'Go Live',
- u':/system/system_live.png',
- translate(u'SlideController', u'Move to live'),
- self.onGoLive)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Go Live'), u':/system/system_live.png',
+ self.trUtf8(u'Move to live'), self.onGoLive)
if isLive:
self.Toolbar.addToolbarSeparator(u'Loop Separator')
- self.Toolbar.addToolbarButton(u'Start Loop',
- u':/media/media_time.png',
- translate(u'SlideController', u'Start continuous loop'),
- self.onStartLoop)
- self.Toolbar.addToolbarButton(u'Stop Loop',
- u':/media/media_stop.png',
- translate(u'SlideController', u'Stop continuous loop'),
- self.onStopLoop)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Start Loop'), u':/media/media_time.png',
+ self.trUtf8(u'Start continuous loop'), self.onStartLoop)
+ self.Toolbar.addToolbarButton(
+ self.trUtf8(u'Stop Loop'), u':/media/media_stop.png',
+ self.trUtf8(u'Stop continuous loop'), self.onStopLoop)
self.DelaySpinBox = QtGui.QSpinBox()
self.Toolbar.addToolbarWidget(u'Image SpinBox', self.DelaySpinBox)
- self.DelaySpinBox.setSuffix(translate(u'SlideController', u's'))
+ self.DelaySpinBox.setSuffix(self.trUtf8(u's'))
self.ControllerLayout.addWidget(self.Toolbar)
# Screen preview area
diff --git a/openlp/core/ui/splashscreen.py b/openlp/core/ui/splashscreen.py
index ef934ef6a..a541efb05 100644
--- a/openlp/core/ui/splashscreen.py
+++ b/openlp/core/ui/splashscreen.py
@@ -29,8 +29,7 @@ class SplashScreen(object):
def __init__(self, version):
self.splash_screen = QtGui.QSplashScreen()
self.setupUi()
- starting = translate(u'SplashScreen', u'Starting')
- self.message = starting + u'..... ' + version
+ self.message = self.trUtf8(u'Starting') + u'..... ' + version
def setupUi(self):
self.splash_screen.setObjectName(u'splash_screen')
@@ -56,8 +55,7 @@ class SplashScreen(object):
QtCore.QMetaObject.connectSlotsByName(self.splash_screen)
def retranslateUi(self):
- self.splash_screen.setWindowTitle(
- translate(u'splash_screen', u'Splash Screen'))
+ self.splash_screen.setWindowTitle(self.trUtf8(u'Splash Screen'))
def show(self):
self.splash_screen.show()
diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py
index 84f88c726..b306fa823 100644
--- a/openlp/core/ui/thememanager.py
+++ b/openlp/core/ui/thememanager.py
@@ -53,25 +53,21 @@ class ThemeManager(QtGui.QWidget):
self.amendThemeForm = AmendThemeForm(self)
self.Toolbar = OpenLPToolbar(self)
self.Toolbar.addToolbarButton(
- translate(u'ThemeManager', u'New Theme'), u':/themes/theme_new.png',
- translate(u'ThemeManager', u'Create a new theme'), self.onAddTheme)
+ self.trUtf8(u'New Theme'), u':/themes/theme_new.png',
+ self.trUtf8(u'Create a new theme'), self.onAddTheme)
self.Toolbar.addToolbarButton(
- translate(u'ThemeManager', u'Edit Theme'),
- u':/themes/theme_edit.png',
- translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme)
+ self.trUtf8(u'Edit Theme'), u':/themes/theme_edit.png',
+ self.trUtf8(u'Edit a theme'), self.onEditTheme)
self.Toolbar.addToolbarButton(
- translate(u'ThemeManager', u'Delete Theme'),
- u':/themes/theme_delete.png',
- translate(u'ThemeManager', u'Delete a theme'), self.onDeleteTheme)
+ self.trUtf8(u'Delete Theme'), u':/themes/theme_delete.png',
+ self.trUtf8(u'Delete a theme'), self.onDeleteTheme)
self.Toolbar.addSeparator()
self.Toolbar.addToolbarButton(
- translate(u'ThemeManager', u'Import Theme'),
- u':/themes/theme_import.png',
- translate(u'ThemeManager', u'Import a theme'), self.onImportTheme)
+ self.trUtf8(u'Import Theme'), u':/themes/theme_import.png',
+ self.trUtf8(u'Import a theme'), self.onImportTheme)
self.Toolbar.addToolbarButton(
- translate(u'ThemeManager', u'Export Theme'),
- u':/themes/theme_export.png',
- translate(u'ThemeManager', u'Export a theme'), self.onExportTheme)
+ self.trUtf8(u'Export Theme'), u':/themes/theme_export.png',
+ self.trUtf8(u'Export a theme'), self.onExportTheme)
self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar)
self.Layout.addWidget(self.Toolbar)
self.ThemeListWidget = QtGui.QListWidget(self)
@@ -79,23 +75,19 @@ class ThemeManager(QtGui.QWidget):
self.ThemeListWidget.setIconSize(QtCore.QSize(88,50))
self.Layout.addWidget(self.ThemeListWidget)
self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
- self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget,
- u':/themes/theme_edit.png',
- translate(u'ThemeManager', u'Edit a theme'),
- self.onEditTheme))
+ self.ThemeListWidget.addAction(
+ contextMenuAction(self.ThemeListWidget, u':/themes/theme_edit.png',
+ self.trUtf8(u'Edit a theme'), self.onEditTheme))
self.ThemeListWidget.addAction(contextMenuSeparator(self.ThemeListWidget))
- self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget,
- u':/themes/theme_delete.png',
- translate(u'ThemeManager', u'Delete theme'),
- self.onDeleteTheme))
- self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget,
- u':/themes/theme_export.png',
- translate(u'ThemeManager', u'Make Global'),
- self.changeGlobalFromScreen))
- self.ThemeListWidget.addAction(contextMenuAction(self.ThemeListWidget,
- u':/themes/theme_export.png',
- translate(u'ThemeManager', u'Export theme'),
- self.onExportTheme))
+ self.ThemeListWidget.addAction(
+ contextMenuAction(self.ThemeListWidget, u':/themes/theme_delete.png',
+ self.trUtf8(u'Delete theme'), self.onDeleteTheme))
+ self.ThemeListWidget.addAction(
+ contextMenuAction(self.ThemeListWidget, u':/themes/theme_export.png',
+ self.trUtf8(u'Make Global'), self.changeGlobalFromScreen))
+ self.ThemeListWidget.addAction(
+ contextMenuAction(self.ThemeListWidget, u':/themes/theme_export.png',
+ self.trUtf8(u'Export theme'), self.onExportTheme))
self.ThemeListWidget.addAction(contextMenuSeparator(self.ThemeListWidget))
#Signals
QtCore.QObject.connect(self.ThemeListWidget,
@@ -125,8 +117,7 @@ class ThemeManager(QtGui.QWidget):
self.ThemeListWidget.item(count).setText(newName)
#Set the new name
if themeName == newName:
- name = u'%s (%s)' % (newName, translate(u'ThemeManager',
- u'default'))
+ name = self.trUtf8(u'%s (default)') % newName
self.ThemeListWidget.item(count).setText(name)
def changeGlobalFromScreen(self, index = -1):
@@ -143,12 +134,11 @@ class ThemeManager(QtGui.QWidget):
if count == selected_row:
self.global_theme = unicode(
self.ThemeListWidget.item(count).text())
- name = u'%s (%s)' % (self.global_theme,
- translate(u'ThemeManager', u'default'))
+ name = self.trUtf8(u'%s (default)') % self.global_theme
self.ThemeListWidget.item(count).setText(name)
self.config.set_config(u'theme global theme', self.global_theme)
- Receiver().send_message(u'update_global_theme',
- self.global_theme)
+ Receiver().send_message(
+ u'update_global_theme', self.global_theme)
self.pushThemes()
def onAddTheme(self):
@@ -172,10 +162,9 @@ class ThemeManager(QtGui.QWidget):
theme = unicode(item.text())
# should be the same unless default
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
- QtGui.QMessageBox.critical(self,
- translate(u'ThemeManager', u'Error'),
- translate(u'ThemeManager',
- u'You are unable to delete the default theme!'),
+ QtGui.QMessageBox.critical(
+ self, self.trUtf8(u'Error'),
+ self.trUtf8(u'You are unable to delete the default theme!'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
else:
self.themelist.remove(theme)
@@ -203,15 +192,13 @@ class ThemeManager(QtGui.QWidget):
"""
item = self.ThemeListWidget.currentItem()
if item is None:
- QtGui.QMessageBox.critical(self,
- translate(u'ThemeManager', u'Error'),
- translate(u'ThemeManager',
- u'You have not selected a theme!'),
+ QtGui.QMessageBox.critical(self, self.trUtf8(u'Error'),
+ self.trUtf8(u'You have not selected a theme!'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
return
theme = unicode(item.data(QtCore.Qt.UserRole).toString())
path = QtGui.QFileDialog.getExistingDirectory(self,
- u'Save Theme - (%s)' % theme,
+ self.trUtf8(u'Save Theme - (%s)') % theme,
self.config.get_last_dir(1) )
path = unicode(path)
if path != u'':
@@ -226,10 +213,9 @@ class ThemeManager(QtGui.QWidget):
zip.close()
def onImportTheme(self):
- files = QtGui.QFileDialog.getOpenFileNames(self,
- translate(u'ThemeManager', u'Select Theme Import File'),
- self.config.get_last_dir(),
- u'Theme (*.*)')
+ files = QtGui.QFileDialog.getOpenFileNames(
+ self, self.trUtf8(u'Select Theme Import File'),
+ self.config.get_last_dir(), u'Theme (*.*)')
log.info(u'New Themes %s', unicode(files))
if len(files) > 0:
for file in files:
@@ -256,7 +242,7 @@ class ThemeManager(QtGui.QWidget):
textName = os.path.splitext(name)[0]
if textName == self.global_theme:
name = u'%s (%s)' % (textName,
- translate(u'ThemeManager', u'default'))
+ self.trUtf8(u'default'))
else:
name = textName
item_name = QtGui.QListWidgetItem(name)
@@ -281,7 +267,7 @@ class ThemeManager(QtGui.QWidget):
xml = file_to_xml(xml_file)
except:
newtheme = ThemeXML()
- newtheme.new_document(u'New Theme')
+ newtheme.new_document(self.trUtf8(u'New Theme'))
newtheme.add_background_solid(unicode(u'#000000'))
newtheme.add_font(unicode(QtGui.QFont().family()),
unicode(u'#FFFFFF'), unicode(30), u'False')
@@ -312,10 +298,9 @@ class ThemeManager(QtGui.QWidget):
try:
zip = zipfile.ZipFile(filename)
except:
- QtGui.QMessageBox.critical(self,
- translate(u'ThemeManager', u'Error'),
- translate(u'ThemeManager',
- u'File is not a valid theme!'),
+ QtGui.QMessageBox.critical(
+ self, self.trUtf8(u'Error'),
+ self.trUtf8(u'File is not a valid theme!'),
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
return
filexml = None
@@ -418,9 +403,9 @@ class ThemeManager(QtGui.QWidget):
if self.saveThemeName != name:
if os.path.exists(theme_file):
result = QtGui.QMessageBox.question(
- self,
- translate(u'ThemeManager', u'Theme Exists'),
- translate(u'ThemeManager', u'A theme with this name already exists, would you like to overwrite it?'),
+ self, self.trUtf8(u'Theme Exists'),
+ self.trUtf8(u'A theme with this name already exists, '
+ u'would you like to overwrite it?'),
(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
QtGui.QMessageBox.No)
else:
@@ -469,7 +454,7 @@ class ThemeManager(QtGui.QWidget):
def baseTheme(self):
log.debug(u'base theme created')
newtheme = ThemeXML()
- newtheme.new_document(u'New Theme')
+ newtheme.new_document(self.trUtf8(u'New Theme'))
newtheme.add_background_solid(unicode(u'#000000'))
newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'),
unicode(30), u'False')
diff --git a/openlp/core/ui/themestab.py b/openlp/core/ui/themestab.py
index 8dee1b90e..644238351 100644
--- a/openlp/core/ui/themestab.py
+++ b/openlp/core/ui/themestab.py
@@ -32,8 +32,9 @@ class ThemesTab(SettingsTab):
"""
def __init__(self, parent):
self.parent = parent
- SettingsTab.__init__(
- self, translate(u'ThemesTab', u'Themes'), u'Themes')
+ SettingsTab.__init__(self, u'Themes', u'Themes')
+ # Use the line below when pulling the translation template file.
+ #SettingsTab.__init__(self, self.trUtf8(u'Themes'), u'Themes')
def setupUi(self):
self.setObjectName(u'ThemesTab')
@@ -105,17 +106,21 @@ class ThemesTab(SettingsTab):
QtCore.SIGNAL(u'update_themes'), self.updateThemeList)
def retranslateUi(self):
- self.GlobalGroupBox.setTitle(translate(u'ThemesTab', u'Global theme'))
- self.LevelGroupBox.setTitle(translate(u'ThemesTab', u'Theme level'))
- self.SongLevelRadioButton.setText(
- translate(u'ThemesTab', u'Song level'))
- self.SongLevelLabel.setText(translate(u'ThemesTab', u'Use the theme from each song in the database. If a song doesn\'t have a theme associated with it, then use the service\'s theme. If the service doesn\'t have a theme, then use the global theme.'))
- self.ServiceLevelRadioButton.setText(
- translate(u'ThemesTab', u'Service level'))
- self.ServiceLevelLabel.setText(translate(u'ThemesTab', u'Use the theme from the service, overriding any of the individual songs\' themes. If the service doesn\'t have a theme, then use the global theme.'))
- self.GlobalLevelRadioButton.setText(
- translate(u'ThemesTab', u'Global level'))
- self.GlobalLevelLabel.setText(translate(u'ThemesTab', u'Use the global theme, overriding any themes associated with either the service or the songs.'))
+ self.GlobalGroupBox.setTitle(self.trUtf8(u'Global theme'))
+ self.LevelGroupBox.setTitle(self.trUtf8(u'Theme level'))
+ self.SongLevelRadioButton.setText(self.trUtf8(u'Song level'))
+ self.SongLevelLabel.setText(self.trUtf8(u'Use the theme from each song '
+ u'in the database. If a song doesn\'t have a theme associated with '
+ u'it, then use the service\'s theme. If the service doesn\'t have '
+ u'a theme, then use the global theme.'))
+ self.ServiceLevelRadioButton.setText(self.trUtf8(u'Service level'))
+ self.ServiceLevelLabel.setText(self.trUtf8(u'Use the theme from the '
+ u'service, overriding any of the individual songs\' themes. If the '
+ u'service doesn\'t have a theme, then use the global theme.'))
+ self.GlobalLevelRadioButton.setText(self.trUtf8(u'Global level'))
+ self.GlobalLevelLabel.setText(self.trUtf8(u'Use the global theme, '
+ u'overriding any themes associated with either the service or the '
+ u'songs.'))
def load(self):
self.global_style = self.config.get_config(
@@ -137,17 +142,17 @@ class ThemesTab(SettingsTab):
Receiver().send_message(u'update_global_theme', self.global_theme )
def onSongLevelButtonPressed(self):
- self.global_style= u'Song'
+ self.global_style = u'Song'
self.parent.RenderManager.set_global_theme(
self.global_theme, self.global_style)
def onServiceLevelButtonPressed(self):
- self.global_style= u'Service'
+ self.global_style = u'Service'
self.parent.RenderManager.set_global_theme(
self.global_theme, self.global_style)
def onGlobalLevelButtonPressed(self):
- self.global_style= u'Global'
+ self.global_style = u'Global'
self.parent.RenderManager.set_global_theme(
self.global_theme, self.global_style)
diff --git a/openlp/plugins/audit/auditplugin.py b/openlp/plugins/audit/auditplugin.py
index 21c0d7b98..12ee825a7 100644
--- a/openlp/plugins/audit/auditplugin.py
+++ b/openlp/plugins/audit/auditplugin.py
@@ -62,21 +62,18 @@ class AuditPlugin(Plugin):
self.toolsMenu = tools_menu
self.AuditMenu = QtGui.QMenu(tools_menu)
self.AuditMenu.setObjectName(u'AuditMenu')
- self.AuditMenu.setTitle(
- translate(u'AuditPlugin', u'&Audit'))
+ self.AuditMenu.setTitle(self.trUtf8(u'&Audit'))
#Audit Delete
self.AuditDelete = QtGui.QAction(tools_menu)
- self.AuditDelete.setText(
- translate(u'AuditPlugin', u'Audit &Delete'))
+ self.AuditDelete.setText(self.trUtf8(u'Audit &Delete'))
self.AuditDelete.setStatusTip(
- translate(u'AuditPlugin', u'Delete all audit data to sepecified date'))
+ self.trUtf8(u'Delete all audit data to sepecified date'))
self.AuditDelete.setObjectName(u'AuditDelete')
#Audit Report
self.AuditReport = QtGui.QAction(tools_menu)
- self.AuditReport.setText(
- translate(u'AuditPlugin', u'Au&dit &Extract'))
+ self.AuditReport.setText(self.trUtf8(u'Au&dit &Extract'))
self.AuditReport.setStatusTip(
- translate(u'AuditPlugin', u'Generate Extracts on Audit Data'))
+ self.trUtf8(u'Generate Extracts on Audit Data'))
self.AuditReport.setObjectName(u'AuditReport')
#Audit activation
AuditIcon = buildIcon(u':/tools/tools_alert.png')
@@ -84,10 +81,10 @@ class AuditPlugin(Plugin):
self.AuditStatus.setIcon(AuditIcon)
self.AuditStatus.setCheckable(True)
self.AuditStatus.setChecked(False)
- self.AuditStatus.setText(translate(u'AuditPlugin', u'A&udit Status'))
+ self.AuditStatus.setText(self.trUtf8(u'A&udit Status'))
self.AuditStatus.setStatusTip(
- translate(u'AuditPlugin', u'Start/Stop live song auditing'))
- self.AuditStatus.setShortcut(translate(u'AuditPlugin', u'F4'))
+ self.trUtf8(u'Start/Stop live song auditing'))
+ self.AuditStatus.setShortcut(self.trUtf8(u'F4'))
self.AuditStatus.setObjectName(u'AuditStatus')
#Add Menus together
self.toolsMenu.addAction(self.AuditMenu.menuAction())
@@ -166,4 +163,6 @@ class AuditPlugin(Plugin):
self.auditdetailform.exec_()
def about(self):
- return u'Audit Plugin This plugin records the use of songs and when they have been used during a live service'
+ about_text = u'Audit Plugin This plugin records the use '\
+ u'of songs and when they have been used during a live service'
+ return about_text
diff --git a/openlp/plugins/audit/forms/auditdeleteform.py b/openlp/plugins/audit/forms/auditdeleteform.py
index fbe07d142..bd1dbd4a6 100644
--- a/openlp/plugins/audit/forms/auditdeleteform.py
+++ b/openlp/plugins/audit/forms/auditdeleteform.py
@@ -44,8 +44,8 @@ class AuditDeleteForm(QtGui.QDialog, Ui_AuditDeleteDialog):
def accept(self):
ret = QtGui.QMessageBox.question(self,
- translate(u'mainWindow', u'Delete Selected Audit Events?'),
- translate(u'mainWindow', u'Are you sure you want to delete selected Audit Data?'),
+ self.trUtf8(u'Delete Selected Audit Events?'),
+ self.trUtf8(u'Are you sure you want to delete selected Audit Data?'),
QtGui.QMessageBox.StandardButtons(
QtGui.QMessageBox.Ok |
QtGui.QMessageBox.Cancel),
diff --git a/openlp/plugins/bibles/bibleplugin.py b/openlp/plugins/bibles/bibleplugin.py
index 944e94b18..b504bbc01 100644
--- a/openlp/plugins/bibles/bibleplugin.py
+++ b/openlp/plugins/bibles/bibleplugin.py
@@ -73,7 +73,7 @@ class BiblePlugin(Plugin):
self.ImportBibleItem = QtGui.QAction(import_menu)
self.ImportBibleItem.setObjectName(u'ImportBibleItem')
import_menu.addAction(self.ImportBibleItem)
- self.ImportBibleItem.setText(translate(u'BiblePlugin', u'&Bible'))
+ self.ImportBibleItem.setText(self.trUtf8(u'&Bible'))
# Signals and slots
QtCore.QObject.connect(self.ImportBibleItem,
QtCore.SIGNAL(u'triggered()'), self.onBibleNewClick)
@@ -83,7 +83,7 @@ class BiblePlugin(Plugin):
self.ExportBibleItem = QtGui.QAction(export_menu)
self.ExportBibleItem.setObjectName(u'ExportBibleItem')
export_menu.addAction(self.ExportBibleItem)
- self.ExportBibleItem.setText(translate(u'BiblePlugin', u'&Bible'))
+ self.ExportBibleItem.setText(self.trUtf8(u'&Bible'))
self.ExportBibleItem.setVisible(False)
def onBibleNewClick(self):
@@ -91,4 +91,8 @@ class BiblePlugin(Plugin):
self.media_item.onNewClick()
def about(self):
- return u'Bible Plugin This plugin allows bible verse from different sources to be displayed on the screen during the service.
This is a core plugin and cannot be made inactive'
+ about_text = u'Bible Plugin This plugin allows '\
+ u'bible verse from different sources to be displayed on the '\
+ u'screen during the service.