forked from openlp/openlp
add missing newlines, simplify getString function, wrap long lines
This commit is contained in:
parent
3eaf7a0738
commit
ec16298908
@ -305,13 +305,13 @@ class Plugin(QtCore.QObject):
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
def getString(self, name):
|
def getString(self, name):
|
||||||
if name in self.text_strings:
|
"""
|
||||||
return self.text_strings[name]
|
encapsulate access of plugins translated text strings
|
||||||
else:
|
"""
|
||||||
# do something here?
|
return self.text_strings[name]
|
||||||
return None
|
|
||||||
|
|
||||||
def setPluginTextStrings(self):
|
def setPluginTextStrings(self):
|
||||||
"""
|
"""
|
||||||
Called to define all translatable texts of the plugin
|
Called to define all translatable texts of the plugin
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
@ -79,7 +79,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
|
|||||||
log.debug(u'remove %s tab' % tab.tabTitleVisible)
|
log.debug(u'remove %s tab' % tab.tabTitleVisible)
|
||||||
for tabIndex in range(0, self.settingsTabWidget.count()):
|
for tabIndex in range(0, self.settingsTabWidget.count()):
|
||||||
if self.settingsTabWidget.widget(tabIndex):
|
if self.settingsTabWidget.widget(tabIndex):
|
||||||
if self.settingsTabWidget.widget(tabIndex).tabTitleVisible == tab.tabTitleVisible:
|
if self.settingsTabWidget.widget(tabIndex).tabTitleVisible == \
|
||||||
|
tab.tabTitleVisible:
|
||||||
self.settingsTabWidget.removeTab(tabIndex)
|
self.settingsTabWidget.removeTab(tabIndex)
|
||||||
|
|
||||||
def accept(self):
|
def accept(self):
|
||||||
|
@ -114,4 +114,5 @@ class AlertsPlugin(Plugin):
|
|||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.text_strings[StringContent.VisibleName] = {
|
self.text_strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('AlertsPlugin', 'Alerts')
|
u'title': translate('AlertsPlugin', 'Alerts')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -135,35 +135,42 @@ class BiblePlugin(Plugin):
|
|||||||
## Import Button ##
|
## Import Button ##
|
||||||
self.text_strings[StringContent.Import] = {
|
self.text_strings[StringContent.Import] = {
|
||||||
u'title': translate('BiblesPlugin', 'Import'),
|
u'title': translate('BiblesPlugin', 'Import'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Import a Bible')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Import a Bible')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.text_strings[StringContent.New] = {
|
self.text_strings[StringContent.New] = {
|
||||||
u'title': translate('BiblesPlugin', 'Add'),
|
u'title': translate('BiblesPlugin', 'Add'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Add a new Bible')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.text_strings[StringContent.Edit] = {
|
self.text_strings[StringContent.Edit] = {
|
||||||
u'title': translate('BiblesPlugin', 'Edit'),
|
u'title': translate('BiblesPlugin', 'Edit'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Edit the selected Bible')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('BiblesPlugin', 'Delete'),
|
u'title': translate('BiblesPlugin', 'Delete'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Delete the selected Bible')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('BiblesPlugin', 'Preview'),
|
u'title': translate('BiblesPlugin', 'Preview'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Preview the selected Bible')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('BiblesPlugin', 'Live'),
|
u'title': translate('BiblesPlugin', 'Live'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Send the selected Bible live')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
|
'Send the selected Bible live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('BiblesPlugin', 'Service'),
|
u'title': translate('BiblesPlugin', 'Service'),
|
||||||
u'tooltip': translate('BiblesPlugin', 'Add the selected Bible to the service')
|
u'tooltip': translate('BiblesPlugin',
|
||||||
}
|
'Add the selected Bible to the service')
|
||||||
|
}
|
||||||
|
@ -115,40 +115,48 @@ class CustomPlugin(Plugin):
|
|||||||
## Import Button ##
|
## Import Button ##
|
||||||
self.text_strings[StringContent.Import] = {
|
self.text_strings[StringContent.Import] = {
|
||||||
u'title': translate('CustomsPlugin', 'Import'),
|
u'title': translate('CustomsPlugin', 'Import'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Import a Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Import a Custom')
|
||||||
}
|
}
|
||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.text_strings[StringContent.Load] = {
|
self.text_strings[StringContent.Load] = {
|
||||||
u'title': translate('CustomsPlugin', 'Load'),
|
u'title': translate('CustomsPlugin', 'Load'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Load a new Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Load a new Custom')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.text_strings[StringContent.New] = {
|
self.text_strings[StringContent.New] = {
|
||||||
u'title': translate('CustomsPlugin', 'Add'),
|
u'title': translate('CustomsPlugin', 'Add'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Add a new Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Add a new Custom')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.text_strings[StringContent.Edit] = {
|
self.text_strings[StringContent.Edit] = {
|
||||||
u'title': translate('CustomsPlugin', 'Edit'),
|
u'title': translate('CustomsPlugin', 'Edit'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Edit the selected Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Edit the selected Custom')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('CustomsPlugin', 'Delete'),
|
u'title': translate('CustomsPlugin', 'Delete'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Delete the selected Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Delete the selected Custom')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('CustomsPlugin', 'Preview'),
|
u'title': translate('CustomsPlugin', 'Preview'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Preview the selected Custom')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Preview the selected Custom')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('CustomsPlugin', 'Live'),
|
u'title': translate('CustomsPlugin', 'Live'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Send the selected Custom live')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
|
'Send the selected Custom live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('CustomsPlugin', 'Service'),
|
u'title': translate('CustomsPlugin', 'Service'),
|
||||||
u'tooltip': translate('CustomsPlugin', 'Add the selected Custom to the service')
|
u'tooltip': translate('CustomsPlugin',
|
||||||
}
|
'Add the selected Custom to the service')
|
||||||
|
}
|
||||||
|
@ -75,35 +75,42 @@ class ImagePlugin(Plugin):
|
|||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.text_strings[StringContent.Load] = {
|
self.text_strings[StringContent.Load] = {
|
||||||
u'title': translate('ImagePlugin', 'Load'),
|
u'title': translate('ImagePlugin', 'Load'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Load a new Image')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Load a new Image')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.text_strings[StringContent.New] = {
|
self.text_strings[StringContent.New] = {
|
||||||
u'title': translate('ImagePlugin', 'Add'),
|
u'title': translate('ImagePlugin', 'Add'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Add a new Image')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Add a new Image')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.text_strings[StringContent.Edit] = {
|
self.text_strings[StringContent.Edit] = {
|
||||||
u'title': translate('ImagePlugin', 'Edit'),
|
u'title': translate('ImagePlugin', 'Edit'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Edit the selected Image')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Edit the selected Image')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('ImagePlugin', 'Delete'),
|
u'title': translate('ImagePlugin', 'Delete'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Delete the selected Image')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Delete the selected Image')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('ImagePlugin', 'Preview'),
|
u'title': translate('ImagePlugin', 'Preview'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Preview the selected Image')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Preview the selected Image')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('ImagePlugin', 'Live'),
|
u'title': translate('ImagePlugin', 'Live'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Send the selected Image live')
|
u'tooltip': translate('ImagePlugin',
|
||||||
|
'Send the selected Image live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('ImagePlugin', 'Service'),
|
u'title': translate('ImagePlugin', 'Service'),
|
||||||
u'tooltip': translate('ImagePlugin', 'Add the selected Image to the service')
|
u'tooltip': translate('ImagePlugin',
|
||||||
}
|
'Add the selected Image to the service')
|
||||||
|
}
|
||||||
|
@ -94,35 +94,42 @@ class MediaPlugin(Plugin):
|
|||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.text_strings[StringContent.Load] = {
|
self.text_strings[StringContent.Load] = {
|
||||||
u'title': translate('MediaPlugin', 'Load'),
|
u'title': translate('MediaPlugin', 'Load'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Load a new Media')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Load a new Media')
|
||||||
}
|
}
|
||||||
## New Button ##
|
## New Button ##
|
||||||
self.text_strings[StringContent.New] = {
|
self.text_strings[StringContent.New] = {
|
||||||
u'title': translate('MediaPlugin', 'Add'),
|
u'title': translate('MediaPlugin', 'Add'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Add a new Media')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Add a new Media')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.text_strings[StringContent.Edit] = {
|
self.text_strings[StringContent.Edit] = {
|
||||||
u'title': translate('MediaPlugin', 'Edit'),
|
u'title': translate('MediaPlugin', 'Edit'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Edit the selected Media')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Edit the selected Media')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('MediaPlugin', 'Delete'),
|
u'title': translate('MediaPlugin', 'Delete'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Delete the selected Media')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Delete the selected Media')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('MediaPlugin', 'Preview'),
|
u'title': translate('MediaPlugin', 'Preview'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Preview the selected Media')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Preview the selected Media')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('MediaPlugin', 'Live'),
|
u'title': translate('MediaPlugin', 'Live'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Send the selected Media live')
|
u'tooltip': translate('MediaPlugin',
|
||||||
|
'Send the selected Media live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('MediaPlugin', 'Service'),
|
u'title': translate('MediaPlugin', 'Service'),
|
||||||
u'tooltip': translate('MediaPlugin', 'Add the selected Media to the service')
|
u'tooltip': translate('MediaPlugin',
|
||||||
}
|
'Add the selected Media to the service')
|
||||||
|
}
|
||||||
|
@ -162,25 +162,30 @@ class PresentationPlugin(Plugin):
|
|||||||
## Load Button ##
|
## Load Button ##
|
||||||
self.text_strings[StringContent.Load] = {
|
self.text_strings[StringContent.Load] = {
|
||||||
u'title': translate('PresentationPlugin', 'Load'),
|
u'title': translate('PresentationPlugin', 'Load'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Load a new Presentation')
|
u'tooltip': translate('PresentationPlugin',
|
||||||
|
'Load a new Presentation')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('PresentationPlugin', 'Delete'),
|
u'title': translate('PresentationPlugin', 'Delete'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Delete the selected Presentation')
|
u'tooltip': translate('PresentationPlugin',
|
||||||
|
'Delete the selected Presentation')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('PresentationPlugin', 'Preview'),
|
u'title': translate('PresentationPlugin', 'Preview'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Preview the selected Presentation')
|
u'tooltip': translate('PresentationPlugin',
|
||||||
|
'Preview the selected Presentation')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('PresentationPlugin', 'Live'),
|
u'title': translate('PresentationPlugin', 'Live'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Send the selected Presentation live')
|
u'tooltip': translate('PresentationPlugin',
|
||||||
|
'Send the selected Presentation live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('PresentationPlugin', 'Service'),
|
u'title': translate('PresentationPlugin', 'Service'),
|
||||||
u'tooltip': translate('PresentationPlugin', 'Add the selected Presentation to the service')
|
u'tooltip': translate('PresentationPlugin',
|
||||||
}
|
'Add the selected Presentation to the service')
|
||||||
|
}
|
||||||
|
@ -90,4 +90,4 @@ class RemotesPlugin(Plugin):
|
|||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.text_strings[StringContent.VisibleName] = {
|
self.text_strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('RemotePlugin', 'Remotes')
|
u'title': translate('RemotePlugin', 'Remotes')
|
||||||
}
|
}
|
||||||
|
@ -166,30 +166,36 @@ class SongsPlugin(Plugin):
|
|||||||
## New Button ##
|
## New Button ##
|
||||||
self.text_strings[StringContent.New] = {
|
self.text_strings[StringContent.New] = {
|
||||||
u'title': translate('SongsPlugin', 'Add'),
|
u'title': translate('SongsPlugin', 'Add'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Add a new Song')
|
u'tooltip': translate('SongsPlugin',
|
||||||
|
'Add a new Song')
|
||||||
}
|
}
|
||||||
## Edit Button ##
|
## Edit Button ##
|
||||||
self.text_strings[StringContent.Edit] = {
|
self.text_strings[StringContent.Edit] = {
|
||||||
u'title': translate('SongsPlugin', 'Edit'),
|
u'title': translate('SongsPlugin', 'Edit'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Edit the selected Song')
|
u'tooltip': translate('SongsPlugin',
|
||||||
|
'Edit the selected Song')
|
||||||
}
|
}
|
||||||
## Delete Button ##
|
## Delete Button ##
|
||||||
self.text_strings[StringContent.Delete] = {
|
self.text_strings[StringContent.Delete] = {
|
||||||
u'title': translate('SongsPlugin', 'Delete'),
|
u'title': translate('SongsPlugin', 'Delete'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Delete the selected Song')
|
u'tooltip': translate('SongsPlugin',
|
||||||
|
'Delete the selected Song')
|
||||||
}
|
}
|
||||||
## Preview ##
|
## Preview ##
|
||||||
self.text_strings[StringContent.Preview] = {
|
self.text_strings[StringContent.Preview] = {
|
||||||
u'title': translate('SongsPlugin', 'Preview'),
|
u'title': translate('SongsPlugin', 'Preview'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Preview the selected Song')
|
u'tooltip': translate('SongsPlugin',
|
||||||
|
'Preview the selected Song')
|
||||||
}
|
}
|
||||||
## Live Button ##
|
## Live Button ##
|
||||||
self.text_strings[StringContent.Live] = {
|
self.text_strings[StringContent.Live] = {
|
||||||
u'title': translate('SongsPlugin', 'Live'),
|
u'title': translate('SongsPlugin', 'Live'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Send the selected Song live')
|
u'tooltip': translate('SongsPlugin',
|
||||||
|
'Send the selected Song live')
|
||||||
}
|
}
|
||||||
## Add to service Button ##
|
## Add to service Button ##
|
||||||
self.text_strings[StringContent.Service] = {
|
self.text_strings[StringContent.Service] = {
|
||||||
u'title': translate('SongsPlugin', 'Service'),
|
u'title': translate('SongsPlugin', 'Service'),
|
||||||
u'tooltip': translate('SongsPlugin', 'Add the selected Song to the service')
|
u'tooltip': translate('SongsPlugin',
|
||||||
}
|
'Add the selected Song to the service')
|
||||||
|
}
|
||||||
|
@ -175,4 +175,4 @@ class SongUsagePlugin(Plugin):
|
|||||||
## Name for MediaDockManager, SettingsManager ##
|
## Name for MediaDockManager, SettingsManager ##
|
||||||
self.text_strings[StringContent.VisibleName] = {
|
self.text_strings[StringContent.VisibleName] = {
|
||||||
u'title': translate('SongUsagePlugin', 'SongUsage')
|
u'title': translate('SongUsagePlugin', 'SongUsage')
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user