Sat, 11 Jan 2014 11:55:33 +0100
Changed the code to use QObject.tr() instead of QObject.trUtf8().
--- a/Cooperation/ChatWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Cooperation/ChatWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -81,7 +81,7 @@ self.__client.cannotConnect.connect(self.__initialConnectionRefused) self.__client.editorCommand.connect(self.__editorCommandMessage) - self.serverButton.setText(self.trUtf8("Start Server")) + self.serverButton.setText(self.tr("Start Server")) self.serverLed.setColor(QColor(Qt.red)) if port == -1: port = Preferences.getCooperation("ServerPort") @@ -148,7 +148,7 @@ if text.startswith("/"): self.__showErrorMessage( - self.trUtf8("! Unknown command: {0}\n") + self.tr("! Unknown command: {0}\n") .format(text.split()[0])) else: self.__client.sendMessage(text) @@ -170,7 +170,7 @@ self.chatEdit.append( QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") - self.chatEdit.append(self.trUtf8("* {0} has joined.\n").format(nick)) + self.chatEdit.append(self.tr("* {0} has joined.\n").format(nick)) self.chatEdit.setTextColor(color) QListWidgetItem( @@ -184,7 +184,7 @@ if not self.isVisible(): self.__ui.showNotification( UI.PixmapCache.getPixmap("cooperation48.png"), - self.trUtf8("New User"), self.trUtf8("{0} has joined.") + self.tr("New User"), self.tr("{0} has joined.") .format(nick)) def __participantLeft(self, nick): @@ -206,7 +206,7 @@ self.chatEdit.append( QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") - self.chatEdit.append(self.trUtf8("* {0} has left.\n").format(nick)) + self.chatEdit.append(self.tr("* {0} has left.\n").format(nick)) self.chatEdit.setTextColor(color) if not self.__client.hasConnections(): @@ -215,7 +215,7 @@ if not self.isVisible(): self.__ui.showNotification( UI.PixmapCache.getPixmap("cooperation48.png"), - self.trUtf8("User Left"), self.trUtf8("{0} has left.") + self.tr("User Left"), self.tr("{0} has left.") .format(nick)) def appendMessage(self, from_, message): @@ -238,7 +238,7 @@ if not self.isVisible(): self.__ui.showNotification( UI.PixmapCache.getPixmap("cooperation48.png"), - self.trUtf8("Message from <{0}>").format(from_), message) + self.tr("Message from <{0}>").format(from_), message) @pyqtSlot(str) def on_hostEdit_editTextChanged(self, host): @@ -301,7 +301,7 @@ """ if self.__client.isListening(): self.__client.close() - self.serverButton.setText(self.trUtf8("Start Server")) + self.serverButton.setText(self.tr("Start Server")) self.serverPortSpin.setEnabled(True) if (self.serverPortSpin.value() != Preferences.getCooperation("ServerPort")): @@ -312,13 +312,13 @@ res, port = self.__client.startListening( self.serverPortSpin.value()) if res: - self.serverButton.setText(self.trUtf8("Stop Server")) + self.serverButton.setText(self.tr("Stop Server")) self.serverPortSpin.setValue(port) self.serverPortSpin.setEnabled(False) self.serverLed.setColor(QColor(Qt.green)) else: self.__showErrorMessage( - self.trUtf8("! Server Error: {0}\n").format( + self.tr("! Server Error: {0}\n").format( self.__client.errorString()) ) @@ -329,11 +329,11 @@ @param connected new connected state (boolean) """ if connected: - self.connectButton.setText(self.trUtf8("Disconnect")) + self.connectButton.setText(self.tr("Disconnect")) self.connectButton.setEnabled(True) self.connectionLed.setColor(QColor(Qt.green)) else: - self.connectButton.setText(self.trUtf8("Connect")) + self.connectButton.setText(self.tr("Connect")) self.connectButton.setEnabled(self.hostEdit.currentText() != "") self.connectionLed.setColor(QColor(Qt.red)) self.on_cancelEditButton_clicked() @@ -495,26 +495,26 @@ self.__copyChatAct = \ self.__chatMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy"), self.__copyChat) + self.tr("Copy"), self.__copyChat) self.__chatMenu.addSeparator() self.__cutAllChatAct = \ self.__chatMenu.addAction( UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8("Cut all"), self.__cutAllChat) + self.tr("Cut all"), self.__cutAllChat) self.__copyAllChatAct = \ self.__chatMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy all"), self.__copyAllChat) + self.tr("Copy all"), self.__copyAllChat) self.__chatMenu.addSeparator() self.__clearChatAct = \ self.__chatMenu.addAction( UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8("Clear"), self.__clearChat) + self.tr("Clear"), self.__clearChat) self.__chatMenu.addSeparator() self.__saveChatAct = \ self.__chatMenu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8("Save"), self.__saveChat) + self.tr("Save"), self.__saveChat) self.on_chatEdit_copyAvailable(False) @@ -554,9 +554,9 @@ if txt: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Chat"), + self.tr("Save Chat"), "", - self.trUtf8("Text Files (*.txt);;All Files (*)"), + self.tr("Text Files (*.txt);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -568,9 +568,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Chat"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Chat"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -583,10 +583,10 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Error saving Chat"), - self.trUtf8("""<p>The chat contents could not be""" - """ written to <b>{0}</b></p>""" - """<p>Reason: {1}</p>""") .format( + self.tr("Error saving Chat"), + self.tr("""<p>The chat contents could not be""" + """ written to <b>{0}</b></p>""" + """<p>Reason: {1}</p>""") .format( fname, str(err))) def __copyChat(self): @@ -622,15 +622,15 @@ self.__kickUserAct = \ self.__usersMenu.addAction( UI.PixmapCache.getIcon("chatKickUser.png"), - self.trUtf8("Kick User"), self.__kickUser) + self.tr("Kick User"), self.__kickUser) self.__banUserAct = \ self.__usersMenu.addAction( UI.PixmapCache.getIcon("chatBanUser.png"), - self.trUtf8("Ban User"), self.__banUser) + self.tr("Ban User"), self.__banUser) self.__banKickUserAct = \ self.__usersMenu.addAction( UI.PixmapCache.getIcon("chatBanKickUser.png"), - self.trUtf8("Ban and Kick User"), self.__banKickUser) + self.tr("Ban and Kick User"), self.__banKickUser) @pyqtSlot(QPoint) def on_usersList_customContextMenuRequested(self, pos): @@ -657,7 +657,7 @@ self.chatEdit.append( QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") - self.chatEdit.append(self.trUtf8("* {0} has been kicked.\n").format( + self.chatEdit.append(self.tr("* {0} has been kicked.\n").format( itm.text().split("@")[0])) self.chatEdit.setTextColor(color) @@ -673,7 +673,7 @@ self.chatEdit.append( QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") - self.chatEdit.append(self.trUtf8("* {0} has been banned.\n").format( + self.chatEdit.append(self.tr("* {0} has been banned.\n").format( itm.text().split("@")[0])) self.chatEdit.setTextColor(color) @@ -690,7 +690,7 @@ QDateTime.currentDateTime().toString(Qt.SystemLocaleLongDate) + ":") self.chatEdit.append( - self.trUtf8("* {0} has been banned and kicked.\n") + self.tr("* {0} has been banned and kicked.\n") .format(itm.text().split("@")[0])) self.chatEdit.setTextColor(color)
--- a/Cooperation/Connection.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Cooperation/Connection.py Sat Jan 11 11:55:33 2014 +0100 @@ -70,8 +70,8 @@ """ super().__init__(parent) - self.__greetingMessage = self.trUtf8("undefined") - self.__username = self.trUtf8("unknown") + self.__greetingMessage = self.tr("undefined") + self.__username = self.tr("unknown") self.__serverPort = 0 self.__state = Connection.WaitingForGreeting self.__currentDataType = Connection.Undefined @@ -198,7 +198,7 @@ ) Preferences.syncPreferences() if bannedName in Preferences.getCooperation("BannedUsers"): - self.rejected.emit(self.trUtf8( + self.rejected.emit(self.tr( "* Connection attempted by banned user '{0}'.") .format(bannedName)) self.abort() @@ -210,9 +210,9 @@ # if we shall accept automatically res = E5MessageBox.yesNo( None, - self.trUtf8("New Connection"), - self.trUtf8("""<p>Accept connection from """ - """<strong>{0}@{1}</strong>?</p>""").format( + self.tr("New Connection"), + self.tr("""<p>Accept connection from """ + """<strong>{0}@{1}</strong>?</p>""").format( user, hostInfo.hostName()), yesDefault=True) if not res: @@ -445,6 +445,6 @@ """ self.__pingTimer.stop() if self.__state == Connection.WaitingForGreeting: - self.rejected.emit(self.trUtf8( + self.rejected.emit(self.tr( "* Connection to {0}:{1} refused.").format( self.peerName(), self.peerPort()))
--- a/Cooperation/CooperationClient.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Cooperation/CooperationClient.py Sat Jan 11 11:55:33 2014 +0100 @@ -83,7 +83,7 @@ break if self.__username == "": - self.__username = self.trUtf8("unknown") + self.__username = self.tr("unknown") self.__listening = False self.__serversErrorString = "" @@ -291,7 +291,7 @@ port = int(port) if port == 0: - msg = self.trUtf8("Illegal address: {0}@{1}\n").format( + msg = self.tr("Illegal address: {0}@{1}\n").format( host, port) self.connectionError.emit(msg) else: @@ -384,7 +384,7 @@ self.__serversErrorString = self.__servers[0].errorString() else: res = False - self.__serversErrorString = self.trUtf8("No servers present.") + self.__serversErrorString = self.tr("No servers present.") if res: self.__serversErrorString = ""
--- a/DataViews/CodeMetricsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/DataViews/CodeMetricsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,9 +46,9 @@ self.cancelled = False self.__menu = QMenu(self) - self.__menu.addAction(self.trUtf8("Collapse all"), + self.__menu.addAction(self.tr("Collapse all"), self.__resultCollapse) - self.__menu.addAction(self.trUtf8("Expand all"), self.__resultExpand) + self.__menu.addAction(self.tr("Expand all"), self.__resultExpand) self.resultList.setContextMenuPolicy(Qt.CustomContextMenu) self.resultList.customContextMenuRequested.connect( self.__showContextMenu) @@ -185,19 +185,19 @@ # now do the summary stuff docstrings = total['lines'] - total['comments'] - \ total['empty lines'] - total['non-commentary lines'] - self.__createSummaryItem(self.trUtf8("files"), + self.__createSummaryItem(self.tr("files"), loc.toString(total['files'])) - self.__createSummaryItem(self.trUtf8("lines"), + self.__createSummaryItem(self.tr("lines"), loc.toString(total['lines'])) - self.__createSummaryItem(self.trUtf8("bytes"), + self.__createSummaryItem(self.tr("bytes"), loc.toString(total['bytes'])) - self.__createSummaryItem(self.trUtf8("comments"), + self.__createSummaryItem(self.tr("comments"), loc.toString(total['comments'])) - self.__createSummaryItem(self.trUtf8("empty lines"), + self.__createSummaryItem(self.tr("empty lines"), loc.toString(total['empty lines'])) - self.__createSummaryItem(self.trUtf8("non-commentary lines"), + self.__createSummaryItem(self.tr("non-commentary lines"), loc.toString(total['non-commentary lines'])) - self.__createSummaryItem(self.trUtf8("documentation lines"), + self.__createSummaryItem(self.tr("documentation lines"), loc.toString(docstrings)) self.__resizeSummaryColumns() self.__finish()
--- a/DataViews/PyCoverageDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/DataViews/PyCoverageDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -53,15 +53,15 @@ self.__menu = QMenu(self) self.__menu.addSeparator() self.openAct = self.__menu.addAction( - self.trUtf8("Open"), self.__openFile) + self.tr("Open"), self.__openFile) self.__menu.addSeparator() self.annotate = self.__menu.addAction( - self.trUtf8('Annotate'), self.__annotate) - self.__menu.addAction(self.trUtf8('Annotate all'), self.__annotateAll) + self.tr('Annotate'), self.__annotate) + self.__menu.addAction(self.tr('Annotate all'), self.__annotateAll) self.__menu.addAction( - self.trUtf8('Delete annotated files'), self.__deleteAnnotated) + self.tr('Delete annotated files'), self.__deleteAnnotated) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8('Erase Coverage Info'), self.__erase) + self.__menu.addAction(self.tr('Erase Coverage Info'), self.__erase) self.resultList.setContextMenuPolicy(Qt.CustomContextMenu) self.resultList.customContextMenuRequested.connect( self.__showContextMenu) @@ -240,10 +240,10 @@ if total_exceptions: E5MessageBox.warning( self, - self.trUtf8("Parse Error"), - self.trUtf8("""%n file(s) could not be parsed. Coverage""" - """ info for these is not available.""", "", - total_exceptions)) + self.tr("Parse Error"), + self.tr("""%n file(s) could not be parsed. Coverage""" + """ info for these is not available.""", "", + total_exceptions)) self.__finish() @@ -343,8 +343,8 @@ # now process them progress = E5ProgressDialog( - self.trUtf8("Annotating files..."), self.trUtf8("Abort"), - 0, len(files), self.trUtf8("%v/%m Files"), self) + self.tr("Annotating files..."), self.tr("Abort"), + 0, len(files), self.tr("%v/%m Files"), self) progress.setMinimumDuration(0) count = 0
--- a/DataViews/PyProfileDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/DataViews/PyProfileDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,15 +80,15 @@ self.__menu = QMenu(self) self.filterItm = self.__menu.addAction( - self.trUtf8('Exclude Python Library'), + self.tr('Exclude Python Library'), self.__filter) self.__menu.addSeparator() self.__menu.addAction( - self.trUtf8('Erase Profiling Info'), self.__eraseProfile) + self.tr('Erase Profiling Info'), self.__eraseProfile) self.__menu.addAction( - self.trUtf8('Erase Timing Info'), self.__eraseTiming) + self.tr('Erase Timing Info'), self.__eraseTiming) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8('Erase All Infos'), self.__eraseAll) + self.__menu.addAction(self.tr('Erase All Infos'), self.__eraseAll) self.resultList.setContextMenuPolicy(Qt.CustomContextMenu) self.resultList.customContextMenuRequested.connect( self.__showContextMenu) @@ -208,12 +208,12 @@ self.__resortResultList() # now do the summary stuff - self.__createSummaryItem(self.trUtf8("function calls"), + self.__createSummaryItem(self.tr("function calls"), str(total_calls)) if total_calls != prim_calls: - self.__createSummaryItem(self.trUtf8("primitive calls"), + self.__createSummaryItem(self.tr("primitive calls"), str(prim_calls)) - self.__createSummaryItem(self.trUtf8("CPU seconds"), + self.__createSummaryItem(self.tr("CPU seconds"), "{0:.3f}".format(total_tt)) def start(self, pfn, fn=None): @@ -229,9 +229,9 @@ if not os.path.exists(fname): E5MessageBox.warning( self, - self.trUtf8("Profile Results"), - self.trUtf8("""<p>There is no profiling data""" - """ available for <b>{0}</b>.</p>""") + self.tr("Profile Results"), + self.tr("""<p>There is no profiling data""" + """ available for <b>{0}</b>.</p>""") .format(pfn)) self.close() return @@ -242,9 +242,9 @@ except (EnvironmentError, pickle.PickleError, EOFError): E5MessageBox.critical( self, - self.trUtf8("Loading Profiling Data"), - self.trUtf8("""<p>The profiling data could not be""" - """ read from file <b>{0}</b>.</p>""") + self.tr("Loading Profiling Data"), + self.tr("""<p>The profiling data could not be""" + """ read from file <b>{0}</b>.</p>""") .format(fname)) self.close() return @@ -327,10 +327,10 @@ self.__unfinish() if self.exclude: self.exclude = False - self.filterItm.setText(self.trUtf8('Include Python Library')) + self.filterItm.setText(self.tr('Include Python Library')) self.__populateLists(True) else: self.exclude = True - self.filterItm.setText(self.trUtf8('Exclude Python Library')) + self.filterItm.setText(self.tr('Exclude Python Library')) self.__populateLists(False) self.__finish()
--- a/Debugger/BreakPointModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/BreakPointModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -26,12 +26,12 @@ self.breakpoints = [] self.header = [ - self.trUtf8("Filename"), - self.trUtf8("Line"), - self.trUtf8('Condition'), - self.trUtf8('Temporary'), - self.trUtf8('Enabled'), - self.trUtf8('Ignore Count'), + self.tr("Filename"), + self.tr("Line"), + self.tr('Condition'), + self.tr('Temporary'), + self.tr('Enabled'), + self.tr('Ignore Count'), ] self.alignments = [Qt.Alignment(Qt.AlignLeft), Qt.Alignment(Qt.AlignRight),
--- a/Debugger/BreakPointViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/BreakPointViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,7 +42,7 @@ self.setSelectionMode(QAbstractItemView.ExtendedSelection) self.setSelectionBehavior(QAbstractItemView.SelectRows) - self.setWindowTitle(self.trUtf8("Breakpoints")) + self.setWindowTitle(self.tr("Breakpoints")) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__showContextMenu) @@ -142,58 +142,58 @@ Private method to generate the popup menus. """ self.menu = QMenu() - self.menu.addAction(self.trUtf8("Add"), self.__addBreak) - self.menu.addAction(self.trUtf8("Edit..."), self.__editBreak) + self.menu.addAction(self.tr("Add"), self.__addBreak) + self.menu.addAction(self.tr("Edit..."), self.__editBreak) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Enable"), self.__enableBreak) - self.menu.addAction(self.trUtf8("Enable all"), self.__enableAllBreaks) + self.menu.addAction(self.tr("Enable"), self.__enableBreak) + self.menu.addAction(self.tr("Enable all"), self.__enableAllBreaks) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Disable"), self.__disableBreak) - self.menu.addAction(self.trUtf8("Disable all"), + self.menu.addAction(self.tr("Disable"), self.__disableBreak) + self.menu.addAction(self.tr("Disable all"), self.__disableAllBreaks) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Delete"), self.__deleteBreak) - self.menu.addAction(self.trUtf8("Delete all"), self.__deleteAllBreaks) + self.menu.addAction(self.tr("Delete"), self.__deleteBreak) + self.menu.addAction(self.tr("Delete all"), self.__deleteAllBreaks) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Goto"), self.__showSource) + self.menu.addAction(self.tr("Goto"), self.__showSource) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.menu.addAction(self.tr("Configure..."), self.__configure) self.backMenuActions = {} self.backMenu = QMenu() - self.backMenu.addAction(self.trUtf8("Add"), self.__addBreak) + self.backMenu.addAction(self.tr("Add"), self.__addBreak) self.backMenuActions["EnableAll"] = \ - self.backMenu.addAction(self.trUtf8("Enable all"), + self.backMenu.addAction(self.tr("Enable all"), self.__enableAllBreaks) self.backMenuActions["DisableAll"] = \ - self.backMenu.addAction(self.trUtf8("Disable all"), + self.backMenu.addAction(self.tr("Disable all"), self.__disableAllBreaks) self.backMenuActions["DeleteAll"] = \ - self.backMenu.addAction(self.trUtf8("Delete all"), + self.backMenu.addAction(self.tr("Delete all"), self.__deleteAllBreaks) self.backMenu.aboutToShow.connect(self.__showBackMenu) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.backMenu.addAction(self.tr("Configure..."), self.__configure) self.multiMenu = QMenu() - self.multiMenu.addAction(self.trUtf8("Add"), self.__addBreak) + self.multiMenu.addAction(self.tr("Add"), self.__addBreak) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Enable selected"), + self.multiMenu.addAction(self.tr("Enable selected"), self.__enableSelectedBreaks) - self.multiMenu.addAction(self.trUtf8("Enable all"), + self.multiMenu.addAction(self.tr("Enable all"), self.__enableAllBreaks) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Disable selected"), + self.multiMenu.addAction(self.tr("Disable selected"), self.__disableSelectedBreaks) - self.multiMenu.addAction(self.trUtf8("Disable all"), + self.multiMenu.addAction(self.tr("Disable all"), self.__disableAllBreaks) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Delete selected"), + self.multiMenu.addAction(self.tr("Delete selected"), self.__deleteSelectedBreaks) - self.multiMenu.addAction(self.trUtf8("Delete all"), + self.multiMenu.addAction(self.tr("Delete all"), self.__deleteAllBreaks) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.multiMenu.addAction(self.tr("Configure..."), self.__configure) def __showContextMenu(self, coord): """
--- a/Debugger/CallStackViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/CallStackViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,23 +42,23 @@ self.setAlternatingRowColors(True) self.setItemsExpandable(False) self.setRootIsDecorated(False) - self.setWindowTitle(self.trUtf8("Call Stack")) + self.setWindowTitle(self.tr("Call Stack")) self.__menu = QMenu(self) self.__sourceAct = self.__menu.addAction( - self.trUtf8("Show source"), self.__openSource) - self.__menu.addAction(self.trUtf8("Clear"), self.clear) + self.tr("Show source"), self.__openSource) + self.__menu.addAction(self.tr("Clear"), self.clear) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8("Save"), self.__saveStackTrace) + self.__menu.addAction(self.tr("Save"), self.__saveStackTrace) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__showContextMenu) self.__dbs = debugServer # file name, line number, function name, arguments - self.__entryFormat = self.trUtf8("File: {0}\nLine: {1}\n{2}{3}") + self.__entryFormat = self.tr("File: {0}\nLine: {1}\n{2}{3}") # file name, line number - self.__entryFormatShort = self.trUtf8("File: {0}\nLine: {1}") + self.__entryFormatShort = self.tr("File: {0}\nLine: {1}") self.__projectMode = False self.__project = None @@ -155,9 +155,9 @@ if self.topLevelItemCount() > 0: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Call Stack Info"), + self.tr("Save Call Stack Info"), "", - self.trUtf8("Text Files (*.txt);;All Files (*)"), + self.tr("Text Files (*.txt);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -169,9 +169,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Call Stack Info"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Call Stack Info"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -188,8 +188,8 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Error saving Call Stack Info"), - self.trUtf8("""<p>The call stack info could not be""" - """ written to <b>{0}</b></p>""" - """<p>Reason: {1}</p>""") + self.tr("Error saving Call Stack Info"), + self.tr("""<p>The call stack info could not be""" + """ written to <b>{0}</b></p>""" + """<p>Reason: {1}</p>""") .format(fname, str(err)))
--- a/Debugger/CallTraceViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/CallTraceViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,7 +50,7 @@ self.saveButton.setIcon(UI.PixmapCache.getIcon("fileSave.png")) self.__headerItem = QTreeWidgetItem( - ["", self.trUtf8("From"), self.trUtf8("To")]) + ["", self.tr("From"), self.tr("To")]) self.__headerItem.setIcon(0, UI.PixmapCache.getIcon("callReturn.png")) self.callTrace.setHeaderItem(self.__headerItem) @@ -120,9 +120,9 @@ if self.callTrace.topLevelItemCount() > 0: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Call Trace Info"), + self.tr("Save Call Trace Info"), "", - self.trUtf8("Text Files (*.txt);;All Files (*)"), + self.tr("Text Files (*.txt);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -134,9 +134,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Call Trace Info"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Call Trace Info"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -159,10 +159,10 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Error saving Call Trace Info"), - self.trUtf8("""<p>The call trace info could not""" - """ be written to <b>{0}</b></p>""" - """<p>Reason: {1}</p>""") + self.tr("Error saving Call Trace Info"), + self.tr("""<p>The call trace info could not""" + """ be written to <b>{0}</b></p>""" + """<p>Reason: {1}</p>""") .format(fname, str(err))) @pyqtSlot(QTreeWidgetItem, int)
--- a/Debugger/DebugServer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebugServer.py Sat Jan 11 11:55:33 2014 +0100 @@ -150,9 +150,9 @@ self.breakpointModel = BreakPointModel(self) self.watchpointModel = WatchPointModel(self) self.watchSpecialCreated = \ - self.trUtf8("created", "must be same as in EditWatchpointDialog") + self.tr("created", "must be same as in EditWatchpointDialog") self.watchSpecialChanged = \ - self.trUtf8("changed", "must be same as in EditWatchpointDialog") + self.tr("changed", "must be same as in EditWatchpointDialog") self.networkInterface = Preferences.getDebugger("NetworkInterface") if self.networkInterface == "all": @@ -634,8 +634,8 @@ # the peer is not allowed to connect res = E5MessageBox.yesNo( None, - self.trUtf8("Connection from illegal host"), - self.trUtf8( + self.tr("Connection from illegal host"), + self.tr( """<p>A connection was attempted by the illegal host""" """ <b>{0}</b>. Accept this connection?</p>""") .format(peerAddress), @@ -1234,7 +1234,7 @@ self.startClient(False) if self.passive: self.__createDebuggerInterface("None") - self.signalClientOutput(self.trUtf8('\nNot connected\n')) + self.signalClientOutput(self.tr('\nNot connected\n')) self.signalClientStatement(False) self.running = False @@ -1414,7 +1414,7 @@ @param fn filename of the debugged script (string) @param exc flag to enable exception reporting of the IDE (boolean) """ - print(self.trUtf8("Passive debug connection received")) + print(self.tr("Passive debug connection received")) self.passiveClientExited = False self.debugging = True self.running = True @@ -1428,7 +1428,7 @@ """ self.passiveClientExited = True self.shutdownServer() - print(self.trUtf8("Passive debug connection closed")) + print(self.tr("Passive debug connection closed")) def __restoreBreakpoints(self): """
--- a/Debugger/DebugUI.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebugUI.py Sat Jan 11 11:55:33 2014 +0100 @@ -169,12 +169,12 @@ self.actions = [] self.runAct = E5Action( - self.trUtf8('Run Script'), + self.tr('Run Script'), UI.PixmapCache.getIcon("runScript.png"), - self.trUtf8('&Run Script...'), + self.tr('&Run Script...'), Qt.Key_F2, 0, self, 'dbg_run_script') - self.runAct.setStatusTip(self.trUtf8('Run the current Script')) - self.runAct.setWhatsThis(self.trUtf8( + self.runAct.setStatusTip(self.tr('Run the current Script')) + self.runAct.setWhatsThis(self.tr( """<b>Run Script</b>""" """<p>Set the command line arguments and run the script outside""" """ the debugger. If the file has unsaved changes it may be""" @@ -184,12 +184,12 @@ self.actions.append(self.runAct) self.runProjectAct = E5Action( - self.trUtf8('Run Project'), + self.tr('Run Project'), UI.PixmapCache.getIcon("runProject.png"), - self.trUtf8('Run &Project...'), Qt.SHIFT + Qt.Key_F2, 0, self, + self.tr('Run &Project...'), Qt.SHIFT + Qt.Key_F2, 0, self, 'dbg_run_project') - self.runProjectAct.setStatusTip(self.trUtf8('Run the current Project')) - self.runProjectAct.setWhatsThis(self.trUtf8( + self.runProjectAct.setStatusTip(self.tr('Run the current Project')) + self.runProjectAct.setWhatsThis(self.tr( """<b>Run Project</b>""" """<p>Set the command line arguments and run the current project""" """ outside the debugger.""" @@ -200,13 +200,13 @@ self.actions.append(self.runProjectAct) self.coverageAct = E5Action( - self.trUtf8('Coverage run of Script'), + self.tr('Coverage run of Script'), UI.PixmapCache.getIcon("coverageScript.png"), - self.trUtf8('Coverage run of Script...'), 0, 0, self, + self.tr('Coverage run of Script...'), 0, 0, self, 'dbg_coverage_script') self.coverageAct.setStatusTip( - self.trUtf8('Perform a coverage run of the current Script')) - self.coverageAct.setWhatsThis(self.trUtf8( + self.tr('Perform a coverage run of the current Script')) + self.coverageAct.setWhatsThis(self.tr( """<b>Coverage run of Script</b>""" """<p>Set the command line arguments and run the script under""" """ the control of a coverage analysis tool. If the file has""" @@ -216,13 +216,13 @@ self.actions.append(self.coverageAct) self.coverageProjectAct = E5Action( - self.trUtf8('Coverage run of Project'), + self.tr('Coverage run of Project'), UI.PixmapCache.getIcon("coverageProject.png"), - self.trUtf8('Coverage run of Project...'), 0, 0, self, + self.tr('Coverage run of Project...'), 0, 0, self, 'dbg_coverage_project') self.coverageProjectAct.setStatusTip( - self.trUtf8('Perform a coverage run of the current Project')) - self.coverageProjectAct.setWhatsThis(self.trUtf8( + self.tr('Perform a coverage run of the current Project')) + self.coverageProjectAct.setWhatsThis(self.tr( """<b>Coverage run of Project</b>""" """<p>Set the command line arguments and run the current project""" """ under the control of a coverage analysis tool.""" @@ -233,11 +233,11 @@ self.actions.append(self.coverageProjectAct) self.profileAct = E5Action( - self.trUtf8('Profile Script'), + self.tr('Profile Script'), UI.PixmapCache.getIcon("profileScript.png"), - self.trUtf8('Profile Script...'), 0, 0, self, 'dbg_profile_script') - self.profileAct.setStatusTip(self.trUtf8('Profile the current Script')) - self.profileAct.setWhatsThis(self.trUtf8( + self.tr('Profile Script...'), 0, 0, self, 'dbg_profile_script') + self.profileAct.setStatusTip(self.tr('Profile the current Script')) + self.profileAct.setWhatsThis(self.tr( """<b>Profile Script</b>""" """<p>Set the command line arguments and profile the script.""" """ If the file has unsaved changes it may be saved first.</p>""" @@ -246,13 +246,13 @@ self.actions.append(self.profileAct) self.profileProjectAct = E5Action( - self.trUtf8('Profile Project'), + self.tr('Profile Project'), UI.PixmapCache.getIcon("profileProject.png"), - self.trUtf8('Profile Project...'), 0, 0, self, + self.tr('Profile Project...'), 0, 0, self, 'dbg_profile_project') self.profileProjectAct.setStatusTip( - self.trUtf8('Profile the current Project')) - self.profileProjectAct.setWhatsThis(self.trUtf8( + self.tr('Profile the current Project')) + self.profileProjectAct.setWhatsThis(self.tr( """<b>Profile Project</b>""" """<p>Set the command line arguments and profile the current""" """ project. If files of the current project have unsaved""" @@ -262,12 +262,12 @@ self.actions.append(self.profileProjectAct) self.debugAct = E5Action( - self.trUtf8('Debug Script'), + self.tr('Debug Script'), UI.PixmapCache.getIcon("debugScript.png"), - self.trUtf8('&Debug Script...'), Qt.Key_F5, 0, self, + self.tr('&Debug Script...'), Qt.Key_F5, 0, self, 'dbg_debug_script') - self.debugAct.setStatusTip(self.trUtf8('Debug the current Script')) - self.debugAct.setWhatsThis(self.trUtf8( + self.debugAct.setStatusTip(self.tr('Debug the current Script')) + self.debugAct.setWhatsThis(self.tr( """<b>Debug Script</b>""" """<p>Set the command line arguments and set the current line""" """ to be the first executable Python statement of the current""" @@ -278,13 +278,13 @@ self.actions.append(self.debugAct) self.debugProjectAct = E5Action( - self.trUtf8('Debug Project'), + self.tr('Debug Project'), UI.PixmapCache.getIcon("debugProject.png"), - self.trUtf8('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, + self.tr('Debug &Project...'), Qt.SHIFT + Qt.Key_F5, 0, self, 'dbg_debug_project') - self.debugProjectAct.setStatusTip(self.trUtf8( + self.debugProjectAct.setStatusTip(self.tr( 'Debug the current Project')) - self.debugProjectAct.setWhatsThis(self.trUtf8( + self.debugProjectAct.setWhatsThis(self.tr( """<b>Debug Project</b>""" """<p>Set the command line arguments and set the current line""" """ to be the first executable Python statement of the main""" @@ -295,12 +295,12 @@ self.actions.append(self.debugProjectAct) self.restartAct = E5Action( - self.trUtf8('Restart'), + self.tr('Restart'), UI.PixmapCache.getIcon("restart.png"), - self.trUtf8('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') - self.restartAct.setStatusTip(self.trUtf8( + self.tr('Restart'), Qt.Key_F4, 0, self, 'dbg_restart_script') + self.restartAct.setStatusTip(self.tr( 'Restart the last debugged script')) - self.restartAct.setWhatsThis(self.trUtf8( + self.restartAct.setWhatsThis(self.tr( """<b>Restart</b>""" """<p>Set the command line arguments and set the current line""" """ to be the first executable Python statement of the script""" @@ -311,12 +311,12 @@ self.actions.append(self.restartAct) self.stopAct = E5Action( - self.trUtf8('Stop'), + self.tr('Stop'), UI.PixmapCache.getIcon("stopScript.png"), - self.trUtf8('Stop'), Qt.SHIFT + Qt.Key_F10, 0, + self.tr('Stop'), Qt.SHIFT + Qt.Key_F10, 0, self, 'dbg_stop_script') - self.stopAct.setStatusTip(self.trUtf8("""Stop the running script.""")) - self.stopAct.setWhatsThis(self.trUtf8( + self.stopAct.setStatusTip(self.tr("""Stop the running script.""")) + self.stopAct.setWhatsThis(self.tr( """<b>Stop</b>""" """<p>This stops the script running in the debugger backend.</p>""" )) @@ -326,13 +326,13 @@ self.debugActGrp = createActionGroup(self) act = E5Action( - self.trUtf8('Continue'), + self.tr('Continue'), UI.PixmapCache.getIcon("continue.png"), - self.trUtf8('&Continue'), Qt.Key_F6, 0, + self.tr('&Continue'), Qt.Key_F6, 0, self.debugActGrp, 'dbg_continue') act.setStatusTip( - self.trUtf8('Continue running the program from the current line')) - act.setWhatsThis(self.trUtf8( + self.tr('Continue running the program from the current line')) + act.setWhatsThis(self.tr( """<b>Continue</b>""" """<p>Continue running the program from the current line. The""" """ program will stop when it terminates or when a breakpoint""" @@ -342,14 +342,14 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Continue to Cursor'), + self.tr('Continue to Cursor'), UI.PixmapCache.getIcon("continueToCursor.png"), - self.trUtf8('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, + self.tr('Continue &To Cursor'), Qt.SHIFT + Qt.Key_F6, 0, self.debugActGrp, 'dbg_continue_to_cursor') - act.setStatusTip(self.trUtf8( + act.setStatusTip(self.tr( """Continue running the program from the""" """ current line to the current cursor position""")) - act.setWhatsThis(self.trUtf8( + act.setWhatsThis(self.tr( """<b>Continue To Cursor</b>""" """<p>Continue running the program from the current line to the""" """ current cursor position.</p>""" @@ -358,12 +358,12 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Single Step'), + self.tr('Single Step'), UI.PixmapCache.getIcon("step.png"), - self.trUtf8('Sin&gle Step'), Qt.Key_F7, 0, + self.tr('Sin&gle Step'), Qt.Key_F7, 0, self.debugActGrp, 'dbg_single_step') - act.setStatusTip(self.trUtf8('Execute a single Python statement')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Execute a single Python statement')) + act.setWhatsThis(self.tr( """<b>Single Step</b>""" """<p>Execute a single Python statement. If the statement""" """ is an <tt>import</tt> statement, a class constructor, or a""" @@ -374,14 +374,14 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Step Over'), + self.tr('Step Over'), UI.PixmapCache.getIcon("stepOver.png"), - self.trUtf8('Step &Over'), Qt.Key_F8, 0, + self.tr('Step &Over'), Qt.Key_F8, 0, self.debugActGrp, 'dbg_step_over') - act.setStatusTip(self.trUtf8( + act.setStatusTip(self.tr( """Execute a single Python statement staying""" """ in the current frame""")) - act.setWhatsThis(self.trUtf8( + act.setWhatsThis(self.tr( """<b>Step Over</b>""" """<p>Execute a single Python statement staying in the same""" """ frame. If the statement is an <tt>import</tt> statement,""" @@ -393,14 +393,14 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Step Out'), + self.tr('Step Out'), UI.PixmapCache.getIcon("stepOut.png"), - self.trUtf8('Step Ou&t'), Qt.Key_F9, 0, + self.tr('Step Ou&t'), Qt.Key_F9, 0, self.debugActGrp, 'dbg_step_out') - act.setStatusTip(self.trUtf8( + act.setStatusTip(self.tr( """Execute Python statements until leaving""" """ the current frame""")) - act.setWhatsThis(self.trUtf8( + act.setWhatsThis(self.tr( """<b>Step Out</b>""" """<p>Execute Python statements until leaving the current""" """ frame. If the statements are inside an <tt>import</tt>""" @@ -412,12 +412,12 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Stop'), + self.tr('Stop'), UI.PixmapCache.getIcon("stepQuit.png"), - self.trUtf8('&Stop'), Qt.Key_F10, 0, + self.tr('&Stop'), Qt.Key_F10, 0, self.debugActGrp, 'dbg_stop') - act.setStatusTip(self.trUtf8('Stop debugging')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Stop debugging')) + act.setWhatsThis(self.tr( """<b>Stop</b>""" """<p>Stop the running debugging session.</p>""" )) @@ -427,11 +427,11 @@ self.debugActGrp2 = createActionGroup(self) act = E5Action( - self.trUtf8('Evaluate'), - self.trUtf8('E&valuate...'), + self.tr('Evaluate'), + self.tr('E&valuate...'), 0, 0, self.debugActGrp2, 'dbg_evaluate') - act.setStatusTip(self.trUtf8('Evaluate in current context')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Evaluate in current context')) + act.setWhatsThis(self.tr( """<b>Evaluate</b>""" """<p>Evaluate an expression in the current context of the""" """ debugged program. The result is displayed in the""" @@ -441,12 +441,12 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Execute'), - self.trUtf8('E&xecute...'), + self.tr('Execute'), + self.tr('E&xecute...'), 0, 0, self.debugActGrp2, 'dbg_execute') act.setStatusTip( - self.trUtf8('Execute a one line statement in the current context')) - act.setWhatsThis(self.trUtf8( + self.tr('Execute a one line statement in the current context')) + act.setWhatsThis(self.tr( """<b>Execute</b>""" """<p>Execute a one line statement in the current context""" """ of the debugged program.</p>""" @@ -455,12 +455,12 @@ self.actions.append(act) self.dbgFilterAct = E5Action( - self.trUtf8('Variables Type Filter'), - self.trUtf8('Varia&bles Type Filter...'), 0, 0, self, + self.tr('Variables Type Filter'), + self.tr('Varia&bles Type Filter...'), 0, 0, self, 'dbg_variables_filter') - self.dbgFilterAct.setStatusTip(self.trUtf8( + self.dbgFilterAct.setStatusTip(self.tr( 'Configure variables type filter')) - self.dbgFilterAct.setWhatsThis(self.trUtf8( + self.dbgFilterAct.setWhatsThis(self.tr( """<b>Variables Type Filter</b>""" """<p>Configure the variables type filter. Only variable types""" """ that are not selected are displayed in the global or local""" @@ -471,12 +471,12 @@ self.actions.append(self.dbgFilterAct) self.excFilterAct = E5Action( - self.trUtf8('Exceptions Filter'), - self.trUtf8('&Exceptions Filter...'), 0, 0, self, + self.tr('Exceptions Filter'), + self.tr('&Exceptions Filter...'), 0, 0, self, 'dbg_exceptions_filter') - self.excFilterAct.setStatusTip(self.trUtf8( + self.excFilterAct.setStatusTip(self.tr( 'Configure exceptions filter')) - self.excFilterAct.setWhatsThis(self.trUtf8( + self.excFilterAct.setWhatsThis(self.tr( """<b>Exceptions Filter</b>""" """<p>Configure the exceptions filter. Only exception types""" """ that are listed are highlighted during a debugging""" @@ -488,12 +488,12 @@ self.actions.append(self.excFilterAct) self.excIgnoreFilterAct = E5Action( - self.trUtf8('Ignored Exceptions'), - self.trUtf8('&Ignored Exceptions...'), 0, 0, + self.tr('Ignored Exceptions'), + self.tr('&Ignored Exceptions...'), 0, 0, self, 'dbg_ignored_exceptions') - self.excIgnoreFilterAct.setStatusTip(self.trUtf8( + self.excIgnoreFilterAct.setStatusTip(self.tr( 'Configure ignored exceptions')) - self.excIgnoreFilterAct.setWhatsThis(self.trUtf8( + self.excIgnoreFilterAct.setWhatsThis(self.tr( """<b>Ignored Exceptions</b>""" """<p>Configure the ignored exceptions. Only exception types""" """ that are not listed are highlighted during a debugging""" @@ -507,13 +507,13 @@ self.dbgSetBpActGrp = createActionGroup(self) self.dbgToggleBpAct = E5Action( - self.trUtf8('Toggle Breakpoint'), + self.tr('Toggle Breakpoint'), UI.PixmapCache.getIcon("breakpointToggle.png"), - self.trUtf8('Toggle Breakpoint'), - QKeySequence(self.trUtf8("Shift+F11", "Debug|Toggle Breakpoint")), + self.tr('Toggle Breakpoint'), + QKeySequence(self.tr("Shift+F11", "Debug|Toggle Breakpoint")), 0, self.dbgSetBpActGrp, 'dbg_toggle_breakpoint') - self.dbgToggleBpAct.setStatusTip(self.trUtf8('Toggle Breakpoint')) - self.dbgToggleBpAct.setWhatsThis(self.trUtf8( + self.dbgToggleBpAct.setStatusTip(self.tr('Toggle Breakpoint')) + self.dbgToggleBpAct.setWhatsThis(self.tr( """<b>Toggle Breakpoint</b>""" """<p>Toggles a breakpoint at the current line of the""" """ current editor.</p>""" @@ -522,13 +522,13 @@ self.actions.append(self.dbgToggleBpAct) self.dbgEditBpAct = E5Action( - self.trUtf8('Edit Breakpoint'), + self.tr('Edit Breakpoint'), UI.PixmapCache.getIcon("cBreakpointToggle.png"), - self.trUtf8('Edit Breakpoint...'), - QKeySequence(self.trUtf8("Shift+F12", "Debug|Edit Breakpoint")), 0, + self.tr('Edit Breakpoint...'), + QKeySequence(self.tr("Shift+F12", "Debug|Edit Breakpoint")), 0, self.dbgSetBpActGrp, 'dbg_edit_breakpoint') - self.dbgEditBpAct.setStatusTip(self.trUtf8('Edit Breakpoint')) - self.dbgEditBpAct.setWhatsThis(self.trUtf8( + self.dbgEditBpAct.setStatusTip(self.tr('Edit Breakpoint')) + self.dbgEditBpAct.setWhatsThis(self.tr( """<b>Edit Breakpoint</b>""" """<p>Opens a dialog to edit the breakpoints properties.""" """ It works at the current line of the current editor.</p>""" @@ -537,14 +537,14 @@ self.actions.append(self.dbgEditBpAct) self.dbgNextBpAct = E5Action( - self.trUtf8('Next Breakpoint'), + self.tr('Next Breakpoint'), UI.PixmapCache.getIcon("breakpointNext.png"), - self.trUtf8('Next Breakpoint'), + self.tr('Next Breakpoint'), QKeySequence( - self.trUtf8("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, + self.tr("Ctrl+Shift+PgDown", "Debug|Next Breakpoint")), 0, self.dbgSetBpActGrp, 'dbg_next_breakpoint') - self.dbgNextBpAct.setStatusTip(self.trUtf8('Next Breakpoint')) - self.dbgNextBpAct.setWhatsThis(self.trUtf8( + self.dbgNextBpAct.setStatusTip(self.tr('Next Breakpoint')) + self.dbgNextBpAct.setWhatsThis(self.tr( """<b>Next Breakpoint</b>""" """<p>Go to next breakpoint of the current editor.</p>""" )) @@ -552,14 +552,14 @@ self.actions.append(self.dbgNextBpAct) self.dbgPrevBpAct = E5Action( - self.trUtf8('Previous Breakpoint'), + self.tr('Previous Breakpoint'), UI.PixmapCache.getIcon("breakpointPrevious.png"), - self.trUtf8('Previous Breakpoint'), + self.tr('Previous Breakpoint'), QKeySequence( - self.trUtf8("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), + self.tr("Ctrl+Shift+PgUp", "Debug|Previous Breakpoint")), 0, self.dbgSetBpActGrp, 'dbg_previous_breakpoint') - self.dbgPrevBpAct.setStatusTip(self.trUtf8('Previous Breakpoint')) - self.dbgPrevBpAct.setWhatsThis(self.trUtf8( + self.dbgPrevBpAct.setStatusTip(self.tr('Previous Breakpoint')) + self.dbgPrevBpAct.setWhatsThis(self.tr( """<b>Previous Breakpoint</b>""" """<p>Go to previous breakpoint of the current editor.</p>""" )) @@ -567,13 +567,13 @@ self.actions.append(self.dbgPrevBpAct) act = E5Action( - self.trUtf8('Clear Breakpoints'), - self.trUtf8('Clear Breakpoints'), + self.tr('Clear Breakpoints'), + self.tr('Clear Breakpoints'), QKeySequence( - self.trUtf8("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, + self.tr("Ctrl+Shift+C", "Debug|Clear Breakpoints")), 0, self.dbgSetBpActGrp, 'dbg_clear_breakpoint') - act.setStatusTip(self.trUtf8('Clear Breakpoints')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Clear Breakpoints')) + act.setWhatsThis(self.tr( """<b>Clear Breakpoints</b>""" """<p>Clear breakpoints of all editors.</p>""" )) @@ -600,11 +600,11 @@ @return the generated menu """ - dmenu = QMenu(self.trUtf8('&Debug'), self.parent()) + dmenu = QMenu(self.tr('&Debug'), self.parent()) dmenu.setTearOffEnabled(True) - smenu = QMenu(self.trUtf8('&Start'), self.parent()) + smenu = QMenu(self.tr('&Start'), self.parent()) smenu.setTearOffEnabled(True) - self.breakpointsMenu = QMenu(self.trUtf8('&Breakpoints'), dmenu) + self.breakpointsMenu = QMenu(self.tr('&Breakpoints'), dmenu) smenu.addAction(self.restartAct) smenu.addAction(self.stopAct) @@ -646,10 +646,10 @@ (E5ToolBarManager) @return the generated toolbars (list of QToolBar) """ - starttb = QToolBar(self.trUtf8("Start"), self.ui) + starttb = QToolBar(self.tr("Start"), self.ui) starttb.setIconSize(UI.Config.ToolBarIconSize) starttb.setObjectName("StartToolbar") - starttb.setToolTip(self.trUtf8('Start')) + starttb.setToolTip(self.tr('Start')) starttb.addAction(self.restartAct) starttb.addAction(self.stopAct) @@ -660,10 +660,10 @@ starttb.addAction(self.debugAct) starttb.addAction(self.debugProjectAct) - debugtb = QToolBar(self.trUtf8("Debug"), self.ui) + debugtb = QToolBar(self.tr("Debug"), self.ui) debugtb.setIconSize(UI.Config.ToolBarIconSize) debugtb.setObjectName("DebugToolbar") - debugtb.setToolTip(self.trUtf8('Debug')) + debugtb.setToolTip(self.tr('Debug')) debugtb.addActions(self.debugActGrp.actions()) debugtb.addSeparator() @@ -1010,37 +1010,37 @@ if self.ui.currentProg is None: E5MessageBox.information( self.ui, Program, - self.trUtf8('<p>The program has terminated with an exit' - ' status of {0}.</p>').format(status)) + self.tr('<p>The program has terminated with an exit' + ' status of {0}.</p>').format(status)) else: E5MessageBox.information( self.ui, Program, - self.trUtf8('<p><b>{0}</b> has terminated with an exit' - ' status of {1}.</p>') + self.tr('<p><b>{0}</b> has terminated with an exit' + ' status of {1}.</p>') .format(Utilities.normabspath(self.ui.currentProg), status)) else: if self.ui.notificationsEnabled(): if self.ui.currentProg is None: - msg = self.trUtf8('The program has terminated with an exit' - ' status of {0}.').format(status) + msg = self.tr('The program has terminated with an exit' + ' status of {0}.').format(status) else: - msg = self.trUtf8('"{0}" has terminated with an exit' - ' status of {1}.')\ + msg = self.tr('"{0}" has terminated with an exit' + ' status of {1}.')\ .format(os.path.basename(self.ui.currentProg), status) self.ui.showNotification( UI.PixmapCache.getPixmap("debug48.png"), - self.trUtf8("Program terminated"), msg) + self.tr("Program terminated"), msg) else: if self.ui.currentProg is None: self.appendStdout.emit( - self.trUtf8('The program has terminated with an exit' - ' status of {0}.\n').format(status)) + self.tr('The program has terminated with an exit' + ' status of {0}.\n').format(status)) else: self.appendStdout.emit( - self.trUtf8('"{0}" has terminated with an exit' - ' status of {1}.\n') + self.tr('"{0}" has terminated with an exit' + ' status of {1}.\n') .format(Utilities.normabspath(self.ui.currentProg), status)) @@ -1062,7 +1062,7 @@ if message is None: E5MessageBox.critical( self.ui, Program, - self.trUtf8( + self.tr( 'The program being debugged contains an unspecified' ' syntax error.')) return @@ -1080,9 +1080,9 @@ self.viewmanager.setFileLine(filename, lineNo, True, True) E5MessageBox.critical( self.ui, Program, - self.trUtf8('<p>The file <b>{0}</b> contains the syntax error' - ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.' - '</p>') + self.tr('<p>The file <b>{0}</b> contains the syntax error' + ' <b>{1}</b> at line <b>{2}</b>, character <b>{3}</b>.' + '</p>') .format(filename, message, lineNo, characterNo)) def __clientException(self, exceptionType, exceptionMessage, stackTrace): @@ -1099,8 +1099,8 @@ if exceptionType is None: E5MessageBox.critical( self.ui, Program, - self.trUtf8('An unhandled exception occured.' - ' See the shell window for details.')) + self.tr('An unhandled exception occured.' + ' See the shell window for details.')) return if (self.exceptions and @@ -1139,7 +1139,7 @@ E5MessageBox.Ignore) res = E5MessageBox.critical( self.ui, Program, - self.trUtf8( + self.tr( '<p>The debugged program raised the exception' ' <b>{0}</b><br>"<b>{1}</b>"<br>' 'File: <b>{2}</b>, Line: <b>{3}</b></p>' @@ -1154,7 +1154,7 @@ else: res = E5MessageBox.critical( self.ui, Program, - self.trUtf8( + self.tr( '<p>The debugged program raised the exception' ' <b>{0}</b><br>"<b>{1}</b>"</p>') .format( @@ -1191,8 +1191,8 @@ if unplanned: E5MessageBox.information( self.ui, Program, - self.trUtf8('The program being debugged has terminated' - ' unexpectedly.')) + self.tr('The program being debugged has terminated' + ' unexpectedly.')) def __getThreadList(self): """ @@ -1264,8 +1264,8 @@ """ E5MessageBox.critical( self.ui, - self.trUtf8("Breakpoint Condition Error"), - self.trUtf8( + self.tr("Breakpoint Condition Error"), + self.tr( """<p>The condition of the breakpoint <b>{0}, {1}</b>""" """ contains a syntax error.</p>""") .format(filename, lineno)) @@ -1300,9 +1300,9 @@ """ E5MessageBox.critical( self.ui, - self.trUtf8("Watch Expression Error"), - self.trUtf8("""<p>The watch expression <b>{0}</b>""" - """ contains a syntax error.</p>""") + self.tr("Watch Expression Error"), + self.tr("""<p>The watch expression <b>{0}</b>""" + """ contains a syntax error.</p>""") .format(cond)) model = self.debugServer.getWatchPointModel() @@ -1328,11 +1328,11 @@ idx.internalPointer() != index.internalPointer() if duplicate: if not special: - msg = self.trUtf8("""<p>A watch expression '<b>{0}</b>'""" - """ already exists.</p>""")\ + msg = self.tr("""<p>A watch expression '<b>{0}</b>'""" + """ already exists.</p>""")\ .format(Utilities.html_encode(cond)) else: - msg = self.trUtf8( + msg = self.tr( """<p>A watch expression '<b>{0}</b>'""" """ for the variable <b>{1}</b> already""" """ exists.</p>""")\ @@ -1340,7 +1340,7 @@ Utilities.html_encode(cond)) E5MessageBox.warning( self.ui, - self.trUtf8("Watch expression already exists"), + self.tr("Watch expression already exists"), msg) model.deleteWatchPointByIndex(index) else: @@ -1487,9 +1487,9 @@ # Get the command line arguments, the working directory and the # exception reporting flag. if runProject: - cap = self.trUtf8("Coverage of Project") + cap = self.tr("Coverage of Project") else: - cap = self.trUtf8("Coverage of Script") + cap = self.tr("Coverage of Script") dlg = StartDialog( cap, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 2, @@ -1504,8 +1504,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Coverage of Project"), - self.trUtf8( + self.tr("Coverage of Project"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -1605,9 +1605,9 @@ # Get the command line arguments, the working directory and the # exception reporting flag. if runProject: - cap = self.trUtf8("Profile of Project") + cap = self.tr("Profile of Project") else: - cap = self.trUtf8("Profile of Script") + cap = self.tr("Profile of Script") dlg = StartDialog( cap, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 3, @@ -1622,8 +1622,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Profile of Project"), - self.trUtf8( + self.tr("Profile of Project"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -1723,9 +1723,9 @@ # Get the command line arguments, the working directory and the # exception reporting flag. if runProject: - cap = self.trUtf8("Run Project") + cap = self.tr("Run Project") else: - cap = self.trUtf8("Run Script") + cap = self.tr("Run Script") dlg = StartDialog( cap, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 1, @@ -1742,8 +1742,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Run Project"), - self.trUtf8( + self.tr("Run Project"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -1844,9 +1844,9 @@ # Get the command line arguments, the working directory and the # exception reporting flag. if debugProject: - cap = self.trUtf8("Debug Project") + cap = self.tr("Debug Project") else: - cap = self.trUtf8("Debug Script") + cap = self.tr("Debug Script") dlg = StartDialog( cap, self.argvHistory, self.wdHistory, self.envHistory, self.exceptions, self.ui, 0, tracePython=self.tracePython, @@ -1863,8 +1863,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Debug Project"), - self.trUtf8( + self.tr("Debug Project"), + self.tr( "There is no main script defined for the" " current project. No debugging possible.")) return @@ -2154,8 +2154,8 @@ arg, ok = QInputDialog.getItem( self.ui, - self.trUtf8("Evaluate"), - self.trUtf8("Enter the statement to evaluate"), + self.tr("Evaluate"), + self.tr("Enter the statement to evaluate"), self.evalHistory, curr, True) @@ -2183,8 +2183,8 @@ stmt, ok = QInputDialog.getItem( self.ui, - self.trUtf8("Execute"), - self.trUtf8("Enter the statement to execute"), + self.tr("Execute"), + self.tr("Enter the statement to execute"), self.execHistory, curr, True)
--- a/Debugger/DebugViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebugViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -117,16 +117,16 @@ QSizePolicy.Expanding, QSizePolicy.Fixed) self.glvWidgetHLayout.addWidget(self.globalsFilterEdit) self.globalsFilterEdit.setToolTip( - self.trUtf8("Enter regular expression patterns separated by ';'" - " to define variable filters. ")) + self.tr("Enter regular expression patterns separated by ';'" + " to define variable filters. ")) self.globalsFilterEdit.setWhatsThis( - self.trUtf8("Enter regular expression patterns separated by ';'" - " to define variable filters. All variables and" - " class attributes matched by one of the expressions" - " are not shown in the list above.")) + self.tr("Enter regular expression patterns separated by ';'" + " to define variable filters. All variables and" + " class attributes matched by one of the expressions" + " are not shown in the list above.")) self.setGlobalsFilterButton = QPushButton( - self.trUtf8('Set'), self.glvWidget) + self.tr('Set'), self.glvWidget) self.glvWidgetHLayout.addWidget(self.setGlobalsFilterButton) self.glvWidgetVLayout.addLayout(self.glvWidgetHLayout) @@ -154,7 +154,7 @@ QSizePolicy.Expanding, QSizePolicy.Fixed) self.lvWidgetHLayout1.addWidget(self.stackComboBox) - self.sourceButton = QPushButton(self.trUtf8('Source'), self.lvWidget) + self.sourceButton = QPushButton(self.tr('Source'), self.lvWidget) self.lvWidgetHLayout1.addWidget(self.sourceButton) self.sourceButton.setEnabled(False) self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout1) @@ -170,17 +170,17 @@ QSizePolicy.Expanding, QSizePolicy.Fixed) self.lvWidgetHLayout2.addWidget(self.localsFilterEdit) self.localsFilterEdit.setToolTip( - self.trUtf8( + self.tr( "Enter regular expression patterns separated by ';' to define " "variable filters. ")) self.localsFilterEdit.setWhatsThis( - self.trUtf8( + self.tr( "Enter regular expression patterns separated by ';' to define " "variable filters. All variables and class attributes matched" " by one of the expressions are not shown in the list above.")) self.setLocalsFilterButton = QPushButton( - self.trUtf8('Set'), self.lvWidget) + self.tr('Set'), self.lvWidget) self.lvWidgetHLayout2.addWidget(self.setLocalsFilterButton) self.lvWidgetVLayout.addLayout(self.lvWidgetHLayout2) @@ -256,11 +256,11 @@ self.__tabWidget.setCurrentWidget(self.lvWidget) # add the threads viewer - self.__mainLayout.addWidget(QLabel(self.trUtf8("Threads:"))) + self.__mainLayout.addWidget(QLabel(self.tr("Threads:"))) self.__threadList = QTreeWidget() self.__threadList.setHeaderLabels( - [self.trUtf8("ID"), self.trUtf8("Name"), - self.trUtf8("State"), ""]) + [self.tr("ID"), self.tr("Name"), + self.tr("State"), ""]) self.__threadList.setSortingEnabled(True) self.__mainLayout.addWidget(self.__threadList) @@ -514,9 +514,9 @@ self.__threadList.clear() for thread in threadList: if thread['broken']: - state = self.trUtf8("waiting at breakpoint") + state = self.tr("waiting at breakpoint") else: - state = self.trUtf8("running") + state = self.tr("running") itm = QTreeWidgetItem(self.__threadList, ["{0:d}".format(thread['id']), thread['name'], state])
--- a/Debugger/DebuggerInterfacePython.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebuggerInterfacePython.py Sat Jan 11 11:55:33 2014 +0100 @@ -157,8 +157,8 @@ if interpreter == "": E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>No Python2 interpreter configured.</p>""")) return None, False @@ -197,8 +197,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) @@ -244,8 +244,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -257,8 +257,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -299,8 +299,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) # set translation function @@ -346,8 +346,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -359,8 +359,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -798,12 +798,12 @@ """ Private method to ask the user which branch of a fork to follow. """ - selections = [self.trUtf8("Parent Process"), - self.trUtf8("Child process")] + selections = [self.tr("Parent Process"), + self.tr("Child process")] res, ok = QInputDialog.getItem( None, - self.trUtf8("Client forking"), - self.trUtf8("Select the fork branch to follow."), + self.tr("Client forking"), + self.tr("Select the fork branch to follow."), selections, 0, False) if not ok or res == selections[0]:
--- a/Debugger/DebuggerInterfacePython3.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebuggerInterfacePython3.py Sat Jan 11 11:55:33 2014 +0100 @@ -192,8 +192,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) @@ -239,8 +239,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -252,8 +252,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -294,8 +294,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) # set translation function @@ -341,8 +341,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -354,8 +354,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -793,12 +793,12 @@ """ Private method to ask the user which branch of a fork to follow. """ - selections = [self.trUtf8("Parent Process"), - self.trUtf8("Child process")] + selections = [self.tr("Parent Process"), + self.tr("Child process")] res, ok = QInputDialog.getItem( None, - self.trUtf8("Client forking"), - self.trUtf8("Select the fork branch to follow."), + self.tr("Client forking"), + self.tr("Select the fork branch to follow."), selections, 0, False) if not ok or res == selections[0]:
--- a/Debugger/DebuggerInterfaceRuby.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/DebuggerInterfaceRuby.py Sat Jan 11 11:55:33 2014 +0100 @@ -164,8 +164,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) @@ -211,8 +211,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -224,8 +224,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked @@ -264,8 +264,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) # set translation function @@ -311,8 +311,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be""" """ started.</p>""")) return process, self.__isNetworked @@ -324,8 +324,8 @@ if process is None: E5MessageBox.critical( None, - self.trUtf8("Start Debugger"), - self.trUtf8( + self.tr("Start Debugger"), + self.tr( """<p>The debugger backend could not be started.</p>""")) return process, self.__isNetworked
--- a/Debugger/EditBreakpointDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/EditBreakpointDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -88,7 +88,7 @@ self.linenoSpinBox.setEnabled(False) self.conditionCombo.setFocus() else: - self.setWindowTitle(self.trUtf8("Add Breakpoint")) + self.setWindowTitle(self.tr("Add Breakpoint")) # set the filename if fn is None: fn = "" @@ -120,7 +120,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select filename of the breakpoint"), + self.tr("Select filename of the breakpoint"), self.filenameCombo.currentText(), "")
--- a/Debugger/ExceptionLogger.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/ExceptionLogger.py Sat Jan 11 11:55:33 2014 +0100 @@ -33,18 +33,18 @@ super().__init__(parent) self.setObjectName("ExceptionLogger") - self.setWindowTitle(self.trUtf8("Exceptions")) + self.setWindowTitle(self.tr("Exceptions")) self.setWordWrap(True) self.setRootIsDecorated(True) - self.setHeaderLabels([self.trUtf8("Exception")]) + self.setHeaderLabels([self.tr("Exception")]) self.setSortingEnabled(False) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__showContextMenu) self.itemDoubleClicked.connect(self.__itemDoubleClicked) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Exceptions Logger</b>""" """<p>This windows shows a trace of all exceptions, that have""" """ occured during the last debugging session. Initially only""" @@ -55,15 +55,15 @@ )) self.menu = QMenu(self) - self.menu.addAction(self.trUtf8("Show source"), self.__openSource) - self.menu.addAction(self.trUtf8("Clear"), self.clear) + self.menu.addAction(self.tr("Show source"), self.__openSource) + self.menu.addAction(self.tr("Clear"), self.clear) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.menu.addAction(self.tr("Configure..."), self.__configure) self.backMenu = QMenu(self) - self.backMenu.addAction(self.trUtf8("Clear"), self.clear) + self.backMenu.addAction(self.tr("Clear"), self.clear) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.backMenu.addAction(self.tr("Configure..."), self.__configure) def __itemDoubleClicked(self, itm): """ @@ -97,8 +97,8 @@ itm = QTreeWidgetItem(self) if exceptionType is None: itm.setText( - 0, self.trUtf8('An unhandled exception occured.' - ' See the shell window for details.')) + 0, self.tr('An unhandled exception occured.' + ' See the shell window for details.')) return if exceptionMessage == '':
--- a/Debugger/ExceptionsFilterDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/ExceptionsFilterDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,9 +32,9 @@ self.exceptionList.addItems(excList) if ignore: - self.setWindowTitle(self.trUtf8("Ignored Exceptions")) + self.setWindowTitle(self.tr("Ignored Exceptions")) self.exceptionList.setToolTip( - self.trUtf8("List of ignored exceptions")) + self.tr("List of ignored exceptions")) self.okButton = self.buttonBox.button(QDialogButtonBox.Ok)
--- a/Debugger/StartDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/StartDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -79,7 +79,7 @@ self.ui.dirButton.setIcon(UI.PixmapCache.getIcon("open.png")) self.clearButton = self.ui.buttonBox.addButton( - self.trUtf8("Clear Histories"), QDialogButtonBox.ActionRole) + self.tr("Clear Histories"), QDialogButtonBox.ActionRole) self.workdirCompleter = E5DirCompleter(self.ui.workdirCombo) @@ -124,7 +124,7 @@ cwd = self.ui.workdirCombo.currentText() d = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Working directory"), + self.tr("Working directory"), cwd, E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Debugger/VariablesFilterDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/VariablesFilterDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -37,14 +37,14 @@ self.setupUi(self) self.defaultButton = self.buttonBox.addButton( - self.trUtf8("Save Default"), QDialogButtonBox.ActionRole) + self.tr("Save Default"), QDialogButtonBox.ActionRole) lDefaultFilter, gDefaultFilter = Preferences.getVarFilters() #populate the listboxes and set the default selection for lb in self.localsList, self.globalsList: for ts in ConfigVarTypeDispStrings: - lb.addItem(self.trUtf8(ts)) + lb.addItem(self.tr(ts)) for filterIndex in lDefaultFilter: itm = self.localsList.item(filterIndex)
--- a/Debugger/VariablesViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/VariablesViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -310,23 +310,23 @@ self.scope = scope if scope: - self.setWindowTitle(self.trUtf8("Global Variables")) + self.setWindowTitle(self.tr("Global Variables")) self.setHeaderLabels([ - self.trUtf8("Globals"), - self.trUtf8("Value"), - self.trUtf8("Type")]) - self.setWhatsThis(self.trUtf8( + self.tr("Globals"), + self.tr("Value"), + self.tr("Type")]) + self.setWhatsThis(self.tr( """<b>The Global Variables Viewer Window</b>""" """<p>This window displays the global variables""" """ of the debugged program.</p>""" )) else: - self.setWindowTitle(self.trUtf8("Local Variables")) + self.setWindowTitle(self.tr("Local Variables")) self.setHeaderLabels([ - self.trUtf8("Locals"), - self.trUtf8("Value"), - self.trUtf8("Type")]) - self.setWhatsThis(self.trUtf8( + self.tr("Locals"), + self.tr("Value"), + self.tr("Type")]) + self.setWhatsThis(self.tr( """<b>The Local Variables Viewer Window</b>""" """<p>This window displays the local variables""" """ of the debugged program.</p>""" @@ -356,12 +356,12 @@ Private method to generate the popup menus. """ self.menu = QMenu() - self.menu.addAction(self.trUtf8("Show Details..."), self.__showDetails) + self.menu.addAction(self.tr("Show Details..."), self.__showDetails) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.menu.addAction(self.tr("Configure..."), self.__configure) self.backMenu = QMenu() - self.backMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.backMenu.addAction(self.tr("Configure..."), self.__configure) def __showContextMenu(self, coord): """ @@ -570,7 +570,7 @@ if vtype in ['list', 'Array', 'tuple', 'dict', 'Hash']: itm = self.__generateItem(parent, dvar, - self.trUtf8("{0} items").format(value), + self.tr("{0} items").format(value), dvtype, True) elif vtype in ['unicode', 'str']: if self.rx_nonprintable.indexIn(value) != -1: @@ -597,10 +597,10 @@ """ try: i = ConfigVarTypeStrings.index(vtype) - dvtype = self.trUtf8(ConfigVarTypeDispStrings[i]) + dvtype = self.tr(ConfigVarTypeDispStrings[i]) except ValueError: if vtype == 'classobj': - dvtype = self.trUtf8(ConfigVarTypeDispStrings[ + dvtype = self.tr(ConfigVarTypeDispStrings[ ConfigVarTypeStrings.index('instance')]) else: dvtype = vtype
--- a/Debugger/WatchPointModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/WatchPointModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -26,11 +26,11 @@ self.watchpoints = [] self.header = [ - self.trUtf8("Condition"), - self.trUtf8("Special"), - self.trUtf8('Temporary'), - self.trUtf8('Enabled'), - self.trUtf8('Ignore Count'), + self.tr("Condition"), + self.tr("Special"), + self.tr('Temporary'), + self.tr('Enabled'), + self.tr('Ignore Count'), ] self.alignments = [Qt.Alignment(Qt.AlignLeft), Qt.Alignment(Qt.AlignLeft),
--- a/Debugger/WatchPointViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Debugger/WatchPointViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,7 +41,7 @@ self.setSelectionMode(QAbstractItemView.ExtendedSelection) self.setSelectionBehavior(QAbstractItemView.SelectRows) - self.setWindowTitle(self.trUtf8("Watchpoints")) + self.setWindowTitle(self.tr("Watchpoints")) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__showContextMenu) @@ -137,58 +137,58 @@ Private method to generate the popup menus. """ self.menu = QMenu() - self.menu.addAction(self.trUtf8("Add"), self.__addWatchPoint) - self.menu.addAction(self.trUtf8("Edit..."), self.__editWatchPoint) + self.menu.addAction(self.tr("Add"), self.__addWatchPoint) + self.menu.addAction(self.tr("Edit..."), self.__editWatchPoint) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Enable"), self.__enableWatchPoint) - self.menu.addAction(self.trUtf8("Enable all"), + self.menu.addAction(self.tr("Enable"), self.__enableWatchPoint) + self.menu.addAction(self.tr("Enable all"), self.__enableAllWatchPoints) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Disable"), self.__disableWatchPoint) - self.menu.addAction(self.trUtf8("Disable all"), + self.menu.addAction(self.tr("Disable"), self.__disableWatchPoint) + self.menu.addAction(self.tr("Disable all"), self.__disableAllWatchPoints) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Delete"), self.__deleteWatchPoint) - self.menu.addAction(self.trUtf8("Delete all"), + self.menu.addAction(self.tr("Delete"), self.__deleteWatchPoint) + self.menu.addAction(self.tr("Delete all"), self.__deleteAllWatchPoints) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.menu.addAction(self.tr("Configure..."), self.__configure) self.backMenuActions = {} self.backMenu = QMenu() - self.backMenu.addAction(self.trUtf8("Add"), self.__addWatchPoint) + self.backMenu.addAction(self.tr("Add"), self.__addWatchPoint) self.backMenuActions["EnableAll"] = \ - self.backMenu.addAction(self.trUtf8("Enable all"), + self.backMenu.addAction(self.tr("Enable all"), self.__enableAllWatchPoints) self.backMenuActions["DisableAll"] = \ - self.backMenu.addAction(self.trUtf8("Disable all"), + self.backMenu.addAction(self.tr("Disable all"), self.__disableAllWatchPoints) self.backMenuActions["DeleteAll"] = \ - self.backMenu.addAction(self.trUtf8("Delete all"), + self.backMenu.addAction(self.tr("Delete all"), self.__deleteAllWatchPoints) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.backMenu.addAction(self.tr("Configure..."), self.__configure) self.backMenu.aboutToShow.connect(self.__showBackMenu) self.multiMenu = QMenu() - self.multiMenu.addAction(self.trUtf8("Add"), self.__addWatchPoint) + self.multiMenu.addAction(self.tr("Add"), self.__addWatchPoint) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Enable selected"), + self.multiMenu.addAction(self.tr("Enable selected"), self.__enableSelectedWatchPoints) - self.multiMenu.addAction(self.trUtf8("Enable all"), + self.multiMenu.addAction(self.tr("Enable all"), self.__enableAllWatchPoints) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Disable selected"), + self.multiMenu.addAction(self.tr("Disable selected"), self.__disableSelectedWatchPoints) - self.multiMenu.addAction(self.trUtf8("Disable all"), + self.multiMenu.addAction(self.tr("Disable all"), self.__disableAllWatchPoints) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Delete selected"), + self.multiMenu.addAction(self.tr("Delete selected"), self.__deleteSelectedWatchPoints) - self.multiMenu.addAction(self.trUtf8("Delete all"), + self.multiMenu.addAction(self.tr("Delete all"), self.__deleteAllWatchPoints) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8("Configure..."), self.__configure) + self.multiMenu.addAction(self.tr("Configure..."), self.__configure) def __showContextMenu(self, coord): """ @@ -235,17 +235,17 @@ idx.internalPointer() != index.internalPointer() if showMessage and duplicate: if not special: - msg = self.trUtf8("""<p>A watch expression '<b>{0}</b>'""" - """ already exists.</p>""")\ + msg = self.tr("""<p>A watch expression '<b>{0}</b>'""" + """ already exists.</p>""")\ .format(Utilities.html_encode(cond)) else: - msg = self.trUtf8( + msg = self.tr( """<p>A watch expression '<b>{0}</b>'""" """ for the variable <b>{1}</b> already exists.</p>""")\ .format(special, Utilities.html_encode(cond)) E5MessageBox.warning( self, - self.trUtf8("Watch expression already exists"), + self.tr("Watch expression already exists"), msg) return duplicate
--- a/E5Graphics/E5GraphicsView.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Graphics/E5GraphicsView.py Sat Jan 11 11:55:33 2014 +0100 @@ -51,7 +51,7 @@ self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) self.setViewportUpdateMode(QGraphicsView.SmartViewportUpdate) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( "<b>Graphics View</b>\n" "<p>This graphics view is used to show a diagram. \n" "There are various actions available to manipulate the \n" @@ -366,7 +366,7 @@ painter.drawPixmap(marginX, marginY, diagram, offsetX, offsetY, widthX, heightY) # write a foot note - s = self.trUtf8("{0}, Page {1}").format(diagramName, page + 1) + s = self.tr("{0}, Page {1}").format(diagramName, page + 1) tc = QColor(50, 50, 50) painter.setPen(tc) painter.drawRect(marginX, marginY, width, height)
--- a/E5Gui/E5ErrorMessageFilterDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Gui/E5ErrorMessageFilterDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,8 +49,8 @@ """ filter, ok = QInputDialog.getText( self, - self.trUtf8("Error Messages Filter"), - self.trUtf8("Enter message filter to add to the list:"), + self.tr("Error Messages Filter"), + self.tr("Enter message filter to add to the list:"), QLineEdit.Normal) if ok and filter != "" and filter not in self.__model.stringList(): self.__model.insertRow(self.__model.rowCount())
--- a/E5Gui/E5MainWindow.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Gui/E5MainWindow.py Sat Jan 11 11:55:33 2014 +0100 @@ -53,8 +53,8 @@ except (IOError, OSError) as msg: E5MessageBox.warning( self, - self.trUtf8("Loading Style Sheet"), - self.trUtf8( + self.tr("Loading Style Sheet"), + self.tr( """<p>The Qt Style Sheet file <b>{0}</b> could""" """ not be read.<br>Reason: {1}</p>""") .format(styleSheetFile, str(msg)))
--- a/E5Gui/E5SideBar.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Gui/E5SideBar.py Sat Jan 11 11:55:33 2014 +0100 @@ -54,7 +54,7 @@ UI.PixmapCache.getIcon("autoHideOff.png")) self.__autoHideButton.setChecked(True) self.__autoHideButton.setToolTip( - self.trUtf8("Deselect to activate automatic collapsing")) + self.tr("Deselect to activate automatic collapsing")) self.barLayout = QBoxLayout(QBoxLayout.LeftToRight) self.barLayout.setContentsMargins(0, 0, 0, 0) self.layout = QBoxLayout(QBoxLayout.TopToBottom)
--- a/E5Gui/E5ToolBarDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Gui/E5ToolBarDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -78,7 +78,7 @@ self.__resetButton = self.buttonBox.button(QDialogButtonBox.Reset) self.actionsTree.header().hide() - self.__separatorText = self.trUtf8("--Separator--") + self.__separatorText = self.tr("--Separator--") itm = QTreeWidgetItem(self.actionsTree, [self.__separatorText]) self.actionsTree.setCurrentItem(itm) @@ -133,16 +133,16 @@ """ name, ok = QInputDialog.getText( self, - self.trUtf8("New Toolbar"), - self.trUtf8("Toolbar Name:"), + self.tr("New Toolbar"), + self.tr("Toolbar Name:"), QLineEdit.Normal) if ok and name: if self.toolbarComboBox.findText(name) != -1: # toolbar with this name already exists E5MessageBox.critical( self, - self.trUtf8("New Toolbar"), - self.trUtf8( + self.tr("New Toolbar"), + self.tr( """A toolbar with the name <b>{0}</b> already""" """ exists.""") .format(name)) @@ -166,8 +166,8 @@ name = self.toolbarComboBox.currentText() res = E5MessageBox.yesNo( self, - self.trUtf8("Remove Toolbar"), - self.trUtf8( + self.tr("Remove Toolbar"), + self.tr( """Should the toolbar <b>{0}</b> really be removed?""") .format(name)) if res: @@ -191,8 +191,8 @@ oldName = self.toolbarComboBox.currentText() newName, ok = QInputDialog.getText( self, - self.trUtf8("Rename Toolbar"), - self.trUtf8("New Toolbar Name:"), + self.tr("Rename Toolbar"), + self.tr("New Toolbar Name:"), QLineEdit.Normal, oldName) if ok and newName: @@ -202,8 +202,8 @@ # toolbar with this name already exists E5MessageBox.critical( self, - self.trUtf8("Rename Toolbar"), - self.trUtf8( + self.tr("Rename Toolbar"), + self.tr( """A toolbar with the name <b>{0}</b> already""" """ exists.""") .format(newName))
--- a/E5Network/E5NetworkMonitor.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Network/E5NetworkMonitor.py Sat Jan 11 11:55:33 2014 +0100 @@ -75,14 +75,14 @@ self.__requestHeaders = QStandardItemModel(self) self.__requestHeaders.setHorizontalHeaderLabels( - [self.trUtf8("Name"), self.trUtf8("Value")]) + [self.tr("Name"), self.tr("Value")]) self.requestHeadersList.setModel(self.__requestHeaders) self.requestHeadersList.horizontalHeader().setStretchLastSection(True) self.requestHeadersList.doubleClicked.connect(self.__showHeaderDetails) self.__replyHeaders = QStandardItemModel(self) self.__replyHeaders.setHorizontalHeaderLabels( - [self.trUtf8("Name"), self.trUtf8("Value")]) + [self.tr("Name"), self.tr("Value")]) self.responseHeadersList.setModel(self.__replyHeaders) self.responseHeadersList.horizontalHeader().setStretchLastSection(True) self.responseHeadersList.doubleClicked.connect( @@ -215,12 +215,12 @@ super().__init__(parent) self.__headerData = [ - self.trUtf8("Method"), - self.trUtf8("Address"), - self.trUtf8("Response"), - self.trUtf8("Length"), - self.trUtf8("Content Type"), - self.trUtf8("Info"), + self.tr("Method"), + self.tr("Address"), + self.tr("Response"), + self.tr("Length"), + self.tr("Content Type"), + self.tr("Info"), ] self.__operations = { @@ -294,7 +294,7 @@ target = reply.attribute( QNetworkRequest.RedirectionTargetAttribute) or QUrl() self.requests[offset].info = \ - self.trUtf8("Redirect: {0}").format(target.toString()) + self.tr("Redirect: {0}").format(target.toString()) def headerData(self, section, orientation, role=Qt.DisplayRole): """ @@ -327,7 +327,7 @@ try: return self.__operations[self.requests[index.row()].op] except KeyError: - return self.trUtf8("Unknown") + return self.tr("Unknown") elif col == 1: return self.requests[index.row()].request.url().toEncoded() elif col == 2:
--- a/E5Network/E5SslCertificatesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Network/E5SslCertificatesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -94,9 +94,9 @@ commonName = Utilities.decodeString( cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": - organisation = self.trUtf8("(Unknown)") + organisation = self.tr("(Unknown)") if commonName is None or commonName == "": - commonName = self.trUtf8("(Unknown common name)") + commonName = self.tr("(Unknown common name)") expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry @@ -150,13 +150,13 @@ itm = self.serversCertificatesTree.currentItem() res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Server Certificate"), - self.trUtf8("""<p>Shall the server certificate really be""" - """ deleted?</p><p>{0}</p>""" - """<p>If the server certificate is deleted, the""" - """ normal security checks will be reinstantiated""" - """ and the server has to present a valid""" - """ certificate.</p>""") + self.tr("Delete Server Certificate"), + self.tr("""<p>Shall the server certificate really be""" + """ deleted?</p><p>{0}</p>""" + """<p>If the server certificate is deleted, the""" + """ normal security checks will be reinstantiated""" + """ and the server has to present a valid""" + """ certificate.</p>""") .format(itm.text(0))) if res: server = itm.text(1) @@ -218,8 +218,8 @@ QSslCertificate.CommonName) E5MessageBox.warning( self, - self.trUtf8("Import Certificate"), - self.trUtf8( + self.tr("Import Certificate"), + self.tr( """<p>The certificate <b>{0}</b> already exists.""" """ Skipping.</p>""") .format(Utilities.decodeString(commonStr))) @@ -305,9 +305,9 @@ commonName = Utilities.decodeString( cert.subjectInfo(QSslCertificate.CommonName)) if organisation is None or organisation == "": - organisation = self.trUtf8("(Unknown)") + organisation = self.tr("(Unknown)") if commonName is None or commonName == "": - commonName = self.trUtf8("(Unknown common name)") + commonName = self.tr("(Unknown common name)") expiryDate = cert.expiryDate().toString("yyyy-MM-dd") # step 2: create the entry @@ -359,8 +359,8 @@ itm = self.caCertificatesTree.currentItem() res = E5MessageBox.yesNo( self, - self.trUtf8("Delete CA Certificate"), - self.trUtf8( + self.tr("Delete CA Certificate"), + self.tr( """<p>Shall the CA certificate really be deleted?</p>""" """<p>{0}</p>""" """<p>If the CA certificate is deleted, the browser""" @@ -408,8 +408,8 @@ QSslCertificate.CommonName) E5MessageBox.warning( self, - self.trUtf8("Import Certificate"), - self.trUtf8( + self.tr("Import Certificate"), + self.tr( """<p>The certificate <b>{0}</b> already exists.""" """ Skipping.</p>""") .format(Utilities.decodeString(commonStr))) @@ -447,10 +447,10 @@ if cert is not None: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Export Certificate"), + self.tr("Export Certificate"), name, - self.trUtf8("Certificate File (PEM) (*.pem);;" - "Certificate File (DER) (*.der)"), + self.tr("Certificate File (PEM) (*.pem);;" + "Certificate File (DER) (*.der)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -463,9 +463,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Export Certificate"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Export Certificate"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -474,8 +474,8 @@ if not f.open(QIODevice.WriteOnly): E5MessageBox.critical( self, - self.trUtf8("Export Certificate"), - self.trUtf8( + self.tr("Export Certificate"), + self.tr( """<p>The certificate could not be written""" """ to file <b>{0}</b></p><p>Error: {1}</p>""") .format(fname, f.errorString())) @@ -496,18 +496,18 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Import Certificate"), + self.tr("Import Certificate"), "", - self.trUtf8("Certificate Files (*.pem *.crt *.der *.cer *.ca);;" - "All Files (*)")) + self.tr("Certificate Files (*.pem *.crt *.der *.cer *.ca);;" + "All Files (*)")) if fname: f = QFile(fname) if not f.open(QIODevice.ReadOnly): E5MessageBox.critical( self, - self.trUtf8("Export Certificate"), - self.trUtf8( + self.tr("Export Certificate"), + self.tr( """<p>The certificate could not be read from file""" """ <b>{0}</b></p><p>Error: {1}</p>""") .format(fname, f.errorString()))
--- a/E5Network/E5SslCertificatesInfoWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Network/E5SslCertificatesInfoWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -152,7 +152,7 @@ @return prepared text (string) """ if txt is None or txt == "": - return self.trUtf8("<not part of the certificate>") + return self.tr("<not part of the certificate>") return Utilities.decodeString(txt) @@ -165,7 +165,7 @@ """ serial = cert.serialNumber() if serial == "": - return self.trUtf8("<not part of the certificate>") + return self.tr("<not part of the certificate>") if ':' in serial: return str(serial, encoding="ascii").upper()
--- a/E5Network/E5SslErrorHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Network/E5SslErrorHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -130,10 +130,10 @@ errorString = '.</li><li>'.join(errorStrings) ret = E5MessageBox.yesNo( None, - self.trUtf8("SSL Errors"), - self.trUtf8("""<p>SSL Errors for <br /><b>{0}</b>""" - """<ul><li>{1}</li></ul></p>""" - """<p>Do you want to ignore these errors?</p>""") + self.tr("SSL Errors"), + self.tr("""<p>SSL Errors for <br /><b>{0}</b>""" + """<ul><li>{1}</li></ul></p>""" + """<p>Do you want to ignore these errors?</p>""") .format(server, errorString), icon=E5MessageBox.Warning) @@ -145,8 +145,8 @@ certinfos.append(self.__certToString(cert)) caRet = E5MessageBox.yesNo( None, - self.trUtf8("Certificates"), - self.trUtf8( + self.tr("Certificates"), + self.tr( """<p>Certificates:<br/>{0}<br/>""" """Do you want to accept all these certificates?""" """</p>""") @@ -190,32 +190,32 @@ result = "<p>" if qVersion() >= "5.0.0": - result += self.trUtf8("Name: {0}")\ + result += self.tr("Name: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( ", ".join(cert.subjectInfo(QSslCertificate.CommonName))))) - result += self.trUtf8("<br/>Organization: {0}")\ + result += self.tr("<br/>Organization: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( ", ".join(cert.subjectInfo( QSslCertificate.Organization))))) - result += self.trUtf8("<br/>Issuer: {0}")\ + result += self.tr("<br/>Issuer: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( ", ".join(cert.issuerInfo(QSslCertificate.CommonName))))) else: - result += self.trUtf8("Name: {0}")\ + result += self.tr("Name: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( cert.subjectInfo(QSslCertificate.CommonName)))) - result += self.trUtf8("<br/>Organization: {0}")\ + result += self.tr("<br/>Organization: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( cert.subjectInfo(QSslCertificate.Organization)))) - result += self.trUtf8("<br/>Issuer: {0}")\ + result += self.tr("<br/>Issuer: {0}")\ .format(Utilities.html_encode(Utilities.decodeString( cert.issuerInfo(QSslCertificate.CommonName)))) - result += self.trUtf8( + result += self.tr( "<br/>Not valid before: {0}<br/>Valid Until: {1}")\ .format(Utilities.html_encode( cert.effectiveDate().toString("yyyy-MM-dd")),
--- a/E5Network/E5SslInfoWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/E5Network/E5SslInfoWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -53,7 +53,7 @@ label = QLabel(self) label.setWordWrap(True) label.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) - label.setText(self.trUtf8("Identity")) + label.setText(self.tr("Identity")) font = label.font() font.setBold(True) label.setFont(font) @@ -63,7 +63,7 @@ label = QLabel(self) label.setWordWrap(True) if cert.isNull(): - label.setText(self.trUtf8( + label.setText(self.tr( "Warning: this site is NOT carrying a certificate.")) imageLabel.setPixmap(UI.PixmapCache.getPixmap("securityLow32.png")) else: @@ -77,14 +77,14 @@ cert.issuerInfo(QSslCertificate.CommonName)) else: txt = cert.issuerInfo(QSslCertificate.CommonName) - label.setText(self.trUtf8( + label.setText(self.tr( "The certificate for this site is valid" " and has been verified by:\n{0}").format( Utilities.decodeString(txt))) imageLabel.setPixmap( UI.PixmapCache.getPixmap("securityHigh32.png")) else: - label.setText(self.trUtf8( + label.setText(self.tr( "The certificate for this site is NOT valid.")) imageLabel.setPixmap( UI.PixmapCache.getPixmap("securityLow32.png")) @@ -95,7 +95,7 @@ label.setWordWrap(True) label.setText( '<a href="moresslinfos">' + - self.trUtf8("Certificate Information") + "</a>") + self.tr("Certificate Information") + "</a>") label.linkActivated.connect(self.__showCertificateInfos) layout.addWidget(label, rows, 1) rows += 1 @@ -108,7 +108,7 @@ label = QLabel(self) label.setWordWrap(True) - label.setText(self.trUtf8("Encryption")) + label.setText(self.tr("Encryption")) font = label.font() font.setBold(True) label.setFont(font) @@ -119,7 +119,7 @@ if cipher.isNull(): label = QLabel(self) label.setWordWrap(True) - label.setText(self.trUtf8( + label.setText(self.tr( 'Your connection to "{0}" is NOT encrypted.\n').format( self.__url.host())) layout.addWidget(label, rows, 1) @@ -128,7 +128,7 @@ else: label = QLabel(self) label.setWordWrap(True) - label.setText(self.trUtf8( + label.setText(self.tr( 'Your connection to "{0}" is encrypted.').format( self.__url.host())) layout.addWidget(label, rows, 1) @@ -147,21 +147,21 @@ imageLabel.setPixmap( UI.PixmapCache.getPixmap("securityLow32.png")) else: - sslVersion = self.trUtf8("unknown") + sslVersion = self.tr("unknown") imageLabel.setPixmap( UI.PixmapCache.getPixmap("securityLow32.png")) rows += 1 label = QLabel(self) label.setWordWrap(True) - label.setText(self.trUtf8( + label.setText(self.tr( "It uses protocol: {0}").format(sslVersion)) layout.addWidget(label, rows, 1) rows += 1 label = QLabel(self) label.setWordWrap(True) - label.setText(self.trUtf8( + label.setText(self.tr( "It is encrypted using {0} at {1} bits, " "with {2} for message authentication and " "{3} as key exchange mechanism.\n\n").format(
--- a/Graphics/ApplicationDiagramBuilder.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/ApplicationDiagramBuilder.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,7 +41,7 @@ self.noModules = noModules self.umlView.setDiagramName( - self.trUtf8("Application Diagram {0}").format( + self.tr("Application Diagram {0}").format( self.project.getProjectName())) def __buildModulesDict(self): @@ -62,8 +62,8 @@ self.project.ppath, module)) tot = len(modules) progress = E5ProgressDialog( - self.trUtf8("Parsing modules..."), - None, 0, tot, self.trUtf8("%v/%m Modules"), self.parent()) + self.tr("Parsing modules..."), + None, 0, tot, self.tr("%v/%m Modules"), self.parent()) try: prog = 0 progress.show() @@ -189,9 +189,9 @@ if relPackage and relPackage[0] == '.': relPackage = relPackage[1:] else: - relPackage = self.trUtf8("<<Application>>") + relPackage = self.tr("<<Application>>") else: - relPackage = self.trUtf8("<<Others>>") + relPackage = self.tr("<<Others>>") shape = self.__addPackage( relPackage, packages[package][0], 0.0, 0.0) shapeRect = shape.sceneBoundingRect() @@ -278,8 +278,8 @@ if projectFile != self.project.getProjectFile(): res = E5MessageBox.yesNo( None, - self.trUtf8("Load Diagram"), - self.trUtf8( + self.tr("Load Diagram"), + self.tr( """<p>The diagram belongs to the project <b>{0}</b>.""" """ Shall this project be opened?</p>""").format( projectFile))
--- a/Graphics/ImportsDiagramBuilder.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/ImportsDiagramBuilder.py Sat Jan 11 11:55:33 2014 +0100 @@ -62,10 +62,10 @@ pname = self.project.getProjectName() if pname: - name = self.trUtf8("Imports Diagramm {0}: {1}").format( + name = self.tr("Imports Diagramm {0}: {1}").format( pname, self.project.getRelativePath(self.packagePath)) else: - name = self.trUtf8("Imports Diagramm: {0}").format( + name = self.tr("Imports Diagramm: {0}").format( self.packagePath) self.umlView.setDiagramName(name) @@ -88,8 +88,8 @@ tot = len(modules) progress = E5ProgressDialog( - self.trUtf8("Parsing modules..."), - None, 0, tot, self.trUtf8("%v/%m Modules"), self.parent()) + self.tr("Parsing modules..."), + None, 0, tot, self.tr("%v/%m Modules"), self.parent()) try: prog = 0 progress.show() @@ -121,7 +121,7 @@ if len(initlist) == 0: ct = QGraphicsTextItem(None) ct.setHtml( - self.trUtf8( + self.tr( "The directory <b>'{0}'</b> is not a Python package.") .format(self.package)) self.scene.addItem(ct)
--- a/Graphics/PackageDiagramBuilder.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/PackageDiagramBuilder.py Sat Jan 11 11:55:33 2014 +0100 @@ -48,10 +48,10 @@ """ pname = self.project.getProjectName() if pname: - name = self.trUtf8("Package Diagram {0}: {1}").format( + name = self.tr("Package Diagram {0}: {1}").format( pname, self.project.getRelativePath(self.package)) else: - name = self.trUtf8("Package Diagram: {0}").format(self.package) + name = self.tr("Package Diagram: {0}").format(self.package) self.umlView.setDiagramName(name) def __getCurrentShape(self, name): @@ -88,8 +88,8 @@ Utilities.normjoinpath(self.package, ext))) tot = len(modules) progress = E5ProgressDialog( - self.trUtf8("Parsing modules..."), - None, 0, tot, self.trUtf8("%v/%m Modules"), self.parent()) + self.tr("Parsing modules..."), + None, 0, tot, self.tr("%v/%m Modules"), self.parent()) try: prog = 0 progress.show() @@ -147,8 +147,8 @@ for subpackage in subpackagesList: tot += len(glob.glob(Utilities.normjoinpath(subpackage, ext))) progress = E5ProgressDialog( - self.trUtf8("Parsing modules..."), - None, 0, tot, self.trUtf8("%v/%m Modules"), self.parent()) + self.tr("Parsing modules..."), + None, 0, tot, self.tr("%v/%m Modules"), self.parent()) try: prog = 0 progress.show() @@ -197,7 +197,7 @@ if len(initlist) == 0: ct = QGraphicsTextItem(None, self.scene) ct.setHtml( - self.trUtf8("The directory <b>'{0}'</b> is not a package.") + self.tr("The directory <b>'{0}'</b> is not a package.") .format(self.package)) return @@ -205,7 +205,7 @@ if not modules: ct = QGraphicsTextItem(None, self.scene) ct.setHtml( - self.trUtf8( + self.tr( "The package <b>'{0}'</b> does not contain any modules.") .format(self.package)) return @@ -221,7 +221,7 @@ if not classesFound: ct = QGraphicsTextItem(None, self.scene) ct.setHtml( - self.trUtf8( + self.tr( "The package <b>'{0}'</b> does not contain any classes.") .format(self.package)) return
--- a/Graphics/PixmapDiagram.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/PixmapDiagram.py Sat Jan 11 11:55:33 2014 +0100 @@ -47,7 +47,7 @@ self.setObjectName(name) else: self.setObjectName("PixmapDiagram") - self.setWindowTitle(self.trUtf8("Pixmap-Viewer")) + self.setWindowTitle(self.tr("Pixmap-Viewer")) self.pixmapLabel = QLabel() self.pixmapLabel.setObjectName("pixmapLabel") @@ -90,17 +90,17 @@ """ self.closeAct = \ QAction(UI.PixmapCache.getIcon("close.png"), - self.trUtf8("Close"), self) + self.tr("Close"), self) self.closeAct.triggered[()].connect(self.close) self.printAct = \ QAction(UI.PixmapCache.getIcon("print.png"), - self.trUtf8("Print"), self) + self.tr("Print"), self) self.printAct.triggered[()].connect(self.__printDiagram) self.printPreviewAct = \ QAction(UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self) + self.tr("Print Preview"), self) self.printPreviewAct.triggered[()].connect(self.__printPreviewDiagram) def __initContextMenu(self): @@ -128,11 +128,11 @@ """ Private method to populate the toolbars with our actions. """ - self.windowToolBar = QToolBar(self.trUtf8("Window"), self) + self.windowToolBar = QToolBar(self.tr("Window"), self) self.windowToolBar.setIconSize(UI.Config.ToolBarIconSize) self.windowToolBar.addAction(self.closeAct) - self.graphicsToolBar = QToolBar(self.trUtf8("Graphics"), self) + self.graphicsToolBar = QToolBar(self.tr("Graphics"), self) self.graphicsToolBar.setIconSize(UI.Config.ToolBarIconSize) self.graphicsToolBar.addAction(self.printPreviewAct) self.graphicsToolBar.addAction(self.printAct) @@ -151,8 +151,8 @@ if image.isNull(): E5MessageBox.warning( self, - self.trUtf8("Pixmap-Viewer"), - self.trUtf8( + self.tr("Pixmap-Viewer"), + self.tr( """<p>The file <b>{0}</b> cannot be displayed.""" """ The format is not supported.</p>""").format(filename)) return False @@ -377,7 +377,7 @@ int(printer.resolution() / 2.54) # write a foot note - s = self.trUtf8("Diagram: {0}").format(self.getDiagramName()) + s = self.tr("Diagram: {0}").format(self.getDiagramName()) tc = QColor(50, 50, 50) painter.setPen(tc) painter.drawRect(marginX, marginY, width, height)
--- a/Graphics/SvgDiagram.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/SvgDiagram.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,7 +46,7 @@ self.setObjectName(name) else: self.setObjectName("SvgDiagram") - self.setWindowTitle(self.trUtf8("SVG-Viewer")) + self.setWindowTitle(self.tr("SVG-Viewer")) self.svgWidget = QSvgWidget() self.svgWidget.setObjectName("svgWidget") @@ -89,17 +89,17 @@ """ self.closeAct = \ QAction(UI.PixmapCache.getIcon("close.png"), - self.trUtf8("Close"), self) + self.tr("Close"), self) self.closeAct.triggered[()].connect(self.close) self.printAct = \ QAction(UI.PixmapCache.getIcon("print.png"), - self.trUtf8("Print"), self) + self.tr("Print"), self) self.printAct.triggered[()].connect(self.__printDiagram) self.printPreviewAct = \ QAction(UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self) + self.tr("Print Preview"), self) self.printPreviewAct.triggered[()].connect(self.__printPreviewDiagram) def __initContextMenu(self): @@ -127,11 +127,11 @@ """ Private method to populate the toolbars with our actions. """ - self.windowToolBar = QToolBar(self.trUtf8("Window"), self) + self.windowToolBar = QToolBar(self.tr("Window"), self) self.windowToolBar.setIconSize(UI.Config.ToolBarIconSize) self.windowToolBar.addAction(self.closeAct) - self.graphicsToolBar = QToolBar(self.trUtf8("Graphics"), self) + self.graphicsToolBar = QToolBar(self.tr("Graphics"), self) self.graphicsToolBar.setIconSize(UI.Config.ToolBarIconSize) self.graphicsToolBar.addAction(self.printPreviewAct) self.graphicsToolBar.addAction(self.printAct) @@ -349,7 +349,7 @@ int(printer.resolution() / 2.54) # write a foot note - s = self.trUtf8("Diagram: {0}").format(self.getDiagramName()) + s = self.tr("Diagram: {0}").format(self.getDiagramName()) tc = QColor(50, 50, 50) painter.setPen(tc) painter.drawRect(marginX, marginY, width, height)
--- a/Graphics/UMLClassDiagramBuilder.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/UMLClassDiagramBuilder.py Sat Jan 11 11:55:33 2014 +0100 @@ -44,10 +44,10 @@ """ pname = self.project.getProjectName() if pname and self.project.isProjectSource(self.file): - name = self.trUtf8("Class Diagram {0}: {1}").format( + name = self.tr("Class Diagram {0}: {1}").format( pname, self.project.getRelativePath(self.file)) else: - name = self.trUtf8("Class Diagram: {0}").format(self.file) + name = self.tr("Class Diagram: {0}").format(self.file) self.umlView.setDiagramName(name) def __getCurrentShape(self, name): @@ -78,7 +78,7 @@ except ImportError: ct = QGraphicsTextItem(None) ct.setHtml( - self.trUtf8("The module <b>'{0}'</b> could not be found.") + self.tr("The module <b>'{0}'</b> could not be found.") .format(self.file)) self.scene.addItem(ct) return @@ -139,7 +139,7 @@ self.umlView.autoAdjustSceneSize(limit=True) else: ct = QGraphicsTextItem(None) - ct.setHtml(self.trUtf8( + ct.setHtml(self.tr( "The module <b>'{0}'</b> does not contain any classes.") .format(self.file)) self.scene.addItem(ct)
--- a/Graphics/UMLDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/UMLDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -74,37 +74,37 @@ """ self.closeAct = \ QAction(UI.PixmapCache.getIcon("close.png"), - self.trUtf8("Close"), self) + self.tr("Close"), self) self.closeAct.triggered[()].connect(self.close) self.openAct = \ QAction(UI.PixmapCache.getIcon("open.png"), - self.trUtf8("Load"), self) + self.tr("Load"), self) self.openAct.triggered[()].connect(self.load) self.saveAct = \ QAction(UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8("Save"), self) + self.tr("Save"), self) self.saveAct.triggered[()].connect(self.__save) self.saveAsAct = \ QAction(UI.PixmapCache.getIcon("fileSaveAs.png"), - self.trUtf8("Save As..."), self) + self.tr("Save As..."), self) self.saveAsAct.triggered[()].connect(self.__saveAs) self.saveImageAct = \ QAction(UI.PixmapCache.getIcon("fileSavePixmap.png"), - self.trUtf8("Save as Image"), self) + self.tr("Save as Image"), self) self.saveImageAct.triggered[()].connect(self.umlView.saveImage) self.printAct = \ QAction(UI.PixmapCache.getIcon("print.png"), - self.trUtf8("Print"), self) + self.tr("Print"), self) self.printAct.triggered[()].connect(self.umlView.printDiagram) self.printPreviewAct = \ QAction(UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self) + self.tr("Print Preview"), self) self.printPreviewAct.triggered[()].connect( self.umlView.printPreviewDiagram) @@ -112,11 +112,11 @@ """ Private slot to initialize the toolbars. """ - self.windowToolBar = QToolBar(self.trUtf8("Window"), self) + self.windowToolBar = QToolBar(self.tr("Window"), self) self.windowToolBar.setIconSize(UI.Config.ToolBarIconSize) self.windowToolBar.addAction(self.closeAct) - self.fileToolBar = QToolBar(self.trUtf8("File"), self) + self.fileToolBar = QToolBar(self.tr("File"), self) self.fileToolBar.setIconSize(UI.Config.ToolBarIconSize) self.fileToolBar.addAction(self.openAct) self.fileToolBar.addSeparator() @@ -182,7 +182,7 @@ elif diagramType == UMLDialog.NoDiagram: return None else: - raise ValueError(self.trUtf8( + raise ValueError(self.tr( "Illegal diagram type '{0}' given.").format(diagramType)) def __diagramTypeString(self): @@ -217,9 +217,9 @@ if not filename: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diagram"), + self.tr("Save Diagram"), "", - self.trUtf8("Eric5 Graphics File (*.e5g);;All Files (*)"), + self.tr("Eric5 Graphics File (*.e5g);;All Files (*)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if not fname: @@ -232,9 +232,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diagram"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diagram"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -259,8 +259,8 @@ except (IOError, OSError) as err: E5MessageBox.critical( self, - self.trUtf8("Save Diagram"), - self.trUtf8( + self.tr("Save Diagram"), + self.tr( """<p>The file <b>{0}</b> could not be saved.</p>""" """<p>Reason: {1}</p>""").format(filename, str(err))) return @@ -275,9 +275,9 @@ """ filename = E5FileDialog.getOpenFileName( self, - self.trUtf8("Load Diagram"), + self.tr("Load Diagram"), "", - self.trUtf8("Eric5 Graphics File (*.e5g);;All Files (*)")) + self.tr("Eric5 Graphics File (*.e5g);;All Files (*)")) if not filename: # Cancelled by user return False @@ -289,8 +289,8 @@ except (IOError, OSError) as err: E5MessageBox.critical( self, - self.trUtf8("Load Diagram"), - self.trUtf8( + self.tr("Load Diagram"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""" """<p>Reason: {1}</p>""").format(filename, str(err))) return False @@ -371,10 +371,10 @@ @param linenum number of the invalid line (integer) """ if linenum < 0: - msg = self.trUtf8("""<p>The file <b>{0}</b> does not contain""" - """ valid data.</p>""").format(filename) + msg = self.tr("""<p>The file <b>{0}</b> does not contain""" + """ valid data.</p>""").format(filename) else: - msg = self.trUtf8("""<p>The file <b>{0}</b> does not contain""" - """ valid data.</p><p>Invalid line: {1}</p>""" - ).format(filename, linenum + 1) - E5MessageBox.critical(self, self.trUtf8("Load Diagram"), msg) + msg = self.tr("""<p>The file <b>{0}</b> does not contain""" + """ valid data.</p><p>Invalid line: {1}</p>""" + ).format(filename, linenum + 1) + E5MessageBox.critical(self, self.tr("Load Diagram"), msg)
--- a/Graphics/UMLGraphicsView.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Graphics/UMLGraphicsView.py Sat Jan 11 11:55:33 2014 +0100 @@ -76,85 +76,85 @@ self.deleteShapeAct = \ QAction(UI.PixmapCache.getIcon("deleteShape.png"), - self.trUtf8("Delete shapes"), self) + self.tr("Delete shapes"), self) self.deleteShapeAct.triggered[()].connect(self.__deleteShape) self.incWidthAct = \ QAction(UI.PixmapCache.getIcon("sceneWidthInc.png"), - self.trUtf8("Increase width by {0} points").format( + self.tr("Increase width by {0} points").format( self.deltaSize), self) self.incWidthAct.triggered[()].connect(self.__incWidth) self.incHeightAct = \ QAction(UI.PixmapCache.getIcon("sceneHeightInc.png"), - self.trUtf8("Increase height by {0} points").format( + self.tr("Increase height by {0} points").format( self.deltaSize), self) self.incHeightAct.triggered[()].connect(self.__incHeight) self.decWidthAct = \ QAction(UI.PixmapCache.getIcon("sceneWidthDec.png"), - self.trUtf8("Decrease width by {0} points").format( + self.tr("Decrease width by {0} points").format( self.deltaSize), self) self.decWidthAct.triggered[()].connect(self.__decWidth) self.decHeightAct = \ QAction(UI.PixmapCache.getIcon("sceneHeightDec.png"), - self.trUtf8("Decrease height by {0} points").format( + self.tr("Decrease height by {0} points").format( self.deltaSize), self) self.decHeightAct.triggered[()].connect(self.__decHeight) self.setSizeAct = \ QAction(UI.PixmapCache.getIcon("sceneSize.png"), - self.trUtf8("Set size"), self) + self.tr("Set size"), self) self.setSizeAct.triggered[()].connect(self.__setSize) self.rescanAct = \ QAction(UI.PixmapCache.getIcon("rescan.png"), - self.trUtf8("Re-Scan"), self) + self.tr("Re-Scan"), self) self.rescanAct.triggered[()].connect(self.__rescan) self.relayoutAct = \ QAction(UI.PixmapCache.getIcon("relayout.png"), - self.trUtf8("Re-Layout"), self) + self.tr("Re-Layout"), self) self.relayoutAct.triggered[()].connect(self.__relayout) self.alignLeftAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignLeft.png"), - self.trUtf8("Align Left"), self) + self.tr("Align Left"), self) self.alignMapper.setMapping(self.alignLeftAct, Qt.AlignLeft) self.alignLeftAct.triggered[()].connect(self.alignMapper.map) self.alignHCenterAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignHCenter.png"), - self.trUtf8("Align Center Horizontal"), self) + self.tr("Align Center Horizontal"), self) self.alignMapper.setMapping(self.alignHCenterAct, Qt.AlignHCenter) self.alignHCenterAct.triggered[()].connect(self.alignMapper.map) self.alignRightAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignRight.png"), - self.trUtf8("Align Right"), self) + self.tr("Align Right"), self) self.alignMapper.setMapping(self.alignRightAct, Qt.AlignRight) self.alignRightAct.triggered[()].connect(self.alignMapper.map) self.alignTopAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignTop.png"), - self.trUtf8("Align Top"), self) + self.tr("Align Top"), self) self.alignMapper.setMapping(self.alignTopAct, Qt.AlignTop) self.alignTopAct.triggered[()].connect(self.alignMapper.map) self.alignVCenterAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignVCenter.png"), - self.trUtf8("Align Center Vertical"), self) + self.tr("Align Center Vertical"), self) self.alignMapper.setMapping(self.alignVCenterAct, Qt.AlignVCenter) self.alignVCenterAct.triggered[()].connect(self.alignMapper.map) self.alignBottomAct = \ QAction(UI.PixmapCache.getIcon("shapesAlignBottom.png"), - self.trUtf8("Align Bottom"), self) + self.tr("Align Bottom"), self) self.alignMapper.setMapping(self.alignBottomAct, Qt.AlignBottom) self.alignBottomAct.triggered[()].connect(self.alignMapper.map) @@ -204,7 +204,7 @@ @return the populated toolBar (QToolBar) """ - toolBar = QToolBar(self.trUtf8("Graphics"), self) + toolBar = QToolBar(self.tr("Graphics"), self) toolBar.setIconSize(UI.Config.ToolBarIconSize) toolBar.addAction(self.deleteShapeAct) toolBar.addSeparator() @@ -328,10 +328,10 @@ """ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diagram"), + self.tr("Save Diagram"), "", - self.trUtf8("Portable Network Graphics (*.png);;" - "Scalable Vector Graphics (*.svg)"), + self.tr("Portable Network Graphics (*.png);;" + "Scalable Vector Graphics (*.svg)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -343,9 +343,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diagram"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diagram"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -355,8 +355,8 @@ if not success: E5MessageBox.critical( self, - self.trUtf8("Save Diagram"), - self.trUtf8( + self.tr("Save Diagram"), + self.tr( """<p>The file <b>{0}</b> could not be saved.</p>""") .format(fname))
--- a/Helpviewer/AdBlock/AdBlockAccessHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockAccessHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,8 +43,8 @@ return None res = E5MessageBox.yesNo( None, - self.trUtf8("Subscribe?"), - self.trUtf8( + self.tr("Subscribe?"), + self.tr( """<p>Subscribe to this AdBlock subscription?</p>""" """<p>{0}</p>""").format(title)) if res:
--- a/Helpviewer/AdBlock/AdBlockDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -35,7 +35,7 @@ self.updateSpinBox.setValue(Preferences.getHelp("AdBlockUpdatePeriod")) - self.searchEdit.setInactiveText(self.trUtf8("Search...")) + self.searchEdit.setInactiveText(self.tr("Search...")) import Helpviewer.HelpWindow self.__manager = Helpviewer.HelpWindow.HelpWindow.adBlockManager() @@ -119,32 +119,32 @@ menu = self.actionButton.menu() menu.clear() - menu.addAction(self.trUtf8("Add Rule"), self.__addCustomRule)\ + menu.addAction(self.tr("Add Rule"), self.__addCustomRule)\ .setEnabled(subscriptionEditable) - menu.addAction(self.trUtf8("Remove Rule"), self.__removeCustomRule)\ + menu.addAction(self.tr("Remove Rule"), self.__removeCustomRule)\ .setEnabled(subscriptionEditable) menu.addSeparator() menu.addAction( - self.trUtf8("Browse Subscriptions..."), self.__browseSubscriptions) + self.tr("Browse Subscriptions..."), self.__browseSubscriptions) menu.addAction( - self.trUtf8("Remove Subscription"), self.__removeSubscription)\ + self.tr("Remove Subscription"), self.__removeSubscription)\ .setEnabled(subscriptionRemovable) if self.__currentSubscription: menu.addSeparator() if subscriptionEnabled: - txt = self.trUtf8("Disable Subscription") + txt = self.tr("Disable Subscription") else: - txt = self.trUtf8("Enable Subscription") + txt = self.tr("Enable Subscription") menu.addAction(txt, self.__switchSubscriptionEnabled) menu.addSeparator() menu.addAction( - self.trUtf8("Update Subscription"), self.__updateSubscription)\ + self.tr("Update Subscription"), self.__updateSubscription)\ .setEnabled(not subscriptionEditable) menu.addAction( - self.trUtf8("Update All Subscriptions"), + self.tr("Update All Subscriptions"), self.__updateAllSubscriptions) menu.addSeparator() - menu.addAction(self.trUtf8("Learn more about writing rules..."), + menu.addAction(self.tr("Learn more about writing rules..."), self.__learnAboutWritingFilters) def addCustomRule(self, filter): @@ -209,19 +209,19 @@ for subscription in requiresSubscriptions: requiresTitles.append(subscription.title()) if requiresTitles: - message = self.trUtf8( + message = self.tr( "<p>Do you really want to remove subscription" " <b>{0}</b> and all subscriptions requiring it?</p>" "<ul><li>{1}</li></ul>").format( self.__currentSubscription.title(), "</li><li>".join(requiresTitles)) else: - message = self.trUtf8( + message = self.tr( "<p>Do you really want to remove subscription" " <b>{0}</b>?</p>").format(self.__currentSubscription.title()) res = E5MessageBox.yesNo( self, - self.trUtf8("Remove Subscription"), + self.tr("Remove Subscription"), message) if res:
--- a/Helpviewer/AdBlock/AdBlockExceptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockExceptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,7 +31,7 @@ self.iconLabel.setPixmap( UI.PixmapCache.getPixmap("adBlockPlusGreen48.png")) - self.hostEdit.setInactiveText(self.trUtf8("Enter host to be added...")) + self.hostEdit.setInactiveText(self.tr("Enter host to be added...")) self.buttonBox.setFocus()
--- a/Helpviewer/AdBlock/AdBlockIcon.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockIcon.py Sat Jan 11 11:55:33 2014 +0100 @@ -33,7 +33,7 @@ self.setMaximumHeight(16) self.setCursor(Qt.PointingHandCursor) - self.setToolTip(self.trUtf8( + self.setToolTip(self.tr( "AdBlock lets you block unwanted content on web pages.")) self.clicked.connect(self.__showMenu) @@ -70,12 +70,12 @@ if manager.isEnabled(): menu.addAction( UI.PixmapCache.getIcon("adBlockPlusDisabled.png"), - self.trUtf8("Disable AdBlock"), + self.tr("Disable AdBlock"), self.__enableAdBlock).setData(False) else: menu.addAction( UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8("Enable AdBlock"), + self.tr("Enable AdBlock"), self.__enableAdBlock).setData(True) menu.addSeparator() if manager.isEnabled() and \ @@ -83,35 +83,35 @@ if self.__isCurrentHostExcepted(): menu.addAction( UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8("Remove AdBlock Exception"), + self.tr("Remove AdBlock Exception"), self.__setException).setData(False) else: menu.addAction( UI.PixmapCache.getIcon("adBlockPlusGreen.png"), - self.trUtf8("Add AdBlock Exception"), + self.tr("Add AdBlock Exception"), self.__setException).setData(True) menu.addAction( UI.PixmapCache.getIcon("adBlockPlusGreen.png"), - self.trUtf8("AdBlock Exceptions..."), manager.showExceptionsDialog) + self.tr("AdBlock Exceptions..."), manager.showExceptionsDialog) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8("AdBlock Configuration..."), manager.showDialog) + self.tr("AdBlock Configuration..."), manager.showDialog) menu.addSeparator() entries = self.__mw.currentBrowser().page().getAdBlockedPageEntries() if entries: - menu.addAction(self.trUtf8( + menu.addAction(self.tr( "Blocked URL (AdBlock Rule) - click to edit rule"))\ .setEnabled(False) for entry in entries: address = entry.urlString()[-55:] - actionText = self.trUtf8("{0} with ({1})").format( + actionText = self.tr("{0} with ({1})").format( address, entry.rule.filter()).replace("&", "&&") act = menu.addAction(actionText, manager.showRule) act.setData(entry.rule) else: - menu.addAction(self.trUtf8("No content blocked")).setEnabled(False) + menu.addAction(self.tr("No content blocked")).setEnabled(False) def menuAction(self): """ @@ -120,7 +120,7 @@ @return reference to the menu action (QAction) """ if not self.__menuAction: - self.__menuAction = QAction(self.trUtf8("AdBlock")) + self.__menuAction = QAction(self.tr("AdBlock")) self.__menuAction.setMenu(QMenu()) self.__menuAction.menu().aboutToShow.connect(self.__createMenu)
--- a/Helpviewer/AdBlock/AdBlockManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -137,7 +137,7 @@ location = self.__customSubscriptionLocation() encodedUrl = bytes(location.toEncoded()).decode() url = QUrl("abp:subscribe?location={0}&title={1}".format( - encodedUrl, self.trUtf8("Custom Rules"))) + encodedUrl, self.tr("Custom Rules"))) return url def customRules(self):
--- a/Helpviewer/AdBlock/AdBlockSubscription.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockSubscription.py Sat Jan 11 11:55:33 2014 +0100 @@ -267,8 +267,8 @@ if not f.open(QIODevice.ReadOnly): E5MessageBox.warning( None, - self.trUtf8("Load subscription rules"), - self.trUtf8( + self.tr("Load subscription rules"), + self.tr( """Unable to open adblock file '{0}' for reading.""") .format(fileName)) else: @@ -277,9 +277,9 @@ if not header.startswith("[Adblock"): E5MessageBox.warning( None, - self.trUtf8("Load subscription rules"), - self.trUtf8("""AdBlock file '{0}' does not start""" - """ with [Adblock.""") + self.tr("Load subscription rules"), + self.tr("""AdBlock file '{0}' does not start""" + """ with [Adblock.""") .format(fileName)) f.close() f.remove() @@ -375,8 +375,8 @@ # don't show error if we try to load the default E5MessageBox.warning( None, - self.trUtf8("Downloading subscription rules"), - self.trUtf8( + self.tr("Downloading subscription rules"), + self.tr( """<p>Subscription rules could not be""" """ downloaded.</p><p>Error: {0}</p>""") .format(reply.errorString())) @@ -388,8 +388,8 @@ if response.isEmpty(): E5MessageBox.warning( None, - self.trUtf8("Downloading subscription rules"), - self.trUtf8("""Got empty subscription rules.""")) + self.tr("Downloading subscription rules"), + self.tr("""Got empty subscription rules.""")) return fileName = self.rulesFileName() @@ -398,8 +398,8 @@ if not f.open(QIODevice.ReadWrite): E5MessageBox.warning( None, - self.trUtf8("Downloading subscription rules"), - self.trUtf8( + self.tr("Downloading subscription rules"), + self.tr( """Unable to open adblock file '{0}' for writing.""") .file(fileName)) return @@ -450,8 +450,8 @@ else: res = E5MessageBox.yesNo( None, - self.trUtf8("Downloading subscription rules"), - self.trUtf8( + self.tr("Downloading subscription rules"), + self.tr( """<p>AdBlock subscription <b>{0}</b> has a wrong""" """ checksum.<br/>""" """Found: {1}<br/>""" @@ -473,8 +473,8 @@ if not f.open(QIODevice.ReadWrite | QIODevice.Truncate): E5MessageBox.warning( None, - self.trUtf8("Saving subscription rules"), - self.trUtf8( + self.tr("Saving subscription rules"), + self.tr( """Unable to open adblock file '{0}' for writing.""") .format(fileName)) return
--- a/Helpviewer/AdBlock/AdBlockTreeWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/AdBlock/AdBlockTreeWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -115,8 +115,8 @@ if not filter: filter = QInputDialog.getText( self, - self.trUtf8("Add Custom Rule"), - self.trUtf8("Write your rule here:"), + self.tr("Add Custom Rule"), + self.tr("Write your rule here:"), QLineEdit.Normal) if filter == "": return @@ -164,9 +164,9 @@ return menu = QMenu() - menu.addAction(self.trUtf8("Add Rule"), self.addRule) + menu.addAction(self.tr("Add Rule"), self.addRule) menu.addSeparator() - act = menu.addAction(self.trUtf8("Remove Rule"), self.removeRule) + act = menu.addAction(self.tr("Remove Rule"), self.removeRule) if item.parent() is None: act.setDisabled(True) @@ -219,7 +219,7 @@ self.__itemChangingBlock = True self.__topItem.setText( - 0, self.trUtf8("{0} (recently updated)").format( + 0, self.tr("{0} (recently updated)").format( self.__subscription.title())) self.__itemChangingBlock = False
--- a/Helpviewer/Bookmarks/AddBookmarkDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/AddBookmarkDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -107,8 +107,8 @@ self.locationCombo.setModel(self.__proxyModel) self.locationCombo.setView(self.__treeView) - self.addressEdit.setInactiveText(self.trUtf8("Url")) - self.nameEdit.setInactiveText(self.trUtf8("Title")) + self.addressEdit.setInactiveText(self.tr("Url")) + self.nameEdit.setInactiveText(self.tr("Title")) self.resize(self.sizeHint()) @@ -190,10 +190,10 @@ self.__addFolder = folder if folder: - self.setWindowTitle(self.trUtf8("Add Folder")) + self.setWindowTitle(self.tr("Add Folder")) self.addressEdit.setVisible(False) else: - self.setWindowTitle(self.trUtf8("Add Bookmark")) + self.setWindowTitle(self.tr("Add Bookmark")) self.addressEdit.setVisible(True) self.resize(self.sizeHint())
--- a/Helpviewer/Bookmarks/BookmarksDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -140,20 +140,20 @@ node = self.__bookmarksModel.node(sourceIndex) if idx.isValid() and node.type() != BookmarkNode.Folder: menu.addAction( - self.trUtf8("&Open"), self.__openBookmarkInCurrentTab) + self.tr("&Open"), self.__openBookmarkInCurrentTab) menu.addAction( - self.trUtf8("Open in New &Tab"), self.__openBookmarkInNewTab) + self.tr("Open in New &Tab"), self.__openBookmarkInNewTab) menu.addSeparator() - act = menu.addAction(self.trUtf8("Edit &Name"), self.__editName) + act = menu.addAction(self.tr("Edit &Name"), self.__editName) act.setEnabled(idx.flags() & Qt.ItemIsEditable) if idx.isValid() and node.type() != BookmarkNode.Folder: - menu.addAction(self.trUtf8("Edit &Address"), self.__editAddress) + menu.addAction(self.tr("Edit &Address"), self.__editAddress) menu.addSeparator() act = menu.addAction( - self.trUtf8("&Delete"), self.bookmarksTree.removeSelected) + self.tr("&Delete"), self.bookmarksTree.removeSelected) act.setEnabled(idx.flags() & Qt.ItemIsDragEnabled) menu.addSeparator() - act = menu.addAction(self.trUtf8("&Properties..."), self.__edit) + act = menu.addAction(self.tr("&Properties..."), self.__edit) act.setEnabled(idx.flags() & Qt.ItemIsEditable) menu.exec_(QCursor.pos()) @@ -258,5 +258,5 @@ idx = self.__proxyModel.mapToSource(idx) parent = self.__bookmarksModel.node(idx) node = BookmarkNode(BookmarkNode.Folder) - node.title = self.trUtf8("New Folder") + node.title = self.tr("New Folder") self.__bookmarksManager.addBookmark(parent, node, row)
--- a/Helpviewer/Bookmarks/BookmarksImportDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImportDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -88,7 +88,7 @@ if self.__selectedSource == "ie": path = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Choose Directory ..."), + self.tr("Choose Directory ..."), self.__sourceDir, E5FileDialog.Options(E5FileDialog.Option(0))) else: @@ -98,7 +98,7 @@ filter = self.__sourceFile path = E5FileDialog.getOpenFileName( self, - self.trUtf8("Choose File ..."), + self.tr("Choose File ..."), self.__sourceDir, filter) @@ -122,13 +122,13 @@ self.iconLabel.setPixmap(pixmap) self.importingFromLabel.setText( - self.trUtf8("<b>Importing from {0}</b>").format(sourceName)) + self.tr("<b>Importing from {0}</b>").format(sourceName)) self.fileLabel1.setText(info) self.fileLabel2.setText(prompt) self.standardDirLabel.setText( "<i>{0}</i>".format(self.__sourceDir)) - self.nextButton.setText(self.trUtf8("Finish")) + self.nextButton.setText(self.tr("Finish")) self.__currentPage += 1 self.pagesWidget.setCurrentIndex(self.__currentPage) @@ -145,7 +145,7 @@ if importer.error(): E5MessageBox.critical( self, - self.trUtf8("Error importing bookmarks"), + self.tr("Error importing bookmarks"), importer.errorString()) return
--- a/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/ChromeImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -108,7 +108,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "File '{0}' does not exist.").format(self.__fileName) return False return True @@ -125,7 +125,7 @@ f.close() except IOError as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "File '{0}' cannot be read.\nReason: {1}")\ .format(self.__fileName, str(err)) return None @@ -136,11 +136,11 @@ self.__processRoots(contents["roots"], importRootNode) if self._id == "chrome": - importRootNode.title = self.trUtf8("Google Chrome Import") + importRootNode.title = self.tr("Google Chrome Import") elif self._id == "chromium": - importRootNode.title = self.trUtf8("Chromium Import") + importRootNode.title = self.tr("Chromium Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/FirefoxImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -88,7 +88,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("File '{0}' does not exist.")\ + self._errorString = self.tr("File '{0}' does not exist.")\ .format(self.__fileName) return False @@ -96,7 +96,7 @@ self.__db = sqlite3.connect(self.__fileName) except sqlite3.DatabaseError as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "Unable to open database.\nReason: {0}").format(str(err)) return False @@ -131,7 +131,7 @@ folders[id_] = folder except sqlite3.DatabaseError as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "Unable to open database.\nReason: {0}").format(str(err)) return None @@ -166,14 +166,14 @@ bookmark.title = title.replace("&", "&&") except sqlite3.DatabaseError as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "Unable to open database.\nReason: {0}").format(str(err)) return None importRootNode.setType(BookmarkNode.Folder) if self._id == "firefox": - importRootNode.title = self.trUtf8("Mozilla Firefox Import") + importRootNode.title = self.tr("Mozilla Firefox Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/HtmlImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/HtmlImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,7 +80,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("File '{0}' does not exist.")\ + self._errorString = self.tr("File '{0}' does not exist.")\ .format(self.__fileName) return False return True @@ -99,8 +99,8 @@ importRootNode.setType(BookmarkNode.Folder) if self._id == "html": - importRootNode.title = self.trUtf8("HTML Import") + importRootNode.title = self.tr("HTML Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/IExplorerImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/IExplorerImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -83,12 +83,12 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("Folder '{0}' does not exist.")\ + self._errorString = self.tr("Folder '{0}' does not exist.")\ .format(self.__fileName) return False if not os.path.isdir(self.__fileName): self._error = True - self._errorString = self.trUtf8("'{0}' is not a folder.")\ + self._errorString = self.tr("'{0}' is not a folder.")\ .format(self.__fileName) return True @@ -141,8 +141,8 @@ bookmark.title = name.replace("&", "&&") if self._id == "ie": - importRootNode.title = self.trUtf8("Internet Explorer Import") + importRootNode.title = self.tr("Internet Explorer Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/OperaImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -84,7 +84,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("File '{0}' does not exist.")\ + self._errorString = self.tr("File '{0}' does not exist.")\ .format(self.__fileName) return False return True @@ -101,7 +101,7 @@ f.close() except IOError as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "File '{0}' cannot be read.\nReason: {1}")\ .format(self.__fileName, str(err)) return None @@ -127,8 +127,8 @@ node.url = line.replace("URL=", "") if self._id == "opera": - importRootNode.title = self.trUtf8("Opera Import") + importRootNode.title = self.tr("Opera Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/SafariImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -87,7 +87,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("File '{0}' does not exist.")\ + self._errorString = self.tr("File '{0}' does not exist.")\ .format(self.__fileName) return False return True @@ -102,7 +102,7 @@ bookmarksDict = binplistlib.readPlist(self.__fileName) except binplistlib.InvalidPlistException as err: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( "Bookmarks file cannot be read.\nReason: {0}".format(str(err))) return None @@ -113,9 +113,9 @@ self.__processChildren(bookmarksDict["Children"], importRootNode) if self._id == "safari": - importRootNode.title = self.trUtf8("Apple Safari Import") + importRootNode.title = self.tr("Apple Safari Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksImporters/XbelImporter.py Sat Jan 11 11:55:33 2014 +0100 @@ -116,7 +116,7 @@ """ if not os.path.exists(self.__fileName): self._error = True - self._errorString = self.trUtf8("File '{0}' does not exist.")\ + self._errorString = self.tr("File '{0}' does not exist.")\ .format(self.__fileName) return False return True @@ -134,7 +134,7 @@ if reader.error() != QXmlStreamReader.NoError: self._error = True - self._errorString = self.trUtf8( + self._errorString = self.tr( """Error when importing bookmarks on line {0},""" """ column {1}:\n{2}""")\ .format(reader.lineNumber(), @@ -145,12 +145,12 @@ from ..BookmarkNode import BookmarkNode importRootNode.setType(BookmarkNode.Folder) if self._id == "e5browser": - importRootNode.title = self.trUtf8("eric5 Web Browser Import") + importRootNode.title = self.tr("eric5 Web Browser Import") elif self._id == "konqueror": - importRootNode.title = self.trUtf8("Konqueror Import") + importRootNode.title = self.tr("Konqueror Import") elif self._id == "xbel": - importRootNode.title = self.trUtf8("XBEL Import") + importRootNode.title = self.tr("XBEL Import") else: - importRootNode.title = self.trUtf8("Imported {0}")\ + importRootNode.title = self.tr("Imported {0}")\ .format(QDate.currentDate().toString(Qt.SystemLocaleShortDate)) return importRootNode
--- a/Helpviewer/Bookmarks/BookmarksManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -136,8 +136,8 @@ if reader.error() != QXmlStreamReader.NoError: E5MessageBox.warning( None, - self.trUtf8("Loading Bookmarks"), - self.trUtf8( + self.tr("Loading Bookmarks"), + self.tr( """Error when loading bookmarks on line {0},""" """ column {1}:\n {2}""") .format(reader.lineNumber(), @@ -149,16 +149,16 @@ len(self.__bookmarkRootNode.children()) - 1, -1, -1): node = self.__bookmarkRootNode.children()[index] if node.type() == BookmarkNode.Folder: - if (node.title == self.trUtf8("Toolbar Bookmarks") or + if (node.title == self.tr("Toolbar Bookmarks") or node.title == BOOKMARKBAR) and \ self.__toolbar is None: - node.title = self.trUtf8(BOOKMARKBAR) + node.title = self.tr(BOOKMARKBAR) self.__toolbar = node - if (node.title == self.trUtf8("Menu") or + if (node.title == self.tr("Menu") or node.title == BOOKMARKMENU) and \ self.__menu is None: - node.title = self.trUtf8(BOOKMARKMENU) + node.title = self.tr(BOOKMARKMENU) self.__menu = node else: others.append(node) @@ -170,14 +170,14 @@ if self.__toolbar is None: self.__toolbar = BookmarkNode(BookmarkNode.Folder, self.__bookmarkRootNode) - self.__toolbar.title = self.trUtf8(BOOKMARKBAR) + self.__toolbar.title = self.tr(BOOKMARKBAR) else: self.__bookmarkRootNode.add(self.__toolbar) if self.__menu is None: self.__menu = BookmarkNode(BookmarkNode.Folder, self.__bookmarkRootNode) - self.__menu.title = self.trUtf8(BOOKMARKMENU) + self.__menu.title = self.tr(BOOKMARKMENU) else: self.__bookmarkRootNode.add(self.__menu) @@ -203,13 +203,13 @@ if not writer.write(bookmarkFile, self.__bookmarkRootNode): E5MessageBox.warning( None, - self.trUtf8("Saving Bookmarks"), - self.trUtf8("""Error saving bookmarks to <b>{0}</b>.""") + self.tr("Saving Bookmarks"), + self.tr("""Error saving bookmarks to <b>{0}</b>.""") .format(bookmarkFile)) # restore localized titles - self.__menu.title = self.trUtf8(BOOKMARKMENU) - self.__toolbar.title = self.trUtf8(BOOKMARKBAR) + self.__menu.title = self.tr(BOOKMARKMENU) + self.__toolbar.title = self.tr(BOOKMARKBAR) self.bookmarksSaved.emit() @@ -365,11 +365,11 @@ """ fileName, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( None, - self.trUtf8("Export Bookmarks"), + self.tr("Export Bookmarks"), "eric5_bookmarks.xbel", - self.trUtf8("XBEL bookmarks (*.xbel);;" - "XBEL bookmarks (*.xml);;" - "HTML Bookmarks (*.html)")) + self.tr("XBEL bookmarks (*.xbel);;" + "XBEL bookmarks (*.xml);;" + "HTML Bookmarks (*.html)")) if not fileName: return @@ -389,8 +389,8 @@ if not writer.write(fileName, self.__bookmarkRootNode): E5MessageBox.critical( None, - self.trUtf8("Exporting Bookmarks"), - self.trUtf8("""Error exporting bookmarks to <b>{0}</b>.""") + self.tr("Exporting Bookmarks"), + self.tr("""Error exporting bookmarks to <b>{0}</b>.""") .format(fileName)) def __convertFromOldBookmarks(self): @@ -403,7 +403,7 @@ if bmNames is not None and bmFiles is not None: if len(bmNames) == len(bmFiles): convertedRootNode = BookmarkNode(BookmarkNode.Folder) - convertedRootNode.title = self.trUtf8("Converted {0}")\ + convertedRootNode.title = self.tr("Converted {0}")\ .format(QDate.currentDate().toString( Qt.SystemLocaleShortDate)) for i in range(len(bmNames)):
--- a/Helpviewer/Bookmarks/BookmarksMenu.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksMenu.py Sat Jan 11 11:55:33 2014 +0100 @@ -92,7 +92,7 @@ return self.addSeparator() - act = self.addAction(self.trUtf8("Open all in Tabs")) + act = self.addAction(self.tr("Open all in Tabs")) act.triggered[()].connect(self.openAll) def openAll(self): @@ -137,21 +137,21 @@ v = act.data() menuAction = menu.addAction( - self.trUtf8("&Open"), self.__openBookmark) + self.tr("&Open"), self.__openBookmark) menuAction.setData(v) menuAction = menu.addAction( - self.trUtf8("Open in New &Tab\tCtrl+LMB"), + self.tr("Open in New &Tab\tCtrl+LMB"), self.__openBookmarkInNewTab) menuAction.setData(v) menu.addSeparator() menuAction = menu.addAction( - self.trUtf8("&Remove"), self.__removeBookmark) + self.tr("&Remove"), self.__removeBookmark) menuAction.setData(v) menu.addSeparator() menuAction = menu.addAction( - self.trUtf8("&Properties..."), self.__edit) + self.tr("&Properties..."), self.__edit) menuAction.setData(v) execAct = menu.exec_(QCursor.pos()) @@ -274,14 +274,14 @@ return self.addSeparator() - act = self.addAction(self.trUtf8("Default Home Page")) + act = self.addAction(self.tr("Default Home Page")) act.setData("eric:home") act.triggered[()].connect(self.__defaultBookmarkTriggered) - act = self.addAction(self.trUtf8("Speed Dial")) + act = self.addAction(self.tr("Speed Dial")) act.setData("eric:speeddial") act.triggered[()].connect(self.__defaultBookmarkTriggered) self.addSeparator() - act = self.addAction(self.trUtf8("Open all in Tabs")) + act = self.addAction(self.tr("Open all in Tabs")) act.triggered[()].connect(self.openAll) def setInitialActions(self, actions):
--- a/Helpviewer/Bookmarks/BookmarksModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,8 +42,8 @@ manager.entryChanged.connect(self.entryChanged) self.__headers = [ - self.trUtf8("Title"), - self.trUtf8("Address"), + self.tr("Title"), + self.tr("Address"), ] def bookmarksManager(self):
--- a/Helpviewer/Bookmarks/BookmarksToolBar.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Bookmarks/BookmarksToolBar.py Sat Jan 11 11:55:33 2014 +0100 @@ -85,26 +85,26 @@ if act.menu() is None: menuAction = menu.addAction( - self.trUtf8("&Open"), self.__openBookmark) + self.tr("&Open"), self.__openBookmark) menuAction.setData(v) menuAction = menu.addAction( - self.trUtf8("Open in New &Tab\tCtrl+LMB"), + self.tr("Open in New &Tab\tCtrl+LMB"), self.__openBookmarkInNewTab) menuAction.setData(v) menu.addSeparator() menuAction = menu.addAction( - self.trUtf8("&Remove"), self.__removeBookmark) + self.tr("&Remove"), self.__removeBookmark) menuAction.setData(v) menu.addSeparator() menuAction = menu.addAction( - self.trUtf8("&Properties..."), self.__edit) + self.tr("&Properties..."), self.__edit) menuAction.setData(v) menu.addSeparator() - menu.addAction(self.trUtf8("Add &Bookmark..."), self.__newBookmark) - menu.addAction(self.trUtf8("Add &Folder..."), self.__newFolder) + menu.addAction(self.tr("Add &Bookmark..."), self.__newBookmark) + menu.addAction(self.tr("Add &Folder..."), self.__newFolder) menu.exec_(QCursor.pos())
--- a/Helpviewer/CookieJar/CookieExceptionsModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/CookieJar/CookieExceptionsModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -30,8 +30,8 @@ self.__sessionCookies = self.__cookieJar.allowForSessionCookies() self.__headers = [ - self.trUtf8("Website"), - self.trUtf8("Status"), + self.tr("Website"), + self.tr("Status"), ] def headerData(self, section, orientation, role): @@ -75,7 +75,7 @@ if index.column() == 0: return self.__allowedCookies[row] elif index.column() == 1: - return self.trUtf8("Allow") + return self.tr("Allow") else: return None @@ -84,7 +84,7 @@ if index.column() == 0: return self.__blockedCookies[row] elif index.column() == 1: - return self.trUtf8("Block") + return self.tr("Block") else: return None @@ -93,7 +93,7 @@ if index.column() == 0: return self.__sessionCookies[row] elif index.column() == 1: - return self.trUtf8("Allow For Session") + return self.tr("Allow For Session") else: return None
--- a/Helpviewer/CookieJar/CookieModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/CookieJar/CookieModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -25,12 +25,12 @@ super().__init__(parent) self.__headers = [ - self.trUtf8("Website"), - self.trUtf8("Name"), - self.trUtf8("Path"), - self.trUtf8("Secure"), - self.trUtf8("Expires"), - self.trUtf8("Contents"), + self.tr("Website"), + self.tr("Name"), + self.tr("Path"), + self.tr("Secure"), + self.tr("Expires"), + self.tr("Contents"), ] self.__cookieJar = cookieJar self.__cookieJar.cookiesChanged.connect(self.__cookiesChanged)
--- a/Helpviewer/CookieJar/CookiesExceptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/CookieJar/CookiesExceptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -61,7 +61,7 @@ if section == 0: header = fm.width("averagebiglonghost.averagedomain.info") elif section == 1: - header = fm.width(self.trUtf8("Allow For Session")) + header = fm.width(self.tr("Allow For Session")) buffer = fm.width("mm") header += buffer self.exceptionsTable.horizontalHeader()\
--- a/Helpviewer/Download/DownloadItem.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Download/DownloadItem.py Sat Jan 11 11:55:33 2014 +0100 @@ -185,7 +185,7 @@ self.__reply.close() self.on_stopButton_clicked() self.filenameLabel.setText( - self.trUtf8("Download canceled: {0}").format( + self.tr("Download canceled: {0}").format( QFileInfo(defaultFileName).fileName())) self.__canceledFileSelect = True return @@ -197,7 +197,7 @@ self.__reply.close() self.on_stopButton_clicked() self.filenameLabel.setText( - self.trUtf8("VirusTotal scan scheduled: {0}").format( + self.tr("VirusTotal scan scheduled: {0}").format( QFileInfo(defaultFileName).fileName())) self.__canceledFileSelect = True return @@ -211,7 +211,7 @@ self.__gettingFileName = True fileName = E5FileDialog.getSaveFileName( None, - self.trUtf8("Save File"), + self.tr("Save File"), defaultFileName, "") self.__gettingFileName = False @@ -220,7 +220,7 @@ self.__reply.close() self.on_stopButton_clicked() self.filenameLabel.setText( - self.trUtf8("Download canceled: {0}") + self.tr("Download canceled: {0}") .format(QFileInfo(defaultFileName).fileName())) self.__canceledFileSelect = True return @@ -239,7 +239,7 @@ if not saveDirPath.mkpath(saveDirPath.absolutePath()): self.progressBar.setVisible(False) self.on_stopButton_clicked() - self.infoLabel.setText(self.trUtf8( + self.infoLabel.setText(self.tr( "Download directory ({0}) couldn't be created.") .format(saveDirPath.absolutePath())) return @@ -417,7 +417,7 @@ self.__getFileName() if not self.__output.open(QIODevice.WriteOnly): self.infoLabel.setText( - self.trUtf8("Error opening save file: {0}") + self.tr("Error opening save file: {0}") .format(self.__output.errorString())) self.on_stopButton_clicked() self.statusChanged.emit() @@ -429,7 +429,7 @@ self.__md5Hash.addData(buffer) bytesWritten = self.__output.write(buffer) if bytesWritten == -1: - self.infoLabel.setText(self.trUtf8("Error saving: {0}") + self.infoLabel.setText(self.tr("Error saving: {0}") .format(self.__output.errorString())) self.on_stopButton_clicked() else: @@ -441,7 +441,7 @@ """ Private slot to handle a network error. """ - self.infoLabel.setText(self.trUtf8("Network Error: {0}") + self.infoLabel.setText(self.tr("Network Error: {0}") .format(self.__reply.errorString())) self.tryAgainButton.setEnabled(True) self.tryAgainButton.setVisible(True) @@ -552,16 +552,16 @@ if bytesTotal > 0: remaining = timeString(timeRemaining) - info = self.trUtf8("{0} of {1} ({2}/sec)\n{3}")\ + info = self.tr("{0} of {1} ({2}/sec)\n{3}")\ .format( dataString(self.__bytesReceived), - bytesTotal == -1 and self.trUtf8("?") + bytesTotal == -1 and self.tr("?") or dataString(bytesTotal), dataString(int(speed)), remaining) else: if self.__bytesReceived == bytesTotal or bytesTotal == -1: - info = self.trUtf8("{0} downloaded\nSHA1: {1}\nMD5: {2}")\ + info = self.tr("{0} downloaded\nSHA1: {1}\nMD5: {2}")\ .format(dataString(self.__output.size()), str(self.__sha1Hash.result().toHex(), encoding="ascii"), @@ -569,7 +569,7 @@ encoding="ascii") ) else: - info = self.trUtf8("{0} of {1} - Stopped")\ + info = self.tr("{0} of {1} - Stopped")\ .format(dataString(self.__bytesReceived), dataString(bytesTotal)) self.infoLabel.setText(info)
--- a/Helpviewer/Download/DownloadManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Download/DownloadManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -82,29 +82,29 @@ if itm.downloadCanceled(): menu.addAction( UI.PixmapCache.getIcon("restart.png"), - self.trUtf8("Retry"), self.__contextMenuRetry) + self.tr("Retry"), self.__contextMenuRetry) else: if itm.downloadedSuccessfully(): menu.addAction( UI.PixmapCache.getIcon("open.png"), - self.trUtf8("Open"), self.__contextMenuOpen) + self.tr("Open"), self.__contextMenuOpen) elif itm.downloading(): menu.addAction( UI.PixmapCache.getIcon("stopLoading.png"), - self.trUtf8("Cancel"), self.__contextMenuCancel) + self.tr("Cancel"), self.__contextMenuCancel) menu.addSeparator() menu.addAction( - self.trUtf8("Open Containing Folder"), + self.tr("Open Containing Folder"), self.__contextMenuOpenFolder) menu.addSeparator() menu.addAction( - self.trUtf8("Go to Download Page"), + self.tr("Go to Download Page"), self.__contextMenuGotoPage) menu.addAction( - self.trUtf8("Copy Download Link"), + self.tr("Copy Download Link"), self.__contextMenuCopyLink) menu.addSeparator() - menu.addAction(self.trUtf8("Select All"), self.__contextMenuSelectAll) + menu.addAction(self.tr("Select All"), self.__contextMenuSelectAll) if selectedRowsCount > 1 or \ (selectedRowsCount == 1 and not self.__downloads[ @@ -112,7 +112,7 @@ .downloading()): menu.addSeparator() menu.addAction( - self.trUtf8("Remove From List"), + self.tr("Remove From List"), self.__contextMenuRemoveSelected) menu.exec_(QCursor.pos()) @@ -147,10 +147,10 @@ if self.activeDownloads() > 0: res = E5MessageBox.yesNo( self, - self.trUtf8(""), - self.trUtf8("""There are %n downloads in progress.\n""" - """Do you want to quit anyway?""", "", - self.activeDownloads()), + self.tr(""), + self.tr("""There are %n downloads in progress.\n""" + """Do you want to quit anyway?""", "", + self.activeDownloads()), icon=E5MessageBox.Warning) if not res: self.show() @@ -378,7 +378,7 @@ Private method to update the count label. """ count = len(self.__downloads) - self.countLabel.setText(self.trUtf8("%n Download(s)", "", count)) + self.countLabel.setText(self.tr("%n Download(s)", "", count)) def __updateActiveItemCount(self): """ @@ -387,9 +387,9 @@ count = self.activeDownloads() if count > 0: self.setWindowTitle( - self.trUtf8("Downloading %n file(s)", "", count)) + self.tr("Downloading %n file(s)", "", count)) else: - self.setWindowTitle(self.trUtf8("Downloads")) + self.setWindowTitle(self.tr("Downloads")) def __finished(self): """
--- a/Helpviewer/Feeds/FeedsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Feeds/FeedsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,7 +41,7 @@ for row in range(len(self.__availableFeeds)): feed = self.__availableFeeds[row] button = QPushButton(self) - button.setText(self.trUtf8("Add")) + button.setText(self.tr("Add")) button.feed = feed label = QLabel(self) label.setText(feed[0]) @@ -80,17 +80,17 @@ if Helpviewer.HelpWindow.HelpWindow.notificationsEnabled(): Helpviewer.HelpWindow.HelpWindow.showNotification( UI.PixmapCache.getPixmap("rss48.png"), - self.trUtf8("Add RSS Feed"), - self.trUtf8("""The feed was added successfully.""")) + self.tr("Add RSS Feed"), + self.tr("""The feed was added successfully.""")) else: E5MessageBox.information( self, - self.trUtf8("Add RSS Feed"), - self.trUtf8("""The feed was added successfully.""")) + self.tr("Add RSS Feed"), + self.tr("""The feed was added successfully.""")) else: E5MessageBox.warning( self, - self.trUtf8("Add RSS Feed"), - self.trUtf8("""The feed was already added before.""")) + self.tr("Add RSS Feed"), + self.tr("""The feed was already added before.""")) self.close()
--- a/Helpviewer/Feeds/FeedsManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Feeds/FeedsManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -174,8 +174,8 @@ if feed[0] == urlString: E5MessageBox.critical( self, - self.trUtf8("Duplicate Feed URL"), - self.trUtf8( + self.tr("Duplicate Feed URL"), + self.tr( """A feed with the URL {0} exists already.""" """ Aborting...""".format(urlString))) return @@ -196,8 +196,8 @@ title = itm.text(0) res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Feed"), - self.trUtf8( + self.tr("Delete Feed"), + self.tr( """<p>Do you really want to delete the feed""" """ <b>{0}</b>?</p>""".format(title))) if res: @@ -303,7 +303,7 @@ if topItem.childCount() == 0: itm = QTreeWidgetItem(topItem) - itm.setText(0, self.trUtf8("Error fetching feed")) + itm.setText(0, self.tr("Error fetching feed")) itm.setData(0, FeedsManager.UrlStringRole, "") itm.setData(0, FeedsManager.ErrorDataRole, str(xmlData, encoding="utf-8")) @@ -334,11 +334,11 @@ if urlString: menu = QMenu() menu.addAction( - self.trUtf8("&Open"), self.__openMessageInCurrentTab) + self.tr("&Open"), self.__openMessageInCurrentTab) menu.addAction( - self.trUtf8("Open in New &Tab"), self.__openMessageInNewTab) + self.tr("Open in New &Tab"), self.__openMessageInNewTab) menu.addSeparator() - menu.addAction(self.trUtf8("&Copy URL to Clipboard"), + menu.addAction(self.tr("&Copy URL to Clipboard"), self.__copyUrlToClipboard) menu.exec_(QCursor.pos()) else: @@ -346,7 +346,7 @@ if errorString: menu = QMenu() menu.addAction( - self.trUtf8("&Show error data"), self.__showError) + self.tr("&Show error data"), self.__showError) menu.exec_(QCursor.pos()) def __itemActivated(self, itm, column): @@ -426,5 +426,5 @@ if errorStr: E5MessageBox.critical( self, - self.trUtf8("Error loading feed"), + self.tr("Error loading feed"), "{0}".format(errorStr))
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyAddScriptDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyAddScriptDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,11 +49,11 @@ exclude = script.exclude() if include: - runsAt = self.trUtf8("<p>runs at:<br/><i>{0}</i></p>").format( + runsAt = self.tr("<p>runs at:<br/><i>{0}</i></p>").format( "<br/>".join(include)) if exclude: - doesNotRunAt = self.trUtf8( + doesNotRunAt = self.tr( "<p>does not run at:<br/><i>{0}</i></p>").format( "<br/>".join(exclude)) @@ -83,22 +83,22 @@ Private slot handling the accepted signal. """ if self.__manager.addScript(self.__script): - msg = self.trUtf8( + msg = self.tr( "<p><b>{0}</b> installed successfully.</p>").format( self.__script.name()) success = True else: - msg = self.trUtf8("<p>Cannot install script.</p>") + msg = self.tr("<p>Cannot install script.</p>") success = False import Helpviewer.HelpWindow if success and Helpviewer.HelpWindow.HelpWindow.notificationsEnabled(): Helpviewer.HelpWindow.HelpWindow.showNotification( UI.PixmapCache.getPixmap("greaseMonkey48.png"), - self.trUtf8("GreaseMonkey Script Installation"), + self.tr("GreaseMonkey Script Installation"), msg) else: E5MessageBox.information( self, - self.trUtf8("GreaseMonkey Script Installation"), + self.tr("GreaseMonkey Script Installation"), msg)
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -145,8 +145,8 @@ removeIt = E5MessageBox.yesNo( self, - self.trUtf8("Remove Script"), - self.trUtf8( + self.tr("Remove Script"), + self.tr( """<p>Are you sure you want to remove <b>{0}</b>?</p>""") .format(script.name())) if removeIt and self.__manager.removeScript(script):
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationScriptInfoDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyConfiguration/GreaseMonkeyConfigurationScriptInfoDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -39,7 +39,7 @@ self.__scriptFileName = script.fileName() self.setWindowTitle( - self.trUtf8("Script Details of {0}").format(script.name())) + self.tr("Script Details of {0}").format(script.name())) self.nameLabel.setText(script.fullName()) self.versionLabel.setText(script.version())
--- a/Helpviewer/GreaseMonkey/GreaseMonkeyDownloader.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/GreaseMonkey/GreaseMonkeyDownloader.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,8 +68,8 @@ except (IOError, OSError) as err: E5MessageBox.critical( None, - self.trUtf8("GreaseMonkey Download"), - self.trUtf8( + self.tr("GreaseMonkey Download"), + self.tr( """<p>The file <b>{0}</b> could not be opened""" """ for writing.<br/>Reason: {1}</p>""").format( self.__fileName, str(err))) @@ -119,8 +119,8 @@ except (IOError, OSError) as err: E5MessageBox.critical( None, - self.trUtf8("GreaseMonkey Download"), - self.trUtf8( + self.tr("GreaseMonkey Download"), + self.tr( """<p>The file <b>{0}</b> could not be opened""" """ for writing.<br/>Reason: {1}</p>""").format( fileName, str(err))) @@ -164,8 +164,8 @@ else: E5MessageBox.information( None, - self.trUtf8("GreaseMonkey Download"), - self.trUtf8( + self.tr("GreaseMonkey Download"), + self.tr( """<p><b>{0}</b> is already installed.</p>""") .format(script.name()))
--- a/Helpviewer/HelpBrowserWV.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpBrowserWV.py Sat Jan 11 11:55:33 2014 +0100 @@ -118,7 +118,7 @@ else: return "RTL" - return self.trUtf8(trans) + return self.tr(trans) @pyqtSlot(result=str) def providerString(self): @@ -127,7 +127,7 @@ @return string for the search provider (string) """ - return self.trUtf8("Search results provided by {0}")\ + return self.tr("Search results provided by {0}")\ .format(self.__mw.openSearchManager().currentEngineName()) @pyqtSlot(str, result=str) @@ -201,8 +201,8 @@ if type_ == QWebPage.NavigationTypeFormResubmitted: res = E5MessageBox.yesNo( self.view(), - self.trUtf8("Resending POST request"), - self.trUtf8( + self.tr("Resending POST request"), + self.tr( """In order to display the site, the request along with""" """ all the data must be sent once again, which may lead""" """ to some unexpected behaviour of the site e.g. the""" @@ -281,7 +281,7 @@ files.fileNames = E5FileDialog.getOpenFileNames( None, - self.trUtf8("Select files to upload..."), + self.tr("Select files to upload..."), suggestedFileName) return True @@ -310,8 +310,8 @@ else: # the whole page is blocked rule = info.errorString.replace("AdBlockRule:", "") - title = self.trUtf8("Content blocked by AdBlock Plus") - message = self.trUtf8( + title = self.tr("Content blocked by AdBlock Plus") + message = self.tr( "Blocked by rule: <i>{0}</i>").format(rule) htmlFile = QFile(":/html/adblockPage.html") @@ -331,7 +331,7 @@ info.errorString == "eric5:No Error": return False - title = self.trUtf8("Error loading page: {0}").format(urlString) + title = self.tr("Error loading page: {0}").format(urlString) htmlFile = QFile(":/html/notFoundPage.html") htmlFile.open(QFile.ReadOnly) html = htmlFile.readAll() @@ -351,31 +351,31 @@ html = html.replace("@TITLE@", title.encode("utf8")) html = html.replace("@H1@", info.errorString.encode("utf8")) html = html.replace( - "@H2@", self.trUtf8("When connecting to: {0}.") + "@H2@", self.tr("When connecting to: {0}.") .format(urlString).encode("utf8")) html = html.replace( "@LI-1@", - self.trUtf8("Check the address for errors such as " - "<b>ww</b>.example.org instead of " - "<b>www</b>.example.org").encode("utf8")) + self.tr("Check the address for errors such as " + "<b>ww</b>.example.org instead of " + "<b>www</b>.example.org").encode("utf8")) html = html.replace( "@LI-2@", - self.trUtf8( + self.tr( "If the address is correct, try checking the network " "connection.").encode("utf8")) html = html.replace( "@LI-3@", - self.trUtf8( + self.tr( "If your computer or network is protected by a firewall " "or proxy, make sure that the browser is permitted to " "access the network.").encode("utf8")) html = html.replace( "@LI-4@", - self.trUtf8("If your cache policy is set to offline browsing," - "only pages in the local cache are available.") + self.tr("If your cache policy is set to offline browsing," + "only pages in the local cache are available.") .encode("utf8")) html = html.replace( - "@BUTTON@", self.trUtf8("Try Again").encode("utf8")) + "@BUTTON@", self.tr("Try Again").encode("utf8")) errorPage.content = html return True @@ -541,8 +541,8 @@ else: E5MessageBox.warning( self.view(), - self.trUtf8("SSL Info"), - self.trUtf8("""This site does not contain SSL information.""")) + self.tr("SSL Info"), + self.tr("""This site does not contain SSL information.""")) def hasValidSslInfo(self): """ @@ -647,7 +647,7 @@ """ super().__init__(parent) self.setObjectName(name) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Help Window</b>""" """<p>This window displays the selected help information.</p>""" )) @@ -821,8 +821,8 @@ if not QFileInfo(name.toLocalFile()).exists(): E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>The file <b>{0}</b> does not exist.</p>""") .format(name.toLocalFile())) return @@ -835,8 +835,8 @@ if not started: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Could not start a viewer""" """ for file <b>{0}</b>.</p>""") .format(name.path())) @@ -846,8 +846,8 @@ if not started: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Could not start an application""" """ for URL <b>{0}</b>.</p>""") .format(name.toString())) @@ -866,8 +866,8 @@ if not started: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Could not start a viewer""" """ for file <b>{0}</b>.</p>""") .format(name.path())) @@ -1076,29 +1076,29 @@ if not hit.linkUrl().isEmpty(): menu.addAction( UI.PixmapCache.getIcon("openNewTab.png"), - self.trUtf8("Open Link in New Tab\tCtrl+LMB"), + self.tr("Open Link in New Tab\tCtrl+LMB"), self.__openLinkInNewTab).setData(hit.linkUrl()) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("download.png"), - self.trUtf8("Save Lin&k"), self.__downloadLink) + self.tr("Save Lin&k"), self.__downloadLink) menu.addAction( UI.PixmapCache.getIcon("bookmark22.png"), - self.trUtf8("Bookmark this Link"), self.__bookmarkLink)\ + self.tr("Bookmark this Link"), self.__bookmarkLink)\ .setData(hit.linkUrl()) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy Link to Clipboard"), self.__copyLink) + self.tr("Copy Link to Clipboard"), self.__copyLink) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), - self.trUtf8("Send Link"), + self.tr("Send Link"), self.__sendLink).setData(hit.linkUrl()) if Preferences.getHelp("VirusTotalEnabled") and \ Preferences.getHelp("VirusTotalServiceKey") != "": menu.addAction( UI.PixmapCache.getIcon("virustotal.png"), - self.trUtf8("Scan Link with VirusTotal"), + self.tr("Scan Link with VirusTotal"), self.__virusTotal).setData(hit.linkUrl()) if not hit.imageUrl().isEmpty(): @@ -1106,32 +1106,32 @@ menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("openNewTab.png"), - self.trUtf8("Open Image in New Tab"), + self.tr("Open Image in New Tab"), self.__openLinkInNewTab).setData(hit.imageUrl()) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("download.png"), - self.trUtf8("Save Image"), self.__downloadImage) + self.tr("Save Image"), self.__downloadImage) menu.addAction( - self.trUtf8("Copy Image to Clipboard"), self.__copyImage) + self.tr("Copy Image to Clipboard"), self.__copyImage) menu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy Image Location to Clipboard"), + self.tr("Copy Image Location to Clipboard"), self.__copyLocation).setData(hit.imageUrl().toString()) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), - self.trUtf8("Send Image Link"), + self.tr("Send Image Link"), self.__sendLink).setData(hit.imageUrl()) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8("Block Image"), self.__blockImage)\ + self.tr("Block Image"), self.__blockImage)\ .setData(hit.imageUrl().toString()) if Preferences.getHelp("VirusTotalEnabled") and \ Preferences.getHelp("VirusTotalServiceKey") != "": menu.addAction( UI.PixmapCache.getIcon("virustotal.png"), - self.trUtf8("Scan Image with VirusTotal"), + self.tr("Scan Image with VirusTotal"), self.__virusTotal).setData(hit.imageUrl()) element = hit.element() @@ -1149,31 +1149,31 @@ if paused: menu.addAction( UI.PixmapCache.getIcon("mediaPlaybackStart.png"), - self.trUtf8("Play"), self.__pauseMedia) + self.tr("Play"), self.__pauseMedia) else: menu.addAction( UI.PixmapCache.getIcon("mediaPlaybackPause.png"), - self.trUtf8("Pause"), self.__pauseMedia) + self.tr("Pause"), self.__pauseMedia) if muted: menu.addAction( UI.PixmapCache.getIcon("audioVolumeHigh.png"), - self.trUtf8("Unmute"), self.__muteMedia) + self.tr("Unmute"), self.__muteMedia) else: menu.addAction( UI.PixmapCache.getIcon("audioVolumeMuted.png"), - self.trUtf8("Mute"), self.__muteMedia) + self.tr("Mute"), self.__muteMedia) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy Media Address to Clipboard"), + self.tr("Copy Media Address to Clipboard"), self.__copyLocation).setData(videoUrl.toString()) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), - self.trUtf8("Send Media Address"), self.__sendLink)\ + self.tr("Send Media Address"), self.__sendLink)\ .setData(videoUrl) menu.addAction( UI.PixmapCache.getIcon("download.png"), - self.trUtf8("Save Media"), self.__downloadMedia)\ + self.tr("Save Media"), self.__downloadMedia)\ .setData(videoUrl) if element.tagName().lower() in ["input", "textarea"]: @@ -1214,39 +1214,39 @@ if frameAtPos and self.page().mainFrame() != frameAtPos: self.__clickedFrame = frameAtPos - fmenu = QMenu(self.trUtf8("This Frame")) + fmenu = QMenu(self.tr("This Frame")) frameUrl = self.__clickedFrame.url() if frameUrl.isValid(): fmenu.addAction( - self.trUtf8("Show &only this frame"), + self.tr("Show &only this frame"), self.__loadClickedFrame) fmenu.addAction( UI.PixmapCache.getIcon("openNewTab.png"), - self.trUtf8("Show in new &tab"), + self.tr("Show in new &tab"), self.__openLinkInNewTab).setData(self.__clickedFrame.url()) fmenu.addSeparator() fmenu.addAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8("&Print"), self.__printClickedFrame) + self.tr("&Print"), self.__printClickedFrame) fmenu.addAction( UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self.__printPreviewClickedFrame) + self.tr("Print Preview"), self.__printPreviewClickedFrame) fmenu.addAction( UI.PixmapCache.getIcon("printPdf.png"), - self.trUtf8("Print as PDF"), self.__printPdfClickedFrame) + self.tr("Print as PDF"), self.__printPdfClickedFrame) fmenu.addSeparator() fmenu.addAction( UI.PixmapCache.getIcon("zoomIn.png"), - self.trUtf8("Zoom &in"), self.__zoomInClickedFrame) + self.tr("Zoom &in"), self.__zoomInClickedFrame) fmenu.addAction( UI.PixmapCache.getIcon("zoomReset.png"), - self.trUtf8("Zoom &reset"), self.__zoomResetClickedFrame) + self.tr("Zoom &reset"), self.__zoomResetClickedFrame) fmenu.addAction( UI.PixmapCache.getIcon("zoomOut.png"), - self.trUtf8("Zoom &out"), self.__zoomOutClickedFrame) + self.tr("Zoom &out"), self.__zoomOutClickedFrame) fmenu.addSeparator() fmenu.addAction( - self.trUtf8("Show frame so&urce"), + self.tr("Show frame so&urce"), self.__showClickedFrameSource) menu.addMenu(fmenu) @@ -1254,12 +1254,12 @@ menu.addAction( UI.PixmapCache.getIcon("bookmark22.png"), - self.trUtf8("Bookmark this Page"), self.addBookmark) + self.tr("Bookmark this Page"), self.addBookmark) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), - self.trUtf8("Send Page Link"), self.__sendLink).setData(self.url()) + self.tr("Send Page Link"), self.__sendLink).setData(self.url()) menu.addSeparator() - self.__userAgentMenu = UserAgentMenu(self.trUtf8("User Agent"), + self.__userAgentMenu = UserAgentMenu(self.tr("User Agent"), url=self.url()) menu.addMenu(self.__userAgentMenu) menu.addSeparator() @@ -1275,12 +1275,12 @@ menu.addAction(self.mw.copyAct) menu.addAction( UI.PixmapCache.getIcon("mailSend.png"), - self.trUtf8("Send Text"), + self.tr("Send Text"), self.__sendLink).setData(self.selectedText()) menu.addAction(self.mw.findAct) menu.addSeparator() if self.selectedText(): - self.__searchMenu = menu.addMenu(self.trUtf8("Search with...")) + self.__searchMenu = menu.addMenu(self.tr("Search with...")) from .OpenSearch.OpenSearchEngineAction import \ OpenSearchEngineAction @@ -1307,21 +1307,21 @@ langCode, self.selectedText())) menu.addAction( UI.PixmapCache.getIcon("translate.png"), - self.trUtf8("Google Translate"), self.__openLinkInNewTab)\ + self.tr("Google Translate"), self.__openLinkInNewTab)\ .setData(googleTranslatorUrl) wiktionaryUrl = QUrl( "http://{0}.wiktionary.org/wiki/Special:Search?search={1}" .format(langCode, self.selectedText())) menu.addAction( UI.PixmapCache.getIcon("wikipedia.png"), - self.trUtf8("Dictionary"), self.__openLinkInNewTab)\ + self.tr("Dictionary"), self.__openLinkInNewTab)\ .setData(wiktionaryUrl) menu.addSeparator() guessedUrl = QUrl.fromUserInput(self.selectedText().strip()) if self.__isUrlValid(guessedUrl): menu.addAction( - self.trUtf8("Go to web address"), + self.tr("Go to web address"), self.__openLinkInNewTab).setData(guessedUrl) menu.addSeparator() @@ -1329,13 +1329,13 @@ if not element.isNull() and \ element.tagName().lower() == "input" and \ element.attribute("type", "text") == "text": - menu.addAction(self.trUtf8("Add to web search toolbar"), + menu.addAction(self.tr("Add to web search toolbar"), self.__addSearchEngine).setData(element) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("webInspector.png"), - self.trUtf8("Web Inspector..."), self.__webInspector) + self.tr("Web Inspector..."), self.__webInspector) menu.exec_(evt.globalPos()) @@ -1510,8 +1510,8 @@ if method != "get": E5MessageBox.warning( self, - self.trUtf8("Method not supported"), - self.trUtf8( + self.tr("Method not supported"), + self.tr( """{0} method is not supported.""").format(method.upper())) return @@ -1555,8 +1555,8 @@ if len(searchEngines) > 1: searchEngine, ok = QInputDialog.getItem( self, - self.trUtf8("Search engine"), - self.trUtf8("Choose the desired search engine"), + self.tr("Search engine"), + self.tr("Choose the desired search engine"), sorted(searchEngines.keys()), 0, False) if not ok: @@ -1573,8 +1573,8 @@ engineName, ok = QInputDialog.getText( self, - self.trUtf8("Engine name"), - self.trUtf8("Enter a name for the engine"), + self.tr("Engine name"), + self.tr("Enter a name for the engine"), QLineEdit.Normal, engineName) if not ok: @@ -1933,7 +1933,7 @@ return urlString = bytes(replyUrl.toEncoded()).decode() - title = self.trUtf8("Error loading page: {0}").format(urlString) + title = self.tr("Error loading page: {0}").format(urlString) htmlFile = QFile(":/html/notFoundPage.html") htmlFile.open(QFile.ReadOnly) html = htmlFile.readAll() @@ -1952,30 +1952,30 @@ html = html.replace("@TITLE@", title.encode("utf8")) html = html.replace("@H1@", reply.errorString().encode("utf8")) html = html.replace( - "@H2@", self.trUtf8("When connecting to: {0}.") + "@H2@", self.tr("When connecting to: {0}.") .format(urlString).encode("utf8")) html = html.replace( "@LI-1@", - self.trUtf8("Check the address for errors such as " - "<b>ww</b>.example.org instead of " - "<b>www</b>.example.org").encode("utf8")) + self.tr("Check the address for errors such as " + "<b>ww</b>.example.org instead of " + "<b>www</b>.example.org").encode("utf8")) html = html.replace( "@LI-2@", - self.trUtf8("If the address is correct, try checking the network " - "connection.").encode("utf8")) + self.tr("If the address is correct, try checking the network " + "connection.").encode("utf8")) html = html.replace( "@LI-3@", - self.trUtf8( + self.tr( "If your computer or network is protected by a firewall " "or proxy, make sure that the browser is permitted to " "access the network.").encode("utf8")) html = html.replace( "@LI-4@", - self.trUtf8("If your cache policy is set to offline browsing," - "only pages in the local cache are available.") + self.tr("If your cache policy is set to offline browsing," + "only pages in the local cache are available.") .encode("utf8")) html = html.replace( - "@BUTTON@", self.trUtf8("Try Again").encode("utf8")) + "@BUTTON@", self.tr("Try Again").encode("utf8")) notFoundFrame.setHtml(bytes(html).decode("utf8"), replyUrl) self.mw.historyManager().removeHistoryEntry(replyUrl, self.title()) self.loadFinished.emit(False) @@ -2004,8 +2004,8 @@ res = E5MessageBox.yesNo( self, - self.trUtf8("Web Database Quota"), - self.trUtf8( + self.tr("Web Database Quota"), + self.tr( """<p>The database quota of <strong>{0}</strong> has""" """ been exceeded while accessing database <strong>{1}""" """</strong>.</p><p>Shall it be changed?</p>""") @@ -2015,8 +2015,8 @@ if res: newQuota, ok = QInputDialog.getInt( self, - self.trUtf8("New Web Database Quota"), - self.trUtf8( + self.tr("New Web Database Quota"), + self.tr( "Enter the new quota in MB (current = {0}, used = {1}; " "step size = 5 MB):" .format( @@ -2036,13 +2036,13 @@ """ unit = "" if size < 1024: - unit = self.trUtf8("bytes") + unit = self.tr("bytes") elif size < 1024 * 1024: size /= 1024 - unit = self.trUtf8("kB") + unit = self.tr("kB") else: size /= 1024 * 1024 - unit = self.trUtf8("MB") + unit = self.tr("MB") return "{0:.1f} {1}".format(size, unit) ########################################################################### @@ -2319,8 +2319,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in""" """ PyQt4. Please upgrade.</p>""")) @@ -2365,8 +2365,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in PyQt4.""" """Please upgrade.</p>""")) return @@ -2397,8 +2397,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in""" """ PyQt4. Please upgrade.</p>""")) return
--- a/Helpviewer/HelpDocsInstaller.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpDocsInstaller.py Sat Jan 11 11:55:33 2014 +0100 @@ -147,7 +147,7 @@ if not engine.registerDocumentation(fi.absoluteFilePath()): self.errorMessage.emit( - self.trUtf8( + self.tr( """<p>The file <b>{0}</b> could not be""" """ registered. <br/>Reason: {1}</p>""") .format(fi.absoluteFilePath, engine.error()) @@ -208,7 +208,7 @@ if not engine.registerDocumentation(fi.absoluteFilePath()): self.errorMessage.emit( - self.trUtf8( + self.tr( """<p>The file <b>{0}</b> could not be""" """ registered. <br/>Reason: {1}</p>""") .format(fi.absoluteFilePath, engine.error())
--- a/Helpviewer/HelpIndexWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpIndexWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,7 +41,7 @@ self.__index = None self.__layout = QVBoxLayout(self) - label = QLabel(self.trUtf8("&Look for:")) + label = QLabel(self.tr("&Look for:")) self.__layout.addWidget(label) self.__searchEdit = QLineEdit() @@ -140,8 +140,8 @@ idx = self.__index.indexAt(event.pos()) if idx.isValid(): menu = QMenu() - curTab = menu.addAction(self.trUtf8("Open Link")) - newTab = menu.addAction(self.trUtf8("Open Link in New Tab")) + curTab = menu.addAction(self.tr("Open Link")) + newTab = menu.addAction(self.tr("Open Link in New Tab")) menu.move(self.__index.mapToGlobal(event.pos())) act = menu.exec_()
--- a/Helpviewer/HelpSearchWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpSearchWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -126,8 +126,8 @@ return menu = QMenu() - curTab = menu.addAction(self.trUtf8("Open Link")) - newTab = menu.addAction(self.trUtf8("Open Link in New Tab")) + curTab = menu.addAction(self.tr("Open Link")) + newTab = menu.addAction(self.tr("Open Link in New Tab")) menu.move(evt.globalPos()) act = menu.exec_() if act == curTab:
--- a/Helpviewer/HelpTabWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpTabWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -93,7 +93,7 @@ self.__navigationButton.setIcon( UI.PixmapCache.getIcon("1downarrow.png")) self.__navigationButton.setToolTip( - self.trUtf8("Show a navigation menu")) + self.tr("Show a navigation menu")) self.__navigationButton.setPopupMode(QToolButton.InstantPopup) self.__navigationButton.setMenu(self.__navigationMenu) self.__navigationButton.setEnabled(False) @@ -106,7 +106,7 @@ self.__closedTabsButton = QToolButton(self) self.__closedTabsButton.setIcon(UI.PixmapCache.getIcon("trash.png")) self.__closedTabsButton.setToolTip( - self.trUtf8("Show a navigation menu for closed tabs")) + self.tr("Show a navigation menu for closed tabs")) self.__closedTabsButton.setPopupMode(QToolButton.InstantPopup) self.__closedTabsButton.setMenu(self.__closedTabsMenu) self.__closedTabsButton.setEnabled(False) @@ -115,7 +115,7 @@ self.__closeButton = QToolButton(self) self.__closeButton.setIcon(UI.PixmapCache.getIcon("close.png")) self.__closeButton.setToolTip( - self.trUtf8("Close the current help window")) + self.tr("Close the current help window")) self.__closeButton.setEnabled(False) self.__closeButton.clicked[bool].connect(self.closeBrowser) self.__rightCornerWidgetLayout.addWidget(self.__closeButton) @@ -132,7 +132,7 @@ self.__newTabButton = QToolButton(self) self.__newTabButton.setIcon(UI.PixmapCache.getIcon("plus.png")) self.__newTabButton.setToolTip( - self.trUtf8("Open a new help window tab")) + self.tr("Open a new help window tab")) self.setCornerWidget(self.__newTabButton, Qt.TopLeftCorner) self.__newTabButton.clicked[bool].connect(self.newBrowser) @@ -147,58 +147,58 @@ self.__tabContextMenu = QMenu(self) self.tabContextNewAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("tabNew.png"), - self.trUtf8('New Tab'), self.newBrowser) + self.tr('New Tab'), self.newBrowser) self.__tabContextMenu.addSeparator() self.leftMenuAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("1leftarrow.png"), - self.trUtf8('Move Left'), self.__tabContextMenuMoveLeft) + self.tr('Move Left'), self.__tabContextMenuMoveLeft) self.rightMenuAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("1rightarrow.png"), - self.trUtf8('Move Right'), self.__tabContextMenuMoveRight) + self.tr('Move Right'), self.__tabContextMenuMoveRight) self.__tabContextMenu.addSeparator() self.tabContextCloneAct = self.__tabContextMenu.addAction( - self.trUtf8("Duplicate Page"), self.__tabContextMenuClone) + self.tr("Duplicate Page"), self.__tabContextMenuClone) self.__tabContextMenu.addSeparator() self.tabContextCloseAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("tabClose.png"), - self.trUtf8('Close'), self.__tabContextMenuClose) + self.tr('Close'), self.__tabContextMenuClose) self.tabContextCloseOthersAct = self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("tabCloseOther.png"), - self.trUtf8("Close Others"), self.__tabContextMenuCloseOthers) + self.tr("Close Others"), self.__tabContextMenuCloseOthers) self.__tabContextMenu.addAction( - self.trUtf8('Close All'), self.closeAllBrowsers) + self.tr('Close All'), self.closeAllBrowsers) self.__tabContextMenu.addSeparator() self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8('Print Preview'), self.__tabContextMenuPrintPreview) + self.tr('Print Preview'), self.__tabContextMenuPrintPreview) self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8('Print'), self.__tabContextMenuPrint) + self.tr('Print'), self.__tabContextMenuPrint) self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("printPdf.png"), - self.trUtf8('Print as PDF'), self.__tabContextMenuPrintPdf) + self.tr('Print as PDF'), self.__tabContextMenuPrintPdf) self.__tabContextMenu.addSeparator() self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('Reload All'), self.reloadAllBrowsers) + self.tr('Reload All'), self.reloadAllBrowsers) self.__tabContextMenu.addSeparator() self.__tabContextMenu.addAction( UI.PixmapCache.getIcon("addBookmark.png"), - self.trUtf8('Bookmark All Tabs'), self.__mainWindow.bookmarkAll) + self.tr('Bookmark All Tabs'), self.__mainWindow.bookmarkAll) self.__tabBackContextMenu = QMenu(self) self.__tabBackContextMenu.addAction( - self.trUtf8('Close All'), self.closeAllBrowsers) + self.tr('Close All'), self.closeAllBrowsers) self.__tabBackContextMenu.addAction( UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('Reload All'), self.reloadAllBrowsers) + self.tr('Reload All'), self.reloadAllBrowsers) self.__tabBackContextMenu.addAction( UI.PixmapCache.getIcon("addBookmark.png"), - self.trUtf8('Bookmark All Tabs'), self.__mainWindow.bookmarkAll) + self.tr('Bookmark All Tabs'), self.__mainWindow.bookmarkAll) self.__tabBackContextMenu.addSeparator() self.__restoreClosedTabAct = self.__tabBackContextMenu.addAction( UI.PixmapCache.getIcon("trash.png"), - self.trUtf8('Restore Closed Tab'), self.restoreClosedTab) + self.tr('Restore Closed Tab'), self.restoreClosedTab) self.__restoreClosedTabAct.setEnabled(False) self.__restoreClosedTabAct.setData(0) @@ -341,9 +341,9 @@ browser.zoomValueChanged.connect(self.browserZoomValueChanged) if position == -1: - index = self.addTab(browser, self.trUtf8("...")) + index = self.addTab(browser, self.tr("...")) else: - index = self.insertTab(position, browser, self.trUtf8("...")) + index = self.insertTab(position, browser, self.tr("...")) self.setCurrentIndex(index) self.__mainWindow.closeAct.setEnabled(True) @@ -539,8 +539,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in""" """ PyQt4. Please upgrade.</p>""")) return @@ -584,8 +584,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in""" """ PyQt4. Please upgrade.</p>""")) return @@ -637,8 +637,8 @@ except AttributeError: E5MessageBox.critical( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<p>Printing is not available due to a bug in PyQt4.""" """Please upgrade.</p>""")) return @@ -734,9 +734,9 @@ self.setTabIcon(index, loading) else: self.setTabIcon(index, QIcon()) - self.setTabText(index, self.trUtf8("Loading...")) - self.setTabToolTip(index, self.trUtf8("Loading...")) - self.showMessage.emit(self.trUtf8("Loading...")) + self.setTabText(index, self.tr("Loading...")) + self.setTabToolTip(index, self.tr("Loading...")) + self.showMessage.emit(self.tr("Loading...")) self.__mainWindow.setLoadingActions(True) @@ -757,9 +757,9 @@ self.setTabIcon( index, Helpviewer.HelpWindow.HelpWindow.icon(browser.url())) if ok: - self.showMessage.emit(self.trUtf8("Finished loading")) + self.showMessage.emit(self.tr("Finished loading")) else: - self.showMessage.emit(self.trUtf8("Failed to load")) + self.showMessage.emit(self.tr("Failed to load")) self.__mainWindow.setLoadingActions(False) @@ -801,21 +801,21 @@ if self.count() > 1 and Preferences.getHelp("WarnOnMultipleClose"): mb = E5MessageBox.E5MessageBox( E5MessageBox.Information, - self.trUtf8("Are you sure you want to close the window?"), - self.trUtf8("""Are you sure you want to close the window?\n""" - """You have %n tab(s) open.""", "", self.count()), + self.tr("Are you sure you want to close the window?"), + self.tr("""Are you sure you want to close the window?\n""" + """You have %n tab(s) open.""", "", self.count()), modal=True, parent=self) if self.__mainWindow.fromEric: quitButton = mb.addButton( - self.trUtf8("&Close"), E5MessageBox.AcceptRole) + self.tr("&Close"), E5MessageBox.AcceptRole) quitButton.setIcon(UI.PixmapCache.getIcon("close.png")) else: quitButton = mb.addButton( - self.trUtf8("&Quit"), E5MessageBox.AcceptRole) + self.tr("&Quit"), E5MessageBox.AcceptRole) quitButton.setIcon(UI.PixmapCache.getIcon("exit.png")) closeTabButton = mb.addButton( - self.trUtf8("C&lose Current Tab"), E5MessageBox.AcceptRole) + self.tr("C&lose Current Tab"), E5MessageBox.AcceptRole) closeTabButton.setIcon(UI.PixmapCache.getIcon("tabClose.png")) mb.addButton(E5MessageBox.Cancel) mb.exec_() @@ -972,9 +972,9 @@ index += 1 self.__closedTabsMenu.addSeparator() self.__closedTabsMenu.addAction( - self.trUtf8("Restore All Closed Tabs"), self.restoreAllClosedTabs) + self.tr("Restore All Closed Tabs"), self.restoreAllClosedTabs) self.__closedTabsMenu.addAction( - self.trUtf8("Clear List"), self.clearClosedTabsList) + self.tr("Clear List"), self.clearClosedTabsList) def closedTabsManager(self): """
--- a/Helpviewer/HelpTocWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpTocWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -145,8 +145,8 @@ return menu = QMenu() - curTab = menu.addAction(self.trUtf8("Open Link")) - newTab = menu.addAction(self.trUtf8("Open Link in New Tab")) + curTab = menu.addAction(self.tr("Open Link")) + newTab = menu.addAction(self.tr("Open Link in New Tab")) menu.move(self.__tocWidget.mapToGlobal(pos)) model = self.__tocWidget.model()
--- a/Helpviewer/HelpTopicDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpTopicDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -29,7 +29,7 @@ super().__init__(parent) self.setupUi(self) - self.label.setText(self.trUtf8("Choose a &topic for <b>{0}</b>:") + self.label.setText(self.tr("Choose a &topic for <b>{0}</b>:") .format(keyword)) self.__links = links
--- a/Helpviewer/HelpWebSearchWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpWebSearchWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -127,7 +127,7 @@ if self.__model.rowCount() == 0: if not self.__suggestionsItem: self.__suggestionsItem = QStandardItem( - self.trUtf8("Suggestions")) + self.tr("Suggestions")) self.__suggestionsItem.setFont(boldFont) self.__model.appendRow(self.__suggestionsItem) @@ -136,12 +136,12 @@ if not self.__recentSearches: self.__recentSearchesItem = QStandardItem( - self.trUtf8("No Recent Searches")) + self.tr("No Recent Searches")) self.__recentSearchesItem.setFont(boldFont) self.__model.appendRow(self.__recentSearchesItem) else: self.__recentSearchesItem = QStandardItem( - self.trUtf8("Recent Searches")) + self.tr("Recent Searches")) self.__recentSearchesItem.setFont(boldFont) self.__model.appendRow(self.__recentSearchesItem) for recentSearch in self.__recentSearches: @@ -270,7 +270,7 @@ title = ct.title() action = self.__enginesMenu.addAction( - self.trUtf8("Add '{0}'").format(title), + self.tr("Add '{0}'").format(title), self.__addEngineFromUrl) action.setData(url) action.setIcon(ct.icon()) @@ -279,7 +279,7 @@ self.__enginesMenu.addAction(self.__mw.searchEnginesAction()) if self.__recentSearches: - self.__enginesMenu.addAction(self.trUtf8("Clear Recent Searches"), + self.__enginesMenu.addAction(self.tr("Clear Recent Searches"), self.clear) def __changeCurrentEngine(self):
--- a/Helpviewer/HelpWindow.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/HelpWindow.py Sat Jan 11 11:55:33 2014 +0100 @@ -98,7 +98,7 @@ """ super().__init__(parent) self.setObjectName(name) - self.setWindowTitle(self.trUtf8("eric5 Web Browser")) + self.setWindowTitle(self.tr("eric5 Web Browser")) self.fromEric = fromEric self.__class__._fromEric = fromEric @@ -171,14 +171,14 @@ if self.useQtHelp: # setup the TOC widget self.__tocWindow = HelpTocWidget(self.__helpEngine, self) - self.__tocDock = QDockWidget(self.trUtf8("Contents"), self) + self.__tocDock = QDockWidget(self.tr("Contents"), self) self.__tocDock.setObjectName("TocWindow") self.__tocDock.setWidget(self.__tocWindow) self.addDockWidget(Qt.LeftDockWidgetArea, self.__tocDock) # setup the index widget self.__indexWindow = HelpIndexWidget(self.__helpEngine, self) - self.__indexDock = QDockWidget(self.trUtf8("Index"), self) + self.__indexDock = QDockWidget(self.tr("Index"), self) self.__indexDock.setObjectName("IndexWindow") self.__indexDock.setWidget(self.__indexWindow) self.addDockWidget(Qt.LeftDockWidgetArea, self.__indexDock) @@ -194,7 +194,7 @@ self.__indexingFinished) self.__searchWindow = HelpSearchWidget( self.__searchEngine, self) - self.__searchDock = QDockWidget(self.trUtf8("Search"), self) + self.__searchDock = QDockWidget(self.tr("Search"), self) self.__searchDock.setObjectName("SearchWindow") self.__searchDock.setWidget(self.__searchWindow) self.addDockWidget(Qt.LeftDockWidgetArea, self.__searchDock) @@ -421,13 +421,13 @@ self.__actions = [] self.newTabAct = E5Action( - self.trUtf8('New Tab'), + self.tr('New Tab'), UI.PixmapCache.getIcon("tabNew.png"), - self.trUtf8('&New Tab'), - QKeySequence(self.trUtf8("Ctrl+T", "File|New Tab")), + self.tr('&New Tab'), + QKeySequence(self.tr("Ctrl+T", "File|New Tab")), 0, self, 'help_file_new_tab') - self.newTabAct.setStatusTip(self.trUtf8('Open a new help window tab')) - self.newTabAct.setWhatsThis(self.trUtf8( + self.newTabAct.setStatusTip(self.tr('Open a new help window tab')) + self.newTabAct.setWhatsThis(self.tr( """<b>New Tab</b>""" """<p>This opens a new help window tab.</p>""" )) @@ -436,13 +436,13 @@ self.__actions.append(self.newTabAct) self.newAct = E5Action( - self.trUtf8('New Window'), + self.tr('New Window'), UI.PixmapCache.getIcon("newWindow.png"), - self.trUtf8('New &Window'), - QKeySequence(self.trUtf8("Ctrl+N", "File|New Window")), + self.tr('New &Window'), + QKeySequence(self.tr("Ctrl+N", "File|New Window")), 0, self, 'help_file_new_window') - self.newAct.setStatusTip(self.trUtf8('Open a new help browser window')) - self.newAct.setWhatsThis(self.trUtf8( + self.newAct.setStatusTip(self.tr('Open a new help browser window')) + self.newAct.setWhatsThis(self.tr( """<b>New Window</b>""" """<p>This opens a new help browser window.</p>""" )) @@ -451,13 +451,13 @@ self.__actions.append(self.newAct) self.openAct = E5Action( - self.trUtf8('Open File'), + self.tr('Open File'), UI.PixmapCache.getIcon("open.png"), - self.trUtf8('&Open File'), - QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), + self.tr('&Open File'), + QKeySequence(self.tr("Ctrl+O", "File|Open")), 0, self, 'help_file_open') - self.openAct.setStatusTip(self.trUtf8('Open a help file for display')) - self.openAct.setWhatsThis(self.trUtf8( + self.openAct.setStatusTip(self.tr('Open a help file for display')) + self.openAct.setWhatsThis(self.tr( """<b>Open File</b>""" """<p>This opens a new help file for display.""" """ It pops up a file selection dialog.</p>""" @@ -467,14 +467,14 @@ self.__actions.append(self.openAct) self.openTabAct = E5Action( - self.trUtf8('Open File in New Tab'), + self.tr('Open File in New Tab'), UI.PixmapCache.getIcon("openNewTab.png"), - self.trUtf8('Open File in New &Tab'), - QKeySequence(self.trUtf8("Shift+Ctrl+O", "File|Open in new tab")), + self.tr('Open File in New &Tab'), + QKeySequence(self.tr("Shift+Ctrl+O", "File|Open in new tab")), 0, self, 'help_file_open_tab') self.openTabAct.setStatusTip( - self.trUtf8('Open a help file for display in a new tab')) - self.openTabAct.setWhatsThis(self.trUtf8( + self.tr('Open a help file for display in a new tab')) + self.openTabAct.setWhatsThis(self.tr( """<b>Open File in New Tab</b>""" """<p>This opens a new help file for display in a new tab.""" """ It pops up a file selection dialog.</p>""" @@ -484,14 +484,14 @@ self.__actions.append(self.openTabAct) self.saveAsAct = E5Action( - self.trUtf8('Save As'), + self.tr('Save As'), UI.PixmapCache.getIcon("fileSaveAs.png"), - self.trUtf8('&Save As...'), - QKeySequence(self.trUtf8("Shift+Ctrl+S", "File|Save As")), + self.tr('&Save As...'), + QKeySequence(self.tr("Shift+Ctrl+S", "File|Save As")), 0, self, 'help_file_save_as') self.saveAsAct.setStatusTip( - self.trUtf8('Save the current page to disk')) - self.saveAsAct.setWhatsThis(self.trUtf8( + self.tr('Save the current page to disk')) + self.saveAsAct.setWhatsThis(self.tr( """<b>Save As...</b>""" """<p>Saves the current page to disk.</p>""" )) @@ -500,13 +500,13 @@ self.__actions.append(self.saveAsAct) self.savePageScreenAct = E5Action( - self.trUtf8('Save Page Screen'), + self.tr('Save Page Screen'), UI.PixmapCache.getIcon("fileSavePixmap.png"), - self.trUtf8('Save Page Screen...'), + self.tr('Save Page Screen...'), 0, 0, self, 'help_file_save_page_screen') self.savePageScreenAct.setStatusTip( - self.trUtf8('Save the current page as a screen shot')) - self.savePageScreenAct.setWhatsThis(self.trUtf8( + self.tr('Save the current page as a screen shot')) + self.savePageScreenAct.setWhatsThis(self.tr( """<b>Save Page Screen...</b>""" """<p>Saves the current page as a screen shot.</p>""" )) @@ -515,14 +515,14 @@ self.__actions.append(self.savePageScreenAct) self.saveVisiblePageScreenAct = E5Action( - self.trUtf8('Save Visible Page Screen'), + self.tr('Save Visible Page Screen'), UI.PixmapCache.getIcon("fileSaveVisiblePixmap.png"), - self.trUtf8('Save Visible Page Screen...'), + self.tr('Save Visible Page Screen...'), 0, 0, self, 'help_file_save_visible_page_screen') self.saveVisiblePageScreenAct.setStatusTip( - self.trUtf8('Save the visible part of the current page as a' - ' screen shot')) - self.saveVisiblePageScreenAct.setWhatsThis(self.trUtf8( + self.tr('Save the visible part of the current page as a' + ' screen shot')) + self.saveVisiblePageScreenAct.setWhatsThis(self.tr( """<b>Save Visible Page Screen...</b>""" """<p>Saves the visible part of the current page as a""" """ screen shot.</p>""" @@ -534,12 +534,12 @@ bookmarksManager = self.bookmarksManager() self.importBookmarksAct = E5Action( - self.trUtf8('Import Bookmarks'), - self.trUtf8('&Import Bookmarks...'), + self.tr('Import Bookmarks'), + self.tr('&Import Bookmarks...'), 0, 0, self, 'help_file_import_bookmarks') self.importBookmarksAct.setStatusTip( - self.trUtf8('Import bookmarks from other browsers')) - self.importBookmarksAct.setWhatsThis(self.trUtf8( + self.tr('Import bookmarks from other browsers')) + self.importBookmarksAct.setWhatsThis(self.tr( """<b>Import Bookmarks</b>""" """<p>Import bookmarks from other browsers.</p>""" )) @@ -549,12 +549,12 @@ self.__actions.append(self.importBookmarksAct) self.exportBookmarksAct = E5Action( - self.trUtf8('Export Bookmarks'), - self.trUtf8('&Export Bookmarks...'), + self.tr('Export Bookmarks'), + self.tr('&Export Bookmarks...'), 0, 0, self, 'help_file_export_bookmarks') self.exportBookmarksAct.setStatusTip( - self.trUtf8('Export the bookmarks into a file')) - self.exportBookmarksAct.setWhatsThis(self.trUtf8( + self.tr('Export the bookmarks into a file')) + self.exportBookmarksAct.setWhatsThis(self.tr( """<b>Export Bookmarks</b>""" """<p>Export the bookmarks into a file.</p>""" )) @@ -564,13 +564,13 @@ self.__actions.append(self.exportBookmarksAct) self.printAct = E5Action( - self.trUtf8('Print'), + self.tr('Print'), UI.PixmapCache.getIcon("print.png"), - self.trUtf8('&Print'), - QKeySequence(self.trUtf8("Ctrl+P", "File|Print")), + self.tr('&Print'), + QKeySequence(self.tr("Ctrl+P", "File|Print")), 0, self, 'help_file_print') - self.printAct.setStatusTip(self.trUtf8('Print the displayed help')) - self.printAct.setWhatsThis(self.trUtf8( + self.printAct.setStatusTip(self.tr('Print the displayed help')) + self.printAct.setWhatsThis(self.tr( """<b>Print</b>""" """<p>Print the displayed help text.</p>""" )) @@ -579,13 +579,13 @@ self.__actions.append(self.printAct) self.printPdfAct = E5Action( - self.trUtf8('Print as PDF'), + self.tr('Print as PDF'), UI.PixmapCache.getIcon("printPdf.png"), - self.trUtf8('Print as PDF'), + self.tr('Print as PDF'), 0, 0, self, 'help_file_print_pdf') - self.printPdfAct.setStatusTip(self.trUtf8( + self.printPdfAct.setStatusTip(self.tr( 'Print the displayed help as PDF')) - self.printPdfAct.setWhatsThis(self.trUtf8( + self.printPdfAct.setWhatsThis(self.tr( """<b>Print as PDF</b>""" """<p>Print the displayed help text as a PDF file.</p>""" )) @@ -595,13 +595,13 @@ self.__actions.append(self.printPdfAct) self.printPreviewAct = E5Action( - self.trUtf8('Print Preview'), + self.tr('Print Preview'), UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8('Print Preview'), + self.tr('Print Preview'), 0, 0, self, 'help_file_print_preview') - self.printPreviewAct.setStatusTip(self.trUtf8( + self.printPreviewAct.setStatusTip(self.tr( 'Print preview of the displayed help')) - self.printPreviewAct.setWhatsThis(self.trUtf8( + self.printPreviewAct.setWhatsThis(self.tr( """<b>Print Preview</b>""" """<p>Print preview of the displayed help text.</p>""" )) @@ -611,14 +611,14 @@ self.__actions.append(self.printPreviewAct) self.closeAct = E5Action( - self.trUtf8('Close'), + self.tr('Close'), UI.PixmapCache.getIcon("close.png"), - self.trUtf8('&Close'), - QKeySequence(self.trUtf8("Ctrl+W", "File|Close")), + self.tr('&Close'), + QKeySequence(self.tr("Ctrl+W", "File|Close")), 0, self, 'help_file_close') - self.closeAct.setStatusTip(self.trUtf8( + self.closeAct.setStatusTip(self.tr( 'Close the current help window')) - self.closeAct.setWhatsThis(self.trUtf8( + self.closeAct.setWhatsThis(self.tr( """<b>Close</b>""" """<p>Closes the current help window.</p>""" )) @@ -627,11 +627,11 @@ self.__actions.append(self.closeAct) self.closeAllAct = E5Action( - self.trUtf8('Close All'), - self.trUtf8('Close &All'), + self.tr('Close All'), + self.tr('Close &All'), 0, 0, self, 'help_file_close_all') - self.closeAllAct.setStatusTip(self.trUtf8('Close all help windows')) - self.closeAllAct.setWhatsThis(self.trUtf8( + self.closeAllAct.setStatusTip(self.tr('Close all help windows')) + self.closeAllAct.setWhatsThis(self.tr( """<b>Close All</b>""" """<p>Closes all help windows except the first one.</p>""" )) @@ -641,12 +641,12 @@ self.__actions.append(self.closeAllAct) self.privateBrowsingAct = E5Action( - self.trUtf8('Private Browsing'), + self.tr('Private Browsing'), UI.PixmapCache.getIcon("privateBrowsing.png"), - self.trUtf8('Private &Browsing'), + self.tr('Private &Browsing'), 0, 0, self, 'help_file_private_browsing') - self.privateBrowsingAct.setStatusTip(self.trUtf8('Private Browsing')) - self.privateBrowsingAct.setWhatsThis(self.trUtf8( + self.privateBrowsingAct.setStatusTip(self.tr('Private Browsing')) + self.privateBrowsingAct.setWhatsThis(self.tr( """<b>Private Browsing</b>""" """<p>Enables private browsing. In this mode no history is""" """ recorded anymore.</p>""" @@ -658,13 +658,13 @@ self.__actions.append(self.privateBrowsingAct) self.exitAct = E5Action( - self.trUtf8('Quit'), + self.tr('Quit'), UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('&Quit'), - QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit")), + self.tr('&Quit'), + QKeySequence(self.tr("Ctrl+Q", "File|Quit")), 0, self, 'help_file_quit') - self.exitAct.setStatusTip(self.trUtf8('Quit the eric5 Web Browser')) - self.exitAct.setWhatsThis(self.trUtf8( + self.exitAct.setStatusTip(self.tr('Quit the eric5 Web Browser')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit</b>""" """<p>Quit the eric5 Web Browser.</p>""" )) @@ -676,14 +676,14 @@ self.__actions.append(self.exitAct) self.backAct = E5Action( - self.trUtf8('Backward'), + self.tr('Backward'), UI.PixmapCache.getIcon("back.png"), - self.trUtf8('&Backward'), - QKeySequence(self.trUtf8("Alt+Left", "Go|Backward")), - QKeySequence(self.trUtf8("Backspace", "Go|Backward")), + self.tr('&Backward'), + QKeySequence(self.tr("Alt+Left", "Go|Backward")), + QKeySequence(self.tr("Backspace", "Go|Backward")), self, 'help_go_backward') - self.backAct.setStatusTip(self.trUtf8('Move one help screen backward')) - self.backAct.setWhatsThis(self.trUtf8( + self.backAct.setStatusTip(self.tr('Move one help screen backward')) + self.backAct.setWhatsThis(self.tr( """<b>Backward</b>""" """<p>Moves one help screen backward. If none is""" """ available, this action is disabled.</p>""" @@ -693,15 +693,15 @@ self.__actions.append(self.backAct) self.forwardAct = E5Action( - self.trUtf8('Forward'), + self.tr('Forward'), UI.PixmapCache.getIcon("forward.png"), - self.trUtf8('&Forward'), - QKeySequence(self.trUtf8("Alt+Right", "Go|Forward")), - QKeySequence(self.trUtf8("Shift+Backspace", "Go|Forward")), + self.tr('&Forward'), + QKeySequence(self.tr("Alt+Right", "Go|Forward")), + QKeySequence(self.tr("Shift+Backspace", "Go|Forward")), self, 'help_go_foreward') - self.forwardAct.setStatusTip(self.trUtf8( + self.forwardAct.setStatusTip(self.tr( 'Move one help screen forward')) - self.forwardAct.setWhatsThis(self.trUtf8( + self.forwardAct.setWhatsThis(self.tr( """<b>Forward</b>""" """<p>Moves one help screen forward. If none is""" """ available, this action is disabled.</p>""" @@ -711,14 +711,14 @@ self.__actions.append(self.forwardAct) self.homeAct = E5Action( - self.trUtf8('Home'), + self.tr('Home'), UI.PixmapCache.getIcon("home.png"), - self.trUtf8('&Home'), - QKeySequence(self.trUtf8("Ctrl+Home", "Go|Home")), + self.tr('&Home'), + QKeySequence(self.tr("Ctrl+Home", "Go|Home")), 0, self, 'help_go_home') - self.homeAct.setStatusTip(self.trUtf8( + self.homeAct.setStatusTip(self.tr( 'Move to the initial help screen')) - self.homeAct.setWhatsThis(self.trUtf8( + self.homeAct.setWhatsThis(self.tr( """<b>Home</b>""" """<p>Moves to the initial help screen.</p>""" )) @@ -727,15 +727,15 @@ self.__actions.append(self.homeAct) self.reloadAct = E5Action( - self.trUtf8('Reload'), + self.tr('Reload'), UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('&Reload'), - QKeySequence(self.trUtf8("Ctrl+R", "Go|Reload")), - QKeySequence(self.trUtf8("F5", "Go|Reload")), + self.tr('&Reload'), + QKeySequence(self.tr("Ctrl+R", "Go|Reload")), + QKeySequence(self.tr("F5", "Go|Reload")), self, 'help_go_reload') - self.reloadAct.setStatusTip(self.trUtf8( + self.reloadAct.setStatusTip(self.tr( 'Reload the current help screen')) - self.reloadAct.setWhatsThis(self.trUtf8( + self.reloadAct.setWhatsThis(self.tr( """<b>Reload</b>""" """<p>Reloads the current help screen.</p>""" )) @@ -744,14 +744,14 @@ self.__actions.append(self.reloadAct) self.stopAct = E5Action( - self.trUtf8('Stop'), + self.tr('Stop'), UI.PixmapCache.getIcon("stopLoading.png"), - self.trUtf8('&Stop'), - QKeySequence(self.trUtf8("Ctrl+.", "Go|Stop")), - QKeySequence(self.trUtf8("Esc", "Go|Stop")), + self.tr('&Stop'), + QKeySequence(self.tr("Ctrl+.", "Go|Stop")), + QKeySequence(self.tr("Esc", "Go|Stop")), self, 'help_go_stop') - self.stopAct.setStatusTip(self.trUtf8('Stop loading')) - self.stopAct.setWhatsThis(self.trUtf8( + self.stopAct.setStatusTip(self.tr('Stop loading')) + self.stopAct.setWhatsThis(self.tr( """<b>Stop</b>""" """<p>Stops loading of the current tab.</p>""" )) @@ -760,13 +760,13 @@ self.__actions.append(self.stopAct) self.copyAct = E5Action( - self.trUtf8('Copy'), + self.tr('Copy'), UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), - QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), + self.tr('&Copy'), + QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), 0, self, 'help_edit_copy') - self.copyAct.setStatusTip(self.trUtf8('Copy the selected text')) - self.copyAct.setWhatsThis(self.trUtf8( + self.copyAct.setStatusTip(self.tr('Copy the selected text')) + self.copyAct.setWhatsThis(self.tr( """<b>Copy</b>""" """<p>Copy the selected text to the clipboard.</p>""" )) @@ -775,13 +775,13 @@ self.__actions.append(self.copyAct) self.findAct = E5Action( - self.trUtf8('Find...'), + self.tr('Find...'), UI.PixmapCache.getIcon("find.png"), - self.trUtf8('&Find...'), - QKeySequence(self.trUtf8("Ctrl+F", "Edit|Find")), + self.tr('&Find...'), + QKeySequence(self.tr("Ctrl+F", "Edit|Find")), 0, self, 'help_edit_find') - self.findAct.setStatusTip(self.trUtf8('Find text in page')) - self.findAct.setWhatsThis(self.trUtf8( + self.findAct.setStatusTip(self.tr('Find text in page')) + self.findAct.setWhatsThis(self.tr( """<b>Find</b>""" """<p>Find text in the current page.</p>""" )) @@ -790,14 +790,14 @@ self.__actions.append(self.findAct) self.findNextAct = E5Action( - self.trUtf8('Find next'), + self.tr('Find next'), UI.PixmapCache.getIcon("findNext.png"), - self.trUtf8('Find &next'), - QKeySequence(self.trUtf8("F3", "Edit|Find next")), + self.tr('Find &next'), + QKeySequence(self.tr("F3", "Edit|Find next")), 0, self, 'help_edit_find_next') - self.findNextAct.setStatusTip(self.trUtf8( + self.findNextAct.setStatusTip(self.tr( 'Find next occurrence of text in page')) - self.findNextAct.setWhatsThis(self.trUtf8( + self.findNextAct.setWhatsThis(self.tr( """<b>Find next</b>""" """<p>Find the next occurrence of text in the current page.</p>""" )) @@ -806,14 +806,14 @@ self.__actions.append(self.findNextAct) self.findPrevAct = E5Action( - self.trUtf8('Find previous'), + self.tr('Find previous'), UI.PixmapCache.getIcon("findPrev.png"), - self.trUtf8('Find &previous'), - QKeySequence(self.trUtf8("Shift+F3", "Edit|Find previous")), + self.tr('Find &previous'), + QKeySequence(self.tr("Shift+F3", "Edit|Find previous")), 0, self, 'help_edit_find_previous') self.findPrevAct.setStatusTip( - self.trUtf8('Find previous occurrence of text in page')) - self.findPrevAct.setWhatsThis(self.trUtf8( + self.tr('Find previous occurrence of text in page')) + self.findPrevAct.setWhatsThis(self.tr( """<b>Find previous</b>""" """<p>Find the previous occurrence of text in the current""" """ page.</p>""" @@ -823,13 +823,13 @@ self.__actions.append(self.findPrevAct) self.bookmarksManageAct = E5Action( - self.trUtf8('Manage Bookmarks'), - self.trUtf8('&Manage Bookmarks...'), - QKeySequence(self.trUtf8("Ctrl+Shift+B", "Help|Manage bookmarks")), + self.tr('Manage Bookmarks'), + self.tr('&Manage Bookmarks...'), + QKeySequence(self.tr("Ctrl+Shift+B", "Help|Manage bookmarks")), 0, self, 'help_bookmarks_manage') - self.bookmarksManageAct.setStatusTip(self.trUtf8( + self.bookmarksManageAct.setStatusTip(self.tr( 'Open a dialog to manage the bookmarks.')) - self.bookmarksManageAct.setWhatsThis(self.trUtf8( + self.bookmarksManageAct.setWhatsThis(self.tr( """<b>Manage Bookmarks...</b>""" """<p>Open a dialog to manage the bookmarks.</p>""" )) @@ -839,15 +839,15 @@ self.__actions.append(self.bookmarksManageAct) self.bookmarksAddAct = E5Action( - self.trUtf8('Add Bookmark'), + self.tr('Add Bookmark'), UI.PixmapCache.getIcon("addBookmark.png"), - self.trUtf8('Add &Bookmark...'), - QKeySequence(self.trUtf8("Ctrl+D", "Help|Add bookmark")), + self.tr('Add &Bookmark...'), + QKeySequence(self.tr("Ctrl+D", "Help|Add bookmark")), 0, self, 'help_bookmark_add') self.bookmarksAddAct.setIconVisibleInMenu(False) - self.bookmarksAddAct.setStatusTip(self.trUtf8( + self.bookmarksAddAct.setStatusTip(self.tr( 'Open a dialog to add a bookmark.')) - self.bookmarksAddAct.setWhatsThis(self.trUtf8( + self.bookmarksAddAct.setWhatsThis(self.tr( """<b>Add Bookmark</b>""" """<p>Open a dialog to add the current URL as a bookmark.</p>""" )) @@ -856,12 +856,12 @@ self.__actions.append(self.bookmarksAddAct) self.bookmarksAddFolderAct = E5Action( - self.trUtf8('Add Folder'), - self.trUtf8('Add &Folder...'), + self.tr('Add Folder'), + self.tr('Add &Folder...'), 0, 0, self, 'help_bookmark_show_all') - self.bookmarksAddFolderAct.setStatusTip(self.trUtf8( + self.bookmarksAddFolderAct.setStatusTip(self.tr( 'Open a dialog to add a new bookmarks folder.')) - self.bookmarksAddFolderAct.setWhatsThis(self.trUtf8( + self.bookmarksAddFolderAct.setWhatsThis(self.tr( """<b>Add Folder...</b>""" """<p>Open a dialog to add a new bookmarks folder.</p>""" )) @@ -871,12 +871,12 @@ self.__actions.append(self.bookmarksAddFolderAct) self.bookmarksAllTabsAct = E5Action( - self.trUtf8('Bookmark All Tabs'), - self.trUtf8('Bookmark All Tabs...'), + self.tr('Bookmark All Tabs'), + self.tr('Bookmark All Tabs...'), 0, 0, self, 'help_bookmark_all_tabs') - self.bookmarksAllTabsAct.setStatusTip(self.trUtf8( + self.bookmarksAllTabsAct.setStatusTip(self.tr( 'Bookmark all open tabs.')) - self.bookmarksAllTabsAct.setWhatsThis(self.trUtf8( + self.bookmarksAllTabsAct.setWhatsThis(self.tr( """<b>Bookmark All Tabs...</b>""" """<p>Open a dialog to add a new bookmarks folder for""" """ all open tabs.</p>""" @@ -886,13 +886,13 @@ self.__actions.append(self.bookmarksAllTabsAct) self.whatsThisAct = E5Action( - self.trUtf8('What\'s This?'), + self.tr('What\'s This?'), UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), - QKeySequence(self.trUtf8("Shift+F1", "Help|What's This?'")), + self.tr('&What\'s This?'), + QKeySequence(self.tr("Shift+F1", "Help|What's This?'")), 0, self, 'help_help_whats_this') - self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) - self.whatsThisAct.setWhatsThis(self.trUtf8( + self.whatsThisAct.setStatusTip(self.tr('Context sensitive help')) + self.whatsThisAct.setWhatsThis(self.tr( """<b>Display context sensitive help</b>""" """<p>In What's This? mode, the mouse cursor shows an arrow""" """ with a question mark, and you can click on the interface""" @@ -905,12 +905,12 @@ self.__actions.append(self.whatsThisAct) self.aboutAct = E5Action( - self.trUtf8('About'), - self.trUtf8('&About'), + self.tr('About'), + self.tr('&About'), 0, 0, self, 'help_help_about') - self.aboutAct.setStatusTip(self.trUtf8( + self.aboutAct.setStatusTip(self.tr( 'Display information about this software')) - self.aboutAct.setWhatsThis(self.trUtf8( + self.aboutAct.setWhatsThis(self.tr( """<b>About</b>""" """<p>Display some information about this software.</p>""" )) @@ -919,12 +919,12 @@ self.__actions.append(self.aboutAct) self.aboutQtAct = E5Action( - self.trUtf8('About Qt'), - self.trUtf8('About &Qt'), + self.tr('About Qt'), + self.tr('About &Qt'), 0, 0, self, 'help_help_about_qt') self.aboutQtAct.setStatusTip( - self.trUtf8('Display information about the Qt toolkit')) - self.aboutQtAct.setWhatsThis(self.trUtf8( + self.tr('Display information about the Qt toolkit')) + self.aboutQtAct.setWhatsThis(self.tr( """<b>About Qt</b>""" """<p>Display some information about the Qt toolkit.</p>""" )) @@ -933,14 +933,14 @@ self.__actions.append(self.aboutQtAct) self.zoomInAct = E5Action( - self.trUtf8('Zoom in'), + self.tr('Zoom in'), UI.PixmapCache.getIcon("zoomIn.png"), - self.trUtf8('Zoom &in'), - QKeySequence(self.trUtf8("Ctrl++", "View|Zoom in")), - QKeySequence(self.trUtf8("Zoom In", "View|Zoom in")), + self.tr('Zoom &in'), + QKeySequence(self.tr("Ctrl++", "View|Zoom in")), + QKeySequence(self.tr("Zoom In", "View|Zoom in")), self, 'help_view_zoom_in') - self.zoomInAct.setStatusTip(self.trUtf8('Zoom in on the text')) - self.zoomInAct.setWhatsThis(self.trUtf8( + self.zoomInAct.setStatusTip(self.tr('Zoom in on the text')) + self.zoomInAct.setWhatsThis(self.tr( """<b>Zoom in</b>""" """<p>Zoom in on the text. This makes the text bigger.</p>""" )) @@ -949,14 +949,14 @@ self.__actions.append(self.zoomInAct) self.zoomOutAct = E5Action( - self.trUtf8('Zoom out'), + self.tr('Zoom out'), UI.PixmapCache.getIcon("zoomOut.png"), - self.trUtf8('Zoom &out'), - QKeySequence(self.trUtf8("Ctrl+-", "View|Zoom out")), - QKeySequence(self.trUtf8("Zoom Out", "View|Zoom out")), + self.tr('Zoom &out'), + QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), + QKeySequence(self.tr("Zoom Out", "View|Zoom out")), self, 'help_view_zoom_out') - self.zoomOutAct.setStatusTip(self.trUtf8('Zoom out on the text')) - self.zoomOutAct.setWhatsThis(self.trUtf8( + self.zoomOutAct.setStatusTip(self.tr('Zoom out on the text')) + self.zoomOutAct.setWhatsThis(self.tr( """<b>Zoom out</b>""" """<p>Zoom out on the text. This makes the text smaller.</p>""" )) @@ -965,14 +965,14 @@ self.__actions.append(self.zoomOutAct) self.zoomResetAct = E5Action( - self.trUtf8('Zoom reset'), + self.tr('Zoom reset'), UI.PixmapCache.getIcon("zoomReset.png"), - self.trUtf8('Zoom &reset'), - QKeySequence(self.trUtf8("Ctrl+0", "View|Zoom reset")), + self.tr('Zoom &reset'), + QKeySequence(self.tr("Ctrl+0", "View|Zoom reset")), 0, self, 'help_view_zoom_reset') - self.zoomResetAct.setStatusTip(self.trUtf8( + self.zoomResetAct.setStatusTip(self.tr( 'Reset the zoom of the text')) - self.zoomResetAct.setWhatsThis(self.trUtf8( + self.zoomResetAct.setWhatsThis(self.tr( """<b>Zoom reset</b>""" """<p>Reset the zoom of the text. """ """This sets the zoom factor to 100%.</p>""" @@ -983,13 +983,13 @@ if hasattr(QWebSettings, 'ZoomTextOnly'): self.zoomTextOnlyAct = E5Action( - self.trUtf8('Zoom text only'), - self.trUtf8('Zoom &text only'), + self.tr('Zoom text only'), + self.tr('Zoom &text only'), 0, 0, self, 'help_view_zoom_text_only') self.zoomTextOnlyAct.setCheckable(True) - self.zoomTextOnlyAct.setStatusTip(self.trUtf8( + self.zoomTextOnlyAct.setStatusTip(self.tr( 'Zoom text only; pictures remain constant')) - self.zoomTextOnlyAct.setWhatsThis(self.trUtf8( + self.zoomTextOnlyAct.setWhatsThis(self.tr( """<b>Zoom text only</b>""" """<p>Zoom text only; pictures remain constant.</p>""" )) @@ -1001,13 +1001,13 @@ self.zoomTextOnlyAct = None self.pageSourceAct = E5Action( - self.trUtf8('Show page source'), - self.trUtf8('Show page source'), - QKeySequence(self.trUtf8('Ctrl+U')), 0, + self.tr('Show page source'), + self.tr('Show page source'), + QKeySequence(self.tr('Ctrl+U')), 0, self, 'help_show_page_source') - self.pageSourceAct.setStatusTip(self.trUtf8( + self.pageSourceAct.setStatusTip(self.tr( 'Show the page source in an editor')) - self.pageSourceAct.setWhatsThis(self.trUtf8( + self.pageSourceAct.setWhatsThis(self.tr( """<b>Show page source</b>""" """<p>Show the page source in an editor.</p>""" )) @@ -1017,10 +1017,10 @@ self.addAction(self.pageSourceAct) self.fullScreenAct = E5Action( - self.trUtf8('Full Screen'), + self.tr('Full Screen'), UI.PixmapCache.getIcon("windowFullscreen.png"), - self.trUtf8('&Full Screen'), - QKeySequence(self.trUtf8('F11')), 0, + self.tr('&Full Screen'), + QKeySequence(self.tr('F11')), 0, self, 'help_view_full_scree') if not self.initShortcutsOnly: self.fullScreenAct.triggered[()].connect(self.__viewFullScreen) @@ -1028,9 +1028,9 @@ self.addAction(self.fullScreenAct) self.nextTabAct = E5Action( - self.trUtf8('Show next tab'), - self.trUtf8('Show next tab'), - QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, + self.tr('Show next tab'), + self.tr('Show next tab'), + QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, self, 'help_view_next_tab') if not self.initShortcutsOnly: self.nextTabAct.triggered[()].connect(self.__nextTab) @@ -1038,9 +1038,9 @@ self.addAction(self.nextTabAct) self.prevTabAct = E5Action( - self.trUtf8('Show previous tab'), - self.trUtf8('Show previous tab'), - QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, + self.tr('Show previous tab'), + self.tr('Show previous tab'), + QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, self, 'help_view_previous_tab') if not self.initShortcutsOnly: self.prevTabAct.triggered[()].connect(self.__prevTab) @@ -1048,9 +1048,9 @@ self.addAction(self.prevTabAct) self.switchTabAct = E5Action( - self.trUtf8('Switch between tabs'), - self.trUtf8('Switch between tabs'), - QKeySequence(self.trUtf8('Ctrl+1')), 0, + self.tr('Switch between tabs'), + self.tr('Switch between tabs'), + QKeySequence(self.tr('Ctrl+1')), 0, self, 'help_switch_tabs') if not self.initShortcutsOnly: self.switchTabAct.triggered[()].connect(self.__switchTab) @@ -1058,12 +1058,12 @@ self.addAction(self.switchTabAct) self.prefAct = E5Action( - self.trUtf8('Preferences'), + self.tr('Preferences'), UI.PixmapCache.getIcon("configure.png"), - self.trUtf8('&Preferences...'), 0, 0, self, 'help_preferences') - self.prefAct.setStatusTip(self.trUtf8( + self.tr('&Preferences...'), 0, 0, self, 'help_preferences') + self.prefAct.setStatusTip(self.tr( 'Set the prefered configuration')) - self.prefAct.setWhatsThis(self.trUtf8( + self.prefAct.setWhatsThis(self.tr( """<b>Preferences</b>""" """<p>Set the configuration items of the application""" """ with your prefered values.</p>""" @@ -1073,13 +1073,13 @@ self.__actions.append(self.prefAct) self.acceptedLanguagesAct = E5Action( - self.trUtf8('Languages'), + self.tr('Languages'), UI.PixmapCache.getIcon("flag.png"), - self.trUtf8('&Languages...'), 0, 0, + self.tr('&Languages...'), 0, 0, self, 'help_accepted_languages') - self.acceptedLanguagesAct.setStatusTip(self.trUtf8( + self.acceptedLanguagesAct.setStatusTip(self.tr( 'Configure the accepted languages for web pages')) - self.acceptedLanguagesAct.setWhatsThis(self.trUtf8( + self.acceptedLanguagesAct.setWhatsThis(self.tr( """<b>Languages</b>""" """<p>Configure the accepted languages for web pages.</p>""" )) @@ -1089,12 +1089,12 @@ self.__actions.append(self.acceptedLanguagesAct) self.cookiesAct = E5Action( - self.trUtf8('Cookies'), + self.tr('Cookies'), UI.PixmapCache.getIcon("cookie.png"), - self.trUtf8('C&ookies...'), 0, 0, self, 'help_cookies') - self.cookiesAct.setStatusTip(self.trUtf8( + self.tr('C&ookies...'), 0, 0, self, 'help_cookies') + self.cookiesAct.setStatusTip(self.tr( 'Configure cookies handling')) - self.cookiesAct.setWhatsThis(self.trUtf8( + self.cookiesAct.setWhatsThis(self.tr( """<b>Cookies</b>""" """<p>Configure cookies handling.</p>""" )) @@ -1104,13 +1104,13 @@ self.__actions.append(self.cookiesAct) self.offlineStorageAct = E5Action( - self.trUtf8('Offline Storage'), + self.tr('Offline Storage'), UI.PixmapCache.getIcon("preferences-html5.png"), - self.trUtf8('Offline &Storage...'), 0, 0, + self.tr('Offline &Storage...'), 0, 0, self, 'help_offline_storage') - self.offlineStorageAct.setStatusTip(self.trUtf8( + self.offlineStorageAct.setStatusTip(self.tr( 'Configure offline storage')) - self.offlineStorageAct.setWhatsThis(self.trUtf8( + self.offlineStorageAct.setWhatsThis(self.tr( """<b>Offline Storage</b>""" """<p>Opens a dialog to configure offline storage.</p>""" )) @@ -1120,14 +1120,14 @@ self.__actions.append(self.offlineStorageAct) self.personalDataAct = E5Action( - self.trUtf8('Personal Information'), + self.tr('Personal Information'), UI.PixmapCache.getIcon("pim.png"), - self.trUtf8('Personal Information...'), + self.tr('Personal Information...'), 0, 0, self, 'help_personal_information') - self.personalDataAct.setStatusTip(self.trUtf8( + self.personalDataAct.setStatusTip(self.tr( 'Configure personal information for completing form fields')) - self.personalDataAct.setWhatsThis(self.trUtf8( + self.personalDataAct.setWhatsThis(self.tr( """<b>Personal Information...</b>""" """<p>Opens a dialog to configure the personal information""" """ used for completing form fields.</p>""" @@ -1138,14 +1138,14 @@ self.__actions.append(self.personalDataAct) self.greaseMonkeyAct = E5Action( - self.trUtf8('GreaseMonkey Scripts'), + self.tr('GreaseMonkey Scripts'), UI.PixmapCache.getIcon("greaseMonkey.png"), - self.trUtf8('GreaseMonkey Scripts...'), + self.tr('GreaseMonkey Scripts...'), 0, 0, self, 'help_greasemonkey') - self.greaseMonkeyAct.setStatusTip(self.trUtf8( + self.greaseMonkeyAct.setStatusTip(self.tr( 'Configure the GreaseMonkey Scripts')) - self.greaseMonkeyAct.setWhatsThis(self.trUtf8( + self.greaseMonkeyAct.setWhatsThis(self.tr( """<b>GreaseMonkey Scripts...</b>""" """<p>Opens a dialog to configure the available GreaseMonkey""" """ Scripts.</p>""" @@ -1156,13 +1156,13 @@ self.__actions.append(self.greaseMonkeyAct) self.editMessageFilterAct = E5Action( - self.trUtf8('Edit Message Filters'), + self.tr('Edit Message Filters'), UI.PixmapCache.getIcon("warning.png"), - self.trUtf8('Edit Message Filters...'), 0, 0, self, + self.tr('Edit Message Filters...'), 0, 0, self, 'help_manage_message_filters') - self.editMessageFilterAct.setStatusTip(self.trUtf8( + self.editMessageFilterAct.setStatusTip(self.tr( 'Edit the message filters used to suppress unwanted messages')) - self.editMessageFilterAct.setWhatsThis(self.trUtf8( + self.editMessageFilterAct.setWhatsThis(self.tr( """<b>Edit Message Filters</b>""" """<p>Opens a dialog to edit the message filters used to""" """ suppress unwanted messages been shown in an error""" @@ -1175,13 +1175,13 @@ if self.useQtHelp or self.initShortcutsOnly: self.syncTocAct = E5Action( - self.trUtf8('Sync with Table of Contents'), + self.tr('Sync with Table of Contents'), UI.PixmapCache.getIcon("syncToc.png"), - self.trUtf8('Sync with Table of Contents'), + self.tr('Sync with Table of Contents'), 0, 0, self, 'help_sync_toc') - self.syncTocAct.setStatusTip(self.trUtf8( + self.syncTocAct.setStatusTip(self.tr( 'Synchronizes the table of contents with current page')) - self.syncTocAct.setWhatsThis(self.trUtf8( + self.syncTocAct.setWhatsThis(self.tr( """<b>Sync with Table of Contents</b>""" """<p>Synchronizes the table of contents with current""" """ page.</p>""" @@ -1191,12 +1191,12 @@ self.__actions.append(self.syncTocAct) self.showTocAct = E5Action( - self.trUtf8('Table of Contents'), - self.trUtf8('Table of Contents'), + self.tr('Table of Contents'), + self.tr('Table of Contents'), 0, 0, self, 'help_show_toc') - self.showTocAct.setStatusTip(self.trUtf8( + self.showTocAct.setStatusTip(self.tr( 'Shows the table of contents window')) - self.showTocAct.setWhatsThis(self.trUtf8( + self.showTocAct.setWhatsThis(self.tr( """<b>Table of Contents</b>""" """<p>Shows the table of contents window.</p>""" )) @@ -1205,12 +1205,12 @@ self.__actions.append(self.showTocAct) self.showIndexAct = E5Action( - self.trUtf8('Index'), - self.trUtf8('Index'), + self.tr('Index'), + self.tr('Index'), 0, 0, self, 'help_show_index') - self.showIndexAct.setStatusTip(self.trUtf8( + self.showIndexAct.setStatusTip(self.tr( 'Shows the index window')) - self.showIndexAct.setWhatsThis(self.trUtf8( + self.showIndexAct.setWhatsThis(self.tr( """<b>Index</b>""" """<p>Shows the index window.</p>""" )) @@ -1219,12 +1219,12 @@ self.__actions.append(self.showIndexAct) self.showSearchAct = E5Action( - self.trUtf8('Search'), - self.trUtf8('Search'), + self.tr('Search'), + self.tr('Search'), 0, 0, self, 'help_show_search') - self.showSearchAct.setStatusTip(self.trUtf8( + self.showSearchAct.setStatusTip(self.tr( 'Shows the search window')) - self.showSearchAct.setWhatsThis(self.trUtf8( + self.showSearchAct.setWhatsThis(self.tr( """<b>Search</b>""" """<p>Shows the search window.</p>""" )) @@ -1234,12 +1234,12 @@ self.__actions.append(self.showSearchAct) self.manageQtHelpDocsAct = E5Action( - self.trUtf8('Manage QtHelp Documents'), - self.trUtf8('Manage QtHelp &Documents'), + self.tr('Manage QtHelp Documents'), + self.tr('Manage QtHelp &Documents'), 0, 0, self, 'help_qthelp_documents') - self.manageQtHelpDocsAct.setStatusTip(self.trUtf8( + self.manageQtHelpDocsAct.setStatusTip(self.tr( 'Shows a dialog to manage the QtHelp documentation set')) - self.manageQtHelpDocsAct.setWhatsThis(self.trUtf8( + self.manageQtHelpDocsAct.setWhatsThis(self.tr( """<b>Manage QtHelp Documents</b>""" """<p>Shows a dialog to manage the QtHelp documentation""" """ set.</p>""" @@ -1250,12 +1250,12 @@ self.__actions.append(self.manageQtHelpDocsAct) self.manageQtHelpFiltersAct = E5Action( - self.trUtf8('Manage QtHelp Filters'), - self.trUtf8('Manage QtHelp &Filters'), + self.tr('Manage QtHelp Filters'), + self.tr('Manage QtHelp &Filters'), 0, 0, self, 'help_qthelp_filters') - self.manageQtHelpFiltersAct.setStatusTip(self.trUtf8( + self.manageQtHelpFiltersAct.setStatusTip(self.tr( 'Shows a dialog to manage the QtHelp filters')) - self.manageQtHelpFiltersAct.setWhatsThis(self.trUtf8( + self.manageQtHelpFiltersAct.setWhatsThis(self.tr( """<b>Manage QtHelp Filters</b>""" """<p>Shows a dialog to manage the QtHelp filters.</p>""" )) @@ -1265,12 +1265,12 @@ self.__actions.append(self.manageQtHelpFiltersAct) self.reindexDocumentationAct = E5Action( - self.trUtf8('Reindex Documentation'), - self.trUtf8('&Reindex Documentation'), + self.tr('Reindex Documentation'), + self.tr('&Reindex Documentation'), 0, 0, self, 'help_qthelp_reindex') - self.reindexDocumentationAct.setStatusTip(self.trUtf8( + self.reindexDocumentationAct.setStatusTip(self.tr( 'Reindexes the documentation set')) - self.reindexDocumentationAct.setWhatsThis(self.trUtf8( + self.reindexDocumentationAct.setWhatsThis(self.tr( """<b>Reindex Documentation</b>""" """<p>Reindexes the documentation set.</p>""" )) @@ -1280,13 +1280,13 @@ self.__actions.append(self.reindexDocumentationAct) self.clearPrivateDataAct = E5Action( - self.trUtf8('Clear private data'), - self.trUtf8('&Clear private data'), + self.tr('Clear private data'), + self.tr('&Clear private data'), 0, 0, self, 'help_clear_private_data') - self.clearPrivateDataAct.setStatusTip(self.trUtf8( + self.clearPrivateDataAct.setStatusTip(self.tr( 'Clear private data')) - self.clearPrivateDataAct.setWhatsThis(self.trUtf8( + self.clearPrivateDataAct.setWhatsThis(self.tr( """<b>Clear private data</b>""" """<p>Clears the private data like browsing history, search""" """ history or the favicons database.</p>""" @@ -1297,13 +1297,13 @@ self.__actions.append(self.clearPrivateDataAct) self.clearIconsAct = E5Action( - self.trUtf8('Clear icons database'), - self.trUtf8('Clear &icons database'), + self.tr('Clear icons database'), + self.tr('Clear &icons database'), 0, 0, self, 'help_clear_icons_db') - self.clearIconsAct.setStatusTip(self.trUtf8( + self.clearIconsAct.setStatusTip(self.tr( 'Clear the database of favicons')) - self.clearIconsAct.setWhatsThis(self.trUtf8( + self.clearIconsAct.setWhatsThis(self.tr( """<b>Clear icons database</b>""" """<p>Clears the database of favicons of previously visited""" """ URLs.</p>""" @@ -1313,13 +1313,13 @@ self.__actions.append(self.clearIconsAct) self.searchEnginesAct = E5Action( - self.trUtf8('Configure Search Engines'), - self.trUtf8('Configure Search &Engines...'), + self.tr('Configure Search Engines'), + self.tr('Configure Search &Engines...'), 0, 0, self, 'help_search_engines') - self.searchEnginesAct.setStatusTip(self.trUtf8( + self.searchEnginesAct.setStatusTip(self.tr( 'Configure the available search engines')) - self.searchEnginesAct.setWhatsThis(self.trUtf8( + self.searchEnginesAct.setWhatsThis(self.tr( """<b>Configure Search Engines...</b>""" """<p>Opens a dialog to configure the available search""" """ engines.</p>""" @@ -1330,14 +1330,14 @@ self.__actions.append(self.searchEnginesAct) self.passwordsAct = E5Action( - self.trUtf8('Manage Saved Passwords'), + self.tr('Manage Saved Passwords'), UI.PixmapCache.getIcon("passwords.png"), - self.trUtf8('Manage Saved Passwords...'), + self.tr('Manage Saved Passwords...'), 0, 0, self, 'help_manage_passwords') - self.passwordsAct.setStatusTip(self.trUtf8( + self.passwordsAct.setStatusTip(self.tr( 'Manage the saved passwords')) - self.passwordsAct.setWhatsThis(self.trUtf8( + self.passwordsAct.setWhatsThis(self.tr( """<b>Manage Saved Passwords...</b>""" """<p>Opens a dialog to manage the saved passwords.</p>""" )) @@ -1346,14 +1346,14 @@ self.__actions.append(self.passwordsAct) self.adblockAct = E5Action( - self.trUtf8('Ad Block'), + self.tr('Ad Block'), UI.PixmapCache.getIcon("adBlockPlus.png"), - self.trUtf8('&Ad Block...'), + self.tr('&Ad Block...'), 0, 0, self, 'help_adblock') - self.adblockAct.setStatusTip(self.trUtf8( + self.adblockAct.setStatusTip(self.tr( 'Configure AdBlock subscriptions and rules')) - self.adblockAct.setWhatsThis(self.trUtf8( + self.adblockAct.setWhatsThis(self.tr( """<b>Ad Block...</b>""" """<p>Opens a dialog to configure AdBlock subscriptions and""" """ rules.</p>""" @@ -1363,14 +1363,14 @@ self.__actions.append(self.adblockAct) self.flashblockAct = E5Action( - self.trUtf8('ClickToFlash'), + self.tr('ClickToFlash'), UI.PixmapCache.getIcon("flashBlock.png"), - self.trUtf8('&ClickToFlash...'), + self.tr('&ClickToFlash...'), 0, 0, self, 'help_flashblock') - self.flashblockAct.setStatusTip(self.trUtf8( + self.flashblockAct.setStatusTip(self.tr( 'Configure ClickToFlash whitelist')) - self.flashblockAct.setWhatsThis(self.trUtf8( + self.flashblockAct.setWhatsThis(self.tr( """<b>ClickToFlash...</b>""" """<p>Opens a dialog to configure the ClickToFlash""" """ whitelist.</p>""" @@ -1382,14 +1382,14 @@ if SSL_AVAILABLE: self.certificatesAct = E5Action( - self.trUtf8('Manage SSL Certificates'), + self.tr('Manage SSL Certificates'), UI.PixmapCache.getIcon("certificates.png"), - self.trUtf8('Manage SSL Certificates...'), + self.tr('Manage SSL Certificates...'), 0, 0, self, 'help_manage_certificates') - self.certificatesAct.setStatusTip(self.trUtf8( + self.certificatesAct.setStatusTip(self.tr( 'Manage the saved SSL certificates')) - self.certificatesAct.setWhatsThis(self.trUtf8( + self.certificatesAct.setWhatsThis(self.tr( """<b>Manage SSL Certificates...</b>""" """<p>Opens a dialog to manage the saved SSL""" """ certificates.</p>""" @@ -1400,13 +1400,13 @@ self.__actions.append(self.certificatesAct) self.toolsMonitorAct = E5Action( - self.trUtf8('Network Monitor'), - self.trUtf8('&Network Monitor...'), + self.tr('Network Monitor'), + self.tr('&Network Monitor...'), 0, 0, self, 'help_tools_network_monitor') - self.toolsMonitorAct.setStatusTip(self.trUtf8( + self.toolsMonitorAct.setStatusTip(self.tr( 'Show the network monitor dialog')) - self.toolsMonitorAct.setWhatsThis(self.trUtf8( + self.toolsMonitorAct.setWhatsThis(self.tr( """<b>Network Monitor...</b>""" """<p>Shows the network monitor dialog.</p>""" )) @@ -1416,12 +1416,12 @@ self.__actions.append(self.toolsMonitorAct) self.showDownloadManagerAct = E5Action( - self.trUtf8('Downloads'), - self.trUtf8('Downloads'), + self.tr('Downloads'), + self.tr('Downloads'), 0, 0, self, 'help_show_downloads') - self.showDownloadManagerAct.setStatusTip(self.trUtf8( + self.showDownloadManagerAct.setStatusTip(self.tr( 'Shows the downloads window')) - self.showDownloadManagerAct.setWhatsThis(self.trUtf8( + self.showDownloadManagerAct.setWhatsThis(self.tr( """<b>Downloads</b>""" """<p>Shows the downloads window.</p>""" )) @@ -1431,14 +1431,14 @@ self.__actions.append(self.showDownloadManagerAct) self.feedsManagerAct = E5Action( - self.trUtf8('RSS Feeds Dialog'), + self.tr('RSS Feeds Dialog'), UI.PixmapCache.getIcon("rss22.png"), - self.trUtf8('&RSS Feeds Dialog...'), - QKeySequence(self.trUtf8("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), + self.tr('&RSS Feeds Dialog...'), + QKeySequence(self.tr("Ctrl+Shift+F", "Help|RSS Feeds Dialog")), 0, self, 'help_rss_feeds') - self.feedsManagerAct.setStatusTip(self.trUtf8( + self.feedsManagerAct.setStatusTip(self.tr( 'Open a dialog showing the configured RSS feeds.')) - self.feedsManagerAct.setWhatsThis(self.trUtf8( + self.feedsManagerAct.setWhatsThis(self.tr( """<b>RSS Feeds Dialog...</b>""" """<p>Open a dialog to show the configured RSS feeds.""" """ It can be used to mange the feeds and to show their""" @@ -1449,14 +1449,14 @@ self.__actions.append(self.feedsManagerAct) self.siteInfoAct = E5Action( - self.trUtf8('Siteinfo Dialog'), + self.tr('Siteinfo Dialog'), UI.PixmapCache.getIcon("helpAbout.png"), - self.trUtf8('&Siteinfo Dialog...'), - QKeySequence(self.trUtf8("Ctrl+Shift+I", "Help|Siteinfo Dialog")), + self.tr('&Siteinfo Dialog...'), + QKeySequence(self.tr("Ctrl+Shift+I", "Help|Siteinfo Dialog")), 0, self, 'help_siteinfo') - self.siteInfoAct.setStatusTip(self.trUtf8( + self.siteInfoAct.setStatusTip(self.tr( 'Open a dialog showing some information about the current site.')) - self.siteInfoAct.setWhatsThis(self.trUtf8( + self.siteInfoAct.setWhatsThis(self.tr( """<b>Siteinfo Dialog...</b>""" """<p>Opens a dialog showing some information about the current""" """ site.</p>""" @@ -1466,12 +1466,12 @@ self.__actions.append(self.siteInfoAct) self.userAgentManagerAct = E5Action( - self.trUtf8('Manage User Agent Settings'), - self.trUtf8('Manage &User Agent Settings'), + self.tr('Manage User Agent Settings'), + self.tr('Manage &User Agent Settings'), 0, 0, self, 'help_user_agent_settings') - self.userAgentManagerAct.setStatusTip(self.trUtf8( + self.userAgentManagerAct.setStatusTip(self.tr( 'Shows a dialog to manage the User Agent settings')) - self.userAgentManagerAct.setWhatsThis(self.trUtf8( + self.userAgentManagerAct.setWhatsThis(self.tr( """<b>Manage User Agent Settings</b>""" """<p>Shows a dialog to manage the User Agent settings.</p>""" )) @@ -1481,13 +1481,13 @@ self.__actions.append(self.userAgentManagerAct) self.synchronizationAct = E5Action( - self.trUtf8('Synchronize data'), + self.tr('Synchronize data'), UI.PixmapCache.getIcon("sync.png"), - self.trUtf8('&Synchronize Data...'), + self.tr('&Synchronize Data...'), 0, 0, self, 'help_synchronize_data') - self.synchronizationAct.setStatusTip(self.trUtf8( + self.synchronizationAct.setStatusTip(self.tr( 'Shows a dialog to synchronize data via the network')) - self.synchronizationAct.setWhatsThis(self.trUtf8( + self.synchronizationAct.setWhatsThis(self.tr( """<b>Synchronize Data...</b>""" """<p>This shows a dialog to synchronize data via the""" """ network.</p>""" @@ -1517,7 +1517,7 @@ """ mb = self.menuBar() - menu = mb.addMenu(self.trUtf8('&File')) + menu = mb.addMenu(self.tr('&File')) menu.setTearOffEnabled(True) menu.addAction(self.newTabAct) menu.addAction(self.newAct) @@ -1539,7 +1539,7 @@ menu.addSeparator() menu.addAction(self.exitAct) - menu = mb.addMenu(self.trUtf8('&Edit')) + menu = mb.addMenu(self.tr('&Edit')) menu.setTearOffEnabled(True) menu.addAction(self.copyAct) menu.addSeparator() @@ -1547,7 +1547,7 @@ menu.addAction(self.findNextAct) menu.addAction(self.findPrevAct) - menu = mb.addMenu(self.trUtf8('&View')) + menu = mb.addMenu(self.tr('&View')) menu.setTearOffEnabled(True) menu.addAction(self.zoomInAct) menu.addAction(self.zoomResetAct) @@ -1559,12 +1559,12 @@ menu.addAction(self.fullScreenAct) if hasattr(QWebSettings, 'defaultTextEncoding'): self.__textEncodingMenu = menu.addMenu( - self.trUtf8("Text Encoding")) + self.tr("Text Encoding")) self.__textEncodingMenu.aboutToShow.connect( self.__aboutToShowTextEncodingMenu) self.__textEncodingMenu.triggered.connect(self.__setTextEncoding) - menu = mb.addMenu(self.trUtf8('&Go')) + menu = mb.addMenu(self.tr('&Go')) menu.setTearOffEnabled(True) menu.addAction(self.backAct) menu.addAction(self.forwardAct) @@ -1579,7 +1579,7 @@ from .History.HistoryMenu import HistoryMenu self.historyMenu = HistoryMenu(self, self.tabWidget) self.historyMenu.setTearOffEnabled(True) - self.historyMenu.setTitle(self.trUtf8('H&istory')) + self.historyMenu.setTitle(self.tr('H&istory')) self.historyMenu.openUrl.connect(self.openUrl) self.historyMenu.newUrl.connect(self.openUrlNewTab) mb.addMenu(self.historyMenu) @@ -1587,7 +1587,7 @@ from .Bookmarks.BookmarksMenu import BookmarksMenuBarMenu self.bookmarksMenu = BookmarksMenuBarMenu(self) self.bookmarksMenu.setTearOffEnabled(True) - self.bookmarksMenu.setTitle(self.trUtf8('&Bookmarks')) + self.bookmarksMenu.setTitle(self.tr('&Bookmarks')) self.bookmarksMenu.openUrl.connect(self.openUrl) self.bookmarksMenu.newUrl.connect(self.openUrlNewTab) mb.addMenu(self.bookmarksMenu) @@ -1602,7 +1602,7 @@ bookmarksActions.append(self.exportBookmarksAct) self.bookmarksMenu.setInitialActions(bookmarksActions) - menu = mb.addMenu(self.trUtf8('&Settings')) + menu = mb.addMenu(self.tr('&Settings')) menu.setTearOffEnabled(True) menu.addAction(self.prefAct) menu.addAction(self.acceptedLanguagesAct) @@ -1627,7 +1627,7 @@ self.__aboutToShowSettingsMenu) from .UserAgent.UserAgentMenu import UserAgentMenu - self.__userAgentMenu = UserAgentMenu(self.trUtf8("Global User Agent")) + self.__userAgentMenu = UserAgentMenu(self.tr("Global User Agent")) menu.addMenu(self.__userAgentMenu) menu.addAction(self.userAgentManagerAct) menu.addSeparator() @@ -1640,7 +1640,7 @@ menu.addAction(self.clearPrivateDataAct) menu.addAction(self.clearIconsAct) - menu = mb.addMenu(self.trUtf8("&Tools")) + menu = mb.addMenu(self.tr("&Tools")) menu.setTearOffEnabled(True) menu.addAction(self.feedsManagerAct) menu.addAction(self.siteInfoAct) @@ -1649,7 +1649,7 @@ menu.addSeparator() menu.addAction(self.toolsMonitorAct) - menu = mb.addMenu(self.trUtf8("&Window")) + menu = mb.addMenu(self.tr("&Window")) menu.setTearOffEnabled(True) menu.addAction(self.showDownloadManagerAct) if self.useQtHelp: @@ -1660,7 +1660,7 @@ mb.addSeparator() - menu = mb.addMenu(self.trUtf8('&Help')) + menu = mb.addMenu(self.tr('&Help')) menu.setTearOffEnabled(True) menu.addAction(self.aboutAct) menu.addAction(self.aboutQtAct) @@ -1671,7 +1671,7 @@ """ Private method to create the toolbars. """ - filetb = self.addToolBar(self.trUtf8("File")) + filetb = self.addToolBar(self.tr("File")) filetb.setObjectName("FileToolBar") filetb.setIconSize(UI.Config.ToolBarIconSize) filetb.addAction(self.newTabAct) @@ -1696,12 +1696,12 @@ savePageScreenButton.setMenu(self.savePageScreenMenu) savePageScreenButton.setPopupMode(QToolButton.MenuButtonPopup) - edittb = self.addToolBar(self.trUtf8("Edit")) + edittb = self.addToolBar(self.tr("Edit")) edittb.setObjectName("EditToolBar") edittb.setIconSize(UI.Config.ToolBarIconSize) edittb.addAction(self.copyAct) - viewtb = self.addToolBar(self.trUtf8("View")) + viewtb = self.addToolBar(self.tr("View")) viewtb.setObjectName("ViewToolBar") viewtb.setIconSize(UI.Config.ToolBarIconSize) viewtb.addAction(self.zoomInAct) @@ -1710,7 +1710,7 @@ viewtb.addSeparator() viewtb.addAction(self.fullScreenAct) - findtb = self.addToolBar(self.trUtf8("Find")) + findtb = self.addToolBar(self.tr("Find")) findtb.setObjectName("FindToolBar") findtb.setIconSize(UI.Config.ToolBarIconSize) findtb.addAction(self.findAct) @@ -1718,19 +1718,19 @@ findtb.addAction(self.findPrevAct) if self.useQtHelp: - filtertb = self.addToolBar(self.trUtf8("Filter")) + filtertb = self.addToolBar(self.tr("Filter")) filtertb.setObjectName("FilterToolBar") self.filterCombo = QComboBox() self.filterCombo.setMinimumWidth( QFontMetrics(QFont()).width("ComboBoxWithEnoughWidth")) - filtertb.addWidget(QLabel(self.trUtf8("Filtered by: "))) + filtertb.addWidget(QLabel(self.tr("Filtered by: "))) filtertb.addWidget(self.filterCombo) self.__helpEngine.setupFinished.connect(self.__setupFilterCombo) self.filterCombo.activated[str].connect( self.__filterQtHelpDocumentation) self.__setupFilterCombo() - settingstb = self.addToolBar(self.trUtf8("Settings")) + settingstb = self.addToolBar(self.tr("Settings")) settingstb.setObjectName("SettingsToolBar") settingstb.setIconSize(UI.Config.ToolBarIconSize) settingstb.addAction(self.prefAct) @@ -1740,7 +1740,7 @@ settingstb.addAction(self.personalDataAct) settingstb.addAction(self.greaseMonkeyAct) - toolstb = self.addToolBar(self.trUtf8("Tools")) + toolstb = self.addToolBar(self.tr("Tools")) toolstb.setObjectName("ToolsToolBar") toolstb.setIconSize(UI.Config.ToolBarIconSize) toolstb.addAction(self.feedsManagerAct) @@ -1748,14 +1748,14 @@ toolstb.addSeparator() toolstb.addAction(self.synchronizationAct) - helptb = self.addToolBar(self.trUtf8("Help")) + helptb = self.addToolBar(self.tr("Help")) helptb.setObjectName("HelpToolBar") helptb.setIconSize(UI.Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) self.addToolBarBreak() - gotb = self.addToolBar(self.trUtf8("Go")) + gotb = self.addToolBar(self.tr("Go")) gotb.setObjectName("GoToolBar") gotb.setIconSize(UI.Config.ToolBarIconSize) gotb.addAction(self.backAct) @@ -1808,13 +1808,13 @@ self.addToolBar(self.bookmarksToolBar) self.addToolBarBreak() - vttb = self.addToolBar(self.trUtf8("VirusTotal")) + vttb = self.addToolBar(self.tr("VirusTotal")) vttb.setObjectName("VirusTotalToolBar") vttb.setIconSize(UI.Config.ToolBarIconSize) vttb.setToolButtonStyle(Qt.ToolButtonTextBesideIcon) self.virustotalSearchEdit = QLineEdit() self.virustotalSearchEdit.setMaximumWidth(250) - self.virustotalSearchEdit.setWhatsThis(self.trUtf8( + self.virustotalSearchEdit.setWhatsThis(self.tr( """<h2>File search</h2>""" """<p>In order to search for the last VirusTotal report on a""" """ given file just enter its hash. Currently the allowed""" @@ -1864,13 +1864,13 @@ vttb.addWidget(self.virustotalSearchEdit) self.virustotalSearchAct = vttb.addAction( UI.PixmapCache.getIcon("virustotal.png"), - self.trUtf8("Search VirusTotal"), + self.tr("Search VirusTotal"), self.__virusTotalSearch) self.virustotalSearchAct.setEnabled(False) vttb.addSeparator() self.virustotalScanCurrentAct = vttb.addAction( UI.PixmapCache.getIcon("virustotal.png"), - self.trUtf8("Scan current site"), + self.tr("Scan current site"), self.__virusTotalScanCurrentSite) if not Preferences.getHelp("VirusTotalEnabled") or \ Preferences.getHelp("VirusTotalServiceKey") == "": @@ -1984,13 +1984,13 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Open File"), + self.tr("Open File"), "", - self.trUtf8("Help Files (*.html *.htm);;" - "PDF Files (*.pdf);;" - "CHM Files (*.chm);;" - "All Files (*)" - )) + self.tr("Help Files (*.html *.htm);;" + "PDF Files (*.pdf);;" + "CHM Files (*.chm);;" + "All Files (*)" + )) if fn: if Utilities.isWindowsPlatform(): url = "file:///" + Utilities.fromNativeSeparators(fn) @@ -2004,13 +2004,13 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Open File"), + self.tr("Open File"), "", - self.trUtf8("Help Files (*.html *.htm);;" - "PDF Files (*.pdf);;" - "CHM Files (*.chm);;" - "All Files (*)" - )) + self.tr("Help Files (*.html *.htm);;" + "PDF Files (*.pdf);;" + "CHM Files (*.chm);;" + "All Files (*)" + )) if fn: if Utilities.isWindowsPlatform(): url = "file:///" + Utilities.fromNativeSeparators(fn) @@ -2051,8 +2051,8 @@ """ E5MessageBox.about( self, - self.trUtf8("eric5 Web Browser"), - self.trUtf8( + self.tr("eric5 Web Browser"), + self.tr( """<b>eric5 Web Browser - {0}</b>""" """<p>The eric5 Web Browser is a combined help file and HTML""" """ browser. It is part of the eric5 development""" @@ -2063,7 +2063,7 @@ """ Private slot to show info about Qt. """ - E5MessageBox.aboutQt(self, self.trUtf8("eric5 Web Browser")) + E5MessageBox.aboutQt(self, self.tr("eric5 Web Browser")) def setBackwardAvailable(self, b): """ @@ -2143,7 +2143,7 @@ from .Bookmarks.AddBookmarkDialog import AddBookmarkDialog dlg = AddBookmarkDialog() dlg.setFolder(True) - dlg.setTitle(self.trUtf8("Saved Tabs")) + dlg.setTitle(self.tr("Saved Tabs")) dlg.exec_() folder = dlg.addedNode() @@ -2344,14 +2344,14 @@ self.menuBar().show() self.fullScreenAct.setIcon( UI.PixmapCache.getIcon("windowFullscreen.png")) - self.fullScreenAct.setIconText(self.trUtf8('Full Screen')) + self.fullScreenAct.setIconText(self.tr('Full Screen')) else: # switch to full screen self.setWindowState(self.windowState() | Qt.WindowFullScreen) self.menuBar().hide() self.fullScreenAct.setIcon( UI.PixmapCache.getIcon("windowRestore.png")) - self.fullScreenAct.setIconText(self.trUtf8('Restore Window')) + self.fullScreenAct.setIconText(self.tr('Restore Window')) def __isFullScreen(self): """ @@ -2374,7 +2374,7 @@ settings = QWebSettings.globalSettings() pb = settings.testAttribute(QWebSettings.PrivateBrowsingEnabled) if not pb: - txt = self.trUtf8( + txt = self.tr( """<b>Are you sure you want to turn on private""" """ browsing?</b><p>When private browsing is turned on,""" """ web pages are not added to the history, searches""" @@ -2648,7 +2648,7 @@ self.__showTocWindow() if not self.__tocWindow.syncToContent(url): self.statusBar().showMessage( - self.trUtf8("Could not find an associated content."), 5000) + self.tr("Could not find an associated content."), 5000) QApplication.restoreOverrideCursor() def __showTocWindow(self): @@ -2770,7 +2770,7 @@ sizePolicy = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Maximum) - label = QLabel(self.trUtf8("Updating search index")) + label = QLabel(self.tr("Updating search index")) label.setSizePolicy(sizePolicy) layout.addWidget(label) @@ -2841,7 +2841,7 @@ self.__helpInstaller.docsInstalled.connect(self.__docsInstalled) self.statusBar().showMessage( - self.trUtf8("Looking for Documentation...")) + self.tr("Looking for Documentation...")) self.__helpInstaller.installDocs() def __showInstallationError(self, message): @@ -2852,7 +2852,7 @@ """ E5MessageBox.warning( self, - self.trUtf8("eric5 Web Browser"), + self.tr("eric5 Web Browser"), message) def __docsInstalled(self, installed): @@ -2875,7 +2875,7 @@ if not self.__helpEngine.setupData(): return - unfiltered = self.trUtf8("Unfiltered") + unfiltered = self.tr("Unfiltered") if unfiltered not in self.__helpEngine.customFilters(): hc = QHelpEngineCore(self.__helpEngine.collectionFile()) hc.setupData() @@ -2896,7 +2896,7 @@ """ E5MessageBox.warning( self, - self.trUtf8("Help Engine"), msg) + self.tr("Help Engine"), msg) def __aboutToShowSettingsMenu(self): """ @@ -3324,12 +3324,12 @@ currentCodec = "" isDefaultEncodingUsed = True - isoMenu = QMenu(self.trUtf8("ISO"), self.__textEncodingMenu) - winMenu = QMenu(self.trUtf8("Windows"), self.__textEncodingMenu) - isciiMenu = QMenu(self.trUtf8("ISCII"), self.__textEncodingMenu) - uniMenu = QMenu(self.trUtf8("Unicode"), self.__textEncodingMenu) - otherMenu = QMenu(self.trUtf8("Other"), self.__textEncodingMenu) - ibmMenu = QMenu(self.trUtf8("IBM"), self.__textEncodingMenu) + isoMenu = QMenu(self.tr("ISO"), self.__textEncodingMenu) + winMenu = QMenu(self.tr("Windows"), self.__textEncodingMenu) + isciiMenu = QMenu(self.tr("ISCII"), self.__textEncodingMenu) + uniMenu = QMenu(self.tr("Unicode"), self.__textEncodingMenu) + otherMenu = QMenu(self.tr("Other"), self.__textEncodingMenu) + ibmMenu = QMenu(self.tr("IBM"), self.__textEncodingMenu) for codec in codecs: if codec.startswith(("iso", "latin", "csisolatin")): @@ -3352,7 +3352,7 @@ isDefaultEncodingUsed = False act = self.__textEncodingMenu.addAction( - self.trUtf8("Default Encoding")) + self.tr("Default Encoding")) act.setData("") act.setCheckable(True) act.setChecked(isDefaultEncodingUsed) @@ -3613,9 +3613,9 @@ """ E5MessageBox.critical( self, - self.trUtf8("VirusTotal Scan"), - self.trUtf8("""<p>The VirusTotal scan could not be""" - """ scheduled.<p>\n<p>Reason: {0}</p>""").format(msg)) + self.tr("VirusTotal Scan"), + self.tr("""<p>The VirusTotal scan could not be""" + """ scheduled.<p>\n<p>Reason: {0}</p>""").format(msg)) def __virusTotalUrlScanReport(self, url): """
--- a/Helpviewer/History/HistoryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/History/HistoryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -84,12 +84,12 @@ idx = idx.sibling(idx.row(), 0) if idx.isValid() and not self.historyTree.model().hasChildren(idx): menu.addAction( - self.trUtf8("&Open"), self.__openHistoryInCurrentTab) + self.tr("&Open"), self.__openHistoryInCurrentTab) menu.addAction( - self.trUtf8("Open in New &Tab"), self.__openHistoryInNewTab) + self.tr("Open in New &Tab"), self.__openHistoryInNewTab) menu.addSeparator() - menu.addAction(self.trUtf8("&Copy"), self.__copyHistory) - menu.addAction(self.trUtf8("&Remove"), self.historyTree.removeSelected) + menu.addAction(self.tr("&Copy"), self.__copyHistory) + menu.addAction(self.tr("&Remove"), self.historyTree.removeSelected) menu.exec_(QCursor.pos()) def __activated(self, idx):
--- a/Helpviewer/History/HistoryManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/History/HistoryManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -384,8 +384,8 @@ if not historyFile.open(QIODevice.ReadOnly): E5MessageBox.warning( None, - self.trUtf8("Loading History"), - self.trUtf8( + self.tr("Loading History"), + self.tr( """<p>Unable to open history file <b>{0}</b>.<br/>""" """Reason: {1}</p>""") .format(historyFile.fileName, historyFile.errorString())) @@ -464,8 +464,8 @@ if not opened: E5MessageBox.warning( None, - self.trUtf8("Saving History"), - self.trUtf8( + self.tr("Saving History"), + self.tr( """<p>Unable to open history file <b>{0}</b>.<br/>""" """Reason: {1}</p>""") .format(f.fileName(), f.errorString())) @@ -487,8 +487,8 @@ if historyFile.exists() and not historyFile.remove(): E5MessageBox.warning( None, - self.trUtf8("Saving History"), - self.trUtf8( + self.tr("Saving History"), + self.tr( """<p>Error removing old history file <b>{0}</b>.""" """<br/>Reason: {1}</p>""") .format(historyFile.fileName(), @@ -496,8 +496,8 @@ if not f.copy(historyFile.fileName()): E5MessageBox.warning( None, - self.trUtf8("Saving History"), - self.trUtf8( + self.tr("Saving History"), + self.tr( """<p>Error moving new history file over old one """ """(<b>{0}</b>).<br/>Reason: {1}</p>""") .format(historyFile.fileName(), f.errorString()))
--- a/Helpviewer/History/HistoryMenu.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/History/HistoryMenu.py Sat Jan 11 11:55:33 2014 +0100 @@ -274,7 +274,7 @@ self.__initialActions = [] self.__mostVisitedMenu = None - self.__closedTabsMenu = QMenu(self.trUtf8("Closed Tabs")) + self.__closedTabsMenu = QMenu(self.tr("Closed Tabs")) self.__closedTabsMenu.aboutToShow.connect( self.__aboutToShowClosedTabsMenu) self.__tabWidget.closedTabsManager().closedTabAvailable.connect( @@ -332,7 +332,7 @@ if self.__mostVisitedMenu is None: self.__mostVisitedMenu = HistoryMostVisitedMenu(10, self) - self.__mostVisitedMenu.setTitle(self.trUtf8("Most Visited")) + self.__mostVisitedMenu.setTitle(self.tr("Most Visited")) self.__mostVisitedMenu.openUrl.connect(self.openUrl) self.__mostVisitedMenu.newUrl.connect(self.newUrl) self.addMenu(self.__mostVisitedMenu) @@ -342,10 +342,10 @@ self.addSeparator() act = self.addAction(UI.PixmapCache.getIcon("history.png"), - self.trUtf8("Show All History...")) + self.tr("Show All History...")) act.triggered[()].connect(self.__showHistoryDialog) act = self.addAction(UI.PixmapCache.getIcon("historyClear.png"), - self.trUtf8("Clear History...")) + self.tr("Clear History...")) act.triggered[()].connect(self.__clearHistoryDialog) def setInitialActions(self, actions): @@ -376,8 +376,8 @@ """ if self.__historyManager is not None and E5MessageBox.yesNo( self, - self.trUtf8("Clear History"), - self.trUtf8("""Do you want to clear the history?""")): + self.tr("Clear History"), + self.tr("""Do you want to clear the history?""")): self.__historyManager.clear() def __aboutToShowClosedTabsMenu(self): @@ -398,10 +398,10 @@ index += 1 self.__closedTabsMenu.addSeparator() self.__closedTabsMenu.addAction( - self.trUtf8("Restore All Closed Tabs"), + self.tr("Restore All Closed Tabs"), self.__tabWidget.restoreAllClosedTabs) self.__closedTabsMenu.addAction( - self.trUtf8("Clear List"), + self.tr("Clear List"), self.__tabWidget.clearClosedTabsList) def __closedTabAvailable(self, avail):
--- a/Helpviewer/History/HistoryModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/History/HistoryModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,8 +36,8 @@ self.__historyManager = historyManager self.__headers = [ - self.trUtf8("Title"), - self.trUtf8("Address"), + self.tr("Title"), + self.tr("Address"), ] self.__historyManager.historyReset.connect(self.historyReset)
--- a/Helpviewer/History/HistoryTreeModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/History/HistoryTreeModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -62,10 +62,10 @@ idx = self.sourceModel().index(offset, 0) date = idx.data(HistoryModel.DateRole) if date == QDate.currentDate(): - return self.trUtf8("Earlier Today") + return self.tr("Earlier Today") return date.toString("yyyy-MM-dd") if index.column() == 1: - return self.trUtf8( + return self.tr( "%n item(s)", "", self.rowCount(index.sibling(index.row(), 0)))
--- a/Helpviewer/Network/EricAccessHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/EricAccessHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -84,22 +84,22 @@ html.replace("@JQUERY@", "qrc:javascript/jquery.js") html.replace("@JQUERY-UI@", "qrc:javascript/jquery-ui.js") - html.replace("@SITE-TITLE@", self.trUtf8("Speed Dial")) - html.replace("@URL@", self.trUtf8("URL")) - html.replace("@TITLE@", self.trUtf8("Title")) - html.replace("@APPLY@", self.trUtf8("Apply")) - html.replace("@NEW-PAGE@", self.trUtf8("New Page")) - html.replace("@TITLE-EDIT@", self.trUtf8("Edit")) - html.replace("@TITLE-REMOVE@", self.trUtf8("Remove")) - html.replace("@TITLE-RELOAD@", self.trUtf8("Reload")) + html.replace("@SITE-TITLE@", self.tr("Speed Dial")) + html.replace("@URL@", self.tr("URL")) + html.replace("@TITLE@", self.tr("Title")) + html.replace("@APPLY@", self.tr("Apply")) + html.replace("@NEW-PAGE@", self.tr("New Page")) + html.replace("@TITLE-EDIT@", self.tr("Edit")) + html.replace("@TITLE-REMOVE@", self.tr("Remove")) + html.replace("@TITLE-RELOAD@", self.tr("Reload")) html.replace( - "@TITLE-FETCHTITLE@", self.trUtf8("Load title from page")) + "@TITLE-FETCHTITLE@", self.tr("Load title from page")) html.replace( - "@SETTINGS-TITLE@", self.trUtf8("Speed Dial Settings")) - html.replace("@ADD-TITLE@", self.trUtf8("Add New Page")) + "@SETTINGS-TITLE@", self.tr("Speed Dial Settings")) + html.replace("@ADD-TITLE@", self.tr("Add New Page")) html.replace( - "@TXT_NRROWS@", self.trUtf8("Maximum pages in a row:")) - html.replace("@TXT_SDSIZE@", self.trUtf8("Change size of pages:")) + "@TXT_NRROWS@", self.tr("Maximum pages in a row:")) + html.replace("@TXT_SDSIZE@", self.tr("Change size of pages:")) self._speedDialPage = html