From 84a0fa0ecd34ea9adbf2f923dcd86c3b4cb4317a Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Fri, 27 Feb 2015 21:14:08 +0000 Subject: [PATCH] Moved string format input outside calls to translate. Fixes bug 1425035. Fixes: https://launchpad.net/bugs/1425035 --- openlp/core/ui/formattingtagcontroller.py | 4 ++-- openlp/plugins/bibles/lib/opensong.py | 4 ++-- openlp/plugins/bibles/lib/osis.py | 8 ++++---- openlp/plugins/bibles/lib/zefania.py | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/openlp/core/ui/formattingtagcontroller.py b/openlp/core/ui/formattingtagcontroller.py index 9d490f0c8..f2fca420a 100644 --- a/openlp/core/ui/formattingtagcontroller.py +++ b/openlp/core/ui/formattingtagcontroller.py @@ -146,7 +146,7 @@ class FormattingTagController(object): end = self.start_html_to_end_html(start_html) if not end_html: if not end: - return translate('OpenLP.FormattingTagForm', 'Start tag %s is not valid HTML' % start_html), None + return translate('OpenLP.FormattingTagForm', 'Start tag %s is not valid HTML') % start_html, None return None, end return None, None @@ -166,5 +166,5 @@ class FormattingTagController(object): return None, end if end and end != end_html: return translate('OpenLP.FormattingTagForm', - 'End tag %s does not match end tag for start tag %s' % (end, start_html)), None + 'End tag %s does not match end tag for start tag %s') % (end, start_html), None return None, None diff --git a/openlp/plugins/bibles/lib/opensong.py b/openlp/plugins/bibles/lib/opensong.py index 1800fd5df..255989c34 100644 --- a/openlp/plugins/bibles/lib/opensong.py +++ b/openlp/plugins/bibles/lib/opensong.py @@ -123,8 +123,8 @@ class OpenSongBible(BibleDB): verse_number += 1 self.create_verse(db_book.id, chapter_number, verse_number, self.get_text(verse)) self.wizard.increment_progress_bar( - translate('BiblesPlugin.Opensong', 'Importing %(bookname)s %(chapter)s...' % - {'bookname': db_book.name, 'chapter': chapter_number})) + translate('BiblesPlugin.Opensong', 'Importing %(bookname)s %(chapter)s...') % + {'bookname': db_book.name, 'chapter': chapter_number}) self.session.commit() self.application.process_events() except etree.XMLSyntaxError as inst: diff --git a/openlp/plugins/bibles/lib/osis.py b/openlp/plugins/bibles/lib/osis.py index 07ec4ab23..7d3251b37 100644 --- a/openlp/plugins/bibles/lib/osis.py +++ b/openlp/plugins/bibles/lib/osis.py @@ -154,8 +154,8 @@ class OSISBible(BibleDB): verse_number = verse.get("osisID").split('.')[2] self.create_verse(db_book.id, chapter_number, verse_number, verse.text.strip()) self.wizard.increment_progress_bar( - translate('BiblesPlugin.OsisImport', 'Importing %(bookname)s %(chapter)s...' % - {'bookname': db_book.name, 'chapter': chapter_number})) + translate('BiblesPlugin.OsisImport', 'Importing %(bookname)s %(chapter)s...') % + {'bookname': db_book.name, 'chapter': chapter_number}) else: # The chapter tags is used as milestones. For now we assume verses is also milestones chapter_number = 0 @@ -164,8 +164,8 @@ class OSISBible(BibleDB): and element.get('sID'): chapter_number = element.get("osisID").split('.')[1] self.wizard.increment_progress_bar( - translate('BiblesPlugin.OsisImport', 'Importing %(bookname)s %(chapter)s...' % - {'bookname': db_book.name, 'chapter': chapter_number})) + translate('BiblesPlugin.OsisImport', 'Importing %(bookname)s %(chapter)s...') % + {'bookname': db_book.name, 'chapter': chapter_number}) elif element.tag == '{http://www.bibletechnologies.net/2003/OSIS/namespace}verse' \ and element.get('sID'): # If this tag marks the start of a verse, the verse text is between this tag and diff --git a/openlp/plugins/bibles/lib/zefania.py b/openlp/plugins/bibles/lib/zefania.py index ad8f96648..3bc92eedf 100644 --- a/openlp/plugins/bibles/lib/zefania.py +++ b/openlp/plugins/bibles/lib/zefania.py @@ -102,8 +102,8 @@ class ZefaniaBible(BibleDB): verse_number = VERS.get("vnumber") self.create_verse(db_book.id, chapter_number, verse_number, VERS.text.replace('
', '\n')) self.wizard.increment_progress_bar( - translate('BiblesPlugin.Zefnia', 'Importing %(bookname)s %(chapter)s...' % - {'bookname': db_book.name, 'chapter': chapter_number})) + translate('BiblesPlugin.Zefnia', 'Importing %(bookname)s %(chapter)s...') % + {'bookname': db_book.name, 'chapter': chapter_number}) self.session.commit() self.application.process_events() except Exception as e: