← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~meths/openlp/trivialfixes into lp:openlp

 

Jon Tibble has proposed merging lp:~meths/openlp/trivialfixes into lp:openlp.

Requested reviews:
  OpenLP Core (openlp-core)

For more details, see:
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/49016

Dedupe translations - translators shouldn't have to keep translating the same stuff all over.

Started with the most common.  Would need to do the next round on regenerated ts files.  I'm not sure if this is what StringContent was originally intended for but it looks like that is something different now.
-- 
https://code.launchpad.net/~meths/openlp/trivialfixes/+merge/49016
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/trivialfixes into lp:openlp.
=== modified file 'openlp/core/lib/ui.py'
--- openlp/core/lib/ui.py	2011-02-08 19:31:55 +0000
+++ openlp/core/lib/ui.py	2011-02-09 05:11:20 +0000
@@ -34,6 +34,29 @@
 
 log = logging.getLogger(__name__)
 
+class UiStrings(object):
+    """
+    Provide standard strings for objects to use.
+    """
+    # These strings should need a good reason to be retranslated elsewhere.
+    # Should some/more/less of these have an & attached?
+    Add = translate('OpenLP.Ui', '&Add')
+    AllFiles = translate('OpenLP.Ui', 'All Files')
+    Authors = translate('OpenLP.Ui', 'Authors')
+    Delete = translate('OpenLP.Ui', '&Delete')
+    Edit = translate('OpenLP.Ui', '&Edit')
+    Error = translate('OpenLP.Ui', 'Error')
+    Import = translate('OpenLP.Ui', 'Import')
+    Live = translate('OpenLP.Ui', 'Live')
+    Load = translate('OpenLP.Ui', 'Load')
+    New = translate('OpenLP.Ui', 'New')
+    OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
+    Preview = translate('OpenLP.Ui', 'Preview')
+    Service = translate('OpenLP.Ui', 'Service')
+    Theme = translate('OpenLP.Ui', 'Theme')
+    Themes = translate('OpenLP.Ui', 'Themes')
+
+
 def add_welcome_page(parent, image):
     """
     Generate an opening welcome page for a wizard using a provided image.
@@ -98,13 +121,12 @@
     ``question``
         Should this message box question the user.
     """
-    error = translate('OpenLP.Ui', 'Error')
     if question:
         return QtGui.QMessageBox.critical(parent, error, message,
             QtGui.QMessageBox.StandardButtons(
             QtGui.QMessageBox.Yes | QtGui.QMessageBox.No))
     data = {u'message': message}
-    data[u'title'] = title if title else error
+    data[u'title'] = title if title else UiStrings.Error
     return Receiver.send_message(u'openlp_error_message', data)
 
 def media_item_combo_box(parent, name):
@@ -134,7 +156,7 @@
     delete_button.setObjectName(u'deleteButton')
     delete_icon = icon if icon else u':/general/general_delete.png'
     delete_button.setIcon(build_icon(delete_icon))
