translations for OSIS bibles

This commit is contained in:
Tim Bentley 2009-09-26 15:36:08 +01:00
parent 9e1b9031c1
commit 459a728443
2 changed files with 5 additions and 8 deletions

View File

@ -52,8 +52,6 @@ class AuditDeleteForm(QtGui.QDialog, Ui_AuditDeleteDialog):
QtGui.QMessageBox.Cancel) QtGui.QMessageBox.Cancel)
if ret == QtGui.QMessageBox.Ok: if ret == QtGui.QMessageBox.Ok:
qDeleteDate = self.DeleteCalendar.selectedDate() qDeleteDate = self.DeleteCalendar.selectedDate()
print qDeleteDate
deleteDate = date(qDeleteDate.year(), qDeleteDate.month(), qDeleteDate.day()) deleteDate = date(qDeleteDate.year(), qDeleteDate.month(), qDeleteDate.day())
print deleteDate
self.auditmanager.delete_to_date(deleteDate) self.auditmanager.delete_to_date(deleteDate)
self.close() self.close()

View File

@ -30,7 +30,7 @@ import codecs
from PyQt4 import QtCore from PyQt4 import QtCore
from openlp.core.lib import Receiver from openlp.core.lib import translate, Receiver
class BibleOSISImpl(): class BibleOSISImpl():
""" """
@ -51,6 +51,7 @@ class BibleOSISImpl():
``bibledb`` ``bibledb``
A reference to a Bible database object. A reference to a Bible database object.
""" """
log.info(u'BibleOSISImpl Initialising')
self.bibledb = bibledb self.bibledb = bibledb
# books of the bible linked to bibleid {osis , name} # books of the bible linked to bibleid {osis , name}
self.booksOfBible = {} self.booksOfBible = {}
@ -90,7 +91,6 @@ class BibleOSISImpl():
detect_file.close() detect_file.close()
osis = codecs.open(osisfile_record, u'r', details['encoding']) osis = codecs.open(osisfile_record, u'r', details['encoding'])
book_ptr = None book_ptr = None
#id = 0
count = 0 count = 0
verseText = u'<verse osisID=' verseText = u'<verse osisID='
testament = 1 testament = 1
@ -123,7 +123,6 @@ class BibleOSISImpl():
while pos > -1: while pos > -1:
epos = text.find(u'<Fi>', pos) epos = text.find(u'<Fi>', pos)
if epos == -1: # TODO if epos == -1: # TODO
#print "Y", search_text, e
pos = -1 pos = -1
else: else:
text = text[:pos] + text[epos + 4: ] text = text[:pos] + text[epos + 4: ]
@ -132,7 +131,6 @@ class BibleOSISImpl():
while pos > -1: while pos > -1:
epos = text.find(u'<Rf>', pos) epos = text.find(u'<Rf>', pos)
text = text[:pos] + text[epos + 4: ] text = text[:pos] + text[epos + 4: ]
#print "X", pos, epos, text
pos = text.find(u'<RF>') pos = text.find(u'<RF>')
# split up the reference # split up the reference
p = ref.split(u'.', 3) p = ref.split(u'.', 3)
@ -149,8 +147,9 @@ class BibleOSISImpl():
testament += 1 testament += 1
book_ptr = p[0] book_ptr = p[0]
book = self.bibledb.create_book( book = self.bibledb.create_book(
self.booksOfBible[p[0]], unicode(translate(u'BibleBooks', self.booksOfBible[p[0]])),
self.abbrevOfBible[p[0]], testament) unicode(translate(u'BibleBooks', self.abbrevOfBible[p[0]])),
testament)
dialogobject.incrementProgressBar( dialogobject.incrementProgressBar(
self.booksOfBible[p[0]]) self.booksOfBible[p[0]])
Receiver().send_message(u'process_events') Receiver().send_message(u'process_events')