diff --git a/openlp/core/common/uistrings.py b/openlp/core/common/uistrings.py index fcaf04f2b..96cfb90a8 100644 --- a/openlp/core/common/uistrings.py +++ b/openlp/core/common/uistrings.py @@ -152,21 +152,30 @@ class UiStrings(object): 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, for an example: Joh 3 = John 3', - '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 search you have entered is empty or shorter ' 'than 3 characters long.
Please try again with ' 'a longer search.


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.') + import itertools + #b = book, c = chapter, ve = verse + bc = translate('OpenLP.Ui', 'Book Chapter') + cha = translate('OpenLP.Ui', 'Chapter') + ver = translate('OpenLP.Ui', '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_items = [bc, interval, psalm, ' 23
', + bc, '%(range)s', cha, interval, psalm, ' 23%(range)s24
', + bc, '%(verse)s', ver, '%(range)s', ver, interval, psalm, ' 23%(verse)s1%(range)s2
', + bc, '%(verse)s', ver, '%(range)s', ver, '%(list)s', ver, '%(range)s', ver, interval, psalm, + ' 23%(verse)s1%(range)s2%(list)s5%(range)s6
', + 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
', + bc, '%(verse)s', ver, '%(range)s', cha, '%(verse)s', ver, interval, psalm, + ' 23%(verse)s1%(range)s24%(verse)s1

', may_shorten] + itertools.chain.from_iterable(itertools.repeat(x, 1) if isinstance(x, str) else x for x in bible_items) + bible_scripture_error_all = ''.join(str(e) for e in bible_items) + self.BibleScriptureError = bible_scripture_error_all diff --git a/openlp/plugins/bibles/lib/manager.py b/openlp/plugins/bibles/lib/manager.py index 68410bd0b..3b884ba69 100644 --- a/openlp/plugins/bibles/lib/manager.py +++ b/openlp/plugins/bibles/lib/manager.py @@ -281,7 +281,7 @@ 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 these patterns:
%s' + 'Please make sure that your reference follows one of these patterns:

%s' % UiStrings().BibleScriptureError % reference_separators)) return None diff --git a/openlp/plugins/bibles/lib/mediaitem.py b/openlp/plugins/bibles/lib/mediaitem.py index 48e3a1001..fc970bdbf 100644 --- a/openlp/plugins/bibles/lib/mediaitem.py +++ b/openlp/plugins/bibles/lib/mediaitem.py @@ -752,7 +752,8 @@ class BibleMediaItem(MediaManagerItem): 'make
sure that ' 'your reference ' 'follows one of ' - 'these patterns:%s' + 'these patterns:' + '

%s' % UiStrings().BibleScriptureError % reference_separators)) # Finalizing the search