forked from openlp/openlp
move translations from mediamanager to plugins with dict
This commit is contained in:
parent
fa328945d3
commit
d4cabf9693
@ -319,7 +319,7 @@ def expand_tags(text):
|
|||||||
from spelltextedit import SpellTextEdit
|
from spelltextedit import SpellTextEdit
|
||||||
from eventreceiver import Receiver
|
from eventreceiver import Receiver
|
||||||
from settingsmanager import SettingsManager
|
from settingsmanager import SettingsManager
|
||||||
from plugin import PluginStatus, Plugin
|
from plugin import PluginStatus, StringType, Plugin
|
||||||
from pluginmanager import PluginManager
|
from pluginmanager import PluginManager
|
||||||
from settingstab import SettingsTab
|
from settingstab import SettingsTab
|
||||||
from serviceitem import ServiceItem
|
from serviceitem import ServiceItem
|
||||||
|
@ -32,7 +32,8 @@ import os
|
|||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
from openlp.core.lib import context_menu_action, context_menu_separator, \
|
||||||
SettingsManager, OpenLPToolbar, ServiceItem, build_icon, translate
|
SettingsManager, OpenLPToolbar, ServiceItem, StringType, build_icon, \
|
||||||
|
translate
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@ -85,13 +86,14 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
log.info(u'Media Item loaded')
|
log.info(u'Media Item loaded')
|
||||||
|
|
||||||
def __init__(self, parent=None, icon=None, title=None):
|
def __init__(self, parent=None, icon=None, title=None, plugin=None):
|
||||||
"""
|
"""
|
||||||
Constructor to create the media manager item.
|
Constructor to create the media manager item.
|
||||||
"""
|
"""
|
||||||
QtGui.QWidget.__init__(self)
|
QtGui.QWidget.__init__(self)
|
||||||
self.parent = parent
|
self.parent = parent
|
||||||
self.settingsSection = parent.get_text('name_lower')
|
self.plugin = parent # rimach may changed
|
||||||
|
self.settingsSection = self.plugin.name_lower
|
||||||
if isinstance(icon, QtGui.QIcon):
|
if isinstance(icon, QtGui.QIcon):
|
||||||
self.icon = icon
|
self.icon = icon
|
||||||
elif isinstance(icon, basestring):
|
elif isinstance(icon, basestring):
|
||||||
@ -100,7 +102,8 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
else:
|
else:
|
||||||
self.icon = None
|
self.icon = None
|
||||||
if title:
|
if title:
|
||||||
self.title = parent.get_text('name_more')
|
nameString = self.plugin.getString(StringType.Name)
|
||||||
|
self.title = nameString[u'plural']
|
||||||
self.toolbar = None
|
self.toolbar = None
|
||||||
self.remoteTriggered = None
|
self.remoteTriggered = None
|
||||||
self.serviceItemIconName = None
|
self.serviceItemIconName = None
|
||||||
@ -200,57 +203,58 @@ class MediaManagerItem(QtGui.QWidget):
|
|||||||
"""
|
"""
|
||||||
## Import Button ##
|
## Import Button ##
|
||||||
if self.hasImportIcon:
|
if self.hasImportIcon:
|
||||||
|
importString = self.plugin.getString(StringType.Import)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Import %s')) %
|
importString[u'title'],
|
||||||
self.parent.name,
|
importString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('import')),
|
|
||||||
u':/general/general_import.png', self.onImportClick)
|
u':/general/general_import.png', self.onImportClick)
|
||||||
## File Button ##
|
## Load Button ##
|
||||||
if self.hasFileIcon:
|
if self.hasFileIcon:
|
||||||
|
loadString = self.plugin.getString(StringType.Load)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Load %s')) %
|
loadString[u'title'],
|
||||||
self.parent.name,
|
loadString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('load')),
|
|
||||||
u':/general/general_open.png', self.onFileClick)
|
u':/general/general_open.png', self.onFileClick)
|
||||||
## New Button ##
|
## New Button ## rimach
|
||||||
if self.hasNewIcon:
|
if self.hasNewIcon:
|
||||||
|
newString = self.plugin.getString(StringType.New)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'New %s')) %
|
newString[u'title'],
|
||||||
self.parent.name,
|
newString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('new')),
|
|
||||||
u':/general/general_new.png', self.onNewClick)
|
u':/general/general_new.png', self.onNewClick)
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
if self.hasEditIcon:
|
if self.hasEditIcon:
|
||||||
|
editString = self.plugin.getString(StringType.Edit)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Edit %s')) %
|
editString[u'title'],
|
||||||
self.parent.name,
|
editString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('edit')),
|
|
||||||
u':/general/general_edit.png', self.onEditClick)
|
u':/general/general_edit.png', self.onEditClick)
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
if self.hasDeleteIcon:
|
if self.hasDeleteIcon:
|
||||||
|
deleteString = self.plugin.getString(StringType.Delete)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Delete %s')) %
|
deleteString[u'title'],
|
||||||
self.parent.name,
|
deleteString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('delete')),
|
|
||||||
u':/general/general_delete.png', self.onDeleteClick)
|
u':/general/general_delete.png', self.onDeleteClick)
|
||||||
## Separator Line ##
|
## Separator Line ##
|
||||||
self.addToolbarSeparator()
|
self.addToolbarSeparator()
|
||||||
## Preview ##
|
## Preview ##
|
||||||
|
previewString = self.plugin.getString(StringType.Preview)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Preview %s')) %
|
previewString[u'title'],
|
||||||
self.parent.name,
|
previewString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('preview')),
|
|
||||||
u':/general/general_preview.png', self.onPreviewClick)
|
u':/general/general_preview.png', self.onPreviewClick)
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
|
liveString = self.plugin.getString(StringType.Live)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', u'Go Live')),
|
liveString[u'title'],
|
||||||
unicode(self.parent.get_text('live')),
|
liveString[u'tooltip'],
|
||||||
u':/general/general_live.png', self.onLiveClick)
|
u':/general/general_live.png', self.onLiveClick)
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
|
serviceString = self.plugin.getString(StringType.Service)
|
||||||
self.addToolbarButton(
|
self.addToolbarButton(
|
||||||
unicode(translate('OpenLP.MediaManagerItem', 'Add %s to Service')) %
|
serviceString[u'title'],
|
||||||
self.parent.name,
|
serviceString[u'tooltip'],
|
||||||
unicode(self.parent.get_text('service')),
|
|
||||||
u':/general/general_add.png', self.onAddClick)
|
u':/general/general_add.png', self.onAddClick)
|
||||||
|
|
||||||
def addListViewToToolBar(self):
|
def addListViewToToolBar(self):
|
||||||
|
@ -42,6 +42,17 @@ class PluginStatus(object):
|
|||||||
Inactive = 0
|
Inactive = 0
|
||||||
Disabled = -1
|
Disabled = -1
|
||||||
|
|
||||||
|
class StringType(object):
|
||||||
|
Name = u'name'
|
||||||
|
Import = u'import'
|
||||||
|
Load = u'load'
|
||||||
|
New = u'new'
|
||||||
|
Edit = u'edit'
|
||||||
|
Delete = u'delete'
|
||||||
|
Preview = u'preview'
|
||||||
|
Live = u'live'
|
||||||
|
Service = u'service'
|
||||||
|
|
||||||
class Plugin(QtCore.QObject):
|
class Plugin(QtCore.QObject):
|
||||||
"""
|
"""
|
||||||
Base class for openlp plugins to inherit from.
|
Base class for openlp plugins to inherit from.
|
||||||
@ -117,6 +128,7 @@ class Plugin(QtCore.QObject):
|
|||||||
"""
|
"""
|
||||||
QtCore.QObject.__init__(self)
|
QtCore.QObject.__init__(self)
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.set_plugin_strings()
|
||||||
if version:
|
if version:
|
||||||
self.version = version
|
self.version = version
|
||||||
self.settingsSection = self.name.lower()
|
self.settingsSection = self.name.lower()
|
||||||
@ -289,18 +301,19 @@ class Plugin(QtCore.QObject):
|
|||||||
The new name the plugin should now use.
|
The new name the plugin should now use.
|
||||||
"""
|
"""
|
||||||
pass
|
pass
|
||||||
def set_plugin_translations(self):
|
|
||||||
|
def getString(self, name):
|
||||||
|
if name in self.strings:
|
||||||
|
return self.strings[name]
|
||||||
|
else:
|
||||||
|
# do something here?
|
||||||
|
return None
|
||||||
|
|
||||||
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
pass
|
self.name = u'Plugin'
|
||||||
self.text = {}
|
self.name_lower = u'plugin'
|
||||||
|
|
||||||
def get_text(self, content):
|
self.strings = {}
|
||||||
"""
|
|
||||||
Called to retrieve a translated piece of text for menues, context menues, ...
|
|
||||||
"""
|
|
||||||
if self.text.has_key(content):
|
|
||||||
return self.text[content]
|
|
||||||
else:
|
|
||||||
return self.name
|
|
||||||
|
@ -61,7 +61,7 @@ class MediaDockManager(object):
|
|||||||
match = False
|
match = False
|
||||||
for dock_index in range(0, self.media_dock.count()):
|
for dock_index in range(0, self.media_dock.count()):
|
||||||
if self.media_dock.widget(dock_index).settingsSection == \
|
if self.media_dock.widget(dock_index).settingsSection == \
|
||||||
media_item.parent.get_text('name_lower'):
|
media_item.parent.name_lower:
|
||||||
match = True
|
match = True
|
||||||
break
|
break
|
||||||
if not match:
|
if not match:
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import PluginStatus, translate
|
from openlp.core.lib import PluginStatus, StringType, translate
|
||||||
from plugindialog import Ui_PluginViewDialog
|
from plugindialog import Ui_PluginViewDialog
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -75,7 +75,8 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
|||||||
elif plugin.status == PluginStatus.Disabled:
|
elif plugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(
|
status_text = unicode(
|
||||||
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
||||||
item.setText(status_text % plugin.get_text('name_more'))
|
nameString = plugin.getString(StringType.Name)
|
||||||
|
item.setText(status_text % nameString[u'plural'])
|
||||||
# If the plugin has an icon, set it!
|
# If the plugin has an icon, set it!
|
||||||
if plugin.icon:
|
if plugin.icon:
|
||||||
item.setIcon(plugin.icon)
|
item.setIcon(plugin.icon)
|
||||||
@ -106,7 +107,8 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
|||||||
plugin_name_more = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
plugin_name_more = self.pluginListWidget.currentItem().text().split(u' ')[0]
|
||||||
self.activePlugin = None
|
self.activePlugin = None
|
||||||
for plugin in self.parent.plugin_manager.plugins:
|
for plugin in self.parent.plugin_manager.plugins:
|
||||||
if plugin.get_text('name_more') == plugin_name_more:
|
nameString = plugin.getString(StringType.Name)
|
||||||
|
if nameString[u'plural'] == plugin_name_more:
|
||||||
self.activePlugin = plugin
|
self.activePlugin = plugin
|
||||||
break
|
break
|
||||||
if self.activePlugin:
|
if self.activePlugin:
|
||||||
@ -134,5 +136,6 @@ class PluginForm(QtGui.QDialog, Ui_PluginViewDialog):
|
|||||||
elif self.activePlugin.status == PluginStatus.Disabled:
|
elif self.activePlugin.status == PluginStatus.Disabled:
|
||||||
status_text = unicode(
|
status_text = unicode(
|
||||||
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
translate('OpenLP.PluginForm', '%s (Disabled)'))
|
||||||
|
nameString = self.activePlugin.getString(StringType.Name)
|
||||||
self.pluginListWidget.currentItem().setText(
|
self.pluginListWidget.currentItem().setText(
|
||||||
status_text % self.activePlugin.get_text('name_more'))
|
status_text % nameString[u'plural'])
|
||||||
|
@ -180,11 +180,15 @@ class SlideController(QtGui.QWidget):
|
|||||||
translate('OpenLP.SlideController', 'Hide'), self.Toolbar))
|
translate('OpenLP.SlideController', 'Hide'), self.Toolbar))
|
||||||
self.BlankScreen = QtGui.QAction(QtGui.QIcon(
|
self.BlankScreen = QtGui.QAction(QtGui.QIcon(
|
||||||
u':/slides/slide_blank.png'), u'Blank Screen', self.HideMenu)
|
u':/slides/slide_blank.png'), u'Blank Screen', self.HideMenu)
|
||||||
|
self.BlankScreen.setText(
|
||||||
|
translate('OpenLP.SlideController', 'Blank Screen'))
|
||||||
self.BlankScreen.setCheckable(True)
|
self.BlankScreen.setCheckable(True)
|
||||||
QtCore.QObject.connect(self.BlankScreen,
|
QtCore.QObject.connect(self.BlankScreen,
|
||||||
QtCore.SIGNAL("triggered(bool)"), self.onBlankDisplay)
|
QtCore.SIGNAL("triggered(bool)"), self.onBlankDisplay)
|
||||||
self.ThemeScreen = QtGui.QAction(QtGui.QIcon(
|
self.ThemeScreen = QtGui.QAction(QtGui.QIcon(
|
||||||
u':/slides/slide_theme.png'), u'Blank to Theme', self.HideMenu)
|
u':/slides/slide_theme.png'), u'Blank to Theme', self.HideMenu)
|
||||||
|
self.ThemeScreen.setText(
|
||||||
|
translate('OpenLP.SlideController', 'Blank to Theme'))
|
||||||
self.ThemeScreen.setCheckable(True)
|
self.ThemeScreen.setCheckable(True)
|
||||||
QtCore.QObject.connect(self.ThemeScreen,
|
QtCore.QObject.connect(self.ThemeScreen,
|
||||||
QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
|
QtCore.SIGNAL("triggered(bool)"), self.onThemeDisplay)
|
||||||
@ -192,6 +196,8 @@ class SlideController(QtGui.QWidget):
|
|||||||
self.DesktopScreen = QtGui.QAction(QtGui.QIcon(
|
self.DesktopScreen = QtGui.QAction(QtGui.QIcon(
|
||||||
u':/slides/slide_desktop.png'), u'Show Desktop',
|
u':/slides/slide_desktop.png'), u'Show Desktop',
|
||||||
self.HideMenu)
|
self.HideMenu)
|
||||||
|
self.DesktopScreen.setText(
|
||||||
|
translate('OpenLP.SlideController', 'Show Desktop'))
|
||||||
self.DesktopScreen.setCheckable(True)
|
self.DesktopScreen.setCheckable(True)
|
||||||
QtCore.QObject.connect(self.DesktopScreen,
|
QtCore.QObject.connect(self.DesktopScreen,
|
||||||
QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
|
QtCore.SIGNAL("triggered(bool)"), self.onHideDisplay)
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
|
from openlp.plugins.alerts.lib import AlertsManager, AlertsTab
|
||||||
from openlp.plugins.alerts.lib.db import init_schema
|
from openlp.plugins.alerts.lib.db import init_schema
|
||||||
@ -40,7 +40,7 @@ class AlertsPlugin(Plugin):
|
|||||||
log.info(u'Alerts Plugin loaded')
|
log.info(u'Alerts Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Alerts', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Alerts', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -3
|
self.weight = -3
|
||||||
self.icon = build_icon(u':/plugins/plugin_alerts.png')
|
self.icon = build_icon(u':/plugins/plugin_alerts.png')
|
||||||
@ -102,31 +102,16 @@ class AlertsPlugin(Plugin):
|
|||||||
'<br />The alert plugin controls the displaying of nursery alerts '
|
'<br />The alert plugin controls the displaying of nursery alerts '
|
||||||
'on the display screen')
|
'on the display screen')
|
||||||
return about_text
|
return about_text
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Alerts'
|
self.name = u'Alerts'
|
||||||
self.name_lower = u'alerts'
|
self.name_lower = u'alerts'
|
||||||
self.text = {}
|
|
||||||
# for context menu
|
self.strings = {}
|
||||||
# elf.text['context_edit'] = translate('AlertsPlugin', '&Edit Song')
|
# for names in mediamanagerdock and pluginlist
|
||||||
# elf.text['context_delete'] = translate('AlertsPlugin', '&Delete Song')
|
self.strings[StringType.Name] = {
|
||||||
# elf.text['context_preview'] = translate('AlertsPlugin', '&Preview Song')
|
u'singular': translate('AlertsPlugin', 'Alert'),
|
||||||
# elf.text['context_live'] = translate('AlertsPlugin', '&Show Live')
|
u'plural': translate('AlertsPlugin', 'Alerts')
|
||||||
# # forHeaders in mediamanagerdock
|
}
|
||||||
# elf.text['import'] = translate('AlertsPlugin', 'Import a Song')
|
|
||||||
# elf.text['file'] = translate('AlertsPlugin', 'Load a new Song')
|
|
||||||
# elf.text['new'] = translate('AlertsPlugin', 'Add a new Song')
|
|
||||||
# elf.text['edit'] = translate('AlertsPlugin', 'Edit the selected Song')
|
|
||||||
# elf.text['delete'] = translate('AlertsPlugin', 'Delete the selected Song')
|
|
||||||
# elf.text['delete_more'] = translate('AlertsPlugin', 'Delete the selected Songs')
|
|
||||||
# elf.text['preview'] = translate('AlertsPlugin', 'Preview the selected Song')
|
|
||||||
# elf.text['preview_more'] = translate('AlertsPlugin', 'Preview the selected Songs')
|
|
||||||
# elf.text['live'] = translate('AlertsPlugin', 'Send the selected Song live')
|
|
||||||
# elf.text['live_more'] = translate('AlertsPlugin', 'Send the selected Songs live')
|
|
||||||
# elf.text['service'] = translate('AlertsPlugin', 'Add the selected Song to the service')
|
|
||||||
# elf.text['service_more'] = translate('AlertsPlugin', 'Add the selected Songs to the service')
|
|
||||||
# # for names in mediamanagerdock and pluginlist
|
|
||||||
self.text['name'] = translate('AlertsPlugin', 'Alert')
|
|
||||||
self.text['name_more'] = translate('AlertsPlugin', 'Alerts')
|
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -37,7 +37,7 @@ class BiblePlugin(Plugin):
|
|||||||
log.info(u'Bible Plugin loaded')
|
log.info(u'Bible Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Bibles', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Bibles', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -9
|
self.weight = -9
|
||||||
self.icon_path = u':/plugins/plugin_bibles.png'
|
self.icon_path = u':/plugins/plugin_bibles.png'
|
||||||
@ -117,31 +117,54 @@ class BiblePlugin(Plugin):
|
|||||||
The new name the plugin should now use.
|
The new name the plugin should now use.
|
||||||
"""
|
"""
|
||||||
self.settings_tab.bible_theme = newTheme
|
self.settings_tab.bible_theme = newTheme
|
||||||
def set_plugin_translations(self):
|
|
||||||
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Bibles'
|
self.name = u'Bibles'
|
||||||
self.name_lower = u'bibles'
|
self.name_lower = u'Bibles'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('BiblesPlugin', '&Edit Bible')
|
|
||||||
self.text['context_delete'] = translate('BiblesPlugin', '&Delete Bible')
|
|
||||||
self.text['context_preview'] = translate('BiblesPlugin', '&Preview Bible')
|
|
||||||
self.text['context_live'] = translate('BiblesPlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('BiblesPlugin', 'Import a Bible')
|
|
||||||
self.text['load'] = translate('BiblesPlugin', 'Load a new Bible')
|
|
||||||
self.text['new'] = translate('BiblesPlugin', 'Add a new Bible')
|
|
||||||
self.text['edit'] = translate('BiblesPlugin', 'Edit the selected Bible')
|
|
||||||
self.text['delete'] = translate('BiblesPlugin', 'Delete the selected Bible')
|
|
||||||
self.text['delete_more'] = translate('BiblesPlugin', 'Delete the selected Bibles')
|
|
||||||
self.text['preview'] = translate('BiblesPlugin', 'Preview the selected Bible')
|
|
||||||
self.text['preview_more'] = translate('BiblesPlugin', 'Preview the selected Bibles')
|
|
||||||
self.text['live'] = translate('BiblesPlugin', 'Send the selected Bible live')
|
|
||||||
self.text['live_more'] = translate('BiblesPlugin', 'Send the selected Bibles live')
|
|
||||||
self.text['service'] = translate('BiblesPlugin', 'Add the selected Verse to the service')
|
|
||||||
self.text['service_more'] = translate('BiblesPlugin', 'Add the selected Verses to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('BiblesPlugin', 'Bible')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('BiblesPlugin', 'Bibles')
|
u'singular': translate('BiblesPlugin', 'Bible'),
|
||||||
|
u'plural': translate('BiblesPlugin', 'Bibles')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## Import Button ##
|
||||||
|
self.strings[StringType.Import] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Import'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Import a Bible')
|
||||||
|
}
|
||||||
|
## New Button ##
|
||||||
|
self.strings[StringType.New] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Add'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
|
||||||
|
}
|
||||||
|
## Edit Button ##
|
||||||
|
self.strings[StringType.Edit] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Edit'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Live'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Send the selected Bible live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('BiblesPlugin', 'Service'),
|
||||||
|
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
|
||||||
|
}
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from forms import EditCustomForm
|
from forms import EditCustomForm
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
|
from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
|
||||||
from openlp.plugins.custom.lib.db import CustomSlide, init_schema
|
from openlp.plugins.custom.lib.db import CustomSlide, init_schema
|
||||||
@ -40,14 +40,14 @@ class CustomPlugin(Plugin):
|
|||||||
This plugin enables the user to create, edit and display
|
This plugin enables the user to create, edit and display
|
||||||
custom slide shows. Custom shows are divided into slides.
|
custom slide shows. Custom shows are divided into slides.
|
||||||
Each show is able to have it's own theme.
|
Each show is able to have it's own theme.
|
||||||
Custom shows are designed to replace the use of songs where
|
Custom shows are designed to replace the use of Customs where
|
||||||
the songs plugin has become restrictive. Examples could be
|
the Customs plugin has become restrictive. Examples could be
|
||||||
Welcome slides, Bible Reading information, Orders of service.
|
Welcome slides, Bible Reading information, Orders of service.
|
||||||
"""
|
"""
|
||||||
log.info(u'Custom Plugin loaded')
|
log.info(u'Custom Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Custom', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Custom', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -5
|
self.weight = -5
|
||||||
self.custommanager = Manager(u'custom', init_schema)
|
self.custommanager = Manager(u'custom', init_schema)
|
||||||
@ -66,7 +66,7 @@ class CustomPlugin(Plugin):
|
|||||||
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
about_text = translate('CustomPlugin', '<strong>Custom Plugin</strong>'
|
||||||
'<br />The custom plugin provides the ability to set up custom '
|
'<br />The custom plugin provides the ability to set up custom '
|
||||||
'text slides that can be displayed on the screen the same way '
|
'text slides that can be displayed on the screen the same way '
|
||||||
'songs are. This plugin provides greater freedom over the songs '
|
'Customs are. This plugin provides greater freedom over the Customs '
|
||||||
'plugin.')
|
'plugin.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
@ -97,31 +97,58 @@ class CustomPlugin(Plugin):
|
|||||||
for custom in customsUsingTheme:
|
for custom in customsUsingTheme:
|
||||||
custom.theme_name = newTheme
|
custom.theme_name = newTheme
|
||||||
self.custommanager.save_object(custom)
|
self.custommanager.save_object(custom)
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Custom'
|
self.name = u'Custom'
|
||||||
self.name_lower = u'custom'
|
self.name_lower = u'custom'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('CustomsPlugin', '&Edit Custom')
|
|
||||||
self.text['context_delete'] = translate('CustomsPlugin', '&Delete Custom')
|
|
||||||
self.text['context_preview'] = translate('CustomsPlugin', '&Preview Custom')
|
|
||||||
self.text['context_live'] = translate('CustomsPlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('CustomsPlugin', 'Import a Custom')
|
|
||||||
self.text['load'] = translate('CustomsPlugin', 'Load a new Custom')
|
|
||||||
self.text['new'] = translate('CustomsPlugin', 'Add a new Custom')
|
|
||||||
self.text['edit'] = translate('CustomsPlugin', 'Edit the selected Custom')
|
|
||||||
self.text['delete'] = translate('CustomsPlugin', 'Delete the selected Custom')
|
|
||||||
self.text['delete_more'] = translate('CustomsPlugin', 'Delete the selected Custom')
|
|
||||||
self.text['preview'] = translate('CustomsPlugin', 'Preview the selected Custom')
|
|
||||||
self.text['preview_more'] = translate('CustomsPlugin', 'Preview the selected Custom')
|
|
||||||
self.text['live'] = translate('CustomsPlugin', 'Send the selected Custom live')
|
|
||||||
self.text['live_more'] = translate('CustomsPlugin', 'Send the selected Custom live')
|
|
||||||
self.text['service'] = translate('CustomsPlugin', 'Add the selected Custom to the service')
|
|
||||||
self.text['service_more'] = translate('CustomsPlugin', 'Add the selected Custom to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('CustomsPlugin', 'Custom')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('CustomsPlugin', 'Custom')
|
u'singular': translate('CustomsPlugin', 'Custom'),
|
||||||
|
u'plural': translate('CustomsPlugin', 'Customs')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## Import Button ##
|
||||||
|
self.strings[StringType.Import] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Import'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Import a Custom')
|
||||||
|
}
|
||||||
|
## Load Button ##
|
||||||
|
self.strings[StringType.Load] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Load'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Load a new Custom')
|
||||||
|
}
|
||||||
|
## New Button ##
|
||||||
|
self.strings[StringType.New] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Add'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Add a new Custom')
|
||||||
|
}
|
||||||
|
## Edit Button ##
|
||||||
|
self.strings[StringType.Edit] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Edit'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Edit the selected Custom')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Delete the selected Custom')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Preview the selected Custom')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Live'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Send the selected Custom live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('CustomsPlugin', 'Service'),
|
||||||
|
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
|
||||||
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.plugins.images.lib import ImageMediaItem
|
from openlp.plugins.images.lib import ImageMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -35,7 +35,7 @@ class ImagePlugin(Plugin):
|
|||||||
log.info(u'Image Plugin loaded')
|
log.info(u'Image Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Images', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Images', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -7
|
self.weight = -7
|
||||||
self.icon_path = u':/plugins/plugin_images.png'
|
self.icon_path = u':/plugins/plugin_images.png'
|
||||||
@ -54,36 +54,58 @@ class ImagePlugin(Plugin):
|
|||||||
'make use of OpenLP\'s "timed looping" feature to create a slide '
|
'make use of OpenLP\'s "timed looping" feature to create a slide '
|
||||||
'show that runs automatically. In addition to this, images from '
|
'show that runs automatically. In addition to this, images from '
|
||||||
'the plugin can be used to override the current theme\'s '
|
'the plugin can be used to override the current theme\'s '
|
||||||
'background, which renders text-based items like songs with the '
|
'background, which renders text-based items like Images with the '
|
||||||
'selected image as a background instead of the background '
|
'selected image as a background instead of the background '
|
||||||
'provided by the theme.')
|
'provided by the theme.')
|
||||||
return about_text
|
return about_text
|
||||||
# rimach
|
# rimach
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Images'
|
self.name = u'Images'
|
||||||
self.name_lower = u'images'
|
self.name_lower = u'images'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('ImagePlugin', '&Edit Image')
|
|
||||||
self.text['context_delete'] = translate('ImagePlugin', '&Delete Image')
|
|
||||||
self.text['context_preview'] = translate('ImagePlugin', '&Preview Image')
|
|
||||||
self.text['context_live'] = translate('ImagePlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('ImagePlugin', 'Import a Image')
|
|
||||||
self.text['load'] = translate('ImagePlugin', 'Load a new Image')
|
|
||||||
self.text['new'] = translate('ImagePlugin', 'Add a new Image')
|
|
||||||
self.text['edit'] = translate('ImagePlugin', 'Edit the selected Image')
|
|
||||||
self.text['delete'] = translate('ImagePlugin', 'Delete the selected Image')
|
|
||||||
self.text['delete_more'] = translate('ImagePlugin', 'Delete the selected Images')
|
|
||||||
self.text['preview'] = translate('ImagePlugin', 'Preview the selected Image')
|
|
||||||
self.text['preview_more'] = translate('ImagePlugin', 'Preview the selected Images')
|
|
||||||
self.text['live'] = translate('ImagePlugin', 'Send the selected Image live')
|
|
||||||
self.text['live_more'] = translate('ImagePlugin', 'Send the selected Images live')
|
|
||||||
self.text['service'] = translate('ImagePlugin', 'Add the selected Image to the service')
|
|
||||||
self.text['service_more'] = translate('ImagePlugin', 'Add the selected Images to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('ImagePlugin', 'Image')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('ImagePlugin', 'Images')
|
u'singular': translate('ImagePlugin', 'Image'),
|
||||||
|
u'plural': translate('ImagePlugin', 'Images')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## Load Button ##
|
||||||
|
self.strings[StringType.Load] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Load'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Load a new Image')
|
||||||
|
}
|
||||||
|
## New Button ##
|
||||||
|
self.strings[StringType.New] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Add'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Add a new Image')
|
||||||
|
}
|
||||||
|
## Edit Button ##
|
||||||
|
self.strings[StringType.Edit] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Edit'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Edit the selected Image')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Delete the selected Image')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Preview the selected Image')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Live'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Send the selected Image live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('ImagePlugin', 'Service'),
|
||||||
|
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
|
||||||
|
}
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4.phonon import Phonon
|
from PyQt4.phonon import Phonon
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.plugins.media.lib import MediaMediaItem
|
from openlp.plugins.media.lib import MediaMediaItem
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -37,7 +37,7 @@ class MediaPlugin(Plugin):
|
|||||||
log.info(u'%s MediaPlugin loaded', __name__)
|
log.info(u'%s MediaPlugin loaded', __name__)
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Media', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Media', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -6
|
self.weight = -6
|
||||||
self.icon_path = u':/plugins/plugin_media.png'
|
self.icon_path = u':/plugins/plugin_media.png'
|
||||||
@ -77,31 +77,53 @@ class MediaPlugin(Plugin):
|
|||||||
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
about_text = translate('MediaPlugin', '<strong>Media Plugin</strong>'
|
||||||
'<br />The media plugin provides playback of audio and video.')
|
'<br />The media plugin provides playback of audio and video.')
|
||||||
return about_text
|
return about_text
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Media'
|
self.name = u'Media'
|
||||||
self.name_lower = u'media'
|
self.name_lower = u'media'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('MediaPlugin', '&Edit Media')
|
|
||||||
self.text['context_delete'] = translate('MediaPlugin', '&Delete Media')
|
|
||||||
self.text['context_preview'] = translate('MediaPlugin', '&Preview Media')
|
|
||||||
self.text['context_live'] = translate('MediaPlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('MediaPlugin', 'Import a Media')
|
|
||||||
self.text['load'] = translate('MediaPlugin', 'Load a new Media')
|
|
||||||
self.text['new'] = translate('MediaPlugin', 'Add a new Media')
|
|
||||||
self.text['edit'] = translate('MediaPlugin', 'Edit the selected Media')
|
|
||||||
self.text['delete'] = translate('MediaPlugin', 'Delete the selected Media')
|
|
||||||
self.text['delete_more'] = translate('MediaPlugin', 'Delete the selected Media')
|
|
||||||
self.text['preview'] = translate('MediaPlugin', 'Preview the selected Media')
|
|
||||||
self.text['preview_more'] = translate('MediaPlugin', 'Preview the selected Media')
|
|
||||||
self.text['live'] = translate('MediaPlugin', 'Send the selected Media live')
|
|
||||||
self.text['live_more'] = translate('MediaPlugin', 'Send the selected Media live')
|
|
||||||
self.text['service'] = translate('MediaPlugin', 'Add the selected Media to the service')
|
|
||||||
self.text['service_more'] = translate('MediaPlugin', 'Add the selected Media to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('MediaPlugin', 'Media')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('MediaPlugin', 'Media')
|
u'singular': translate('MediaPlugin', 'Media'),
|
||||||
|
u'plural': translate('MediaPlugin', 'Medias')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## Load Button ##
|
||||||
|
self.strings[StringType.Load] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Load'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Load a new Media')
|
||||||
|
}
|
||||||
|
## New Button ##
|
||||||
|
self.strings[StringType.New] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Add'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Add a new Media')
|
||||||
|
}
|
||||||
|
## Edit Button ##
|
||||||
|
self.strings[StringType.Edit] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Edit'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Edit the selected Media')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Delete the selected Media')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Preview the selected Media')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Live'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Send the selected Media live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('MediaPlugin', 'Service'),
|
||||||
|
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
|
||||||
|
}
|
||||||
|
@ -30,7 +30,7 @@ presentations from a variety of document formats.
|
|||||||
import os
|
import os
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.core.utils import AppLocation
|
from openlp.core.utils import AppLocation
|
||||||
from openlp.plugins.presentations.lib import PresentationController, \
|
from openlp.plugins.presentations.lib import PresentationController, \
|
||||||
PresentationMediaItem, PresentationTab
|
PresentationMediaItem, PresentationTab
|
||||||
@ -51,7 +51,7 @@ class PresentationPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'Initialised')
|
log.debug(u'Initialised')
|
||||||
self.controllers = {}
|
self.controllers = {}
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Presentations', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Presentations', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -8
|
self.weight = -8
|
||||||
self.icon_path = u':/plugins/plugin_presentations.png'
|
self.icon_path = u':/plugins/plugin_presentations.png'
|
||||||
@ -144,31 +144,44 @@ class PresentationPlugin(Plugin):
|
|||||||
'programs. The choice of available presentation programs is '
|
'programs. The choice of available presentation programs is '
|
||||||
'available to the user in a drop down box.')
|
'available to the user in a drop down box.')
|
||||||
return about_text
|
return about_text
|
||||||
def set_plugin_translations(self):
|
|
||||||
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Presentations'
|
self.name = u'Presentations'
|
||||||
self.name_lower = u'presentations'
|
self.name_lower = u'presentations'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('PresentationPlugin', '&Edit Presentation')
|
|
||||||
self.text['context_delete'] = translate('PresentationPlugin', '&Delete Presentation')
|
|
||||||
self.text['context_preview'] = translate('PresentationPlugin', '&Preview Presentation')
|
|
||||||
self.text['context_live'] = translate('PresentationPlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('PresentationPlugin', 'Import a Presentation')
|
|
||||||
self.text['load'] = translate('PresentationPlugin', 'Load a new Presentation')
|
|
||||||
self.text['new'] = translate('PresentationPlugin', 'Add a new Presentation')
|
|
||||||
self.text['edit'] = translate('PresentationPlugin', 'Edit the selected Presentation')
|
|
||||||
self.text['delete'] = translate('PresentationPlugin', 'Delete the selected Presentation')
|
|
||||||
self.text['delete_more'] = translate('PresentationPlugin', 'Delete the selected Presentations')
|
|
||||||
self.text['preview'] = translate('PresentationPlugin', 'Preview the selected Presentation')
|
|
||||||
self.text['preview_more'] = translate('PresentationPlugin', 'Preview the selected Presentations')
|
|
||||||
self.text['live'] = translate('PresentationPlugin', 'Send the selected Presentation live')
|
|
||||||
self.text['live_more'] = translate('PresentationPlugin', 'Send the selected Presentations live')
|
|
||||||
self.text['service'] = translate('PresentationPlugin', 'Add the selected Presentation to the service')
|
|
||||||
self.text['service_more'] = translate('PresentationPlugin', 'Add the selected Presentations to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('PresentationPlugin', 'Presentation')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('PresentationPlugin', 'Presentations')
|
u'singular': translate('PresentationPlugin', 'Presentation'),
|
||||||
|
u'plural': translate('PresentationPlugin', 'Presentations')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## Load Button ##
|
||||||
|
self.strings[StringType.Load] = {
|
||||||
|
u'title': translate('PresentationPlugin', 'Load'),
|
||||||
|
u'tooltip': translate('PresentationPlugin', 'Load a new Presentation')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('PresentationPlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('PresentationPlugin', 'Delete the selected Presentation')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('PresentationPlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('PresentationPlugin', 'Preview the selected Presentation')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('PresentationPlugin', 'Live'),
|
||||||
|
u'tooltip': translate('PresentationPlugin', 'Send the selected Presentation live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('PresentationPlugin', 'Service'),
|
||||||
|
u'tooltip': translate('PresentationPlugin', 'Add the selected Presentation to the service')
|
||||||
|
}
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, translate, build_icon
|
from openlp.core.lib import Plugin, StringType, translate, build_icon
|
||||||
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
from openlp.plugins.remotes.lib import RemoteTab, HttpServer
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@ -38,7 +38,7 @@ class RemotesPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
remotes constructor
|
remotes constructor
|
||||||
"""
|
"""
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Remotes', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Remotes', u'1.9.2', plugin_helpers)
|
||||||
self.icon = build_icon(u':/plugins/plugin_remote.png')
|
self.icon = build_icon(u':/plugins/plugin_remote.png')
|
||||||
self.weight = -1
|
self.weight = -1
|
||||||
@ -77,32 +77,17 @@ class RemotesPlugin(Plugin):
|
|||||||
'a running version of OpenLP on a different computer via a web '
|
'a running version of OpenLP on a different computer via a web '
|
||||||
'browser or through the remote API.')
|
'browser or through the remote API.')
|
||||||
return about_text
|
return about_text
|
||||||
# rimach
|
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Remotes'
|
self.name = u'Remotes'
|
||||||
self.name_lower = u'remotes'
|
self.name_lower = u'remotes'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
# self.text['context_edit'] = translate('RemotePlugin', '&Edit Remotes')
|
# for names in mediamanagerdock and pluginlist
|
||||||
# self.text['context_delete'] = translate('RemotePlugin', '&Delete Remotes')
|
self.strings[StringType.Name] = {
|
||||||
# self.text['context_preview'] = translate('RemotePlugin', '&Preview Remotes')
|
u'singular': translate('RemotePlugin', 'Remote'),
|
||||||
# self.text['context_live'] = translate('RemotePlugin', '&Show Live')
|
u'plural': translate('RemotePlugin', 'Remotes')
|
||||||
# # forHeaders in mediamanagerdock
|
}
|
||||||
# self.text['import'] = translate('RemotePlugin', 'Import a Remotes')
|
|
||||||
# self.text['file'] = translate('RemotePlugin', 'Load a new Remotes')
|
|
||||||
# self.text['new'] = translate('RemotePlugin', 'Add a new Remotes')
|
|
||||||
# self.text['edit'] = translate('RemotePlugin', 'Edit the selected Remotes')
|
|
||||||
# self.text['delete'] = translate('RemotePlugin', 'Delete the selected Remotes')
|
|
||||||
# self.text['delete_more'] = translate('RemotePlugin', 'Delete the selected Remotes')
|
|
||||||
# self.text['preview'] = translate('RemotePlugin', 'Preview the selected Remotes')
|
|
||||||
# self.text['preview_more'] = translate('RemotePlugin', 'Preview the selected Remotes')
|
|
||||||
# self.text['live'] = translate('RemotePlugin', 'Send the selected Remotes live')
|
|
||||||
# self.text['live_more'] = translate('RemotePlugin', 'Send the selected Remotes live')
|
|
||||||
# self.text['service'] = translate('RemotePlugin', 'Add the selected Remotes to the service')
|
|
||||||
# self.text['service_more'] = translate('RemotePlugin', 'Add the selected Remotes to the service')
|
|
||||||
# # for names in mediamanagerdock and pluginlist
|
|
||||||
self.text['name'] = translate('RemotePlugin', 'Remote')
|
|
||||||
self.text['name_more'] = translate('RemotePlugin', 'Remotes')
|
|
||||||
|
@ -28,7 +28,7 @@ import logging
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.songs.lib import SongMediaItem, SongsTab
|
from openlp.plugins.songs.lib import SongMediaItem, SongsTab
|
||||||
from openlp.plugins.songs.lib.db import init_schema, Song
|
from openlp.plugins.songs.lib.db import init_schema, Song
|
||||||
@ -50,7 +50,7 @@ class SongsPlugin(Plugin):
|
|||||||
"""
|
"""
|
||||||
Create and set up the Songs plugin.
|
Create and set up the Songs plugin.
|
||||||
"""
|
"""
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'Songs', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'Songs', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -10
|
self.weight = -10
|
||||||
self.manager = Manager(u'songs', init_schema)
|
self.manager = Manager(u'songs', init_schema)
|
||||||
@ -148,31 +148,49 @@ class SongsPlugin(Plugin):
|
|||||||
importer = class_(self.manager, **kwargs)
|
importer = class_(self.manager, **kwargs)
|
||||||
importer.register(self.mediaItem.import_wizard)
|
importer.register(self.mediaItem.import_wizard)
|
||||||
return importer
|
return importer
|
||||||
def set_plugin_translations(self):
|
|
||||||
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'Songs'
|
self.name = u'Songs'
|
||||||
self.name_lower = u'songs'
|
self.name_lower = u'songs'
|
||||||
self.text = {}
|
|
||||||
#for context menu
|
self.strings = {}
|
||||||
self.text['context_edit'] = translate('SongsPlugin', '&Edit Song')
|
|
||||||
self.text['context_delete'] = translate('SongsPlugin', '&Delete Song')
|
|
||||||
self.text['context_preview'] = translate('SongsPlugin', '&Preview Song')
|
|
||||||
self.text['context_live'] = translate('SongsPlugin', '&Show Live')
|
|
||||||
# forHeaders in mediamanagerdock
|
|
||||||
self.text['import'] = translate('SongsPlugin', 'Import a Song')
|
|
||||||
self.text['load'] = translate('SongsPlugin', 'Load a new Song')
|
|
||||||
self.text['new'] = translate('SongsPlugin', 'Add a new Song')
|
|
||||||
self.text['edit'] = translate('SongsPlugin', 'Edit the selected Song')
|
|
||||||
self.text['delete'] = translate('SongsPlugin', 'Delete the selected Song')
|
|
||||||
self.text['delete_more'] = translate('SongsPlugin', 'Delete the selected Songs')
|
|
||||||
self.text['preview'] = translate('SongsPlugin', 'Preview the selected Song')
|
|
||||||
self.text['preview_more'] = translate('SongsPlugin', 'Preview the selected Songs')
|
|
||||||
self.text['live'] = translate('SongsPlugin', 'Send the selected Song live')
|
|
||||||
self.text['live_more'] = translate('SongsPlugin', 'Send the selected Songs live')
|
|
||||||
self.text['service'] = translate('SongsPlugin', 'Add the selected Song to the service')
|
|
||||||
self.text['service_more'] = translate('SongsPlugin', 'Add the selected Songs to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('SongsPlugin', 'Song')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('SongsPlugin', 'Songs')
|
u'singular': translate('SongsPlugin', 'Song'),
|
||||||
|
u'plural': translate('SongsPlugin', 'Songs')
|
||||||
|
}
|
||||||
|
|
||||||
|
# Middle Header Bar
|
||||||
|
## New Button ##
|
||||||
|
self.strings[StringType.New] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Add'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Add a new Song')
|
||||||
|
}
|
||||||
|
## Edit Button ##
|
||||||
|
self.strings[StringType.Edit] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Edit'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Edit the selected Song')
|
||||||
|
}
|
||||||
|
## Delete Button ##
|
||||||
|
self.strings[StringType.Delete] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Delete'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Delete the selected Song')
|
||||||
|
}
|
||||||
|
## Preview ##
|
||||||
|
self.strings[StringType.Preview] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Preview'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Preview the selected Song')
|
||||||
|
}
|
||||||
|
## Live Button ##
|
||||||
|
self.strings[StringType.Live] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Live'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Send the selected Song live')
|
||||||
|
}
|
||||||
|
## Add to service Button ##
|
||||||
|
self.strings[StringType.Service] = {
|
||||||
|
u'title': translate('SongsPlugin', 'Service'),
|
||||||
|
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
|
||||||
|
}
|
||||||
|
@ -29,7 +29,7 @@ from datetime import datetime
|
|||||||
|
|
||||||
from PyQt4 import QtCore, QtGui
|
from PyQt4 import QtCore, QtGui
|
||||||
|
|
||||||
from openlp.core.lib import Plugin, Receiver, build_icon, translate
|
from openlp.core.lib import Plugin, StringType, Receiver, build_icon, translate
|
||||||
from openlp.core.lib.db import Manager
|
from openlp.core.lib.db import Manager
|
||||||
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
from openlp.plugins.songusage.forms import SongUsageDetailForm, \
|
||||||
SongUsageDeleteForm
|
SongUsageDeleteForm
|
||||||
@ -41,7 +41,7 @@ class SongUsagePlugin(Plugin):
|
|||||||
log.info(u'SongUsage Plugin loaded')
|
log.info(u'SongUsage Plugin loaded')
|
||||||
|
|
||||||
def __init__(self, plugin_helpers):
|
def __init__(self, plugin_helpers):
|
||||||
self.set_plugin_translations()
|
self.set_plugin_strings()
|
||||||
Plugin.__init__(self, u'SongUsage', u'1.9.2', plugin_helpers)
|
Plugin.__init__(self, u'SongUsage', u'1.9.2', plugin_helpers)
|
||||||
self.weight = -4
|
self.weight = -4
|
||||||
self.icon = build_icon(u':/plugins/plugin_songusage.png')
|
self.icon = build_icon(u':/plugins/plugin_songusage.png')
|
||||||
@ -164,31 +164,16 @@ class SongUsagePlugin(Plugin):
|
|||||||
'services.')
|
'services.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def set_plugin_translations(self):
|
def set_plugin_strings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
self.name = u'SongUsage'
|
self.name = u'SongUsage'
|
||||||
self.name_lower = u'songusage'
|
self.name_lower = u'songusage'
|
||||||
self.text = {}
|
|
||||||
# #for context menu
|
self.strings = {}
|
||||||
# self.text['context_edit'] = translate('SongUsagePlugin', '&Edit SongUsage')
|
|
||||||
# self.text['context_delete'] = translate('SongUsagePlugin', '&Delete SongUsage')
|
|
||||||
# self.text['context_preview'] = translate('SongUsagePlugin', '&Preview SongUsage')
|
|
||||||
# self.text['context_live'] = translate('SongUsagePlugin', '&Show Live')
|
|
||||||
# # forHeaders in mediamanagerdock
|
|
||||||
# self.text['import'] = translate('SongUsagePlugin', 'Import a SongUsage')
|
|
||||||
# self.text['file'] = translate('SongUsagePlugin', 'Load a new SongUsage')
|
|
||||||
# self.text['new'] = translate('SongUsagePlugin', 'Add a new SongUsage')
|
|
||||||
# self.text['edit'] = translate('SongUsagePlugin', 'Edit the selected SongUsage')
|
|
||||||
# self.text['delete'] = translate('SongUsagePlugin', 'Delete the selected SongUsage')
|
|
||||||
# self.text['delete_more'] = translate('SongUsagePlugin', 'Delete the selected Songs')
|
|
||||||
# self.text['preview'] = translate('SongUsagePlugin', 'Preview the selected SongUsage')
|
|
||||||
# self.text['preview_more'] = translate('SongUsagePlugin', 'Preview the selected Songs')
|
|
||||||
# self.text['live'] = translate('SongUsagePlugin', 'Send the selected SongUsage live')
|
|
||||||
# self.text['live_more'] = translate('SongUsagePlugin', 'Send the selected Songs live')
|
|
||||||
# self.text['service'] = translate('SongUsagePlugin', 'Add the selected SongUsage to the service')
|
|
||||||
# self.text['service_more'] = translate('SongUsagePlugin', 'Add the selected Songs to the service')
|
|
||||||
# for names in mediamanagerdock and pluginlist
|
# for names in mediamanagerdock and pluginlist
|
||||||
self.text['name'] = translate('SongUsagePlugin', 'SongUsage')
|
self.strings[StringType.Name] = {
|
||||||
self.text['name_more'] = translate('SongUsagePlugin', 'Songs')
|
u'singular': translate('SongUsagePlugin', 'SongUsage'),
|
||||||
|
u'plural': translate('SongUsagePlugin', 'SongUsage')
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
0
resources/images/about-new.bmp
Executable file → Normal file
0
resources/images/about-new.bmp
Executable file → Normal file
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
Loading…
Reference in New Issue
Block a user