← Back to team overview

openlp-core team mailing list archive

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

 

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

Requested reviews:
  OpenLP Core (openlp-core)

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

Fix translation grammar breaking strings.
-- 
https://code.launchpad.net/~meths/openlp/testing/+merge/49670
Your team OpenLP Core is requested to review the proposed merge of lp:~meths/openlp/testing into lp:openlp.
=== modified file 'openlp/core/lib/plugin.py'
--- openlp/core/lib/plugin.py	2011-02-11 04:04:05 +0000
+++ openlp/core/lib/plugin.py	2011-02-14 17:34:12 +0000
@@ -335,37 +335,39 @@
         """
         return self.textStrings[name]
 
-    def setPluginTextStrings(self):
+    def setPluginUiTextStrings(self, tooltips):
         """
         Called to define all translatable texts of the plugin
         """
         ## Load Action ##
-        self._setSingularTextString(StringContent.Load,
-            UiStrings.Load, UiStrings.LoadANew)
+        self.__setNameTextString(StringContent.Load,
+            UiStrings.Load, tooltips[load])
+        ## Import Action ##
+        self.__setNameTextString(StringContent.Import,
+            UiStrings.Import, tooltips[import])
         ## New Action ##
-        self._setSingularTextString(StringContent.New,
-            UiStrings.Add, UiStrings.AddANew)
+        self.__setNameTextString(StringContent.New,
+            UiStrings.Add, tooltips[new])
         ## Edit Action ##
-        self._setSingularTextString(StringContent.Edit,
-            UiStrings.Edit, UiStrings.EditSelect)
+        self.__setNameTextString(StringContent.Edit,
+            UiStrings.Edit, tooltips[edit])
         ## Delete Action ##
-        self._setSingularTextString(StringContent.Delete,
-            UiStrings.Delete, UiStrings.DeleteSelect)
+        self.__setNameTextString(StringContent.Delete,
+            UiStrings.Delete, tooltips[delete])
         ## Preview Action ##
-        self._setSingularTextString(StringContent.Preview,
-            UiStrings.Preview, UiStrings.PreviewSelect)
+        self.__setNameTextString(StringContent.Preview,
+            UiStrings.Preview, tooltips[preview])
         ## Send Live Action ##
-        self._setSingularTextString(StringContent.Live,
-            UiStrings.Live, UiStrings.SendSelectLive)
+        self.__setNameTextString(StringContent.Live,
+            UiStrings.Live, tooltips[live])
         ## Add to Service Action ##
-        self._setSingularTextString(StringContent.Service,
-            UiStrings.Service, UiStrings.AddSelectService)
+        self.__setNameTextString(StringContent.Service,
+            UiStrings.Service, tooltips[service])
 
-    def _setSingularTextString(self, name, title, tooltip):
+    def __setNameTextString(self, name, title, tooltip):
         """
         Utility method for creating a plugin's textStrings. This method makes
         use of the singular name of the plugin object so must only be called
         after this has been set.
         """
-        self.textStrings[name] = { u'title': title, u'tooltip': tooltip %
-            self.getString(StringContent.Name)[u'singular']}
+        self.textStrings[name] = {u'title': title, u'tooltip': tooltip}

=== modified file 'openlp/core/lib/ui.py'
--- openlp/core/lib/ui.py	2011-02-13 13:11:15 +0000
+++ openlp/core/lib/ui.py	2011-02-14 17:34:12 +0000
@@ -41,40 +41,27 @@
     # 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')
-    AddANew = unicode(translate('OpenLP.Ui', 'Add a new %s.'))
-    AddSelectService = unicode(translate('OpenLP.Ui',
-        'Add the selected %s to the service.'))
     Advanced = translate('OpenLP.Ui', 'Advanced')
     AllFiles = translate('OpenLP.Ui', 'All Files')
     Authors = translate('OpenLP.Ui', 'Authors')
-    CreateANew = unicode(translate('OpenLP.Ui', 'Create a new %s.'))
+    CreateService = translate('OpenLP.Ui', 'Create a new service.')
     Delete = translate('OpenLP.Ui', '&Delete')
-    DeleteSelect = unicode(translate('OpenLP.Ui', 'Delete the selected %s.'))
-    DeleteType = unicode(translate('OpenLP.Ui', 'Delete %s'))
     Edit = translate('OpenLP.Ui', '&Edit')
-    EditSelect = unicode(translate('OpenLP.Ui', 'Edit the selected %s.'))
-    EditType = unicode(translate('OpenLP.Ui', 'Edit %s'))
     Error = translate('OpenLP.Ui', 'Error')
-    ExportType = unicode(translate('OpenLP.Ui', 'Export %s'))
     Import = translate('OpenLP.Ui', 'Import')
-    ImportType = unicode(translate('OpenLP.Ui', 'Import %s'))
     LengthTime = unicode(translate('OpenLP.Ui', 'Length %s'))
     Live = translate('OpenLP.Ui', 'Live')
     Load = translate('OpenLP.Ui', 'Load')
-    LoadANew = unicode(translate('OpenLP.Ui', 'Load a new %s.'))
     New = translate('OpenLP.Ui', 'New')
-    NewType = unicode(translate('OpenLP.Ui', 'New %s'))
+    NewService = translate('OpenLP.Ui', 'New Service')
     OLPV2 = translate('OpenLP.Ui', 'OpenLP 2.0')
-    OpenType = unicode(translate('OpenLP.Ui', 'Open %s'))
+    OpenService = translate('OpenLP.Ui', 'Open Service')
     Preview = translate('OpenLP.Ui', 'Preview')
-    PreviewSelect = unicode(translate('OpenLP.Ui', 'Preview the selected %s.'))
     ReplaceBG = translate('OpenLP.Ui', 'Replace Background')
     ReplaceLiveBG = translate('OpenLP.Ui', 'Replace Live Background')
     ResetBG = translate('OpenLP.Ui', 'Reset Background')
     ResetLiveBG = translate('OpenLP.Ui', 'Reset Live Background')
-    SaveType = unicode(translate('OpenLP.Ui', 'Save %s'))
-    SendSelectLive = unicode(translate('OpenLP.Ui',
-        'Send the selected %s live.'))
+    SaveService = translate('OpenLP.Ui', 'Save Service')
     Service = translate('OpenLP.Ui', 'Service')
     StartTimeCode = unicode(translate('OpenLP.Ui', 'Start %s'))
     Theme = translate('OpenLP.Ui', 'Theme')

=== modified file 'openlp/core/ui/mainwindow.py'
--- openlp/core/ui/mainwindow.py	2011-02-10 22:49:30 +0000
+++ openlp/core/ui/mainwindow.py	2011-02-14 17:34:12 +0000
@@ -319,17 +319,16 @@
         self.themeManagerDock.setWindowTitle(
             translate('OpenLP.MainWindow', 'Theme Manager'))
         self.FileNewItem.setText(translate('OpenLP.MainWindow', '&New'))
-        self.FileNewItem.setToolTip(UiStrings.NewType % UiStrings.Service)
-        self.FileNewItem.setStatusTip(
-            UiStrings.CreateANew % UiStrings.Service.toLower())
+        self.FileNewItem.setToolTip(UiStrings.NewService)
+        self.FileNewItem.setStatusTip(UiStrings.CreateService)
         self.FileNewItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+N'))
         self.FileOpenItem.setText(translate('OpenLP.MainWindow', '&Open'))
-        self.FileOpenItem.setToolTip(UiStrings.OpenType % UiStrings.Service)
+        self.FileOpenItem.setToolTip(UiStrings.OpenService)
         self.FileOpenItem.setStatusTip(
             translate('OpenLP.MainWindow', 'Open an existing service.'))
         self.FileOpenItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+O'))
         self.FileSaveItem.setText(translate('OpenLP.MainWindow', '&Save'))
-        self.FileSaveItem.setToolTip(UiStrings.SaveType % UiStrings.Service)
+        self.FileSaveItem.setToolTip(UiStrings.SaveService)
         self.FileSaveItem.setStatusTip(
             translate('OpenLP.MainWindow', 'Save the current service to disk.'))
         self.FileSaveItem.setShortcut(translate('OpenLP.MainWindow', 'Ctrl+S'))

=== modified file 'openlp/core/ui/servicemanager.py'
--- openlp/core/ui/servicemanager.py	2011-02-13 13:11:15 +0000
+++ openlp/core/ui/servicemanager.py	2011-02-14 17:34:12 +0000
@@ -96,18 +96,14 @@
         # Create the top toolbar
         self.toolbar = OpenLPToolbar(self)
         self.toolbar.addToolbarButton(
-            UiStrings.NewType % UiStrings.Service,
-            u':/general/general_new.png',
-            UiStrings.CreateANew % UiStrings.Service.toLower(),
-            self.onNewServiceClicked)
+            UiStrings.NewService, u':/general/general_new.png',
+            UiStrings.Create.Service, self.onNewServiceClicked)
         self.toolbar.addToolbarButton(
-            UiStrings.OpenType % UiStrings.Service,
-            u':/general/general_open.png',
+            UiStrings.OpenService, u':/general/general_open.png',
             translate('OpenLP.ServiceManager', 'Load an existing service'),
             self.onLoadServiceClicked)
         self.toolbar.addToolbarButton(
-            UiStrings.SaveType % UiStrings.Service,
-            u':/general/general_save.png',
+            UiStrings.SaveService, u':/general/general_save.png',
             translate('OpenLP.ServiceManager', 'Save this service'),
             self.saveFile)
         self.toolbar.addSeparator()
@@ -469,7 +465,7 @@
         save the file.
         """
         fileName = unicode(QtGui.QFileDialog.getSaveFileName(self.mainwindow,
-            UiStrings.SaveType % UiStrings.Service,
+            UiStrings.SaveService,
             SettingsManager.get_last_dir(
             self.mainwindow.serviceSettingsSection),
             translate('OpenLP.ServiceManager', 'OpenLP Service Files (*.osz)')))

