Additional translate() substitution fixes in openlp.plugins modules.

This commit is contained in:
Martin Zibricky 2012-09-06 19:30:45 +02:00
parent 9ecca162bd
commit 3845db3579
2 changed files with 8 additions and 8 deletions

View File

@ -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:

View File

@ -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):