forked from openlp/openlp
Fix 1.9.6 String errors
bzr-revno: 1685
This commit is contained in:
commit
72cd870e48
@ -209,7 +209,7 @@ class Ui_FirstTimeWizard(object):
|
|||||||
'Select the Plugins you wish to use. '))
|
'Select the Plugins you wish to use. '))
|
||||||
self.songsCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
|
self.songsCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Songs'))
|
||||||
self.customCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
self.customCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
||||||
'Custom Text'))
|
'Custom Slides'))
|
||||||
self.bibleCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Bible'))
|
self.bibleCheckBox.setText(translate('OpenLP.FirstTimeWizard', 'Bible'))
|
||||||
self.imageCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
self.imageCheckBox.setText(translate('OpenLP.FirstTimeWizard',
|
||||||
'Images'))
|
'Images'))
|
||||||
|
@ -44,7 +44,7 @@ class GeneralTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
self.screens = ScreenList.get_instance()
|
self.screens = ScreenList.get_instance()
|
||||||
self.icon_path = u':/icon/openlp-logo-16x16.png'
|
self.icon_path = u':/icon/openlp-logo-16x16.png'
|
||||||
generalTranslated = translate('GeneralTab', 'General')
|
generalTranslated = translate('OpenLP.GeneralTab', 'General')
|
||||||
SettingsTab.__init__(self, parent, u'General', generalTranslated)
|
SettingsTab.__init__(self, parent, u'General', generalTranslated)
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
|
@ -37,7 +37,7 @@ class ThemesTab(SettingsTab):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, parent, mainwindow):
|
def __init__(self, parent, mainwindow):
|
||||||
self.mainwindow = mainwindow
|
self.mainwindow = mainwindow
|
||||||
generalTranslated = translate('ThemeTab', 'Themes')
|
generalTranslated = translate('OpenLP.ThemesTab', 'Themes')
|
||||||
SettingsTab.__init__(self, parent, u'Themes', generalTranslated)
|
SettingsTab.__init__(self, parent, u'Themes', generalTranslated)
|
||||||
self.icon_path = u':/themes/theme_new.png'
|
self.icon_path = u':/themes/theme_new.png'
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class AlertsPlugin(Plugin):
|
|||||||
def about(self):
|
def about(self):
|
||||||
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
about_text = translate('AlertsPlugin', '<strong>Alerts Plugin</strong>'
|
||||||
'<br />The alert plugin controls the displaying of nursery alerts '
|
'<br />The alert plugin controls the displaying of nursery alerts '
|
||||||
'on the display screen')
|
'on the display screen.')
|
||||||
return about_text
|
return about_text
|
||||||
|
|
||||||
def setPluginTextStrings(self):
|
def setPluginTextStrings(self):
|
||||||
|
@ -176,8 +176,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
# We found '<>' in the alert text, but the ParameterEdit field is empty.
|
# We found '<>' in the alert text, but the ParameterEdit field is empty.
|
||||||
if text.find(u'<>') != -1 and not self.parameterEdit.text() and \
|
if text.find(u'<>') != -1 and not self.parameterEdit.text() and \
|
||||||
QtGui.QMessageBox.question(self,
|
QtGui.QMessageBox.question(self,
|
||||||
translate('AlertPlugin.AlertForm', 'No Parameter Found'),
|
translate('AlertsPlugin.AlertForm', 'No Parameter Found'),
|
||||||
translate('AlertPlugin.AlertForm', 'You have not entered a '
|
translate('AlertsPlugin.AlertForm', 'You have not entered a '
|
||||||
'parameter to be replaced.\nDo you want to continue anyway?'),
|
'parameter to be replaced.\nDo you want to continue anyway?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
@ -187,8 +187,8 @@ class AlertForm(QtGui.QDialog, Ui_AlertDialog):
|
|||||||
# in the alert text.
|
# in the alert text.
|
||||||
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
elif text.find(u'<>') == -1 and self.parameterEdit.text() and \
|
||||||
QtGui.QMessageBox.question(self,
|
QtGui.QMessageBox.question(self,
|
||||||
translate('AlertPlugin.AlertForm', 'No Placeholder Found'),
|
translate('AlertsPlugin.AlertForm', 'No Placeholder Found'),
|
||||||
translate('AlertPlugin.AlertForm', 'The alert text does not'
|
translate('AlertsPlugin.AlertForm', 'The alert text does not'
|
||||||
' contain \'<>\'.\nDo you want to continue anyway?'),
|
' contain \'<>\'.\nDo you want to continue anyway?'),
|
||||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.No |
|
||||||
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
QtGui.QMessageBox.Yes)) == QtGui.QMessageBox.No:
|
||||||
|
@ -117,9 +117,9 @@ class BiblePlugin(Plugin):
|
|||||||
self.toolsUpgradeItem = QtGui.QAction(tools_menu)
|
self.toolsUpgradeItem = QtGui.QAction(tools_menu)
|
||||||
self.toolsUpgradeItem.setObjectName(u'toolsUpgradeItem')
|
self.toolsUpgradeItem.setObjectName(u'toolsUpgradeItem')
|
||||||
self.toolsUpgradeItem.setText(
|
self.toolsUpgradeItem.setText(
|
||||||
translate('BiblePlugin', '&Upgrade older Bibles'))
|
translate('BiblesPlugin', '&Upgrade older Bibles'))
|
||||||
self.toolsUpgradeItem.setStatusTip(
|
self.toolsUpgradeItem.setStatusTip(
|
||||||
translate('BiblePlugin', 'Upgrade the Bible databases to the '
|
translate('BiblesPlugin', 'Upgrade the Bible databases to the '
|
||||||
'latest format.'))
|
'latest format.'))
|
||||||
tools_menu.addAction(self.toolsUpgradeItem)
|
tools_menu.addAction(self.toolsUpgradeItem)
|
||||||
QtCore.QObject.connect(self.toolsUpgradeItem,
|
QtCore.QObject.connect(self.toolsUpgradeItem,
|
||||||
|
@ -413,7 +413,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if not backup_path:
|
if not backup_path:
|
||||||
critical_error_message_box(UiStrings().EmptyField,
|
critical_error_message_box(UiStrings().EmptyField,
|
||||||
translate('BiblesPlugin.UpgradeWizardForm',
|
translate('BiblesPlugin.UpgradeWizardForm',
|
||||||
'You need to specify a Backup Directory for your '
|
'You need to specify a backup directory for your '
|
||||||
'Bibles.'))
|
'Bibles.'))
|
||||||
self.backupDirectoryEdit.setFocus()
|
self.backupDirectoryEdit.setFocus()
|
||||||
return False
|
return False
|
||||||
@ -520,7 +520,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
OpenLPWizard.preWizard(self)
|
OpenLPWizard.preWizard(self)
|
||||||
self.progressLabel.setText(translate(
|
self.progressLabel.setText(translate(
|
||||||
'BiblesPlugin.UpgradeWizardForm',
|
'BiblesPlugin.UpgradeWizardForm',
|
||||||
'Starting Bible upgrade...'))
|
'Starting upgrade...'))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
|
|
||||||
def performWizard(self):
|
def performWizard(self):
|
||||||
@ -532,7 +532,7 @@ class BibleUpgradeForm(OpenLPWizard):
|
|||||||
if self.maxBibles == 0:
|
if self.maxBibles == 0:
|
||||||
self.progressLabel.setText(
|
self.progressLabel.setText(
|
||||||
translate('BiblesPlugin.UpgradeWizardForm', 'There are no '
|
translate('BiblesPlugin.UpgradeWizardForm', 'There are no '
|
||||||
'Bibles available to upgrade.'))
|
'Bibles that need to be upgraded.'))
|
||||||
self.progressBar.hide()
|
self.progressBar.hide()
|
||||||
return
|
return
|
||||||
self.maxBibles = 0
|
self.maxBibles = 0
|
||||||
|
@ -115,7 +115,8 @@ class CSVBible(BibleDB):
|
|||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
break
|
break
|
||||||
self.wizard.incrementProgressBar(unicode(
|
self.wizard.incrementProgressBar(unicode(
|
||||||
translate('BibleDB.Wizard', 'Importing books... %s')) %
|
translate('BiblesPlugin.CSVBible',
|
||||||
|
'Importing books... %s')) %
|
||||||
unicode(line[2], details['encoding']))
|
unicode(line[2], details['encoding']))
|
||||||
book_ref_id = self.get_book_ref_id_by_name(
|
book_ref_id = self.get_book_ref_id_by_name(
|
||||||
unicode(line[2], details['encoding']), 67, language_id)
|
unicode(line[2], details['encoding']), 67, language_id)
|
||||||
@ -155,7 +156,7 @@ class CSVBible(BibleDB):
|
|||||||
book = self.get_book(line_book)
|
book = self.get_book(line_book)
|
||||||
book_ptr = book.name
|
book_ptr = book.name
|
||||||
self.wizard.incrementProgressBar(unicode(translate(
|
self.wizard.incrementProgressBar(unicode(translate(
|
||||||
'BibleDB.Wizard', 'Importing verses from %s...',
|
'BiblesPlugin.CSVBible', 'Importing verses from %s...',
|
||||||
'Importing verses from <book name>...')) % book.name)
|
'Importing verses from <book name>...')) % book.name)
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
try:
|
try:
|
||||||
@ -163,7 +164,7 @@ class CSVBible(BibleDB):
|
|||||||
except UnicodeError:
|
except UnicodeError:
|
||||||
verse_text = unicode(line[3], u'cp1252')
|
verse_text = unicode(line[3], u'cp1252')
|
||||||
self.create_verse(book.id, line[1], line[2], verse_text)
|
self.create_verse(book.id, line[1], line[2], verse_text)
|
||||||
self.wizard.incrementProgressBar(translate('BibleDB.Wizard',
|
self.wizard.incrementProgressBar(translate('BiblesPlugin.CSVBible',
|
||||||
'Importing verses... done.'))
|
'Importing verses... done.'))
|
||||||
Receiver.send_message(u'openlp_process_events')
|
Receiver.send_message(u'openlp_process_events')
|
||||||
self.session.commit()
|
self.session.commit()
|
||||||
|
@ -69,10 +69,10 @@ class BGExtract(object):
|
|||||||
``chapter``
|
``chapter``
|
||||||
Chapter number.
|
Chapter number.
|
||||||
"""
|
"""
|
||||||
log.debug(u'BGExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
log.debug(u'BGExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
||||||
bookname, chapter)
|
bookname, chapter)
|
||||||
urlbookname = urllib.quote(bookname.encode("utf-8"))
|
urlbookname = urllib.quote(bookname.encode("utf-8"))
|
||||||
url_params = u'search=%s+%s&version=%s' % (urlbookname, chapter,
|
url_params = u'search=%s+%s&version=%s' % (urlbookname, chapter,
|
||||||
version)
|
version)
|
||||||
cleaner = [(re.compile(' |<br />|\'\+\''), lambda match: '')]
|
cleaner = [(re.compile(' |<br />|\'\+\''), lambda match: '')]
|
||||||
soup = get_soup_for_bible_ref(
|
soup = get_soup_for_bible_ref(
|
||||||
@ -203,7 +203,7 @@ class BSExtract(object):
|
|||||||
``chapter``
|
``chapter``
|
||||||
Chapter number
|
Chapter number
|
||||||
"""
|
"""
|
||||||
log.debug(u'BSExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
log.debug(u'BSExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
||||||
bookname, chapter)
|
bookname, chapter)
|
||||||
urlversion = urllib.quote(version.encode("utf-8"))
|
urlversion = urllib.quote(version.encode("utf-8"))
|
||||||
urlbookname = urllib.quote(bookname.encode("utf-8"))
|
urlbookname = urllib.quote(bookname.encode("utf-8"))
|
||||||
@ -230,7 +230,7 @@ class BSExtract(object):
|
|||||||
|
|
||||||
def get_books_from_http(self, version):
|
def get_books_from_http(self, version):
|
||||||
"""
|
"""
|
||||||
Load a list of all books a Bible contains from Bibleserver mobile
|
Load a list of all books a Bible contains from Bibleserver mobile
|
||||||
website.
|
website.
|
||||||
|
|
||||||
``version``
|
``version``
|
||||||
@ -276,7 +276,7 @@ class CWExtract(object):
|
|||||||
``chapter``
|
``chapter``
|
||||||
Chapter number
|
Chapter number
|
||||||
"""
|
"""
|
||||||
log.debug(u'CWExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
log.debug(u'CWExtract.get_bible_chapter("%s", "%s", "%s")', version,
|
||||||
bookname, chapter)
|
bookname, chapter)
|
||||||
urlbookname = bookname.replace(u' ', u'-')
|
urlbookname = bookname.replace(u' ', u'-')
|
||||||
urlbookname = urlbookname.lower()
|
urlbookname = urlbookname.lower()
|
||||||
@ -389,7 +389,7 @@ class HTTPBible(BibleDB):
|
|||||||
"""
|
"""
|
||||||
self.wizard.progressBar.setMaximum(68)
|
self.wizard.progressBar.setMaximum(68)
|
||||||
self.wizard.incrementProgressBar(unicode(translate(
|
self.wizard.incrementProgressBar(unicode(translate(
|
||||||
'BiblesPlugin.HTTPBible',
|
'BiblesPlugin.HTTPBible',
|
||||||
'Registering Bible and loading books...')))
|
'Registering Bible and loading books...')))
|
||||||
self.create_meta(u'download source', self.download_source)
|
self.create_meta(u'download source', self.download_source)
|
||||||
self.create_meta(u'download name', self.download_name)
|
self.create_meta(u'download name', self.download_name)
|
||||||
@ -415,7 +415,7 @@ class HTTPBible(BibleDB):
|
|||||||
self.wizard.progressBar.setMaximum(len(books)+2)
|
self.wizard.progressBar.setMaximum(len(books)+2)
|
||||||
self.wizard.incrementProgressBar(unicode(translate(
|
self.wizard.incrementProgressBar(unicode(translate(
|
||||||
'BiblesPlugin.HTTPBible', 'Registering Language...')))
|
'BiblesPlugin.HTTPBible', 'Registering Language...')))
|
||||||
bible = BiblesResourcesDB.get_webbible(self.download_name,
|
bible = BiblesResourcesDB.get_webbible(self.download_name,
|
||||||
self.download_source.lower())
|
self.download_source.lower())
|
||||||
if bible[u'language_id']:
|
if bible[u'language_id']:
|
||||||
language_id = bible[u'language_id']
|
language_id = bible[u'language_id']
|
||||||
@ -432,14 +432,14 @@ class HTTPBible(BibleDB):
|
|||||||
self.wizard.incrementProgressBar(unicode(translate(
|
self.wizard.incrementProgressBar(unicode(translate(
|
||||||
'BiblesPlugin.HTTPBible', 'Importing %s...',
|
'BiblesPlugin.HTTPBible', 'Importing %s...',
|
||||||
'Importing <book name>...')) % book)
|
'Importing <book name>...')) % book)
|
||||||
book_ref_id = self.get_book_ref_id_by_name(book, len(books),
|
book_ref_id = self.get_book_ref_id_by_name(book, len(books),
|
||||||
language_id)
|
language_id)
|
||||||
if not book_ref_id:
|
if not book_ref_id:
|
||||||
log.exception(u'Importing books from %s - download name: "%s" '\
|
log.exception(u'Importing books from %s - download name: "%s" '\
|
||||||
'failed' % (self.download_source, self.download_name))
|
'failed' % (self.download_source, self.download_name))
|
||||||
return False
|
return False
|
||||||
book_details = BiblesResourcesDB.get_book_by_id(book_ref_id)
|
book_details = BiblesResourcesDB.get_book_by_id(book_ref_id)
|
||||||
log.debug(u'Book details: Name:%s; id:%s; testament_id:%s',
|
log.debug(u'Book details: Name:%s; id:%s; testament_id:%s',
|
||||||
book, book_ref_id, book_details[u'testament_id'])
|
book, book_ref_id, book_details[u'testament_id'])
|
||||||
self.create_book(book, book_ref_id, book_details[u'testament_id'])
|
self.create_book(book, book_ref_id, book_details[u'testament_id'])
|
||||||
if self.stop_import_flag:
|
if self.stop_import_flag:
|
||||||
@ -524,7 +524,7 @@ class HTTPBible(BibleDB):
|
|||||||
def get_chapter_count(self, book):
|
def get_chapter_count(self, book):
|
||||||
"""
|
"""
|
||||||
Return the number of chapters in a particular book.
|
Return the number of chapters in a particular book.
|
||||||
|
|
||||||
``book``
|
``book``
|
||||||
The book object to get the chapter count for.
|
The book object to get the chapter count for.
|
||||||
"""
|
"""
|
||||||
@ -597,14 +597,14 @@ def send_error_message(error_type):
|
|||||||
"""
|
"""
|
||||||
if error_type == u'download':
|
if error_type == u'download':
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
translate('BiblePlugin.HTTPBible', 'Download Error'),
|
translate('BiblesPlugin.HTTPBible', 'Download Error'),
|
||||||
translate('BiblePlugin.HTTPBible', 'There was a '
|
translate('BiblesPlugin.HTTPBible', 'There was a '
|
||||||
'problem downloading your verse selection. Please check your '
|
'problem downloading your verse selection. Please check your '
|
||||||
'Internet connection, and if this error continues to occur '
|
'Internet connection, and if this error continues to occur '
|
||||||
'please consider reporting a bug.'))
|
'please consider reporting a bug.'))
|
||||||
elif error_type == u'parse':
|
elif error_type == u'parse':
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
translate('BiblePlugin.HTTPBible', 'Parse Error'),
|
translate('BiblesPlugin.HTTPBible', 'Parse Error'),
|
||||||
translate('BiblePlugin.HTTPBible', 'There was a '
|
translate('BiblesPlugin.HTTPBible', 'There was a '
|
||||||
'problem extracting your verse selection. If this error continues '
|
'problem extracting your verse selection. If this error continues '
|
||||||
'to occur please consider reporting a bug.'))
|
'to occur please consider reporting a bug.'))
|
||||||
|
@ -87,7 +87,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
not second_bible:
|
not second_bible:
|
||||||
self.displayResults(bible, second_bible)
|
self.displayResults(bible, second_bible)
|
||||||
elif critical_error_message_box(
|
elif critical_error_message_box(
|
||||||
message=translate('BiblePlugin.MediaItem',
|
message=translate('BiblesPlugin.MediaItem',
|
||||||
'You cannot combine single and dual Bible verse search results. '
|
'You cannot combine single and dual Bible verse search results. '
|
||||||
'Do you want to delete your search results and start a new '
|
'Do you want to delete your search results and start a new '
|
||||||
'search?'),
|
'search?'),
|
||||||
@ -437,7 +437,7 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
if verse_count == 0:
|
if verse_count == 0:
|
||||||
self.advancedSearchButton.setEnabled(False)
|
self.advancedSearchButton.setEnabled(False)
|
||||||
critical_error_message_box(
|
critical_error_message_box(
|
||||||
message=translate('BiblePlugin.MediaItem',
|
message=translate('BiblesPlugin.MediaItem',
|
||||||
'Bible not fully loaded.'))
|
'Bible not fully loaded.'))
|
||||||
else:
|
else:
|
||||||
self.advancedSearchButton.setEnabled(True)
|
self.advancedSearchButton.setEnabled(True)
|
||||||
@ -694,8 +694,8 @@ class BibleMediaItem(MediaManagerItem):
|
|||||||
verse.verse, verse.verse))
|
verse.verse, verse.verse))
|
||||||
if passage_not_found:
|
if passage_not_found:
|
||||||
QtGui.QMessageBox.information(self,
|
QtGui.QMessageBox.information(self,
|
||||||
translate('BiblePlugin.MediaItem', 'Information'),
|
translate('BiblesPlugin.MediaItem', 'Information'),
|
||||||
unicode(translate('BiblePlugin.MediaItem',
|
unicode(translate('BiblesPlugin.MediaItem',
|
||||||
'The second Bible does not contain all the verses '
|
'The second Bible does not contain all the verses '
|
||||||
'that are in the main Bible. Only verses found in both '
|
'that are in the main Bible. Only verses found in both '
|
||||||
'Bibles will be shown. %d verses have not been '
|
'Bibles will be shown. %d verses have not been '
|
||||||
|
Loading…
Reference in New Issue
Block a user