From 3845db3579619258cb2e5664ebb5209c976c76ef Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Thu, 6 Sep 2012 19:30:45 +0200 Subject: [PATCH] Additional translate() substitution fixes in openlp.plugins modules. --- openlp/plugins/songs/lib/powersongimport.py | 10 +++++----- openlp/plugins/songs/lib/zionworximport.py | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/openlp/plugins/songs/lib/powersongimport.py b/openlp/plugins/songs/lib/powersongimport.py index 4729b6905..f406cc616 100644 --- a/openlp/plugins/songs/lib/powersongimport.py +++ b/openlp/plugins/songs/lib/powersongimport.py @@ -103,7 +103,7 @@ class PowerSongImport(SongImport): self.logError(unicode(translate('SongsPlugin.PowerSongImport', 'No songs to import.')), unicode(translate('SongsPlugin.PowerSongImport', - 'No %s files found.' % PS_string))) + 'No %s files found.')) % PS_string) return self.importWizard.progressBar.setMaximum(len(self.importSource)) for file in self.importSource: @@ -122,8 +122,8 @@ class PowerSongImport(SongImport): parse_error = True self.logError(os.path.basename(file), unicode( translate('SongsPlugin.PowerSongImport', - 'Invalid %s file. Unexpected byte value.' - % PS_string))) + 'Invalid %s file. Unexpected byte value.')) + % PS_string) break else: if label == u'TITLE': @@ -141,14 +141,14 @@ class PowerSongImport(SongImport): if not self.title: self.logError(os.path.basename(file), unicode( translate('SongsPlugin.PowerSongImport', - 'Invalid %s file. Missing "TITLE" header.' % PS_string))) + 'Invalid %s file. Missing "TITLE" header.')) % PS_string) continue # Check that file had COPYRIGHTLINE label if not found_copyright: self.logError(self.title, unicode( translate('SongsPlugin.PowerSongImport', 'Invalid %s file. Missing "COPYRIGHTLINE" ' - 'header.' % PS_string))) + 'header.')) % PS_string) continue # Check that file had at least one verse if not self.verses: diff --git a/openlp/plugins/songs/lib/zionworximport.py b/openlp/plugins/songs/lib/zionworximport.py index 1a00b3a7c..06a45127d 100644 --- a/openlp/plugins/songs/lib/zionworximport.py +++ b/openlp/plugins/songs/lib/zionworximport.py @@ -91,7 +91,7 @@ class ZionWorxImport(SongImport): self.logError(unicode(translate('SongsPlugin.ZionWorxImport', 'Error reading CSV file.')), unicode(translate('SongsPlugin.ZionWorxImport', - 'Line %d: %s' % (songs_reader.line_num, e)))) + 'Line %d: %s')) % (songs_reader.line_num, e)) return num_records = len(records) log.info(u'%s records found in CSV file' % num_records) @@ -111,7 +111,7 @@ class ZionWorxImport(SongImport): self.logError(unicode(translate( 'SongsPlugin.ZionWorxImport', 'Record %d' % index)), unicode(translate('SongsPlugin.ZionWorxImport', - 'Decoding error: %s' % e))) + 'Decoding error: %s')) % e) continue except TypeError, e: self.logError(unicode(translate( @@ -130,7 +130,7 @@ class ZionWorxImport(SongImport): title = self.title if not self.finish(): self.logError(unicode(translate( - 'SongsPlugin.ZionWorxImport', 'Record %d' % index)) + 'SongsPlugin.ZionWorxImport', 'Record %d')) % index + (u': "' + title + u'"' if title else u'')) def _decode(self, str):