add missing newlines, simplify getString function, wrap long lines

This commit is contained in:
rimach 2010-09-29 23:06:59 +02:00
parent 3eaf7a0738
commit ec16298908
11 changed files with 98 additions and 56 deletions

View File

@ -305,13 +305,13 @@ class Plugin(QtCore.QObject):
pass
def getString(self, name):
if name in self.text_strings:
return self.text_strings[name]
else:
# do something here?
return None
"""
encapsulate access of plugins translated text strings
"""
return self.text_strings[name]
def setPluginTextStrings(self):
"""
Called to define all translatable texts of the plugin
"""
"""

View File

@ -79,7 +79,8 @@ class SettingsForm(QtGui.QDialog, Ui_SettingsDialog):
log.debug(u'remove %s tab' % tab.tabTitleVisible)
for tabIndex in range(0, self.settingsTabWidget.count()):
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)
def accept(self):

View File

@ -114,4 +114,5 @@ class AlertsPlugin(Plugin):
## Name for MediaDockManager, SettingsManager ##
self.text_strings[StringContent.VisibleName] = {
u'title': translate('AlertsPlugin', 'Alerts')
}
}

View File

@ -135,35 +135,42 @@ class BiblePlugin(Plugin):
## Import Button ##
self.text_strings[StringContent.Import] = {
u'title': translate('BiblesPlugin', 'Import'),
u'tooltip': translate('BiblesPlugin', 'Import a Bible')
u'tooltip': translate('BiblesPlugin',
'Import a Bible')
}
## New Button ##
self.text_strings[StringContent.New] = {
u'title': translate('BiblesPlugin', 'Add'),
u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
u'tooltip': translate('BiblesPlugin',
'Add a new Bible')
}
## Edit Button ##
self.text_strings[StringContent.Edit] = {
u'title': translate('BiblesPlugin', 'Edit'),
u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
u'tooltip': translate('BiblesPlugin',
'Edit the selected Bible')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('BiblesPlugin', 'Delete'),
u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
u'tooltip': translate('BiblesPlugin',
'Delete the selected Bible')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('BiblesPlugin', 'Preview'),
u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
u'tooltip': translate('BiblesPlugin',
'Preview the selected Bible')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -115,40 +115,48 @@ class CustomPlugin(Plugin):
## Import Button ##
self.text_strings[StringContent.Import] = {
u'title': translate('CustomsPlugin', 'Import'),
u'tooltip': translate('CustomsPlugin', 'Import a Custom')
u'tooltip': translate('CustomsPlugin',
'Import a Custom')
}
## Load Button ##
self.text_strings[StringContent.Load] = {
u'title': translate('CustomsPlugin', 'Load'),
u'tooltip': translate('CustomsPlugin', 'Load a new Custom')
u'tooltip': translate('CustomsPlugin',
'Load a new Custom')
}
## New Button ##
self.text_strings[StringContent.New] = {
u'title': translate('CustomsPlugin', 'Add'),
u'tooltip': translate('CustomsPlugin', 'Add a new Custom')
u'tooltip': translate('CustomsPlugin',
'Add a new Custom')
}
## Edit Button ##
self.text_strings[StringContent.Edit] = {
u'title': translate('CustomsPlugin', 'Edit'),
u'tooltip': translate('CustomsPlugin', 'Edit the selected Custom')
u'tooltip': translate('CustomsPlugin',
'Edit the selected Custom')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('CustomsPlugin', 'Delete'),
u'tooltip': translate('CustomsPlugin', 'Delete the selected Custom')
u'tooltip': translate('CustomsPlugin',
'Delete the selected Custom')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('CustomsPlugin', 'Preview'),
u'tooltip': translate('CustomsPlugin', 'Preview the selected Custom')
u'tooltip': translate('CustomsPlugin',
'Preview the selected Custom')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -75,35 +75,42 @@ class ImagePlugin(Plugin):
## Load Button ##
self.text_strings[StringContent.Load] = {
u'title': translate('ImagePlugin', 'Load'),
u'tooltip': translate('ImagePlugin', 'Load a new Image')
u'tooltip': translate('ImagePlugin',
'Load a new Image')
}
## New Button ##
self.text_strings[StringContent.New] = {
u'title': translate('ImagePlugin', 'Add'),
u'tooltip': translate('ImagePlugin', 'Add a new Image')
u'tooltip': translate('ImagePlugin',
'Add a new Image')
}
## Edit Button ##
self.text_strings[StringContent.Edit] = {
u'title': translate('ImagePlugin', 'Edit'),
u'tooltip': translate('ImagePlugin', 'Edit the selected Image')
u'tooltip': translate('ImagePlugin',
'Edit the selected Image')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('ImagePlugin', 'Delete'),
u'tooltip': translate('ImagePlugin', 'Delete the selected Image')
u'tooltip': translate('ImagePlugin',
'Delete the selected Image')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('ImagePlugin', 'Preview'),
u'tooltip': translate('ImagePlugin', 'Preview the selected Image')
u'tooltip': translate('ImagePlugin',
'Preview the selected Image')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -94,35 +94,42 @@ class MediaPlugin(Plugin):
## Load Button ##
self.text_strings[StringContent.Load] = {
u'title': translate('MediaPlugin', 'Load'),
u'tooltip': translate('MediaPlugin', 'Load a new Media')
u'tooltip': translate('MediaPlugin',
'Load a new Media')
}
## New Button ##
self.text_strings[StringContent.New] = {
u'title': translate('MediaPlugin', 'Add'),
u'tooltip': translate('MediaPlugin', 'Add a new Media')
u'tooltip': translate('MediaPlugin',
'Add a new Media')
}
## Edit Button ##
self.text_strings[StringContent.Edit] = {
u'title': translate('MediaPlugin', 'Edit'),
u'tooltip': translate('MediaPlugin', 'Edit the selected Media')
u'tooltip': translate('MediaPlugin',
'Edit the selected Media')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('MediaPlugin', 'Delete'),
u'tooltip': translate('MediaPlugin', 'Delete the selected Media')
u'tooltip': translate('MediaPlugin',
'Delete the selected Media')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('MediaPlugin', 'Preview'),
u'tooltip': translate('MediaPlugin', 'Preview the selected Media')
u'tooltip': translate('MediaPlugin',
'Preview the selected Media')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -162,25 +162,30 @@ class PresentationPlugin(Plugin):
## Load Button ##
self.text_strings[StringContent.Load] = {
u'title': translate('PresentationPlugin', 'Load'),
u'tooltip': translate('PresentationPlugin', 'Load a new Presentation')
u'tooltip': translate('PresentationPlugin',
'Load a new Presentation')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('PresentationPlugin', 'Delete'),
u'tooltip': translate('PresentationPlugin', 'Delete the selected Presentation')
u'tooltip': translate('PresentationPlugin',
'Delete the selected Presentation')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('PresentationPlugin', 'Preview'),
u'tooltip': translate('PresentationPlugin', 'Preview the selected Presentation')
u'tooltip': translate('PresentationPlugin',
'Preview the selected Presentation')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -90,4 +90,4 @@ class RemotesPlugin(Plugin):
## Name for MediaDockManager, SettingsManager ##
self.text_strings[StringContent.VisibleName] = {
u'title': translate('RemotePlugin', 'Remotes')
}
}

View File

@ -166,30 +166,36 @@ class SongsPlugin(Plugin):
## New Button ##
self.text_strings[StringContent.New] = {
u'title': translate('SongsPlugin', 'Add'),
u'tooltip': translate('SongsPlugin', 'Add a new Song')
u'tooltip': translate('SongsPlugin',
'Add a new Song')
}
## Edit Button ##
self.text_strings[StringContent.Edit] = {
u'title': translate('SongsPlugin', 'Edit'),
u'tooltip': translate('SongsPlugin', 'Edit the selected Song')
u'tooltip': translate('SongsPlugin',
'Edit the selected Song')
}
## Delete Button ##
self.text_strings[StringContent.Delete] = {
u'title': translate('SongsPlugin', 'Delete'),
u'tooltip': translate('SongsPlugin', 'Delete the selected Song')
u'tooltip': translate('SongsPlugin',
'Delete the selected Song')
}
## Preview ##
self.text_strings[StringContent.Preview] = {
u'title': translate('SongsPlugin', 'Preview'),
u'tooltip': translate('SongsPlugin', 'Preview the selected Song')
u'tooltip': translate('SongsPlugin',
'Preview the selected Song')
}
## Live Button ##
self.text_strings[StringContent.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 ##
self.text_strings[StringContent.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')
}

View File

@ -175,4 +175,4 @@ class SongUsagePlugin(Plugin):
## Name for MediaDockManager, SettingsManager ##
self.text_strings[StringContent.VisibleName] = {
u'title': translate('SongUsagePlugin', 'SongUsage')
}
}