forked from openlp/openlp
Replaced { self.trUtf8() } with { translate() } which is the new standar. I also imported the translate library on the following files. I did not remove any import sinse I do not know how this { self.trUtf8() } does work.
This commit is contained in:
parent
a379de3ec5
commit
3be909c5c0
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from aboutdialog import Ui_AboutDialog
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
||||
"""
|
||||
@ -43,7 +44,7 @@ class AboutForm(QtGui.QDialog, Ui_AboutDialog):
|
||||
about_text = about_text.replace(u'<version>',
|
||||
self.applicationVersion[u'version'])
|
||||
if self.applicationVersion[u'build']:
|
||||
build_text = u' %s %s' % (self.trUtf8('build'),
|
||||
build_text = u' %s %s' % (translate('AboutForm','build'),
|
||||
self.applicationVersion[u'build'])
|
||||
else:
|
||||
build_text = u''
|
||||
|
@ -29,7 +29,7 @@ import os.path
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import ThemeXML
|
||||
from openlp.core.lib import ThemeXML, translate
|
||||
from amendthemedialog import Ui_AmendThemeDialog
|
||||
|
||||
log = logging.getLogger(u'AmendThemeForm')
|
||||
@ -210,7 +210,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
|
||||
def onImageToolButtonClicked(self):
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
self, self.trUtf8(u'Open file'))
|
||||
self, translate('AmendThemeForm',u'Open file'))
|
||||
if filename:
|
||||
self.ImageLineEdit.setText(filename)
|
||||
self.theme.background_filename = filename
|
||||
@ -629,7 +629,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(self.trUtf8('Background Color:'))
|
||||
self.Color1Label.setText(translate('AmendThemeForm','Background Color:'))
|
||||
self.Color1Label.setVisible(True)
|
||||
self.Color1PushButton.setVisible(True)
|
||||
self.Color2Label.setVisible(False)
|
||||
@ -644,8 +644,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(self.trUtf8('First Color:'))
|
||||
self.Color2Label.setText(self.trUtf8('Second Color:'))
|
||||
self.Color1Label.setText(translate('AmendThemeForm','First Color:'))
|
||||
self.Color2Label.setText(translate('AmendThemeForm','Second Color:'))
|
||||
self.Color1Label.setVisible(True)
|
||||
self.Color1PushButton.setVisible(True)
|
||||
self.Color2Label.setVisible(True)
|
||||
@ -713,7 +713,7 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
log.debug(u'Page Length area height %s, metrics %s, lines %s' %
|
||||
(self.FontMainHeightSpinBox.value(), metrics.height(),
|
||||
page_length))
|
||||
page_length_text = unicode(self.trUtf8('Slide Height is %s rows'))
|
||||
page_length_text = unicode(translate('AmendThemeForm','Slide Height is %s rows'))
|
||||
self.FontMainLinesPageLabel.setText(page_length_text % page_length)
|
||||
frame = self.thememanager.generateImage(self.theme)
|
||||
self.ThemePreview.setPixmap(QtGui.QPixmap.fromImage(frame))
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtGui, QtCore
|
||||
|
||||
from openlp.core.lib import SettingsTab, Receiver
|
||||
from openlp.core.lib import SettingsTab, Receiver, translate
|
||||
|
||||
class DisplayTab(SettingsTab):
|
||||
"""
|
||||
@ -39,7 +39,7 @@ class DisplayTab(SettingsTab):
|
||||
SettingsTab.__init__(self, u'Display')
|
||||
|
||||
def setupUi(self):
|
||||
self.tabTitleVisible = self.trUtf8('Displays')
|
||||
self.tabTitleVisible = translate('DisplayTab','Displays')
|
||||
self.layoutWidget = QtGui.QWidget(self)
|
||||
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
|
||||
self.layoutWidget.setObjectName(u'layoutWidget')
|
||||
@ -159,22 +159,22 @@ class DisplayTab(SettingsTab):
|
||||
self.onOverrideCheckBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.setWindowTitle( self.trUtf8(u'Amend Display Settings'))
|
||||
self.CurrentGroupBox.setTitle( self.trUtf8(u'Default Settings'))
|
||||
self.XLabel.setText(self.trUtf8(u'X'))
|
||||
self.setWindowTitle( translate('DisplayTab',u'Amend Display Settings'))
|
||||
self.CurrentGroupBox.setTitle( translate('DisplayTab',u'Default Settings'))
|
||||
self.XLabel.setText(translate('DisplayTab',u'X'))
|
||||
self.Xpos.setText(u'0')
|
||||
self.YLabel.setText( self.trUtf8(u'Y'))
|
||||
self.YLabel.setText( translate('DisplayTab',u'Y'))
|
||||
self.Ypos.setText(u'0')
|
||||
self.HeightLabel.setText( self.trUtf8(u'Height'))
|
||||
self.HeightLabel.setText( translate('DisplayTab',u'Height'))
|
||||
self.Height.setText(u'0')
|
||||
self.WidthLabel.setText( self.trUtf8(u'Width'))
|
||||
self.WidthLabel.setText( translate('DisplayTab',u'Width'))
|
||||
self.Width.setText(u'0')
|
||||
self.CurrentGroupBox_2.setTitle( self.trUtf8(u'Amend Settings'))
|
||||
self.XAmendLabel.setText( self.trUtf8(u'X'))
|
||||
self.YAmendLabel.setText( self.trUtf8(u'Y'))
|
||||
self.HeightAmendLabel.setText( self.trUtf8(u'Height'))
|
||||
self.WidthAmendLabel.setText( self.trUtf8(u'Width'))
|
||||
self.OverrideCheckBox.setText( self.trUtf8(u'Override Output Display'))
|
||||
self.CurrentGroupBox_2.setTitle( translate('DisplayTab',u'Amend Settings'))
|
||||
self.XAmendLabel.setText( translate('DisplayTab',u'X'))
|
||||
self.YAmendLabel.setText( translate('DisplayTab',u'Y'))
|
||||
self.HeightAmendLabel.setText( translate('DisplayTab',u'Height'))
|
||||
self.WidthAmendLabel.setText( translate('DisplayTab',u'Width'))
|
||||
self.OverrideCheckBox.setText( translate('DisplayTab',u'Override Output Display'))
|
||||
|
||||
def load(self):
|
||||
settings = QtCore.QSettings()
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, Receiver
|
||||
from openlp.core.lib import SettingsTab, Receiver, translate
|
||||
|
||||
class GeneralTab(SettingsTab):
|
||||
"""
|
||||
@ -54,7 +54,7 @@ class GeneralTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'GeneralTab')
|
||||
self.tabTitleVisible = self.trUtf8('General')
|
||||
self.tabTitleVisible = translate('GeneralTab','General')
|
||||
self.GeneralLayout = QtGui.QHBoxLayout(self)
|
||||
self.GeneralLayout.setSpacing(8)
|
||||
self.GeneralLayout.setMargin(8)
|
||||
@ -177,25 +177,25 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'editingFinished()'), self.onPasswordEditLostFocus)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.MonitorGroupBox.setTitle(self.trUtf8('Monitors'))
|
||||
self.MonitorGroupBox.setTitle(translate('GeneralTab','Monitors'))
|
||||
self.MonitorLabel.setText(
|
||||
self.trUtf8('Select monitor for output display:'))
|
||||
translate('GeneralTab','Select monitor for output display:'))
|
||||
self.DisplayOnMonitorCheck.setText(
|
||||
self.trUtf8('Display if a single screen'))
|
||||
self.StartupGroupBox.setTitle(self.trUtf8('Application Startup'))
|
||||
self.WarningCheckBox.setText(self.trUtf8('Show blank screen warning'))
|
||||
translate('GeneralTab','Display if a single screen'))
|
||||
self.StartupGroupBox.setTitle(translate('GeneralTab','Application Startup'))
|
||||
self.WarningCheckBox.setText(translate('GeneralTab','Show blank screen warning'))
|
||||
self.AutoOpenCheckBox.setText(
|
||||
self.trUtf8('Automatically open the last service'))
|
||||
self.ShowSplashCheckBox.setText(self.trUtf8('Show the splash screen'))
|
||||
self.SettingsGroupBox.setTitle(self.trUtf8('Application Settings'))
|
||||
translate('GeneralTab','Automatically open the last service'))
|
||||
self.ShowSplashCheckBox.setText(translate('GeneralTab','Show the splash screen'))
|
||||
self.SettingsGroupBox.setTitle(translate('GeneralTab','Application Settings'))
|
||||
self.SaveCheckServiceCheckBox.setText(
|
||||
self.trUtf8('Prompt to save Service before starting New'))
|
||||
translate('GeneralTab','Prompt to save Service before starting New'))
|
||||
self.AutoPreviewCheckBox.setText(
|
||||
self.trUtf8('Preview Next Song from Service Manager'))
|
||||
self.CCLIGroupBox.setTitle(self.trUtf8('CCLI Details'))
|
||||
self.NumberLabel.setText(self.trUtf8('CCLI Number:'))
|
||||
self.UsernameLabel.setText(self.trUtf8('SongSelect Username:'))
|
||||
self.PasswordLabel.setText(self.trUtf8('SongSelect Password:'))
|
||||
translate('GeneralTab','Preview Next Song from Service Manager'))
|
||||
self.CCLIGroupBox.setTitle(translate('GeneralTab','CCLI Details'))
|
||||
self.NumberLabel.setText(translate('GeneralTab','CCLI Number:'))
|
||||
self.UsernameLabel.setText(translate('GeneralTab','SongSelect Username:'))
|
||||
self.PasswordLabel.setText(translate('GeneralTab','SongSelect Password:'))
|
||||
|
||||
def onMonitorComboBoxChanged(self):
|
||||
self.MonitorNumber = self.MonitorComboBox.currentIndex()
|
||||
@ -231,10 +231,10 @@ class GeneralTab(SettingsTab):
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
for screen in self.screens.screen_list:
|
||||
screen_name = u'%s %d' % (self.trUtf8('Screen'),
|
||||
screen_name = u'%s %d' % (translate('GeneralTab','Screen'),
|
||||
screen[u'number'] + 1)
|
||||
if screen[u'primary']:
|
||||
screen_name = u'%s (%s)' % (screen_name, self.trUtf8('primary'))
|
||||
screen_name = u'%s (%s)' % (screen_name, translate('GeneralTab','primary'))
|
||||
self.MonitorComboBox.addItem(screen_name)
|
||||
# Get the configs
|
||||
self.Warning = settings.value(
|
||||
|
@ -616,11 +616,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
Triggered by delay thread.
|
||||
"""
|
||||
app_version = self.applicationVersion[u'full']
|
||||
version_text = unicode(self.trUtf8('Version %s of OpenLP is now '
|
||||
version_text = unicode(translate('MainWindow','Version %s of OpenLP is now '
|
||||
'available for download (you are currently running version %s).'
|
||||
'\n\nYou can download the latest version from http://openlp.org'))
|
||||
QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('OpenLP Version Updated'),
|
||||
translate('MainWindow','OpenLP Version Updated'),
|
||||
version_text % (version, app_version),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
@ -651,8 +651,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
and settings.value(u'blank warning', QtCore.QVariant(False)).toBool():
|
||||
self.LiveController.onBlankDisplay(True)
|
||||
QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('OpenLP Main Display Blanked'),
|
||||
self.trUtf8('The Main Display has been blanked out'),
|
||||
translate('MainWindow','OpenLP Main Display Blanked'),
|
||||
translate('MainWindow','The Main Display has been blanked out'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
settings.endGroup()
|
||||
@ -707,8 +707,8 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
"""
|
||||
if self.serviceNotSaved:
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('Save Changes to Service?'),
|
||||
self.trUtf8('Your service has changed. '
|
||||
translate('MainWindow','Save Changes to Service?'),
|
||||
translate('MainWindow','Your service has changed. '
|
||||
'Do you want to save those changes?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Cancel |
|
||||
|
@ -33,7 +33,7 @@ log = logging.getLogger(__name__)
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import OpenLPToolbar, ServiceItem, contextMenuAction, \
|
||||
Receiver, build_icon, ItemCapabilities, SettingsManager
|
||||
Receiver, build_icon, ItemCapabilities, SettingsManager, translate
|
||||
from openlp.core.ui import ServiceNoteForm, ServiceItemEditForm
|
||||
from openlp.core.utils import AppLocation
|
||||
|
||||
@ -114,21 +114,21 @@ class ServiceManager(QtGui.QWidget):
|
||||
# Create the top toolbar
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('New Service'), u':/general/general_new.png',
|
||||
self.trUtf8('Create a new service'), self.onNewService)
|
||||
translate('ServiceManager','New Service'), u':/general/general_new.png',
|
||||
translate('ServiceManager','Create a new service'), self.onNewService)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Open Service'), u':/general/general_open.png',
|
||||
self.trUtf8('Load an existing service'), self.onLoadService)
|
||||
translate('ServiceManager','Open Service'), u':/general/general_open.png',
|
||||
translate('ServiceManager','Load an existing service'), self.onLoadService)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Save Service'), u':/general/general_save.png',
|
||||
self.trUtf8('Save this service'), self.onSaveService)
|
||||
translate('ServiceManager','Save Service'), u':/general/general_save.png',
|
||||
translate('ServiceManager','Save this service'), self.onSaveService)
|
||||
self.Toolbar.addSeparator()
|
||||
self.ThemeLabel = QtGui.QLabel(self.trUtf8('Theme:'),
|
||||
self.ThemeLabel = QtGui.QLabel(translate('ServiceManager','Theme:'),
|
||||
self)
|
||||
self.ThemeLabel.setMargin(3)
|
||||
self.Toolbar.addWidget(self.ThemeLabel)
|
||||
self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
|
||||
self.ThemeComboBox.setToolTip(self.trUtf8(
|
||||
self.ThemeComboBox.setToolTip(translate('ServiceManager',
|
||||
u'Select a theme for the service'))
|
||||
self.ThemeComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToContents)
|
||||
@ -159,21 +159,21 @@ class ServiceManager(QtGui.QWidget):
|
||||
# Add the bottom toolbar
|
||||
self.OrderToolbar = OpenLPToolbar(self)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
self.trUtf8('Move to &top'), u':/services/service_top.png',
|
||||
self.trUtf8('Move to top'), self.onServiceTop)
|
||||
translate('ServiceManager','Move to &top'), u':/services/service_top.png',
|
||||
translate('ServiceManager','Move to top'), self.onServiceTop)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
self.trUtf8('Move &up'), u':/services/service_up.png',
|
||||
self.trUtf8('Move up order'), self.onServiceUp)
|
||||
translate('ServiceManager','Move &up'), u':/services/service_up.png',
|
||||
translate('ServiceManager','Move up order'), self.onServiceUp)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
self.trUtf8('Move &down'), u':/services/service_down.png',
|
||||
self.trUtf8('Move down order'), self.onServiceDown)
|
||||
translate('ServiceManager','Move &down'), u':/services/service_down.png',
|
||||
translate('ServiceManager','Move down order'), self.onServiceDown)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
self.trUtf8('Move to &bottom'), u':/services/service_bottom.png',
|
||||
self.trUtf8('Move to end'), self.onServiceEnd)
|
||||
translate('ServiceManager','Move to &bottom'), u':/services/service_bottom.png',
|
||||
translate('ServiceManager','Move to end'), self.onServiceEnd)
|
||||
self.OrderToolbar.addSeparator()
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
self.trUtf8('&Delete From Service'), u':/general/general_delete.png',
|
||||
self.trUtf8('Delete From Service'), self.onDeleteFromService)
|
||||
translate('ServiceManager','&Delete From Service'), u':/general/general_delete.png',
|
||||
translate('ServiceManager','Delete From Service'), self.onDeleteFromService)
|
||||
self.Layout.addWidget(self.OrderToolbar)
|
||||
# Connect up our signals and slots
|
||||
QtCore.QObject.connect(self.ThemeComboBox,
|
||||
@ -203,30 +203,30 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.servicePath = AppLocation.get_section_data_path(u'servicemanager')
|
||||
#build the drag and drop context menu
|
||||
self.dndMenu = QtGui.QMenu()
|
||||
self.newAction = self.dndMenu.addAction(self.trUtf8('&Add New Item'))
|
||||
self.newAction = self.dndMenu.addAction(translate('ServiceManager','&Add New Item'))
|
||||
self.newAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.addToAction = self.dndMenu.addAction(self.trUtf8('&Add to Selected Item'))
|
||||
self.addToAction = self.dndMenu.addAction(translate('ServiceManager','&Add to Selected Item'))
|
||||
self.addToAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
#build the context menu
|
||||
self.menu = QtGui.QMenu()
|
||||
self.editAction = self.menu.addAction(self.trUtf8('&Edit Item'))
|
||||
self.editAction = self.menu.addAction(translate('ServiceManager','&Edit Item'))
|
||||
self.editAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.maintainAction = self.menu.addAction(self.trUtf8('&Maintain Item'))
|
||||
self.maintainAction = self.menu.addAction(translate('ServiceManager','&Maintain Item'))
|
||||
self.maintainAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.notesAction = self.menu.addAction(self.trUtf8('&Notes'))
|
||||
self.notesAction = self.menu.addAction(translate('ServiceManager','&Notes'))
|
||||
self.notesAction.setIcon(build_icon(u':/services/service_notes.png'))
|
||||
self.deleteAction = self.menu.addAction(
|
||||
self.trUtf8('&Delete From Service'))
|
||||
translate('ServiceManager','&Delete From Service'))
|
||||
self.deleteAction.setIcon(build_icon(u':/general/general_delete.png'))
|
||||
self.sep1 = self.menu.addAction(u'')
|
||||
self.sep1.setSeparator(True)
|
||||
self.previewAction = self.menu.addAction(self.trUtf8('&Preview Verse'))
|
||||
self.previewAction = self.menu.addAction(translate('ServiceManager','&Preview Verse'))
|
||||
self.previewAction.setIcon(build_icon(u':/general/general_preview.png'))
|
||||
self.liveAction = self.menu.addAction(self.trUtf8('&Live Verse'))
|
||||
self.liveAction = self.menu.addAction(translate('ServiceManager','&Live Verse'))
|
||||
self.liveAction.setIcon(build_icon(u':/general/general_live.png'))
|
||||
self.sep2 = self.menu.addAction(u'')
|
||||
self.sep2.setSeparator(True)
|
||||
self.themeMenu = QtGui.QMenu(self.trUtf8(u'&Change Item Theme'))
|
||||
self.themeMenu = QtGui.QMenu(translate('ServiceManager',u'&Change Item Theme'))
|
||||
self.menu.addMenu(self.themeMenu)
|
||||
|
||||
def supportedSuffixes(self, suffix):
|
||||
@ -458,8 +458,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.parent.generalSettingsSection + u'/save prompt',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('Save Changes to Service?'),
|
||||
self.trUtf8('Your service is unsaved, do you want to save '
|
||||
translate('ServiceManager','Save Changes to Service?'),
|
||||
translate('ServiceManager','Your service is unsaved, do you want to save '
|
||||
'those changes before creating a new one?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Cancel |
|
||||
@ -542,9 +542,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
log.debug(u'onSaveService')
|
||||
if not quick or self.isNew:
|
||||
filename = QtGui.QFileDialog.getSaveFileName(self,
|
||||
self.trUtf8(u'Save Service'),
|
||||
translate('ServiceManager',u'Save Service'),
|
||||
SettingsManager.get_last_dir(self.parent.serviceSettingsSection),
|
||||
self.trUtf8(u'OpenLP Service Files (*.osz)'))
|
||||
translate('ServiceManager',u'OpenLP Service Files (*.osz)'))
|
||||
else:
|
||||
filename = SettingsManager.get_last_dir(
|
||||
self.parent.serviceSettingsSection)
|
||||
@ -601,7 +601,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.parent.serviceSettingsSection)
|
||||
else:
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
self, self.trUtf8('Open Service'),
|
||||
self, translate('ServiceManager','Open Service'),
|
||||
SettingsManager.get_last_dir(
|
||||
self.parent.serviceSettingsSection), u'Services (*.osz)')
|
||||
self.loadService(filename)
|
||||
@ -614,8 +614,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
if self.parent.serviceNotSaved:
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('Save Changes to Service?'),
|
||||
self.trUtf8('Your current service is unsaved, do you want to '
|
||||
translate('ServiceManager','Save Changes to Service?'),
|
||||
translate('ServiceManager','Your current service is unsaved, do you want to '
|
||||
'save the changes before opening a new one?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Discard |
|
||||
@ -778,8 +778,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.serviceItems[item][u'service_item'], count)
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Missing Display Handler'),
|
||||
self.trUtf8('Your item cannot be displayed as '
|
||||
translate('ServiceManager','Missing Display Handler'),
|
||||
translate('ServiceManager','Your item cannot be displayed as '
|
||||
'there is no handler to display it'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok),
|
||||
@ -814,8 +814,8 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.serviceItems[item][u'service_item'], 0)
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Missing Display Handler'),
|
||||
self.trUtf8('Your item cannot be displayed as '
|
||||
translate('ServiceManager','Missing Display Handler'),
|
||||
translate('ServiceManager','Your item cannot be displayed as '
|
||||
'there is no handler to display it'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok),
|
||||
|
@ -32,7 +32,7 @@ from PyQt4.phonon import Phonon
|
||||
|
||||
from openlp.core.ui import HideMode
|
||||
from openlp.core.lib import OpenLPToolbar, Receiver, resize_image, \
|
||||
ItemCapabilities
|
||||
ItemCapabilities, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -127,11 +127,11 @@ 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(self.trUtf8('Live'))
|
||||
self.TypeLabel.setText(translate('SlideController','Live'))
|
||||
self.split = 1
|
||||
self.typePrefix = u'live'
|
||||
else:
|
||||
self.TypeLabel.setText(self.trUtf8('Preview'))
|
||||
self.TypeLabel.setText(translate('SlideController','Preview'))
|
||||
self.split = 0
|
||||
self.typePrefix = u'preview'
|
||||
self.TypeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')
|
||||
@ -178,75 +178,75 @@ class SlideController(QtGui.QWidget):
|
||||
if self.isLive:
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'First Slide', u':/slides/slide_first.png',
|
||||
self.trUtf8('Move to first'), self.onSlideSelectedFirst)
|
||||
translate('SlideController','Move to first'), self.onSlideSelectedFirst)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Previous Slide', u':/slides/slide_previous.png',
|
||||
self.trUtf8('Move to previous'), self.onSlideSelectedPrevious)
|
||||
translate('SlideController','Move to previous'), self.onSlideSelectedPrevious)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Next Slide', u':/slides/slide_next.png',
|
||||
self.trUtf8('Move to next'), self.onSlideSelectedNext)
|
||||
translate('SlideController','Move to next'), self.onSlideSelectedNext)
|
||||
if self.isLive:
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Last Slide', u':/slides/slide_last.png',
|
||||
self.trUtf8('Move to last'), self.onSlideSelectedLast)
|
||||
translate('SlideController','Move to last'), self.onSlideSelectedLast)
|
||||
if self.isLive:
|
||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.blankButton = self.Toolbar.addToolbarButton(
|
||||
u'Blank Screen', u':/slides/slide_blank.png',
|
||||
self.trUtf8('Blank Screen'), self.onBlankDisplay, True)
|
||||
translate('SlideController','Blank Screen'), self.onBlankDisplay, True)
|
||||
self.themeButton = self.Toolbar.addToolbarButton(
|
||||
u'Display Theme', u':/slides/slide_theme.png',
|
||||
self.trUtf8('Theme Screen'), self.onThemeDisplay, True)
|
||||
translate('SlideController','Theme Screen'), self.onThemeDisplay, True)
|
||||
self.hideButton = self.Toolbar.addToolbarButton(
|
||||
u'Hide screen', u':/slides/slide_desktop.png',
|
||||
self.trUtf8('Hide Screen'), self.onHideDisplay, True)
|
||||
translate('SlideController','Hide Screen'), self.onHideDisplay, True)
|
||||
if not self.isLive:
|
||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Go Live', u':/general/general_live.png',
|
||||
self.trUtf8('Move to live'), self.onGoLive)
|
||||
translate('SlideController','Move to live'), self.onGoLive)
|
||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Edit Song', u':/general/general_edit.png',
|
||||
self.trUtf8('Edit and re-preview Song'), self.onEditSong)
|
||||
translate('SlideController','Edit and re-preview Song'), self.onEditSong)
|
||||
if isLive:
|
||||
self.Toolbar.addToolbarSeparator(u'Loop Separator')
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Start Loop', u':/media/media_time.png',
|
||||
self.trUtf8('Start continuous loop'), self.onStartLoop)
|
||||
translate('SlideController','Start continuous loop'), self.onStartLoop)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Stop Loop', u':/media/media_stop.png',
|
||||
self.trUtf8('Stop continuous loop'), self.onStopLoop)
|
||||
translate('SlideController','Stop continuous loop'), self.onStopLoop)
|
||||
self.DelaySpinBox = QtGui.QSpinBox()
|
||||
self.DelaySpinBox.setMinimum(1)
|
||||
self.DelaySpinBox.setMaximum(180)
|
||||
self.Toolbar.addToolbarWidget(
|
||||
u'Image SpinBox', self.DelaySpinBox)
|
||||
self.DelaySpinBox.setSuffix(self.trUtf8('s'))
|
||||
self.DelaySpinBox.setSuffix(translate('SlideController','s'))
|
||||
self.DelaySpinBox.setToolTip(
|
||||
self.trUtf8('Delay between slides in seconds'))
|
||||
translate('SlideController','Delay between slides in seconds'))
|
||||
self.ControllerLayout.addWidget(self.Toolbar)
|
||||
#Build a Media ToolBar
|
||||
self.Mediabar = OpenLPToolbar(self)
|
||||
self.Mediabar.addToolbarButton(
|
||||
u'Media Start', u':/slides/media_playback_start.png',
|
||||
self.trUtf8('Start playing media'), self.onMediaPlay)
|
||||
translate('SlideController','Start playing media'), self.onMediaPlay)
|
||||
self.Mediabar.addToolbarButton(
|
||||
u'Media Pause', u':/slides/media_playback_pause.png',
|
||||
self.trUtf8('Start playing media'), self.onMediaPause)
|
||||
translate('SlideController','Start playing media'), self.onMediaPause)
|
||||
self.Mediabar.addToolbarButton(
|
||||
u'Media Stop', u':/slides/media_playback_stop.png',
|
||||
self.trUtf8('Start playing media'), self.onMediaStop)
|
||||
translate('SlideController','Start playing media'), self.onMediaStop)
|
||||
if self.isLive:
|
||||
self.blankButton = self.Mediabar.addToolbarButton(
|
||||
u'Blank Screen', u':/slides/slide_blank.png',
|
||||
self.trUtf8('Blank Screen'), self.onBlankDisplay, True)
|
||||
translate('SlideController','Blank Screen'), self.onBlankDisplay, True)
|
||||
self.themeButton = self.Mediabar.addToolbarButton(
|
||||
u'Display Theme', u':/slides/slide_theme.png',
|
||||
self.trUtf8('Theme Screen'), self.onThemeDisplay, True)
|
||||
translate('SlideController','Theme Screen'), self.onThemeDisplay, True)
|
||||
self.hideButton = self.Mediabar.addToolbarButton(
|
||||
u'Hide screen', u':/slides/slide_desktop.png',
|
||||
self.trUtf8('Hide Screen'), self.onHideDisplay, True)
|
||||
translate('SlideController','Hide Screen'), self.onHideDisplay, True)
|
||||
if not self.isLive:
|
||||
self.seekSlider = Phonon.SeekSlider()
|
||||
self.seekSlider.setGeometry(QtCore.QRect(90, 260, 221, 24))
|
||||
@ -262,10 +262,10 @@ class SlideController(QtGui.QWidget):
|
||||
# Build the Song Toolbar
|
||||
if isLive:
|
||||
self.SongMenu = QtGui.QToolButton(self.Toolbar)
|
||||
self.SongMenu.setText(self.trUtf8('Go to Verse'))
|
||||
self.SongMenu.setText(translate('SlideController','Go to Verse'))
|
||||
self.SongMenu.setPopupMode(QtGui.QToolButton.InstantPopup)
|
||||
self.Toolbar.addToolbarWidget(u'Song Menu', self.SongMenu)
|
||||
self.SongMenu.setMenu(QtGui.QMenu(self.trUtf8('Go to Verse'),
|
||||
self.SongMenu.setMenu(QtGui.QMenu(translate('SlideController','Go to Verse'),
|
||||
self.Toolbar))
|
||||
self.Toolbar.makeWidgetsInvisible([u'Song Menu'])
|
||||
# Screen preview area
|
||||
@ -539,8 +539,8 @@ class SlideController(QtGui.QWidget):
|
||||
bits = frame[u'verseTag'].split(u':')
|
||||
tag = None
|
||||
#If verse handle verse number else tag only
|
||||
if bits[0] == self.trUtf8('Verse') or \
|
||||
bits[0] == self.trUtf8('Chorus'):
|
||||
if bits[0] == translate('SlideController','Verse') or \
|
||||
bits[0] == translate('SlideController','Chorus'):
|
||||
tag = u'%s\n%s' % (bits[0][0], bits[1][0:] )
|
||||
tag1 = u'%s%s' % (bits[0][0], bits[1][0:] )
|
||||
row = tag
|
||||
@ -553,7 +553,7 @@ class SlideController(QtGui.QWidget):
|
||||
if self.isLive and frame[u'verseTag'] is not None:
|
||||
if tag1 not in self.slideList:
|
||||
self.slideList[tag1] = framenumber
|
||||
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag1),
|
||||
self.SongMenu.menu().addAction(translate('SlideController',u'%s'%tag1),
|
||||
self.onSongBarHandler)
|
||||
item.setText(frame[u'text'])
|
||||
else:
|
||||
|
@ -24,7 +24,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import build_icon
|
||||
from openlp.core.lib import build_icon, translate
|
||||
|
||||
class SplashScreen(object):
|
||||
def __init__(self, version):
|
||||
|
@ -30,6 +30,7 @@ import logging
|
||||
|
||||
from xml.etree.ElementTree import ElementTree, XML
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from openlp.core.ui import AmendThemeForm
|
||||
from openlp.core.theme import Theme
|
||||
@ -54,21 +55,21 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.amendThemeForm = AmendThemeForm(self)
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('New Theme'), u':/themes/theme_new.png',
|
||||
self.trUtf8('Create a new theme'), self.onAddTheme)
|
||||
translate('ThemeManager','New Theme'), u':/themes/theme_new.png',
|
||||
translate('ThemeManager','Create a new theme'), self.onAddTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Edit Theme'), u':/themes/theme_edit.png',
|
||||
self.trUtf8('Edit a theme'), self.onEditTheme)
|
||||
translate('ThemeManager','Edit Theme'), u':/themes/theme_edit.png',
|
||||
translate('ThemeManager','Edit a theme'), self.onEditTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Delete Theme'), u':/general/general_delete.png',
|
||||
self.trUtf8('Delete a theme'), self.onDeleteTheme)
|
||||
translate('ThemeManager','Delete Theme'), u':/general/general_delete.png',
|
||||
translate('ThemeManager','Delete a theme'), self.onDeleteTheme)
|
||||
self.Toolbar.addSeparator()
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Import Theme'), u':/general/general_import.png',
|
||||
self.trUtf8('Import a theme'), self.onImportTheme)
|
||||
translate('ThemeManager','Import Theme'), u':/general/general_import.png',
|
||||
translate('ThemeManager','Import a theme'), self.onImportTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
self.trUtf8('Export Theme'), u':/general/general_export.png',
|
||||
self.trUtf8('Export a theme'), self.onExportTheme)
|
||||
translate('ThemeManager','Export Theme'), u':/general/general_export.png',
|
||||
translate('ThemeManager','Export a theme'), self.onExportTheme)
|
||||
self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar)
|
||||
self.Layout.addWidget(self.Toolbar)
|
||||
self.ThemeListWidget = QtGui.QListWidget(self)
|
||||
@ -78,23 +79,23 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget, u':/themes/theme_edit.png',
|
||||
self.trUtf8('Edit a theme'), self.onEditTheme))
|
||||
translate('ThemeManager','Edit a theme'), self.onEditTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuSeparator(self.ThemeListWidget))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_delete.png',
|
||||
self.trUtf8('Delete theme'),
|
||||
translate('ThemeManager','Delete theme'),
|
||||
self.onDeleteTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_export.png',
|
||||
self.trUtf8('Make Global'),
|
||||
translate('ThemeManager','Make Global'),
|
||||
self.changeGlobalFromScreen))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_export.png',
|
||||
self.trUtf8('Export theme'),
|
||||
translate('ThemeManager','Export theme'),
|
||||
self.onExportTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuSeparator(self.ThemeListWidget))
|
||||
@ -127,7 +128,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.ThemeListWidget.item(count).setText(newName)
|
||||
#Set the new name
|
||||
if themeName == newName:
|
||||
name = u'%s (%s)' % (newName, self.trUtf8('default'))
|
||||
name = u'%s (%s)' % (newName, translate('ThemeManager','default'))
|
||||
self.ThemeListWidget.item(count).setText(name)
|
||||
|
||||
def changeGlobalFromScreen(self, index = -1):
|
||||
@ -144,7 +145,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
if count == selected_row:
|
||||
self.global_theme = unicode(
|
||||
self.ThemeListWidget.item(count).text())
|
||||
name = u'%s (%s)' % (self.global_theme, self.trUtf8('default'))
|
||||
name = u'%s (%s)' % (self.global_theme, translate('ThemeManager','default'))
|
||||
self.ThemeListWidget.item(count).setText(name)
|
||||
QtCore.QSettings().setValue(
|
||||
self.settingsSection + u'/global theme',
|
||||
@ -178,21 +179,21 @@ class ThemeManager(QtGui.QWidget):
|
||||
# should be the same unless default
|
||||
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You are unable to delete the default theme.'),
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','You are unable to delete the default theme.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
else:
|
||||
for plugin in self.parent.plugin_manager.plugins:
|
||||
if not plugin.can_delete_theme(theme):
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Theme %s is use in %s plugin' % (theme, plugin.name)),
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','Theme %s is use in %s plugin' % (theme, plugin.name)),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return
|
||||
if unicode(self.parent.ServiceManagerContents.ThemeComboBox.currentText()) == theme:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Theme %s is use by Service Manager' % theme),
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','Theme %s is use by Service Manager' % theme),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return
|
||||
self.themelist.remove(theme)
|
||||
@ -217,13 +218,13 @@ class ThemeManager(QtGui.QWidget):
|
||||
"""
|
||||
item = self.ThemeListWidget.currentItem()
|
||||
if item is None:
|
||||
QtGui.QMessageBox.critical(self, self.trUtf8('Error'),
|
||||
self.trUtf8('You have not selected a theme.'),
|
||||
QtGui.QMessageBox.critical(self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','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,
|
||||
unicode(self.trUtf8('Save Theme - (%s)')) % theme,
|
||||
unicode(translate('ThemeManager','Save Theme - (%s)')) % theme,
|
||||
SettingsManager.get_last_dir(self.settingsSection, 1))
|
||||
path = unicode(path)
|
||||
if path:
|
||||
@ -246,7 +247,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
|
||||
def onImportTheme(self):
|
||||
files = QtGui.QFileDialog.getOpenFileNames(
|
||||
self, self.trUtf8('Select Theme Import File'),
|
||||
self, translate('ThemeManager','Select Theme Import File'),
|
||||
SettingsManager.get_last_dir(self.settingsSection), u'Theme (*.*)')
|
||||
log.info(u'New Themes %s', unicode(files))
|
||||
if files:
|
||||
@ -276,7 +277,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
textName = os.path.splitext(name)[0]
|
||||
if textName == self.global_theme:
|
||||
name = u'%s (%s)' % (textName,
|
||||
self.trUtf8('default'))
|
||||
translate('ThemeManager','default'))
|
||||
else:
|
||||
name = textName
|
||||
thumb = os.path.join(self.thumbPath, u'%s.png' % textName)
|
||||
@ -362,8 +363,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.generateAndSaveImage(dir, themename, filexml)
|
||||
except:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('File is not a valid theme.'),
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','File is not a valid theme.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
log.exception(u'Importing theme from zip file failed %s' % filename)
|
||||
finally:
|
||||
@ -445,8 +446,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
if self.saveThemeName != name:
|
||||
if os.path.exists(theme_file):
|
||||
result = QtGui.QMessageBox.question(
|
||||
self, self.trUtf8('Theme Exists'),
|
||||
self.trUtf8('A theme with this name already exists, '
|
||||
self, translate('ThemeManager','Theme Exists'),
|
||||
translate('ThemeManager','A theme with this name already exists, '
|
||||
'would you like to overwrite it?'),
|
||||
(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
|
||||
QtGui.QMessageBox.No)
|
||||
@ -503,7 +504,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
def baseTheme(self):
|
||||
log.debug(u'base theme created')
|
||||
newtheme = ThemeXML()
|
||||
newtheme.new_document(unicode(self.trUtf8('New Theme')))
|
||||
newtheme.new_document(unicode(translate('ThemeManager','New Theme')))
|
||||
newtheme.add_background_solid(unicode(u'#000000'))
|
||||
newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'),
|
||||
unicode(30), u'False')
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, Receiver, ThemeLevel
|
||||
from openlp.core.lib import SettingsTab, Receiver, ThemeLevel, translate
|
||||
|
||||
class ThemesTab(SettingsTab):
|
||||
"""
|
||||
@ -37,7 +37,7 @@ class ThemesTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'ThemesTab')
|
||||
self.tabTitleVisible = self.trUtf8('Themes')
|
||||
self.tabTitleVisible = translate('ThemesTab','Themes')
|
||||
self.ThemesTabLayout = QtGui.QHBoxLayout(self)
|
||||
self.ThemesTabLayout.setSpacing(8)
|
||||
self.ThemesTabLayout.setMargin(8)
|
||||
@ -106,19 +106,19 @@ class ThemesTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.GlobalGroupBox.setTitle(self.trUtf8('Global theme'))
|
||||
self.LevelGroupBox.setTitle(self.trUtf8('Theme level'))
|
||||
self.SongLevelRadioButton.setText(self.trUtf8('Song level'))
|
||||
self.SongLevelLabel.setText(self.trUtf8('Use the theme from each song '
|
||||
self.GlobalGroupBox.setTitle(translate('ThemesTab','Global theme'))
|
||||
self.LevelGroupBox.setTitle(translate('ThemesTab','Theme level'))
|
||||
self.SongLevelRadioButton.setText(translate('ThemesTab','Song level'))
|
||||
self.SongLevelLabel.setText(translate('ThemesTab','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(self.trUtf8('Service level'))
|
||||
self.ServiceLevelLabel.setText(self.trUtf8('Use the theme from the '
|
||||
self.ServiceLevelRadioButton.setText(translate('ThemesTab','Service level'))
|
||||
self.ServiceLevelLabel.setText(translate('ThemesTab','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(self.trUtf8('Global level'))
|
||||
self.GlobalLevelLabel.setText(self.trUtf8('Use the global theme, '
|
||||
self.GlobalLevelRadioButton.setText(translate('ThemesTab','Global level'))
|
||||
self.GlobalLevelLabel.setText(translate('ThemesTab','Use the global theme, '
|
||||
'overriding any themes associated with either the service or the '
|
||||
'songs.'))
|
||||
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab, DBManager
|
||||
from openlp.plugins.alerts.forms import AlertForm
|
||||
|
||||
@ -63,8 +63,8 @@ class alertsPlugin(Plugin):
|
||||
AlertIcon = build_icon(u':/tools/tools_alert.png')
|
||||
self.toolsAlertItem.setIcon(AlertIcon)
|
||||
self.toolsAlertItem.setObjectName(u'toolsAlertItem')
|
||||
self.toolsAlertItem.setText(self.trUtf8('&Alert'))
|
||||
self.toolsAlertItem.setStatusTip(self.trUtf8('Show an alert message'))
|
||||
self.toolsAlertItem.setText(translate('AlertsPlugin','&Alert'))
|
||||
self.toolsAlertItem.setStatusTip(translate('AlertsPlugin','Show an alert message'))
|
||||
self.toolsAlertItem.setShortcut(u'F7')
|
||||
self.service_manager.parent.ToolsMenu.addAction(self.toolsAlertItem)
|
||||
QtCore.QObject.connect(self.toolsAlertItem,
|
||||
@ -92,6 +92,6 @@ class alertsPlugin(Plugin):
|
||||
self.alertForm.exec_()
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Alerts Plugin</b><br>This plugin '
|
||||
about_text = translate('AlertsPlugin','<b>Alerts Plugin</b><br>This plugin '
|
||||
'controls the displaying of alerts on the presentations screen')
|
||||
return about_text
|
||||
|
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtGui, QtCore
|
||||
|
||||
from openlp.plugins.alerts.lib.models import AlertItem
|
||||
from openlp.core.lib import translate
|
||||
|
||||
from alertdialog import Ui_AlertDialog
|
||||
|
||||
@ -101,8 +102,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
||||
def onNewClick(self):
|
||||
if len(self.AlertTextEdit.text()) == 0:
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8('Item selected to Add'),
|
||||
self.trUtf8('Missing data'))
|
||||
translate('AlertForm','Item selected to Add'),
|
||||
translate('AlertForm','Missing data'))
|
||||
else:
|
||||
alert = AlertItem()
|
||||
alert.text = unicode(self.AlertTextEdit.text())
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Receiver
|
||||
from openlp.core.lib import Receiver, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -93,7 +93,7 @@ class AlertsManager(QtCore.QObject):
|
||||
self.alertList.append(text)
|
||||
if self.timer_id != 0:
|
||||
Receiver.send_message(u'maindisplay_status_text',
|
||||
self.trUtf8(u'Alert message created and delayed'))
|
||||
translate('AlertsManager',u'Alert message created and delayed'))
|
||||
return
|
||||
Receiver.send_message(u'maindisplay_status_text', u'')
|
||||
self.generateAlert()
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class AlertsTab(SettingsTab):
|
||||
"""
|
||||
@ -38,7 +38,7 @@ class AlertsTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'AlertsTab')
|
||||
self.tabTitleVisible = self.trUtf8('Alerts')
|
||||
self.tabTitleVisible = translate('AlertsTab','Alerts')
|
||||
self.AlertsLayout = QtGui.QHBoxLayout(self)
|
||||
self.AlertsLayout.setSpacing(8)
|
||||
self.AlertsLayout.setMargin(8)
|
||||
@ -186,19 +186,19 @@ class AlertsTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'valueChanged(int)'), self.onFontSizeSpinBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.FontGroupBox.setTitle(self.trUtf8('Font'))
|
||||
self.FontLabel.setText(self.trUtf8('Font Name:'))
|
||||
self.FontColorLabel.setText(self.trUtf8('Font Color:'))
|
||||
self.BackgroundColorLabel.setText(self.trUtf8('Background Color:'))
|
||||
self.FontSizeLabel.setText(self.trUtf8('Font Size:'))
|
||||
self.FontSizeSpinBox.setSuffix(self.trUtf8('pt'))
|
||||
self.TimeoutLabel.setText(self.trUtf8('Alert timeout:'))
|
||||
self.TimeoutSpinBox.setSuffix(self.trUtf8('s'))
|
||||
self.LocationLabel.setText(self.trUtf8('Location:'))
|
||||
self.PreviewGroupBox.setTitle(self.trUtf8('Preview'))
|
||||
self.FontPreview.setText(self.trUtf8('openlp.org'))
|
||||
self.LocationComboBox.setItemText(0, self.trUtf8('Top'))
|
||||
self.LocationComboBox.setItemText(1, self.trUtf8('Bottom'))
|
||||
self.FontGroupBox.setTitle(translate('AlertsTab','Font'))
|
||||
self.FontLabel.setText(translate('AlertsTab','Font Name:'))
|
||||
self.FontColorLabel.setText(translate('AlertsTab','Font Color:'))
|
||||
self.BackgroundColorLabel.setText(translate('AlertsTab','Background Color:'))
|
||||
self.FontSizeLabel.setText(translate('AlertsTab','Font Size:'))
|
||||
self.FontSizeSpinBox.setSuffix(translate('AlertsTab','pt'))
|
||||
self.TimeoutLabel.setText(translate('AlertsTab','Alert timeout:'))
|
||||
self.TimeoutSpinBox.setSuffix(translate('AlertsTab','s'))
|
||||
self.LocationLabel.setText(translate('AlertsTab','Location:'))
|
||||
self.PreviewGroupBox.setTitle(translate('AlertsTab','Preview'))
|
||||
self.FontPreview.setText(translate('AlertsTab','openlp.org'))
|
||||
self.LocationComboBox.setItemText(0, translate('AlertsTab','Top'))
|
||||
self.LocationComboBox.setItemText(1, translate('AlertsTab','Bottom'))
|
||||
|
||||
def onBackgroundColorButtonClicked(self):
|
||||
self.bg_color = QtGui.QColorDialog.getColor(
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -88,7 +88,7 @@ class BiblePlugin(Plugin):
|
||||
self.media_item.onImportClick()
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<strong>Bible Plugin</strong><br />This '
|
||||
about_text = translate('BiblePlugin','<strong>Bible Plugin</strong><br />This '
|
||||
'plugin allows bible verses from different sources to be '
|
||||
'displayed on the screen during the service.')
|
||||
return about_text
|
||||
|
@ -31,7 +31,7 @@ import os.path
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from bibleimportwizard import Ui_BibleImportWizard
|
||||
from openlp.core.lib import Receiver, SettingsManager
|
||||
from openlp.core.lib import Receiver, SettingsManager, translate
|
||||
from openlp.core.utils import AppLocation, variant_to_unicode
|
||||
from openlp.plugins.bibles.lib.manager import BibleFormat
|
||||
|
||||
@ -123,8 +123,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
if self.field(u'source_format').toInt()[0] == BibleFormat.OSIS:
|
||||
if self.field(u'osis_location').toString() == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Invalid Bible Location'),
|
||||
self.trUtf8('You need to specify a file to import your '
|
||||
translate('ImportWizardForm','Invalid Bible Location'),
|
||||
translate('ImportWizardForm','You need to specify a file to import your '
|
||||
'Bible from.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.OSISLocationEdit.setFocus()
|
||||
@ -132,16 +132,16 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.CSV:
|
||||
if self.field(u'csv_booksfile').toString() == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Invalid Books File'),
|
||||
self.trUtf8('You need to specify a file with books of '
|
||||
translate('ImportWizardForm','Invalid Books File'),
|
||||
translate('ImportWizardForm','You need to specify a file with books of '
|
||||
'the Bible to use in the import.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.BooksLocationEdit.setFocus()
|
||||
return False
|
||||
elif self.field(u'csv_versefile').toString() == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Invalid Verse File'),
|
||||
self.trUtf8('You need to specify a file of Bible '
|
||||
translate('ImportWizardForm','Invalid Verse File'),
|
||||
translate('ImportWizardForm','You need to specify a file of Bible '
|
||||
'verses to import.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.CsvVerseLocationEdit.setFocus()
|
||||
@ -149,8 +149,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
elif self.field(u'source_format').toInt()[0] == BibleFormat.OpenSong:
|
||||
if self.field(u'opensong_file').toString() == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Invalid OpenSong Bible'),
|
||||
self.trUtf8('You need to specify an OpenSong Bible '
|
||||
translate('ImportWizardForm','Invalid OpenSong Bible'),
|
||||
translate('ImportWizardForm','You need to specify an OpenSong Bible '
|
||||
'file to import.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.OpenSongFileEdit.setFocus()
|
||||
@ -162,16 +162,16 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
license_copyright = variant_to_unicode(self.field(u'license_copyright'))
|
||||
if license_version == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Empty Version Name'),
|
||||
self.trUtf8('You need to specify a version name for your '
|
||||
translate('ImportWizardForm','Empty Version Name'),
|
||||
translate('ImportWizardForm','You need to specify a version name for your '
|
||||
'Bible.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.VersionNameEdit.setFocus()
|
||||
return False
|
||||
elif license_copyright == u'':
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Empty Copyright'),
|
||||
self.trUtf8('You need to set a copyright for your Bible! '
|
||||
translate('ImportWizardForm','Empty Copyright'),
|
||||
translate('ImportWizardForm','You need to set a copyright for your Bible! '
|
||||
'Bibles in the Public Domain need to be marked as '
|
||||
'such.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
@ -179,8 +179,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
return False
|
||||
elif self.manager.exists(license_version):
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('Bible Exists'),
|
||||
self.trUtf8('This Bible already exists! Please import '
|
||||
translate('ImportWizardForm','Bible Exists'),
|
||||
translate('ImportWizardForm','This Bible already exists! Please import '
|
||||
'a different Bible or first delete the existing one.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.VersionNameEdit.setFocus()
|
||||
@ -200,34 +200,34 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
"""
|
||||
self.BibleComboBox.clear()
|
||||
for bible in self.web_bible_list[index].keys():
|
||||
self.BibleComboBox.addItem(unicode(self.trUtf8(bible)))
|
||||
self.BibleComboBox.addItem(unicode(translate('ImportWizardForm',bible)))
|
||||
|
||||
def onOsisFileButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the OSIS file.
|
||||
"""
|
||||
self.getFileName(self.trUtf8('Open OSIS File'),
|
||||
self.getFileName(translate('ImportWizardForm','Open OSIS File'),
|
||||
self.OSISLocationEdit)
|
||||
|
||||
def onBooksFileButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the books CSV file.
|
||||
"""
|
||||
self.getFileName(self.trUtf8('Open Books CSV File'),
|
||||
self.getFileName(translate('ImportWizardForm','Open Books CSV File'),
|
||||
self.BooksLocationEdit)
|
||||
|
||||
def onCsvVersesFileButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the verses CSV file.
|
||||
"""
|
||||
self.getFileName(self.trUtf8('Open Verses CSV File'),
|
||||
self.getFileName(translate('ImportWizardForm','Open Verses CSV File'),
|
||||
self.CsvVerseLocationEdit)
|
||||
|
||||
def onOpenSongBrowseButtonClicked(self):
|
||||
"""
|
||||
Show the file open dialog for the OpenSong file.
|
||||
"""
|
||||
self.getFileName(self.trUtf8('Open OpenSong Bible'),
|
||||
self.getFileName(translate('ImportWizardForm','Open OpenSong Bible'),
|
||||
self.OpenSongFileEdit)
|
||||
|
||||
def onCancelButtonClicked(self, checked):
|
||||
@ -362,7 +362,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.ImportProgressBar.setMinimum(0)
|
||||
self.ImportProgressBar.setMaximum(1188)
|
||||
self.ImportProgressBar.setValue(0)
|
||||
self.ImportProgressLabel.setText(self.trUtf8('Starting import...'))
|
||||
self.ImportProgressLabel.setText(translate('ImportWizardForm','Starting import...'))
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
|
||||
def performImport(self):
|
||||
@ -416,10 +416,10 @@ class ImportWizardForm(QtGui.QWizard, Ui_BibleImportWizard):
|
||||
self.manager.save_meta_data(license_version, license_version,
|
||||
license_copyright, license_permission)
|
||||
self.manager.reload_bibles()
|
||||
self.ImportProgressLabel.setText(self.trUtf8('Finished import.'))
|
||||
self.ImportProgressLabel.setText(translate('ImportWizardForm','Finished import.'))
|
||||
else:
|
||||
self.ImportProgressLabel.setText(
|
||||
self.trUtf8('Your Bible import failed.'))
|
||||
translate('ImportWizardForm','Your Bible import failed.'))
|
||||
importer.delete()
|
||||
|
||||
def postImport(self):
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Receiver, SettingsTab
|
||||
from openlp.core.lib import Receiver, SettingsTab, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -45,7 +45,7 @@ class BiblesTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'BiblesTab')
|
||||
self.tabTitleVisible = self.trUtf8('Bibles')
|
||||
self.tabTitleVisible = translate('BiblesTab','Bibles')
|
||||
self.BibleLayout = QtGui.QHBoxLayout(self)
|
||||
self.BibleLayout.setSpacing(8)
|
||||
self.BibleLayout.setMargin(8)
|
||||
@ -149,22 +149,22 @@ class BiblesTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.VerseDisplayGroupBox.setTitle(self.trUtf8('Verse Display'))
|
||||
self.VerseDisplayGroupBox.setTitle(translate('BiblesTab','Verse Display'))
|
||||
self.NewChaptersCheckBox.setText(
|
||||
self.trUtf8('Only show new chapter numbers'))
|
||||
self.LayoutStyleLabel.setText(self.trUtf8('Layout Style:'))
|
||||
self.DisplayStyleLabel.setText(self.trUtf8('Display Style:'))
|
||||
self.BibleThemeLabel.setText(self.trUtf8('Bible Theme:'))
|
||||
self.LayoutStyleComboBox.setItemText(0, self.trUtf8('verse per slide'))
|
||||
self.LayoutStyleComboBox.setItemText(1, self.trUtf8('verse per line'))
|
||||
self.LayoutStyleComboBox.setItemText(2, self.trUtf8('continuous'))
|
||||
self.DisplayStyleComboBox.setItemText(0, self.trUtf8('No brackets'))
|
||||
self.DisplayStyleComboBox.setItemText(1, self.trUtf8('( and )'))
|
||||
self.DisplayStyleComboBox.setItemText(2, self.trUtf8('{ and }'))
|
||||
self.DisplayStyleComboBox.setItemText(3, self.trUtf8('[ and ]'))
|
||||
self.ChangeNoteLabel.setText(self.trUtf8(
|
||||
translate('BiblesTab','Only show new chapter numbers'))
|
||||
self.LayoutStyleLabel.setText(translate('BiblesTab','Layout Style:'))
|
||||
self.DisplayStyleLabel.setText(translate('BiblesTab','Display Style:'))
|
||||
self.BibleThemeLabel.setText(translate('BiblesTab','Bible Theme:'))
|
||||
self.LayoutStyleComboBox.setItemText(0, translate('BiblesTab','verse per slide'))
|
||||
self.LayoutStyleComboBox.setItemText(1, translate('BiblesTab','verse per line'))
|
||||
self.LayoutStyleComboBox.setItemText(2, translate('BiblesTab','continuous'))
|
||||
self.DisplayStyleComboBox.setItemText(0, translate('BiblesTab','No brackets'))
|
||||
self.DisplayStyleComboBox.setItemText(1, translate('BiblesTab','( and )'))
|
||||
self.DisplayStyleComboBox.setItemText(2, translate('BiblesTab','{ and }'))
|
||||
self.DisplayStyleComboBox.setItemText(3, translate('BiblesTab','[ and ]'))
|
||||
self.ChangeNoteLabel.setText(translate('BiblesTab',
|
||||
'Note:\nChanges don\'t affect verses already in the service'))
|
||||
self.BibleDualCheckBox.setText(self.trUtf8('Display Dual Bible Verses'))
|
||||
self.BibleDualCheckBox.setText(translate('BiblesTab','Display Dual Bible Verses'))
|
||||
|
||||
def onBibleThemeComboBoxChanged(self):
|
||||
self.bible_theme = self.BibleThemeComboBox.currentText()
|
||||
|
@ -29,7 +29,7 @@ import time
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, Receiver, BaseListWithDnD, \
|
||||
ItemCapabilities
|
||||
ItemCapabilities, translate
|
||||
from openlp.plugins.bibles.forms import ImportWizardForm
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -71,7 +71,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
return unicode(obj)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Bible')
|
||||
self.PluginNameVisible = translate('MediaItem','Bible')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
@ -147,7 +147,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.QuickMessage = QtGui.QLabel(self.QuickTab)
|
||||
self.QuickMessage.setObjectName(u'QuickMessage')
|
||||
self.QuickLayout.addWidget(self.QuickMessage, 6, 0, 1, 3)
|
||||
self.SearchTabWidget.addTab(self.QuickTab, self.trUtf8('Quick'))
|
||||
self.SearchTabWidget.addTab(self.QuickTab, translate('MediaItem','Quick'))
|
||||
QuickSpacerItem = QtGui.QSpacerItem(20, 35, QtGui.QSizePolicy.Minimum,
|
||||
QtGui.QSizePolicy.Expanding)
|
||||
self.QuickLayout.addItem(QuickSpacerItem, 6, 2, 1, 1)
|
||||
@ -231,7 +231,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.AdvancedMessage = QtGui.QLabel(self.AdvancedTab)
|
||||
self.AdvancedMessage.setObjectName(u'AdvancedMessage')
|
||||
self.AdvancedLayout.addWidget(self.AdvancedMessage, 8, 0, 1, 3)
|
||||
self.SearchTabWidget.addTab(self.AdvancedTab, self.trUtf8('Advanced'))
|
||||
self.SearchTabWidget.addTab(self.AdvancedTab, translate('MediaItem','Advanced'))
|
||||
# Add the search tab widget to the page layout
|
||||
self.PageLayout.addWidget(self.SearchTabWidget)
|
||||
# Combo Boxes
|
||||
@ -289,27 +289,27 @@ class BibleMediaItem(MediaManagerItem):
|
||||
|
||||
def retranslateUi(self):
|
||||
log.debug(u'retranslateUi')
|
||||
self.QuickVersionLabel.setText(self.trUtf8('Version:'))
|
||||
self.QuickSecondVersionLabel.setText(self.trUtf8('Dual:'))
|
||||
self.QuickSearchLabel.setText(self.trUtf8('Search Type:'))
|
||||
self.QuickSearchLabel.setText(self.trUtf8('Find:'))
|
||||
self.QuickSearchButton.setText(self.trUtf8('Search'))
|
||||
self.QuickClearLabel.setText(self.trUtf8('Results:'))
|
||||
self.AdvancedVersionLabel.setText(self.trUtf8('Version:'))
|
||||
self.AdvancedSecondBibleLabel.setText(self.trUtf8('Dual:'))
|
||||
self.AdvancedBookLabel.setText(self.trUtf8('Book:'))
|
||||
self.AdvancedChapterLabel.setText(self.trUtf8('Chapter:'))
|
||||
self.AdvancedVerseLabel.setText(self.trUtf8('Verse:'))
|
||||
self.AdvancedFromLabel.setText(self.trUtf8('From:'))
|
||||
self.AdvancedToLabel.setText(self.trUtf8('To:'))
|
||||
self.AdvancedClearLabel.setText(self.trUtf8('Results:'))
|
||||
self.AdvancedSearchButton.setText(self.trUtf8('Search'))
|
||||
self.QuickSearchComboBox.addItem(self.trUtf8('Verse Search'))
|
||||
self.QuickSearchComboBox.addItem(self.trUtf8('Text Search'))
|
||||
self.ClearQuickSearchComboBox.addItem(self.trUtf8('Clear'))
|
||||
self.ClearQuickSearchComboBox.addItem(self.trUtf8('Keep'))
|
||||
self.ClearAdvancedSearchComboBox.addItem(self.trUtf8('Clear'))
|
||||
self.ClearAdvancedSearchComboBox.addItem(self.trUtf8('Keep'))
|
||||
self.QuickVersionLabel.setText(translate('MediaItem','Version:'))
|
||||
self.QuickSecondVersionLabel.setText(translate('MediaItem','Dual:'))
|
||||
self.QuickSearchLabel.setText(translate('MediaItem','Search Type:'))
|
||||
self.QuickSearchLabel.setText(translate('MediaItem','Find:'))
|
||||
self.QuickSearchButton.setText(translate('MediaItem','Search'))
|
||||
self.QuickClearLabel.setText(translate('MediaItem','Results:'))
|
||||
self.AdvancedVersionLabel.setText(translate('MediaItem','Version:'))
|
||||
self.AdvancedSecondBibleLabel.setText(translate('MediaItem','Dual:'))
|
||||
self.AdvancedBookLabel.setText(translate('MediaItem','Book:'))
|
||||
self.AdvancedChapterLabel.setText(translate('MediaItem','Chapter:'))
|
||||
self.AdvancedVerseLabel.setText(translate('MediaItem','Verse:'))
|
||||
self.AdvancedFromLabel.setText(translate('MediaItem','From:'))
|
||||
self.AdvancedToLabel.setText(translate('MediaItem','To:'))
|
||||
self.AdvancedClearLabel.setText(translate('MediaItem','Results:'))
|
||||
self.AdvancedSearchButton.setText(translate('MediaItem','Search'))
|
||||
self.QuickSearchComboBox.addItem(translate('MediaItem','Verse Search'))
|
||||
self.QuickSearchComboBox.addItem(translate('MediaItem','Text Search'))
|
||||
self.ClearQuickSearchComboBox.addItem(translate('MediaItem','Clear'))
|
||||
self.ClearQuickSearchComboBox.addItem(translate('MediaItem','Keep'))
|
||||
self.ClearAdvancedSearchComboBox.addItem(translate('MediaItem','Clear'))
|
||||
self.ClearAdvancedSearchComboBox.addItem(translate('MediaItem','Keep'))
|
||||
|
||||
def initialise(self):
|
||||
log.debug(u'bible manager initialise')
|
||||
@ -363,8 +363,8 @@ class BibleMediaItem(MediaManagerItem):
|
||||
|
||||
def onNoBookFound(self):
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('No Book Found'),
|
||||
self.trUtf8('No matching book could be found in this Bible.'),
|
||||
translate('MediaItem','No Book Found'),
|
||||
translate('MediaItem','No matching book could be found in this Bible.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok
|
||||
)
|
||||
@ -523,9 +523,9 @@ class BibleMediaItem(MediaManagerItem):
|
||||
bible_text = u''
|
||||
if not service_item.title:
|
||||
service_item.title = u'%s %s' % (book, verse_text)
|
||||
elif service_item.title.find(self.trUtf8(u'etc')) == -1:
|
||||
elif service_item.title.find(translate('MediaItem',u'etc')) == -1:
|
||||
service_item.title = u'%s, %s' \
|
||||
% (service_item.title, self.trUtf8(u'etc'))
|
||||
% (service_item.title, translate('MediaItem',u'etc'))
|
||||
if len(self.parent.settings_tab.bible_theme) == 0:
|
||||
service_item.theme = None
|
||||
else:
|
||||
@ -574,7 +574,7 @@ class BibleMediaItem(MediaManagerItem):
|
||||
self.verses = self.parent.manager.get_verse_count(bible, book, 1)
|
||||
if self.verses == 0:
|
||||
self.AdvancedSearchButton.setEnabled(False)
|
||||
self.AdvancedMessage.setText(self.trUtf8('Bible not fully loaded'))
|
||||
self.AdvancedMessage.setText(translate('MediaItem','Bible not fully loaded'))
|
||||
else:
|
||||
self.AdvancedSearchButton.setEnabled(True)
|
||||
self.AdvancedMessage.setText(u'')
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
from lxml import objectify
|
||||
from PyQt4 import QtCore
|
||||
|
||||
from openlp.core.lib import Receiver
|
||||
from openlp.core.lib import Receiver, translate
|
||||
from db import BibleDB
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -94,7 +94,7 @@ class OpenSongBible(BibleDB):
|
||||
)
|
||||
Receiver.send_message(u'openlp_process_events')
|
||||
self.wizard.incrementProgressBar(
|
||||
QtCore.QString('%s %s %s' % (self.trUtf8('Importing'),\
|
||||
QtCore.QString('%s %s %s' % (translate('OpenSong','Importing'),\
|
||||
db_book.name, chapter.attrib[u'n'])))
|
||||
self.commit()
|
||||
except:
|
||||
|
@ -26,7 +26,7 @@
|
||||
import logging
|
||||
|
||||
from forms import EditCustomForm
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.plugins.custom.lib import CustomManager, CustomMediaItem, CustomTab
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -67,7 +67,7 @@ class CustomPlugin(Plugin):
|
||||
self.remove_toolbox_item()
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Custom Plugin</b><br>This plugin '
|
||||
about_text = translate('CustomPlugin','<b>Custom Plugin</b><br>This plugin '
|
||||
'allows slides to be displayed on the screen in the same way '
|
||||
'songs are. This plugin provides greater freedom over the '
|
||||
'songs plugin.<br>')
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from editcustomdialog import Ui_customEditDialog
|
||||
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver
|
||||
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate
|
||||
from openlp.plugins.custom.lib.models import CustomSlide
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -47,7 +47,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
self.setupUi(self)
|
||||
# Connecting signals and slots
|
||||
self.previewButton = QtGui.QPushButton()
|
||||
self.previewButton.setText(self.trUtf8('Save && Preview'))
|
||||
self.previewButton.setText(translate('editCustomForm','Save && Preview'))
|
||||
self.buttonBox.addButton(
|
||||
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||
QtCore.QObject.connect(self.buttonBox,
|
||||
@ -84,7 +84,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
|
||||
def onPreview(self, button):
|
||||
log.debug(u'onPreview')
|
||||
if button.text() == unicode(self.trUtf8('Save && Preview')) \
|
||||
if button.text() == unicode(translate('editCustomForm','Save && Preview')) \
|
||||
and self.saveCustom():
|
||||
Receiver.send_message(u'custom_preview')
|
||||
|
||||
@ -147,7 +147,7 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
def saveCustom(self):
|
||||
valid, message = self._validate()
|
||||
if not valid:
|
||||
QtGui.QMessageBox.critical(self, self.trUtf8('Error'), message,
|
||||
QtGui.QMessageBox.critical(self, translate('editCustomForm','Error'), message,
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return False
|
||||
sxml = SongXMLBuilder()
|
||||
@ -263,12 +263,12 @@ class EditCustomForm(QtGui.QDialog, Ui_customEditDialog):
|
||||
def _validate(self):
|
||||
if len(self.TitleEdit.displayText()) == 0:
|
||||
self.TitleEdit.setFocus()
|
||||
return False, self.trUtf8('You need to enter a title')
|
||||
return False, translate('editCustomForm','You need to enter a title')
|
||||
# must have 1 slide
|
||||
if self.VerseListView.count() == 0:
|
||||
self.VerseTextEdit.setFocus()
|
||||
return False, self.trUtf8('You need to enter a slide')
|
||||
return False, translate('editCustomForm','You need to enter a slide')
|
||||
if self.VerseTextEdit.toPlainText():
|
||||
self.VerseTextEdit.setFocus()
|
||||
return False, self.trUtf8('You have unsaved data, please save or clear')
|
||||
return False, translate('editCustomForm','You have unsaved data, please save or clear')
|
||||
return True, u''
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class CustomTab(SettingsTab):
|
||||
"""
|
||||
@ -36,7 +36,7 @@ class CustomTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'CustomTab')
|
||||
self.tabTitleVisible = self.trUtf8('Custom')
|
||||
self.tabTitleVisible = translate('CustomTab','Custom')
|
||||
self.CustomLayout = QtGui.QFormLayout(self)
|
||||
self.CustomLayout.setObjectName(u'CustomLayout')
|
||||
self.CustomModeGroupBox = QtGui.QGroupBox(self)
|
||||
@ -55,9 +55,9 @@ class CustomTab(SettingsTab):
|
||||
self.onDisplayFooterCheckBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.CustomModeGroupBox.setTitle(self.trUtf8('Custom Display'))
|
||||
self.CustomModeGroupBox.setTitle(translate('CustomTab','Custom Display'))
|
||||
self.DisplayFooterCheckBox.setText(
|
||||
self.trUtf8('Display Footer'))
|
||||
translate('CustomTab','Display Footer'))
|
||||
|
||||
def onDisplayFooterCheckBoxChanged(self, check_state):
|
||||
self.displayFooter = False
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, SongXMLParser, BaseListWithDnD, \
|
||||
Receiver, ItemCapabilities
|
||||
Receiver, ItemCapabilities, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -66,7 +66,7 @@ class CustomMediaItem(MediaManagerItem):
|
||||
QtCore.SIGNAL(u'custom_preview'), self.onPreviewClick)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Custom')
|
||||
self.PluginNameVisible = translate('mediaItem','Custom')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.plugins.images.lib import ImageMediaItem, ImageTab
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -56,7 +56,7 @@ class ImagePlugin(Plugin):
|
||||
return ImageMediaItem(self, self.icon, self.name)
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Image Plugin</b><br>Allows images of '
|
||||
about_text = translate('ImagePlugin','<b>Image Plugin</b><br>Allows images of '
|
||||
'all types to be displayed. If a number of images are selected '
|
||||
'together and presented on the live controller it is possible '
|
||||
'to turn them into a timed loop.<br<br>From the plugin if the '
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab, Receiver
|
||||
from openlp.core.lib import SettingsTab, Receiver, translate
|
||||
|
||||
class ImageTab(SettingsTab):
|
||||
"""
|
||||
@ -36,7 +36,7 @@ class ImageTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'ImageTab')
|
||||
self.tabTitleVisible = self.trUtf8('Images')
|
||||
self.tabTitleVisible = translate('ImageTab','Images')
|
||||
self.ImageLayout = QtGui.QFormLayout(self)
|
||||
self.ImageLayout.setObjectName(u'ImageLayout')
|
||||
self.ImageSettingsGroupBox = QtGui.QGroupBox(self)
|
||||
@ -63,9 +63,9 @@ class ImageTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'valueChanged(int)'), self.onTimeoutSpinBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.ImageSettingsGroupBox.setTitle(self.trUtf8('Image Settings'))
|
||||
self.TimeoutLabel.setText(self.trUtf8('Slide Loop Delay:'))
|
||||
self.TimeoutSpinBox.setSuffix(self.trUtf8('sec'))
|
||||
self.ImageSettingsGroupBox.setTitle(translate('ImageTab','Image Settings'))
|
||||
self.TimeoutLabel.setText(translate('ImageTab','Slide Loop Delay:'))
|
||||
self.TimeoutSpinBox.setSuffix(translate('ImageTab','sec'))
|
||||
|
||||
def onTimeoutSpinBoxChanged(self):
|
||||
self.loop_delay = self.TimeoutSpinBox.value()
|
||||
|
@ -29,7 +29,7 @@ import os
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||
contextMenuAction, ItemCapabilities, SettingsManager
|
||||
contextMenuAction, ItemCapabilities, SettingsManager, translate
|
||||
from openlp.core.utils import AppLocation
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -56,11 +56,11 @@ class ImageMediaItem(MediaManagerItem):
|
||||
MediaManagerItem.__init__(self, parent, icon, title)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Image')
|
||||
self.PluginNameVisible = translate('MediaItem','Image')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = self.trUtf8('Select Image(s)')
|
||||
self.OnNewFileMasks = self.trUtf8(
|
||||
self.OnNewPrompt = translate('MediaItem','Select Image(s)')
|
||||
self.OnNewFileMasks = translate('MediaItem',
|
||||
'Images (*.jpg *.jpeg *.gif *.png *.bmp);; All files (*)')
|
||||
|
||||
def requiredIcons(self):
|
||||
@ -90,7 +90,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
self.ListView.addAction(
|
||||
contextMenuAction(
|
||||
self.ListView, u':/slides/slide_blank.png',
|
||||
self.trUtf8('Replace Live Background'),
|
||||
translate('MediaItem','Replace Live Background'),
|
||||
self.onReplaceClick))
|
||||
|
||||
def addEndHeaderBar(self):
|
||||
@ -105,7 +105,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
self.ImageWidget.setObjectName(u'ImageWidget')
|
||||
self.blankButton = self.Toolbar.addToolbarButton(
|
||||
u'Replace Background', u':/slides/slide_blank.png',
|
||||
self.trUtf8('Replace Live Background'), self.onReplaceClick, False)
|
||||
translate('MediaItem','Replace Live Background'), self.onReplaceClick, False)
|
||||
# Add the song widget to the page layout
|
||||
self.PageLayout.addWidget(self.ImageWidget)
|
||||
|
||||
@ -143,7 +143,7 @@ class ImageMediaItem(MediaManagerItem):
|
||||
def generateSlideData(self, service_item, item=None):
|
||||
items = self.ListView.selectedIndexes()
|
||||
if items:
|
||||
service_item.title = unicode(self.trUtf8('Image(s)'))
|
||||
service_item.title = unicode(translate('MediaItem','Image(s)'))
|
||||
service_item.add_capability(ItemCapabilities.AllowsMaintain)
|
||||
service_item.add_capability(ItemCapabilities.AllowsPreview)
|
||||
service_item.add_capability(ItemCapabilities.AllowsLoop)
|
||||
@ -161,8 +161,8 @@ class ImageMediaItem(MediaManagerItem):
|
||||
def onReplaceClick(self):
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8('No item selected'),
|
||||
self.trUtf8('You must select one item'))
|
||||
translate('MediaItem','No item selected'),
|
||||
translate('MediaItem','You must select one item'))
|
||||
items = self.ListView.selectedIndexes()
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
|
@ -29,7 +29,7 @@ import os
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||
ItemCapabilities, SettingsManager, contextMenuAction, Receiver
|
||||
ItemCapabilities, SettingsManager, contextMenuAction, Receiver, translate
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -58,11 +58,11 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.ServiceItemIconName = u':/media/media_video.png'
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Media')
|
||||
self.PluginNameVisible = translate('MediaItem','Media')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = self.trUtf8('Select Media')
|
||||
self.OnNewFileMasks = self.trUtf8('Videos (%s);;'
|
||||
self.OnNewPrompt = translate('MediaItem','Select Media')
|
||||
self.OnNewFileMasks = translate('MediaItem','Videos (%s);;'
|
||||
'Audio (%s);;'
|
||||
'All files (*)' % (self.parent.video_list, self.parent.audio_list))
|
||||
|
||||
@ -78,7 +78,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.ListView.addAction(
|
||||
contextMenuAction(
|
||||
self.ListView, u':/slides/slide_blank.png',
|
||||
self.trUtf8('Replace Live Background'),
|
||||
translate('MediaItem','Replace Live Background'),
|
||||
self.onReplaceClick))
|
||||
|
||||
def addEndHeaderBar(self):
|
||||
@ -93,7 +93,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.ImageWidget.setObjectName(u'ImageWidget')
|
||||
self.blankButton = self.Toolbar.addToolbarButton(
|
||||
u'Replace Background', u':/slides/slide_blank.png',
|
||||
self.trUtf8('Replace Live Background'), self.onReplaceClick, False)
|
||||
translate('MediaItem','Replace Live Background'), self.onReplaceClick, False)
|
||||
# Add the song widget to the page layout
|
||||
self.PageLayout.addWidget(self.ImageWidget)
|
||||
|
||||
@ -105,8 +105,8 @@ class MediaMediaItem(MediaManagerItem):
|
||||
self.background = True
|
||||
if not self.ListView.selectedIndexes():
|
||||
QtGui.QMessageBox.information(self,
|
||||
self.trUtf8('No item selected'),
|
||||
self.trUtf8('You must select one item'))
|
||||
translate('MediaItem','No item selected'),
|
||||
translate('MediaItem','You must select one item'))
|
||||
items = self.ListView.selectedIndexes()
|
||||
for item in items:
|
||||
bitem = self.ListView.item(item.row())
|
||||
@ -119,7 +119,7 @@ class MediaMediaItem(MediaManagerItem):
|
||||
if item is None:
|
||||
return False
|
||||
filename = unicode((item.data(QtCore.Qt.UserRole)).toString())
|
||||
service_item.title = unicode(self.trUtf8('Media'))
|
||||
service_item.title = unicode(translate('MediaItem','Media'))
|
||||
service_item.add_capability(ItemCapabilities.RequiresMedia)
|
||||
frame = u':/media/image_clapperboard.png'
|
||||
(path, name) = os.path.split(filename)
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.plugins.media.lib import MediaMediaItem
|
||||
from PyQt4.phonon import Phonon
|
||||
|
||||
@ -76,6 +76,6 @@ class MediaPlugin(Plugin):
|
||||
return MediaMediaItem(self, self.icon, self.name)
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Media Plugin</b><br>This plugin '
|
||||
about_text = translate('MediaPlugin','<b>Media Plugin</b><br>This plugin '
|
||||
'allows the playing of audio and video media')
|
||||
return about_text
|
||||
|
@ -29,7 +29,7 @@ import os
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
|
||||
SettingsManager
|
||||
SettingsManager, translate
|
||||
from openlp.core.utils import AppLocation
|
||||
from openlp.plugins.presentations.lib import MessageListener
|
||||
|
||||
@ -61,11 +61,11 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
self.message_listener = MessageListener(self)
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Presentation')
|
||||
self.PluginNameVisible = translate('MediaItem','Presentation')
|
||||
|
||||
def retranslateUi(self):
|
||||
self.OnNewPrompt = self.trUtf8('Select Presentation(s)')
|
||||
self.Automatic = self.trUtf8('Automatic')
|
||||
self.OnNewPrompt = translate('MediaItem','Select Presentation(s)')
|
||||
self.Automatic = translate('MediaItem','Automatic')
|
||||
fileType = u''
|
||||
for controller in self.controllers:
|
||||
if self.controllers[controller].enabled:
|
||||
@ -75,7 +75,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
if fileType.find(type) == -1:
|
||||
fileType += u'*%s ' % type
|
||||
self.parent.service_manager.supportedSuffixes(type)
|
||||
self.OnNewFileMasks = self.trUtf8('Presentations (%s)' % fileType)
|
||||
self.OnNewFileMasks = translate('MediaItem','Presentations (%s)' % fileType)
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
@ -101,7 +101,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
self.DisplayTypeLabel = QtGui.QLabel(self.PresentationWidget)
|
||||
self.DisplayTypeLabel.setObjectName(u'SearchTypeLabel')
|
||||
self.DisplayLayout.addWidget(self.DisplayTypeLabel, 0, 0, 1, 1)
|
||||
self.DisplayTypeLabel.setText(self.trUtf8('Present using:'))
|
||||
self.DisplayTypeLabel.setText(translate('MediaItem','Present using:'))
|
||||
# Add the Presentation widget to the page layout
|
||||
self.PageLayout.addWidget(self.PresentationWidget)
|
||||
|
||||
@ -134,7 +134,7 @@ class PresentationMediaItem(MediaManagerItem):
|
||||
(path, filename) = os.path.split(unicode(file))
|
||||
if titles.count(filename) > 0:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('File exists'), self.trUtf8(
|
||||
self, translate('MediaItem','File exists'), translate('MediaItem',
|
||||
'A presentation with that filename already exists.'),
|
||||
QtGui.QMessageBox.Ok)
|
||||
else:
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class PresentationTab(SettingsTab):
|
||||
"""
|
||||
@ -37,7 +37,7 @@ class PresentationTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'PresentationTab')
|
||||
self.tabTitleVisible = self.trUtf8('Presentations')
|
||||
self.tabTitleVisible = translate('PresentationTab','Presentations')
|
||||
self.PresentationLayout = QtGui.QHBoxLayout(self)
|
||||
self.PresentationLayout.setSpacing(8)
|
||||
self.PresentationLayout.setMargin(8)
|
||||
@ -88,12 +88,12 @@ class PresentationTab(SettingsTab):
|
||||
self.PresentationLayout.addWidget(self.PresentationRightWidget)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.VerseDisplayGroupBox.setTitle(self.trUtf8('Available Controllers'))
|
||||
self.VerseDisplayGroupBox.setTitle(translate('PresentationTab','Available Controllers'))
|
||||
for key in self.controllers:
|
||||
controller = self.controllers[key]
|
||||
checkbox = self.PresenterCheckboxes[controller.name]
|
||||
checkbox.setText(
|
||||
u'%s %s' % (controller.name, self.trUtf8('available')))
|
||||
u'%s %s' % (controller.name, translate('PresentationTab','available')))
|
||||
|
||||
def load(self):
|
||||
for key in self.controllers:
|
||||
|
@ -26,7 +26,7 @@
|
||||
import os
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, translate
|
||||
from openlp.core.utils import AppLocation
|
||||
from openlp.plugins.presentations.lib import *
|
||||
|
||||
@ -108,7 +108,7 @@ class PresentationPlugin(Plugin):
|
||||
return False
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>Presentation Plugin</b> <br> Delivers '
|
||||
about_text = translate('PresentationPlugin','<b>Presentation Plugin</b> <br> Delivers '
|
||||
'the ability to show presentations using a number of different '
|
||||
'programs. The choice of available presentation programs is '
|
||||
'available to the user in a drop down box.')
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class RemoteTab(SettingsTab):
|
||||
"""
|
||||
@ -36,7 +36,7 @@ class RemoteTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'RemoteTab')
|
||||
self.tabTitleVisible = self.trUtf8('Remotes')
|
||||
self.tabTitleVisible = translate('RemoteTab','Remotes')
|
||||
self.RemoteLayout = QtGui.QFormLayout(self)
|
||||
self.RemoteLayout.setObjectName(u'RemoteLayout')
|
||||
self.RemoteModeGroupBox = QtGui.QGroupBox(self)
|
||||
@ -53,7 +53,7 @@ class RemoteTab(SettingsTab):
|
||||
0, QtGui.QFormLayout.LabelRole, self.RemoteModeGroupBox)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.RemoteModeGroupBox.setTitle(self.trUtf8('Remotes Receiver Port'))
|
||||
self.RemoteModeGroupBox.setTitle(translate('RemoteTab','Remotes Receiver Port'))
|
||||
|
||||
def load(self):
|
||||
self.RemotePortSpinBox.setValue(
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
import logging
|
||||
|
||||
from openlp.core.lib import Plugin
|
||||
from openlp.core.lib import Plugin, translate
|
||||
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
@ -69,7 +69,7 @@ class RemotesPlugin(Plugin):
|
||||
"""
|
||||
Information about this plugin
|
||||
"""
|
||||
about_text = self.trUtf8('<b>Remote Plugin</b><br>This plugin '
|
||||
about_text = translate('RemotePlugin','<b>Remote Plugin</b><br>This plugin '
|
||||
'provides the ability to send messages to a running version of '
|
||||
'openlp on a different computer via a web browser or other app<br>'
|
||||
'The Primary use for this would be to send alerts from a creche')
|
||||
|
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtGui, QtCore
|
||||
|
||||
from openlp.plugins.songs.forms.authorsdialog import Ui_AuthorsDialog
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
|
||||
"""
|
||||
@ -76,22 +77,22 @@ class AuthorsForm(QtGui.QDialog, Ui_AuthorsDialog):
|
||||
def accept(self):
|
||||
if not self.FirstNameEdit.text():
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You need to type in the first name of the author.'),
|
||||
self, translate('AuthorsForm','Error'),
|
||||
translate('AuthorsForm','You need to type in the first name of the author.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.FirstNameEdit.setFocus()
|
||||
return False
|
||||
elif not self.LastNameEdit.text():
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You need to type in the last name of the author.'),
|
||||
self, translate('AuthorsForm','Error'),
|
||||
translate('AuthorsForm','You need to type in the last name of the author.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.LastNameEdit.setFocus()
|
||||
return False
|
||||
elif not self.DisplayEdit.text():
|
||||
if QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You haven\'t set a display name for the '
|
||||
self, translate('AuthorsForm','Error'),
|
||||
translate('AuthorsForm','You haven\'t set a display name for the '
|
||||
'author, would you like me to combine the first and '
|
||||
'last names for you?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
|
@ -28,7 +28,7 @@ import re
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver
|
||||
from openlp.core.lib import SongXMLBuilder, SongXMLParser, Receiver, translate
|
||||
from openlp.plugins.songs.forms import EditVerseForm
|
||||
from openlp.plugins.songs.lib.models import Song
|
||||
from editsongdialog import Ui_EditSongDialog
|
||||
@ -101,7 +101,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
QtCore.QObject.connect(self.VerseOrderEdit,
|
||||
QtCore.SIGNAL(u'lostFocus()'), self.onVerseOrderEditLostFocus)
|
||||
self.previewButton = QtGui.QPushButton()
|
||||
self.previewButton.setText(self.trUtf8('Save && Preview'))
|
||||
self.previewButton.setText(translate('EditSongForm','Save && Preview'))
|
||||
self.ButtonBox.addButton(
|
||||
self.previewButton, QtGui.QDialogButtonBox.ActionRole)
|
||||
QtCore.QObject.connect(self.ButtonBox,
|
||||
@ -460,27 +460,27 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
if len(self.TitleEditItem.displayText()) == 0:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.TitleEditItem.setFocus()
|
||||
return False, self.trUtf8('You need to enter a song title.')
|
||||
return False, translate('EditSongForm','You need to enter a song title.')
|
||||
if self.VerseListWidget.rowCount() == 0:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseListWidget.setFocus()
|
||||
return False, self.trUtf8('You need to enter some verses.')
|
||||
return False, translate('EditSongForm','You need to enter some verses.')
|
||||
if self.AuthorsListView.count() == 0:
|
||||
self.SongTabWidget.setCurrentIndex(1)
|
||||
self.AuthorsListView.setFocus()
|
||||
#split the verse list by space and mark lower case for testing
|
||||
taglist = unicode(self.trUtf8(' bitped'))
|
||||
taglist = unicode(translate('EditSongForm',' bitped'))
|
||||
for verse in unicode(self.VerseOrderEdit.text()).lower().split(u' '):
|
||||
if len(verse) > 1:
|
||||
if (verse[0:1] == u'%s' % self.trUtf8('v') or
|
||||
verse[0:1] == u'%s' % self.trUtf8('c')) \
|
||||
if (verse[0:1] == u'%s' % translate('EditSongForm','v') or
|
||||
verse[0:1] == u'%s' % translate('EditSongForm','c')) \
|
||||
and verse[1:].isdigit():
|
||||
pass
|
||||
else:
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseOrderEdit.setFocus()
|
||||
return False, \
|
||||
self.trUtf8('Invalid verse entry - Vx or Cx')
|
||||
translate('EditSongForm','Invalid verse entry - Vx or Cx')
|
||||
else:
|
||||
if taglist.find(verse) > -1:
|
||||
pass
|
||||
@ -488,7 +488,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
self.SongTabWidget.setCurrentIndex(0)
|
||||
self.VerseOrderEdit.setFocus()
|
||||
return False, \
|
||||
self.trUtf8(\
|
||||
translate('EditSongForm',\
|
||||
'Invalid verse entry, values must be I,B,T,P,E,O,Vx,Cx')
|
||||
return True, u''
|
||||
|
||||
@ -524,7 +524,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
The Song is valid so as the plugin to add it to preview to see.
|
||||
"""
|
||||
log.debug(u'onPreview')
|
||||
if button.text() == unicode(self.trUtf8('Save && Preview')) \
|
||||
if button.text() == unicode(translate('EditSongForm','Save && Preview')) \
|
||||
and self.saveSong():
|
||||
Receiver.send_message(u'songs_preview')
|
||||
|
||||
@ -542,7 +542,7 @@ class EditSongForm(QtGui.QDialog, Ui_EditSongDialog):
|
||||
valid, message = self._validate_song()
|
||||
if not valid:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'), message,
|
||||
self, translate('EditSongForm','Error'), message,
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return False
|
||||
self.song.title = unicode(self.TitleEditItem.displayText())
|
||||
|
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.plugins.songs.forms.songbookdialog import Ui_SongBookDialog
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class SongBookForm(QtGui.QDialog, Ui_SongBookDialog):
|
||||
"""
|
||||
@ -48,8 +49,8 @@ class SongBookForm(QtGui.QDialog, Ui_SongBookDialog):
|
||||
def accept(self):
|
||||
if not self.NameEdit.text():
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You need to type in a book name!'),
|
||||
self, translate('SongBookForm','Error'),
|
||||
translate('SongBookForm','You need to type in a book name!'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.NameEdit.setFocus()
|
||||
return False
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from songimportwizard import Ui_SongImportWizard
|
||||
from openlp.core.lib import Receiver, SettingsManager
|
||||
from openlp.core.lib import Receiver, SettingsManager, translate
|
||||
#from openlp.core.utils import AppLocation, variant_to_unicode
|
||||
from openlp.plugins.songs.lib.manager import SongFormat
|
||||
|
||||
@ -104,8 +104,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
if source_format == SongFormat.OpenLyrics:
|
||||
if self.OpenLyricsFileListWidget.count() == 0:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('No OpenLyrics Files Selected'),
|
||||
self.trUtf8('You need to add at least one OpenLyrics '
|
||||
translate('SongImportForm','No OpenLyrics Files Selected'),
|
||||
translate('SongImportForm','You need to add at least one OpenLyrics '
|
||||
'song file to import from.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.OpenLyricsAddButton.setFocus()
|
||||
@ -113,8 +113,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
elif source_format == SongFormat.OpenSong:
|
||||
if self.OpenSongFileListWidget.count() == 0:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('No OpenSong Files Selected'),
|
||||
self.trUtf8('You need to add at least one OpenSong '
|
||||
translate('SongImportForm','No OpenSong Files Selected'),
|
||||
translate('SongImportForm','You need to add at least one OpenSong '
|
||||
'song file to import from.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.OpenSongAddButton.setFocus()
|
||||
@ -122,8 +122,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
elif source_format == SongFormat.CCLI:
|
||||
if self.CCLIFileListWidget.count() == 0:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('No CCLI Files Selected'),
|
||||
self.trUtf8('You need to add at least one CCLI file '
|
||||
translate('SongImportForm','No CCLI Files Selected'),
|
||||
translate('SongImportForm','You need to add at least one CCLI file '
|
||||
'to import from.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.CCLIAddButton.setFocus()
|
||||
@ -131,8 +131,8 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
elif source_format == SongFormat.CSV:
|
||||
if self.CSVFilenameEdit.text().isEmpty():
|
||||
QtGui.QMessageBox.critical(self,
|
||||
self.trUtf8('No CSV File Selected'),
|
||||
self.trUtf8('You need to specify a CSV file to import '
|
||||
translate('SongImportForm','No CSV File Selected'),
|
||||
translate('SongImportForm','You need to specify a CSV file to import '
|
||||
'from.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.CSVFilenameEdit.setFocus()
|
||||
@ -184,7 +184,7 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
self.ImportProgressBar.setMinimum(0)
|
||||
self.ImportProgressBar.setMaximum(1188)
|
||||
self.ImportProgressBar.setValue(0)
|
||||
self.ImportProgressLabel.setText(self.trUtf8('Starting import...'))
|
||||
self.ImportProgressLabel.setText(translate('SongImportForm','Starting import...'))
|
||||
Receiver.send_message(u'process_events')
|
||||
|
||||
def performImport(self):
|
||||
@ -235,10 +235,10 @@ class ImportWizardForm(QtGui.QWizard, Ui_SongImportWizard):
|
||||
# self.manager.save_meta_data(license_version, license_version,
|
||||
# license_copyright, license_permission)
|
||||
# self.manager.reload_bibles()
|
||||
# self.ImportProgressLabel.setText(self.trUtf8('Finished import.'))
|
||||
# self.ImportProgressLabel.setText(translate('SongImportForm','Finished import.'))
|
||||
# else:
|
||||
# self.ImportProgressLabel.setText(
|
||||
# self.trUtf8('Your Bible import failed.'))
|
||||
# translate('SongImportForm','Your Bible import failed.'))
|
||||
# importer.delete()
|
||||
|
||||
def postImport(self):
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class Ui_SongImportWizard(object):
|
||||
def setupUi(self, SongImportWizard):
|
||||
SongImportWizard.setObjectName(u'SongImportWizard')
|
||||
@ -224,32 +226,32 @@ class Ui_SongImportWizard(object):
|
||||
QtCore.QMetaObject.connectSlotsByName(SongImportWizard)
|
||||
|
||||
def retranslateUi(self, SongImportWizard):
|
||||
SongImportWizard.setWindowTitle(self.trUtf8('Song Import Wizard'))
|
||||
SongImportWizard.setWindowTitle(translate('SongImportWizard','Song Import Wizard'))
|
||||
self.TitleLabel.setText(
|
||||
'<span style="font-size:14pt; font-weight:600;">%s</span>' % \
|
||||
self.trUtf8('Welcome to the Song Import Wizard'))
|
||||
self.InformationLabel.setText(self.trUtf8('This wizard will help you '
|
||||
translate('SongImportWizard','Welcome to the Song Import Wizard'))
|
||||
self.InformationLabel.setText(translate('SongImportWizard','This wizard will help you '
|
||||
'to import songs from a variety of formats. Click the next button '
|
||||
'below to start the process by selecting a format to import from.'))
|
||||
self.SourcePage.setTitle(self.trUtf8('Select Import Source'))
|
||||
self.SourcePage.setSubTitle(self.trUtf8('Select the import format, '
|
||||
self.SourcePage.setTitle(translate('SongImportWizard','Select Import Source'))
|
||||
self.SourcePage.setSubTitle(translate('SongImportWizard','Select the import format, '
|
||||
'and where to import from.'))
|
||||
self.FormatLabel.setText(self.trUtf8('Format:'))
|
||||
self.FormatComboBox.setItemText(0, self.trUtf8('OpenLyrics'))
|
||||
self.FormatComboBox.setItemText(1, self.trUtf8('OpenSong'))
|
||||
self.FormatComboBox.setItemText(2, self.trUtf8('CCLI'))
|
||||
self.FormatComboBox.setItemText(3, self.trUtf8('CSV'))
|
||||
self.OpenLyricsAddButton.setText(self.trUtf8('Add Files...'))
|
||||
self.OpenLyricsRemoveButton.setText(self.trUtf8('Remove File(s)'))
|
||||
self.OpenSongAddButton.setText(self.trUtf8('Add Files...'))
|
||||
self.OpenSongRemoveButton.setText(self.trUtf8('Remove File(s)'))
|
||||
self.CCLIAddButton.setText(self.trUtf8('Add Files...'))
|
||||
self.CCLIRemoveButton.setText(self.trUtf8('Remove File(s)'))
|
||||
self.CSVFilenameLabel.setText(self.trUtf8('Filename:'))
|
||||
self.CSVBrowseButton.setText(self.trUtf8('Browse...'))
|
||||
self.ImportPage.setTitle(self.trUtf8('Importing'))
|
||||
self.ImportPage.setSubTitle(self.trUtf8('Please wait while your songs '
|
||||
self.FormatLabel.setText(translate('SongImportWizard','Format:'))
|
||||
self.FormatComboBox.setItemText(0, translate('SongImportWizard','OpenLyrics'))
|
||||
self.FormatComboBox.setItemText(1, translate('SongImportWizard','OpenSong'))
|
||||
self.FormatComboBox.setItemText(2, translate('SongImportWizard','CCLI'))
|
||||
self.FormatComboBox.setItemText(3, translate('SongImportWizard','CSV'))
|
||||
self.OpenLyricsAddButton.setText(translate('SongImportWizard','Add Files...'))
|
||||
self.OpenLyricsRemoveButton.setText(translate('SongImportWizard','Remove File(s)'))
|
||||
self.OpenSongAddButton.setText(translate('SongImportWizard','Add Files...'))
|
||||
self.OpenSongRemoveButton.setText(translate('SongImportWizard','Remove File(s)'))
|
||||
self.CCLIAddButton.setText(translate('SongImportWizard','Add Files...'))
|
||||
self.CCLIRemoveButton.setText(translate('SongImportWizard','Remove File(s)'))
|
||||
self.CSVFilenameLabel.setText(translate('SongImportWizard','Filename:'))
|
||||
self.CSVBrowseButton.setText(translate('SongImportWizard','Browse...'))
|
||||
self.ImportPage.setTitle(translate('SongImportWizard','Importing'))
|
||||
self.ImportPage.setSubTitle(translate('SongImportWizard','Please wait while your songs '
|
||||
'are imported.'))
|
||||
self.ImportProgressLabel.setText(self.trUtf8('Ready.'))
|
||||
self.ImportProgressBar.setFormat(self.trUtf8('%p%'))
|
||||
self.ImportProgressLabel.setText(translate('SongImportWizard','Ready.'))
|
||||
self.ImportProgressBar.setFormat(translate('SongImportWizard','%p%'))
|
||||
|
||||
|
@ -30,6 +30,7 @@ from songmaintenancedialog import Ui_SongMaintenanceDialog
|
||||
from authorsform import AuthorsForm
|
||||
from topicsform import TopicsForm
|
||||
from songbookform import SongBookForm
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
"""
|
||||
@ -139,8 +140,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetAuthors()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t add your author.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t add your author.'))
|
||||
|
||||
def onTopicAddButtonClick(self):
|
||||
if self.topicform.exec_():
|
||||
@ -150,8 +151,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetTopics()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t add your topic.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t add your topic.'))
|
||||
|
||||
def onBookAddButtonClick(self):
|
||||
if self.bookform.exec_():
|
||||
@ -162,8 +163,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetBooks()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t add your book.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t add your book.'))
|
||||
|
||||
def onAuthorEditButtonClick(self):
|
||||
author_id = self._getCurrentItemId(self.AuthorsListWidget)
|
||||
@ -184,8 +185,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetAuthors()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t save your author.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t save your author.'))
|
||||
|
||||
def onTopicEditButtonClick(self):
|
||||
topic_id = self._getCurrentItemId(self.TopicsListWidget)
|
||||
@ -198,8 +199,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetTopics()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t save your topic.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t save your topic.'))
|
||||
|
||||
def onBookEditButtonClick(self):
|
||||
book_id = self._getCurrentItemId(self.BooksListWidget)
|
||||
@ -215,8 +216,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self.resetBooks()
|
||||
else:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('Couldn\'t save your book.'))
|
||||
self, translate('SongMaintenanceForm','Error'),
|
||||
translate('SongMaintenanceForm','Couldn\'t save your book.'))
|
||||
|
||||
def onAuthorDeleteButtonClick(self):
|
||||
"""
|
||||
@ -225,11 +226,11 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self._deleteItem(
|
||||
self.AuthorsListWidget, self.songmanager.get_author,
|
||||
self.songmanager.delete_author, self.resetAuthors,
|
||||
self.trUtf8('Delete Author'),
|
||||
self.trUtf8('Are you sure you want to delete the selected author?'),
|
||||
self.trUtf8('This author can\'t be deleted, they are currently '
|
||||
translate('SongMaintenanceForm','Delete Author'),
|
||||
translate('SongMaintenanceForm','Are you sure you want to delete the selected author?'),
|
||||
translate('SongMaintenanceForm','This author can\'t be deleted, they are currently '
|
||||
'assigned to at least one song.'),
|
||||
self.trUtf8('No author selected!'))
|
||||
translate('SongMaintenanceForm','No author selected!'))
|
||||
|
||||
def onTopicDeleteButtonClick(self):
|
||||
"""
|
||||
@ -238,11 +239,11 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self._deleteItem(
|
||||
self.TopicsListWidget, self.songmanager.get_topic,
|
||||
self.songmanager.delete_topic, self.resetTopics,
|
||||
self.trUtf8('Delete Topic'),
|
||||
self.trUtf8('Are you sure you want to delete the selected topic?'),
|
||||
self.trUtf8('This topic can\'t be deleted, it is currently '
|
||||
translate('SongMaintenanceForm','Delete Topic'),
|
||||
translate('SongMaintenanceForm','Are you sure you want to delete the selected topic?'),
|
||||
translate('SongMaintenanceForm','This topic can\'t be deleted, it is currently '
|
||||
'assigned to at least one song.'),
|
||||
self.trUtf8('No topic selected!'))
|
||||
translate('SongMaintenanceForm','No topic selected!'))
|
||||
|
||||
def onBookDeleteButtonClick(self):
|
||||
"""
|
||||
@ -251,8 +252,8 @@ class SongMaintenanceForm(QtGui.QDialog, Ui_SongMaintenanceDialog):
|
||||
self._deleteItem(
|
||||
self.BooksListWidget, self.songmanager.get_book,
|
||||
self.songmanager.delete_book, self.resetBooks,
|
||||
self.trUtf8('Delete Book'),
|
||||
self.trUtf8('Are you sure you want to delete the selected book?'),
|
||||
self.trUtf8('This book can\'t be deleted, it is currently '
|
||||
translate('SongMaintenanceForm','Delete Book'),
|
||||
translate('SongMaintenanceForm','Are you sure you want to delete the selected book?'),
|
||||
translate('SongMaintenanceForm','This book can\'t be deleted, it is currently '
|
||||
'assigned to at least one song.'),
|
||||
self.trUtf8('No book selected!'))
|
||||
translate('SongMaintenanceForm','No book selected!'))
|
||||
|
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from openlp.plugins.songs.forms.topicsdialog import Ui_TopicsDialog
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
|
||||
"""
|
||||
@ -47,8 +48,8 @@ class TopicsForm(QtGui.QDialog, Ui_TopicsDialog):
|
||||
def accept(self):
|
||||
if not self.NameEdit.text():
|
||||
QtGui.QMessageBox.critical(
|
||||
self, self.trUtf8('Error'),
|
||||
self.trUtf8('You need to type in a topic name!'),
|
||||
self, translate('TopicsForm','Error'),
|
||||
translate('TopicsForm','You need to type in a topic name!'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
self.NameEdit.setFocus()
|
||||
return False
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import MediaManagerItem, SongXMLParser, \
|
||||
BaseListWithDnD, Receiver, ItemCapabilities
|
||||
BaseListWithDnD, Receiver, ItemCapabilities, translate
|
||||
from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \
|
||||
ImportWizardForm
|
||||
|
||||
@ -60,7 +60,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.remoteSong = -1
|
||||
|
||||
def initPluginNameVisible(self):
|
||||
self.PluginNameVisible = self.trUtf8('Song')
|
||||
self.PluginNameVisible = translate('mediaItem','Song')
|
||||
|
||||
def requiredIcons(self):
|
||||
MediaManagerItem.requiredIcons(self)
|
||||
@ -69,8 +69,8 @@ class SongMediaItem(MediaManagerItem):
|
||||
def addEndHeaderBar(self):
|
||||
self.addToolbarSeparator()
|
||||
## Song Maintenance Button ##
|
||||
self.addToolbarButton(self.trUtf8('Song Maintenance'),
|
||||
self.trUtf8('Maintain the lists of authors, topics and books'),
|
||||
self.addToolbarButton(translate('mediaItem','Song Maintenance'),
|
||||
translate('mediaItem','Maintain the lists of authors, topics and books'),
|
||||
':/songs/song_maintenance.png', self.onSongMaintenanceClick)
|
||||
self.PageLayout.setSpacing(4)
|
||||
self.SearchLayout = QtGui.QFormLayout()
|
||||
@ -139,15 +139,15 @@ class SongMediaItem(MediaManagerItem):
|
||||
QtCore.QVariant(u'False')).toBool()
|
||||
|
||||
def retranslateUi(self):
|
||||
self.SearchTextLabel.setText(self.trUtf8('Search:'))
|
||||
self.SearchTypeLabel.setText(self.trUtf8('Type:'))
|
||||
self.ClearTextButton.setText(self.trUtf8('Clear'))
|
||||
self.SearchTextButton.setText(self.trUtf8('Search'))
|
||||
self.SearchTextLabel.setText(translate('mediaItem','Search:'))
|
||||
self.SearchTypeLabel.setText(translate('mediaItem','Type:'))
|
||||
self.ClearTextButton.setText(translate('mediaItem','Clear'))
|
||||
self.SearchTextButton.setText(translate('mediaItem','Search'))
|
||||
|
||||
def initialise(self):
|
||||
self.SearchTypeComboBox.addItem(self.trUtf8('Titles'))
|
||||
self.SearchTypeComboBox.addItem(self.trUtf8('Lyrics'))
|
||||
self.SearchTypeComboBox.addItem(self.trUtf8('Authors'))
|
||||
self.SearchTypeComboBox.addItem(translate('mediaItem','Titles'))
|
||||
self.SearchTypeComboBox.addItem(translate('mediaItem','Lyrics'))
|
||||
self.SearchTypeComboBox.addItem(translate('mediaItem','Authors'))
|
||||
self.configUpdated()
|
||||
|
||||
def onSearchTextButtonClick(self):
|
||||
@ -203,7 +203,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
self.ListView.clear()
|
||||
for author in searchresults:
|
||||
for song in author.songs:
|
||||
song_detail = unicode(self.trUtf8('%s (%s)' % \
|
||||
song_detail = unicode(translate('mediaItem','%s (%s)' % \
|
||||
(unicode(author.display_name), unicode(song.title))))
|
||||
song_name = QtGui.QListWidgetItem(song_detail)
|
||||
song_name.setData(QtCore.Qt.UserRole, QtCore.QVariant(song.id))
|
||||
@ -281,12 +281,12 @@ class SongMediaItem(MediaManagerItem):
|
||||
items = self.ListView.selectedIndexes()
|
||||
if items:
|
||||
if len(items) == 1:
|
||||
del_message = self.trUtf8('Delete song?')
|
||||
del_message = translate('mediaItem','Delete song?')
|
||||
else:
|
||||
del_message = unicode(
|
||||
self.trUtf8('Delete %d songs?')) % len(items)
|
||||
translate('mediaItem','Delete %d songs?')) % len(items)
|
||||
ans = QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('Delete Confirmation'), del_message,
|
||||
translate('mediaItem','Delete Confirmation'), del_message,
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok|
|
||||
QtGui.QMessageBox.Cancel),
|
||||
QtGui.QMessageBox.Ok)
|
||||
@ -367,7 +367,7 @@ class SongMediaItem(MediaManagerItem):
|
||||
raw_footer.append(author_list)
|
||||
raw_footer.append(song.copyright )
|
||||
raw_footer.append(unicode(
|
||||
self.trUtf8('CCLI Licence: ') + ccli))
|
||||
translate('mediaItem','CCLI Licence: ') + ccli))
|
||||
service_item.raw_footer = raw_footer
|
||||
service_item.audit = [
|
||||
song.title, author_audit, song.copyright, song.ccli_number
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsTab
|
||||
from openlp.core.lib import SettingsTab, translate
|
||||
|
||||
class SongsTab(SettingsTab):
|
||||
"""
|
||||
@ -36,7 +36,7 @@ class SongsTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'SongsTab')
|
||||
self.tabTitleVisible = self.trUtf8('Songs')
|
||||
self.tabTitleVisible = translate('SongsTab','Songs')
|
||||
self.SongsLayout = QtGui.QFormLayout(self)
|
||||
self.SongsLayout.setObjectName(u'SongsLayout')
|
||||
self.SongsModeGroupBox = QtGui.QGroupBox(self)
|
||||
@ -61,11 +61,11 @@ class SongsTab(SettingsTab):
|
||||
self.SongBarActiveCheckBoxChanged)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.SongsModeGroupBox.setTitle(self.trUtf8('Songs Mode'))
|
||||
self.SongsModeGroupBox.setTitle(translate('SongsTab','Songs Mode'))
|
||||
self.SearchAsTypeCheckBox.setText(
|
||||
self.trUtf8('Enable search as you type'))
|
||||
translate('SongsTab','Enable search as you type'))
|
||||
self.SongBarActiveCheckBox.setText(
|
||||
self.trUtf8('Display Verses on Live Tool bar'))
|
||||
translate('SongsTab','Display Verses on Live Tool bar'))
|
||||
|
||||
def onSearchAsTypeCheckBoxChanged(self, check_state):
|
||||
self.song_search = False
|
||||
|
@ -27,7 +27,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, Receiver
|
||||
from openlp.core.lib import Plugin, build_icon, PluginStatus, Receiver, translate
|
||||
from openlp.plugins.songs.lib import SongManager, SongMediaItem, SongsTab, \
|
||||
SofImport, OooImport
|
||||
|
||||
@ -150,7 +150,7 @@ class SongsPlugin(Plugin):
|
||||
|
||||
def onImportSofItemClick(self):
|
||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||
None, self.trUtf8('Open Songs of Fellowship file'),
|
||||
None, translate('Songsplugin','Open Songs of Fellowship file'),
|
||||
u'', u'Songs of Fellowship file (*.rtf *.RTF)')
|
||||
try:
|
||||
for filename in filenames:
|
||||
@ -170,14 +170,14 @@ class SongsPlugin(Plugin):
|
||||
|
||||
def onImportOooItemClick(self):
|
||||
filenames = QtGui.QFileDialog.getOpenFileNames(
|
||||
None, self.trUtf8('Open documents or presentations'),
|
||||
None, translate('Songsplugin','Open documents or presentations'),
|
||||
u'', u'All Files(*.*)')
|
||||
oooimport = OooImport(self.manager)
|
||||
oooimport.import_docs(filenames)
|
||||
Receiver.send_message(u'songs_load_list')
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<strong>Song Plugin</strong><br />'
|
||||
about_text = translate('Songsplugin','<strong>Song Plugin</strong><br />'
|
||||
'This plugin allows songs to be managed and displayed.')
|
||||
return about_text
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
from PyQt4 import QtGui
|
||||
|
||||
from songusagedeletedialog import Ui_SongUsageDeleteDialog
|
||||
from openlp.core.lib import translate
|
||||
|
||||
class SongUsageDeleteForm(QtGui.QDialog, Ui_SongUsageDeleteDialog):
|
||||
"""
|
||||
@ -41,8 +42,8 @@ class SongUsageDeleteForm(QtGui.QDialog, Ui_SongUsageDeleteDialog):
|
||||
|
||||
def accept(self):
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
self.trUtf8('Delete Selected Song Usage Events?'),
|
||||
self.trUtf8('Are you sure you want to delete selected Song Usage data?'),
|
||||
translate('SongUsageDeleteForm','Delete Selected Song Usage Events?'),
|
||||
translate('SongUsageDeleteForm','Are you sure you want to delete selected Song Usage data?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok |
|
||||
QtGui.QMessageBox.Cancel),
|
||||
|
@ -28,7 +28,7 @@ import os
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import SettingsManager
|
||||
from openlp.core.lib import SettingsManager, translate
|
||||
|
||||
from songusagedetaildialog import Ui_SongUsageDetailDialog
|
||||
|
||||
@ -61,7 +61,7 @@ class SongUsageDetailForm(QtGui.QDialog, Ui_SongUsageDetailDialog):
|
||||
|
||||
def defineOutputLocation(self):
|
||||
path = QtGui.QFileDialog.getExistingDirectory(self,
|
||||
self.trUtf8('Output File Location'),
|
||||
translate('SongUsageDetailForm','Output File Location'),
|
||||
SettingsManager.get_last_dir(self.parent.settingsSection, 1))
|
||||
path = unicode(path)
|
||||
if path != u'':
|
||||
|
@ -28,7 +28,7 @@ import logging
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
|
||||
from openlp.core.lib import Plugin, Receiver, build_icon
|
||||
from openlp.core.lib import Plugin, Receiver, build_icon, translate
|
||||
from openlp.plugins.songusage.lib import SongUsageManager
|
||||
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
||||
SongUsageDeleteForm
|
||||
@ -156,7 +156,7 @@ class SongUsagePlugin(Plugin):
|
||||
self.SongUsagedetailform.exec_()
|
||||
|
||||
def about(self):
|
||||
about_text = self.trUtf8('<b>SongUsage Plugin</b><br>This plugin '
|
||||
about_text = translate('SongUsagePlugin','<b>SongUsage Plugin</b><br>This plugin '
|
||||
'records the use of songs and when they have been used during '
|
||||
'a live service')
|
||||
return about_text
|
||||
|
Loading…
Reference in New Issue
Block a user