-    delete_button.setText(translate('OpenLP.Ui', '&Delete'))
+    delete_button.setText(UiStrings.Delete)
     delete_button.setToolTip(
         translate('OpenLP.Ui', 'Delete the selected item.'))
     QtCore.QObject.connect(delete_button,

=== modified file 'openlp/core/ui/displaytagtab.py'
--- openlp/core/ui/displaytagtab.py	2011-02-07 15:55:02 +0000
+++ openlp/core/ui/displaytagtab.py	2011-02-09 05:11:20 +0000
@@ -34,7 +34,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import SettingsTab, translate, DisplayTags
-from openlp.core.lib.ui import critical_error_message_box
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
 
 class DisplayTagTab(SettingsTab):
     """
@@ -164,8 +164,7 @@
         self.startTagLabel.setText(
             translate('OpenLP.DisplayTagTab', 'Start tag'))
         self.endTagLabel.setText(translate('OpenLP.DisplayTagTab', 'End tag'))
-        self.deletePushButton.setText(
-            translate('OpenLP.DisplayTagTab', 'Delete'))
+        self.deletePushButton.setText(UiStrings.Delete)
         self.defaultPushButton.setText(
             translate('OpenLP.DisplayTagTab', 'Default'))
         self.newPushButton.setText(translate('OpenLP.DisplayTagTab', 'New'))

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-02-08 14:39:59 +0000
+++ openlp/core/ui/mainwindow.py	2011-02-09 05:11:20 +0000
@@ -30,7 +30,8 @@
 
 from openlp.core.lib import RenderManager, build_icon, OpenLPDockWidget, \
     SettingsManager, PluginManager, Receiver, translate
-from openlp.core.lib.ui import base_action, checkable_action, icon_action
+from openlp.core.lib.ui import UiStrings, base_action, checkable_action, \
+    icon_action
 from openlp.core.ui import AboutForm, SettingsForm, ServiceManager, \
     ThemeManager, SlideController, PluginForm, MediaDockManager, \
     ShortcutListForm
@@ -295,7 +296,7 @@
         """
         Set up the translation system
         """
-        mainWindow.mainTitle = translate('OpenLP.MainWindow', 'OpenLP 2.0')
+        mainWindow.mainTitle = UiStrings.OLPV2
         mainWindow.setWindowTitle(mainWindow.mainTitle)
         self.FileMenu.setTitle(translate('OpenLP.MainWindow', '&File'))
         self.FileImportMenu.setTitle(translate('OpenLP.MainWindow', '&Import'))

=== modified file 'openlp/core/ui/slidecontroller.py'
--- openlp/core/ui/slidecontroller.py	2011-02-08 18:42:24 +0000
+++ openlp/core/ui/slidecontroller.py	2011-02-09 05:11:20 +0000
@@ -32,7 +32,7 @@
 
 from openlp.core.lib import OpenLPToolbar, Receiver, resize_image, \
     ItemCapabilities, translate
-from openlp.core.lib.ui import shortcut_action
+from openlp.core.lib.ui import UiStrings, shortcut_action
 from openlp.core.ui import HideMode, MainDisplay
 
 log = logging.getLogger(__name__)
@@ -87,12 +87,11 @@
         # Type label for the top of the slide controller
         self.typeLabel = QtGui.QLabel(self.panel)
         if self.isLive:
-            self.typeLabel.setText(translate('OpenLP.SlideController', 'Live'))
+            self.typeLabel.setText(UiStrings.Live)
             self.split = 1
             self.typePrefix = u'live'
         else:
-            self.typeLabel.setText(translate('OpenLP.SlideController',
-                'Preview'))
+            self.typeLabel.setText(UiStrings.Preview)
             self.split = 0
             self.typePrefix = u'preview'
         self.typeLabel.setStyleSheet(u'font-weight: bold; font-size: 12pt;')

=== modified file 'openlp/core/ui/themeform.py'
--- openlp/core/ui/themeform.py	2011-02-02 23:12:31 +0000
+++ openlp/core/ui/themeform.py	2011-02-09 05:11:20 +0000
@@ -31,7 +31,7 @@
 
 from openlp.core.lib import translate, BackgroundType, BackgroundGradientType, \
     Receiver
-from openlp.core.lib.ui import critical_error_message_box
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
 from openlp.core.utils import get_images_filter
 from themewizard import Ui_ThemeWizard
 
@@ -483,8 +483,7 @@
         Background Image button pushed.
         """
         images_filter = get_images_filter()
-        images_filter = '%s;;%s (*.*) (*)' % (images_filter,
-            translate('OpenLP.ThemeForm', 'All Files'))
+        images_filter = '%s;;%s (*.*) (*)' % (images_filter, UiStrings.AllFiles)
         filename = QtGui.QFileDialog.getOpenFileName(self,
             translate('OpenLP.ThemeForm', 'Select Image'), u'',
             images_filter)

=== modified file 'openlp/core/ui/themestab.py'
--- openlp/core/ui/themestab.py	2011-02-01 00:33:50 +0000
+++ openlp/core/ui/themestab.py	2011-02-09 05:11:20 +0000
@@ -27,6 +27,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import SettingsTab, Receiver, ThemeLevel, translate
+from openlp.core.lib.ui import UiStrings
 
 class ThemesTab(SettingsTab):
     """
@@ -98,7 +99,7 @@
             QtCore.SIGNAL(u'theme_update_list'), self.updateThemeList)
 
     def retranslateUi(self):
-        self.tabTitleVisible = translate('OpenLP.ThemesTab', 'Themes')
+        self.tabTitleVisible = UiStrings.Themes
         self.GlobalGroupBox.setTitle(
             translate('OpenLP.ThemesTab', 'Global Theme'))
         self.LevelGroupBox.setTitle(

=== modified file 'openlp/plugins/alerts/lib/alertstab.py'
--- openlp/plugins/alerts/lib/alertstab.py	2011-02-08 19:31:55 +0000
+++ openlp/plugins/alerts/lib/alertstab.py	2011-02-09 05:11:20 +0000
@@ -27,7 +27,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import SettingsTab, translate
-from openlp.core.lib.ui import create_valign_combo
+from openlp.core.lib.ui import UiStrings, create_valign_combo
 
 class AlertsTab(SettingsTab):
     """
@@ -117,10 +117,8 @@
             translate('AlertsPlugin.AlertsTab', 'Alert timeout:'))
         self.TimeoutSpinBox.setSuffix(
             translate('AlertsPlugin.AlertsTab', 's'))
