← Back to team overview

openlp-core team mailing list archive

[Merge] lp:~suutari-olli/openlp/combined-bible-quick-search into lp:openlp

 

Azaziah has proposed merging lp:~suutari-olli/openlp/combined-bible-quick-search into lp:openlp.

Requested reviews:
  Tomas Groth (tomasgroth)
  Tim Bentley (trb143)

For more details, see:
https://code.launchpad.net/~suutari-olli/openlp/combined-bible-quick-search/+merge/291440

In this re-proposal:

- Added a setting for controlling if "No search result" 
  error is shown for combined search.
- Cut scripture reference error into pieces.
- Re-structured some code
- Merged trunk on 9.4.16

This is old Jenkins, Jenkins is currently failing interface tests due to crosswalk Bible list error.
lp:~suutari-olli/openlp/combined-bible-quick-search (revision 2624)
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-01-Pull/1382/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-02-Functional-Tests/1300/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-03-Interface-Tests/1239/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04a-Windows_Functional_Tests/1071/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-04b-Windows_Interface_Tests/662/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-05a-Code_Analysis/729/
[←[1;32mSUCCESS←[1;m] https://ci.openlp.io/job/Branch-05b-Test_Coverage/597/
------------------------------------------------------------------------------
This branch introduces following improvements to Quick Bible search:
- Combined Reference/Text search which first performs the Reference
  search and then moves to Text search if nothing is found.
- Possibility to use “.” when shortening Book names in Reference search.
  For an example Gen. 1 = Gen 1 = Genesis 1.
- New/Improved error messages (E.g. added actual example verses
  to Reference error)
  (Parts of the new messages are Bolded so <br> is required since
   \n does not work with bolding)

This branch also prevents users from performing Text searches which are:
- Shorter than 3 characters long (not including spaces)
- Searches consisting from only spaces

These currently possible bad search quarries result in LONG search times
and program instability/crashing. It’s still possible to search 3 characters
separated by spaces, but that scenario is relatively rarer.
-- 
Your team OpenLP Core is subscribed to branch lp:openlp.
=== modified file 'openlp/core/common/uistrings.py'
--- openlp/core/common/uistrings.py	2016-01-23 08:15:37 +0000
+++ openlp/core/common/uistrings.py	2016-04-09 20:18:30 +0000
@@ -23,6 +23,7 @@
 The :mod:`uistrings` module provides standard strings for OpenLP.
 """
 import logging
+import itertools
 
 from openlp.core.common import translate
 
@@ -151,3 +152,38 @@
         self.Version = translate('OpenLP.Ui', 'Version')
         self.View = translate('OpenLP.Ui', 'View')
         self.ViewMode = translate('OpenLP.Ui', 'View Mode')
+        # Translations used in both, bibles\lib\mediaitem.py and bibles\lib\manager.py
+        self.BibleShortSearchTitle = translate('OpenLP.Ui', 'Search is Empty or too Short')
+        self.BibleShortSearch = translate('OpenLP.Ui', '<strong>The search you have entered is empty or shorter '
+                                                       'than 3 characters long.<br>Please try again with '
+                                                       'a longer search.</strong><br><br>You can separate different '
+                                                       'keywords by a space to search for all of your keywords and you '
+                                                       'can separate them by a comma to search for one of them.')
+        self.BibleNoBiblesTitle = translate('OpenLP.Ui', 'No Bibles Available')
+        self.BibleNoBibles = translate('OpenLP.Ui', '<strong>There are no Bibles currently installed.</strong><br><br>'
+                                                    'Please use the Import Wizard to install one or more Bibles.')
+        # Scripture reference error combined from small translation stings by using itertools.
+        book_chapter = translate('OpenLP.Ui', 'Book Chapter')
+        bc = book_chapter
+        chapter = translate('OpenLP.Ui', 'Chapter')
+        cha = chapter
+        verse = translate('OpenLP.Ui', 'Verse')
+        ver = verse
+        interval = ' | '
+        psalm = translate('OpenLP.Ui', 'Psalm')
+        may_shorten = translate('OpenLP.Ui', 'Book names may be shortened from full names, for an example Ps 23 = '
+                                             'Psalm 23')
+        bible_scripture_items = [bc, interval, psalm, ' 23<br>',
+                 bc, '%(range)s', cha, interval, psalm, ' 23%(range)s24<br>',
+                 bc, '%(verse)s', ver, '%(range)s', ver, interval, psalm, ' 23%(verse)s1%(range)s2<br>',
+                 bc, '%(verse)s', ver, '%(range)s', ver, '%(list)s', ver, '%(range)s', ver, interval, psalm,
+                       ' 23%(verse)s1%(range)s2%(list)s5%(range)s6<br>',
+                       bc, '%(verse)s', ver, '%(range)s', ver, '%(list)s', cha, '%(verse)s', ver, '%(range)s', ver,
+                       interval, psalm, ' 23%(verse)s1%(range)s2%(list)s24%(verse)s1%(range)s3<br>',
+                       bc, '%(verse)s', ver, '%(range)s', cha, '%(verse)s', ver, interval, psalm,
+                       ' 23%(verse)s1%(range)s24%(verse)s1<br><br>', may_shorten]
+        itertools.chain.from_iterable(itertools.repeat(strings, 1) if isinstance(strings, str) else strings for strings
+                                      in bible_scripture_items)
+        bible_scripture_error_joined = ''.join(str(joined) for joined in bible_scripture_items)
+        # This is the actual
+        self.BibleScriptureError = bible_scripture_error_joined

=== modified file 'openlp/plugins/bibles/bibleplugin.py'
--- openlp/plugins/bibles/bibleplugin.py	2016-03-31 16:34:22 +0000
+++ openlp/plugins/bibles/bibleplugin.py	2016-04-09 20:18:30 +0000
@@ -59,7 +59,8 @@
     'bibles/range separator': '',
     'bibles/list separator': '',
     'bibles/end separator': '',
-    'bibles/last directory import': ''
+    'bibles/last directory import': '',
+    'bibles/hide combined quick error': False
 }
 
 

=== modified file 'openlp/plugins/bibles/lib/biblestab.py'
--- openlp/plugins/bibles/lib/biblestab.py	2015-12-31 22:46:06 +0000
+++ openlp/plugins/bibles/lib/biblestab.py	2016-04-09 20:18:30 +0000
@@ -128,6 +128,14 @@
         self.language_selection_layout.addWidget(self.language_selection_label)
         self.language_selection_layout.addWidget(self.language_selection_combo_box)
         self.right_layout.addWidget(self.language_selection_group_box)
+        self.bible_search_settings_group_box = QtWidgets.QGroupBox(self.right_column)
+        self.bible_search_settings_group_box.setObjectName('bible_search_settings_group_box')
+        self.right_layout.addWidget(self.bible_search_settings_group_box)
+        self.hide_combined_quick_error_check_box = QtWidgets.QCheckBox(self.bible_search_settings_group_box)
+        self.hide_combined_quick_error_check_box.setObjectName('hide_combined_quick_error_check_box')
+        self.search_settings_layout = QtWidgets.QFormLayout(self.bible_search_settings_group_box)
+        self.search_settings_layout.setObjectName('search_settings_layout')
+        self.search_settings_layout.addRow(self.hide_combined_quick_error_check_box)
         self.left_layout.addStretch()
         self.right_layout.addStretch()
         # Signals and slots
@@ -151,6 +159,8 @@
         self.end_separator_line_edit.editingFinished.connect(self.on_end_separator_line_edit_finished)
         Registry().register_function('theme_update_list', self.update_theme_list)
         self.language_selection_combo_box.activated.connect(self.on_language_selection_combo_box_changed)
+        self.hide_combined_quick_error_check_box.stateChanged.connect\
+            (self.on_hide_combined_quick_error_check_box_changed)
 
     def retranslateUi(self):
         self.verse_display_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Verse Display'))
@@ -194,6 +204,10 @@
             LanguageSelection.Application, translate('BiblesPlugin.BiblesTab', 'Application Language'))
         self.language_selection_combo_box.setItemText(
             LanguageSelection.English, translate('BiblesPlugin.BiblesTab', 'English'))
+        self.bible_search_settings_group_box.setTitle(translate('BiblesPlugin.BiblesTab', 'Search Settings'))
+        self.hide_combined_quick_error_check_box.setText(translate('BiblesPlugin.BiblesTab', 'Don\'t show error '
+                                                                                             'for no results in '
+                                                                                             'combined quick search'))
 
     def on_bible_theme_combo_box_changed(self):
         self.bible_theme = self.bible_theme_combo_box.currentText()
@@ -302,6 +316,12 @@
                 self.end_separator_line_edit.setText(get_reference_separator('sep_e_default'))
                 self.end_separator_line_edit.setPalette(self.get_grey_text_palette(True))
 
+    def on_hide_combined_quick_error_check_box_changed(self, check_state):
+        """
+        Event handler for the 'hide_combined_quick_error' check box
+        """
+        self.hide_combined_quick_error = (check_state == QtCore.Qt.Checked)
+
     def load(self):
         settings = Settings()
         settings.beginGroup(self.settings_section)
@@ -355,6 +375,8 @@
             self.end_separator_check_box.setChecked(True)
         self.language_selection = settings.value('book name language')
         self.language_selection_combo_box.setCurrentIndex(self.language_selection)
+        self.hide_combined_quick_error = settings.value('hide combined quick error')
+        self.hide_combined_quick_error_check_box.setChecked(self.hide_combined_quick_error)
         settings.endGroup()
 
     def save(self):
@@ -386,6 +408,7 @@
         if self.language_selection != settings.value('book name language'):
             settings.setValue('book name language', self.language_selection)
             self.settings_form.register_post_process('bibles_load_list')
+        settings.setValue('hide combined quick error', self.hide_combined_quick_error)
         settings.endGroup()
         if self.tab_visited:
             self.settings_form.register_post_process('bibles_config_updated')

=== modified file 'openlp/plugins/bibles/lib/manager.py'
--- openlp/plugins/bibles/lib/manager.py	2016-04-05 17:10:51 +0000
+++ openlp/plugins/bibles/lib/manager.py	2016-04-09 20:18:30 +0000
@@ -23,7 +23,7 @@
 import logging
 import os
 
-from openlp.core.common import RegistryProperties, AppLocation, Settings, translate, delete_file
+from openlp.core.common import RegistryProperties, AppLocation, Settings, translate, delete_file, UiStrings
 from openlp.plugins.bibles.lib import parse_reference, get_reference_separator, LanguageSelection
 from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta
 from .csvbible import CSVBible
@@ -261,10 +261,8 @@
         if not bible:
             if show_error:
                 self.main_window.information_message(
-                    translate('BiblesPlugin.BibleManager', 'No Bibles Available'),
-                    translate('BiblesPlugin.BibleManager', 'There are no Bibles currently installed. Please use the '
-                              'Import Wizard to install one or more Bibles.')
-                )
+                    ('%s' % UiStrings().BibleNoBiblesTitle),
+                    ('%s' % UiStrings().BibleNoBibles))
             return None
         language_selection = self.get_language_selection(bible)
         ref_list = parse_reference(verse_text, self.db_cache[bible], language_selection, book_ref_id)
@@ -278,21 +276,10 @@
                     'list': get_reference_separator('sep_l_display')}
                 self.main_window.information_message(
                     translate('BiblesPlugin.BibleManager', 'Scripture Reference Error'),
-                    translate('BiblesPlugin.BibleManager', 'Your scripture reference is either not supported by '
-                              'OpenLP or is invalid. Please make sure your reference '
-                              'conforms to one of the following patterns or consult the manual:\n\n'
-                              'Book Chapter\n'
-                              'Book Chapter%(range)sChapter\n'
-                              'Book Chapter%(verse)sVerse%(range)sVerse\n'
-                              'Book Chapter%(verse)sVerse%(range)sVerse%(list)sVerse'
-                              '%(range)sVerse\n'
-                              'Book Chapter%(verse)sVerse%(range)sVerse%(list)sChapter'
-                              '%(verse)sVerse%(range)sVerse\n'
-                              'Book Chapter%(verse)sVerse%(range)sChapter%(verse)sVerse',
-                              'Please pay attention to the appended "s" of the wildcards '
-                              'and refrain from translating the words inside the names in the brackets.')
-                    % reference_separators
-                )
+                    translate('BiblesPlugin.BibleManager', '<strong>OpenLP couldn’t find anything '
+                                                           'with your search.<br><br>'
+                              'Please make sure that your reference follows one of these patterns:</strong><br><br>%s'
+                              % UiStrings().BibleScriptureError % reference_separators))
             return None
 
     def get_language_selection(self, bible):
@@ -326,11 +313,8 @@
         log.debug('BibleManager.verse_search("%s", "%s")', bible, text)
         if not bible:
             self.main_window.information_message(
-                translate('BiblesPlugin.BibleManager', 'No Bibles Available'),
-                translate('BiblesPlugin.BibleManager',
-                          'There are no Bibles currently installed. Please use the Import Wizard to install one or '
-                          'more Bibles.')
-            )
+                ('%s' % UiStrings().BibleNoBiblesTitle),
+                ('%s' % UiStrings().BibleNoBibles))
             return None
         # Check if the bible or second_bible is a web bible.
         web_bible = self.db_cache[bible].get_object(BibleMeta, 'download_source')
@@ -338,22 +322,40 @@
         if second_bible:
             second_web_bible = self.db_cache[second_bible].get_object(BibleMeta, 'download_source')
         if web_bible or second_web_bible:
+            self.application.set_normal_cursor()
             self.main_window.information_message(
                 translate('BiblesPlugin.BibleManager', 'Web Bible cannot be used'),
-                translate('BiblesPlugin.BibleManager', 'Text Search is not available with Web Bibles.')
+                translate('BiblesPlugin.BibleManager', 'Text Search is not available with Web Bibles.\n'
+                                                       'Please use the Scripture Reference Search instead.')
             )
             return None
-        if text:
+        if len(text) - text.count(' ') < 3:
+            self.main_window.information_message(
+                ('%s' % UiStrings().BibleShortSearchTitle),
+                ('%s' % UiStrings().BibleShortSearch))
+            return None
+        elif text:
             return self.db_cache[bible].verse_search(text)
         else:
-            self.main_window.information_message(
-                translate('BiblesPlugin.BibleManager', 'Scripture Reference Error'),
-                translate('BiblesPlugin.BibleManager', 'You did not enter a search keyword.\nYou can separate '
-                          'different keywords by a space to search for all of your keywords and you can separate '
-                          'them by a comma to search for one of them.')
-            )
             return None
 
+    def get_verses_combined(self, bible, verse_text, book_ref_id=False, show_error=True):
+            log.debug('BibleManager.get_verses("%s", "%s")', bible, verse_text)
+            if not bible:
+                if show_error:
+                    if not bible:
+                        self.main_window.information_message(
+                            ('%s' % UiStrings().BibleNoBiblesTitle),
+                            ('%s' % UiStrings().BibleNoBibles))
+                        return None
+                return None
+            language_selection = self.get_language_selection(bible)
+            ref_list = parse_reference(verse_text, self.db_cache[bible], language_selection, book_ref_id)
+            if ref_list:
+                return self.db_cache[bible].get_verses(ref_list, show_error)
+            else:
+                return None
+
     def save_meta_data(self, bible, version, copyright, permissions, book_name_language=None):
         """
         Saves the bibles meta data.

=== modified file 'openlp/plugins/bibles/lib/mediaitem.py'
--- openlp/plugins/bibles/lib/mediaitem.py	2016-04-03 19:44:09 +0000
+++ openlp/plugins/bibles/lib/mediaitem.py	2016-04-09 20:18:30 +0000
@@ -45,6 +45,7 @@
     """
     Reference = 1
     Text = 2
+    Combined = 3
 
 
 class BibleMediaItem(MediaManagerItem):
@@ -309,6 +310,9 @@
         self.plugin.manager.media = self
         self.load_bibles()
         self.quick_search_edit.set_search_types([
+            (BibleSearch.Combined, ':/bibles/bibles_search_combined.png',
+                translate('BiblesPlugin.MediaItem', 'Text or Scripture Reference'),
+                translate('BiblesPlugin.MediaItem', 'Text or Scripture Reference...')),
             (BibleSearch.Reference, ':/bibles/bibles_search_reference.png',
                 translate('BiblesPlugin.MediaItem', 'Scripture Reference'),
                 translate('BiblesPlugin.MediaItem', 'Search Scripture Reference...')),
@@ -423,7 +427,7 @@
     def update_auto_completer(self):
         """
         This updates the bible book completion list for the search field. The completion depends on the bible. It is
-        only updated when we are doing a reference search, otherwise the auto completion list is removed.
+        only updated when we are doing reference or combined search, in text search the completion list is removed.
         """
         log.debug('update_auto_completer')
         # Save the current search type to the configuration.
@@ -431,8 +435,8 @@
         # Save the current bible to the configuration.
         Settings().setValue(self.settings_section + '/quick bible', self.quickVersionComboBox.currentText())
         books = []
-        # We have to do a 'Reference Search'.
-        if self.quick_search_edit.current_search_type() == BibleSearch.Reference:
+        # We have to do a 'Reference Search' (Or as part of Combined Search).
+        if self.quick_search_edit.current_search_type() is not BibleSearch.Text:
             bibles = self.plugin.manager.get_bibles()
             bible = self.quickVersionComboBox.currentText()
             if bible:
@@ -648,10 +652,61 @@
         self.check_search_result()
         self.application.set_normal_cursor()
 
+    def on_quick_reference_search(self):
+        # We are doing a 'Reference Search'.
+        bible = self.quickVersionComboBox.currentText()
+        second_bible = self.quickSecondComboBox.currentText()
+        # Get input from field and replace '. ' with ''
+        # This will check if field has any '.' and removes them. Eg. Gen. 1 = Gen 1 = Genesis 1
+        text_direct = self.quick_search_edit.text()
+        text = text_direct.replace('. ', ' ')
+        # If we are doing "Reference" search, use the search from manager.py
+        if self.quick_search_edit.current_search_type() == BibleSearch.Reference:
+            self.search_results = self.plugin.manager.get_verses(bible, text)
+        # If we are doing "Combined Reference" search, use the get_verses_combined from manager.py (No error included)
+        else:
+            self.search_results = self.plugin.manager.get_verses_combined(bible, text)
+        if second_bible and self.search_results:
+            self.second_search_results = \
+                self.plugin.manager.get_verses(second_bible, text, self.search_results[0].book.book_reference_id)
+
+    def on_quick_text_search(self):
+        # We are doing a 'Text Search'.
+        bible = self.quickVersionComboBox.currentText()
+        second_bible = self.quickSecondComboBox.currentText()
+        text = self.quick_search_edit.text()
+        self.application.set_busy_cursor()
+        bibles = self.plugin.manager.get_bibles()
+        self.search_results = self.plugin.manager.verse_search(bible, second_bible, text)
+        if second_bible and self.search_results:
+            text = []
+            new_search_results = []
+            count = 0
+            passage_not_found = False
+            for verse in self.search_results:
+                db_book = bibles[second_bible].get_book_by_book_ref_id(verse.book.book_reference_id)
+                if not db_book:
+                    log.debug('Passage "%s %d:%d" not found in Second Bible' %
+                              (verse.book.name, verse.chapter, verse.verse))
+                    passage_not_found = True
+                    count += 1
+                    continue
+                new_search_results.append(verse)
+                text.append((verse.book.book_reference_id, verse.chapter, verse.verse, verse.verse))
+            if passage_not_found:
+                self.main_window.information_message(
+                    translate('BiblesPlugin.MediaItem', 'Information'),
+                    translate('BiblesPlugin.MediaItem', 'The second Bible does not contain all the verses '
+                                                        'that are in the main Bible. Only verses found in both Bibles '
+                                                        'will be shown. %d verses have not been included '
+                                                        'in the results.') % count)
+            self.search_results = new_search_results
+            self.second_search_results = bibles[second_bible].get_verses(text)
+
     def on_quick_search_button(self):
         """
-        Does a quick search and saves the search results. Quick search can either be "Reference Search" or
-        "Text Search".
+        Does a quick search and saves the search results. Quick search can be:
+        "Reference Search" or "Text Search" or Combined search.
         """
         log.debug('Quick Search Button clicked')
         self.quickSearchButton.setEnabled(False)
@@ -660,40 +715,52 @@
         second_bible = self.quickSecondComboBox.currentText()
         text = self.quick_search_edit.text()
         if self.quick_search_edit.current_search_type() == BibleSearch.Reference:
-            # We are doing a 'Reference Search'.
-            self.search_results = self.plugin.manager.get_verses(bible, text)
-            if second_bible and self.search_results:
-                self.second_search_results = \
-                    self.plugin.manager.get_verses(second_bible, text, self.search_results[0].book.book_reference_id)
-        else:
-            # We are doing a 'Text Search'.
-            self.application.set_busy_cursor()
-            bibles = self.plugin.manager.get_bibles()
-            self.search_results = self.plugin.manager.verse_search(bible, second_bible, text)
-            if second_bible and self.search_results:
-                text = []
-                new_search_results = []
-                count = 0
-                passage_not_found = False
-                for verse in self.search_results:
-                    db_book = bibles[second_bible].get_book_by_book_ref_id(verse.book.book_reference_id)
-                    if not db_book:
-                        log.debug('Passage "%s %d:%d" not found in Second Bible' %
-                                  (verse.book.name, verse.chapter, verse.verse))
-                        passage_not_found = True
-                        count += 1
-                        continue
-                    new_search_results.append(verse)
-                    text.append((verse.book.book_reference_id, verse.chapter, verse.verse, verse.verse))
-                if passage_not_found:
-                    QtWidgets.QMessageBox.information(
-                        self, translate('BiblesPlugin.MediaItem', 'Information'),
-                        translate('BiblesPlugin.MediaItem', 'The second Bible does not contain all the verses '
-                                  'that are in the main Bible. Only verses found in both Bibles will be shown. %d '
-                                  'verses have not been included in the results.') % count,
-                        QtWidgets.QMessageBox.StandardButtons(QtWidgets.QMessageBox.Ok))
-                self.search_results = new_search_results
-                self.second_search_results = bibles[second_bible].get_verses(text)
+            # We are doing a 'Reference Search'. (Get script from def on_quick_reference_search)
+            self.on_quick_reference_search()
+        elif self.quick_search_edit.current_search_type() == BibleSearch.Text:
+            # We are doing a 'Text Search'. (Get script from def on_quick_text_search)
+            self.on_quick_text_search()
+        # Combined search, starting with reference search.
+        elif self.quick_search_edit.current_search_type() == BibleSearch.Combined:
+            self.on_quick_reference_search()
+        # If keyword is shorter than 3 (not including spaces), message is given and search is finalized.
+        # It's actually to find verses with less than 3 chars (Eg. G1 = Genesis 1) thus this error is not shown if
+        # any results are found. This check needs to be here in order to avoid duplicate errors.
+        # if no Bibles are installed, this message is not shown - "No bibles" message is whon instead. (and bible)
+            if not self.search_results and len(text) - text.count(' ') < 3 and bible:
+                self.main_window.information_message(
+                    ('%s' % UiStrings().BibleShortSearchTitle),
+                    ('%s' % UiStrings().BibleShortSearch))
+            # Text search starts here if no reference was found and keyword is longer than 2.
+            # This is required in order to avoid duplicate error messages for short keywords.
+            if not self.search_results and len(text) - text.count(' ') > 2 and bible:
+                self.on_quick_text_search()
+                # If no Text or Reference is found, message is given.
+                if not self.search_results and not \
+                        Settings().value(self.settings_section + '/hide combined quick error'):
+                        self.application.set_normal_cursor()
+                        reference_separators = {
+                            'verse': get_reference_separator('sep_v_display'),
+                            'range': get_reference_separator('sep_r_display'),
+                            'list': get_reference_separator('sep_l_display')}
+                        self.main_window.information_message(translate('BiblesPlugin.BibleManager', 'Nothing found'),
+                                                             translate('BiblesPlugin.BibleManager', '<strong>OpenLP '
+                                                                                                    'couldn’t find '
+                                                                                                    'anything with your'
+                                                                                                    ' search.</strong>'
+                                                                                                    '<br><br>'
+                                                                                                    'If you tried to '
+                                                                                                    'search with '
+                                                                                                    'Scripture '
+                                                                                                    'Reference, please '
+                                                                                                    'make<br>sure that '
+                                                                                                    'your reference '
+                                                                                                    'follows one of '
+                                                                                                    'these patterns:'
+                                                                                                    '<br><br>%s'
+                                                                       % UiStrings().BibleScriptureError %
+                                                                       reference_separators))
+        # Finalizing the search
         if not self.quickLockButton.isChecked():
             self.list_view.clear()
         if self.list_view.count() != 0 and self.search_results:

=== modified file 'resources/images/openlp-2.qrc'
--- resources/images/openlp-2.qrc	2016-02-06 17:50:58 +0000
+++ resources/images/openlp-2.qrc	2016-04-09 20:18:30 +0000
@@ -30,6 +30,7 @@
     <file>image_new_group.png</file>
   </qresource>
   <qresource prefix="bibles">
+    <file>bibles_search_combined.png</file>
     <file>bibles_search_text.png</file>
     <file>bibles_search_reference.png</file>
     <file>bibles_upgrade_alert.png</file>


References