=== modified file 'openlp/core/ui/thememanager.py'
--- openlp/core/ui/thememanager.py	2011-02-10 22:49:30 +0000
+++ openlp/core/ui/thememanager.py	2011-02-14 17:34:12 +0000
@@ -63,28 +63,28 @@
         self.layout.setObjectName(u'layout')
         self.toolbar = OpenLPToolbar(self)
         self.toolbar.addToolbarButton(
-            UiStrings.NewType % UiStrings.Theme,
+            translate('OpenLP.ThemeManager', 'New Theme'),
             u':/themes/theme_new.png',
-            UiStrings.CreateANew % UiStrings.Theme.toLower(),
+            translate('OpenLP.ThemeManager', 'Create a new theme.'),
             self.onAddTheme)
         self.toolbar.addToolbarButton(
-            UiStrings.EditType % UiStrings.Theme,
+            translate('OpenLP.ThemeManager', 'Edit Theme'),
             u':/themes/theme_edit.png',
             translate('OpenLP.ThemeManager', 'Edit a theme.'),
             self.onEditTheme)
         self.deleteToolbarAction = self.toolbar.addToolbarButton(
-            UiStrings.DeleteType % UiStrings.Theme,
+            translate('OpenLP.ThemeManager', 'Delete Theme'),
             u':/general/general_delete.png',
             translate('OpenLP.ThemeManager', 'Delete a theme.'),
             self.onDeleteTheme)
         self.toolbar.addSeparator()
         self.toolbar.addToolbarButton(
-            UiStrings.ImportType % UiStrings.Theme,
+            translate('OpenLP.ThemeManager', 'Import Theme'),
             u':/general/general_import.png',
             translate('OpenLP.ThemeManager', 'Import a theme.'),
             self.onImportTheme)
         self.toolbar.addToolbarButton(
-            UiStrings.ExportType % UiStrings.Theme,
+            translate('OpenLP.ThemeManager', 'Export Theme'),
             u':/general/general_export.png',
             translate('OpenLP.ThemeManager', 'Export a theme.'),
             self.onExportTheme)

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2011-02-11 04:04:05 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2011-02-14 17:34:12 +0000
@@ -129,9 +129,15 @@
             u'title': translate('BiblesPlugin', 'Bibles', 'container title')
         }
         # Middle Header Bar