-        self.PreviewGroupBox.setTitle(
-            translate('AlertsPlugin.AlertsTab', 'Preview'))
-        self.FontPreview.setText(
-            translate('AlertsPlugin.AlertsTab', 'OpenLP 2.0'))
+        self.PreviewGroupBox.setTitle(UiStrings.Preview)
+        self.FontPreview.setText(UiStrings.OLPV2)
 
     def onBackgroundColorButtonClicked(self):
         new_color = QtGui.QColorDialog.getColor(

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2011-02-05 09:30:59 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2011-02-09 05:11:20 +0000
@@ -29,6 +29,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.bibles.lib import BibleManager, BiblesTab, BibleMediaItem
 
 log = logging.getLogger(__name__)
@@ -137,38 +138,38 @@
         # Middle Header Bar
         ## Import Action ##
         self.textStrings[StringContent.Import] = {
-            u'title': translate('BiblesPlugin', '&Import'),
+            u'title': UiStrings.Import,
             u'tooltip': translate('BiblesPlugin', 'Import a Bible')
         }
         ## New Action ##
         self.textStrings[StringContent.New] = {
-            u'title': translate('BiblesPlugin', '&Add'),
+            u'title': UiStrings.Add,
             u'tooltip': translate('BiblesPlugin', 'Add a new Bible')
         }
         ## Edit Action ##
         self.textStrings[StringContent.Edit] = {
-            u'title': translate('BiblesPlugin', '&Edit'),
+            u'title': UiStrings.Edit,
             u'tooltip': translate('BiblesPlugin', 'Edit the selected Bible')
         }
         ## Delete Action ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('BiblesPlugin', '&Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('BiblesPlugin', 'Delete the selected Bible')
         }
         ## Preview Action ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('BiblesPlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('BiblesPlugin', 'Preview the selected Bible')
         }
         ## Send Live Action ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('BiblesPlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('BiblesPlugin',
                 'Send the selected Bible live')
         }
         ## Add to Service Action ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('BiblesPlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('BiblesPlugin',
                 'Add the selected Bible to the service')
         }

=== modified file 'openlp/plugins/bibles/forms/bibleimportform.py'
--- openlp/plugins/bibles/forms/bibleimportform.py	2011-02-03 20:12:06 +0000
+++ openlp/plugins/bibles/forms/bibleimportform.py	2011-02-09 05:11:20 +0000
@@ -35,7 +35,7 @@
 
 from openlp.core.lib import Receiver, SettingsManager, translate
 from openlp.core.lib.db import delete_database
