show list to choose a bookname in selected application language

This commit is contained in:
Armin Köhler 2012-04-18 22:44:09 +02:00
parent 89e0b0b00c
commit ef957caf55

View File

@ -36,6 +36,7 @@ from openlp.core.lib import translate
from openlp.core.lib.ui import critical_error_message_box from openlp.core.lib.ui import critical_error_message_box
from openlp.plugins.bibles.forms.booknamedialog import \ from openlp.plugins.bibles.forms.booknamedialog import \
Ui_BookNameDialog Ui_BookNameDialog
from openlp.plugins.bibles.lib import BibleStrings
from openlp.plugins.bibles.lib.db import BiblesResourcesDB from openlp.plugins.bibles.lib.db import BiblesResourcesDB
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
@ -54,6 +55,7 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
QDialog.__init__(self, parent) QDialog.__init__(self, parent)
self.setupUi(self) self.setupUi(self)
self.customSignals() self.customSignals()
self.booknames = BibleStrings().Booknames
def customSignals(self): def customSignals(self):
""" """
@ -97,7 +99,8 @@ class BookNameForm(QDialog, Ui_BookNameDialog):
and item[u'testament_id'] == 3: and item[u'testament_id'] == 3:
addBook = False addBook = False
if addBook: if addBook:
self.correspondingComboBox.addItem(item[u'name']) self.correspondingComboBox.addItem(
self.booknames[item[u'abbreviation']])
def exec_(self, name, books, maxbooks): def exec_(self, name, books, maxbooks):
self.books = books self.books = books