From 9ecca162bd526931de839d60b16630ec9c551096 Mon Sep 17 00:00:00 2001 From: Martin Zibricky Date: Thu, 6 Sep 2012 15:49:47 +0200 Subject: [PATCH] Additional translate() substitution fixes in openlp.core modules. --- openlp/core/ui/advancedtab.py | 4 ++-- openlp/core/ui/mainwindow.py | 2 +- openlp/core/ui/servicemanager.py | 2 +- openlp/core/ui/thememanager.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index 48fa54e8d..2d6b534c4 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -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), @@ -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), diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 5ff851026..585aba15b 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -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 diff --git a/openlp/core/ui/servicemanager.py b/openlp/core/ui/servicemanager.py index 841d0fb71..d49c988c6 100644 --- a/openlp/core/ui/servicemanager.py +++ b/openlp/core/ui/servicemanager.py @@ -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( diff --git a/openlp/core/ui/thememanager.py b/openlp/core/ui/thememanager.py index 4bef4446a..5ec75f698 100644 --- a/openlp/core/ui/thememanager.py +++ b/openlp/core/ui/thememanager.py @@ -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)