-from openlp.core.lib.ui import critical_error_message_box
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
 from openlp.core.ui.wizard import OpenLPWizard
 from openlp.core.utils import AppLocation, string_is_unicode
 from openlp.plugins.bibles.lib.manager import BibleFormat
@@ -745,8 +745,7 @@
         """
         if filters:
             filters += u';;'
-        filters += u'%s (*)' % translate('BiblesPlugin.ImportWizardForm',
-            'All Files')
+        filters += u'%s (*)' % UiStrings.AllFiles
         filename = QtGui.QFileDialog.getOpenFileName(self, title,
             os.path.dirname(SettingsManager.get_last_dir(
             self.plugin.settingsSection, 1)), filters)

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2010-12-31 02:17:41 +0000
+++ openlp/plugins/custom/customplugin.py	2011-02-09 05:11:20 +0000
@@ -30,6 +30,7 @@
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
 from openlp.core.lib.db import Manager
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.custom.lib import CustomMediaItem, CustomTab
 from openlp.plugins.custom.lib.db import CustomSlide, init_schema
 
@@ -114,49 +115,49 @@
         # Middle Header Bar
         ## Import Action ##
         self.textStrings[StringContent.Import] = {
-            u'title': translate('CustomsPlugin', 'Import'),
+            u'title': UiStrings.Import,
             u'tooltip': translate('CustomsPlugin',
                 'Import a Custom')
         }
         ## Load Action ##
         self.textStrings[StringContent.Load] = {
-            u'title': translate('CustomsPlugin', 'Load'),
+            u'title': UiStrings.Load,
             u'tooltip': translate('CustomsPlugin',
                 'Load a new Custom')
         }
         ## New Action ##
         self.textStrings[StringContent.New] = {
-            u'title': translate('CustomsPlugin', 'Add'),
+            u'title': UiStrings.Add,
             u'tooltip': translate('CustomsPlugin',
                 'Add a new Custom')
         }
         ## Edit Action ##
         self.textStrings[StringContent.Edit] = {
-            u'title': translate('CustomsPlugin', 'Edit'),
+            u'title': UiStrings.Edit,
             u'tooltip': translate('CustomsPlugin',
                 'Edit the selected Custom')
         }
         ## Delete Action ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('CustomsPlugin', 'Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('CustomsPlugin',
                 'Delete the selected Custom')
         }
         ## Preview Action ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('CustomsPlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('CustomsPlugin',
                 'Preview the selected Custom')
         }
         ## Send Live Action ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('CustomsPlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('CustomsPlugin',
                 'Send the selected Custom live')
         }
         ## Add to Service Action ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('CustomsPlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('CustomsPlugin',
                 'Add the selected Custom to the service')
         }

=== modified file 'openlp/plugins/custom/forms/editcustomdialog.py'
--- openlp/plugins/custom/forms/editcustomdialog.py	2011-02-05 01:24:19 +0000
+++ openlp/plugins/custom/forms/editcustomdialog.py	2011-02-09 05:11:20 +0000
@@ -27,7 +27,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import build_icon, translate
-from openlp.core.lib.ui import create_save_cancel_button_box, \
+from openlp.core.lib.ui import UiStrings, create_save_cancel_button_box, \
     create_delete_push_button, create_up_down_push_button_set
 
 class Ui_CustomEditDialog(object):
@@ -107,13 +107,11 @@
             translate('CustomPlugin.EditCustomForm', 'Edit Custom Slides'))
         self.titleLabel.setText(
             translate('CustomPlugin.EditCustomForm', '&Title:'))
-        self.addButton.setText(
-            translate('CustomPlugin.EditCustomForm', '&Add'))
+        self.addButton.setText(UiStrings.Add)
         self.addButton.setToolTip(
             translate('CustomPlugin.EditCustomForm', 'Add a new slide at '
             'bottom.'))
-        self.editButton.setText(
-            translate('CustomPlugin.EditCustomForm', '&Edit'))
+        self.editButton.setText(UiStrings.Edit)
         self.editButton.setToolTip(
             translate('CustomPlugin.EditCustomForm', 'Edit the selected '
             'slide.'))

=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py	2011-01-02 07:57:05 +0000
+++ openlp/plugins/images/imageplugin.py	2011-02-09 05:11:20 +0000
@@ -27,6 +27,7 @@
 import logging
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.images.lib import ImageMediaItem
 
 log = logging.getLogger(__name__)
@@ -74,43 +75,43 @@
         # Middle Header Bar
         ## Load Button ##
         self.textStrings[StringContent.Load] = {
-            u'title': translate('ImagePlugin', 'Load'),
+            u'title': UiStrings.Load,
             u'tooltip': translate('ImagePlugin',
                 'Load a new Image')
         }
         ## New Button ##
         self.textStrings[StringContent.New] = {
-            u'title': translate('ImagePlugin', 'Add'),
+            u'title': UiStrings.Add,
             u'tooltip': translate('ImagePlugin',
                 'Add a new Image')
         }
         ## Edit Button ##
         self.textStrings[StringContent.Edit] = {
-            u'title': translate('ImagePlugin', 'Edit'),
+            u'title': UiStrings.Edit,
             u'tooltip': translate('ImagePlugin',
                 'Edit the selected Image')
         }
         ## Delete Button ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('ImagePlugin', 'Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('ImagePlugin',
                 'Delete the selected Image')
         }
         ## Preview ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('ImagePlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('ImagePlugin',
                 'Preview the selected Image')
         }
         ## Live  Button ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('ImagePlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('ImagePlugin',
                 'Send the selected Image live')
         }
         ## Add to service Button ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('ImagePlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('ImagePlugin',
                 'Add the selected Image to the service')
         }

=== modified file 'openlp/plugins/images/lib/mediaitem.py'
--- openlp/plugins/images/lib/mediaitem.py	2011-02-06 19:37:35 +0000
+++ openlp/plugins/images/lib/mediaitem.py	2011-02-09 05:11:20 +0000
@@ -32,7 +32,7 @@
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, build_icon, \
     ItemCapabilities, SettingsManager, translate, check_item_selected, \
     check_directory_exists, Receiver
-from openlp.core.lib.ui import critical_error_message_box
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
 from openlp.core.utils import AppLocation, delete_file, get_images_filter
 
 log = logging.getLogger(__name__)
@@ -64,7 +64,7 @@
             'Select Image(s)')
         file_formats = get_images_filter()
         self.OnNewFileMasks = u'%s;;%s (*.*) (*)' % (file_formats,
-            unicode(translate('ImagePlugin.MediaItem', 'All Files')))
+            unicode(UiStrings.AllFiles))
         self.replaceAction.setText(
             translate('ImagePlugin.MediaItem', 'Replace Background'))
         self.replaceAction.setToolTip(

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2011-01-03 19:50:25 +0000
+++ openlp/plugins/media/mediaplugin.py	2011-02-09 05:11:20 +0000
@@ -30,6 +30,7 @@
 from PyQt4.phonon import Phonon
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.media.lib import MediaMediaItem, MediaTab
 
 log = logging.getLogger(__name__)
@@ -103,43 +104,43 @@
         # Middle Header Bar
         ## Load Action ##
         self.textStrings[StringContent.Load] = {
-            u'title': translate('MediaPlugin', 'Load'),
+            u'title': UiStrings.Load,
             u'tooltip': translate('MediaPlugin',
                 'Load a new Media')
         }
         ## New Action ##
         self.textStrings[StringContent.New] = {
-            u'title': translate('MediaPlugin', 'Add'),
+            u'title': UiStrings.Add,
             u'tooltip': translate('MediaPlugin',
                 'Add a new Media')
         }
         ## Edit Action ##
         self.textStrings[StringContent.Edit] = {
-            u'title': translate('MediaPlugin', 'Edit'),
+            u'title': UiStrings.Edit,
             u'tooltip': translate('MediaPlugin',
                 'Edit the selected Media')
         }
         ## Delete Action ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('MediaPlugin', 'Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('MediaPlugin',
                 'Delete the selected Media')
         }
         ## Preview Action ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('MediaPlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('MediaPlugin',
                 'Preview the selected Media')
         }
         ## Send Live Action ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('MediaPlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('MediaPlugin',
                 'Send the selected Media live')
         }
         ## Add to Service Action ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('MediaPlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('MediaPlugin',
                 'Add the selected Media to the service')
         }

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2011-02-04 21:35:57 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2011-02-09 05:11:20 +0000
@@ -31,6 +31,7 @@
 import logging
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
+from openlp.core.lib.ui import UiStrings
 from openlp.core.utils import AppLocation
 from openlp.plugins.presentations.lib import PresentationController, \
     PresentationMediaItem, PresentationTab
@@ -169,31 +170,31 @@
         # Middle Header Bar
         ## Load Action ##
         self.textStrings[StringContent.Load] = {
-            u'title': translate('PresentationPlugin', 'Load'),
+            u'title': UiStrings.Load,
             u'tooltip': translate('PresentationPlugin',
                 'Load a new Presentation')
         }
         ## Delete Action ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('PresentationPlugin', 'Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('PresentationPlugin',
                 'Delete the selected Presentation')
         }
         ## Preview Action ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('PresentationPlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('PresentationPlugin',
                 'Preview the selected Presentation')
         }
         ## Send Live Action ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('PresentationPlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('PresentationPlugin',
                 'Send the selected Presentation live')
         }
         ## Add to Service Action ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('PresentationPlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('PresentationPlugin',
                 'Add the selected Presentation to the service')
         }

=== modified file 'openlp/plugins/songs/forms/editsongdialog.py'
--- openlp/plugins/songs/forms/editsongdialog.py	2011-02-05 01:24:19 +0000
+++ openlp/plugins/songs/forms/editsongdialog.py	2011-02-09 05:11:20 +0000
@@ -27,7 +27,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import build_icon, translate
-from openlp.core.lib.ui import create_save_cancel_button_box
+from openlp.core.lib.ui import UiStrings, create_save_cancel_button_box
 
 class Ui_EditSongDialog(object):
     def setupUi(self, editSongDialog):
@@ -257,19 +257,15 @@
             translate('SongsPlugin.EditSongForm', '&Lyrics:'))
         self.verseOrderLabel.setText(
             translate('SongsPlugin.EditSongForm', '&Verse order:'))
-        self.verseAddButton.setText(
-            translate('SongsPlugin.EditSongForm', '&Add'))
-        self.verseEditButton.setText(
-            translate('SongsPlugin.EditSongForm', '&Edit'))
+        self.verseAddButton.setText(UiStrings.Add)
+        self.verseEditButton.setText(UiStrings.Edit)
         self.verseEditAllButton.setText(
             translate('SongsPlugin.EditSongForm', 'Ed&it All'))
-        self.verseDeleteButton.setText(
-            translate('SongsPlugin.EditSongForm', '&Delete'))
+        self.verseDeleteButton.setText(UiStrings.Delete)
         self.songTabWidget.setTabText(
             self.songTabWidget.indexOf(self.lyricsTab),
             translate('SongsPlugin.EditSongForm', 'Title && Lyrics'))
-        self.authorsGroupBox.setTitle(
-            translate('SongsPlugin.EditSongForm', 'Authors'))
+        self.authorsGroupBox.setTitle(UiStrings.Authors)
         self.authorAddButton.setText(
             translate('SongsPlugin.EditSongForm', '&Add to Song'))
         self.authorRemoveButton.setText(
@@ -292,8 +288,7 @@
             self.songTabWidget.indexOf(self.authorsTab),
             translate('SongsPlugin.EditSongForm',
                 'Authors, Topics && Song Book'))
-        self.themeGroupBox.setTitle(
-            translate('SongsPlugin.EditSongForm', 'Theme'))
+        self.themeGroupBox.setTitle(UiStrings.Theme)
         self.themeAddButton.setText(
             translate('SongsPlugin.EditSongForm', 'New &Theme'))
         self.rightsGroupBox.setTitle(

=== modified file 'openlp/plugins/songs/forms/songimportform.py'
--- openlp/plugins/songs/forms/songimportform.py	2011-02-03 20:12:06 +0000
+++ openlp/plugins/songs/forms/songimportform.py	2011-02-09 05:11:20 +0000
@@ -32,7 +32,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import Receiver, SettingsManager, translate
-from openlp.core.lib.ui import critical_error_message_box
+from openlp.core.lib.ui import UiStrings, critical_error_message_box
 from openlp.core.ui.wizard import OpenLPWizard
 from openlp.plugins.songs.lib.importer import SongFormat
 
@@ -215,8 +215,7 @@
             'Select the import format, and where to import from.'))
         self.formatLabel.setText(
             translate('SongsPlugin.ImportWizardForm', 'Format:'))
-        self.formatComboBox.setItemText(0,
-            translate('SongsPlugin.ImportWizardForm', 'OpenLP 2.0'))
+        self.formatComboBox.setItemText(0, UiStrings.OLPV2)
         self.formatComboBox.setItemText(1,
             translate('SongsPlugin.ImportWizardForm', 'openlp.org 1.x'))
         self.formatComboBox.setItemText(2,
@@ -489,8 +488,7 @@
         """
         if filters:
             filters += u';;'
