forked from openlp/openlp
Added unicon symbol to all arguments in the translate() function. And fixed missing "spaces" and other smal error regarding the coding standar
This commit is contained in:
parent
3be909c5c0
commit
e88c05bd58
@ -44,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' % (translate('AboutForm','build'),
|
||||
build_text = u' %s %s' % (translate(u'AboutForm', u'build'),
|
||||
self.applicationVersion[u'build'])
|
||||
else:
|
||||
build_text = u''
|
||||
|
@ -210,8 +210,8 @@ class AmendThemeForm(QtGui.QDialog, Ui_AmendThemeDialog):
|
||||
|
||||
def onImageToolButtonClicked(self):
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
self, translate('AmendThemeForm',u'Open file'))
|
||||
if filename:
|
||||
self, translate(u'AmendThemeForm', u'Open file'))
|
||||
if filename:0
|
||||
self.ImageLineEdit.setText(filename)
|
||||
self.theme.background_filename = filename
|
||||
self.previewTheme()
|
||||
@ -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(translate('AmendThemeForm','Background Color:'))
|
||||
self.Color1Label.setText(translate(u'AmendThemeForm', u'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(translate('AmendThemeForm','First Color:'))
|
||||
self.Color2Label.setText(translate('AmendThemeForm','Second Color:'))
|
||||
self.Color1Label.setText(translate(u'AmendThemeForm', u'First Color:'))
|
||||
self.Color2Label.setText(translate(u'AmendThemeForm', u'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(translate('AmendThemeForm','Slide Height is %s rows'))
|
||||
page_length_text = unicode(translate(u'AmendThemeForm', u'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))
|
||||
|
@ -39,7 +39,7 @@ class DisplayTab(SettingsTab):
|
||||
SettingsTab.__init__(self, u'Display')
|
||||
|
||||
def setupUi(self):
|
||||
self.tabTitleVisible = translate('DisplayTab','Displays')
|
||||
self.tabTitleVisible = translate(u'DisplayTab', u'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( translate('DisplayTab',u'Amend Display Settings'))
|
||||
self.CurrentGroupBox.setTitle( translate('DisplayTab',u'Default Settings'))
|
||||
self.XLabel.setText(translate('DisplayTab',u'X'))
|
||||
self.setWindowTitle(translate(u'DisplayTab', u'Amend Display Settings'))
|
||||
self.CurrentGroupBox.setTitle(translate(u'DisplayTab', u'Default Settings'))
|
||||
self.XLabel.setText(translate(u'DisplayTab', u'X'))
|
||||
self.Xpos.setText(u'0')
|
||||
self.YLabel.setText( translate('DisplayTab',u'Y'))
|
||||
self.YLabel.setText(translate(u'DisplayTab', u'Y'))
|
||||
self.Ypos.setText(u'0')
|
||||
self.HeightLabel.setText( translate('DisplayTab',u'Height'))
|
||||
self.HeightLabel.setText(translate(u'DisplayTab', u'Height'))
|
||||
self.Height.setText(u'0')
|
||||
self.WidthLabel.setText( translate('DisplayTab',u'Width'))
|
||||
self.WidthLabel.setText(translate(u'DisplayTab', u'Width'))
|
||||
self.Width.setText(u'0')
|
||||
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'))
|
||||
self.CurrentGroupBox_2.setTitle(translate(u'DisplayTab', u'Amend Settings'))
|
||||
self.XAmendLabel.setText(translate(u'DisplayTab', u'X'))
|
||||
self.YAmendLabel.setText(translate(u'DisplayTab', u'Y'))
|
||||
self.HeightAmendLabel.setText(translate(u'DisplayTab', u'Height'))
|
||||
self.WidthAmendLabel.setText(translate(u'DisplayTab', u'Width'))
|
||||
self.OverrideCheckBox.setText(translate(u'DisplayTab', u'Override Output Display'))
|
||||
|
||||
def load(self):
|
||||
settings = QtCore.QSettings()
|
||||
|
@ -54,7 +54,7 @@ class GeneralTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'GeneralTab')
|
||||
self.tabTitleVisible = translate('GeneralTab','General')
|
||||
self.tabTitleVisible = translate(u'GeneralTab', u'General')
|
||||
self.GeneralLayout = QtGui.QHBoxLayout(self)
|
||||
self.GeneralLayout.setSpacing(8)
|
||||
self.GeneralLayout.setMargin(8)
|
||||
@ -177,25 +177,32 @@ class GeneralTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'editingFinished()'), self.onPasswordEditLostFocus)
|
||||
|
||||
def retranslateUi(self):
|
||||
self.MonitorGroupBox.setTitle(translate('GeneralTab','Monitors'))
|
||||
self.MonitorGroupBox.setTitle(translate(u'GeneralTab', u'Monitors'))
|
||||
self.MonitorLabel.setText(
|
||||
translate('GeneralTab','Select monitor for output display:'))
|
||||
translate(u'GeneralTab', u'Select monitor for output display:'))
|
||||
self.DisplayOnMonitorCheck.setText(
|
||||
translate('GeneralTab','Display if a single screen'))
|
||||
self.StartupGroupBox.setTitle(translate('GeneralTab','Application Startup'))
|
||||
self.WarningCheckBox.setText(translate('GeneralTab','Show blank screen warning'))
|
||||
translate(u'GeneralTab', u'Display if a single screen'))
|
||||
self.StartupGroupBox.setTitle(
|
||||
translate(u'GeneralTab', u'Application Startup'))
|
||||
self.WarningCheckBox.setText(
|
||||
translate(u'GeneralTab', u'Show blank screen warning'))
|
||||
self.AutoOpenCheckBox.setText(
|
||||
translate('GeneralTab','Automatically open the last service'))
|
||||
self.ShowSplashCheckBox.setText(translate('GeneralTab','Show the splash screen'))
|
||||
self.SettingsGroupBox.setTitle(translate('GeneralTab','Application Settings'))
|
||||
translate(u'GeneralTab', u'Automatically open the last service'))
|
||||
self.ShowSplashCheckBox.setText(
|
||||
translate(u'GeneralTab', u'Show the splash screen'))
|
||||
self.SettingsGroupBox.setTitle(
|
||||
translate(u'GeneralTab', u'Application Settings'))
|
||||
self.SaveCheckServiceCheckBox.setText(
|
||||
translate('GeneralTab','Prompt to save Service before starting New'))
|
||||
translate(u'GeneralTab',
|
||||
u'Prompt to save Service before starting New'))
|
||||
self.AutoPreviewCheckBox.setText(
|
||||
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:'))
|
||||
translate(u'GeneralTab', u'Preview Next Song from Service Manager'))
|
||||
self.CCLIGroupBox.setTitle(translate(u'GeneralTab', u'CCLI Details'))
|
||||
self.NumberLabel.setText(translate(u'GeneralTab', u'CCLI Number:'))
|
||||
self.UsernameLabel.setText(
|
||||
translate(u'GeneralTab', u'SongSelect Username:'))
|
||||
self.PasswordLabel.setText(
|
||||
translate(u'GeneralTab', u'SongSelect Password:'))
|
||||
|
||||
def onMonitorComboBoxChanged(self):
|
||||
self.MonitorNumber = self.MonitorComboBox.currentIndex()
|
||||
@ -231,10 +238,11 @@ class GeneralTab(SettingsTab):
|
||||
settings = QtCore.QSettings()
|
||||
settings.beginGroup(self.settingsSection)
|
||||
for screen in self.screens.screen_list:
|
||||
screen_name = u'%s %d' % (translate('GeneralTab','Screen'),
|
||||
screen_name = u'%s %d' % (translate(u'GeneralTab', u'Screen'),
|
||||
screen[u'number'] + 1)
|
||||
if screen[u'primary']:
|
||||
screen_name = u'%s (%s)' % (screen_name, translate('GeneralTab','primary'))
|
||||
screen_name = u'%s (%s)' % (screen_name,
|
||||
translate(u'GeneralTab', u'primary'))
|
||||
self.MonitorComboBox.addItem(screen_name)
|
||||
# Get the configs
|
||||
self.Warning = settings.value(
|
||||
|
@ -33,7 +33,8 @@ from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
|
||||
ThemeManager, SlideController, PluginForm, MediaDockManager, DisplayManager
|
||||
from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
|
||||
SettingsManager, PluginManager, Receiver, translate
|
||||
from openlp.core.utils import check_latest_version, AppLocation, add_actions, LanguageManager
|
||||
from openlp.core.utils import check_latest_version, AppLocation, add_actions, \
|
||||
LanguageManager
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -352,111 +353,113 @@ class Ui_MainWindow(object):
|
||||
"""
|
||||
Set up the translation system
|
||||
"""
|
||||
MainWindow.mainTitle = translate('MainWindow', 'OpenLP 2.0')
|
||||
MainWindow.language = translate('MainWindow', 'English')
|
||||
MainWindow.defaultThemeText = translate('MainWindow',
|
||||
'Default Theme: ')
|
||||
MainWindow.mainTitle = translate(u'MainWindow', u'OpenLP 2.0')
|
||||
MainWindow.language = translate(u'MainWindow', u'English')
|
||||
MainWindow.defaultThemeText = translate(u'MainWindow',
|
||||
u'Default Theme: ')
|
||||
MainWindow.setWindowTitle(MainWindow.mainTitle)
|
||||
self.FileMenu.setTitle(translate('MainWindow', '&File'))
|
||||
self.FileImportMenu.setTitle(translate('MainWindow', '&Import'))
|
||||
self.FileExportMenu.setTitle(translate('MainWindow', '&Export'))
|
||||
self.OptionsMenu.setTitle(translate('MainWindow', '&Options'))
|
||||
self.OptionsViewMenu.setTitle(translate('MainWindow', '&View'))
|
||||
self.ViewModeMenu.setTitle(translate('MainWindow', 'M&ode'))
|
||||
self.OptionsLanguageMenu.setTitle(translate('MainWindow',
|
||||
self.FileMenu.setTitle(translate(u'MainWindow', u'&File'))
|
||||
self.FileImportMenu.setTitle(translate(u'MainWindow', u'&Import'))
|
||||
self.FileExportMenu.setTitle(translate(u'MainWindow', u'&Export'))
|
||||
self.OptionsMenu.setTitle(translate(u'MainWindow', u'&Options'))
|
||||
self.OptionsViewMenu.setTitle(translate(u'MainWindow', u'&View'))
|
||||
self.ViewModeMenu.setTitle(translate(u'MainWindow', u'M&ode'))
|
||||
self.OptionsLanguageMenu.setTitle(translate(u'MainWindow',
|
||||
u'&Language'))
|
||||
self.ToolsMenu.setTitle(translate('MainWindow', '&Tools'))
|
||||
self.HelpMenu.setTitle(translate('MainWindow', '&Help'))
|
||||
self.ToolsMenu.setTitle(translate(u'MainWindow', u'&Tools'))
|
||||
self.HelpMenu.setTitle(translate(u'MainWindow', u'&Help'))
|
||||
self.MediaManagerDock.setWindowTitle(
|
||||
translate('MainWindow', 'Media Manager'))
|
||||
translate(u'MainWindow', u'Media Manager'))
|
||||
self.ServiceManagerDock.setWindowTitle(
|
||||
translate('MainWindow', 'Service Manager'))
|
||||
translate(u'MainWindow', u'Service Manager'))
|
||||
self.ThemeManagerDock.setWindowTitle(
|
||||
translate('MainWindow', 'Theme Manager'))
|
||||
self.FileNewItem.setText(translate('MainWindow', '&New'))
|
||||
self.FileNewItem.setToolTip(translate('MainWindow', 'New Service'))
|
||||
translate(u'MainWindow', u'Theme Manager'))
|
||||
self.FileNewItem.setText(translate(u'MainWindow', u'&New'))
|
||||
self.FileNewItem.setToolTip(translate(u'MainWindow', u'New Service'))
|
||||
self.FileNewItem.setStatusTip(
|
||||
translate('MainWindow', 'Create a new Service'))
|
||||
self.FileNewItem.setShortcut(translate('MainWindow', 'Ctrl+N'))
|
||||
self.FileOpenItem.setText(translate('MainWindow', '&Open'))
|
||||
self.FileOpenItem.setToolTip(translate('MainWindow', 'Open Service'))
|
||||
translate(u'MainWindow', u'Create a new Service'))
|
||||
self.FileNewItem.setShortcut(translate(u'MainWindow', u'Ctrl+N'))
|
||||
self.FileOpenItem.setText(translate(u'MainWindow', u'&Open'))
|
||||
self.FileOpenItem.setToolTip(translate(u'MainWindow', u'Open Service'))
|
||||
self.FileOpenItem.setStatusTip(
|
||||
translate('MainWindow', 'Open an existing service'))
|
||||
self.FileOpenItem.setShortcut(translate('MainWindow', 'Ctrl+O'))
|
||||
self.FileSaveItem.setText(translate('MainWindow', '&Save'))
|
||||
self.FileSaveItem.setToolTip(translate('MainWindow', 'Save Service'))
|
||||
translate(u'MainWindow', u'Open an existing service'))
|
||||
self.FileOpenItem.setShortcut(translate(u'MainWindow', u'Ctrl+O'))
|
||||
self.FileSaveItem.setText(translate(u'MainWindow', u'&Save'))
|
||||
self.FileSaveItem.setToolTip(translate(u'MainWindow', u'Save Service'))
|
||||
self.FileSaveItem.setStatusTip(
|
||||
translate('MainWindow', 'Save the current service to disk'))
|
||||
self.FileSaveItem.setShortcut(translate('MainWindow', 'Ctrl+S'))
|
||||
self.FileSaveAsItem.setText(translate('MainWindow', 'Save &As...'))
|
||||
translate(u'MainWindow', u'Save the current service to disk'))
|
||||
self.FileSaveItem.setShortcut(translate(u'MainWindow', u'Ctrl+S'))
|
||||
self.FileSaveAsItem.setText(translate(u'MainWindow', u'Save &As...'))
|
||||
self.FileSaveAsItem.setToolTip(
|
||||
translate('MainWindow', 'Save Service As'))
|
||||
self.FileSaveAsItem.setStatusTip(translate('MainWindow',
|
||||
'Save the current service under a new name'))
|
||||
self.FileSaveAsItem.setShortcut(translate('MainWindow', 'F12'))
|
||||
self.FileExitItem.setText(translate('MainWindow', 'E&xit'))
|
||||
self.FileExitItem.setStatusTip(translate('MainWindow', 'Quit OpenLP'))
|
||||
self.FileExitItem.setShortcut(translate('MainWindow', 'Alt+F4'))
|
||||
self.ImportThemeItem.setText(translate('MainWindow', '&Theme'))
|
||||
self.ImportLanguageItem.setText(translate('MainWindow', '&Language'))
|
||||
self.ExportThemeItem.setText(translate('MainWindow', '&Theme'))
|
||||
self.ExportLanguageItem.setText(translate('MainWindow', '&Language'))
|
||||
self.actionLook_Feel.setText(translate('MainWindow', 'Look && &Feel'))
|
||||
self.OptionsSettingsItem.setText(translate('MainWindow', '&Settings'))
|
||||
translate(u'MainWindow', u'Save Service As'))
|
||||
self.FileSaveAsItem.setStatusTip(translate(u'MainWindow',
|
||||
u'Save the current service under a new name'))
|
||||
self.FileSaveAsItem.setShortcut(translate(u'MainWindow', u'F12'))
|
||||
self.FileExitItem.setText(translate(u'MainWindow', u'E&xit'))
|
||||
self.FileExitItem.setStatusTip(translate(u'MainWindow', u'Quit OpenLP'))
|
||||
self.FileExitItem.setShortcut(translate(u'MainWindow', u'Alt+F4'))
|
||||
self.ImportThemeItem.setText(translate(u'MainWindow', u'&Theme'))
|
||||
self.ImportLanguageItem.setText(translate(u'MainWindow', u'&Language'))
|
||||
self.ExportThemeItem.setText(translate(u'MainWindow', u'&Theme'))
|
||||
self.ExportLanguageItem.setText(translate(u'MainWindow', u'&Language'))
|
||||
self.actionLook_Feel.setText(translate(u'MainWindow', u'Look && &Feel'))
|
||||
self.OptionsSettingsItem.setText(translate(u'MainWindow', u'&Settings'))
|
||||
self.ViewMediaManagerItem.setText(
|
||||
translate('MainWindow', '&Media Manager'))
|
||||
translate(u'MainWindow', u'&Media Manager'))
|
||||
self.ViewMediaManagerItem.setToolTip(
|
||||
translate('MainWindow', 'Toggle Media Manager'))
|
||||
self.ViewMediaManagerItem.setStatusTip(translate('MainWindow',
|
||||
'Toggle the visibility of the Media Manager'))
|
||||
self.ViewMediaManagerItem.setShortcut(translate('MainWindow', 'F8'))
|
||||
translate(u'MainWindow', u'Toggle Media Manager'))
|
||||
self.ViewMediaManagerItem.setStatusTip(translate(u'MainWindow',
|
||||
u'Toggle the visibility of the Media Manager'))
|
||||
self.ViewMediaManagerItem.setShortcut(translate(u'MainWindow', u'F8'))
|
||||
self.ViewThemeManagerItem.setText(
|
||||
translate('MainWindow', '&Theme Manager'))
|
||||
translate(u'MainWindow', u'&Theme Manager'))
|
||||
self.ViewThemeManagerItem.setToolTip(
|
||||
translate('MainWindow', 'Toggle Theme Manager'))
|
||||
self.ViewThemeManagerItem.setStatusTip(translate('MainWindow',
|
||||
'Toggle the visibility of the Theme Manager'))
|
||||
self.ViewThemeManagerItem.setShortcut(translate('MainWindow', 'F10'))
|
||||
translate(u'MainWindow', u'Toggle Theme Manager'))
|
||||
self.ViewThemeManagerItem.setStatusTip(translate(u'MainWindow',
|
||||
u'Toggle the visibility of the Theme Manager'))
|
||||
self.ViewThemeManagerItem.setShortcut(translate(u'MainWindow', u'F10'))
|
||||
self.ViewServiceManagerItem.setText(
|
||||
translate('MainWindow', '&Service Manager'))
|
||||
translate(u'MainWindow', u'&Service Manager'))
|
||||
self.ViewServiceManagerItem.setToolTip(
|
||||
translate('MainWindow', 'Toggle Service Manager'))
|
||||
self.ViewServiceManagerItem.setStatusTip(translate('MainWindow',
|
||||
'Toggle the visibility of the Service Manager'))
|
||||
self.ViewServiceManagerItem.setShortcut(translate('MainWindow', 'F9'))
|
||||
translate(u'MainWindow', u'Toggle Service Manager'))
|
||||
self.ViewServiceManagerItem.setStatusTip(translate(u'MainWindow',
|
||||
u'Toggle the visibility of the Service Manager'))
|
||||
self.ViewServiceManagerItem.setShortcut(translate(u'MainWindow', u'F9'))
|
||||
self.action_Preview_Panel.setText(
|
||||
translate('MainWindow', '&Preview Panel'))
|
||||
translate(u'MainWindow', u'&Preview Panel'))
|
||||
self.action_Preview_Panel.setToolTip(
|
||||
translate('MainWindow', 'Toggle Preview Panel'))
|
||||
self.action_Preview_Panel.setStatusTip(translate('MainWindow',
|
||||
'Toggle the visibility of the Preview Panel'))
|
||||
self.action_Preview_Panel.setShortcut(translate('MainWindow', 'F11'))
|
||||
self.PluginItem.setText(translate('MainWindow', '&Plugin List'))
|
||||
translate(u'MainWindow', u'Toggle Preview Panel'))
|
||||
self.action_Preview_Panel.setStatusTip(translate(u'MainWindow',
|
||||
u'Toggle the visibility of the Preview Panel'))
|
||||
self.action_Preview_Panel.setShortcut(translate(u'MainWindow', u'F11'))
|
||||
self.PluginItem.setText(translate(u'MainWindow', u'&Plugin List'))
|
||||
self.PluginItem.setStatusTip(
|
||||
translate('MainWindow', 'List the Plugins'))
|
||||
self.PluginItem.setShortcut(translate('MainWindow', 'Alt+F7'))
|
||||
translate(u'MainWindow', u'List the Plugins'))
|
||||
self.PluginItem.setShortcut(translate(u'MainWindow', u'Alt+F7'))
|
||||
self.HelpDocumentationItem.setText(
|
||||
translate('MainWindow', '&User Guide'))
|
||||
self.HelpAboutItem.setText(translate('MainWindow', '&About'))
|
||||
translate(u'MainWindow', u'&User Guide'))
|
||||
self.HelpAboutItem.setText(translate(u'MainWindow', u'&About'))
|
||||
self.HelpAboutItem.setStatusTip(
|
||||
translate('MainWindow', 'More information about OpenLP'))
|
||||
self.HelpAboutItem.setShortcut(translate('MainWindow', 'Ctrl+F1'))
|
||||
self.HelpOnlineHelpItem.setText(translate('MainWindow', '&Online Help'))
|
||||
self.HelpWebSiteItem.setText(translate('MainWindow', '&Web Site'))
|
||||
translate(u'MainWindow', u'More information about OpenLP'))
|
||||
self.HelpAboutItem.setShortcut(translate(u'MainWindow', u'Ctrl+F1'))
|
||||
self.HelpOnlineHelpItem.setText(
|
||||
translate(u'MainWindow', u'&Online Help'))
|
||||
self.HelpWebSiteItem.setText(translate(u'MainWindow', u'&Web Site'))
|
||||
#i18n
|
||||
self.AutoLanguageItem.setText(translate('MainWindow', '&Auto Detect'))
|
||||
self.AutoLanguageItem.setText(translate(u'MainWindow', u'&Auto Detect'))
|
||||
self.AutoLanguageItem.setStatusTip(
|
||||
translate('MainWindow', 'Choose System language, if available'))
|
||||
translate(u'MainWindow', u'Choose System language, if available'))
|
||||
for item in self.LanguageGroup.actions():
|
||||
item.setText(item.objectName())
|
||||
item.setStatusTip(translate('MainWindow',
|
||||
'Set the interface language to %1').arg(item.objectName()))
|
||||
self.ToolsAddToolItem.setText(translate('MainWindow', 'Add &Tool...'))
|
||||
item.setStatusTip(translate(u'MainWindow',
|
||||
u'Set the interface language to %1').arg(item.objectName()))
|
||||
self.ToolsAddToolItem.setText(translate(u'MainWindow', u'Add &Tool...'))
|
||||
self.ToolsAddToolItem.setStatusTip(
|
||||
translate('MainWindow', 'Add an application to the list of tools'))
|
||||
translate(u'MainWindow',
|
||||
u'Add an application to the list of tools'))
|
||||
self.action_Preview_Panel.setText(
|
||||
translate('MainWindow', '&Preview Pane'))
|
||||
self.ModeLiveItem.setText(translate('MainWindow', '&Live'))
|
||||
translate(u'MainWindow', u'&Preview Pane'))
|
||||
self.ModeLiveItem.setText(translate(u'MainWindow', u'&Live'))
|
||||
|
||||
|
||||
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
@ -616,11 +619,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
Triggered by delay thread.
|
||||
"""
|
||||
app_version = self.applicationVersion[u'full']
|
||||
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'))
|
||||
version_text = unicode(translate(u'MainWindow', u'Version %s of OpenLP '
|
||||
u'is now available for download (you are currently running version '
|
||||
u' %s). \n\nYou can download the latest version from '
|
||||
u'http://openlp.org'))
|
||||
QtGui.QMessageBox.question(self,
|
||||
translate('MainWindow','OpenLP Version Updated'),
|
||||
translate(u'MainWindow', u'OpenLP Version Updated'),
|
||||
version_text % (version, app_version),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
@ -651,8 +655,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
and settings.value(u'blank warning', QtCore.QVariant(False)).toBool():
|
||||
self.LiveController.onBlankDisplay(True)
|
||||
QtGui.QMessageBox.question(self,
|
||||
translate('MainWindow','OpenLP Main Display Blanked'),
|
||||
translate('MainWindow','The Main Display has been blanked out'),
|
||||
translate(u'MainWindow', u'OpenLP Main Display Blanked'),
|
||||
translate(u'MainWindow',
|
||||
u'The Main Display has been blanked out'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
settings.endGroup()
|
||||
@ -707,9 +712,9 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
"""
|
||||
if self.serviceNotSaved:
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
translate('MainWindow','Save Changes to Service?'),
|
||||
translate('MainWindow','Your service has changed. '
|
||||
'Do you want to save those changes?'),
|
||||
translate(u'MainWindow', u'Save Changes to Service?'),
|
||||
translate(u'MainWindow', u'Your service has changed. '
|
||||
u'Do you want to save those changes?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Cancel |
|
||||
QtGui.QMessageBox.Discard |
|
||||
|
@ -114,21 +114,27 @@ class ServiceManager(QtGui.QWidget):
|
||||
# Create the top toolbar
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ServiceManager','New Service'), u':/general/general_new.png',
|
||||
translate('ServiceManager','Create a new service'), self.onNewService)
|
||||
translate(u'ServiceManager', u'New Service'),
|
||||
u':/general/general_new.png',
|
||||
translate(u'ServiceManager', u'Create a new service'),
|
||||
self.onNewService)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ServiceManager','Open Service'), u':/general/general_open.png',
|
||||
translate('ServiceManager','Load an existing service'), self.onLoadService)
|
||||
translate(u'ServiceManager', u'Open Service'),
|
||||
u':/general/general_open.png',
|
||||
translate(u'ServiceManager', u'Load an existing service'),
|
||||
self.onLoadService)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ServiceManager','Save Service'), u':/general/general_save.png',
|
||||
translate('ServiceManager','Save this service'), self.onSaveService)
|
||||
translate(u'ServiceManager', u'Save Service'),
|
||||
u':/general/general_save.png',
|
||||
translate(u'ServiceManager', u'Save this service'),
|
||||
self.onSaveService)
|
||||
self.Toolbar.addSeparator()
|
||||
self.ThemeLabel = QtGui.QLabel(translate('ServiceManager','Theme:'),
|
||||
self.ThemeLabel = QtGui.QLabel(translate(u'ServiceManager', u'Theme:'),
|
||||
self)
|
||||
self.ThemeLabel.setMargin(3)
|
||||
self.Toolbar.addWidget(self.ThemeLabel)
|
||||
self.ThemeComboBox = QtGui.QComboBox(self.Toolbar)
|
||||
self.ThemeComboBox.setToolTip(translate('ServiceManager',
|
||||
self.ThemeComboBox.setToolTip(translate(u'ServiceManager',
|
||||
u'Select a theme for the service'))
|
||||
self.ThemeComboBox.setSizeAdjustPolicy(
|
||||
QtGui.QComboBox.AdjustToContents)
|
||||
@ -159,21 +165,29 @@ class ServiceManager(QtGui.QWidget):
|
||||
# Add the bottom toolbar
|
||||
self.OrderToolbar = OpenLPToolbar(self)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
translate('ServiceManager','Move to &top'), u':/services/service_top.png',
|
||||
translate('ServiceManager','Move to top'), self.onServiceTop)
|
||||
translate(u'ServiceManager', u'Move to &top'),
|
||||
u':/services/service_top.png',
|
||||
translate(u'ServiceManager', u'Move to top'), self.onServiceTop)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
translate('ServiceManager','Move &up'), u':/services/service_up.png',
|
||||
translate('ServiceManager','Move up order'), self.onServiceUp)
|
||||
translate(u'ServiceManager', u'Move &up'),
|
||||
u':/services/service_up.png',
|
||||
translate(u'ServiceManager', u'Move up order'), self.onServiceUp)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
translate('ServiceManager','Move &down'), u':/services/service_down.png',
|
||||
translate('ServiceManager','Move down order'), self.onServiceDown)
|
||||
translate(u'ServiceManager', u'Move &down'),
|
||||
u':/services/service_down.png',
|
||||
translate(u'ServiceManager', u'Move down order'),
|
||||
self.onServiceDown)
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
translate('ServiceManager','Move to &bottom'), u':/services/service_bottom.png',
|
||||
translate('ServiceManager','Move to end'), self.onServiceEnd)
|
||||
translate(u'ServiceManager', u'Move to &bottom'),
|
||||
u':/services/service_bottom.png',
|
||||
translate(u'ServiceManager', u'Move to end'),
|
||||
self.onServiceEnd)
|
||||
self.OrderToolbar.addSeparator()
|
||||
self.OrderToolbar.addToolbarButton(
|
||||
translate('ServiceManager','&Delete From Service'), u':/general/general_delete.png',
|
||||
translate('ServiceManager','Delete From Service'), self.onDeleteFromService)
|
||||
translate(u'ServiceManager', u'&Delete From Service'),
|
||||
u':/general/general_delete.png',
|
||||
translate(u'ServiceManager', u'Delete From Service'),
|
||||
self.onDeleteFromService)
|
||||
self.Layout.addWidget(self.OrderToolbar)
|
||||
# Connect up our signals and slots
|
||||
QtCore.QObject.connect(self.ThemeComboBox,
|
||||
@ -203,30 +217,38 @@ 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(translate('ServiceManager','&Add New Item'))
|
||||
self.newAction = self.dndMenu.addAction(
|
||||
translate(u'ServiceManager', u'&Add New Item'))
|
||||
self.newAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.addToAction = self.dndMenu.addAction(translate('ServiceManager','&Add to Selected Item'))
|
||||
self.addToAction = self.dndMenu.addAction(
|
||||
translate(u'ServiceManager', u'&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(translate('ServiceManager','&Edit Item'))
|
||||
self.editAction = self.menu.addAction(
|
||||
translate(u'ServiceManager', u'&Edit Item'))
|
||||
self.editAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.maintainAction = self.menu.addAction(translate('ServiceManager','&Maintain Item'))
|
||||
self.maintainAction = self.menu.addAction(
|
||||
translate(u'ServiceManager', u'&Maintain Item'))
|
||||
self.maintainAction.setIcon(build_icon(u':/general/general_edit.png'))
|
||||
self.notesAction = self.menu.addAction(translate('ServiceManager','&Notes'))
|
||||
self.notesAction = self.menu.addAction(
|
||||
translate(u'ServiceManager', u'&Notes'))
|
||||
self.notesAction.setIcon(build_icon(u':/services/service_notes.png'))
|
||||
self.deleteAction = self.menu.addAction(
|
||||
translate('ServiceManager','&Delete From Service'))
|
||||
translate(u'ServiceManager', u'&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(translate('ServiceManager','&Preview Verse'))
|
||||
self.previewAction = self.menu.addAction(
|
||||
translate(u'ServiceManager', u'&Preview Verse'))
|
||||
self.previewAction.setIcon(build_icon(u':/general/general_preview.png'))
|
||||
self.liveAction = self.menu.addAction(translate('ServiceManager','&Live Verse'))
|
||||
self.liveAction = self.menu.addAction(
|
||||
translate(u'ServiceManager', u'&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(translate('ServiceManager',u'&Change Item Theme'))
|
||||
self.themeMenu = QtGui.QMenu(
|
||||
translate(u'ServiceManager', u'&Change Item Theme'))
|
||||
self.menu.addMenu(self.themeMenu)
|
||||
|
||||
def supportedSuffixes(self, suffix):
|
||||
@ -458,9 +480,10 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.parent.generalSettingsSection + u'/save prompt',
|
||||
QtCore.QVariant(False)).toBool():
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
translate('ServiceManager','Save Changes to Service?'),
|
||||
translate('ServiceManager','Your service is unsaved, do you want to save '
|
||||
'those changes before creating a new one?'),
|
||||
translate(u'ServiceManager', u'Save Changes to Service?'),
|
||||
translate(u'ServiceManager',
|
||||
u'Your service is unsaved, do you want to save '
|
||||
u'those changes before creating a new one?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Cancel |
|
||||
QtGui.QMessageBox.Save),
|
||||
@ -542,9 +565,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
log.debug(u'onSaveService')
|
||||
if not quick or self.isNew:
|
||||
filename = QtGui.QFileDialog.getSaveFileName(self,
|
||||
translate('ServiceManager',u'Save Service'),
|
||||
translate(u'ServiceManager', u'Save Service'),
|
||||
SettingsManager.get_last_dir(self.parent.serviceSettingsSection),
|
||||
translate('ServiceManager',u'OpenLP Service Files (*.osz)'))
|
||||
translate(u'ServiceManager', u'OpenLP Service Files (*.osz)'))
|
||||
else:
|
||||
filename = SettingsManager.get_last_dir(
|
||||
self.parent.serviceSettingsSection)
|
||||
@ -601,7 +624,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.parent.serviceSettingsSection)
|
||||
else:
|
||||
filename = QtGui.QFileDialog.getOpenFileName(
|
||||
self, translate('ServiceManager','Open Service'),
|
||||
self, translate(u'ServiceManager', u'Open Service'),
|
||||
SettingsManager.get_last_dir(
|
||||
self.parent.serviceSettingsSection), u'Services (*.osz)')
|
||||
self.loadService(filename)
|
||||
@ -614,9 +637,10 @@ class ServiceManager(QtGui.QWidget):
|
||||
"""
|
||||
if self.parent.serviceNotSaved:
|
||||
ret = QtGui.QMessageBox.question(self,
|
||||
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?'),
|
||||
translate(u'ServiceManager', u'Save Changes to Service?'),
|
||||
translate(u'ServiceManager',
|
||||
u'Your current service is unsaved, do you want to '
|
||||
u'save the changes before opening a new one?'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Discard |
|
||||
QtGui.QMessageBox.Save),
|
||||
@ -778,9 +802,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.serviceItems[item][u'service_item'], count)
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('ServiceManager','Missing Display Handler'),
|
||||
translate('ServiceManager','Your item cannot be displayed as '
|
||||
'there is no handler to display it'),
|
||||
translate(u'ServiceManager', u'Missing Display Handler'),
|
||||
translate(u'ServiceManager', u'Your item cannot be displayed '
|
||||
u'as there is no handler to display it'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
@ -814,9 +838,9 @@ class ServiceManager(QtGui.QWidget):
|
||||
self.serviceItems[item][u'service_item'], 0)
|
||||
else:
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate('ServiceManager','Missing Display Handler'),
|
||||
translate('ServiceManager','Your item cannot be displayed as '
|
||||
'there is no handler to display it'),
|
||||
translate(u'ServiceManager', u'Missing Display Handler'),
|
||||
translate(u'ServiceManager', u'Your item cannot be displayed '
|
||||
u'as there is no handler to display it'),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok),
|
||||
QtGui.QMessageBox.Ok)
|
||||
|
@ -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(translate('SlideController','Live'))
|
||||
self.TypeLabel.setText(translate(u'SlideController', u'Live'))
|
||||
self.split = 1
|
||||
self.typePrefix = u'live'
|
||||
else:
|
||||
self.TypeLabel.setText(translate('SlideController','Preview'))
|
||||
self.TypeLabel.setText(translate(u'SlideController', u'Preview'))
|
||||
self.split = 0
|
||||
self.typePrefix = u'preview'
|
||||
self.TypeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')
|
||||
@ -178,75 +178,92 @@ class SlideController(QtGui.QWidget):
|
||||
if self.isLive:
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'First Slide', u':/slides/slide_first.png',
|
||||
translate('SlideController','Move to first'), self.onSlideSelectedFirst)
|
||||
translate(u'SlideController', u'Move to first'),
|
||||
self.onSlideSelectedFirst)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Previous Slide', u':/slides/slide_previous.png',
|
||||
translate('SlideController','Move to previous'), self.onSlideSelectedPrevious)
|
||||
translate(u'SlideController', u'Move to previous'),
|
||||
self.onSlideSelectedPrevious)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Next Slide', u':/slides/slide_next.png',
|
||||
translate('SlideController','Move to next'), self.onSlideSelectedNext)
|
||||
translate(u'SlideController', u'Move to next'),
|
||||
self.onSlideSelectedNext)
|
||||
if self.isLive:
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Last Slide', u':/slides/slide_last.png',
|
||||
translate('SlideController','Move to last'), self.onSlideSelectedLast)
|
||||
translate(u'SlideController', u'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',
|
||||
translate('SlideController','Blank Screen'), self.onBlankDisplay, True)
|
||||
translate(u'SlideController', u'Blank Screen'),
|
||||
self.onBlankDisplay, True)
|
||||
self.themeButton = self.Toolbar.addToolbarButton(
|
||||
u'Display Theme', u':/slides/slide_theme.png',
|
||||
translate('SlideController','Theme Screen'), self.onThemeDisplay, True)
|
||||
translate(u'SlideController', u'Theme Screen'),
|
||||
self.onThemeDisplay, True)
|
||||
self.hideButton = self.Toolbar.addToolbarButton(
|
||||
u'Hide screen', u':/slides/slide_desktop.png',
|
||||
translate('SlideController','Hide Screen'), self.onHideDisplay, True)
|
||||
translate(u'SlideController', u'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',
|
||||
translate('SlideController','Move to live'), self.onGoLive)
|
||||
translate(u'SlideController', u'Move to live'), self.onGoLive)
|
||||
self.Toolbar.addToolbarSeparator(u'Close Separator')
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Edit Song', u':/general/general_edit.png',
|
||||
translate('SlideController','Edit and re-preview Song'), self.onEditSong)
|
||||
translate(u'SlideController', u'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',
|
||||
translate('SlideController','Start continuous loop'), self.onStartLoop)
|
||||
translate(u'SlideController', u'Start continuous loop'),
|
||||
self.onStartLoop)
|
||||
self.Toolbar.addToolbarButton(
|
||||
u'Stop Loop', u':/media/media_stop.png',
|
||||
translate('SlideController','Stop continuous loop'), self.onStopLoop)
|
||||
translate(u'SlideController', u'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(translate('SlideController','s'))
|
||||
self.DelaySpinBox.setSuffix(translate(u'SlideController', u's'))
|
||||
self.DelaySpinBox.setToolTip(
|
||||
translate('SlideController','Delay between slides in seconds'))
|
||||
translate(u'SlideController',
|
||||
u'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',
|
||||
translate('SlideController','Start playing media'), self.onMediaPlay)
|
||||
translate(u'SlideController', u'Start playing media'),
|
||||
self.onMediaPlay)
|
||||
self.Mediabar.addToolbarButton(
|
||||
u'Media Pause', u':/slides/media_playback_pause.png',
|
||||
translate('SlideController','Start playing media'), self.onMediaPause)
|
||||
translate(u'SlideController', u'Start playing media'),
|
||||
self.onMediaPause)
|
||||
self.Mediabar.addToolbarButton(
|
||||
u'Media Stop', u':/slides/media_playback_stop.png',
|
||||
translate('SlideController','Start playing media'), self.onMediaStop)
|
||||
translate(u'SlideController', u'Start playing media'),
|
||||
self.onMediaStop)
|
||||
if self.isLive:
|
||||
self.blankButton = self.Mediabar.addToolbarButton(
|
||||
u'Blank Screen', u':/slides/slide_blank.png',
|
||||
translate('SlideController','Blank Screen'), self.onBlankDisplay, True)
|
||||
translate(u'SlideController', u'Blank Screen'),
|
||||
self.onBlankDisplay, True)
|
||||
self.themeButton = self.Mediabar.addToolbarButton(
|
||||
u'Display Theme', u':/slides/slide_theme.png',
|
||||
translate('SlideController','Theme Screen'), self.onThemeDisplay, True)
|
||||
translate(u'SlideController', u'Theme Screen'),
|
||||
self.onThemeDisplay, True)
|
||||
self.hideButton = self.Mediabar.addToolbarButton(
|
||||
u'Hide screen', u':/slides/slide_desktop.png',
|
||||
translate('SlideController','Hide Screen'), self.onHideDisplay, True)
|
||||
translate(u'SlideController', u'Hide Screen'),
|
||||
self.onHideDisplay, True)
|
||||
if not self.isLive:
|
||||
self.seekSlider = Phonon.SeekSlider()
|
||||
self.seekSlider.setGeometry(QtCore.QRect(90, 260, 221, 24))
|
||||
@ -262,11 +279,11 @@ class SlideController(QtGui.QWidget):
|
||||
# Build the Song Toolbar
|
||||
if isLive:
|
||||
self.SongMenu = QtGui.QToolButton(self.Toolbar)
|
||||
self.SongMenu.setText(translate('SlideController','Go to Verse'))
|
||||
self.SongMenu.setText(translate(u'SlideController', u'Go to Verse'))
|
||||
self.SongMenu.setPopupMode(QtGui.QToolButton.InstantPopup)
|
||||
self.Toolbar.addToolbarWidget(u'Song Menu', self.SongMenu)
|
||||
self.SongMenu.setMenu(QtGui.QMenu(translate('SlideController','Go to Verse'),
|
||||
self.Toolbar))
|
||||
self.SongMenu.setMenu(QtGui.QMenu(
|
||||
translate(u'SlideController', u'Go to Verse'), self.Toolbar))
|
||||
self.Toolbar.makeWidgetsInvisible([u'Song Menu'])
|
||||
# Screen preview area
|
||||
self.PreviewFrame = QtGui.QFrame(self.Splitter)
|
||||
@ -539,8 +556,8 @@ class SlideController(QtGui.QWidget):
|
||||
bits = frame[u'verseTag'].split(u':')
|
||||
tag = None
|
||||
#If verse handle verse number else tag only
|
||||
if bits[0] == translate('SlideController','Verse') or \
|
||||
bits[0] == translate('SlideController','Chorus'):
|
||||
if bits[0] == translate(u'SlideController', u'Verse') or \
|
||||
bits[0] == translate(u'SlideController', u'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,8 +570,9 @@ 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(translate('SlideController',u'%s'%tag1),
|
||||
self.onSongBarHandler)
|
||||
self.SongMenu.menu().addAction(
|
||||
translate(u'SlideController', u'%s'%tag1),
|
||||
self.onSongBarHandler)
|
||||
item.setText(frame[u'text'])
|
||||
else:
|
||||
label = QtGui.QLabel()
|
||||
|
@ -24,7 +24,7 @@
|
||||
###############################################################################
|
||||
|
||||
from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.lib import build_icon, translate
|
||||
from openlp.core.lib import build_icon
|
||||
|
||||
class SplashScreen(object):
|
||||
def __init__(self, version):
|
||||
|
@ -55,21 +55,25 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.amendThemeForm = AmendThemeForm(self)
|
||||
self.Toolbar = OpenLPToolbar(self)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ThemeManager','New Theme'), u':/themes/theme_new.png',
|
||||
translate('ThemeManager','Create a new theme'), self.onAddTheme)
|
||||
translate(u'ThemeManager', u'New Theme'), u':/themes/theme_new.png',
|
||||
translate(u'ThemeManager', u'Create a new theme'), self.onAddTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ThemeManager','Edit Theme'), u':/themes/theme_edit.png',
|
||||
translate('ThemeManager','Edit a theme'), self.onEditTheme)
|
||||
translate(u'ThemeManager', u'Edit Theme'),
|
||||
u':/themes/theme_edit.png',
|
||||
translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ThemeManager','Delete Theme'), u':/general/general_delete.png',
|
||||
translate('ThemeManager','Delete a theme'), self.onDeleteTheme)
|
||||
translate(u'ThemeManager', u'Delete Theme'),
|
||||
u':/general/general_delete.png',
|
||||
translate(u'ThemeManager', u'Delete a theme'), self.onDeleteTheme)
|
||||
self.Toolbar.addSeparator()
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ThemeManager','Import Theme'), u':/general/general_import.png',
|
||||
translate('ThemeManager','Import a theme'), self.onImportTheme)
|
||||
translate(u'ThemeManager', u'Import Theme'),
|
||||
u':/general/general_import.png',
|
||||
translate(u'ThemeManager', u'Import a theme'), self.onImportTheme)
|
||||
self.Toolbar.addToolbarButton(
|
||||
translate('ThemeManager','Export Theme'), u':/general/general_export.png',
|
||||
translate('ThemeManager','Export a theme'), self.onExportTheme)
|
||||
translate(u'ThemeManager', u'Export Theme'),
|
||||
u':/general/general_export.png',
|
||||
translate(u'ThemeManager', u'Export a theme'), self.onExportTheme)
|
||||
self.ThemeWidget = QtGui.QWidgetAction(self.Toolbar)
|
||||
self.Layout.addWidget(self.Toolbar)
|
||||
self.ThemeListWidget = QtGui.QListWidget(self)
|
||||
@ -79,23 +83,23 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.ThemeListWidget.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget, u':/themes/theme_edit.png',
|
||||
translate('ThemeManager','Edit a theme'), self.onEditTheme))
|
||||
translate(u'ThemeManager', u'Edit a theme'), self.onEditTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuSeparator(self.ThemeListWidget))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_delete.png',
|
||||
translate('ThemeManager','Delete theme'),
|
||||
translate(u'ThemeManager', u'Delete theme'),
|
||||
self.onDeleteTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_export.png',
|
||||
translate('ThemeManager','Make Global'),
|
||||
translate(u'ThemeManager', u'Make Global'),
|
||||
self.changeGlobalFromScreen))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuAction(self.ThemeListWidget,
|
||||
u':/general/general_export.png',
|
||||
translate('ThemeManager','Export theme'),
|
||||
translate(u'ThemeManager', u'Export theme'),
|
||||
self.onExportTheme))
|
||||
self.ThemeListWidget.addAction(
|
||||
contextMenuSeparator(self.ThemeListWidget))
|
||||
@ -128,7 +132,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.ThemeListWidget.item(count).setText(newName)
|
||||
#Set the new name
|
||||
if themeName == newName:
|
||||
name = u'%s (%s)' % (newName, translate('ThemeManager','default'))
|
||||
name = u'%s (%s)' % (newName,
|
||||
translate(u'ThemeManager', u'default'))
|
||||
self.ThemeListWidget.item(count).setText(name)
|
||||
|
||||
def changeGlobalFromScreen(self, index = -1):
|
||||
@ -145,7 +150,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
if count == selected_row:
|
||||
self.global_theme = unicode(
|
||||
self.ThemeListWidget.item(count).text())
|
||||
name = u'%s (%s)' % (self.global_theme, translate('ThemeManager','default'))
|
||||
name = u'%s (%s)' % (self.global_theme,
|
||||
translate(u'ThemeManager', u'default'))
|
||||
self.ThemeListWidget.item(count).setText(name)
|
||||
QtCore.QSettings().setValue(
|
||||
self.settingsSection + u'/global theme',
|
||||
@ -179,21 +185,25 @@ class ThemeManager(QtGui.QWidget):
|
||||
# should be the same unless default
|
||||
if theme != unicode(item.data(QtCore.Qt.UserRole).toString()):
|
||||
QtGui.QMessageBox.critical(
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','You are unable to delete the default theme.'),
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager',
|
||||
u'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, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','Theme %s is use in %s plugin' % (theme, plugin.name)),
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager',
|
||||
u'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, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','Theme %s is use by Service Manager' % theme),
|
||||
translate(u'ThemeManager',
|
||||
u'Theme %s is use by Service Manager' % theme),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return
|
||||
self.themelist.remove(theme)
|
||||
@ -218,13 +228,14 @@ class ThemeManager(QtGui.QWidget):
|
||||
"""
|
||||
item = self.ThemeListWidget.currentItem()
|
||||
if item is None:
|
||||
QtGui.QMessageBox.critical(self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','You have not selected a theme.'),
|
||||
QtGui.QMessageBox.critical(self,
|
||||
translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager', u'You have not selected a theme.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
return
|
||||
theme = unicode(item.data(QtCore.Qt.UserRole).toString())
|
||||
path = QtGui.QFileDialog.getExistingDirectory(self,
|
||||
unicode(translate('ThemeManager','Save Theme - (%s)')) % theme,
|
||||
unicode(translate(u'ThemeManager', u'Save Theme - (%s)')) % theme,
|
||||
SettingsManager.get_last_dir(self.settingsSection, 1))
|
||||
path = unicode(path)
|
||||
if path:
|
||||
@ -247,7 +258,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
|
||||
def onImportTheme(self):
|
||||
files = QtGui.QFileDialog.getOpenFileNames(
|
||||
self, translate('ThemeManager','Select Theme Import File'),
|
||||
self, translate(u'ThemeManager', u'Select Theme Import File'),
|
||||
SettingsManager.get_last_dir(self.settingsSection), u'Theme (*.*)')
|
||||
log.info(u'New Themes %s', unicode(files))
|
||||
if files:
|
||||
@ -277,7 +288,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
textName = os.path.splitext(name)[0]
|
||||
if textName == self.global_theme:
|
||||
name = u'%s (%s)' % (textName,
|
||||
translate('ThemeManager','default'))
|
||||
translate(u'ThemeManager', u'default'))
|
||||
else:
|
||||
name = textName
|
||||
thumb = os.path.join(self.thumbPath, u'%s.png' % textName)
|
||||
@ -363,8 +374,8 @@ class ThemeManager(QtGui.QWidget):
|
||||
self.generateAndSaveImage(dir, themename, filexml)
|
||||
except:
|
||||
QtGui.QMessageBox.critical(
|
||||
self, translate('ThemeManager','Error'),
|
||||
translate('ThemeManager','File is not a valid theme.'),
|
||||
self, translate(u'ThemeManager', u'Error'),
|
||||
translate(u'ThemeManager', u'File is not a valid theme.'),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Ok))
|
||||
log.exception(u'Importing theme from zip file failed %s' % filename)
|
||||
finally:
|
||||
@ -446,9 +457,10 @@ class ThemeManager(QtGui.QWidget):
|
||||
if self.saveThemeName != name:
|
||||
if os.path.exists(theme_file):
|
||||
result = QtGui.QMessageBox.question(
|
||||
self, translate('ThemeManager','Theme Exists'),
|
||||
translate('ThemeManager','A theme with this name already exists, '
|
||||
'would you like to overwrite it?'),
|
||||
self, translate(u'ThemeManager', u'Theme Exists'),
|
||||
translate(u'ThemeManager',
|
||||
u'A theme with this name already exists, '
|
||||
u'would you like to overwrite it?'),
|
||||
(QtGui.QMessageBox.Yes | QtGui.QMessageBox.No),
|
||||
QtGui.QMessageBox.No)
|
||||
if result == QtGui.QMessageBox.Yes:
|
||||
@ -504,7 +516,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
def baseTheme(self):
|
||||
log.debug(u'base theme created')
|
||||
newtheme = ThemeXML()
|
||||
newtheme.new_document(unicode(translate('ThemeManager','New Theme')))
|
||||
newtheme.new_document(unicode(translate(u'ThemeManager', u'New Theme')))
|
||||
newtheme.add_background_solid(unicode(u'#000000'))
|
||||
newtheme.add_font(unicode(QtGui.QFont().family()), unicode(u'#FFFFFF'),
|
||||
unicode(30), u'False')
|
||||
|
@ -37,7 +37,7 @@ class ThemesTab(SettingsTab):
|
||||
|
||||
def setupUi(self):
|
||||
self.setObjectName(u'ThemesTab')
|
||||
self.tabTitleVisible = translate('ThemesTab','Themes')
|
||||
self.tabTitleVisible = translate(u'ThemesTab', u'Themes')
|
||||
self.ThemesTabLayout = QtGui.QHBoxLayout(self)
|
||||
self.ThemesTabLayout.setSpacing(8)
|
||||
self.ThemesTabLayout.setMargin(8)
|
||||
@ -106,21 +106,26 @@ class ThemesTab(SettingsTab):
|
||||
QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
|
||||
|
||||
def retranslateUi(self):
|
||||
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(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(translate('ThemesTab','Global level'))
|
||||
self.GlobalLevelLabel.setText(translate('ThemesTab','Use the global theme, '
|
||||
'overriding any themes associated with either the service or the '
|
||||
'songs.'))
|
||||
self.GlobalGroupBox.setTitle(translate(u'ThemesTab', u'Global theme'))
|
||||
self.LevelGroupBox.setTitle(translate(u'ThemesTab', u'Theme level'))
|
||||
self.SongLevelRadioButton.setText(
|
||||
translate(u'ThemesTab', u'Song level'))
|
||||
self.SongLevelLabel.setText(
|
||||
translate(u'ThemesTab', u'Use the theme from each song '
|
||||
u'in the database. If a song doesn\'t have a theme associated with '
|
||||
u'it, then use the service\'s theme. If the service doesn\'t have '
|
||||
u'a theme, then use the global theme.'))
|
||||
self.ServiceLevelRadioButton.setText(
|
||||
translate(u'ThemesTab', u'Service level'))
|
||||
self.ServiceLevelLabel.setText(
|
||||
translate(u'ThemesTab', u'Use the theme from the service, '
|
||||
u'overriding any of the individual songs\' themes. If the '
|
||||
u'service doesn\'t have a theme, then use the global theme.'))
|
||||
self.GlobalLevelRadioButton.setText(
|
||||
translate(u'ThemesTab', u'Global level'))
|
||||
self.GlobalLevelLabel.setText(
|
||||
translate(u'ThemesTab', u'Use the global theme, overriding any '
|
||||
u'themes associated with either the service or the songs.'))
|
||||
|
||||
def load(self):
|
||||
settings = QtCore.QSettings()
|
||||
|
Loading…
Reference in New Issue
Block a user