forked from openlp/openlp
r1971 + conflict
This commit is contained in:
commit
d15bb74b73
@ -329,12 +329,7 @@ class BibleManager(object):
|
|||||||
'Import Wizard to install one or more Bibles.')
|
'Import Wizard to install one or more Bibles.')
|
||||||
})
|
})
|
||||||
return None
|
return None
|
||||||
language_selection = self.get_meta_data(bible, u'book_name_language')
|
language_selection = self.get_language_selection(bible)
|
||||||
if language_selection:
|
|
||||||
language_selection = int(language_selection.value)
|
|
||||||
if language_selection is None or language_selection == -1:
|
|
||||||
language_selection = Settings().value(
|
|
||||||
self.settingsSection + u'/bookname language', 0)
|
|
||||||
reflist = parse_reference(versetext, self.db_cache[bible],
|
reflist = parse_reference(versetext, self.db_cache[bible],
|
||||||
language_selection, book_ref_id)
|
language_selection, book_ref_id)
|
||||||
if reflist:
|
if reflist:
|
||||||
@ -376,11 +371,15 @@ class BibleManager(object):
|
|||||||
"""
|
"""
|
||||||
log.debug(u'BibleManager.get_language_selection("%s")', bible)
|
log.debug(u'BibleManager.get_language_selection("%s")', bible)
|
||||||
language_selection = self.get_meta_data(bible, u'book_name_language')
|
language_selection = self.get_meta_data(bible, u'book_name_language')
|
||||||
if language_selection and language_selection.value != u'None':
|
if language_selection:
|
||||||
return int(language_selection.value)
|
try:
|
||||||
if language_selection is None or language_selection.value == u'None':
|
language_selection = int(language_selection.value)
|
||||||
return Settings().value(
|
except (ValueError, TypeError):
|
||||||
self.settingsSection + u'/bookname language', 0)
|
language_selection = LanguageSelection.Application
|
||||||
|
if language_selection is None or language_selection == -1:
|
||||||
|
language_selection = Settings().value(self.settingsSection +
|
||||||
|
u'/bookname language', LanguageSelection.Bible)
|
||||||
|
return language_selection
|
||||||
|
|
||||||
def verse_search(self, bible, second_bible, text):
|
def verse_search(self, bible, second_bible, text):
|
||||||
"""
|
"""
|
||||||
|
@ -839,10 +839,11 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
items = []
|
items = []
|
||||||
language_selection = self.plugin.manager.get_language_selection(bible)
|
language_selection = self.plugin.manager.get_language_selection(bible)
|
||||||
for count, verse in enumerate(search_results):
|
for count, verse in enumerate(search_results):
|
||||||
|
book = None
|
||||||
if language_selection == LanguageSelection.Bible:
|
if language_selection == LanguageSelection.Bible:
|
||||||
book = verse.book.name
|
book = verse.book.name
|
||||||
elif language_selection == LanguageSelection.Application:
|
elif language_selection == LanguageSelection.Application:
|
||||||
book_names = BibleStrings().Booknames
|
book_names = BibleStrings().BookNames
|
||||||
data = BiblesResourcesDB.get_book_by_id(
|
data = BiblesResourcesDB.get_book_by_id(
|
||||||
verse.book.book_reference_id)
|
verse.book.book_reference_id)
|
||||||
book = unicode(book_names[data[u'abbreviation']])
|
book = unicode(book_names[data[u'abbreviation']])
|
||||||
|
Loading…
Reference in New Issue
Block a user