-        filters += u'%s (*)' % translate('SongsPlugin.ImportWizardForm',
-            'All Files')
+        filters += u'%s (*)' % UiStrings.AllFiles
         filenames = QtGui.QFileDialog.getOpenFileNames(self, title,
             SettingsManager.get_last_dir(self.plugin.settingsSection, 1),
             filters)

=== modified file 'openlp/plugins/songs/forms/songmaintenancedialog.py'
--- openlp/plugins/songs/forms/songmaintenancedialog.py	2011-01-09 00:27:46 +0000
+++ openlp/plugins/songs/forms/songmaintenancedialog.py	2011-02-09 05:11:20 +0000
@@ -27,6 +27,7 @@
 from PyQt4 import QtCore, QtGui
 
 from openlp.core.lib import build_icon, translate
+from openlp.core.lib.ui import UiStrings
 
 class Ui_SongMaintenanceDialog(object):
     def setupUi(self, songMaintenanceDialog):
@@ -145,30 +146,21 @@
     def retranslateUi(self, songMaintenanceDialog):
         songMaintenanceDialog.setWindowTitle(
             translate('SongsPlugin.SongMaintenanceForm', 'Song Maintenance'))
-        authorsString = translate('SongsPlugin.SongMaintenanceForm', 'Authors')
+        authorsString = UiStrings.Authors
         topicsString = translate('SongsPlugin.SongMaintenanceForm', 'Topics')
         booksString = translate('SongsPlugin.SongMaintenanceForm', 'Song Books')
         self.listItemAuthors.setText(authorsString)
         self.listItemTopics.setText(topicsString)
         self.listItemBooks.setText(booksString)