-        ## Import Action ##
-        self.textStrings[StringContent.Import] = {
-            u'title': UiStrings.Import,
-            u'tooltip': translate('BiblesPlugin', 'Import a Bible')
+        tooltips = {
+            load: u''
+            import: translate('BiblesPlugin', 'Import a Bible')
+            new: translate('BiblesPlugin', 'Add a new Bible')
+            edit: translate('BiblesPlugin', 'Edit the selected Bible')
+            delete: translate('BiblesPlugin', 'Delete the selected Bible')
+            preview: translate('BiblesPlugin', 'Preview the selected Bible')
+            live: translate('BiblesPlugin', 'Send the selected Bible live')
+            service: translate('BiblesPlugin',
+                'Add the selected Bible to the service')
         }
-        Plugin.setPluginTextStrings(self)
+        self.setPluginUiTextStrings(tooltips)

=== modified file 'openlp/plugins/custom/customplugin.py'
--- openlp/plugins/custom/customplugin.py	2011-02-11 04:04:05 +0000
+++ openlp/plugins/custom/customplugin.py	2011-02-14 17:34:12 +0000
@@ -106,13 +106,18 @@
             u'title': translate('CustomsPlugin', 'Custom', 'container title')
         }
         # Middle Header Bar
-        ## Import Action ##
-        self.textStrings[StringContent.Import] = {
-            u'title': UiStrings.Import,
-            u'tooltip': translate('CustomsPlugin',
-                'Import a Custom')
+        tooltips = {
+            load: translate('CustomsPlugin', 'Load a new Custom')
+            import: translate('CustomsPlugin', 'Import a Custom')
+            new: translate('CustomsPlugin', 'Add a new Custom')
+            edit: translate('CustomsPlugin', 'Edit the selected Custom')
+            delete: translate('CustomsPlugin', 'Delete the selected Custom')
+            preview: translate('CustomsPlugin', 'Preview the selected Custom')
+            live: translate('CustomsPlugin', 'Send the selected Custom live')
+            service: translate('CustomsPlugin',
+                'Add the selected Custom to the service')
         }
-        Plugin.setPluginTextStrings(self)
+        self.setPluginUiTextStrings(tooltips)
 
     def finalise(self):
         """

=== modified file 'openlp/plugins/images/imageplugin.py'
--- openlp/plugins/images/imageplugin.py	2011-02-11 04:04:05 +0000
+++ openlp/plugins/images/imageplugin.py	2011-02-14 17:34:12 +0000
@@ -69,4 +69,15 @@
             u'title': translate('ImagePlugin', 'Images', 'container title')
         }
         # Middle Header Bar
-        Plugin.setPluginTextStrings(self)
+        tooltips = {
+            load: translate('ImagePlugin', 'Load a new Image')
+            import: u''
+            new: translate('ImagePlugin', 'Add a new Image')
+            edit: translate('ImagePlugin', 'Edit the selected Image')
+            delete: translate('ImagePlugin', 'Delete the selected Image')
+            preview: translate('ImagePlugin', 'Preview the selected Image')
+            live: translate('ImagePlugin', 'Send the selected Image live')
+            service: translate('ImagePlugin',
+                'Add the selected Image to the service')
+        }
+        self.setPluginUiTextStrings(tooltips)

=== modified file 'openlp/plugins/media/mediaplugin.py'
--- openlp/plugins/media/mediaplugin.py	2011-02-11 04:04:05 +0000
+++ openlp/plugins/media/mediaplugin.py	2011-02-14 17:34:12 +0000
@@ -95,4 +95,15 @@
             u'title': translate('MediaPlugin', 'Media', 'container title')
         }
         # Middle Header Bar
-        Plugin.setPluginTextStrings(self)
+        tooltips = {
+            load: translate('MediaPlugin', 'Load a new Media')
+            import: u''
+            new: translate('MediaPlugin', 'Add a new Media')
+            edit: translate('MediaPlugin', 'Edit the selected Media')
+            delete: translate('MediaPlugin', 'Delete the selected Media')
+            preview: translate('MediaPlugin', 'Preview the selected Media')
+            live: translate('MediaPlugin', 'Send the selected Media live')
+            service: translate('MediaPlugin',
+                'Add the selected Media to the service')
+        }
+        self.setPluginUiTextStrings(tooltips)

=== modified file 'openlp/plugins/presentations/presentationplugin.py'
--- openlp/plugins/presentations/presentationplugin.py	2011-02-09 21:30:41 +0000
+++ openlp/plugins/presentations/presentationplugin.py	2011-02-14 17:34:12 +0000
@@ -167,4 +167,18 @@
                 'container title')
         }
         # Middle Header Bar
-        Plugin.setPluginTextStrings(self)
+        tooltips = {
+            load: translate('PresentationPlugin', 'Load a new Presentation')
+            import: u''
+            new: u''
+            edit: u''
+            delete: translate('PresentationPlugin',
+                'Delete the selected Presentation')
+            preview: translate('PresentationPlugin',
+                'Preview the selected Presentation')
+            live: translate('PresentationPlugin',
+                'Send the selected Presentation live')
+            service: translate('PresentationPlugin',
+                'Add the selected Presentation to the service')
+            }
+            self.setPluginUiTextStrings(tooltips)

=== modified file 'openlp/plugins/songs/songsplugin.py'
--- openlp/plugins/songs/songsplugin.py	2011-02-11 04:04:05 +0000
+++ openlp/plugins/songs/songsplugin.py	2011-02-14 17:34:12 +0000
@@ -228,7 +228,18 @@
             u'title': translate('SongsPlugin', 'Songs', 'container title')
         }
         # Middle Header Bar
-        Plugin.setPluginTextStrings(self)
+        tooltips = {
+            load: u''
+            import: u''
+            new: translate('SongsPlugin', 'Add a new Song')
+            edit: translate('SongsPlugin', 'Edit the selected Song')
+            delete: translate('SongsPlugin', 'Delete the selected Song')
+            preview: translate('SongsPlugin', 'Preview the selected Song')
+            live: translate('SongsPlugin', 'Send the selected Song live')
+            service: translate('SongsPlugin',
+                'Add the selected Song to the service')
+        }
+        self.setPluginUiTextStrings(tooltips)
 
     def finalise(self):
         """


Follow ups