Some head

This commit is contained in:
Jon Tibble 2010-05-20 17:46:53 +01:00
commit 1609f589e4
46 changed files with 4367 additions and 5181 deletions

View File

@ -37,7 +37,7 @@ log = logging.getLogger()
from openlp.core.lib import Receiver
from openlp.core.resources import qInitResources
from openlp.core.ui import MainWindow, SplashScreen, ScreenList
from openlp.core.utils import AppLocation
from openlp.core.utils import AppLocation, LanguageManager
application_stylesheet = u"""
QMainWindow::separator
@ -190,6 +190,11 @@ def main():
qInitResources()
# Now create and actually run the application.
app = OpenLP(qt_args)
#i18n Set Language
language = LanguageManager.get_language()
appTranslator = LanguageManager.get_translator(language)
app.installTranslator(appTranslator)
sys.exit(app.run())
if __name__ == u'__main__':

View File

@ -35,7 +35,7 @@ from PyQt4 import QtCore, QtGui
log = logging.getLogger(__name__)
def translate(context, text):
def translate(context, text, comment=None):
"""
A special shortcut method to wrap around the Qt4 translation functions.
This abstracts the translation procedure so that we can change it if at a
@ -48,8 +48,8 @@ def translate(context, text):
``text``
The text to put into the translation tables for translation.
"""
return QtGui.QApplication.translate(
context, text, None, QtGui.QApplication.UnicodeUTF8)
return QtCore.QCoreApplication.translate(context, text,
comment)
def get_text_file_string(text_file):
"""

View File

@ -533,7 +533,10 @@ class Renderer(object):
font = self.mainFont
metrics = QtGui.QFontMetrics(font)
w = metrics.width(line)
h = metrics.height() + int(self._theme.font_main_line_adjustment)
if footer:
h = metrics.height()
else:
h = metrics.height() + int(self._theme.font_main_line_adjustment)
if draw:
self.painter.setFont(font)
if color is None:
@ -581,4 +584,4 @@ class Renderer(object):
"""
image.save(u'renderer.png', u'png')
if image2:
image2.save(u'renderer2.png', u'png')
image2.save(u'renderer2.png', u'png')

View File

@ -117,10 +117,11 @@ class OpenLPToolbar(QtGui.QToolBar):
The title of the icon to search for.
"""
title = QtCore.QString(title)
if self.icons[title]:
return self.icons[title]
else:
log.error(u'getIconFromTitle - no icon for %s' % title)
try:
if self.icons[title]:
return self.icons[title]
except:
log.exception(u'getIconFromTitle - no icon for %s' % title)
return QtGui.QIcon()
def makeWidgetsInvisible(self, widgets):

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_AboutDialog(object):
def setupUi(self, AboutDialog):
@ -113,8 +114,8 @@ class Ui_AboutDialog(object):
QtCore.QMetaObject.connectSlotsByName(AboutDialog)
def retranslateUi(self, AboutDialog):
AboutDialog.setWindowTitle(self.trUtf8('About OpenLP'))
self.AboutTextEdit.setPlainText(self.trUtf8(
AboutDialog.setWindowTitle(translate('AboutForm', 'About OpenLP'))
self.AboutTextEdit.setPlainText(translate('AboutForm',
'OpenLP <version><revision> - Open Source Lyrics '
'Projection\n'
'\n'
@ -131,8 +132,8 @@ class Ui_AboutDialog(object):
'consider contributing by using the button below.'
))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.AboutTab), self.trUtf8('About'))
self.CreditsTextEdit.setPlainText(self.trUtf8(
self.AboutNotebook.indexOf(self.AboutTab), translate('AboutForm', 'About'))
self.CreditsTextEdit.setPlainText(translate('AboutForm',
'Project Lead\n'
' Raoul "superfly" Snyman\n'
'\n'
@ -164,11 +165,10 @@ class Ui_AboutDialog(object):
))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.CreditsTab),
self.trUtf8('Credits'))
self.LicenseTextEdit.setPlainText(self.trUtf8(
'Copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2010 Raoul '
'Snyman\n'
'Portions copyright ' + u'\u00a9'.encode('utf8') + ' 2004-2010 '
translate('AboutForm', 'Credits'))
self.LicenseTextEdit.setPlainText(translate('AboutForm',
'Copyright \xa9 2004-2010 Raoul Snyman\n'
'Portions copyright \xa9 2004-2010 '
'Tim Bentley, Jonathan Corwin, Michael Gorven, Scott Guerrieri, '
'Christian Richter, Maikel Stuivenberg, Martin Thompson, Jon '
'Tibble, Carsten Tinggaard\n'
@ -557,6 +557,6 @@ class Ui_AboutDialog(object):
'instead of this License.'))
self.AboutNotebook.setTabText(
self.AboutNotebook.indexOf(self.LicenseTab),
self.trUtf8('License'))
self.ContributeButton.setText(self.trUtf8('Contribute'))
self.CloseButton.setText(self.trUtf8('Close'))
translate('AboutForm', 'License'))
self.ContributeButton.setText(translate('AboutForm', 'Contribute'))
self.CloseButton.setText(translate('AboutForm', 'Close'))

View File

@ -25,6 +25,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon
from openlp.core.lib import translate
class Ui_AmendThemeDialog(object):
def setupUi(self, AmendThemeDialog):
@ -183,6 +184,7 @@ class Ui_AmendThemeDialog(object):
self.MainFontLayout.setWidget(4, QtGui.QFormLayout.LabelRole, self.FontMainWrapLineAdjustmentLabel)
self.FontMainLineAdjustmentSpinBox = QtGui.QSpinBox(self.FontMainGroupBox)
self.FontMainLineAdjustmentSpinBox.setObjectName("FontMainLineAdjustmentSpinBox")
self.FontMainLineAdjustmentSpinBox.setMinimum(-99)
self.MainFontLayout.setWidget(4, QtGui.QFormLayout.FieldRole, self.FontMainLineAdjustmentSpinBox)
self.FontMainWrapIndentationLabel = QtGui.QLabel(self.FontMainGroupBox)
self.FontMainWrapIndentationLabel.setObjectName("FontMainWrapIndentationLabel")
@ -601,95 +603,95 @@ class Ui_AmendThemeDialog(object):
AmendThemeDialog.setTabOrder(self.HorizontalComboBox, self.VerticalComboBox)
def retranslateUi(self, AmendThemeDialog):
AmendThemeDialog.setWindowTitle(self.trUtf8('Theme Maintenance'))
self.ThemeNameLabel.setText(self.trUtf8('Theme Name:'))
self.BackgroundLabel.setText(self.trUtf8('Background:'))
self.BackgroundComboBox.setItemText(0, self.trUtf8('Opaque'))
self.BackgroundComboBox.setItemText(1, self.trUtf8('Transparent'))
self.BackgroundTypeLabel.setText(self.trUtf8('Background Type:'))
self.BackgroundTypeComboBox.setItemText(0, self.trUtf8('Solid Color'))
self.BackgroundTypeComboBox.setItemText(1, self.trUtf8('Gradient'))
self.BackgroundTypeComboBox.setItemText(2, self.trUtf8('Image'))
self.Color1Label.setText(self.trUtf8('<Color1>'))
self.Color2Label.setText(self.trUtf8('<Color2>'))
self.ImageLabel.setText(self.trUtf8('Image:'))
self.GradientLabel.setText(self.trUtf8('Gradient :'))
self.GradientComboBox.setItemText(0, self.trUtf8('Horizontal'))
self.GradientComboBox.setItemText(1, self.trUtf8('Vertical'))
self.GradientComboBox.setItemText(2, self.trUtf8('Circular'))
AmendThemeDialog.setWindowTitle(translate('AmendThemeForm', 'Theme Maintenance'))
self.ThemeNameLabel.setText(translate('AmendThemeForm', 'Theme Name:'))
self.BackgroundLabel.setText(translate('AmendThemeForm', 'Background:'))
self.BackgroundComboBox.setItemText(0, translate('AmendThemeForm', 'Opaque'))
self.BackgroundComboBox.setItemText(1, translate('AmendThemeForm', 'Transparent'))
self.BackgroundTypeLabel.setText(translate('AmendThemeForm', 'Background Type:'))
self.BackgroundTypeComboBox.setItemText(0, translate('AmendThemeForm', 'Solid Color'))
self.BackgroundTypeComboBox.setItemText(1, translate('AmendThemeForm', 'Gradient'))
self.BackgroundTypeComboBox.setItemText(2, translate('AmendThemeForm', 'Image'))
self.Color1Label.setText(translate('AmendThemeForm', '<Color1>'))
self.Color2Label.setText(translate('AmendThemeForm', '<Color2>'))
self.ImageLabel.setText(translate('AmendThemeForm', 'Image:'))
self.GradientLabel.setText(translate('AmendThemeForm', 'Gradient :'))
self.GradientComboBox.setItemText(0, translate('AmendThemeForm', 'Horizontal'))
self.GradientComboBox.setItemText(1, translate('AmendThemeForm', 'Vertical'))
self.GradientComboBox.setItemText(2, translate('AmendThemeForm', 'Circular'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.BackgroundTab),
self.trUtf8('Background'))
self.FontMainGroupBox.setTitle(self.trUtf8('Main Font'))
self.FontMainlabel.setText(self.trUtf8('Font:'))
self.FontMainColorLabel.setText(self.trUtf8('Font Color:'))
self.FontMainSize.setText(self.trUtf8('Size:'))
self.FontMainSizeSpinBox.setSuffix(self.trUtf8('pt'))
self.FontMainWrapIndentationLabel.setText(self.trUtf8('Wrap Indentation'))
self.FontMainWrapLineAdjustmentLabel.setText(self.trUtf8('Adjust Line Spacing'))
self.FontMainWeightComboBox.setItemText(0, self.trUtf8('Normal'))
self.FontMainWeightComboBox.setItemText(1, self.trUtf8('Bold'))
self.FontMainWeightComboBox.setItemText(2, self.trUtf8('Italics'))
self.FontMainWeightComboBox.setItemText(3, self.trUtf8('Bold/Italics'))
self.FontMainWeightLabel.setText(self.trUtf8('Font Weight:'))
self.MainLocationGroupBox.setTitle(self.trUtf8('Display Location'))
self.DefaultLocationLabel.setText(self.trUtf8('Use Default Location:'))
self.FontMainXLabel.setText(self.trUtf8('X Position:'))
self.FontMainYLabel.setText(self.trUtf8('Y Position:'))
self.FontMainWidthLabel.setText(self.trUtf8('Width:'))
self.FontMainHeightLabel.setText(self.trUtf8('Height:'))
self.FontMainXSpinBox.setSuffix(self.trUtf8('px'))
self.FontMainYSpinBox.setSuffix(self.trUtf8('px'))
self.FontMainWidthSpinBox.setSuffix(self.trUtf8('px'))
self.FontMainHeightSpinBox.setSuffix(self.trUtf8('px'))
translate('AmendThemeForm', 'Background'))
self.FontMainGroupBox.setTitle(translate('AmendThemeForm', 'Main Font'))
self.FontMainlabel.setText(translate('AmendThemeForm', 'Font:'))
self.FontMainColorLabel.setText(translate('AmendThemeForm', 'Font Color:'))
self.FontMainSize.setText(translate('AmendThemeForm', 'Size:'))
self.FontMainSizeSpinBox.setSuffix(translate('AmendThemeForm', 'pt'))
self.FontMainWrapIndentationLabel.setText(translate('AmendThemeForm', 'Wrap Indentation'))
self.FontMainWrapLineAdjustmentLabel.setText(translate('AmendThemeForm', 'Adjust Line Spacing'))
self.FontMainWeightComboBox.setItemText(0, translate('AmendThemeForm', 'Normal'))
self.FontMainWeightComboBox.setItemText(1, translate('AmendThemeForm', 'Bold'))
self.FontMainWeightComboBox.setItemText(2, translate('AmendThemeForm', 'Italics'))
self.FontMainWeightComboBox.setItemText(3, translate('AmendThemeForm', 'Bold/Italics'))
self.FontMainWeightLabel.setText(translate('AmendThemeForm', 'Font Weight:'))
self.MainLocationGroupBox.setTitle(translate('AmendThemeForm', 'Display Location'))
self.DefaultLocationLabel.setText(translate('AmendThemeForm', 'Use Default Location:'))
self.FontMainXLabel.setText(translate('AmendThemeForm', 'X Position:'))
self.FontMainYLabel.setText(translate('AmendThemeForm', 'Y Position:'))
self.FontMainWidthLabel.setText(translate('AmendThemeForm', 'Width:'))
self.FontMainHeightLabel.setText(translate('AmendThemeForm', 'Height:'))
self.FontMainXSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontMainYSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontMainWidthSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontMainHeightSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.FontMainTab),
self.trUtf8('Font Main'))
self.FooterFontGroupBox.setTitle(self.trUtf8('Footer Font'))
self.FontFooterLabel.setText(self.trUtf8('Font:'))
self.FontFooterColorLabel.setText(self.trUtf8('Font Color:'))
self.FontFooterSizeLabel.setText(self.trUtf8('Size:'))
self.FontFooterSizeSpinBox.setSuffix(self.trUtf8('pt'))
self.FontFooterWeightComboBox.setItemText(0, self.trUtf8('Normal'))
self.FontFooterWeightComboBox.setItemText(1, self.trUtf8('Bold'))
self.FontFooterWeightComboBox.setItemText(2, self.trUtf8('Italics'))
self.FontFooterWeightComboBox.setItemText(3, self.trUtf8('Bold/Italics'))
self.FontFooterWeightLabel.setText(self.trUtf8('Font Weight:'))
self.LocationFooterGroupBox.setTitle(self.trUtf8('Display Location'))
self.FontFooterDefaultLabel.setText(self.trUtf8('Use Default Location:'))
self.FontFooterXLabel.setText(self.trUtf8('X Position:'))
self.FontFooterYLabel.setText(self.trUtf8('Y Position:'))
self.FontFooterWidthLabel.setText(self.trUtf8('Width:'))
self.FontFooterHeightLabel.setText(self.trUtf8('Height:'))
self.FontFooterXSpinBox.setSuffix(self.trUtf8('px'))
self.FontFooterYSpinBox.setSuffix(self.trUtf8('px'))
self.FontFooterWidthSpinBox.setSuffix(self.trUtf8('px'))
self.FontFooterHeightSpinBox.setSuffix(self.trUtf8('px'))
translate('AmendThemeForm', 'Font Main'))
self.FooterFontGroupBox.setTitle(translate('AmendThemeForm', 'Footer Font'))
self.FontFooterLabel.setText(translate('AmendThemeForm', 'Font:'))
self.FontFooterColorLabel.setText(translate('AmendThemeForm', 'Font Color:'))
self.FontFooterSizeLabel.setText(translate('AmendThemeForm', 'Size:'))
self.FontFooterSizeSpinBox.setSuffix(translate('AmendThemeForm', 'pt'))
self.FontFooterWeightComboBox.setItemText(0, translate('AmendThemeForm', 'Normal'))
self.FontFooterWeightComboBox.setItemText(1, translate('AmendThemeForm', 'Bold'))
self.FontFooterWeightComboBox.setItemText(2, translate('AmendThemeForm', 'Italics'))
self.FontFooterWeightComboBox.setItemText(3, translate('AmendThemeForm', 'Bold/Italics'))
self.FontFooterWeightLabel.setText(translate('AmendThemeForm', 'Font Weight:'))
self.LocationFooterGroupBox.setTitle(translate('AmendThemeForm', 'Display Location'))
self.FontFooterDefaultLabel.setText(translate('AmendThemeForm', 'Use Default Location:'))
self.FontFooterXLabel.setText(translate('AmendThemeForm', 'X Position:'))
self.FontFooterYLabel.setText(translate('AmendThemeForm', 'Y Position:'))
self.FontFooterWidthLabel.setText(translate('AmendThemeForm', 'Width:'))
self.FontFooterHeightLabel.setText(translate('AmendThemeForm', 'Height:'))
self.FontFooterXSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontFooterYSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontFooterWidthSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.FontFooterHeightSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.FontFooterTab),
self.trUtf8('Font Footer'))
self.OutlineGroupBox.setTitle(self.trUtf8('Outline'))
self.OutlineSpinBoxLabel.setText(self.trUtf8('Outline Size:'))
self.OutlineSpinBox.setSuffix(self.trUtf8('px'))
self.OutlineColorLabel.setText(self.trUtf8('Outline Color:'))
self.OutlineEnabledLabel.setText(self.trUtf8('Show Outline:'))
self.ShadowGroupBox.setTitle(self.trUtf8('Shadow'))
self.ShadowSpinBoxLabel.setText(self.trUtf8('Shadow Size:'))
self.ShadowSpinBox.setSuffix(self.trUtf8('px'))
self.ShadowColorLabel.setText(self.trUtf8('Shadow Color:'))
self.ShadowEnabledLabel.setText(self.trUtf8('Show Shadow:'))
self.AlignmentGroupBox.setTitle(self.trUtf8('Alignment'))
self.HorizontalLabel.setText(self.trUtf8('Horizontal Align:'))
self.HorizontalComboBox.setItemText(0, self.trUtf8('Left'))
self.HorizontalComboBox.setItemText(1, self.trUtf8('Right'))
self.HorizontalComboBox.setItemText(2, self.trUtf8('Center'))
self.VerticalLabel.setText(self.trUtf8('Vertical Align:'))
self.VerticalComboBox.setItemText(0, self.trUtf8('Top'))
self.VerticalComboBox.setItemText(1, self.trUtf8('Middle'))
self.VerticalComboBox.setItemText(2, self.trUtf8('Bottom'))
self.TransitionGroupBox.setTitle(self.trUtf8('Slide Transition'))
self.SlideTransitionCheckedBoxLabel.setText(self.trUtf8('Transition Active:'))
translate('AmendThemeForm', 'Font Footer'))
self.OutlineGroupBox.setTitle(translate('AmendThemeForm', 'Outline'))
self.OutlineSpinBoxLabel.setText(translate('AmendThemeForm', 'Outline Size:'))
self.OutlineSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.OutlineColorLabel.setText(translate('AmendThemeForm', 'Outline Color:'))
self.OutlineEnabledLabel.setText(translate('AmendThemeForm', 'Show Outline:'))
self.ShadowGroupBox.setTitle(translate('AmendThemeForm', 'Shadow'))
self.ShadowSpinBoxLabel.setText(translate('AmendThemeForm', 'Shadow Size:'))
self.ShadowSpinBox.setSuffix(translate('AmendThemeForm', 'px'))
self.ShadowColorLabel.setText(translate('AmendThemeForm', 'Shadow Color:'))
self.ShadowEnabledLabel.setText(translate('AmendThemeForm', 'Show Shadow:'))
self.AlignmentGroupBox.setTitle(translate('AmendThemeForm', 'Alignment'))
self.HorizontalLabel.setText(translate('AmendThemeForm', 'Horizontal Align:'))
self.HorizontalComboBox.setItemText(0, translate('AmendThemeForm', 'Left'))
self.HorizontalComboBox.setItemText(1, translate('AmendThemeForm', 'Right'))
self.HorizontalComboBox.setItemText(2, translate('AmendThemeForm', 'Center'))
self.VerticalLabel.setText(translate('AmendThemeForm', 'Vertical Align:'))
self.VerticalComboBox.setItemText(0, translate('AmendThemeForm', 'Top'))
self.VerticalComboBox.setItemText(1, translate('AmendThemeForm', 'Middle'))
self.VerticalComboBox.setItemText(2, translate('AmendThemeForm', 'Bottom'))
self.TransitionGroupBox.setTitle(translate('AmendThemeForm', 'Slide Transition'))
self.SlideTransitionCheckedBoxLabel.setText(translate('AmendThemeForm', 'Transition Active:'))
self.ThemeTabWidget.setTabText(
self.ThemeTabWidget.indexOf(self.OtherOptionsTab),
self.trUtf8('Other Options'))
self.PreviewGroupBox.setTitle(self.trUtf8('Preview'))
translate('AmendThemeForm', 'Other Options'))
self.PreviewGroupBox.setTitle(translate('AmendThemeForm', 'Preview'))

