forked from openlp/openlp
Fixed bug #1046599 where non-ASCII characters were being passed into an ASCII string.
bzr-revno: 2053 Fixes: https://launchpad.net/bugs/1046599
This commit is contained in:
commit
58db77a575
@ -527,7 +527,7 @@ class AdvancedTab(SettingsTab):
|
||||
'Click "No" to stop loading OpenLP. allowing you to fix '
|
||||
'the the problem.\n\n'
|
||||
'Click "Yes" to reset the data directory to the default '
|
||||
'location.' % self.currentDataPath),
|
||||
'location.').replace('%s', self.currentDataPath),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
@ -686,7 +686,7 @@ class AdvancedTab(SettingsTab):
|
||||
'Are you sure you want to change the location of the OpenLP '
|
||||
'data directory to:\n\n%s\n\n'
|
||||
'The data directory will be changed when OpenLP is closed.'
|
||||
% new_data_path),
|
||||
).replace('%s', new_data_path),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
@ -750,7 +750,7 @@ class AdvancedTab(SettingsTab):
|
||||
'The location you have selected \n\n%s\n\n'
|
||||
'appears to contain OpenLP data files. Do you wish to replace '
|
||||
'these files with the current data files?'
|
||||
% os.path.abspath(data_path,)),
|
||||
).replace('%s', os.path.abspath(data_path,)),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
|
@ -998,7 +998,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
'settings file.\n\n'
|
||||
'Section [%s] is not valid \n\n'
|
||||
'Processing has terminated and no changed have been made.'
|
||||
% section),
|
||||
).replace('%s', section),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok))
|
||||
return
|
||||
@ -1517,7 +1517,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
translate('OpenLP.MainWindow',
|
||||
'Copying OpenLP data to new data directory location - %s '
|
||||
'- Please wait for copy to finish'
|
||||
% self.newDataPath))
|
||||
).replace('%s', self.newDataPath))
|
||||
dir_util.copy_tree(old_data_path, self.newDataPath)
|
||||
log.info(u'Copy sucessful')
|
||||
except (IOError, os.error, DistutilsFileError), why:
|
||||
@ -1527,7 +1527,7 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow):
|
||||
translate('OpenLP.MainWindow', 'New Data Directory Error'),
|
||||
translate('OpenLP.MainWindow',
|
||||
'OpenLP Data directory copy failed\n\n%s'
|
||||
% unicode(why)),
|
||||
).replace('%s', unicode(why)),
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
QtGui.QMessageBox.Ok))
|
||||
return False
|
||||
|
@ -519,7 +519,7 @@ class ServiceManager(QtGui.QWidget):
|
||||
'Service File Missing'))
|
||||
message = unicode(translate('OpenLP.ServiceManager',
|
||||
'File missing from service\n\n %s \n\n'
|
||||
'Continue saving?' % path_from ))
|
||||
'Continue saving?')) % path_from
|
||||
answer = QtGui.QMessageBox.critical(self, title,
|
||||
message,
|
||||
QtGui.QMessageBox.StandardButtons(
|
||||
|
@ -518,7 +518,7 @@ class ThemeManager(QtGui.QWidget):
|
||||
translate('OpenLP.ThemeManager', 'Theme Already Exists'),
|
||||
translate('OpenLP.ThemeManager',
|
||||
'Theme %s already exists. Do you want to replace it?'
|
||||
% theme_name),
|
||||
).replace('%s', theme_name),
|
||||
QtGui.QMessageBox.StandardButtons(QtGui.QMessageBox.Yes |
|
||||
QtGui.QMessageBox.No),
|
||||
QtGui.QMessageBox.No)
|
||||
|
@ -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:
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user