forked from openlp/openlp
HEAD
This commit is contained in:
commit
054fa6fbaf
@ -48,9 +48,9 @@ import sys
|
|||||||
from inspect import getargspec
|
from inspect import getargspec
|
||||||
|
|
||||||
__version__ = "N/A"
|
__version__ = "N/A"
|
||||||
build_date = "Mon Sep 10 16:51:25 2012"
|
build_date = "Fri Sep 28 22:48:50 2012"
|
||||||
|
|
||||||
if sys.version_info.major > 2:
|
if sys.version_info[0] > 2:
|
||||||
str = str
|
str = str
|
||||||
unicode = str
|
unicode = str
|
||||||
bytes = bytes
|
bytes = bytes
|
||||||
|
@ -160,10 +160,12 @@ class BGExtract(object):
|
|||||||
verse = verse.strip()
|
verse = verse.strip()
|
||||||
try:
|
try:
|
||||||
verse = int(verse)
|
verse = int(verse)
|
||||||
except (TypeError, ValueError):
|
except ValueError:
|
||||||
verse_parts = verse.split(u'-')
|
verse_parts = verse.split(u'-')
|
||||||
if len(verse_parts) > 1:
|
if len(verse_parts) > 1:
|
||||||
verse = int(verse_parts[0])
|
verse = int(verse_parts[0])
|
||||||
|
except TypeError:
|
||||||
|
log.warn(u'Illegal verse number: %s', unicode(raw_verse_num))
|
||||||
verses.append((verse, text))
|
verses.append((verse, text))
|
||||||
verse_list = {}
|
verse_list = {}
|
||||||
for verse, text in verses[::-1]:
|
for verse, text in verses[::-1]:
|
||||||
@ -194,6 +196,10 @@ class BGExtract(object):
|
|||||||
try:
|
try:
|
||||||
clean_verse_num = int(str(raw_verse_num))
|
clean_verse_num = int(str(raw_verse_num))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
|
verse_parts = str(raw_verse_num).split(u'-')
|
||||||
|
if len(verse_parts) > 1:
|
||||||
|
clean_verse_num = int(verse_parts[0])
|
||||||
|
except TypeError:
|
||||||
log.warn(u'Illegal verse number: %s', unicode(raw_verse_num))
|
log.warn(u'Illegal verse number: %s', unicode(raw_verse_num))
|
||||||
if clean_verse_num:
|
if clean_verse_num:
|
||||||
verse_text = raw_verse_num.next
|
verse_text = raw_verse_num.next
|
||||||
|
@ -366,15 +366,20 @@ 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:
|
if not language_selection or \
|
||||||
try:
|
language_selection.value == "None" or \
|
||||||
language_selection = int(language_selection.value)
|
language_selection.value == "-1":
|
||||||
except (ValueError, TypeError):
|
# If None is returned, it's not the singleton object but a
|
||||||
language_selection = LanguageSelection.Application
|
# BibleMeta object with the value "None"
|
||||||
if language_selection is None or language_selection == -1:
|
|
||||||
language_selection = Settings().value(
|
language_selection = Settings().value(
|
||||||
self.settingsSection + u'/bookname language',
|
self.settingsSection + u'/book name language',
|
||||||
QtCore.QVariant(0)).toInt()[0]
|
QtCore.QVariant(0)).toInt()[0]
|
||||||
|
else:
|
||||||
|
language_selection = language_selection.value
|
||||||
|
try:
|
||||||
|
language_selection = int(language_selection)
|
||||||
|
except (ValueError, TypeError):
|
||||||
|
language_selection = LanguageSelection.Application
|
||||||
return language_selection
|
return language_selection
|
||||||
|
|
||||||
def verse_search(self, bible, second_bible, text):
|
def verse_search(self, bible, second_bible, text):
|
||||||
|
@ -103,10 +103,20 @@ class OpenSongBible(BibleDB):
|
|||||||
for verse in chapter.v:
|
for verse in chapter.v:
|
||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
break
|
break
|
||||||
|
verse_number = 0
|
||||||
|
try:
|
||||||
|
verse_number = int(verse.attrib[u'n'])
|
||||||
|
except ValueError:
|
||||||
|
verse_parts = verse.attrib[u'n'].split(u'-')
|
||||||
|
if len(verse_parts) > 1:
|
||||||
|
verse_number = int(verse_parts[0])
|
||||||
|
except TypeError:
|
||||||
|
log.warn(u'Illegal verse number: %s',
|
||||||
|
unicode(verse.attrib[u'n']))
|
||||||
self.create_verse(
|
self.create_verse(
|
||||||
db_book.id,
|
db_book.id,
|
||||||
int(chapter.attrib[u'n'].split()[-1]),
|
int(chapter.attrib[u'n'].split()[-1]),
|
||||||
int(verse.attrib[u'n']),
|
verse_number,
|
||||||
unicode(self.get_text(verse)))
|
unicode(self.get_text(verse)))
|
||||||
self.wizard.incrementProgressBar(unicode(translate(
|
self.wizard.incrementProgressBar(unicode(translate(
|
||||||
'BiblesPlugin.Opensong', 'Importing %s %s...',
|
'BiblesPlugin.Opensong', 'Importing %s %s...',
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2926
resources/i18n/fi.ts
2926
resources/i18n/fi.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2286
resources/i18n/id.ts
2286
resources/i18n/id.ts
File diff suppressed because it is too large
Load Diff
2870
resources/i18n/it.ts
2870
resources/i18n/it.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3308
resources/i18n/ko.ts
3308
resources/i18n/ko.ts
File diff suppressed because it is too large
Load Diff
3184
resources/i18n/nb.ts
3184
resources/i18n/nb.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
3534
resources/i18n/pl.ts
3534
resources/i18n/pl.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1668
resources/i18n/ru.ts
1668
resources/i18n/ru.ts
File diff suppressed because it is too large
Load Diff
2912
resources/i18n/sk.ts
2912
resources/i18n/sk.ts
File diff suppressed because it is too large
Load Diff
3542
resources/i18n/sq.ts
3542
resources/i18n/sq.ts
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user