diff --git a/openlp/core/common/uistrings.py b/openlp/core/common/uistrings.py
index 3f221ab08..2766b3117 100644
--- a/openlp/core/common/uistrings.py
+++ b/openlp/core/common/uistrings.py
@@ -151,3 +151,27 @@ class UiStrings(object):
self.Version = translate('OpenLP.Ui', 'Version')
self.View = translate('OpenLP.Ui', 'View')
self.ViewMode = translate('OpenLP.Ui', 'View Mode')
+ self.BibleShortSearchTitle = translate('OpenLP.Ui', 'Search is Empty or too Short')
+ self.BibleScriptureError = translate('OpenLP.Ui', '
Book Chapter | John 3:16
'
+ 'Book Chapter%(range)sChapter | John 3%(range)s4
'
+ 'Book Chapter%(verse)sVerse%(range)sVerse | John 3%(verse)'
+ 's16%(range)s17
Book Chapter%(verse)sVerse%(range)sVerse%'
+ '(list)sVerse%(range)sVerse | John 3%(verse)s16-17%(list)s20%'
+ '(range)s22
Book Chapter%(verse)sVerse%(range)sVerse%'
+ '(list)sChapter%(verse)sVerse%(range)sVerse | John 3%(verse)'
+ 's16%(range)s17%(list)s5%(verse)s7%(range)s9
Book Chapter%'
+ '(verse)sVerse%(range)sChapter%(verse)sVerse | John 3%(verse)'
+ 's16%(range)s4%(verse)s2
Book names may be shortened '
+ 'from full names
but must not contain any '
+ 'additional dots.', 'Please pay attention to the appended'
+ '"s" of the wildcards and refrain from '
+ 'translating the words inside the names'
+ ' in the brackets.')
+ self.BibleShortSearch = translate('OpenLP.Ui', 'The keyword you have entered is empty or shorter '
+ 'than 3 characters long.\nPlease try again with '
+ 'a longer keyword.\n\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.')
+
+
+
diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py
index a44c4e395..c726c6032 100644
--- a/openlp/plugins/bibles/lib/manager.py
+++ b/openlp/plugins/bibles/lib/manager.py
@@ -23,7 +23,7 @@
import logging
import os
-from openlp.core.common import RegistryProperties, AppLocation, Settings, translate
+from openlp.core.common import RegistryProperties, AppLocation, Settings, UiStrings, translate
from openlp.core.utils import delete_file
from openlp.plugins.bibles.lib import parse_reference, get_reference_separator, LanguageSelection
from openlp.plugins.bibles.lib.db import BibleDB, BibleMeta
@@ -281,22 +281,8 @@ class BibleManager(RegistryProperties):
translate('BiblesPlugin.BibleManager', 'Scripture Reference Error'),
translate('BiblesPlugin.BibleManager', 'OpenLP couldn’t find anything '
'with your search.
'
- 'Please make sure that your reference follows one of the following patterns:
'
- 'Book Chapter | John 3:16
'
- 'Book Chapter%(range)sChapter | John 3%(range)s4
'
- 'Book Chapter%(verse)sVerse%(range)sVerse | John 3%(verse)s16%(range)s17
'
- 'Book Chapter%(verse)sVerse%(range)sVerse%(list)sVerse'
- '%(range)sVerse | John 3%(verse)s16-17%(list)s20%(range)s22
'
- 'Book Chapter%(verse)sVerse%(range)sVerse%(list)sChapter'
- '%(verse)sVerse%(range)sVerse | John 3%(verse)s16%(range)s17%'
- '(list)s5%(verse)s7%(range)s9
'
- 'Book Chapter%(verse)sVerse%(range)sChapter%(verse)sVerse'
- ' | John 3%(verse)s16%(range)s4%(verse)s2
'
- 'Book names may be shortened from full names
but must not contain any additional dots.'
- , 'Please pay attention to the appended "s" of the wildcards '
- 'and refrain from translating the words inside the names in the brackets.')
- % reference_separators
- )
+ 'Please make sure that your reference follows one of these patterns:%s'
+ % UiStrings().BibleScriptureError % reference_separators))
return None
def get_language_selection(self, bible):
@@ -350,12 +336,8 @@ class BibleManager(RegistryProperties):
return None
if len(text) < 3 or str.isspace(text):
self.main_window.information_message(
- translate('BiblesPlugin.BibleManager', 'Keyword is too short'),
- translate('BiblesPlugin.BibleManager', 'The keyword you have entered is empty or shorter '
- 'than 3 characters long. Please try again with '
- 'a longer keyword.\n\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.'))
+ ('%s' % UiStrings().BibleShortSearchTitle),
+ ('%s' % UiStrings().BibleShortSearch))
return None
elif text:
return self.db_cache[bible].verse_search(text)
diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py
index 1a987430e..5895bb1d5 100644
--- a/openlp/plugins/bibles/lib/mediaitem.py
+++ b/openlp/plugins/bibles/lib/mediaitem.py
@@ -654,8 +654,8 @@ class BibleMediaItem(MediaManagerItem):
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)
@@ -707,12 +707,8 @@ class BibleMediaItem(MediaManagerItem):
# This needs to be here in order to avoid deadlock/duplicate errors.
if len(text) < 3 or str.isspace(text):
self.main_window.information_message(
- translate('BiblesPlugin.BibleManager', 'Search is Empty or too Short'),
- translate('BiblesPlugin.BibleManager', 'The Search you have entered is empty or shorter '
- 'than 3 characters long. Please try again with '
- 'a longer keyword.\n\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.'))
+ ('%s' % UiStrings().BibleShortSearchTitle),
+ ('%s' % UiStrings().BibleShortSearch))
if not self.quickLockButton.isChecked():
self.list_view.clear()
if self.list_view.count() != 0 and self.search_results:
@@ -763,23 +759,8 @@ class BibleMediaItem(MediaManagerItem):
translate('BiblesPlugin.BibleManager', 'OpenLP couldn’t find '
'anything with your search.
'
'If you tried to search with Scripture Reference, please make sure that '
- 'your reference follows one of the following patterns:
'
- 'Book Chapter | John 3:16
'
- 'Book Chapter%(range)sChapter | John 3%(range)s4
'
- 'Book Chapter%(verse)sVerse%(range)sVerse | John 3%(verse)s16%(range)s17
'
- 'Book Chapter%(verse)sVerse%(range)sVerse%(list)sVerse'
- '%(range)sVerse | John 3%(verse)s16-17%(list)s20%(range)s22
'
- 'Book Chapter%(verse)sVerse%(range)sVerse%(list)sChapter'
- '%(verse)sVerse%(range)sVerse | John 3%(verse)s16%(range)s17%'
- '(list)s5%(verse)s7%(range)s9
'
- 'Book Chapter%(verse)sVerse%(range)sChapter%(verse)sVerse '
- '| John 3%(verse)s16%(range)s4%(verse)s2
'
- 'Book names may be shortened from full names
but'
- ' must not contain any additional dots.',
- 'Please pay attention to the appended "s" of the wildcards '
- 'and refrain from translating the words inside the names in the brackets.')
- % reference_separators
- )
+ 'your reference follows one of these patterns:%s'
+ % UiStrings().BibleScriptureError % reference_separators))
# Finalizing the search
if not self.quickLockButton.isChecked():
self.list_view.clear()