View File

@ -42,139 +42,139 @@ class DisplayTab(SettingsTab):
self.tabTitleVisible = self.trUtf8('Displays')
self.layoutWidget = QtGui.QWidget(self)
self.layoutWidget.setGeometry(QtCore.QRect(0, 40, 241, 79))
self.layoutWidget.setObjectName("layoutWidget")
self.layoutWidget.setObjectName(u'layoutWidget')
self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout.setObjectName(u'verticalLayout')
self.CurrentGroupBox = QtGui.QGroupBox(self.layoutWidget)
self.CurrentGroupBox.setObjectName("CurrentGroupBox")
self.CurrentGroupBox.setObjectName(u'CurrentGroupBox')
self.horizontalLayout = QtGui.QHBoxLayout(self.CurrentGroupBox)
self.horizontalLayout.setObjectName("horizontalLayout")
self.horizontalLayout.setObjectName(u'horizontalLayout')
self.verticalLayout_6 = QtGui.QVBoxLayout()
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.verticalLayout_6.setObjectName(u'verticalLayout_6')
self.XLabel = QtGui.QLabel(self.CurrentGroupBox)
self.XLabel.setAlignment(QtCore.Qt.AlignCenter)
self.XLabel.setObjectName("XLabel")
self.XLabel.setObjectName(u'XLabel')
self.verticalLayout_6.addWidget(self.XLabel)
self.Xpos = QtGui.QLabel(self.CurrentGroupBox)
self.Xpos.setAlignment(QtCore.Qt.AlignCenter)
self.Xpos.setObjectName("Xpos")
self.Xpos.setObjectName(u'Xpos')
self.verticalLayout_6.addWidget(self.Xpos)
self.horizontalLayout.addLayout(self.verticalLayout_6)
self.verticalLayout_7 = QtGui.QVBoxLayout()
self.verticalLayout_7.setObjectName("verticalLayout_7")
self.verticalLayout_7.setObjectName(u'verticalLayout_7')
self.YLabel = QtGui.QLabel(self.CurrentGroupBox)
self.YLabel.setAlignment(QtCore.Qt.AlignCenter)
self.YLabel.setObjectName("YLabel")
self.YLabel.setObjectName(u'YLabel')
self.verticalLayout_7.addWidget(self.YLabel)
self.Ypos = QtGui.QLabel(self.CurrentGroupBox)
self.Ypos.setAlignment(QtCore.Qt.AlignCenter)
self.Ypos.setObjectName("Ypos")
self.Ypos.setObjectName(u'Ypos')
self.verticalLayout_7.addWidget(self.Ypos)
self.horizontalLayout.addLayout(self.verticalLayout_7)
self.verticalLayout_9 = QtGui.QVBoxLayout()
self.verticalLayout_9.setObjectName("verticalLayout_9")
self.verticalLayout_9.setObjectName(u'verticalLayout_9')
self.HeightLabel = QtGui.QLabel(self.CurrentGroupBox)
self.HeightLabel.setMaximumSize(QtCore.QSize(100, 16777215))
self.HeightLabel.setAlignment(QtCore.Qt.AlignCenter)
self.HeightLabel.setObjectName("HeightLabel")
self.HeightLabel.setObjectName(u'HeightLabel')
self.verticalLayout_9.addWidget(self.HeightLabel)
self.Height = QtGui.QLabel(self.CurrentGroupBox)
self.Height.setAlignment(QtCore.Qt.AlignCenter)
self.Height.setObjectName("Height")
self.Height.setObjectName(u'Height')
self.verticalLayout_9.addWidget(self.Height)
self.horizontalLayout.addLayout(self.verticalLayout_9)
self.verticalLayout_8 = QtGui.QVBoxLayout()
self.verticalLayout_8.setObjectName("verticalLayout_8")
self.verticalLayout_8.setObjectName(u'verticalLayout_8')
self.WidthLabel = QtGui.QLabel(self.CurrentGroupBox)
self.WidthLabel.setAlignment(QtCore.Qt.AlignCenter)
self.WidthLabel.setObjectName("WidthLabel")
self.WidthLabel.setObjectName(u'WidthLabel')
self.verticalLayout_8.addWidget(self.WidthLabel)
self.Width = QtGui.QLabel(self.CurrentGroupBox)
self.Width.setAlignment(QtCore.Qt.AlignCenter)
self.Width.setObjectName("Width")
self.Width.setObjectName(u'Width')
self.verticalLayout_8.addWidget(self.Width)
self.horizontalLayout.addLayout(self.verticalLayout_8)
self.verticalLayout.addWidget(self.CurrentGroupBox)
self.CurrentGroupBox_2 = QtGui.QGroupBox(self)
self.CurrentGroupBox_2.setGeometry(QtCore.QRect(0, 130, 248, 87))
self.CurrentGroupBox_2.setMaximumSize(QtCore.QSize(500, 16777215))
self.CurrentGroupBox_2.setObjectName("CurrentGroupBox_2")
self.CurrentGroupBox_2.setObjectName(u'CurrentGroupBox_2')
self.horizontalLayout_2 = QtGui.QHBoxLayout(self.CurrentGroupBox_2)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.horizontalLayout_2.setObjectName(u'horizontalLayout_2')
self.verticalLayout_2 = QtGui.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
self.XAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.XAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.XAmendLabel.setObjectName("XAmendLabel")
self.XAmendLabel.setObjectName(u'XAmendLabel')
self.verticalLayout_2.addWidget(self.XAmendLabel)
self.XposEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.XposEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.XposEdit.setMaxLength(4)
self.XposEdit.setObjectName("XposEdit")
self.XposEdit.setObjectName(u'XposEdit')
self.verticalLayout_2.addWidget(self.XposEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_2)
self.verticalLayout_3 = QtGui.QVBoxLayout()
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.verticalLayout_3.setObjectName(u'verticalLayout_3')
self.YAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.YAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.YAmendLabel.setObjectName("YAmendLabel")
self.YAmendLabel.setObjectName(u'YAmendLabel')
self.verticalLayout_3.addWidget(self.YAmendLabel)
self.YposEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.YposEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.YposEdit.setMaxLength(4)
self.YposEdit.setObjectName("YposEdit")
self.YposEdit.setObjectName(u'YposEdit')
self.verticalLayout_3.addWidget(self.YposEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_3)
self.verticalLayout_4 = QtGui.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.verticalLayout_4.setObjectName(u'verticalLayout_4')
self.HeightAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.HeightAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.HeightAmendLabel.setObjectName("HeightAmendLabel")
self.HeightAmendLabel.setObjectName(u'HeightAmendLabel')
self.verticalLayout_4.addWidget(self.HeightAmendLabel)
self.HeightEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.HeightEdit.setMaximumSize(QtCore.QSize(50, 16777215))
self.HeightEdit.setMaxLength(4)
self.HeightEdit.setObjectName("HeightEdit")
self.HeightEdit.setObjectName(u'HeightEdit')
self.verticalLayout_4.addWidget(self.HeightEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_4)
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.verticalLayout_5.setObjectName(u'verticalLayout_5')
self.WidthAmendLabel = QtGui.QLabel(self.CurrentGroupBox_2)
self.WidthAmendLabel.setMaximumSize(QtCore.QSize(100, 16777215))
self.WidthAmendLabel.setAlignment(QtCore.Qt.AlignCenter)
self.WidthAmendLabel.setObjectName("WidthAmendLabel")
self.WidthAmendLabel.setObjectName(u'WidthAmendLabel')
self.verticalLayout_5.addWidget(self.WidthAmendLabel)
self.WidthEdit = QtGui.QLineEdit(self.CurrentGroupBox_2)
self.WidthEdit.setMaximumSize(QtCore.QSize(60, 16777215))
self.WidthEdit.setObjectName("WidthEdit")
self.WidthEdit.setObjectName(u'WidthEdit')
self.verticalLayout_5.addWidget(self.WidthEdit)
self.horizontalLayout_2.addLayout(self.verticalLayout_5)
self.OverrideCheckBox = QtGui.QCheckBox(self)
self.OverrideCheckBox.setGeometry(QtCore.QRect(0, 10, 191, 23))
self.OverrideCheckBox.setObjectName("OverrideCheckBox")
self.OverrideCheckBox.setObjectName(u'OverrideCheckBox')
QtCore.QMetaObject.connectSlotsByName(self)
QtCore.QObject.connect(self.OverrideCheckBox,
QtCore.SIGNAL(u'stateChanged(int)'),
self.onOverrideCheckBoxChanged)
def retranslateUi(self):
self.setWindowTitle(QtGui.QApplication.translate("self", "Amend Display Settings", None, QtGui.QApplication.UnicodeUTF8))
self.CurrentGroupBox.setTitle(QtGui.QApplication.translate("self", "Default Settings", None, QtGui.QApplication.UnicodeUTF8))
self.XLabel.setText(QtGui.QApplication.translate("self", "X", None, QtGui.QApplication.UnicodeUTF8))
self.Xpos.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
self.YLabel.setText(QtGui.QApplication.translate("self", "Y", None, QtGui.QApplication.UnicodeUTF8))
self.Ypos.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
self.HeightLabel.setText(QtGui.QApplication.translate("self", "Height", None, QtGui.QApplication.UnicodeUTF8))
self.Height.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
self.WidthLabel.setText(QtGui.QApplication.translate("self", "Width", None, QtGui.QApplication.UnicodeUTF8))
self.Width.setText(QtGui.QApplication.translate("self", "0", None, QtGui.QApplication.UnicodeUTF8))
self.CurrentGroupBox_2.setTitle(QtGui.QApplication.translate("self", "Amend Settings", None, QtGui.QApplication.UnicodeUTF8))
self.XAmendLabel.setText(QtGui.QApplication.translate("self", "X", None, QtGui.QApplication.UnicodeUTF8))
self.YAmendLabel.setText(QtGui.QApplication.translate("self", "Y", None, QtGui.QApplication.UnicodeUTF8))
self.HeightAmendLabel.setText(QtGui.QApplication.translate("self", "Height", None, QtGui.QApplication.UnicodeUTF8))
self.WidthAmendLabel.setText(QtGui.QApplication.translate("self", "Width", None, QtGui.QApplication.UnicodeUTF8))
self.OverrideCheckBox.setText(QtGui.QApplication.translate("self", "Override Output Display", None, QtGui.QApplication.UnicodeUTF8))
self.setWindowTitle( self.trUtf8(u'Amend Display Settings'))
self.CurrentGroupBox.setTitle( self.trUtf8(u'Default Settings'))
self.XLabel.setText(self.trUtf8(u'X'))
self.Xpos.setText(u'0')
self.YLabel.setText( self.trUtf8(u'Y'))
self.Ypos.setText(u'0')
self.HeightLabel.setText( self.trUtf8(u'Height'))
self.Height.setText(u'0')
self.WidthLabel.setText( self.trUtf8(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'))
def load(self):
settings = QtCore.QSettings()

View File

@ -116,10 +116,12 @@ class MainDisplay(DisplayWidget):
"""
log.debug(u'Initialisation started')
DisplayWidget.__init__(self, parent)
self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
self.setWindowState(QtCore.Qt.WindowFullScreen)
self.parent = parent
self.setWindowTitle(u'OpenLP Display')
# WA_TranslucentBackground is not available in QT4.4
try:
try:
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
except AttributeError:
pass
@ -346,12 +348,12 @@ class VideoDisplay(Phonon.VideoWidget):
Phonon.createPath(self.mediaObject, self.audioObject)
flags = QtCore.Qt.FramelessWindowHint | QtCore.Qt.Dialog
# WindowsStaysOnBottomHint is not available in QT4.4
try:
try:
flags = flags | QtCore.Qt.WindowStaysOnBottomHint
except AttributeError:
pass
self.setWindowFlags(flags)
QtCore.QObject.connect(Receiver.get_receiver(),
QtCore.SIGNAL(u'maindisplay_hide'), self.mediaHide)
QtCore.QObject.connect(Receiver.get_receiver(),

View File

@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
@ -31,8 +32,8 @@ from PyQt4 import QtCore, QtGui
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
from openlp.core.utils import check_latest_version, AppLocation, add_actions
SettingsManager, PluginManager, Receiver, translate
from openlp.core.utils import check_latest_version, AppLocation, add_actions, LanguageManager
log = logging.getLogger(__name__)
@ -252,10 +253,22 @@ class Ui_MainWindow(object):
self.HelpOnlineHelpItem.setEnabled(False)
self.HelpWebSiteItem = QtGui.QAction(MainWindow)
self.HelpWebSiteItem.setObjectName(u'HelpWebSiteItem')
self.LanguageTranslateItem = QtGui.QAction(MainWindow)
self.LanguageTranslateItem.setObjectName(u'LanguageTranslateItem')
self.LanguageEnglishItem = QtGui.QAction(MainWindow)
self.LanguageEnglishItem.setObjectName(u'LanguageEnglishItem')
#i18n Language Items
self.AutoLanguageItem = QtGui.QAction(MainWindow)
self.AutoLanguageItem.setObjectName(u'AutoLanguageItem')
self.AutoLanguageItem.setCheckable(True)
self.LanguageGroup = QtGui.QActionGroup(MainWindow)
qmList = LanguageManager.get_qm_list()
savedLanguage = LanguageManager.get_language()
self.AutoLanguageItem.setChecked(LanguageManager.AutoLanguage)
for key in sorted(qmList.keys()):
languageItem = QtGui.QAction(MainWindow)
languageItem.setObjectName(key)
languageItem.setCheckable(True)
if qmList[key] == savedLanguage:
languageItem.setChecked(True)
add_actions(self.LanguageGroup, [languageItem])
self.LanguageGroup.setDisabled(LanguageManager.AutoLanguage)
self.ToolsAddToolItem = QtGui.QAction(MainWindow)
AddToolIcon = build_icon(u':/tools/tools_add.png')
self.ToolsAddToolItem.setIcon(AddToolIcon)
@ -281,8 +294,9 @@ class Ui_MainWindow(object):
add_actions(self.OptionsViewMenu, (self.ViewModeMenu.menuAction(),
None, self.ViewMediaManagerItem, self.ViewServiceManagerItem,
self.ViewThemeManagerItem, None, self.action_Preview_Panel))
add_actions(self.OptionsLanguageMenu, (self.LanguageEnglishItem, None,
self.LanguageTranslateItem))
#i18n add Language Actions
add_actions(self.OptionsLanguageMenu, (self.AutoLanguageItem, None))
add_actions(self.OptionsLanguageMenu, self.LanguageGroup.actions())
add_actions(self.OptionsMenu, (self.OptionsLanguageMenu.menuAction(),
self.OptionsViewMenu.menuAction(), None, self.OptionsSettingsItem))
add_actions(self.ToolsMenu,
@ -316,98 +330,101 @@ class Ui_MainWindow(object):
"""
Set up the translation system
"""
MainWindow.mainTitle = self.trUtf8('OpenLP 2.0')
MainWindow.defaultThemeText = self.trUtf8(
MainWindow.mainTitle = translate('MainWindow', 'OpenLP 2.0')
MainWindow.language = translate('MainWindow', 'English')
MainWindow.defaultThemeText = translate('MainWindow',
'Default Theme: ')
MainWindow.setWindowTitle(MainWindow.mainTitle)
self.FileMenu.setTitle(self.trUtf8('&File'))
self.FileImportMenu.setTitle(self.trUtf8('&Import'))
self.FileExportMenu.setTitle(self.trUtf8('&Export'))
self.OptionsMenu.setTitle(self.trUtf8('&Options'))
self.OptionsViewMenu.setTitle(self.trUtf8('&View'))
self.ViewModeMenu.setTitle(self.trUtf8('M&ode'))
self.OptionsLanguageMenu.setTitle(self.trUtf8(
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',
u'&Language'))
self.ToolsMenu.setTitle(self.trUtf8('&Tools'))
self.HelpMenu.setTitle(self.trUtf8('&Help'))
self.ToolsMenu.setTitle(translate('MainWindow', '&Tools'))
self.HelpMenu.setTitle(translate('MainWindow', '&Help'))
self.MediaManagerDock.setWindowTitle(
self.trUtf8('Media Manager'))
translate('MainWindow', 'Media Manager'))
self.ServiceManagerDock.setWindowTitle(
self.trUtf8('Service Manager'))
translate('MainWindow', 'Service Manager'))
self.ThemeManagerDock.setWindowTitle(
self.trUtf8('Theme Manager'))
self.FileNewItem.setText(self.trUtf8('&New'))
self.FileNewItem.setToolTip(self.trUtf8('New Service'))
self.FileNewItem.setStatusTip(self.trUtf8('Create a new Service'))
self.FileNewItem.setShortcut(self.trUtf8('Ctrl+N'))
self.FileOpenItem.setText(self.trUtf8('&Open'))
self.FileOpenItem.setToolTip(self.trUtf8('Open Service'))
self.FileOpenItem.setStatusTip(self.trUtf8('Open an existing service'))
self.FileOpenItem.setShortcut(self.trUtf8('Ctrl+O'))
self.FileSaveItem.setText(self.trUtf8('&Save'))
self.FileSaveItem.setToolTip(self.trUtf8('Save Service'))
translate('MainWindow', 'Theme Manager'))
self.FileNewItem.setText(translate('MainWindow', '&New'))
self.FileNewItem.setToolTip(translate('MainWindow', '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'))
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'))
self.FileSaveItem.setStatusTip(
self.trUtf8('Save the current service to disk'))
self.FileSaveItem.setShortcut(self.trUtf8('Ctrl+S'))
self.FileSaveAsItem.setText(self.trUtf8('Save &As...'))
self.FileSaveAsItem.setToolTip(self.trUtf8('Save Service As'))
translate('MainWindow', 'Save the current service to disk'))
self.FileSaveItem.setShortcut(translate('MainWindow', 'Ctrl+S'))
self.FileSaveAsItem.setText(translate('MainWindow', 'Save &As...'))
self.FileSaveAsItem.setToolTip(translate('MainWindow', 'Save Service As'))
self.FileSaveAsItem.setStatusTip(
self.trUtf8('Save the current service under a new name'))
self.FileSaveAsItem.setShortcut(self.trUtf8('F12'))
self.FileExitItem.setText(self.trUtf8('E&xit'))
self.FileExitItem.setStatusTip(self.trUtf8('Quit OpenLP'))
self.FileExitItem.setShortcut(self.trUtf8('Alt+F4'))
self.ImportThemeItem.setText(self.trUtf8('&Theme'))
self.ImportLanguageItem.setText(self.trUtf8('&Language'))
self.ExportThemeItem.setText(self.trUtf8('&Theme'))
self.ExportLanguageItem.setText(self.trUtf8('&Language'))
self.actionLook_Feel.setText(self.trUtf8('Look && &Feel'))
self.OptionsSettingsItem.setText(self.trUtf8('&Settings'))
self.ViewMediaManagerItem.setText(self.trUtf8('&Media Manager'))
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'))
self.ViewMediaManagerItem.setText(translate('MainWindow', '&Media Manager'))
self.ViewMediaManagerItem.setToolTip(
self.trUtf8('Toggle Media Manager'))
translate('MainWindow', 'Toggle Media Manager'))
self.ViewMediaManagerItem.setStatusTip(
self.trUtf8('Toggle the visibility of the Media Manager'))
self.ViewMediaManagerItem.setShortcut(self.trUtf8('F8'))
self.ViewThemeManagerItem.setText(self.trUtf8('&Theme Manager'))
translate('MainWindow', 'Toggle the visibility of the Media Manager'))
self.ViewMediaManagerItem.setShortcut(translate('MainWindow', 'F8'))
self.ViewThemeManagerItem.setText(translate('MainWindow', '&Theme Manager'))
self.ViewThemeManagerItem.setToolTip(
self.trUtf8('Toggle Theme Manager'))
translate('MainWindow', 'Toggle Theme Manager'))
self.ViewThemeManagerItem.setStatusTip(
self.trUtf8('Toggle the visibility of the Theme Manager'))
self.ViewThemeManagerItem.setShortcut(self.trUtf8('F10'))
self.ViewServiceManagerItem.setText(self.trUtf8('&Service Manager'))
translate('MainWindow', 'Toggle the visibility of the Theme Manager'))
self.ViewThemeManagerItem.setShortcut(translate('MainWindow', 'F10'))
self.ViewServiceManagerItem.setText(translate('MainWindow', '&Service Manager'))
self.ViewServiceManagerItem.setToolTip(
self.trUtf8('Toggle Service Manager'))
translate('MainWindow', 'Toggle Service Manager'))
self.ViewServiceManagerItem.setStatusTip(
self.trUtf8('Toggle the visibility of the Service Manager'))
self.ViewServiceManagerItem.setShortcut(self.trUtf8('F9'))
self.action_Preview_Panel.setText(self.trUtf8('&Preview Panel'))
translate('MainWindow', 'Toggle the visibility of the Service Manager'))
self.ViewServiceManagerItem.setShortcut(translate('MainWindow', 'F9'))
self.action_Preview_Panel.setText(translate('MainWindow', '&Preview Panel'))
self.action_Preview_Panel.setToolTip(
self.trUtf8('Toggle Preview Panel'))
translate('MainWindow', 'Toggle Preview Panel'))
self.action_Preview_Panel.setStatusTip(
self.trUtf8('Toggle the visibility of the Preview Panel'))
self.action_Preview_Panel.setShortcut(self.trUtf8('F11'))
self.PluginItem.setText(self.trUtf8('&Plugin List'))
self.PluginItem.setStatusTip(self.trUtf8('List the Plugins'))
self.PluginItem.setShortcut(self.trUtf8('Alt+F7'))
self.HelpDocumentationItem.setText(self.trUtf8('&User Guide'))
self.HelpAboutItem.setText(self.trUtf8('&About'))
translate('MainWindow', 'Toggle the visibility of the Preview Panel'))
self.action_Preview_Panel.setShortcut(translate('MainWindow', 'F11'))
self.PluginItem.setText(translate('MainWindow', '&Plugin List'))
self.PluginItem.setStatusTip(translate('MainWindow', 'List the Plugins'))
self.PluginItem.setShortcut(translate('MainWindow', 'Alt+F7'))
self.HelpDocumentationItem.setText(translate('MainWindow', '&User Guide'))
self.HelpAboutItem.setText(translate('MainWindow', '&About'))
self.HelpAboutItem.setStatusTip(
self.trUtf8('More information about OpenLP'))
self.HelpAboutItem.setShortcut(self.trUtf8('Ctrl+F1'))
self.HelpOnlineHelpItem.setText(self.trUtf8('&Online Help'))
self.HelpWebSiteItem.setText(self.trUtf8('&Web Site'))
self.LanguageTranslateItem.setText(self.trUtf8('&Translate'))
self.LanguageTranslateItem.setStatusTip(
self.trUtf8('Translate the interface to your language'))
self.LanguageEnglishItem.setText(self.trUtf8('English'))
self.LanguageEnglishItem.setStatusTip(
self.trUtf8('Set the interface language to English'))
self.ToolsAddToolItem.setText(self.trUtf8('Add &Tool...'))
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'))
#i18n
self.AutoLanguageItem.setText(translate('MainWindow', '&Auto Detect'))
self.AutoLanguageItem.setStatusTip(
translate('MainWindow', '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...'))
self.ToolsAddToolItem.setStatusTip(
self.trUtf8('Add an application to the list of tools'))
self.action_Preview_Panel.setText(self.trUtf8('&Preview Pane'))
self.ModeLiveItem.setText(self.trUtf8('&Live'))
translate('MainWindow', 'Add an application to the list of tools'))
self.action_Preview_Panel.setText(translate('MainWindow', '&Preview Pane'))
self.ModeLiveItem.setText(translate('MainWindow', '&Live'))
class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
@ -508,6 +525,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
QtCore.QObject.connect(self.FileSaveAsItem,
QtCore.SIGNAL(u'triggered()'),
self.ServiceManagerContents.onSaveService)
#i18n set signals for languages
QtCore.QObject.connect(self.AutoLanguageItem,
QtCore.SIGNAL(u'toggled(bool)'),
self.setAutoLanguage)
self.LanguageGroup.triggered.connect(LanguageManager.set_language)
#warning cyclic dependency
#RenderManager needs to call ThemeManager and
#ThemeManager needs to call RenderManager
@ -550,6 +572,12 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
log.info(u'Load data from Settings')
self.settingsForm.postSetUp()
#i18n
def setAutoLanguage(self, value):
self.LanguageGroup.setDisabled(value)
LanguageManager.AutoLanguage = value
LanguageManager.set_language(self.LanguageGroup.checkedAction())
def versionCheck(self, version):
"""
Checks the version of the Application called from openlp.pyw

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_PluginViewDialog(object):
def setupUi(self, PluginViewDialog):
@ -98,11 +99,11 @@ class Ui_PluginViewDialog(object):
QtCore.QMetaObject.connectSlotsByName(PluginViewDialog)
def retranslateUi(self, PluginViewDialog):
PluginViewDialog.setWindowTitle(self.trUtf8('Plugin List'))
self.PluginInfoGroupBox.setTitle(self.trUtf8('Plugin Details'))
self.VersionLabel.setText(self.trUtf8('Version:'))
self.VersionNumberLabel.setText(self.trUtf8('TextLabel'))
self.AboutLabel.setText(self.trUtf8('About:'))
self.StatusLabel.setText(self.trUtf8('Status:'))
self.StatusComboBox.setItemText(0, self.trUtf8('Active'))
self.StatusComboBox.setItemText(1, self.trUtf8('Inactive'))
PluginViewDialog.setWindowTitle(translate('PluginForm', 'Plugin List'))
self.PluginInfoGroupBox.setTitle(translate('PluginForm', 'Plugin Details'))
self.VersionLabel.setText(translate('PluginForm', 'Version:'))
self.VersionNumberLabel.setText(translate('PluginForm', 'TextLabel'))
self.AboutLabel.setText(translate('PluginForm', 'About:'))
self.StatusLabel.setText(translate('PluginForm', 'Status:'))
self.StatusComboBox.setItemText(0, translate('PluginForm', 'Active'))
self.StatusComboBox.setItemText(1, translate('PluginForm', 'Inactive'))

View File

@ -61,9 +61,10 @@ class ScreenList(object):
"""
Set up the current screen dimensions
"""
log.debug(u'set_override_display %s', number, )
log.debug(u'set_current_display %s', number, )
if number + 1 > self.display_count:
self.current = self.screen_list[0]
self.override = copy.deepcopy(self.current)
self.current_display = 0
else:
self.current = self.screen_list[number]

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_ServiceItemEditDialog(object):
def setupUi(self, ServiceItemEditDialog):
@ -66,8 +67,8 @@ class Ui_ServiceItemEditDialog(object):
QtCore.QMetaObject.connectSlotsByName(ServiceItemEditDialog)
def retranslateUi(self, ServiceItemEditDialog):
ServiceItemEditDialog.setWindowTitle(self.trUtf8('Service Item Maintenance'))
self.upButton.setText(self.trUtf8('Up'))
self.deleteButton.setText(self.trUtf8('Delete'))
self.downButton.setText(self.trUtf8('Down'))
ServiceItemEditDialog.setWindowTitle(translate('ServiceItemEditForm', 'Service Item Maintenance'))
self.upButton.setText(translate('ServiceItemEditForm', 'Up'))
self.deleteButton.setText(translate('ServiceItemEditForm', 'Delete'))
self.downButton.setText(translate('ServiceItemEditForm', 'Down'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_ServiceNoteEdit(object):
def setupUi(self, ServiceNoteEdit):
@ -46,4 +47,4 @@ class Ui_ServiceNoteEdit(object):
QtCore.QMetaObject.connectSlotsByName(ServiceNoteEdit)
def retranslateUi(self, ServiceNoteEdit):
ServiceNoteEdit.setWindowTitle(self.trUtf8('Service Item Notes'))
ServiceNoteEdit.setWindowTitle(translate('ServiceNoteForm', 'Service Item Notes'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_SettingsDialog(object):
def setupUi(self, SettingsDialog):
@ -59,4 +60,4 @@ class Ui_SettingsDialog(object):
QtCore.QMetaObject.connectSlotsByName(SettingsDialog)
def retranslateUi(self, SettingsDialog):
SettingsDialog.setWindowTitle(self.trUtf8('Settings'))
SettingsDialog.setWindowTitle(translate('SettingsForm', 'Settings'))

View File

@ -114,10 +114,6 @@ class SlideController(QtGui.QWidget):
self.songEditList = [
u'Edit Song',
]
if isLive:
self.labelWidth = 20
else:
self.labelWidth = 0
self.timer_id = 0
self.songEdit = False
self.selectedRow = 0
@ -157,12 +153,11 @@ class SlideController(QtGui.QWidget):
self.ControllerLayout.setMargin(0)
# Controller list view
self.PreviewListWidget = SlideList(self)
self.PreviewListWidget.setColumnCount(2)
self.PreviewListWidget.setColumnCount(1)
self.PreviewListWidget.horizontalHeader().setVisible(False)
self.PreviewListWidget.verticalHeader().setVisible(False)
self.PreviewListWidget.setColumnWidth(1, self.labelWidth)
#self.PreviewListWidget.verticalHeader().setVisible(False)
self.PreviewListWidget.setColumnWidth(
1, self.Controller.width() - self.labelWidth)
0, self.Controller.width())
self.PreviewListWidget.isLive = self.isLive
self.PreviewListWidget.setObjectName(u'PreviewListWidget')
self.PreviewListWidget.setSelectionBehavior(1)
@ -382,8 +377,7 @@ class SlideController(QtGui.QWidget):
"""
width = self.parent.ControlSplitter.sizes()[self.split]
height = width * self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
self.PreviewListWidget.setColumnWidth(0, width)
#Sort out image hights (Songs , bibles excluded)
if self.serviceItem and not self.serviceItem.is_text():
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
@ -526,20 +520,19 @@ class SlideController(QtGui.QWidget):
self.serviceItem = serviceItem
self.PreviewListWidget.clear()
self.PreviewListWidget.setRowCount(0)
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
self.PreviewListWidget.setColumnWidth(1, width - self.labelWidth)
self.PreviewListWidget.setColumnWidth(0, width)
if self.isLive:
self.SongMenu.menu().clear()
row = 0
text = []
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
self.PreviewListWidget.setRowCount(
self.PreviewListWidget.rowCount() + 1)
rowitem = QtGui.QTableWidgetItem()
item = QtGui.QTableWidgetItem()
slide_height = 0
slideHeight = 0
#It is a based Text Render
if self.serviceItem.is_text():
if self.isLive and frame[u'verseTag'] is not None:
if frame[u'verseTag'] is not None:
#only load the slot once
bits = frame[u'verseTag'].split(u':')
tag = None
@ -553,10 +546,11 @@ class SlideController(QtGui.QWidget):
tag = bits[0]
tag1 = tag
row = bits[0][0:1]
if tag1 not in self.slideList:
self.slideList[tag1] = framenumber
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag1),
self.onSongBarHandler)
if self.isLive:
if tag1 not in self.slideList:
self.slideList[tag1] = framenumber
self.SongMenu.menu().addAction(self.trUtf8(u'%s'%tag1),
self.onSongBarHandler)
else:
row += 1
item.setText(frame[u'text'])
@ -568,20 +562,18 @@ class SlideController(QtGui.QWidget):
self.parent.RenderManager.height)
label.setScaledContents(True)
label.setPixmap(QtGui.QPixmap.fromImage(pixmap))
self.PreviewListWidget.setCellWidget(framenumber, 1, label)
slide_height = width * self.parent.RenderManager.screen_ratio
self.PreviewListWidget.setCellWidget(framenumber, 0, label)
slideHeight = width * self.parent.RenderManager.screen_ratio
row += 1
rowitem.setText(unicode(row))
rowitem.setTextAlignment(QtCore.Qt.AlignVCenter)
self.PreviewListWidget.setItem(framenumber, 0, rowitem)
self.PreviewListWidget.setItem(framenumber, 1, item)
if slide_height != 0:
self.PreviewListWidget.setRowHeight(framenumber, slide_height)
text.append(unicode(row))
self.PreviewListWidget.setItem(framenumber, 0, item)
if slideHeight != 0:
self.PreviewListWidget.setRowHeight(framenumber, slideHeight)
self.PreviewListWidget.setVerticalHeaderLabels(text)
if self.serviceItem.is_text():
self.PreviewListWidget.resizeRowsToContents()
self.PreviewListWidget.setColumnWidth(0, self.labelWidth)
self.PreviewListWidget.setColumnWidth(1,
self.PreviewListWidget.viewport().size().width() - self.labelWidth)
self.PreviewListWidget.setColumnWidth(0,
self.PreviewListWidget.viewport().size().width())
if slideno > self.PreviewListWidget.rowCount():
self.PreviewListWidget.selectRow(self.PreviewListWidget.rowCount())
else:
@ -604,16 +596,16 @@ class SlideController(QtGui.QWidget):
data = []
if self.serviceItem:
for framenumber, frame in enumerate(self.serviceItem.get_frames()):
data_item = {}
dataItem = {}
if self.serviceItem.is_text():
data_item[u'tag'] = unicode(frame[u'verseTag'])
data_item[u'text'] = unicode(frame[u'text'])
dataItem[u'tag'] = unicode(frame[u'verseTag'])
dataItem[u'text'] = unicode(frame[u'text'])
else:
data_item[u'tag'] = unicode(framenumber)
data_item[u'text'] = u''
data_item[u'selected'] = \
dataItem[u'tag'] = unicode(framenumber)
dataItem[u'text'] = u''
dataItem[u'selected'] = \
(self.PreviewListWidget.currentRow() == framenumber)
data.append(data_item)
data.append(dataItem)
Receiver.send_message(u'slidecontroller_%s_text_response'
% self.typePrefix, data)

View File

@ -184,4 +184,6 @@ def add_actions(target, actions):
else:
target.addAction(action)
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions']
from languagemanager import LanguageManager
__all__ = [u'AppLocation', u'check_latest_version', u'add_actions', u'LanguageManager']

View File

@ -0,0 +1,111 @@
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2010 Raoul Snyman #
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
# Thompson, Jon Tibble, Carsten Tinggaard #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
import logging
import os
from PyQt4 import QtCore, QtGui
from openlp.core.utils import AppLocation
from openlp.core.lib import translate
log = logging.getLogger()
class LanguageManager(object):
"""
Helper for Language selection
"""
__qmList__ = None
AutoLanguage = False
@staticmethod
def get_translator(language):
if LanguageManager.AutoLanguage :
language = QtCore.QLocale.system().name()
lang_Path = AppLocation.get_directory(AppLocation.AppDir)
lang_Path = os.path.join(lang_Path, u'resources', u'i18n')
appTranslator = QtCore.QTranslator()
if appTranslator.load("openlp_" + language, lang_Path):
return appTranslator
@staticmethod
def find_qm_files():
trans_dir = AppLocation.get_directory(AppLocation.AppDir)
trans_dir = QtCore.QDir(os.path.join(trans_dir, u'resources', u'i18n'))
fileNames = trans_dir.entryList(QtCore.QStringList("*.qm"),
QtCore.QDir.Files, QtCore.QDir.Name)
for i in fileNames:
fileNames.replaceInStrings(i, trans_dir.filePath(i))
return fileNames
@staticmethod
def language_name(qmFile):
translator = QtCore.QTranslator()
translator.load(qmFile)
return translator.translate(u'MainWindow', u'English')
@staticmethod
def get_language():
settings = QtCore.QSettings(u'OpenLP', u'OpenLP')
language = unicode(settings.value(
u'general/language', QtCore.QVariant(u'[en]')).toString())
log.info(u'Language file: \'%s\' Loaded from conf file' % language)
regEx = QtCore.QRegExp("^\[(.*)\]")
if regEx.exactMatch(language):
LanguageManager.AutoLanguage = True
language = regEx.cap(1)
return language
@staticmethod
def set_language(action):
actionName = u'%s' % action.objectName()
qmList = LanguageManager.get_qm_list()
if LanguageManager.AutoLanguage :
language = u'[%s]' % qmList[actionName]
else:
language = u'%s' % qmList[actionName]
QtCore.QSettings().setValue(
u'general/language', QtCore.QVariant(language))
log.info(u'Language file: \'%s\' written to conf file' % language)
QtGui.QMessageBox.information(None,
translate('LanguageManager', 'Language'),
translate('LanguageManager',
'After restart new Language settings will be used.'))
@staticmethod
def init_qm_list():
LanguageManager.__qmList__ = {}
qmFiles = LanguageManager.find_qm_files()
for i, qmf in enumerate(qmFiles):
regEx = QtCore.QRegExp("^.*openlp_(.*).qm")
if regEx.exactMatch(qmf):
langName = regEx.cap(1)
LanguageManager.__qmList__[u'%#2i %s' % (i+1,
LanguageManager.language_name(qmf))] = langName
@staticmethod
def get_qm_list():
if LanguageManager.__qmList__ == None:
LanguageManager.init_qm_list()
return LanguageManager.__qmList__

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_AlertDialog(object):
def setupUi(self, AlertDialog):
@ -32,10 +33,10 @@ class Ui_AlertDialog(object):
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(u':/icon/openlp.org-icon-32.bmp'), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlertDialog.setWindowIcon(icon)
self.AlertFormLayout = QtGui.QVBoxLayout(AlertDialog)
self.AlertFormLayout.setSpacing(8)
self.AlertFormLayout.setMargin(8)
self.AlertFormLayout.setObjectName(u'AlertFormLayout')
self.AlertDialogLayout = QtGui.QVBoxLayout(AlertDialog)
self.AlertDialogLayout.setSpacing(8)
self.AlertDialogLayout.setMargin(8)
self.AlertDialogLayout.setObjectName(u'AlertDialogLayout')
self.AlertTextLayout = QtGui.QFormLayout()
self.AlertTextLayout.setContentsMargins(0, 0, -1, -1)
self.AlertTextLayout.setSpacing(8)
@ -57,7 +58,7 @@ class Ui_AlertDialog(object):
self.AlertTextEdit = QtGui.QLineEdit(AlertDialog)
self.AlertTextEdit.setObjectName(u'AlertTextEdit')
self.AlertTextLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.AlertTextEdit)
self.AlertFormLayout.addLayout(self.AlertTextLayout)
self.AlertDialogLayout.addLayout(self.AlertTextLayout)
self.ManagementLayout = QtGui.QHBoxLayout()
self.ManagementLayout.setSpacing(8)
self.ManagementLayout.setContentsMargins(-1, -1, -1, 0)
@ -91,7 +92,7 @@ class Ui_AlertDialog(object):
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.ManageButtonLayout.addItem(spacerItem)
self.ManagementLayout.addLayout(self.ManageButtonLayout)
self.AlertFormLayout.addLayout(self.ManagementLayout)
self.AlertDialogLayout.addLayout(self.ManagementLayout)
self.AlertButtonLayout = QtGui.QHBoxLayout()
self.AlertButtonLayout.setSpacing(8)
self.AlertButtonLayout.setObjectName(u'AlertButtonLayout')
@ -116,7 +117,7 @@ class Ui_AlertDialog(object):
self.CloseButton.setIcon(icon5)
self.CloseButton.setObjectName(u'CloseButton')
self.AlertButtonLayout.addWidget(self.CloseButton)
self.AlertFormLayout.addLayout(self.AlertButtonLayout)
self.AlertDialogLayout.addLayout(self.AlertButtonLayout)
self.AlertEntryLabel.setBuddy(self.AlertTextEdit)
self.AlertParameter.setBuddy(self.ParameterEdit)
@ -133,13 +134,13 @@ class Ui_AlertDialog(object):
AlertDialog.setTabOrder(self.DisplayCloseButton, self.CloseButton)
def retranslateUi(self, AlertDialog):
AlertDialog.setWindowTitle(self.trUtf8('Alert Message'))
self.AlertEntryLabel.setText(self.trUtf8('Alert &text:'))
self.AlertParameter.setText(self.trUtf8('&Parameter(s):'))
self.NewButton.setText(self.trUtf8('&New'))
self.SaveButton.setText(self.trUtf8('&Save'))
self.DeleteButton.setText(self.trUtf8('&Delete'))
self.DisplayButton.setText(self.trUtf8('Displ&ay'))
self.DisplayCloseButton.setText(self.trUtf8('Display && Cl&ose'))
self.CloseButton.setText(self.trUtf8('&Close'))
AlertDialog.setWindowTitle(translate('AlertForm', 'Alert Message'))
self.AlertEntryLabel.setText(translate('AlertForm', 'Alert &text:'))
self.AlertParameter.setText(translate('AlertForm', '&Parameter(s):'))
self.NewButton.setText(translate('AlertForm', '&New'))
self.SaveButton.setText(translate('AlertForm', '&Save'))
self.DeleteButton.setText(translate('AlertForm', '&Delete'))
self.DisplayButton.setText(translate('AlertForm', 'Displ&ay'))
self.DisplayCloseButton.setText(translate('AlertForm', 'Display && Cl&ose'))
self.CloseButton.setText(translate('AlertForm', '&Close'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_BibleImportWizard(object):
def setupUi(self, BibleImportWizard):
@ -307,47 +308,47 @@ class Ui_BibleImportWizard(object):
QtCore.QMetaObject.connectSlotsByName(BibleImportWizard)
def retranslateUi(self, BibleImportWizard):
BibleImportWizard.setWindowTitle(self.trUtf8('Bible Import Wizard'))
BibleImportWizard.setWindowTitle(translate('ImportWizardForm', 'Bible Import Wizard'))
self.TitleLabel.setText(
u'<span style=\" font-size:14pt; font-weight:600;\">' + \
self.trUtf8('Welcome to the Bible Import Wizard') + u'</span>')
translate('ImportWizardForm', 'Welcome to the Bible Import Wizard') + u'</span>')
self.InformationLabel.setText(
self.trUtf8('This wizard will help you to import Bibles from a '
translate('ImportWizardForm', 'This wizard will help you to import Bibles from a '
'variety of formats. Click the next button below to start the '
'process by selecting a format to import from.'))
self.SelectPage.setTitle(self.trUtf8('Select Import Source'))
self.SelectPage.setTitle(translate('ImportWizardForm', 'Select Import Source'))
self.SelectPage.setSubTitle(
self.trUtf8('Select the import format, and where to import from.'))
self.FormatLabel.setText(self.trUtf8('Format:'))
self.FormatComboBox.setItemText(0, self.trUtf8('OSIS'))
self.FormatComboBox.setItemText(1, self.trUtf8('CSV'))
self.FormatComboBox.setItemText(2, self.trUtf8('OpenSong'))
self.FormatComboBox.setItemText(3, self.trUtf8('Web Download'))
self.OsisLocationLabel.setText(self.trUtf8('File Location:'))
self.BooksLocationLabel.setText(self.trUtf8('Books Location:'))
self.VerseLocationLabel.setText(self.trUtf8('Verse Location:'))
self.OpenSongFileLabel.setText(self.trUtf8('Bible Filename:'))
self.LocationLabel.setText(self.trUtf8('Location:'))
self.LocationComboBox.setItemText(0, self.trUtf8('Crosswalk'))
self.LocationComboBox.setItemText(1, self.trUtf8('BibleGateway'))
self.BibleLabel.setText(self.trUtf8('Bible:'))
translate('ImportWizardForm', 'Select the import format, and where to import from.'))
self.FormatLabel.setText(translate('ImportWizardForm', 'Format:'))
self.FormatComboBox.setItemText(0, translate('ImportWizardForm', 'OSIS'))
self.FormatComboBox.setItemText(1, translate('ImportWizardForm', 'CSV'))
self.FormatComboBox.setItemText(2, translate('ImportWizardForm', 'OpenSong'))
self.FormatComboBox.setItemText(3, translate('ImportWizardForm', 'Web Download'))
self.OsisLocationLabel.setText(translate('ImportWizardForm', 'File Location:'))
self.BooksLocationLabel.setText(translate('ImportWizardForm', 'Books Location:'))
self.VerseLocationLabel.setText(translate('ImportWizardForm', 'Verse Location:'))
self.OpenSongFileLabel.setText(translate('ImportWizardForm', 'Bible Filename:'))
self.LocationLabel.setText(translate('ImportWizardForm', 'Location:'))
self.LocationComboBox.setItemText(0, translate('ImportWizardForm', 'Crosswalk'))
self.LocationComboBox.setItemText(1, translate('ImportWizardForm', 'BibleGateway'))
self.BibleLabel.setText(translate('ImportWizardForm', 'Bible:'))
self.WebDownloadTabWidget.setTabText(
self.WebDownloadTabWidget.indexOf(self.DownloadOptionsTab),
self.trUtf8('Download Options'))
self.AddressLabel.setText(self.trUtf8('Server:'))
self.UsernameLabel.setText(self.trUtf8('Username:'))
self.PasswordLabel.setText(self.trUtf8('Password:'))
translate('ImportWizardForm', 'Download Options'))
self.AddressLabel.setText(translate('ImportWizardForm', 'Server:'))
self.UsernameLabel.setText(translate('ImportWizardForm', 'Username:'))
self.PasswordLabel.setText(translate('ImportWizardForm', 'Password:'))
self.WebDownloadTabWidget.setTabText(
self.WebDownloadTabWidget.indexOf(self.ProxyServerTab),
self.trUtf8('Proxy Server (Optional)'))
self.LicenseDetailsPage.setTitle(self.trUtf8('License Details'))
translate('ImportWizardForm', 'Proxy Server (Optional)'))
self.LicenseDetailsPage.setTitle(translate('ImportWizardForm', 'License Details'))
self.LicenseDetailsPage.setSubTitle(
self.trUtf8('Set up the Bible\'s license details.'))
self.VersionNameLabel.setText(self.trUtf8('Version Name:'))
self.CopyrightLabel.setText(self.trUtf8('Copyright:'))
self.PermissionLabel.setText(self.trUtf8('Permission:'))
self.ImportPage.setTitle(self.trUtf8('Importing'))
translate('ImportWizardForm', 'Set up the Bible\'s license details.'))
self.VersionNameLabel.setText(translate('ImportWizardForm', 'Version Name:'))
self.CopyrightLabel.setText(translate('ImportWizardForm', 'Copyright:'))
self.PermissionLabel.setText(translate('ImportWizardForm', 'Permission:'))
self.ImportPage.setTitle(translate('ImportWizardForm', 'Importing'))
self.ImportPage.setSubTitle(
self.trUtf8('Please wait while your Bible is imported.'))
self.ImportProgressLabel.setText(self.trUtf8('Ready.'))
translate('ImportWizardForm', 'Please wait while your Bible is imported.'))
self.ImportProgressLabel.setText(translate('ImportWizardForm', 'Ready.'))
self.ImportProgressBar.setFormat(u'%p%')

View File

@ -519,7 +519,7 @@ class BibleMediaItem(MediaManagerItem):
else:
service_item.theme = self.parent.settings_tab.bible_theme
#if we are verse per slide we have already been added
if self.parent.settings_tab.layout_style != 0:
if self.parent.settings_tab.layout_style != 0 and not bible2:
raw_slides.append(bible_text)
for slide in raw_slides:
service_item.add_from_text(slide[:30], slide)

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_customEditDialog(object):
def setupUi(self, customEditDialog):
@ -152,23 +153,23 @@ class Ui_customEditDialog(object):
customEditDialog.setTabOrder(self.DownButton, self.ThemeComboBox)
def retranslateUi(self, customEditDialog):
customEditDialog.setWindowTitle(self.trUtf8('Edit Custom Slides'))
self.UpButton.setToolTip(self.trUtf8('Move slide Up 1'))
self.DownButton.setToolTip(self.trUtf8('Move slide down 1'))
self.TitleLabel.setText(self.trUtf8('Title:'))
self.AddButton.setText(self.trUtf8('Add New'))
self.AddButton.setToolTip(self.trUtf8('Add new slide at bottom'))
self.EditButton.setText(self.trUtf8('Edit'))
self.EditButton.setToolTip(self.trUtf8('Edit selected slide'))
self.EditAllButton.setText(self.trUtf8('Edit All'))
self.EditAllButton.setToolTip(self.trUtf8('Edit all slides'))
self.SaveButton.setText(self.trUtf8('Save'))
self.SaveButton.setToolTip(self.trUtf8('Replace edited slide'))
self.DeleteButton.setText(self.trUtf8('Delete'))
self.DeleteButton.setToolTip(self.trUtf8('Delete selected slide'))
self.ClearButton.setText(self.trUtf8('Clear'))
self.ClearButton.setToolTip(self.trUtf8('Clear edit area'))
self.SplitButton.setText(self.trUtf8('Split Slide'))
self.SplitButton.setToolTip(self.trUtf8('Add slide split'))
self.ThemeLabel.setText(self.trUtf8('Theme:'))
self.CreditLabel.setText(self.trUtf8('Credits:'))
customEditDialog.setWindowTitle(translate('EditCustomForm', 'Edit Custom Slides'))
self.UpButton.setToolTip(translate('EditCustomForm', 'Move slide Up 1'))
self.DownButton.setToolTip(translate('EditCustomForm', 'Move slide down 1'))
self.TitleLabel.setText(translate('EditCustomForm', 'Title:'))
self.AddButton.setText(translate('EditCustomForm', 'Add New'))
self.AddButton.setToolTip(translate('EditCustomForm', 'Add new slide at bottom'))
self.EditButton.setText(translate('EditCustomForm', 'Edit'))
self.EditButton.setToolTip(translate('EditCustomForm', 'Edit selected slide'))
self.EditAllButton.setText(translate('EditCustomForm', 'Edit All'))
self.EditAllButton.setToolTip(translate('EditCustomForm', 'Edit all slides'))
self.SaveButton.setText(translate('EditCustomForm', 'Save'))
self.SaveButton.setToolTip(translate('EditCustomForm', 'Replace edited slide'))
self.DeleteButton.setText(translate('EditCustomForm', 'Delete'))
self.DeleteButton.setToolTip(translate('EditCustomForm', 'Delete selected slide'))
self.ClearButton.setText(translate('EditCustomForm', 'Clear'))
self.ClearButton.setToolTip(translate('EditCustomForm', 'Clear edit area'))
self.SplitButton.setText(translate('EditCustomForm', 'Split Slide'))
self.SplitButton.setToolTip(translate('EditCustomForm', 'Add slide split'))
self.ThemeLabel.setText(translate('EditCustomForm', 'Theme:'))
self.CreditLabel.setText(translate('EditCustomForm', 'Credits:'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_AuthorsDialog(object):
def setupUi(self, AuthorsDialog):
@ -73,7 +74,7 @@ class Ui_AuthorsDialog(object):
QtCore.QMetaObject.connectSlotsByName(AuthorsDialog)
def retranslateUi(self, AuthorsDialog):
AuthorsDialog.setWindowTitle(self.trUtf8('Author Maintenance'))
self.DisplayLabel.setText(self.trUtf8('Display name:'))
self.FirstNameLabel.setText(self.trUtf8('First name:'))
self.LastNameLabel.setText(self.trUtf8('Last name:'))
AuthorsDialog.setWindowTitle(translate('AuthorsForm', 'Author Maintenance'))
self.DisplayLabel.setText(translate('AuthorsForm', 'Display name:'))
self.FirstNameLabel.setText(translate('AuthorsForm', 'First name:'))
self.LastNameLabel.setText(translate('AuthorsForm', 'Last name:'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
from openlp.core.lib import build_icon
@ -418,36 +419,36 @@ class Ui_EditSongDialog(object):
EditSongDialog.setTabOrder(self.CommentsEdit, self.ButtonBox)
def retranslateUi(self, EditSongDialog):
EditSongDialog.setWindowTitle(self.trUtf8('Song Editor'))
self.TitleLabel.setText(self.trUtf8('Title:'))
self.AlternativeTitleLabel.setText(self.trUtf8('Alternative Title:'))
self.LyricsLabel.setText(self.trUtf8('Lyrics:'))
self.VerseOrderLabel.setText(self.trUtf8('Verse Order:'))
self.VerseAddButton.setText(self.trUtf8('Add'))
self.VerseEditButton.setText(self.trUtf8('Edit'))
self.VerseEditAllButton.setText(self.trUtf8('Edit All'))
self.VerseDeleteButton.setText(self.trUtf8('Delete'))
EditSongDialog.setWindowTitle(translate('EditSongForm', 'Song Editor'))
self.TitleLabel.setText(translate('EditSongForm', 'Title:'))
self.AlternativeTitleLabel.setText(translate('EditSongForm', 'Alternative Title:'))
self.LyricsLabel.setText(translate('EditSongForm', 'Lyrics:'))
self.VerseOrderLabel.setText(translate('EditSongForm', 'Verse Order:'))
self.VerseAddButton.setText(translate('EditSongForm', 'Add'))
self.VerseEditButton.setText(translate('EditSongForm', 'Edit'))
self.VerseEditAllButton.setText(translate('EditSongForm', 'Edit All'))
self.VerseDeleteButton.setText(translate('EditSongForm', 'Delete'))
self.SongTabWidget.setTabText(
self.SongTabWidget.indexOf(self.LyricsTab),
self.trUtf8('Title && Lyrics'))
self.AuthorsGroupBox.setTitle(self.trUtf8('Authors'))
self.AuthorAddButton.setText(self.trUtf8('&Add to Song'))
self.AuthorRemoveButton.setText(self.trUtf8('&Remove'))
translate('EditSongForm', 'Title && Lyrics'))
self.AuthorsGroupBox.setTitle(translate('EditSongForm', 'Authors'))
self.AuthorAddButton.setText(translate('EditSongForm', '&Add to Song'))
self.AuthorRemoveButton.setText(translate('EditSongForm', '&Remove'))
self.MaintenanceButton.setText(
self.trUtf8('&Manage Authors, Topics, Books'))
self.TopicGroupBox.setTitle(self.trUtf8('Topic'))
self.TopicAddButton.setText(self.trUtf8('A&dd to Song'))
self.TopicRemoveButton.setText(self.trUtf8('R&emove'))
self.SongBookGroup.setTitle(self.trUtf8('Song Book'))
translate('EditSongForm', '&Manage Authors, Topics, Books'))
self.TopicGroupBox.setTitle(translate('EditSongForm', 'Topic'))
self.TopicAddButton.setText(translate('EditSongForm', 'A&dd to Song'))
self.TopicRemoveButton.setText(translate('EditSongForm', 'R&emove'))
self.SongBookGroup.setTitle(translate('EditSongForm', 'Song Book'))
self.SongTabWidget.setTabText(
self.SongTabWidget.indexOf(self.AuthorsTab),
self.trUtf8('Authors, Topics && Book'))
self.ThemeGroupBox.setTitle(self.trUtf8('Theme'))
self.ThemeAddButton.setText(self.trUtf8('Add a Theme'))
self.CopyrightGroupBox.setTitle(self.trUtf8('Copyright Information'))
self.CopyrightInsertButton.setText(self.trUtf8(u'\u00a9'.encode('utf8')))
self.CCLILabel.setText(self.trUtf8('CCLI Number:'))
self.CommentsGroupBox.setTitle(self.trUtf8('Comments'))
translate('EditSongForm', 'Authors, Topics && Book'))
self.ThemeGroupBox.setTitle(translate('EditSongForm', 'Theme'))
self.ThemeAddButton.setText(translate('EditSongForm', 'Add a Theme'))
self.CopyrightGroupBox.setTitle(translate('EditSongForm', 'Copyright Information'))
self.CopyrightInsertButton.setText(translate('EditSongForm', u'\xa9'))
self.CCLILabel.setText(translate('EditSongForm', 'CCLI Number:'))
self.CommentsGroupBox.setTitle(translate('EditSongForm', 'Comments'))
self.SongTabWidget.setTabText(
self.SongTabWidget.indexOf(self.ThemeTab),
self.trUtf8('Theme, Copyright Info && Comments'))
translate('EditSongForm', 'Theme, Copyright Info && Comments'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_EditVerseDialog(object):
def setupUi(self, EditVerseDialog):
@ -109,21 +110,21 @@ class Ui_EditVerseDialog(object):
QtCore.QMetaObject.connectSlotsByName(EditVerseDialog)
def retranslateUi(self, EditVerseDialog):
EditVerseDialog.setWindowTitle(self.trUtf8('Edit Verse'))
self.VerseTypeLabel.setText(self.trUtf8('Verse Type'))
self.VerseListComboBox.setItemText(0, self.trUtf8('Intro'))
self.VerseListComboBox.setItemText(1, self.trUtf8('Verse'))
self.VerseListComboBox.setItemText(2, self.trUtf8('Pre-Chorus'))
self.VerseListComboBox.setItemText(3, self.trUtf8('Chorus'))
self.VerseListComboBox.setItemText(4, self.trUtf8('Bridge'))
self.VerseListComboBox.setItemText(5, self.trUtf8('Ending'))
self.VerseListComboBox.setItemText(6, self.trUtf8('Other'))
self.VerseNumberLabel.setText(self.trUtf8('Number'))
self.addBridge.setText(self.trUtf8('Bridge'))
self.addVerse.setText(self.trUtf8('Verse'))
self.addChorus.setText(self.trUtf8('Chorus'))
self.addPreChorus.setText(self.trUtf8('Pre-Chorus'))
self.addIntro.setText(self.trUtf8('Intro'))
self.addOther.setText(self.trUtf8('Other'))
self.addEnding.setText(self.trUtf8('Ending'))
EditVerseDialog.setWindowTitle(translate('EditVerseForm', 'Edit Verse'))
self.VerseTypeLabel.setText(translate('EditVerseForm', 'Verse Type'))
self.VerseListComboBox.setItemText(0, translate('EditVerseForm', 'Intro'))
self.VerseListComboBox.setItemText(1, translate('EditVerseForm', 'Verse'))
self.VerseListComboBox.setItemText(2, translate('EditVerseForm', 'Pre-Chorus'))
self.VerseListComboBox.setItemText(3, translate('EditVerseForm', 'Chorus'))
self.VerseListComboBox.setItemText(4, translate('EditVerseForm', 'Bridge'))
self.VerseListComboBox.setItemText(5, translate('EditVerseForm', 'Ending'))
self.VerseListComboBox.setItemText(6, translate('EditVerseForm', 'Other'))
self.VerseNumberLabel.setText(translate('EditVerseForm', 'Number'))
self.addBridge.setText(translate('EditVerseForm', 'Bridge'))
self.addVerse.setText(translate('EditVerseForm', 'Verse'))
self.addChorus.setText(translate('EditVerseForm', 'Chorus'))
self.addPreChorus.setText(translate('EditVerseForm', 'Pre-Chorus'))
self.addIntro.setText(translate('EditVerseForm', 'Intro'))
self.addOther.setText(translate('EditVerseForm', 'Other'))
self.addEnding.setText(translate('EditVerseForm', 'Ending'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_OpenLPExportDialog(object):
def setupUi(self, OpenLPExportDialog):
@ -285,21 +286,21 @@ class Ui_OpenLPExportDialog(object):
QtCore.QMetaObject.connectSlotsByName(OpenLPExportDialog)
def retranslateUi(self, OpenLPExportDialog):
OpenLPExportDialog.setWindowTitle(self.trUtf8('openlp.org Song Exporter'))
self.ExportFileLabel.setText(self.trUtf8('Select openlp.org export filename:'))
self.ExportListLabel.setText(self.trUtf8('Full Song List'))
self.ExportListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.ExportListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.ExportSelectAllPushButton.setText(self.trUtf8('Select All'))
self.ExportFilterComboBox.setItemText(0, self.trUtf8('Lyrics'))
self.ExportFilterComboBox.setItemText(1, self.trUtf8('Title'))
self.ExportFilterComboBox.setItemText(2, self.trUtf8('Author'))
self.SelectedListLabel.setText(self.trUtf8('Song Export List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.SelectedSelectAllPushButton.setText(self.trUtf8('Select All'))
self.SelectedRemoveSelectedButton.setText(self.trUtf8('Remove Selected'))
self.ProgressGroupBox.setTitle(self.trUtf8('Progress:'))
self.ProgressLabel.setText(self.trUtf8('Ready to export'))
self.ExportPushButton.setText(self.trUtf8('Export'))
self.ClosePushButton.setText(self.trUtf8('Close'))
OpenLPExportDialog.setWindowTitle(translate('OpenLPExportForm', 'openlp.org Song Exporter'))
self.ExportFileLabel.setText(translate('OpenLPExportForm', 'Select openlp.org export filename:'))
self.ExportListLabel.setText(translate('OpenLPExportForm', 'Full Song List'))
self.ExportListTable.horizontalHeaderItem(0).setText(translate('OpenLPExportForm', 'Song Title'))
self.ExportListTable.horizontalHeaderItem(1).setText(translate('OpenLPExportForm', 'Author'))
self.ExportSelectAllPushButton.setText(translate('OpenLPExportForm', 'Select All'))
self.ExportFilterComboBox.setItemText(0, translate('OpenLPExportForm', 'Lyrics'))
self.ExportFilterComboBox.setItemText(1, translate('OpenLPExportForm', 'Title'))
self.ExportFilterComboBox.setItemText(2, translate('OpenLPExportForm', 'Author'))
self.SelectedListLabel.setText(translate('OpenLPExportForm', 'Song Export List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(translate('OpenLPExportForm', 'Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(translate('OpenLPExportForm', 'Author'))
self.SelectedSelectAllPushButton.setText(translate('OpenLPExportForm', 'Select All'))
self.SelectedRemoveSelectedButton.setText(translate('OpenLPExportForm', 'Remove Selected'))
self.ProgressGroupBox.setTitle(translate('OpenLPExportForm', 'Progress:'))
self.ProgressLabel.setText(translate('OpenLPExportForm', 'Ready to export'))
self.ExportPushButton.setText(translate('OpenLPExportForm', 'Export'))
self.ClosePushButton.setText(translate('OpenLPExportForm', 'Close'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_OpenLPImportDialog(object):
def setupUi(self, OpenLPImportDialog):
@ -285,21 +286,21 @@ class Ui_OpenLPImportDialog(object):
QtCore.QMetaObject.connectSlotsByName(OpenLPImportDialog)
def retranslateUi(self, OpenLPImportDialog):
OpenLPImportDialog.setWindowTitle(self.trUtf8('openlp.org Song Importer'))
self.ImportFileLabel.setText(self.trUtf8('Select openlp.org songfile to import:'))
self.ImportListLabel.setText(self.trUtf8('Import File Song List'))
self.ImportListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.ImportListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.ImportSelectAllPushButton.setText(self.trUtf8('Select All'))
self.ImportFilterComboBox.setItemText(0, self.trUtf8('Lyrics'))
self.ImportFilterComboBox.setItemText(1, self.trUtf8('Title'))
self.ImportFilterComboBox.setItemText(2, self.trUtf8('Author'))
self.SelectedListLabel.setText(self.trUtf8('Song Import List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.SelectedSelectAllPushButton.setText(self.trUtf8('Select All'))
self.SelectedRemoveSelectedButton.setText(self.trUtf8('Remove Selected'))
self.ProgressGroupBox.setTitle(self.trUtf8('Progress:'))
self.ProgressLabel.setText(self.trUtf8('Ready to import'))
self.ImportPushButton.setText(self.trUtf8('Import'))
self.ClosePushButton.setText(self.trUtf8('Close'))
OpenLPImportDialog.setWindowTitle(translate('OpenLPImportForm', 'openlp.org Song Importer'))
self.ImportFileLabel.setText(translate('OpenLPImportForm', 'Select openlp.org songfile to import:'))
self.ImportListLabel.setText(translate('OpenLPImportForm', 'Import File Song List'))
self.ImportListTable.horizontalHeaderItem(0).setText(translate('OpenLPImportForm', 'Song Title'))
self.ImportListTable.horizontalHeaderItem(1).setText(translate('OpenLPImportForm', 'Author'))
self.ImportSelectAllPushButton.setText(translate('OpenLPImportForm', 'Select All'))
self.ImportFilterComboBox.setItemText(0, translate('OpenLPImportForm', 'Lyrics'))
self.ImportFilterComboBox.setItemText(1, translate('OpenLPImportForm', 'Title'))
self.ImportFilterComboBox.setItemText(2, translate('OpenLPImportForm', 'Author'))
self.SelectedListLabel.setText(translate('OpenLPImportForm', 'Song Import List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(translate('OpenLPImportForm', 'Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(translate('OpenLPImportForm', 'Author'))
self.SelectedSelectAllPushButton.setText(translate('OpenLPImportForm', 'Select All'))
self.SelectedRemoveSelectedButton.setText(translate('OpenLPImportForm', 'Remove Selected'))
self.ProgressGroupBox.setTitle(translate('OpenLPImportForm', 'Progress:'))
self.ProgressLabel.setText(translate('OpenLPImportForm', 'Ready to import'))
self.ImportPushButton.setText(translate('OpenLPImportForm', 'Import'))
self.ClosePushButton.setText(translate('OpenLPImportForm', 'Close'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_OpenSongExportDialog(object):
def setupUi(self, OpenSongExportDialog):
@ -285,21 +286,21 @@ class Ui_OpenSongExportDialog(object):
QtCore.QMetaObject.connectSlotsByName(OpenSongExportDialog)
def retranslateUi(self, OpenSongExportDialog):
OpenSongExportDialog.setWindowTitle(self.trUtf8('OpenSong Song Exporter'))
self.ExportFileLabel.setText(self.trUtf8('Select OpenSong song folder:'))
self.ExportListLabel.setText(self.trUtf8('Full Song List'))
self.ExportListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.ExportListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.ExportSelectAllPushButton.setText(self.trUtf8('Select All'))
self.ExportFilterComboBox.setItemText(0, self.trUtf8('Lyrics'))
self.ExportFilterComboBox.setItemText(1, self.trUtf8('Title'))
self.ExportFilterComboBox.setItemText(2, self.trUtf8('Author'))
self.SelectedListLabel.setText(self.trUtf8('Song Export List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(self.trUtf8('Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(self.trUtf8('Author'))
self.SelectedSelectAllPushButton.setText(self.trUtf8('Select All'))
self.SelectedRemoveSelectedButton.setText(self.trUtf8('Remove Selected'))
self.ProgressGroupBox.setTitle(self.trUtf8('Progress:'))
self.ProgressLabel.setText(self.trUtf8('Ready to export'))
self.ExportPushButton.setText(self.trUtf8('Export'))
self.ClosePushButton.setText(self.trUtf8('Close'))
OpenSongExportDialog.setWindowTitle(translate('OpenSongExportForm', 'OpenSong Song Exporter'))
self.ExportFileLabel.setText(translate('OpenSongExportForm', 'Select OpenSong song folder:'))
self.ExportListLabel.setText(translate('OpenSongExportForm', 'Full Song List'))
self.ExportListTable.horizontalHeaderItem(0).setText(translate('OpenSongExportForm', 'Song Title'))
self.ExportListTable.horizontalHeaderItem(1).setText(translate('OpenSongExportForm', 'Author'))
self.ExportSelectAllPushButton.setText(translate('OpenSongExportForm', 'Select All'))
self.ExportFilterComboBox.setItemText(0, translate('OpenSongExportForm', 'Lyrics'))
self.ExportFilterComboBox.setItemText(1, translate('OpenSongExportForm', 'Title'))
self.ExportFilterComboBox.setItemText(2, translate('OpenSongExportForm', 'Author'))
self.SelectedListLabel.setText(translate('OpenSongExportForm', 'Song Export List'))
self.SelectedListTable.horizontalHeaderItem(0).setText(translate('OpenSongExportForm', 'Song Title'))
self.SelectedListTable.horizontalHeaderItem(1).setText(translate('OpenSongExportForm', 'Author'))
self.SelectedSelectAllPushButton.setText(translate('OpenSongExportForm', 'Select All'))
self.SelectedRemoveSelectedButton.setText(translate('OpenSongExportForm', 'Remove Selected'))
self.ProgressGroupBox.setTitle(translate('OpenSongExportForm', 'Progress:'))
self.ProgressLabel.setText(translate('OpenSongExportForm', 'Ready to export'))
self.ExportPushButton.setText(translate('OpenSongExportForm', 'Export'))
self.ClosePushButton.setText(translate('OpenSongExportForm', 'Close'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_OpenSongImportDialog(object):
def setupUi(self, OpenSongImportDialog):
@ -100,9 +101,9 @@ class Ui_OpenSongImportDialog(object):
QtCore.QMetaObject.connectSlotsByName(OpenSongImportDialog)
def retranslateUi(self, OpenSongImportDialog):
OpenSongImportDialog.setWindowTitle(self.trUtf8('OpenSong Song Importer'))
self.ImportFileLabel.setText(self.trUtf8('OpenSong Folder:'))
self.ProgressGroupBox.setTitle(self.trUtf8('Progress:'))
self.ProgressLabel.setText(self.trUtf8('Ready to import'))
self.ImportPushButton.setText(self.trUtf8('Import'))
self.ClosePushButton.setText(self.trUtf8('Close'))
OpenSongImportDialog.setWindowTitle(translate('OpenSongImportForm', 'OpenSong Song Importer'))
self.ImportFileLabel.setText(translate('OpenSongImportForm', 'OpenSong Folder:'))
self.ProgressGroupBox.setTitle(translate('OpenSongImportForm', 'Progress:'))
self.ProgressLabel.setText(translate('OpenSongImportForm', 'Ready to import'))
self.ImportPushButton.setText(translate('OpenSongImportForm', 'Import'))
self.ClosePushButton.setText(translate('OpenSongImportForm', 'Close'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_SongBookDialog(object):
def setupUi(self, SongBookDialog):
@ -65,6 +66,6 @@ class Ui_SongBookDialog(object):
QtCore.QMetaObject.connectSlotsByName(SongBookDialog)
def retranslateUi(self, SongBookDialog):
SongBookDialog.setWindowTitle(self.trUtf8('Edit Book'))
self.NameLabel.setText(self.trUtf8('Name:'))
self.PublisherLabel.setText(self.trUtf8('Publisher:'))
SongBookDialog.setWindowTitle(translate('SongBookForm', 'Edit Book'))
self.NameLabel.setText(translate('SongBookForm', 'Name:'))
self.PublisherLabel.setText(translate('SongBookForm', 'Publisher:'))

View File

@ -25,7 +25,7 @@
from PyQt4 import QtCore, QtGui
from openlp.core.lib import build_icon
from openlp.core.lib import build_icon, translate
class Ui_SongMaintenanceDialog(object):
def setupUi(self, SongMaintenanceDialog):
@ -208,16 +208,16 @@ class Ui_SongMaintenanceDialog(object):
QtCore.QMetaObject.connectSlotsByName(SongMaintenanceDialog)
def retranslateUi(self, SongMaintenanceDialog):
SongMaintenanceDialog.setWindowTitle(self.trUtf8('Song Maintenance'))
self.TypeListWidget.item(0).setText(self.trUtf8('Authors'))
self.TypeListWidget.item(1).setText(self.trUtf8('Topics'))
self.TypeListWidget.item(2).setText(self.trUtf8('Books/Hymnals'))
self.AuthorAddButton.setText(self.trUtf8('Add'))
self.AuthorEditButton.setText(self.trUtf8('Edit'))
self.AuthorDeleteButton.setText(self.trUtf8('Delete'))
self.TopicAddButton.setText(self.trUtf8('Add'))
self.TopicEditButton.setText(self.trUtf8('Edit'))
self.TopicDeleteButton.setText(self.trUtf8('Delete'))
self.BookAddButton.setText(self.trUtf8('Add'))
self.BookEditButton.setText(self.trUtf8('Edit'))
self.BookDeleteButton.setText(self.trUtf8('Delete'))
SongMaintenanceDialog.setWindowTitle(translate('SongMaintenanceForm', 'Song Maintenance'))
self.TypeListWidget.item(0).setText(translate('SongMaintenanceForm', 'Authors'))
self.TypeListWidget.item(1).setText(translate('SongMaintenanceForm', 'Topics'))
self.TypeListWidget.item(2).setText(translate('SongMaintenanceForm', 'Books/Hymnals'))
self.AuthorAddButton.setText(translate('SongMaintenanceForm', 'Add'))
self.AuthorEditButton.setText(translate('SongMaintenanceForm', 'Edit'))
self.AuthorDeleteButton.setText(translate('SongMaintenanceForm', 'Delete'))
self.TopicAddButton.setText(translate('SongMaintenanceForm', 'Add'))
self.TopicEditButton.setText(translate('SongMaintenanceForm', 'Edit'))
self.TopicDeleteButton.setText(translate('SongMaintenanceForm', 'Delete'))
self.BookAddButton.setText(translate('SongMaintenanceForm', 'Add'))
self.BookEditButton.setText(translate('SongMaintenanceForm', 'Edit'))
self.BookDeleteButton.setText(translate('SongMaintenanceForm', 'Delete'))

View File

@ -24,6 +24,7 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_TopicsDialog(object):
def setupUi(self, TopicsDialog):
@ -59,5 +60,5 @@ class Ui_TopicsDialog(object):
QtCore.QMetaObject.connectSlotsByName(TopicsDialog)
def retranslateUi(self, TopicsDialog):
TopicsDialog.setWindowTitle(self.trUtf8('Topic Maintenance'))
self.NameLabel.setText(self.trUtf8('Topic name:'))
TopicsDialog.setWindowTitle(translate('TopicsForm', 'Topic Maintenance'))
self.NameLabel.setText(translate('TopicsForm', 'Topic name:'))

View File

@ -24,12 +24,13 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_SongUsageDeleteDialog(object):
def setupUi(self, AuditDeleteDialog):
AuditDeleteDialog.setObjectName(u'AuditDeleteDialog')
AuditDeleteDialog.resize(291, 243)
self.layoutWidget = QtGui.QWidget(AuditDeleteDialog)
def setupUi(self, SongUsageDeleteDialog):
SongUsageDeleteDialog.setObjectName(u'SongUsageDeleteDialog')
SongUsageDeleteDialog.resize(291, 243)
self.layoutWidget = QtGui.QWidget(SongUsageDeleteDialog)
self.layoutWidget.setGeometry(QtCore.QRect(20, 10, 247, 181))
self.layoutWidget.setObjectName(u'layoutWidget')
self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget)
@ -41,20 +42,20 @@ class Ui_SongUsageDeleteDialog(object):
QtGui.QCalendarWidget.NoVerticalHeader)
self.DeleteCalendar.setObjectName(u'DeleteCalendar')
self.verticalLayout.addWidget(self.DeleteCalendar)
self.buttonBox = QtGui.QDialogButtonBox(AuditDeleteDialog)
self.buttonBox = QtGui.QDialogButtonBox(SongUsageDeleteDialog)
self.buttonBox.setGeometry(QtCore.QRect(30, 210, 245, 25))
self.buttonBox.setStandardButtons(
QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(u'buttonBox')
self.retranslateUi(AuditDeleteDialog)
self.retranslateUi(SongUsageDeleteDialog)
QtCore.QObject.connect(
self.buttonBox, QtCore.SIGNAL(u'accepted()'),
AuditDeleteDialog.accept)
SongUsageDeleteDialog.accept)
QtCore.QObject.connect(
self.buttonBox, QtCore.SIGNAL(u'rejected()'),
AuditDeleteDialog.close)
QtCore.QMetaObject.connectSlotsByName(AuditDeleteDialog)
SongUsageDeleteDialog.close)
QtCore.QMetaObject.connectSlotsByName(SongUsageDeleteDialog)
def retranslateUi(self, AuditDeleteDialog):
AuditDeleteDialog.setWindowTitle(self.trUtf8('Song Usage Delete'))
def retranslateUi(self, SongUsageDeleteDialog):
SongUsageDeleteDialog.setWindowTitle(translate('AuditDeleteDialog', 'Song Usage Delete'))

View File

@ -24,14 +24,15 @@
###############################################################################
from PyQt4 import QtCore, QtGui
from openlp.core.lib import translate
class Ui_SongUsageDetailDialog(object):
def setupUi(self, AuditDetailDialog):
AuditDetailDialog.setObjectName(u'AuditDetailDialog')
AuditDetailDialog.resize(609, 413)
self.verticalLayout = QtGui.QVBoxLayout(AuditDetailDialog)
def setupUi(self, SongUsageDetailDialog):
SongUsageDetailDialog.setObjectName(u'SongUsageDetailDialog')
SongUsageDetailDialog.resize(609, 413)
self.verticalLayout = QtGui.QVBoxLayout(SongUsageDetailDialog)
self.verticalLayout.setObjectName(u'verticalLayout')
self.DateRangeGroupBox = QtGui.QGroupBox(AuditDetailDialog)
self.DateRangeGroupBox = QtGui.QGroupBox(SongUsageDetailDialog)
self.DateRangeGroupBox.setObjectName(u'DateRangeGroupBox')
self.verticalLayout_2 = QtGui.QVBoxLayout(self.DateRangeGroupBox)
self.verticalLayout_2.setObjectName(u'verticalLayout_2')
@ -68,25 +69,25 @@ class Ui_SongUsageDetailDialog(object):
self.verticalLayout_4.addLayout(self.horizontalLayout)
self.verticalLayout_2.addWidget(self.FileGroupBox)
self.verticalLayout.addWidget(self.DateRangeGroupBox)
self.buttonBox = QtGui.QDialogButtonBox(AuditDetailDialog)
self.buttonBox = QtGui.QDialogButtonBox(SongUsageDetailDialog)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName(u'buttonBox')
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(AuditDetailDialog)
self.retranslateUi(SongUsageDetailDialog)
QtCore.QObject.connect(self.buttonBox,
QtCore.SIGNAL(u'accepted()'),
AuditDetailDialog.accept)
SongUsageDetailDialog.accept)
QtCore.QObject.connect(self.buttonBox,
QtCore.SIGNAL(u'rejected()'),
AuditDetailDialog.close)
SongUsageDetailDialog.close)
QtCore.QObject.connect(self.SaveFilePushButton,
QtCore.SIGNAL(u'pressed()'),
AuditDetailDialog.defineOutputLocation)
QtCore.QMetaObject.connectSlotsByName(AuditDetailDialog)
SongUsageDetailDialog.defineOutputLocation)
QtCore.QMetaObject.connectSlotsByName(SongUsageDetailDialog)
def retranslateUi(self, AuditDetailDialog):
AuditDetailDialog.setWindowTitle(self.trUtf8('Song Usage Extraction'))
self.DateRangeGroupBox.setTitle(self.trUtf8('Select Date Range'))
self.ToLabel.setText(self.trUtf8('to'))
self.FileGroupBox.setTitle(self.trUtf8('Report Location'))
def retranslateUi(self, SongUsageDetailDialog):
SongUsageDetailDialog.setWindowTitle(translate('AuditDetailDialog', 'Song Usage Extraction'))
self.DateRangeGroupBox.setTitle(translate('AuditDetailDialog', 'Select Date Range'))
self.ToLabel.setText(translate('AuditDetailDialog', 'to'))
self.FileGroupBox.setTitle(translate('AuditDetailDialog', 'Report Location'))

BIN
resources/i18n/openlp_af.qm Normal file

Binary file not shown.

BIN
resources/i18n/openlp_de.qm Normal file

Binary file not shown.

BIN
resources/i18n/openlp_en.qm Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

BIN
resources/i18n/openlp_es.qm Normal file

Binary file not shown.

BIN
resources/i18n/openlp_hu.qm Normal file

Binary file not shown.

BIN
resources/i18n/openlp_ko.qm Normal file

Binary file not shown.

BIN
resources/i18n/openlp_nb.qm Normal file

Binary file not shown.

Binary file not shown.

BIN
resources/i18n/openlp_sv.qm Normal file

Binary file not shown.

170
scripts/translation_utils.py Executable file
View File

@ -0,0 +1,170 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=80 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# --------------------------------------------------------------------------- #
# Copyright (c) 2008-2010 Raoul Snyman #
# Portions copyright (c) 2008-2010 Tim Bentley, Jonathan Corwin, Michael #
# Gorven, Scott Guerrieri, Christian Richter, Maikel Stuivenberg, Martin #
# Thompson, Jon Tibble, Carsten Tinggaard #
# --------------------------------------------------------------------------- #
# This program is free software; you can redistribute it and/or modify it #
# under the terms of the GNU General Public License as published by the Free #
# Software Foundation; version 2 of the License. #
# #
# This program is distributed in the hope that it will be useful, but WITHOUT #
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or #
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for #
# more details. #
# #
# You should have received a copy of the GNU General Public License along #
# with this program; if not, write to the Free Software Foundation, Inc., 59 #
# Temple Place, Suite 330, Boston, MA 02111-1307 USA #
###############################################################################
# Short description
# Steps for creating languages:
# 1. make shure that the openlp_en.ts file exist
# 2. go to scripts folder and start:
# python translation_utils.py -a
###############################################################################
import os
from optparse import OptionParser
import urllib
from PyQt4 import QtCore
ignore_pathes = [u"./scripts", u"./openlp/core/test"]
ignore_files = [u"setup.py"]
translation_path = u"http://pootle.projecthq.biz/export/openlp/"
translations = [ u"en"
, u"af"
, u"en_ZA"
, u"en_GB"
, u"de"
, u"hu"
, u"ko"
, u"nb"
, u"pt_BR"
, u"es"
, u"sv"]
def write_file(filename, stringlist):
content = u''
for line in stringlist:
content = u'%s%s\n' % (content, line)
file = open(filename, u'w')
file.write(content.encode('utf8'))
file.close()
def main():
# Set up command line options.
usage = u'Usage: %prog [options]'
parser = OptionParser(usage=usage)
parser.add_option("-d", "--download-ts", action="store_true", dest="download",
help="Load languages from Pootle Server")
parser.add_option("-p", "--prepare", action="store_true", dest="prepare",
help="preparation (generate pro file)")
parser.add_option("-u", "--update", action="store_true", dest="update",
help="update translation files")
parser.add_option("-g", "--generate", action="store_true", dest="generate",
help="generate qm files")
parser.add_option("-a", "--all", action="store_true", dest="all",
help="proceed all options")
(options, args) = parser.parse_args()
if options.download:
downloadTranslations()
elif options.prepare:
preparation()
elif options.update:
update()
elif options.generate:
generate()
elif options.all:
all()
else:
pass
def downloadTranslations():
print "download()"
for language in translations:
filename = os.path.join(u'..',u'resources', u'i18n', u"openlp_%s.ts" % language)
print filename
page = urllib.urlopen(u"%s%s.ts" % (translation_path, language))
content = page.read().decode("utf8")
page.close()
file = open(filename, u'w')
file.write(content.encode('utf8'))
file.close()
def preparation():
stringlist = []
start_dir = os.path.join(u'..')
for root, dirs, files in os.walk(start_dir):
for file in files:
path = u"%s" % root
path = path.replace("\\","/")
path = path.replace("..",".")
if file.startswith(u'hook-') or file.startswith(u'test_'):
continue
cond = False
for search in ignore_pathes:
if path.startswith(search):
cond = True
if cond == True:
continue
cond = False
for search in ignore_files:
if search == file:
cond = True
if cond == True:
continue
if file.endswith(u'.py'):
line = u"%s/%s" % (path, file)
print u'Parsing "%s"' % line
stringlist.append(u"SOURCES += %s" % line)
elif file.endswith(u'.pyw'):
line = u"%s/%s" % (path, file)
print u'Parsing "%s"' % line
stringlist.append(u"SOURCES += %s" % line)
elif file.endswith(u'.ts'):
line = u"%s/%s" % (path, file)
print u'Parsing "%s"' % line
stringlist.append(u"TRANSLATIONS += %s" % line)
print u'Generating PRO file...',
stringlist.sort()
write_file(os.path.join(start_dir, u'openlp.pro'), stringlist)
print u'done.'
def update():
print "update()"
updateProcess = QtCore.QProcess()
updateProcess.start(u"pylupdate4 -noobsolete ../openlp.pro")
updateProcess.waitForFinished(60000)
def generate():
print "generate()"
generateProcess = QtCore.QProcess()
generateProcess.start(u"lrelease ../openlp.pro")
generateProcess.waitForFinished(60000)
def all():
print "all()"
downloadTranslations()
preparation()
update()
generate()
if __name__ == u'__main__':
if os.path.split(os.path.abspath(u'.'))[1] != u'scripts':
print u'You need to run this script from the scripts directory.'
else:
main()