forked from openlp/openlp
Additional translate() substitution fixes in openlp.plugins modules.
This commit is contained in:
parent
9ecca162bd
commit
3845db3579
@ -103,7 +103,7 @@ class PowerSongImport(SongImport):
|
|||||||
self.logError(unicode(translate('SongsPlugin.PowerSongImport',
|
self.logError(unicode(translate('SongsPlugin.PowerSongImport',
|
||||||
'No songs to import.')),
|
'No songs to import.')),
|
||||||
unicode(translate('SongsPlugin.PowerSongImport',
|
unicode(translate('SongsPlugin.PowerSongImport',
|
||||||
'No %s files found.' % PS_string)))
|
'No %s files found.')) % PS_string)
|
||||||
return
|
return
|
||||||
self.importWizard.progressBar.setMaximum(len(self.importSource))
|
self.importWizard.progressBar.setMaximum(len(self.importSource))
|
||||||
for file in self.importSource:
|
for file in self.importSource:
|
||||||
@ -122,8 +122,8 @@ class PowerSongImport(SongImport):
|
|||||||
parse_error = True
|
parse_error = True
|
||||||
self.logError(os.path.basename(file), unicode(
|
self.logError(os.path.basename(file), unicode(
|
||||||
translate('SongsPlugin.PowerSongImport',
|
translate('SongsPlugin.PowerSongImport',
|
||||||
'Invalid %s file. Unexpected byte value.'
|
'Invalid %s file. Unexpected byte value.'))
|
||||||
% PS_string)))
|
% PS_string)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
if label == u'TITLE':
|
if label == u'TITLE':
|
||||||
@ -141,14 +141,14 @@ class PowerSongImport(SongImport):
|
|||||||
if not self.title:
|
if not self.title:
|
||||||
self.logError(os.path.basename(file), unicode(
|
self.logError(os.path.basename(file), unicode(
|
||||||
translate('SongsPlugin.PowerSongImport',
|
translate('SongsPlugin.PowerSongImport',
|
||||||
'Invalid %s file. Missing "TITLE" header.' % PS_string)))
|
'Invalid %s file. Missing "TITLE" header.')) % PS_string)
|
||||||
continue
|
continue
|
||||||
# Check that file had COPYRIGHTLINE label
|
# Check that file had COPYRIGHTLINE label
|
||||||
if not found_copyright:
|
if not found_copyright:
|
||||||
self.logError(self.title, unicode(
|
self.logError(self.title, unicode(
|
||||||
translate('SongsPlugin.PowerSongImport',
|
translate('SongsPlugin.PowerSongImport',
|
||||||
'Invalid %s file. Missing "COPYRIGHTLINE" '
|
'Invalid %s file. Missing "COPYRIGHTLINE" '
|
||||||
'header.' % PS_string)))
|
'header.')) % PS_string)
|
||||||
continue
|
continue
|
||||||
# Check that file had at least one verse
|
# Check that file had at least one verse
|
||||||
if not self.verses:
|
if not self.verses:
|
||||||
|
@ -91,7 +91,7 @@ class ZionWorxImport(SongImport):
|
|||||||
self.logError(unicode(translate('SongsPlugin.ZionWorxImport',
|
self.logError(unicode(translate('SongsPlugin.ZionWorxImport',
|
||||||
'Error reading CSV file.')),
|
'Error reading CSV file.')),
|
||||||
unicode(translate('SongsPlugin.ZionWorxImport',
|
unicode(translate('SongsPlugin.ZionWorxImport',
|
||||||
'Line %d: %s' % (songs_reader.line_num, e))))
|
'Line %d: %s')) % (songs_reader.line_num, e))
|
||||||
return
|
return
|
||||||
num_records = len(records)
|
num_records = len(records)
|
||||||
log.info(u'%s records found in CSV file' % num_records)
|
log.info(u'%s records found in CSV file' % num_records)
|
||||||
@ -111,7 +111,7 @@ class ZionWorxImport(SongImport):
|
|||||||
self.logError(unicode(translate(
|
self.logError(unicode(translate(
|
||||||
'SongsPlugin.ZionWorxImport', 'Record %d' % index)),
|
'SongsPlugin.ZionWorxImport', 'Record %d' % index)),
|
||||||
unicode(translate('SongsPlugin.ZionWorxImport',
|
unicode(translate('SongsPlugin.ZionWorxImport',
|
||||||
'Decoding error: %s' % e)))
|
'Decoding error: %s')) % e)
|
||||||
continue
|
continue
|
||||||
except TypeError, e:
|
except TypeError, e:
|
||||||
self.logError(unicode(translate(
|
self.logError(unicode(translate(
|
||||||
@ -130,7 +130,7 @@ class ZionWorxImport(SongImport):
|
|||||||
title = self.title
|
title = self.title
|
||||||
if not self.finish():
|
if not self.finish():
|
||||||
self.logError(unicode(translate(
|
self.logError(unicode(translate(
|
||||||
'SongsPlugin.ZionWorxImport', 'Record %d' % index))
|
'SongsPlugin.ZionWorxImport', 'Record %d')) % index
|
||||||
+ (u': "' + title + u'"' if title else u''))
|
+ (u': "' + title + u'"' if title else u''))
|
||||||
|
|
||||||
def _decode(self, str):
|
def _decode(self, str):
|
||||||
|
Loading…
Reference in New Issue
Block a user