diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index f8f529f44..000000000 --- a/.coveragerc +++ /dev/null @@ -1,5 +0,0 @@ -[run] -source = openlp - -[html] -directory = coverage diff --git a/openlp/core/common/uistrings.py b/openlp/core/common/uistrings.py index 71799eb8a..eaf1ed342 100644 --- a/openlp/core/common/uistrings.py +++ b/openlp/core/common/uistrings.py @@ -81,8 +81,8 @@ class UiStrings(object): self.Export = translate('OpenLP.Ui', 'Export') self.File = translate('OpenLP.Ui', 'File') self.FileNotFound = translate('OpenLP.Ui', 'File Not Found') - # TODO: Check before converting to python3 string - self.FileNotFoundMessage = translate('OpenLP.Ui', 'File %s not found.\nPlease try selecting it individually.') + self.FileNotFoundMessage = translate('OpenLP.Ui', + 'File {name} not found.\nPlease try selecting it individually.') self.FontSizePtUnit = translate('OpenLP.Ui', 'pt', 'Abbreviated font pointsize unit') self.Help = translate('OpenLP.Ui', 'Help') self.Hours = translate('OpenLP.Ui', 'h', 'The abbreviated unit for hours') @@ -139,8 +139,8 @@ class UiStrings(object): self.Split = translate('OpenLP.Ui', 'Optional &Split') self.SplitToolTip = translate('OpenLP.Ui', 'Split a slide into two only if it does not fit on the screen as one slide.') - # TODO: Check before converting to python3 string - self.StartTimeCode = translate('OpenLP.Ui', 'Start %s') + # TODO: WHERE is this used at? cannot find where it's used at in code. + self.StartTimeCode = translate('OpenLP.Ui', 'Start {code}') self.StopPlaySlidesInLoop = translate('OpenLP.Ui', 'Stop Play Slides in Loop') self.StopPlaySlidesToEnd = translate('OpenLP.Ui', 'Stop Play Slides to End') self.Theme = translate('OpenLP.Ui', 'Theme', 'Singular') diff --git a/openlp/core/lib/__init__.py b/openlp/core/lib/__init__.py index fed6df05c..d00d85b54 100644 --- a/openlp/core/lib/__init__.py +++ b/openlp/core/lib/__init__.py @@ -323,8 +323,7 @@ def create_separated_list(string_list): return '' elif len(string_list) == 1: return string_list[0] - # TODO: - # Cannot convert these strings to python3 yet until I can figure out how to mock translate() with the new format + # TODO: Verify mocking of translate() test before conversion elif len(string_list) == 2: return translate('OpenLP.core.lib', '%s and %s', 'Locale list separator: 2 items') % (string_list[0], string_list[1]) diff --git a/openlp/core/lib/filedialog.py b/openlp/core/lib/filedialog.py index 249f7959d..457bd663c 100644 --- a/openlp/core/lib/filedialog.py +++ b/openlp/core/lib/filedialog.py @@ -51,9 +51,8 @@ class FileDialog(QtWidgets.QFileDialog): file = parse.unquote(file) if not os.path.exists(file): log.error('File {text} not found.'.format(text=file)) - # TODO: Test with UiStrings() before converting to python3 strings QtWidgets.QMessageBox.information(parent, UiStrings().FileNotFound, - UiStrings().FileNotFoundMessage % file) + UiStrings().FileNotFoundMessage.format(name=file)) continue file_list.append(file) return file_list diff --git a/openlp/core/lib/projector/pjlink1.py b/openlp/core/lib/projector/pjlink1.py index 8050a6407..ed7b82209 100644 --- a/openlp/core/lib/projector/pjlink1.py +++ b/openlp/core/lib/projector/pjlink1.py @@ -436,7 +436,7 @@ class PJLink1(QTcpSocket): return return self.process_command(cmd, data) - @pyqtSlot(int) + @pyqtSlot(QAbstractSocket.SocketError) def get_error(self, err): """ Process error from SocketError signal. diff --git a/openlp/core/lib/renderer.py b/openlp/core/lib/renderer.py index 48d1cd05b..32696a71d 100644 --- a/openlp/core/lib/renderer.py +++ b/openlp/core/lib/renderer.py @@ -22,6 +22,7 @@ import re +from string import Template from PyQt5 import QtGui, QtCore, QtWebKitWidgets from openlp.core.common import Registry, RegistryProperties, OpenLPMixin, RegistryMixin, Settings @@ -370,8 +371,7 @@ class Renderer(OpenLPMixin, RegistryMixin, RegistryProperties): self.web.resize(self.page_width, self.page_height) self.web_frame = self.web.page().mainFrame() # Adjust width and height to account for shadow. outline done in css. - # TODO: Verify before converting to python3 strings - html = """
- """ % \ - (build_lyrics_format_css(theme_data, self.page_width, self.page_height), - build_lyrics_outline_css(theme_data)) - self.web.setHtml(html) + + +