forked from openlp/openlp
replace self.text_strings with self.textStrings, fix doc string
This commit is contained in:
parent
1c48bfab67
commit
f869e0d979
@ -129,7 +129,7 @@ class Plugin(QtCore.QObject):
|
||||
"""
|
||||
QtCore.QObject.__init__(self)
|
||||
self.name = name
|
||||
self.text_strings = {}
|
||||
self.textStrings = {}
|
||||
self.setPluginTextStrings()
|
||||
if version:
|
||||
self.version = version
|
||||
@ -308,10 +308,10 @@ class Plugin(QtCore.QObject):
|
||||
"""
|
||||
encapsulate access of plugins translated text strings
|
||||
"""
|
||||
return self.text_strings[name]
|
||||
return self.textStrings[name]
|
||||
|
||||
def setPluginTextStrings(self):
|
||||
"""
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
pass
|
||||
pass
|
@ -35,8 +35,11 @@ class SettingsTab(QtGui.QWidget):
|
||||
"""
|
||||
Constructor to create the Settings tab item.
|
||||
|
||||
``plugin``
|
||||
The related plugin of the tab, which holds the content of the plugin.
|
||||
``title``
|
||||
The title of the tab, which is used internally for the tab handling.
|
||||
|
||||
``visible_title``
|
||||
The title of the tab, which is usually displayed on the tab.
|
||||
"""
|
||||
QtGui.QWidget.__init__(self)
|
||||
self.tabTitle = title
|
||||
|
@ -107,12 +107,12 @@ class AlertsPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('AlertsPlugin', 'Alert'),
|
||||
u'plural': translate('AlertsPlugin', 'Alerts')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('AlertsPlugin', 'Alerts')
|
||||
}
|
||||
|
||||
|
@ -121,54 +121,54 @@ class BiblePlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('BiblesPlugin', 'Bible'),
|
||||
u'plural': translate('BiblesPlugin', 'Bibles')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('BiblesPlugin', 'Bibles')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Import Button ##
|
||||
self.text_strings[StringContent.Import] = {
|
||||
self.textStrings[StringContent.Import] = {
|
||||
u'title': translate('BiblesPlugin', 'Import'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Import a Bible')
|
||||
}
|
||||
## New Button ##
|
||||
self.text_strings[StringContent.New] = {
|
||||
self.textStrings[StringContent.New] = {
|
||||
u'title': translate('BiblesPlugin', 'Add'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Add a new Bible')
|
||||
}
|
||||
## Edit Button ##
|
||||
self.text_strings[StringContent.Edit] = {
|
||||
self.textStrings[StringContent.Edit] = {
|
||||
u'title': translate('BiblesPlugin', 'Edit'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Edit the selected Bible')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('BiblesPlugin', 'Delete'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Delete the selected Bible')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('BiblesPlugin', 'Preview'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Preview the selected Bible')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('BiblesPlugin', 'Live'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Send the selected Bible live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('BiblesPlugin', 'Service'),
|
||||
u'tooltip': translate('BiblesPlugin',
|
||||
'Add the selected Bible to the service')
|
||||
}
|
||||
}
|
@ -103,60 +103,60 @@ class CustomPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('CustomsPlugin', 'Custom'),
|
||||
u'plural': translate('CustomsPlugin', 'Customs')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('CustomsPlugin', 'Customs')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Import Button ##
|
||||
self.text_strings[StringContent.Import] = {
|
||||
self.textStrings[StringContent.Import] = {
|
||||
u'title': translate('CustomsPlugin', 'Import'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Import a Custom')
|
||||
}
|
||||
## Load Button ##
|
||||
self.text_strings[StringContent.Load] = {
|
||||
self.textStrings[StringContent.Load] = {
|
||||
u'title': translate('CustomsPlugin', 'Load'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Load a new Custom')
|
||||
}
|
||||
## New Button ##
|
||||
self.text_strings[StringContent.New] = {
|
||||
self.textStrings[StringContent.New] = {
|
||||
u'title': translate('CustomsPlugin', 'Add'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Add a new Custom')
|
||||
}
|
||||
## Edit Button ##
|
||||
self.text_strings[StringContent.Edit] = {
|
||||
self.textStrings[StringContent.Edit] = {
|
||||
u'title': translate('CustomsPlugin', 'Edit'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Edit the selected Custom')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('CustomsPlugin', 'Delete'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Delete the selected Custom')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('CustomsPlugin', 'Preview'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Preview the selected Custom')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('CustomsPlugin', 'Live'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Send the selected Custom live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('CustomsPlugin', 'Service'),
|
||||
u'tooltip': translate('CustomsPlugin',
|
||||
'Add the selected Custom to the service')
|
||||
}
|
||||
}
|
@ -63,54 +63,54 @@ class ImagePlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('ImagePlugin', 'Image'),
|
||||
u'plural': translate('ImagePlugin', 'Images')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('ImagePlugin', 'Images')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
self.text_strings[StringContent.Load] = {
|
||||
self.textStrings[StringContent.Load] = {
|
||||
u'title': translate('ImagePlugin', 'Load'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Load a new Image')
|
||||
}
|
||||
## New Button ##
|
||||
self.text_strings[StringContent.New] = {
|
||||
self.textStrings[StringContent.New] = {
|
||||
u'title': translate('ImagePlugin', 'Add'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Add a new Image')
|
||||
}
|
||||
## Edit Button ##
|
||||
self.text_strings[StringContent.Edit] = {
|
||||
self.textStrings[StringContent.Edit] = {
|
||||
u'title': translate('ImagePlugin', 'Edit'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Edit the selected Image')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('ImagePlugin', 'Delete'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Delete the selected Image')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('ImagePlugin', 'Preview'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Preview the selected Image')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('ImagePlugin', 'Live'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Send the selected Image live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('ImagePlugin', 'Service'),
|
||||
u'tooltip': translate('ImagePlugin',
|
||||
'Add the selected Image to the service')
|
||||
}
|
||||
}
|
@ -82,54 +82,54 @@ class MediaPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('MediaPlugin', 'Media'),
|
||||
u'plural': translate('MediaPlugin', 'Media')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('MediaPlugin', 'Media')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
self.text_strings[StringContent.Load] = {
|
||||
self.textStrings[StringContent.Load] = {
|
||||
u'title': translate('MediaPlugin', 'Load'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Load a new Media')
|
||||
}
|
||||
## New Button ##
|
||||
self.text_strings[StringContent.New] = {
|
||||
self.textStrings[StringContent.New] = {
|
||||
u'title': translate('MediaPlugin', 'Add'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Add a new Media')
|
||||
}
|
||||
## Edit Button ##
|
||||
self.text_strings[StringContent.Edit] = {
|
||||
self.textStrings[StringContent.Edit] = {
|
||||
u'title': translate('MediaPlugin', 'Edit'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Edit the selected Media')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('MediaPlugin', 'Delete'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Delete the selected Media')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('MediaPlugin', 'Preview'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Preview the selected Media')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('MediaPlugin', 'Live'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Send the selected Media live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('MediaPlugin', 'Service'),
|
||||
u'tooltip': translate('MediaPlugin',
|
||||
'Add the selected Media to the service')
|
||||
}
|
||||
}
|
@ -150,42 +150,42 @@ class PresentationPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('PresentationPlugin', 'Presentation'),
|
||||
u'plural': translate('PresentationPlugin', 'Presentations')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('PresentationPlugin', 'Presentations')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## Load Button ##
|
||||
self.text_strings[StringContent.Load] = {
|
||||
self.textStrings[StringContent.Load] = {
|
||||
u'title': translate('PresentationPlugin', 'Load'),
|
||||
u'tooltip': translate('PresentationPlugin',
|
||||
'Load a new Presentation')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('PresentationPlugin', 'Delete'),
|
||||
u'tooltip': translate('PresentationPlugin',
|
||||
'Delete the selected Presentation')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('PresentationPlugin', 'Preview'),
|
||||
u'tooltip': translate('PresentationPlugin',
|
||||
'Preview the selected Presentation')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('PresentationPlugin', 'Live'),
|
||||
u'tooltip': translate('PresentationPlugin',
|
||||
'Send the selected Presentation live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('PresentationPlugin', 'Service'),
|
||||
u'tooltip': translate('PresentationPlugin',
|
||||
'Add the selected Presentation to the service')
|
||||
}
|
||||
}
|
@ -83,11 +83,11 @@ class RemotesPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('RemotePlugin', 'Remote'),
|
||||
u'plural': translate('RemotePlugin', 'Remotes')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('RemotePlugin', 'Remotes')
|
||||
}
|
||||
}
|
@ -154,48 +154,48 @@ class SongsPlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('SongsPlugin', 'Song'),
|
||||
u'plural': translate('SongsPlugin', 'Songs')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('SongsPlugin', 'Songs')
|
||||
}
|
||||
# Middle Header Bar
|
||||
## New Button ##
|
||||
self.text_strings[StringContent.New] = {
|
||||
self.textStrings[StringContent.New] = {
|
||||
u'title': translate('SongsPlugin', 'Add'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Add a new Song')
|
||||
}
|
||||
## Edit Button ##
|
||||
self.text_strings[StringContent.Edit] = {
|
||||
self.textStrings[StringContent.Edit] = {
|
||||
u'title': translate('SongsPlugin', 'Edit'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Edit the selected Song')
|
||||
}
|
||||
## Delete Button ##
|
||||
self.text_strings[StringContent.Delete] = {
|
||||
self.textStrings[StringContent.Delete] = {
|
||||
u'title': translate('SongsPlugin', 'Delete'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Delete the selected Song')
|
||||
}
|
||||
## Preview ##
|
||||
self.text_strings[StringContent.Preview] = {
|
||||
self.textStrings[StringContent.Preview] = {
|
||||
u'title': translate('SongsPlugin', 'Preview'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Preview the selected Song')
|
||||
}
|
||||
## Live Button ##
|
||||
self.text_strings[StringContent.Live] = {
|
||||
self.textStrings[StringContent.Live] = {
|
||||
u'title': translate('SongsPlugin', 'Live'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Send the selected Song live')
|
||||
}
|
||||
## Add to service Button ##
|
||||
self.text_strings[StringContent.Service] = {
|
||||
self.textStrings[StringContent.Service] = {
|
||||
u'title': translate('SongsPlugin', 'Service'),
|
||||
u'tooltip': translate('SongsPlugin',
|
||||
'Add the selected Song to the service')
|
||||
}
|
||||
}
|
@ -168,11 +168,11 @@ class SongUsagePlugin(Plugin):
|
||||
Called to define all translatable texts of the plugin
|
||||
"""
|
||||
## Name PluginList ##
|
||||
self.text_strings[StringContent.Name] = {
|
||||
self.textStrings[StringContent.Name] = {
|
||||
u'singular': translate('SongUsagePlugin', 'SongUsage'),
|
||||
u'plural': translate('SongUsagePlugin', 'SongUsage')
|
||||
}
|
||||
## Name for MediaDockManager, SettingsManager ##
|
||||
self.text_strings[StringContent.VisibleName] = {
|
||||
self.textStrings[StringContent.VisibleName] = {
|
||||
u'title': translate('SongUsagePlugin', 'SongUsage')
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user