-        self.authorsAddButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Add'))
-        self.authorsEditButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Edit'))
-        self.authorsDeleteButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Delete'))
-        self.topicsAddButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Add'))
-        self.topicsEditButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Edit'))
-        self.topicsDeleteButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Delete'))
-        self.booksAddButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Add'))
-        self.booksEditButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Edit'))
-        self.booksDeleteButton.setText(
-            translate('SongsPlugin.SongMaintenanceForm', '&Delete'))
+        self.authorsAddButton.setText(UiStrings.Add)
+        self.authorsEditButton.setText(UiStrings.Edit)
+        self.authorsDeleteButton.setText(UiStrings.Delete)
+        self.topicsAddButton.setText(UiStrings.Add)
+        self.topicsEditButton.setText(UiStrings.Edit)
+        self.topicsDeleteButton.setText(UiStrings.Delete)
+        self.booksAddButton.setText(UiStrings.Add)
+        self.booksEditButton.setText(UiStrings.Edit)
+        self.booksDeleteButton.setText(UiStrings.Delete)
         typeListWidth = max(self.fontMetrics().width(authorsString),
             self.fontMetrics().width(topicsString),
             self.fontMetrics().width(booksString))

=== modified file 'openlp/plugins/songs/lib/mediaitem.py'
--- openlp/plugins/songs/lib/mediaitem.py	2011-02-06 19:53:08 +0000
+++ openlp/plugins/songs/lib/mediaitem.py	2011-02-09 05:11:20 +0000
@@ -33,6 +33,7 @@
 
 from openlp.core.lib import MediaManagerItem, BaseListWithDnD, Receiver, \
     ItemCapabilities, translate, check_item_selected, PluginStatus
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.songs.forms import EditSongForm, SongMaintenanceForm, \
     SongImportForm
 from openlp.plugins.songs.lib import OpenLyrics, SongXML
