From 9736707e5b1e003613a907943c44fa497b6a0cb3 Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Thu, 6 Sep 2012 11:31:27 +0200 Subject: [PATCH] Fixed bug #1046599: String substitution cannot be done for translate() funciton and for QString type. --- openlp/core/ui/advancedtab.py | 2 +- openlp/core/ui/mainwindow.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index c31728a11..48fa54e8d 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -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), diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 87a650a30..5ff851026 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -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