@@ -147,10 +148,8 @@
                 translate('SongsPlugin.MediaItem', 'Titles')),
             (3, u':/songs/song_search_lyrics.png',
                 translate('SongsPlugin.MediaItem', 'Lyrics')),
-            (4, u':/songs/song_search_author.png',
-                translate('SongsPlugin.MediaItem', 'Authors')),
-            (5, u':/slides/slide_theme.png',
-                translate('SongsPlugin.MediaItem', 'Themes'))
+            (4, u':/songs/song_search_author.png', UiStrings.Authors),
+            (5, u':/slides/slide_theme.png', UiStrings.Themes)
         ])
         self.configUpdated()
 

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2011-01-19 19:37:44 +0000
+++ openlp/plugins/songs/songsplugin.py	2011-02-09 05:11:20 +0000
@@ -31,6 +31,7 @@
 
 from openlp.core.lib import Plugin, StringContent, build_icon, translate
 from openlp.core.lib.db import Manager
+from openlp.core.lib.ui import UiStrings
 from openlp.plugins.songs.lib import SongMediaItem, SongsTab, SongXML
 from openlp.plugins.songs.lib.db import init_schema, Song
 from openlp.plugins.songs.lib.importer import SongFormat
@@ -227,37 +228,37 @@
         # Middle Header Bar
         ## New Action ##
         self.textStrings[StringContent.New] = {
-            u'title': translate('SongsPlugin', 'Add'),
+            u'title': UiStrings.Add,
             u'tooltip': translate('SongsPlugin',
                 'Add a new Song')
         }
         ## Edit Action ##
         self.textStrings[StringContent.Edit] = {
-            u'title': translate('SongsPlugin', 'Edit'),
+            u'title': UiStrings.Edit,
             u'tooltip': translate('SongsPlugin',
                 'Edit the selected Song')
         }
         ## Delete Action ##
         self.textStrings[StringContent.Delete] = {
-            u'title': translate('SongsPlugin', 'Delete'),
+            u'title': UiStrings.Delete,
             u'tooltip': translate('SongsPlugin',
                 'Delete the selected Song')
         }
         ## Preview Action ##
         self.textStrings[StringContent.Preview] = {
-            u'title': translate('SongsPlugin', 'Preview'),
+            u'title': UiStrings.Preview,
             u'tooltip': translate('SongsPlugin',
                 'Preview the selected Song')
         }
         ## Send Live Action ##
         self.textStrings[StringContent.Live] = {
-            u'title': translate('SongsPlugin', 'Live'),
+            u'title': UiStrings.Live,
             u'tooltip': translate('SongsPlugin',
                 'Send the selected Song live')
         }
         ## Add to Service Action ##
         self.textStrings[StringContent.Service] = {
-            u'title': translate('SongsPlugin', 'Service'),
+            u'title': UiStrings.Service,
             u'tooltip': translate('SongsPlugin',
                 'Add the selected Song to the service')
         }


Follow ups