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
--- a/Helpviewer/Network/FileReply.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/FileReply.py Sat Jan 11 11:55:33 2014 +0100 @@ -206,7 +206,7 @@ icon = UI.PixmapCache.getIcon("up.png") linkClasses["link_parent"] = \ self.__cssLinkClass(icon, iconSize).format("link_parent") - parentStr = self.trUtf8( + parentStr = self.tr( """ <p><a class="link_parent" href="{0}">""" """Change to parent directory</a></p>""" ).format(parent.toString()) @@ -219,7 +219,7 @@ """<td class="size">{4}</td>"""\ """<td class="modified">{5}</td>"""\ """</tr>\n""" - table = self.trUtf8( + table = self.tr( """ <tr>""" """<th align="left">Name</th>""" """<th>Size</th>""" @@ -245,7 +245,7 @@ else: break - sizeStr = self.trUtf8("{0} {1}", "size unit")\ + sizeStr = self.tr("{0} {1}", "size unit")\ .format(size, self.__units[unit]) linkClass = "link_file" if linkClass not in linkClasses: @@ -272,7 +272,7 @@ content = dirListPage_html.format( Utilities.html_encode(baseUrl), "".join(linkClasses.values()), - self.trUtf8("Listing of {0}").format(basePath), + self.tr("Listing of {0}").format(basePath), parentStr, table )
--- a/Helpviewer/Network/FtpReply.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/FtpReply.py Sat Jan 11 11:55:33 2014 +0100 @@ -268,11 +268,11 @@ # found a not supported proxy self.setError( QNetworkReply.ProxyConnectionRefusedError, - self.trUtf8("The proxy type seems to be wrong." - " If it is not in the list of" - " supported proxy types please report" - " it with the instructions given by" - " the proxy.\n{0}").format( + self.tr("The proxy type seems to be wrong." + " If it is not in the list of" + " supported proxy types please report" + " it with the instructions given by" + " the proxy.\n{0}").format( "\n".join(lines[1:]))) self.error.emit( QNetworkReply.ProxyConnectionRefusedError) @@ -280,7 +280,7 @@ else: from UI.AuthenticationDialog import \ AuthenticationDialog - info = self.trUtf8( + info = self.tr( "<b>Connect to proxy '{0}' using:</b>")\ .format(Utilities.html_encode( Preferences.getUI("ProxyHost/Ftp"))) @@ -415,7 +415,7 @@ icon = UI.PixmapCache.getIcon("up.png") linkClasses["link_parent"] = \ self.__cssLinkClass(icon, iconSize).format("link_parent") - parentStr = self.trUtf8( + parentStr = self.tr( """ <p><a class="link_parent" href="{0}">""" """Change to parent directory</a></p>""" ).format(parent.toString()) @@ -428,7 +428,7 @@ """<td class="size">{4}</td>"""\ """<td class="modified">{5}</td>"""\ """</tr>\n""" - table = self.trUtf8( + table = self.tr( """ <tr>""" """<th align="left">Name</th>""" """<th>Size</th>""" @@ -454,7 +454,7 @@ else: break - sizeStr = self.trUtf8("{0} {1}", "size unit")\ + sizeStr = self.tr("{0} {1}", "size unit")\ .format(size, self.__units[unit]) linkClass = "link_file" if linkClass not in linkClasses: @@ -481,7 +481,7 @@ content = ftpListPage_html.format( Utilities.html_encode(baseUrl), "".join(linkClasses.values()), - self.trUtf8("Listing of {0}").format(basePath), + self.tr("Listing of {0}").format(basePath), parentStr, table )
--- a/Helpviewer/Network/NetworkAccessManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/NetworkAccessManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -208,10 +208,10 @@ if not realm and 'realm' in auth.options(): realm = auth.option("realm") if realm: - info = self.trUtf8("<b>Enter username and password for '{0}', " - "realm '{1}'</b>").format(urlRoot, realm) + info = self.tr("<b>Enter username and password for '{0}', " + "realm '{1}'</b>").format(urlRoot, realm) else: - info = self.trUtf8("<b>Enter username and password for '{0}'</b>")\ + info = self.tr("<b>Enter username and password for '{0}'</b>")\ .format(urlRoot) from UI.AuthenticationDialog import AuthenticationDialog
--- a/Helpviewer/Network/NetworkProtocolUnknownErrorReply.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/NetworkProtocolUnknownErrorReply.py Sat Jan 11 11:55:33 2014 +0100 @@ -27,7 +27,7 @@ super().__init__(parent) self.setError( QNetworkReply.ProtocolUnknownError, - self.trUtf8("Protocol '{0}' not supported.").format(protocol)) + self.tr("Protocol '{0}' not supported.").format(protocol)) QTimer.singleShot(0, self.__fireSignals) def __fireSignals(self):
--- a/Helpviewer/Network/NoCacheHostsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/NoCacheHostsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,8 +50,8 @@ """ host, ok = QInputDialog.getText( self, - self.trUtf8("Not Cached Hosts"), - self.trUtf8("Enter host name to add to the list:"), + self.tr("Not Cached Hosts"), + self.tr("Enter host name to add to the list:"), QLineEdit.Normal) if ok and host != "" and host not in self.__model.stringList(): self.__model.insertRow(self.__model.rowCount())
--- a/Helpviewer/Network/QtHelpAccessHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/QtHelpAccessHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -115,7 +115,7 @@ if self.__engine.findFile(url).isValid(): data = self.__engine.fileData(url) else: - data = QByteArray(self.trUtf8( + data = QByteArray(self.tr( """<title>Error 404...</title>""" """<div align="center"><br><br>""" """<h1>The page could not be found</h1><br>"""
--- a/Helpviewer/Network/SendRefererWhitelistDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Network/SendRefererWhitelistDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,8 +50,8 @@ """ host, ok = QInputDialog.getText( self, - self.trUtf8("Send Referer Whitelist"), - self.trUtf8("Enter host name to add to the whitelist:"), + self.tr("Send Referer Whitelist"), + self.tr("Enter host name to add to the whitelist:"), QLineEdit.Normal) if ok and host != "" and host not in self.__model.stringList(): self.__model.insertRow(self.__model.rowCount())
--- a/Helpviewer/OfflineStorage/WebDatabasesModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/OfflineStorage/WebDatabasesModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -25,8 +25,8 @@ """ super().__init__(parent) self.__headers = [ - self.trUtf8("Name"), - self.trUtf8("Size") + self.tr("Name"), + self.tr("Size") ] self.__data = [] @@ -97,7 +97,7 @@ origin = self.__data[index.row()][0] if index.column() == 0: if origin.host() == "": - return self.trUtf8("Local") + return self.tr("Local") elif origin.port() == 0: return "{0}://{1}".format( origin.scheme(), @@ -115,7 +115,7 @@ # web database db = self.__data[parent.row()][1][index.row()] if index.column() == 0: - return self.trUtf8("{0} ({1})").format( + return self.tr("{0} ({1})").format( db.displayName(), db.name()) elif index.column() == 1: return self.__dataString(db.size()) @@ -204,11 +204,11 @@ """ 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)
--- a/Helpviewer/OpenSearch/OpenSearchDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/OpenSearch/OpenSearchDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -54,17 +54,17 @@ """ fileNames = E5FileDialog.getOpenFileNames( self, - self.trUtf8("Add search engine"), + self.tr("Add search engine"), "", - self.trUtf8("OpenSearch (*.xml);;All Files (*)")) + self.tr("OpenSearch (*.xml);;All Files (*)")) osm = self.__mw.openSearchManager() for fileName in fileNames: if not osm.addEngine(fileName): E5MessageBox.critical( self, - self.trUtf8("Add search engine"), - self.trUtf8( + self.tr("Add search engine"), + self.tr( """{0} is not a valid OpenSearch 1.1 description or""" """ is already on your list.""").format(fileName)) @@ -76,8 +76,8 @@ if self.enginesTable.model().rowCount() == 1: E5MessageBox.critical( self, - self.trUtf8("Delete selected engines"), - self.trUtf8("""You must have at least one search engine.""")) + self.tr("Delete selected engines"), + self.tr("""You must have at least one search engine.""")) self.enginesTable.removeSelected()
--- a/Helpviewer/OpenSearch/OpenSearchEngineModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/OpenSearch/OpenSearchEngineModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,8 +31,8 @@ manager.changed.connect(self.__enginesChanged) self.__headers = [ - self.trUtf8("Name"), - self.trUtf8("Keywords"), + self.tr("Name"), + self.tr("Keywords"), ] def removeRows(self, row, count, parent=QModelIndex()): @@ -130,11 +130,11 @@ return icon elif role == Qt.ToolTipRole: - description = self.trUtf8("<strong>Description:</strong> {0}")\ + description = self.tr("<strong>Description:</strong> {0}")\ .format(engine.description()) if engine.providesSuggestions(): description += "<br/>" - description += self.trUtf8( + description += self.tr( "<strong>Provides contextual suggestions</strong>") return description @@ -142,7 +142,7 @@ if role in [Qt.EditRole, Qt.DisplayRole]: return ",".join(self.__manager.keywordsForEngine(engine)) elif role == Qt.ToolTipRole: - return self.trUtf8( + return self.tr( "Comma-separated list of keywords that may" " be entered in the location bar followed by search terms" " to search with this engine")
--- a/Helpviewer/OpenSearch/OpenSearchManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/OpenSearch/OpenSearchManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -400,7 +400,7 @@ res = E5MessageBox.yesNo( None, "", - self.trUtf8( + self.tr( """<p>Do you want to add the following engine to your""" """ list of search engines?<br/><br/>Name: {0}<br/>""" """Searches on: {1}</p>""").format(engine.name(), host))
--- a/Helpviewer/PageScreenDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/PageScreenDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -66,9 +66,9 @@ """ fileName = E5FileDialog.getSaveFileName( self, - self.trUtf8("Save Page Screen"), - self.trUtf8("screen.png"), - self.trUtf8("Portable Network Graphics File (*.png)"), + self.tr("Save Page Screen"), + self.tr("screen.png"), + self.tr("Portable Network Graphics File (*.png)"), E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if not fileName: return False @@ -76,9 +76,9 @@ if QFileInfo(fileName).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Page Screen"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fileName), + self.tr("Save Page Screen"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fileName), icon=E5MessageBox.Warning) if not res: return False @@ -87,8 +87,8 @@ if not file.open(QFile.WriteOnly): E5MessageBox.warning( self, - self.trUtf8("Save Page Screen"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self.tr("Save Page Screen"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) return False @@ -98,8 +98,8 @@ if not res: E5MessageBox.warning( self, - self.trUtf8("Save Page Screen"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self.tr("Save Page Screen"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) return False
--- a/Helpviewer/Passwords/PasswordManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Passwords/PasswordManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -143,8 +143,8 @@ loginFile, self.__logins, self.__loginForms, self.__never): E5MessageBox.critical( None, - self.trUtf8("Saving login data"), - self.trUtf8( + self.tr("Saving login data"), + self.tr( """<p>Login data could not be saved to <b>{0}</b></p>""" ).format(loginFile)) else: @@ -165,9 +165,9 @@ if reader.error() != QXmlStreamReader.NoError: E5MessageBox.warning( None, - self.trUtf8("Loading login data"), - self.trUtf8("""Error when loading login data on""" - """ line {0}, column {1}:\n{2}""") + self.tr("Loading login data"), + self.tr("""Error when loading login data on""" + """ line {0}, column {1}:\n{2}""") .format(reader.lineNumber(), reader.columnNumber(), reader.errorString())) @@ -191,10 +191,10 @@ except IOError as err: E5MessageBox.critical( None, - self.trUtf8("Loading login data"), - self.trUtf8("""<p>Login data could not be loaded """ - """from <b>{0}</b></p>""" - """<p>Reason: {1}</p>""") + self.tr("Loading login data"), + self.tr("""<p>Login data could not be loaded """ + """from <b>{0}</b></p>""" + """<p>Reason: {1}</p>""") .format(loginFile, str(err))) return @@ -216,8 +216,8 @@ if len(data) != 3: E5MessageBox.critical( None, - self.trUtf8("Loading login data"), - self.trUtf8( + self.tr("Loading login data"), + self.tr( """<p>Login data could not be loaded """ """from <b>{0}</b></p>""" """<p>Reason: Wrong input format</p>""") @@ -384,18 +384,18 @@ if key not in self.__loginForms: mb = E5MessageBox.E5MessageBox( E5MessageBox.Question, - self.trUtf8("Save password"), - self.trUtf8( + self.tr("Save password"), + self.tr( """<b>Would you like to save this password?</b><br/>""" """To review passwords you have saved and remove them, """ """use the password management dialog of the Settings""" """ menu."""), modal=True) neverButton = mb.addButton( - self.trUtf8("Never for this site"), + self.tr("Never for this site"), E5MessageBox.DestructiveRole) noButton = mb.addButton( - self.trUtf8("Not now"), E5MessageBox.RejectRole) + self.tr("Not now"), E5MessageBox.RejectRole) mb.addButton(E5MessageBox.Yes) mb.exec_() if mb.clickedButton() == neverButton: @@ -604,8 +604,8 @@ self.__load() progress = E5ProgressDialog( - self.trUtf8("Re-encoding saved passwords..."), - None, 0, len(self.__logins), self.trUtf8("%v/%m Passwords"), + self.tr("Re-encoding saved passwords..."), + None, 0, len(self.__logins), self.tr("%v/%m Passwords"), QApplication.activeModalWidget()) progress.setMinimumDuration(0) count = 0
--- a/Helpviewer/Passwords/PasswordModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Passwords/PasswordModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -27,9 +27,9 @@ manager.changed.connect(self.__passwordsChanged) self.__headers = [ - self.trUtf8("Website"), - self.trUtf8("Username"), - self.trUtf8("Password") + self.tr("Website"), + self.tr("Username"), + self.tr("Password") ] self.__showPasswords = False
--- a/Helpviewer/Passwords/PasswordsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Passwords/PasswordsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -28,8 +28,8 @@ super().__init__(parent) self.setupUi(self) - self.__showPasswordsText = self.trUtf8("Show Passwords") - self.__hidePasswordsText = self.trUtf8("Hide Passwords") + self.__showPasswordsText = self.tr("Show Passwords") + self.__hidePasswordsText = self.tr("Hide Passwords") self.passwordsButton.setText(self.__showPasswordsText) self.removeButton.clicked[()].connect( @@ -86,8 +86,8 @@ else: res = E5MessageBox.yesNo( self, - self.trUtf8("Saved Passwords"), - self.trUtf8("""Do you really want to show passwords?""")) + self.tr("Saved Passwords"), + self.tr("""Do you really want to show passwords?""")) if res: self.__passwordModel.setShowPasswords(True) self.passwordsButton.setText(self.__hidePasswordsText)
--- a/Helpviewer/PersonalInformationManager/PersonalInformationManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/PersonalInformationManager/PersonalInformationManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -76,22 +76,22 @@ self.__allInfo[self.Special3] = Preferences.getHelp("PimSpecial3") self.__allInfo[self.Special4] = Preferences.getHelp("PimSpecial4") - self.__translations[self.FullName] = self.trUtf8("Full Name") - self.__translations[self.LastName] = self.trUtf8("Last Name") - self.__translations[self.FirstName] = self.trUtf8("First Name") - self.__translations[self.Email] = self.trUtf8("E-mail") - self.__translations[self.Mobile] = self.trUtf8("Mobile") - self.__translations[self.Phone] = self.trUtf8("Phone") - self.__translations[self.Address] = self.trUtf8("Address") - self.__translations[self.City] = self.trUtf8("City") - self.__translations[self.Zip] = self.trUtf8("ZIP Code") - self.__translations[self.State] = self.trUtf8("State/Region") - self.__translations[self.Country] = self.trUtf8("Country") - self.__translations[self.HomePage] = self.trUtf8("Home Page") - self.__translations[self.Special1] = self.trUtf8("Custom 1") - self.__translations[self.Special2] = self.trUtf8("Custom 2") - self.__translations[self.Special3] = self.trUtf8("Custom 3") - self.__translations[self.Special4] = self.trUtf8("Custom 4") + self.__translations[self.FullName] = self.tr("Full Name") + self.__translations[self.LastName] = self.tr("Last Name") + self.__translations[self.FirstName] = self.tr("First Name") + self.__translations[self.Email] = self.tr("E-mail") + self.__translations[self.Mobile] = self.tr("Mobile") + self.__translations[self.Phone] = self.tr("Phone") + self.__translations[self.Address] = self.tr("Address") + self.__translations[self.City] = self.tr("City") + self.__translations[self.Zip] = self.tr("ZIP Code") + self.__translations[self.State] = self.tr("State/Region") + self.__translations[self.Country] = self.tr("Country") + self.__translations[self.HomePage] = self.tr("Home Page") + self.__translations[self.Special1] = self.tr("Custom 1") + self.__translations[self.Special2] = self.tr("Custom 2") + self.__translations[self.Special3] = self.tr("Custom 3") + self.__translations[self.Special4] = self.tr("Custom 4") self.__infoMatches[self.FullName] = ["fullname", "realname"] self.__infoMatches[self.LastName] = ["lastname", "surname"] @@ -136,7 +136,7 @@ if not self.__loaded: self.__loadSettings() - submenu = QMenu(self.trUtf8("Insert Personal Information"), menu) + submenu = QMenu(self.tr("Insert Personal Information"), menu) submenu.setIcon(UI.PixmapCache.getIcon("pim.png")) for key, info in sorted(self.__allInfo.items()): @@ -146,7 +146,7 @@ act.setData(info) submenu.addSeparator() - submenu.addAction(self.trUtf8("Edit Personal Information"), + submenu.addAction(self.tr("Edit Personal Information"), self.showConfigurationDialog) menu.addMenu(submenu)
--- a/Helpviewer/QtHelpDocumentationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/QtHelpDocumentationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,9 +57,9 @@ """ fileNames = E5FileDialog.getOpenFileNames( self, - self.trUtf8("Add Documentation"), + self.tr("Add Documentation"), "", - self.trUtf8("Qt Compressed Help Files (*.qch)")) + self.tr("Qt Compressed Help Files (*.qch)")) if not fileNames: return @@ -68,8 +68,8 @@ if not ns: E5MessageBox.warning( self, - self.trUtf8("Add Documentation"), - self.trUtf8( + self.tr("Add Documentation"), + self.tr( """The file <b>{0}</b> is not a valid""" """ Qt Help File.""").format(fileName) ) @@ -78,8 +78,8 @@ if len(self.documentsList.findItems(ns, Qt.MatchFixedString)): E5MessageBox.warning( self, - self.trUtf8("Add Documentation"), - self.trUtf8( + self.tr("Add Documentation"), + self.tr( """The namespace <b>{0}</b> is already registered.""") .format(ns) ) @@ -98,8 +98,8 @@ """ res = E5MessageBox.question( self, - self.trUtf8("Remove Documentation"), - self.trUtf8( + self.tr("Remove Documentation"), + self.tr( """Do you really want to remove the selected documentation """ """sets from the database?""")) if not res: @@ -113,8 +113,8 @@ if ns in list(openedDocs.values()): res = E5MessageBox.yesNo( self, - self.trUtf8("Remove Documentation"), - self.trUtf8( + self.tr("Remove Documentation"), + self.tr( """Some documents currently opened reference the """ """documentation you are attempting to remove. """ """Removing the documentation will close those """
--- a/Helpviewer/QtHelpFiltersDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/QtHelpFiltersDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -107,8 +107,8 @@ """ filter, ok = QInputDialog.getText( None, - self.trUtf8("Add Filter"), - self.trUtf8("Filter name:"), + self.tr("Add Filter"), + self.tr("Filter name:"), QLineEdit.Normal) if not filter: return
--- a/Helpviewer/SearchWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/SearchWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -91,7 +91,7 @@ self.__findBackwards, self.wrapCheckBox.isChecked(), False): - self.infoLabel.setText(self.trUtf8("Expression was not found.")) + self.infoLabel.setText(self.tr("Expression was not found.")) self.__setFindtextComboBackground(True) @pyqtSlot(bool)
--- a/Helpviewer/SiteInfo/SiteInfoDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/SiteInfo/SiteInfoDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -145,7 +145,7 @@ if counter == 0: itm = QListWidgetItem(self.databasesList) - itm.setText(self.trUtf8("No databases are used by this page.")) + itm.setText(self.tr("No databases are used by this page.")) itm.setFlags(itm.flags() & Qt.ItemIsSelectable) @pyqtSlot() @@ -188,7 +188,7 @@ if pixmap.isNull(): invalidPixmap = True if invalidPixmap: - scene.addText(self.trUtf8("Preview not available.")) + scene.addText(self.tr("Preview not available.")) else: scene.addPixmap(pixmap) self.imagePreview.setScene(scene) @@ -205,15 +205,15 @@ menu = QMenu() act = menu.addAction( - self.trUtf8("Copy Image Location to Clipboard"), + self.tr("Copy Image Location to Clipboard"), self.__copyAction) act.setData(itm.text(1)) act = menu.addAction( - self.trUtf8("Copy Image Name to Clipboard"), + self.tr("Copy Image Name to Clipboard"), self.__copyAction) act.setData(itm.text(0)) menu.addSeparator() - act = menu.addAction(self.trUtf8("Save Image"), self.__saveImage) + act = menu.addAction(self.tr("Save Image"), self.__saveImage) act.setData(self.imagesTree.indexOfTopLevelItem(itm)) menu.exec_(QCursor.pos()) @@ -248,8 +248,8 @@ if not cacheData: E5MessageBox.critical( self, - self.trUtf8("Save Image"), - self.trUtf8("""This image is not available.""")) + self.tr("Save Image"), + self.tr("""This image is not available.""")) return downloadDirectory = Helpviewer.HelpWindow.HelpWindow\ @@ -257,9 +257,9 @@ fn = os.path.join(downloadDirectory, os.path.basename(itm.text(1))) filename = E5FileDialog.getSaveFileName( self, - self.trUtf8("Save Image"), + self.tr("Save Image"), fn, - self.trUtf8("All Files (*)"), + self.tr("All Files (*)"), E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if not filename: @@ -269,8 +269,8 @@ if not f.open(QFile.WriteOnly): E5MessageBox.critical( self, - self.trUtf8("Save Image"), - self.trUtf8( + self.tr("Save Image"), + self.tr( """<p>Cannot write to file <b>{0}</b>.</p>""") .format(filename)) return
--- a/Helpviewer/SpeedDial/SpeedDial.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/SpeedDial/SpeedDial.py Sat Jan 11 11:55:33 2014 +0100 @@ -204,8 +204,8 @@ self.__pagesPerRow, self.__speedDialSize): E5MessageBox.critical( None, - self.trUtf8("Saving Speed Dial data"), - self.trUtf8( + self.tr("Saving Speed Dial data"), + self.tr( """<p>Speed Dial data could not be saved to""" """ <b>{0}</b></p>""").format(speedDialFile)) else: @@ -373,7 +373,7 @@ if image.isNull(): fileName = "qrc:icons/brokenPage.png" - title = self.trUtf8("Unable to load") + title = self.tr("Unable to load") loadTitle = True page = self.pageForUrl(thumbnailer.url()) page.broken = True
--- a/Helpviewer/Sync/DirectorySyncHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/DirectorySyncHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -70,7 +70,7 @@ os.makedirs(Preferences.getHelp("SyncDirectoryPath")) except OSError as err: self.syncError.emit( - self.trUtf8("Error creating the shared directory.\n{0}") + self.tr("Error creating the shared directory.\n{0}") .format(str(err))) return @@ -96,7 +96,7 @@ except IOError as err: self.syncStatus.emit( type_, - self.trUtf8("Cannot read remote file.\n{0}").format(str(err))) + self.tr("Cannot read remote file.\n{0}").format(str(err))) self.syncFinished.emit(type_, False, True) return @@ -131,7 +131,7 @@ except IOError as err: self.syncStatus.emit( type_, - self.trUtf8("Cannot write remote file.\n{0}").format( + self.tr("Cannot write remote file.\n{0}").format( str(err))) self.syncFinished.emit(type_, False, False) return @@ -214,7 +214,7 @@ Helpviewer.HelpWindow.HelpWindow.speedDial().getFileName()) self.__forceUpload = False - self.syncMessage.emit(self.trUtf8("Synchronization finished")) + self.syncMessage.emit(self.tr("Synchronization finished")) def __syncFile(self, type_, fileName): """
--- a/Helpviewer/Sync/FtpSyncHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/FtpSyncHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -261,7 +261,7 @@ .toTime_t()) else: self.syncStatus.emit( - type_, self.trUtf8("No synchronization required.")) + type_, self.tr("No synchronization required.")) self.syncFinished.emit(type_, True, True) else: if self._remoteFiles[type_] not in self.__remoteFilesFound: @@ -331,7 +331,7 @@ ok = self.__connectAndLogin() if not ok: self.syncStatus.emit( - type_, self.trUtf8("Cannot log in to FTP host.")) + type_, self.tr("Cannot log in to FTP host.")) return # upload the changed file @@ -339,7 +339,7 @@ self.syncStatus.emit(type_, self._messages[type_]["Uploading"]) if self.__uploadFile(type_, fileName): self.syncStatus.emit( - type_, self.trUtf8("Synchronization finished.")) + type_, self.tr("Synchronization finished.")) self.__state = "idle" def syncBookmarks(self):
--- a/Helpviewer/Sync/SyncCheckPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/SyncCheckPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,16 +50,16 @@ syncMgr.syncFinished.connect(self.__updateLabels) if Preferences.getHelp("SyncType") == SyncGlobals.SyncTypeFtp: - self.handlerLabel.setText(self.trUtf8("FTP")) - self.infoLabel.setText(self.trUtf8("Host:")) + self.handlerLabel.setText(self.tr("FTP")) + self.infoLabel.setText(self.tr("Host:")) self.infoDataLabel.setText(Preferences.getHelp("SyncFtpServer")) elif Preferences.getHelp("SyncType") == SyncGlobals.SyncTypeDirectory: - self.handlerLabel.setText(self.trUtf8("Shared Directory")) - self.infoLabel.setText(self.trUtf8("Directory:")) + self.handlerLabel.setText(self.tr("Shared Directory")) + self.infoLabel.setText(self.tr("Directory:")) self.infoDataLabel.setText( Preferences.getHelp("SyncDirectoryPath")) else: - self.handlerLabel.setText(self.trUtf8("No Synchronization")) + self.handlerLabel.setText(self.tr("No Synchronization")) self.hostLabel.setText("") self.bookmarkMsgLabel.setText("") @@ -202,5 +202,5 @@ @param message error message (string) """ self.syncErrorLabel.show() - self.syncErrorLabel.setText(self.trUtf8( + self.syncErrorLabel.setText(self.tr( '<font color="#FF0000"><b>Error:</b> {0}</font>').format(message))
--- a/Helpviewer/Sync/SyncDirectorySettingsPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/SyncDirectorySettingsPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,7 +68,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Shared Directory"), + self.tr("Shared Directory"), self.directoryEdit.text(), E5FileDialog.Options(E5FileDialog.Option(0)))
--- a/Helpviewer/Sync/SyncEncryptionPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/SyncEncryptionPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -28,9 +28,9 @@ super().__init__(parent) self.setupUi(self) - self.keySizeComboBox.addItem(self.trUtf8("128 Bits"), 16) - self.keySizeComboBox.addItem(self.trUtf8("192 Bits"), 24) - self.keySizeComboBox.addItem(self.trUtf8("256 Bits"), 32) + self.keySizeComboBox.addItem(self.tr("128 Bits"), 16) + self.keySizeComboBox.addItem(self.tr("192 Bits"), 24) + self.keySizeComboBox.addItem(self.tr("256 Bits"), 32) self.registerField("ReencryptData", self.reencryptCheckBox) @@ -94,14 +94,14 @@ self.reencryptCheckBox.isChecked()) if self.encryptionKeyEdit.text() == "": - error = error or self.trUtf8( + error = error or self.tr( "Encryption key must not be empty.") if self.encryptionKeyEdit.text() != "" and \ self.reencryptCheckBox.isChecked() and \ (self.encryptionKeyEdit.text() != self.encryptionKeyAgainEdit.text()): - error = error or self.trUtf8( + error = error or self.tr( "Repeated encryption key is wrong.") self.errorLabel.setText(error)
--- a/Helpviewer/Sync/SyncHandler.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/Sync/SyncHandler.py Sat Jan 11 11:55:33 2014 +0100 @@ -56,74 +56,74 @@ self._messages = { "bookmarks": { - "RemoteExists": self.trUtf8( + "RemoteExists": self.tr( "Remote bookmarks file exists! Syncing local copy..."), - "RemoteMissing": self.trUtf8( + "RemoteMissing": self.tr( "Remote bookmarks file does NOT exists. Exporting" " local copy..."), - "LocalNewer": self.trUtf8( + "LocalNewer": self.tr( "Local bookmarks file is NEWER. Exporting local copy..."), - "LocalMissing": self.trUtf8( + "LocalMissing": self.tr( "Local bookmarks file does NOT exist. Skipping" " synchronization!"), - "Uploading": self.trUtf8("Uploading local bookmarks file..."), + "Uploading": self.tr("Uploading local bookmarks file..."), }, "history": { - "RemoteExists": self.trUtf8( + "RemoteExists": self.tr( "Remote history file exists! Syncing local copy..."), - "RemoteMissing": self.trUtf8( + "RemoteMissing": self.tr( "Remote history file does NOT exists. Exporting" " local copy..."), - "LocalNewer": self.trUtf8( + "LocalNewer": self.tr( "Local history file is NEWER. Exporting local copy..."), - "LocalMissing": self.trUtf8( + "LocalMissing": self.tr( "Local history file does NOT exist. Skipping" " synchronization!"), - "Uploading": self.trUtf8("Uploading local history file..."), + "Uploading": self.tr("Uploading local history file..."), }, "passwords": { - "RemoteExists": self.trUtf8( + "RemoteExists": self.tr( "Remote logins file exists! Syncing local copy..."), - "RemoteMissing": self.trUtf8( + "RemoteMissing": self.tr( "Remote logins file does NOT exists. Exporting" " local copy..."), - "LocalNewer": self.trUtf8( + "LocalNewer": self.tr( "Local logins file is NEWER. Exporting local copy..."), - "LocalMissing": self.trUtf8( + "LocalMissing": self.tr( "Local logins file does NOT exist. Skipping" " synchronization!"), - "Uploading": self.trUtf8("Uploading local logins file..."), + "Uploading": self.tr("Uploading local logins file..."), }, "useragents": { - "RemoteExists": self.trUtf8( + "RemoteExists": self.tr( "Remote user agent settings file exists! Syncing local" " copy..."), - "RemoteMissing": self.trUtf8( + "RemoteMissing": self.tr( "Remote user agent settings file does NOT exists." " Exporting local copy..."), - "LocalNewer": self.trUtf8( + "LocalNewer": self.tr( "Local user agent settings file is NEWER. Exporting" " local copy..."), - "LocalMissing": self.trUtf8( + "LocalMissing": self.tr( "Local user agent settings file does NOT exist." " Skipping synchronization!"), - "Uploading": self.trUtf8( + "Uploading": self.tr( "Uploading local user agent settings file..."), }, "speeddial": { - "RemoteExists": self.trUtf8( + "RemoteExists": self.tr( "Remote speed dial settings file exists! Syncing local" " copy..."), - "RemoteMissing": self.trUtf8( + "RemoteMissing": self.tr( "Remote speed dial settings file does NOT exists." " Exporting local copy..."), - "LocalNewer": self.trUtf8( + "LocalNewer": self.tr( "Local speed dial settings file is NEWER. Exporting" " local copy..."), - "LocalMissing": self.trUtf8( + "LocalMissing": self.tr( "Local speed dial settings file does NOT exist." " Skipping synchronization!"), - "Uploading": self.trUtf8( + "Uploading": self.tr( "Uploading local speed dial settings file..."), }, } @@ -257,13 +257,13 @@ type_ == "passwords")): key = Preferences.getHelp("SyncEncryptionKey") if not key: - return False, self.trUtf8("Invalid encryption key given.") + return False, self.tr("Invalid encryption key given.") data, ok = dataDecrypt( data, key, keyLength=Preferences.getHelp("SyncEncryptionKeyLength")) if not ok: - return False, self.trUtf8("Data cannot be decrypted.") + return False, self.tr("Data cannot be decrypted.") try: outputFile = open(fileName, "wb")
--- a/Helpviewer/UrlBar/BookmarkActionSelectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/UrlBar/BookmarkActionSelectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,18 +46,18 @@ if Helpviewer.HelpWindow.HelpWindow.bookmarksManager()\ .bookmarkForUrl(url) is None: self.__bmAction = self.AddBookmark - self.bookmarkPushButton.setText(self.trUtf8("Add Bookmark")) + self.bookmarkPushButton.setText(self.tr("Add Bookmark")) else: self.__bmAction = self.EditBookmark - self.bookmarkPushButton.setText(self.trUtf8("Edit Bookmark")) + self.bookmarkPushButton.setText(self.tr("Edit Bookmark")) if Helpviewer.HelpWindow.HelpWindow.speedDial().pageForUrl(url).url: self.__sdAction = self.RemoveSpeeddial self.speeddialPushButton.setText( - self.trUtf8("Remove from Speed Dial")) + self.tr("Remove from Speed Dial")) else: self.__sdAction = self.AddSpeeddial - self.speeddialPushButton.setText(self.trUtf8("Add to Speed Dial")) + self.speeddialPushButton.setText(self.tr("Add to Speed Dial")) @pyqtSlot() def on_bookmarkPushButton_clicked(self):
--- a/Helpviewer/UrlBar/UrlBar.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/UrlBar/UrlBar.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,8 +41,8 @@ @param parent reference to the parent widget (HelpBrowser) """ E5LineEdit.__init__(self, parent) - self.setInactiveText(self.trUtf8("Enter the URL here.")) - self.setWhatsThis(self.trUtf8("Enter the URL here.")) + self.setInactiveText(self.tr("Enter the URL here.")) + self.setWhatsThis(self.tr("Enter the URL here.")) self.__mw = mainWindow self.__browser = None @@ -198,7 +198,7 @@ if cn != "": org = cn.split(".", 1)[1] if org == "": - org = self.trUtf8("Unknown") + org = self.tr("Unknown") self.__sslLabel.setText(" {0} ".format(org)) self.__sslLabel.setVisible(True) if qVersion() >= "5.0.0":
--- a/Helpviewer/UserAgent/UserAgentManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/UserAgent/UserAgentManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,8 +65,8 @@ if not writer.write(agentFile, self.__agents): E5MessageBox.critical( None, - self.trUtf8("Saving user agent data"), - self.trUtf8( + self.tr("Saving user agent data"), + self.tr( """<p>User agent data could not be saved to""" """ <b>{0}</b></p>""").format(agentFile)) else: @@ -86,9 +86,9 @@ if reader.error() != QXmlStreamReader.NoError: E5MessageBox.warning( None, - self.trUtf8("Loading user agent data"), - self.trUtf8("""Error when loading user agent data on""" - """ line {0}, column {1}:\n{2}""") + self.tr("Loading user agent data"), + self.tr("""Error when loading user agent data on""" + """ line {0}, column {1}:\n{2}""") .format(reader.lineNumber(), reader.columnNumber(), reader.errorString())) @@ -112,10 +112,10 @@ except IOError as err: E5MessageBox.critical( None, - self.trUtf8("Loading user agent data"), - self.trUtf8("""<p>User agent data could not be loaded """ - """from <b>{0}</b></p>""" - """<p>Reason: {1}</p>""") + self.tr("Loading user agent data"), + self.tr("""<p>User agent data could not be loaded """ + """from <b>{0}</b></p>""" + """<p>Reason: {1}</p>""") .format(agentFile, str(err))) return
--- a/Helpviewer/UserAgent/UserAgentMenu.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/UserAgent/UserAgentMenu.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,7 +49,7 @@ # add default action self.__defaultUserAgent = QAction(self) - self.__defaultUserAgent.setText(self.trUtf8("Default")) + self.__defaultUserAgent.setText(self.tr("Default")) self.__defaultUserAgent.setCheckable(True) self.__defaultUserAgent.triggered[()].connect( self.__switchToDefaultUserAgent) @@ -69,7 +69,7 @@ # add other action self.addSeparator() self.__otherUserAgent = QAction(self) - self.__otherUserAgent.setText(self.trUtf8("Other...")) + self.__otherUserAgent.setText(self.tr("Other...")) self.__otherUserAgent.setCheckable(True) self.__otherUserAgent.triggered[()].connect( self.__switchToOtherUserAgent) @@ -94,8 +94,8 @@ from Helpviewer.HelpBrowserWV import HelpWebPage userAgent, ok = QInputDialog.getText( self, - self.trUtf8("Custom user agent"), - self.trUtf8("User agent:"), + self.tr("Custom user agent"), + self.tr("User agent:"), QLineEdit.Normal, HelpWebPage().userAgent(resolveEmpty=True)) if ok: @@ -166,7 +166,7 @@ attributes = xml.attributes() title = attributes.value("title") if title == "v_a_r_i_o_u_s": - title = self.trUtf8("Various") + title = self.tr("Various") menu = QMenu(self) menu.setTitle(title) @@ -179,8 +179,8 @@ if xml.hasError(): E5MessageBox.critical( self, - self.trUtf8("Parsing default user agents"), - self.trUtf8( + self.tr("Parsing default user agents"), + self.tr( """<p>Error parsing default user agents.</p><p>{0}</p>""") .format(xml.errorString()))
--- a/Helpviewer/UserAgent/UserAgentModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/UserAgent/UserAgentModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -27,8 +27,8 @@ self.__manager.changed.connect(self.__userAgentsChanged) self.__headers = [ - self.trUtf8("Host"), - self.trUtf8("User Agent String"), + self.tr("Host"), + self.tr("User Agent String"), ] def __userAgentsChanged(self):
--- a/Helpviewer/VirusTotalApi.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/VirusTotalApi.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,9 +80,9 @@ self.GetUrlReportUrl = self.GetUrlReportPattern.format(protocol) self.errorMessages = { - -2: self.trUtf8("Request limit has been reached."), - -1: self.trUtf8("Invalid key given."), - 0: self.trUtf8("Requested item is not present.") + -2: self.tr("Request limit has been reached."), + -1: self.tr("Invalid key given."), + 0: self.tr("Requested item is not present.") } def preferencesChanged(self):
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlash.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,7 +73,7 @@ if iconName: self.loadFlashButton.setIcon(UI.PixmapCache.getIcon(iconName)) else: - self.loadFlashButton.setText(self.trUtf8("Load")) + self.loadFlashButton.setText(self.tr("Load")) @pyqtSlot() def on_loadFlashButton_clicked(self): @@ -87,28 +87,28 @@ Private slot to show the context menu. """ menu = QMenu() - act = menu.addAction(self.trUtf8("Object blocked by ClickToFlash")) + act = menu.addAction(self.tr("Object blocked by ClickToFlash")) font = act.font() font.setBold(True) act.setFont(font) menu.addAction( - self.trUtf8("Show information about object"), self.__showInfo) + self.tr("Show information about object"), self.__showInfo) menu.addSeparator() - menu.addAction(self.trUtf8("Load"), self.__load) - menu.addAction(self.trUtf8("Delete object"), self.__hideAdBlocked) + menu.addAction(self.tr("Load"), self.__load) + menu.addAction(self.tr("Delete object"), self.__hideAdBlocked) menu.addSeparator() host = self.__url.host() add = menu.addAction( - self.trUtf8("Add '{0}' to Whitelist").format(host), + self.tr("Add '{0}' to Whitelist").format(host), self.__addToWhitelist) remove = menu.addAction( - self.trUtf8("Remove '{0}' from Whitelist").format(host), + self.tr("Remove '{0}' from Whitelist").format(host), self.__removeFromWhitelist) onWhitelist = self.__plugin.onWhitelist(host) add.setEnabled(not onWhitelist) remove.setEnabled(onWhitelist) menu.addSeparator() - menu.addAction(self.trUtf8("Configure Whitelist"), self.__configure) + menu.addAction(self.tr("Configure Whitelist"), self.__configure) menu.actions()[0].setEnabled(False) menu.exec_(QCursor.pos()) @@ -256,11 +256,11 @@ Private slot to show information about the blocked object. """ dlg = QDialog() - dlg.setWindowTitle(self.trUtf8("Flash Object")) + dlg.setWindowTitle(self.tr("Flash Object")) dlg.setSizeGripEnabled(True) layout = QFormLayout(dlg) - layout.addRow(QLabel(self.trUtf8("<b>Attribute Name</b>")), - QLabel(self.trUtf8("<b>Value</b>"))) + layout.addRow(QLabel(self.tr("<b>Attribute Name</b>")), + QLabel(self.tr("<b>Value</b>"))) index = 0 for name in self.__argumentNames: @@ -274,7 +274,7 @@ index += 1 if index == 0: - layout.addRow(QLabel(self.trUtf8("No information available."))) + layout.addRow(QLabel(self.tr("No information available."))) dlg.setMaximumHeight(500) dlg.setMaximumWidth(500)
--- a/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashWhitelistDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Helpviewer/WebPlugins/ClickToFlash/ClickToFlashWhitelistDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,8 +52,8 @@ """ host, ok = QInputDialog.getText( self, - self.trUtf8("ClickToFlash Whitelist"), - self.trUtf8("Enter host name to add to whitelist:"), + self.tr("ClickToFlash Whitelist"), + self.tr("Enter host name to add to whitelist:"), QLineEdit.Normal) if ok and host != "" and host not in self.__model.stringList(): self.__model.insertRow(self.__model.rowCount())
--- a/IconEditor/IconEditorGrid.py Fri Jan 10 19:30:21 2014 +0100 +++ b/IconEditor/IconEditorGrid.py Sat Jan 11 11:55:33 2014 +0100 @@ -200,16 +200,16 @@ for the various drawing tools. """ self.__undoTexts = { - self.Pencil: self.trUtf8("Set Pixel"), - self.Rubber: self.trUtf8("Erase Pixel"), - self.Line: self.trUtf8("Draw Line"), - self.Rectangle: self.trUtf8("Draw Rectangle"), - self.FilledRectangle: self.trUtf8("Draw Filled Rectangle"), - self.Circle: self.trUtf8("Draw Circle"), - self.FilledCircle: self.trUtf8("Draw Filled Circle"), - self.Ellipse: self.trUtf8("Draw Ellipse"), - self.FilledEllipse: self.trUtf8("Draw Filled Ellipse"), - self.Fill: self.trUtf8("Fill Region"), + self.Pencil: self.tr("Set Pixel"), + self.Rubber: self.tr("Erase Pixel"), + self.Line: self.tr("Draw Line"), + self.Rectangle: self.tr("Draw Rectangle"), + self.FilledRectangle: self.tr("Draw Filled Rectangle"), + self.Circle: self.tr("Draw Circle"), + self.FilledCircle: self.tr("Draw Filled Circle"), + self.Ellipse: self.tr("Draw Ellipse"), + self.FilledEllipse: self.tr("Draw Filled Ellipse"), + self.Fill: self.tr("Fill Region"), } def isDirty(self): @@ -834,7 +834,7 @@ @return image of the selection (QImage) """ if cut: - cmd = IconEditCommand(self, self.trUtf8("Cut Selection"), + cmd = IconEditCommand(self, self.tr("Cut Selection"), self.__image) img = QImage(self.__selRect.size(), QImage.Format_ARGB32) @@ -892,8 +892,8 @@ img.height() > self.__image.height(): res = E5MessageBox.yesNo( self, - self.trUtf8("Paste"), - self.trUtf8( + self.tr("Paste"), + self.tr( """<p>The clipboard image is larger than the""" """ current image.<br/>Paste as new image?</p>""")) if res: @@ -903,7 +903,7 @@ self.__isPasting = True self.__clipboardSize = img.size() else: - cmd = IconEditCommand(self, self.trUtf8("Paste Clipboard"), + cmd = IconEditCommand(self, self.tr("Paste Clipboard"), self.__image) self.__markImage.fill(self.NoMarkColor.rgba()) painter = QPainter(self.__image) @@ -923,8 +923,8 @@ else: E5MessageBox.warning( self, - self.trUtf8("Pasting Image"), - self.trUtf8("""Invalid image data in clipboard.""")) + self.tr("Pasting Image"), + self.tr("""Invalid image data in clipboard.""")) def editPasteAsNew(self): """ @@ -933,7 +933,7 @@ img, ok = self.__clipboardImage() if ok: cmd = IconEditCommand( - self, self.trUtf8("Paste Clipboard as New Image"), + self, self.tr("Paste Clipboard as New Image"), self.__image) self.setIconImage(img) self.setDirty(True) @@ -961,7 +961,7 @@ """ self.__unMark() - cmd = IconEditCommand(self, self.trUtf8("Clear Image"), self.__image) + cmd = IconEditCommand(self, self.tr("Clear Image"), self.__image) self.__image.fill(qRgba(0, 0, 0, 0)) self.update() self.setDirty(True) @@ -979,7 +979,7 @@ newWidth, newHeight = dlg.getData() if newWidth != self.__image.width() or \ newHeight != self.__image.height(): - cmd = IconEditCommand(self, self.trUtf8("Resize Image"), + cmd = IconEditCommand(self, self.tr("Resize Image"), self.__image) img = self.__image.scaled( newWidth, newHeight, Qt.IgnoreAspectRatio, @@ -1006,7 +1006,7 @@ """ Public slot to convert the image to gray preserving transparency. """ - cmd = IconEditCommand(self, self.trUtf8("Convert to Grayscale"), + cmd = IconEditCommand(self, self.tr("Convert to Grayscale"), self.__image) for x in range(self.__image.width()): for y in range(self.__image.height()):
--- a/IconEditor/IconEditorPalette.py Fri Jan 10 19:30:21 2014 +0100 +++ b/IconEditor/IconEditorPalette.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,7 +43,7 @@ self.__preview.setFrameStyle(QFrame.Panel | QFrame.Sunken) self.__preview.setFixedHeight(64) self.__preview.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) - self.__preview.setWhatsThis(self.trUtf8( + self.__preview.setWhatsThis(self.tr( """<b>Preview</b>""" """<p>This is a 1:1 preview of the current icon.</p>""" )) @@ -53,7 +53,7 @@ self.__color.setFrameStyle(QFrame.Panel | QFrame.Sunken) self.__color.setFixedHeight(24) self.__color.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) - self.__color.setWhatsThis(self.trUtf8( + self.__color.setWhatsThis(self.tr( """<b>Current Color</b>""" """<p>This is the currently selected color used for drawing.</p>""" )) @@ -61,15 +61,15 @@ self.__colorTxt = QLabel(self) self.__colorTxt.setAlignment(Qt.AlignHCenter | Qt.AlignVCenter) - self.__colorTxt.setWhatsThis(self.trUtf8( + self.__colorTxt.setWhatsThis(self.tr( """<b>Current Color Value</b>""" """<p>This is the currently selected color value used for""" """ drawing.</p>""" )) self.__layout.addWidget(self.__colorTxt) - self.__colorButton = QPushButton(self.trUtf8("Select Color"), self) - self.__colorButton.setWhatsThis(self.trUtf8( + self.__colorButton = QPushButton(self.tr("Select Color"), self) + self.__colorButton.setWhatsThis(self.tr( """<b>Select Color</b>""" """<p>Select the current drawing color via a color selection""" """ dialog.</p>""" @@ -79,7 +79,7 @@ self.__colorAlpha = QSpinBox(self) self.__colorAlpha.setRange(0, 255) - self.__colorAlpha.setWhatsThis(self.trUtf8( + self.__colorAlpha.setWhatsThis(self.tr( """<b>Select alpha channel value</b>""" """<p>Select the value for the alpha channel of the current""" """ color.</p>""" @@ -87,20 +87,20 @@ self.__layout.addWidget(self.__colorAlpha) self.__colorAlpha.valueChanged[int].connect(self.__alphaChanged) - self.__compositingGroup = QGroupBox(self.trUtf8("Compositing"), self) + self.__compositingGroup = QGroupBox(self.tr("Compositing"), self) self.__compositingGroupLayout = QVBoxLayout(self.__compositingGroup) self.__compositingGroup.setLayout(self.__compositingGroupLayout) - self.__sourceButton = QRadioButton(self.trUtf8("Replace"), + self.__sourceButton = QRadioButton(self.tr("Replace"), self.__compositingGroup) - self.__sourceButton.setWhatsThis(self.trUtf8( + self.__sourceButton.setWhatsThis(self.tr( """<b>Replace</b>""" """<p>Replace the existing pixel with a new color.</p>""" )) self.__sourceButton.clicked[bool].connect(self.__compositingChanged) self.__compositingGroupLayout.addWidget(self.__sourceButton) - self.__sourceOverButton = QRadioButton(self.trUtf8("Blend"), + self.__sourceOverButton = QRadioButton(self.tr("Blend"), self.__compositingGroup) - self.__sourceOverButton.setWhatsThis(self.trUtf8( + self.__sourceOverButton.setWhatsThis(self.tr( """<b>Blend</b>""" """<p>Blend the new color over the existing pixel.</p>""" ))
--- a/IconEditor/IconEditorWindow.py Fri Jan 10 19:30:21 2014 +0100 +++ b/IconEditor/IconEditorWindow.py Sat Jan 11 11:55:33 2014 +0100 @@ -120,27 +120,27 @@ Private method to define the supported image file filters. """ filters = { - 'bmp': self.trUtf8("Windows Bitmap File (*.bmp)"), - 'gif': self.trUtf8("Graphic Interchange Format File (*.gif)"), - 'ico': self.trUtf8("Windows Icon File (*.ico)"), - 'jpg': self.trUtf8("JPEG File (*.jpg)"), - 'jpeg': self.trUtf8("JPEG File (*.jpeg)"), - 'mng': self.trUtf8("Multiple-Image Network Graphics File (*.mng)"), - 'pbm': self.trUtf8("Portable Bitmap File (*.pbm)"), - 'pcx': self.trUtf8("Paintbrush Bitmap File (*.pcx)"), - 'pgm': self.trUtf8("Portable Graymap File (*.pgm)"), - 'png': self.trUtf8("Portable Network Graphics File (*.png)"), - 'ppm': self.trUtf8("Portable Pixmap File (*.ppm)"), - 'sgi': self.trUtf8("Silicon Graphics Image File (*.sgi)"), - 'svg': self.trUtf8("Scalable Vector Graphics File (*.svg)"), - 'svgz': self.trUtf8("Compressed Scalable Vector Graphics File" - " (*.svgz)"), - 'tga': self.trUtf8("Targa Graphic File (*.tga)"), - 'tif': self.trUtf8("TIFF File (*.tif)"), - 'tiff': self.trUtf8("TIFF File (*.tiff)"), - 'wbmp': self.trUtf8("WAP Bitmap File (*.wbmp)"), - 'xbm': self.trUtf8("X11 Bitmap File (*.xbm)"), - 'xpm': self.trUtf8("X11 Pixmap File (*.xpm)"), + 'bmp': self.tr("Windows Bitmap File (*.bmp)"), + 'gif': self.tr("Graphic Interchange Format File (*.gif)"), + 'ico': self.tr("Windows Icon File (*.ico)"), + 'jpg': self.tr("JPEG File (*.jpg)"), + 'jpeg': self.tr("JPEG File (*.jpeg)"), + 'mng': self.tr("Multiple-Image Network Graphics File (*.mng)"), + 'pbm': self.tr("Portable Bitmap File (*.pbm)"), + 'pcx': self.tr("Paintbrush Bitmap File (*.pcx)"), + 'pgm': self.tr("Portable Graymap File (*.pgm)"), + 'png': self.tr("Portable Network Graphics File (*.png)"), + 'ppm': self.tr("Portable Pixmap File (*.ppm)"), + 'sgi': self.tr("Silicon Graphics Image File (*.sgi)"), + 'svg': self.tr("Scalable Vector Graphics File (*.svg)"), + 'svgz': self.tr("Compressed Scalable Vector Graphics File" + " (*.svgz)"), + 'tga': self.tr("Targa Graphic File (*.tga)"), + 'tif': self.tr("TIFF File (*.tif)"), + 'tiff': self.tr("TIFF File (*.tiff)"), + 'wbmp': self.tr("WAP Bitmap File (*.wbmp)"), + 'xbm': self.tr("X11 Bitmap File (*.xbm)"), + 'xpm': self.tr("X11 Pixmap File (*.xpm)"), } inputFormats = [] @@ -151,7 +151,7 @@ except KeyError: pass inputFormats.sort() - inputFormats.append(self.trUtf8("All Files (*)")) + inputFormats.append(self.tr("All Files (*)")) self.__inputFilter = ';;'.join(inputFormats) outputFormats = [] @@ -184,13 +184,13 @@ Private method to define the file related user interface actions. """ self.newAct = E5Action( - self.trUtf8('New'), + self.tr('New'), UI.PixmapCache.getIcon("new.png"), - self.trUtf8('&New'), - QKeySequence(self.trUtf8("Ctrl+N", "File|New")), + self.tr('&New'), + QKeySequence(self.tr("Ctrl+N", "File|New")), 0, self, 'iconEditor_file_new') - self.newAct.setStatusTip(self.trUtf8('Create a new icon')) - self.newAct.setWhatsThis(self.trUtf8( + self.newAct.setStatusTip(self.tr('Create a new icon')) + self.newAct.setWhatsThis(self.tr( """<b>New</b>""" """<p>This creates a new icon.</p>""" )) @@ -198,13 +198,13 @@ self.__actions.append(self.newAct) self.newWindowAct = E5Action( - self.trUtf8('New Window'), + self.tr('New Window'), UI.PixmapCache.getIcon("newWindow.png"), - self.trUtf8('New &Window'), + self.tr('New &Window'), 0, 0, self, 'iconEditor_file_new_window') - self.newWindowAct.setStatusTip(self.trUtf8( + self.newWindowAct.setStatusTip(self.tr( 'Open a new icon editor window')) - self.newWindowAct.setWhatsThis(self.trUtf8( + self.newWindowAct.setWhatsThis(self.tr( """<b>New Window</b>""" """<p>This opens a new icon editor window.</p>""" )) @@ -212,13 +212,13 @@ self.__actions.append(self.newWindowAct) self.openAct = E5Action( - self.trUtf8('Open'), + self.tr('Open'), UI.PixmapCache.getIcon("open.png"), - self.trUtf8('&Open...'), - QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), + self.tr('&Open...'), + QKeySequence(self.tr("Ctrl+O", "File|Open")), 0, self, 'iconEditor_file_open') - self.openAct.setStatusTip(self.trUtf8('Open an icon file for editing')) - self.openAct.setWhatsThis(self.trUtf8( + self.openAct.setStatusTip(self.tr('Open an icon file for editing')) + self.openAct.setWhatsThis(self.tr( """<b>Open File</b>""" """<p>This opens a new icon file for editing.""" """ It pops up a file selection dialog.</p>""" @@ -227,13 +227,13 @@ self.__actions.append(self.openAct) self.saveAct = E5Action( - self.trUtf8('Save'), + self.tr('Save'), UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('&Save'), - QKeySequence(self.trUtf8("Ctrl+S", "File|Save")), + self.tr('&Save'), + QKeySequence(self.tr("Ctrl+S", "File|Save")), 0, self, 'iconEditor_file_save') - self.saveAct.setStatusTip(self.trUtf8('Save the current icon')) - self.saveAct.setWhatsThis(self.trUtf8( + self.saveAct.setStatusTip(self.tr('Save the current icon')) + self.saveAct.setWhatsThis(self.tr( """<b>Save File</b>""" """<p>Save the contents of the icon editor window.</p>""" )) @@ -241,14 +241,14 @@ self.__actions.append(self.saveAct) 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, 'iconEditor_file_save_as') self.saveAsAct.setStatusTip( - self.trUtf8('Save the current icon to a new file')) - self.saveAsAct.setWhatsThis(self.trUtf8( + self.tr('Save the current icon to a new file')) + self.saveAsAct.setWhatsThis(self.tr( """<b>Save As...</b>""" """<p>Saves the current icon to a new file.</p>""" )) @@ -256,14 +256,14 @@ self.__actions.append(self.saveAsAct) 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, 'iconEditor_file_close') - self.closeAct.setStatusTip(self.trUtf8( + self.closeAct.setStatusTip(self.tr( 'Close the current icon editor window')) - self.closeAct.setWhatsThis(self.trUtf8( + self.closeAct.setWhatsThis(self.tr( """<b>Close</b>""" """<p>Closes the current icon editor window.</p>""" )) @@ -271,12 +271,12 @@ 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, 'iconEditor_file_close_all') - self.closeAllAct.setStatusTip(self.trUtf8( + self.closeAllAct.setStatusTip(self.tr( 'Close all icon editor windows')) - self.closeAllAct.setWhatsThis(self.trUtf8( + self.closeAllAct.setWhatsThis(self.tr( """<b>Close All</b>""" """<p>Closes all icon editor windows except the first one.</p>""" )) @@ -284,13 +284,13 @@ self.__actions.append(self.closeAllAct) 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, 'iconEditor_file_quit') - self.exitAct.setStatusTip(self.trUtf8('Quit the icon editor')) - self.exitAct.setWhatsThis(self.trUtf8( + self.exitAct.setStatusTip(self.tr('Quit the icon editor')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit</b>""" """<p>Quit the icon editor.</p>""" )) @@ -303,14 +303,14 @@ Private method to create the Edit actions. """ self.undoAct = E5Action( - self.trUtf8('Undo'), + self.tr('Undo'), UI.PixmapCache.getIcon("editUndo.png"), - self.trUtf8('&Undo'), - QKeySequence(self.trUtf8("Ctrl+Z", "Edit|Undo")), - QKeySequence(self.trUtf8("Alt+Backspace", "Edit|Undo")), + self.tr('&Undo'), + QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), + QKeySequence(self.tr("Alt+Backspace", "Edit|Undo")), self, 'iconEditor_edit_undo') - self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) - self.undoAct.setWhatsThis(self.trUtf8( + self.undoAct.setStatusTip(self.tr('Undo the last change')) + self.undoAct.setWhatsThis(self.tr( """<b>Undo</b>""" """<p>Undo the last change done.</p>""" )) @@ -318,13 +318,13 @@ self.__actions.append(self.undoAct) self.redoAct = E5Action( - self.trUtf8('Redo'), + self.tr('Redo'), UI.PixmapCache.getIcon("editRedo.png"), - self.trUtf8('&Redo'), - QKeySequence(self.trUtf8("Ctrl+Shift+Z", "Edit|Redo")), + self.tr('&Redo'), + QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), 0, self, 'iconEditor_edit_redo') - self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) - self.redoAct.setWhatsThis(self.trUtf8( + self.redoAct.setStatusTip(self.tr('Redo the last change')) + self.redoAct.setWhatsThis(self.tr( """<b>Redo</b>""" """<p>Redo the last change done.</p>""" )) @@ -332,14 +332,14 @@ self.__actions.append(self.redoAct) self.cutAct = E5Action( - self.trUtf8('Cut'), + self.tr('Cut'), UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8('Cu&t'), - QKeySequence(self.trUtf8("Ctrl+X", "Edit|Cut")), - QKeySequence(self.trUtf8("Shift+Del", "Edit|Cut")), + self.tr('Cu&t'), + QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), + QKeySequence(self.tr("Shift+Del", "Edit|Cut")), self, 'iconEditor_edit_cut') - self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) - self.cutAct.setWhatsThis(self.trUtf8( + self.cutAct.setStatusTip(self.tr('Cut the selection')) + self.cutAct.setWhatsThis(self.tr( """<b>Cut</b>""" """<p>Cut the selected image area to the clipboard.</p>""" )) @@ -347,14 +347,14 @@ self.__actions.append(self.cutAct) self.copyAct = E5Action( - self.trUtf8('Copy'), + self.tr('Copy'), UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), - QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), - QKeySequence(self.trUtf8("Ctrl+Ins", "Edit|Copy")), + self.tr('&Copy'), + QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), + QKeySequence(self.tr("Ctrl+Ins", "Edit|Copy")), self, 'iconEditor_edit_copy') - self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) - self.copyAct.setWhatsThis(self.trUtf8( + self.copyAct.setStatusTip(self.tr('Copy the selection')) + self.copyAct.setWhatsThis(self.tr( """<b>Copy</b>""" """<p>Copy the selected image area to the clipboard.</p>""" )) @@ -362,14 +362,14 @@ self.__actions.append(self.copyAct) self.pasteAct = E5Action( - self.trUtf8('Paste'), + self.tr('Paste'), UI.PixmapCache.getIcon("editPaste.png"), - self.trUtf8('&Paste'), - QKeySequence(self.trUtf8("Ctrl+V", "Edit|Paste")), - QKeySequence(self.trUtf8("Shift+Ins", "Edit|Paste")), + self.tr('&Paste'), + QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), + QKeySequence(self.tr("Shift+Ins", "Edit|Paste")), self, 'iconEditor_edit_paste') - self.pasteAct.setStatusTip(self.trUtf8('Paste the clipboard image')) - self.pasteAct.setWhatsThis(self.trUtf8( + self.pasteAct.setStatusTip(self.tr('Paste the clipboard image')) + self.pasteAct.setWhatsThis(self.tr( """<b>Paste</b>""" """<p>Paste the clipboard image.</p>""" )) @@ -377,12 +377,12 @@ self.__actions.append(self.pasteAct) self.pasteNewAct = E5Action( - self.trUtf8('Paste as New'), - self.trUtf8('Paste as &New'), + self.tr('Paste as New'), + self.tr('Paste as &New'), 0, 0, self, 'iconEditor_edit_paste_as_new') - self.pasteNewAct.setStatusTip(self.trUtf8( + self.pasteNewAct.setStatusTip(self.tr( 'Paste the clipboard image replacing the current one')) - self.pasteNewAct.setWhatsThis(self.trUtf8( + self.pasteNewAct.setWhatsThis(self.tr( """<b>Paste as New</b>""" """<p>Paste the clipboard image replacing the current one.</p>""" )) @@ -390,14 +390,14 @@ self.__actions.append(self.pasteNewAct) self.deleteAct = E5Action( - self.trUtf8('Clear'), + self.tr('Clear'), UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8('Cl&ear'), - QKeySequence(self.trUtf8("Alt+Shift+C", "Edit|Clear")), + self.tr('Cl&ear'), + QKeySequence(self.tr("Alt+Shift+C", "Edit|Clear")), 0, self, 'iconEditor_edit_clear') - self.deleteAct.setStatusTip(self.trUtf8('Clear the icon image')) - self.deleteAct.setWhatsThis(self.trUtf8( + self.deleteAct.setStatusTip(self.tr('Clear the icon image')) + self.deleteAct.setWhatsThis(self.tr( """<b>Clear</b>""" """<p>Clear the icon image and set it to be completely""" """ transparent.</p>""" @@ -406,14 +406,14 @@ self.__actions.append(self.deleteAct) self.selectAllAct = E5Action( - self.trUtf8('Select All'), - self.trUtf8('&Select All'), - QKeySequence(self.trUtf8("Ctrl+A", "Edit|Select All")), + self.tr('Select All'), + self.tr('&Select All'), + QKeySequence(self.tr("Ctrl+A", "Edit|Select All")), 0, self, 'iconEditor_edit_select_all') - self.selectAllAct.setStatusTip(self.trUtf8( + self.selectAllAct.setStatusTip(self.tr( 'Select the complete icon image')) - self.selectAllAct.setWhatsThis(self.trUtf8( + self.selectAllAct.setWhatsThis(self.tr( """<b>Select All</b>""" """<p>Selects the complete icon image.</p>""" )) @@ -421,13 +421,13 @@ self.__actions.append(self.selectAllAct) self.resizeAct = E5Action( - self.trUtf8('Change Size'), + self.tr('Change Size'), UI.PixmapCache.getIcon("transformResize.png"), - self.trUtf8('Change Si&ze...'), + self.tr('Change Si&ze...'), 0, 0, self, 'iconEditor_edit_change_size') - self.resizeAct.setStatusTip(self.trUtf8('Change the icon size')) - self.resizeAct.setWhatsThis(self.trUtf8( + self.resizeAct.setStatusTip(self.tr('Change the icon size')) + self.resizeAct.setWhatsThis(self.tr( """<b>Change Size...</b>""" """<p>Changes the icon size.</p>""" )) @@ -435,14 +435,14 @@ self.__actions.append(self.resizeAct) self.grayscaleAct = E5Action( - self.trUtf8('Grayscale'), + self.tr('Grayscale'), UI.PixmapCache.getIcon("grayscale.png"), - self.trUtf8('&Grayscale'), + self.tr('&Grayscale'), 0, 0, self, 'iconEditor_edit_grayscale') - self.grayscaleAct.setStatusTip(self.trUtf8( + self.grayscaleAct.setStatusTip(self.tr( 'Change the icon to grayscale')) - self.grayscaleAct.setWhatsThis(self.trUtf8( + self.grayscaleAct.setWhatsThis(self.tr( """<b>Grayscale</b>""" """<p>Changes the icon to grayscale.</p>""" )) @@ -472,13 +472,13 @@ Private method to create the View actions. """ 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")), + self.tr('Zoom &in'), + QKeySequence(self.tr("Ctrl++", "View|Zoom in")), 0, self, 'iconEditor_view_zoom_in') - self.zoomInAct.setStatusTip(self.trUtf8('Zoom in on the icon')) - self.zoomInAct.setWhatsThis(self.trUtf8( + self.zoomInAct.setStatusTip(self.tr('Zoom in on the icon')) + self.zoomInAct.setWhatsThis(self.tr( """<b>Zoom in</b>""" """<p>Zoom in on the icon. This makes the grid bigger.</p>""" )) @@ -486,13 +486,13 @@ 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")), + self.tr('Zoom &out'), + QKeySequence(self.tr("Ctrl+-", "View|Zoom out")), 0, self, 'iconEditor_view_zoom_out') - self.zoomOutAct.setStatusTip(self.trUtf8('Zoom out on the icon')) - self.zoomOutAct.setWhatsThis(self.trUtf8( + self.zoomOutAct.setStatusTip(self.tr('Zoom out on the icon')) + self.zoomOutAct.setWhatsThis(self.tr( """<b>Zoom out</b>""" """<p>Zoom out on the icon. This makes the grid smaller.</p>""" )) @@ -500,14 +500,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, 'iconEditor_view_zoom_reset') - self.zoomResetAct.setStatusTip(self.trUtf8( + self.zoomResetAct.setStatusTip(self.tr( 'Reset the zoom of the icon')) - self.zoomResetAct.setWhatsThis(self.trUtf8( + self.zoomResetAct.setWhatsThis(self.tr( """<b>Zoom reset</b>""" """<p>Reset the zoom of the icon. """ """This sets the zoom factor to 100%.</p>""" @@ -516,14 +516,14 @@ self.__actions.append(self.zoomResetAct) self.showGridAct = E5Action( - self.trUtf8('Show Grid'), + self.tr('Show Grid'), UI.PixmapCache.getIcon("grid.png"), - self.trUtf8('Show &Grid'), + self.tr('Show &Grid'), 0, 0, self, 'iconEditor_view_show_grid') - self.showGridAct.setStatusTip(self.trUtf8( + self.showGridAct.setStatusTip(self.tr( 'Toggle the display of the grid')) - self.showGridAct.setWhatsThis(self.trUtf8( + self.showGridAct.setWhatsThis(self.tr( """<b>Show Grid</b>""" """<p>Toggle the display of the grid.</p>""" )) @@ -543,12 +543,12 @@ self.drawingActGrp.setExclusive(True) self.drawPencilAct = E5Action( - self.trUtf8('Freehand'), + self.tr('Freehand'), UI.PixmapCache.getIcon("drawBrush.png"), - self.trUtf8('&Freehand'), + self.tr('&Freehand'), 0, 0, self.drawingActGrp, 'iconEditor_tools_pencil') - self.drawPencilAct.setWhatsThis(self.trUtf8( + self.drawPencilAct.setWhatsThis(self.tr( """<b>Free hand</b>""" """<p>Draws non linear lines.</p>""" )) @@ -558,12 +558,12 @@ self.__actions.append(self.drawPencilAct) self.drawColorPickerAct = E5Action( - self.trUtf8('Color Picker'), + self.tr('Color Picker'), UI.PixmapCache.getIcon("colorPicker.png"), - self.trUtf8('&Color Picker'), + self.tr('&Color Picker'), 0, 0, self.drawingActGrp, 'iconEditor_tools_color_picker') - self.drawColorPickerAct.setWhatsThis(self.trUtf8( + self.drawColorPickerAct.setWhatsThis(self.tr( """<b>Color Picker</b>""" """<p>The color of the pixel clicked on will become """ """the current draw color.</p>""" @@ -575,12 +575,12 @@ self.__actions.append(self.drawColorPickerAct) self.drawRectangleAct = E5Action( - self.trUtf8('Rectangle'), + self.tr('Rectangle'), UI.PixmapCache.getIcon("drawRectangle.png"), - self.trUtf8('&Rectangle'), + self.tr('&Rectangle'), 0, 0, self.drawingActGrp, 'iconEditor_tools_rectangle') - self.drawRectangleAct.setWhatsThis(self.trUtf8( + self.drawRectangleAct.setWhatsThis(self.tr( """<b>Rectangle</b>""" """<p>Draw a rectangle.</p>""" )) @@ -590,12 +590,12 @@ self.__actions.append(self.drawRectangleAct) self.drawFilledRectangleAct = E5Action( - self.trUtf8('Filled Rectangle'), + self.tr('Filled Rectangle'), UI.PixmapCache.getIcon("drawRectangleFilled.png"), - self.trUtf8('F&illed Rectangle'), + self.tr('F&illed Rectangle'), 0, 0, self.drawingActGrp, 'iconEditor_tools_filled_rectangle') - self.drawFilledRectangleAct.setWhatsThis(self.trUtf8( + self.drawFilledRectangleAct.setWhatsThis(self.tr( """<b>Filled Rectangle</b>""" """<p>Draw a filled rectangle.</p>""" )) @@ -606,12 +606,12 @@ self.__actions.append(self.drawFilledRectangleAct) self.drawCircleAct = E5Action( - self.trUtf8('Circle'), + self.tr('Circle'), UI.PixmapCache.getIcon("drawCircle.png"), - self.trUtf8('Circle'), + self.tr('Circle'), 0, 0, self.drawingActGrp, 'iconEditor_tools_circle') - self.drawCircleAct.setWhatsThis(self.trUtf8( + self.drawCircleAct.setWhatsThis(self.tr( """<b>Circle</b>""" """<p>Draw a circle.</p>""" )) @@ -621,12 +621,12 @@ self.__actions.append(self.drawCircleAct) self.drawFilledCircleAct = E5Action( - self.trUtf8('Filled Circle'), + self.tr('Filled Circle'), UI.PixmapCache.getIcon("drawCircleFilled.png"), - self.trUtf8('Fille&d Circle'), + self.tr('Fille&d Circle'), 0, 0, self.drawingActGrp, 'iconEditor_tools_filled_circle') - self.drawFilledCircleAct.setWhatsThis(self.trUtf8( + self.drawFilledCircleAct.setWhatsThis(self.tr( """<b>Filled Circle</b>""" """<p>Draw a filled circle.</p>""" )) @@ -637,12 +637,12 @@ self.__actions.append(self.drawFilledCircleAct) self.drawEllipseAct = E5Action( - self.trUtf8('Ellipse'), + self.tr('Ellipse'), UI.PixmapCache.getIcon("drawEllipse.png"), - self.trUtf8('&Ellipse'), + self.tr('&Ellipse'), 0, 0, self.drawingActGrp, 'iconEditor_tools_ellipse') - self.drawEllipseAct.setWhatsThis(self.trUtf8( + self.drawEllipseAct.setWhatsThis(self.tr( """<b>Ellipse</b>""" """<p>Draw an ellipse.</p>""" )) @@ -652,12 +652,12 @@ self.__actions.append(self.drawEllipseAct) self.drawFilledEllipseAct = E5Action( - self.trUtf8('Filled Ellipse'), + self.tr('Filled Ellipse'), UI.PixmapCache.getIcon("drawEllipseFilled.png"), - self.trUtf8('Fille&d Elli&pse'), + self.tr('Fille&d Elli&pse'), 0, 0, self.drawingActGrp, 'iconEditor_tools_filled_ellipse') - self.drawFilledEllipseAct.setWhatsThis(self.trUtf8( + self.drawFilledEllipseAct.setWhatsThis(self.tr( """<b>Filled Ellipse</b>""" """<p>Draw a filled ellipse.</p>""" )) @@ -668,12 +668,12 @@ self.__actions.append(self.drawFilledEllipseAct) self.drawFloodFillAct = E5Action( - self.trUtf8('Flood Fill'), + self.tr('Flood Fill'), UI.PixmapCache.getIcon("drawFill.png"), - self.trUtf8('Fl&ood Fill'), + self.tr('Fl&ood Fill'), 0, 0, self.drawingActGrp, 'iconEditor_tools_flood_fill') - self.drawFloodFillAct.setWhatsThis(self.trUtf8( + self.drawFloodFillAct.setWhatsThis(self.tr( """<b>Flood Fill</b>""" """<p>Fill adjoining pixels with the same color with """ """the current color.</p>""" @@ -684,12 +684,12 @@ self.__actions.append(self.drawFloodFillAct) self.drawLineAct = E5Action( - self.trUtf8('Line'), + self.tr('Line'), UI.PixmapCache.getIcon("drawLine.png"), - self.trUtf8('&Line'), + self.tr('&Line'), 0, 0, self.drawingActGrp, 'iconEditor_tools_line') - self.drawLineAct.setWhatsThis(self.trUtf8( + self.drawLineAct.setWhatsThis(self.tr( """<b>Line</b>""" """<p>Draw a line.</p>""" )) @@ -699,12 +699,12 @@ self.__actions.append(self.drawLineAct) self.drawEraserAct = E5Action( - self.trUtf8('Eraser (Transparent)'), + self.tr('Eraser (Transparent)'), UI.PixmapCache.getIcon("drawEraser.png"), - self.trUtf8('Eraser (&Transparent)'), + self.tr('Eraser (&Transparent)'), 0, 0, self.drawingActGrp, 'iconEditor_tools_eraser') - self.drawEraserAct.setWhatsThis(self.trUtf8( + self.drawEraserAct.setWhatsThis(self.tr( """<b>Eraser (Transparent)</b>""" """<p>Erase pixels by setting them to transparent.</p>""" )) @@ -714,12 +714,12 @@ self.__actions.append(self.drawEraserAct) self.drawRectangleSelectionAct = E5Action( - self.trUtf8('Rectangular Selection'), + self.tr('Rectangular Selection'), UI.PixmapCache.getIcon("selectRectangle.png"), - self.trUtf8('Rect&angular Selection'), + self.tr('Rect&angular Selection'), 0, 0, self.drawingActGrp, 'iconEditor_tools_selection_rectangle') - self.drawRectangleSelectionAct.setWhatsThis(self.trUtf8( + self.drawRectangleSelectionAct.setWhatsThis(self.tr( """<b>Rectangular Selection</b>""" """<p>Select a rectangular section of the icon using""" """ the mouse.</p>""" @@ -731,12 +731,12 @@ self.__actions.append(self.drawRectangleSelectionAct) self.drawCircleSelectionAct = E5Action( - self.trUtf8('Circular Selection'), + self.tr('Circular Selection'), UI.PixmapCache.getIcon("selectCircle.png"), - self.trUtf8('Rect&angular Selection'), + self.tr('Rect&angular Selection'), 0, 0, self.drawingActGrp, 'iconEditor_tools_selection_circle') - self.drawCircleSelectionAct.setWhatsThis(self.trUtf8( + self.drawCircleSelectionAct.setWhatsThis(self.tr( """<b>Circular Selection</b>""" """<p>Select a circular section of the icon using""" """ the mouse.</p>""" @@ -754,24 +754,24 @@ Private method to create the Help actions. """ self.aboutAct = E5Action( - self.trUtf8('About'), - self.trUtf8('&About'), + self.tr('About'), + self.tr('&About'), 0, 0, self, 'iconEditor_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>""")) self.aboutAct.triggered[()].connect(self.__about) 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, 'iconEditor_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>""" )) @@ -779,13 +779,13 @@ self.__actions.append(self.aboutQtAct) 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, 'iconEditor_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""" @@ -802,7 +802,7 @@ """ mb = self.menuBar() - menu = mb.addMenu(self.trUtf8('&File')) + menu = mb.addMenu(self.tr('&File')) menu.setTearOffEnabled(True) menu.addAction(self.newAct) menu.addAction(self.newWindowAct) @@ -817,7 +817,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.undoAct) menu.addAction(self.redoAct) @@ -833,7 +833,7 @@ menu.addAction(self.resizeAct) menu.addAction(self.grayscaleAct) - menu = mb.addMenu(self.trUtf8('&View')) + menu = mb.addMenu(self.tr('&View')) menu.setTearOffEnabled(True) menu.addAction(self.zoomInAct) menu.addAction(self.zoomResetAct) @@ -841,7 +841,7 @@ menu.addSeparator() menu.addAction(self.showGridAct) - menu = mb.addMenu(self.trUtf8('&Tools')) + menu = mb.addMenu(self.tr('&Tools')) menu.setTearOffEnabled(True) menu.addAction(self.drawPencilAct) menu.addAction(self.drawColorPickerAct) @@ -860,7 +860,7 @@ mb.addSeparator() - menu = mb.addMenu(self.trUtf8("&Help")) + menu = mb.addMenu(self.tr("&Help")) menu.addAction(self.aboutAct) menu.addAction(self.aboutQtAct) menu.addSeparator() @@ -870,7 +870,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.newAct) @@ -884,7 +884,7 @@ if not self.fromEric: filetb.addAction(self.exitAct) - edittb = self.addToolBar(self.trUtf8("Edit")) + edittb = self.addToolBar(self.tr("Edit")) edittb.setObjectName("EditToolBar") edittb.setIconSize(UI.Config.ToolBarIconSize) edittb.addAction(self.undoAct) @@ -897,12 +897,12 @@ edittb.addAction(self.resizeAct) edittb.addAction(self.grayscaleAct) - viewtb = self.addToolBar(self.trUtf8("View")) + viewtb = self.addToolBar(self.tr("View")) viewtb.setObjectName("ViewToolBar") viewtb.setIconSize(UI.Config.ToolBarIconSize) viewtb.addAction(self.showGridAct) - toolstb = self.addToolBar(self.trUtf8("Tools")) + toolstb = self.addToolBar(self.tr("Tools")) toolstb.setObjectName("ToolsToolBar") toolstb.setIconSize(UI.Config.ToolBarIconSize) toolstb.addAction(self.drawPencilAct) @@ -920,7 +920,7 @@ toolstb.addAction(self.drawRectangleSelectionAct) toolstb.addAction(self.drawCircleSelectionAct) - helptb = self.addToolBar(self.trUtf8("Help")) + helptb = self.addToolBar(self.tr("Help")) helptb.setObjectName("HelpToolBar") helptb.setIconSize(UI.Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) @@ -934,14 +934,14 @@ self.__sbSize = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.__sbSize) - self.__sbSize.setWhatsThis(self.trUtf8( + self.__sbSize.setWhatsThis(self.tr( """<p>This part of the status bar displays the icon size.</p>""" )) self.__updateSize(*self.__editor.iconSize()) self.__sbPos = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.__sbPos) - self.__sbPos.setWhatsThis(self.trUtf8( + self.__sbPos.setWhatsThis(self.tr( """<p>This part of the status bar displays the cursor""" """ position.</p>""" )) @@ -1039,7 +1039,7 @@ fileName = E5FileDialog.getOpenFileNameAndFilter( self, - self.trUtf8("Open icon file"), + self.tr("Open icon file"), self.__lastOpenPath, self.__inputFilter, self.__defaultFilter)[0] @@ -1073,7 +1073,7 @@ fileName, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save icon file"), + self.tr("Save icon file"), self.__lastSavePath, self.__outputFilter, self.__defaultFilter, @@ -1089,9 +1089,9 @@ if QFileInfo(fileName).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save icon file"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fileName), + self.tr("Save icon file"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fileName), icon=E5MessageBox.Warning) if not res: return False @@ -1118,15 +1118,15 @@ file = QFile(fileName) if not file.exists(): E5MessageBox.warning( - self, self.trUtf8("eric5 Icon Editor"), - self.trUtf8("The file '{0}' does not exist.") + self, self.tr("eric5 Icon Editor"), + self.tr("The file '{0}' does not exist.") .format(fileName)) return if not file.open(QFile.ReadOnly): E5MessageBox.warning( - self, self.trUtf8("eric5 Icon Editor"), - self.trUtf8("Cannot read file '{0}:\n{1}.") + self, self.tr("eric5 Icon Editor"), + self.tr("Cannot read file '{0}:\n{1}.") .format(fileName, file.errorString())) return file.close() @@ -1145,8 +1145,8 @@ file = QFile(fileName) if not file.open(QFile.WriteOnly): E5MessageBox.warning( - self, self.trUtf8("eric5 Icon Editor"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self, self.tr("eric5 Icon Editor"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) self.__checkActions() @@ -1159,8 +1159,8 @@ if not res: E5MessageBox.warning( - self, self.trUtf8("eric5 Icon Editor"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self, self.tr("eric5 Icon Editor"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) self.__checkActions() @@ -1170,7 +1170,7 @@ self.__editor.setDirty(False, setCleanState=True) self.__setCurrentFile(fileName) - self.__statusBar.showMessage(self.trUtf8("Icon saved"), 2000) + self.__statusBar.showMessage(self.tr("Icon saved"), 2000) self.__checkActions() @@ -1185,12 +1185,12 @@ self.__fileName = fileName if not self.__fileName: - shownName = self.trUtf8("Untitled") + shownName = self.tr("Untitled") else: shownName = self.__strippedName(self.__fileName) - self.setWindowTitle(self.trUtf8("{0}[*] - {1}") - .format(shownName, self.trUtf8("Icon Editor"))) + self.setWindowTitle(self.tr("{0}[*] - {1}") + .format(shownName, self.tr("Icon Editor"))) self.setWindowModified(self.__editor.isDirty()) @@ -1212,8 +1212,8 @@ if self.__editor.isDirty(): ret = E5MessageBox.okToClearData( self, - self.trUtf8("eric5 Icon Editor"), - self.trUtf8("""The icon image has unsaved changes."""), + self.tr("eric5 Icon Editor"), + self.tr("""The icon image has unsaved changes."""), self.__saveIcon) if not ret: return False @@ -1301,9 +1301,9 @@ Private slot to show a little About message. """ E5MessageBox.about( - self, self.trUtf8("About eric5 Icon Editor"), - self.trUtf8("The eric5 Icon Editor is a simple editor component" - " to perform icon drawing tasks.")) + self, self.tr("About eric5 Icon Editor"), + self.tr("The eric5 Icon Editor is a simple editor component" + " to perform icon drawing tasks.")) def __aboutQt(self): """
--- a/MultiProject/AddProjectDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/MultiProject/AddProjectDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -44,7 +44,7 @@ self.__okButton.setEnabled(False) if project is not None: - self.setWindowTitle(self.trUtf8("Project Properties")) + self.setWindowTitle(self.tr("Project Properties")) self.filenameEdit.setReadOnly(True) self.fileButton.setEnabled(False) @@ -64,9 +64,9 @@ startdir = self.startdir projectFile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Add Project"), + self.tr("Add Project"), startdir, - self.trUtf8("Project Files (*.e4p)")) + self.tr("Project Files (*.e4p)")) if projectFile: self.filenameEdit.setText(
--- a/MultiProject/MultiProject.py Fri Jan 10 19:30:21 2014 +0100 +++ b/MultiProject/MultiProject.py Sat Jan 11 11:55:33 2014 +0100 @@ -207,8 +207,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.ui, - self.trUtf8("Read multiproject file"), - self.trUtf8( + self.tr("Read multiproject file"), + self.tr( "<p>The multiproject file <b>{0}</b> could not be" " read.</p>").format(fn)) return False @@ -250,8 +250,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Save multiproject file"), - self.trUtf8( + self.tr("Save multiproject file"), + self.tr( "<p>The multiproject file <b>{0}</b> could not be " "written.</p>").format(fn)) res = False @@ -417,10 +417,10 @@ if fn is None: fn = E5FileDialog.getOpenFileName( self.parent(), - self.trUtf8("Open multiproject"), + self.tr("Open multiproject"), Preferences.getMultiProject("Workspace") or Utilities.getHomeDir(), - self.trUtf8("Multiproject Files (*.e4m)")) + self.tr("Multiproject Files (*.e4m)")) if fn == "": fn = None @@ -470,7 +470,7 @@ @return flag indicating success (boolean) """ - defaultFilter = self.trUtf8("Multiproject Files (*.e4m)") + defaultFilter = self.tr("Multiproject Files (*.e4m)") if self.ppath: defaultPath = self.ppath else: @@ -478,9 +478,9 @@ Utilities.getHomeDir() fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self.parent(), - self.trUtf8("Save multiproject as"), + self.tr("Save multiproject as"), defaultPath, - self.trUtf8("Multiproject Files (*.e4m)"), + self.tr("Multiproject Files (*.e4m)"), defaultFilter, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -493,9 +493,9 @@ if QFileInfo(fn).exists(): res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Save File"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fn), + self.tr("Save File"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fn), icon=E5MessageBox.Warning) if not res: return False @@ -518,8 +518,8 @@ if self.isDirty(): res = E5MessageBox.okToClearData( self.parent(), - self.trUtf8("Close Multiproject"), - self.trUtf8("The current multiproject has unsaved changes."), + self.tr("Close Multiproject"), + self.tr("The current multiproject has unsaved changes."), self.saveMultiProject) if res: self.setDirty(False) @@ -571,12 +571,12 @@ self.actGrp1 = createActionGroup(self) act = E5Action( - self.trUtf8('New multiproject'), + self.tr('New multiproject'), UI.PixmapCache.getIcon("multiProjectNew.png"), - self.trUtf8('&New...'), 0, 0, + self.tr('&New...'), 0, 0, self.actGrp1, 'multi_project_new') - act.setStatusTip(self.trUtf8('Generate a new multiproject')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Generate a new multiproject')) + act.setWhatsThis(self.tr( """<b>New...</b>""" """<p>This opens a dialog for entering the info for a""" """ new multiproject.</p>""" @@ -585,12 +585,12 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Open multiproject'), + self.tr('Open multiproject'), UI.PixmapCache.getIcon("multiProjectOpen.png"), - self.trUtf8('&Open...'), 0, 0, + self.tr('&Open...'), 0, 0, self.actGrp1, 'multi_project_open') - act.setStatusTip(self.trUtf8('Open an existing multiproject')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Open an existing multiproject')) + act.setWhatsThis(self.tr( """<b>Open...</b>""" """<p>This opens an existing multiproject.</p>""" )) @@ -598,12 +598,12 @@ self.actions.append(act) self.closeAct = E5Action( - self.trUtf8('Close multiproject'), + self.tr('Close multiproject'), UI.PixmapCache.getIcon("multiProjectClose.png"), - self.trUtf8('&Close'), 0, 0, self, 'multi_project_close') - self.closeAct.setStatusTip(self.trUtf8( + self.tr('&Close'), 0, 0, self, 'multi_project_close') + self.closeAct.setStatusTip(self.tr( 'Close the current multiproject')) - self.closeAct.setWhatsThis(self.trUtf8( + self.closeAct.setWhatsThis(self.tr( """<b>Close</b>""" """<p>This closes the current multiproject.</p>""" )) @@ -611,11 +611,11 @@ self.actions.append(self.closeAct) self.saveAct = E5Action( - self.trUtf8('Save multiproject'), + self.tr('Save multiproject'), UI.PixmapCache.getIcon("multiProjectSave.png"), - self.trUtf8('&Save'), 0, 0, self, 'multi_project_save') - self.saveAct.setStatusTip(self.trUtf8('Save the current multiproject')) - self.saveAct.setWhatsThis(self.trUtf8( + self.tr('&Save'), 0, 0, self, 'multi_project_save') + self.saveAct.setStatusTip(self.tr('Save the current multiproject')) + self.saveAct.setWhatsThis(self.tr( """<b>Save</b>""" """<p>This saves the current multiproject.</p>""" )) @@ -623,13 +623,13 @@ self.actions.append(self.saveAct) self.saveasAct = E5Action( - self.trUtf8('Save multiproject as'), + self.tr('Save multiproject as'), UI.PixmapCache.getIcon("multiProjectSaveAs.png"), - self.trUtf8('Save &as...'), 0, 0, self, + self.tr('Save &as...'), 0, 0, self, 'multi_project_save_as') - self.saveasAct.setStatusTip(self.trUtf8( + self.saveasAct.setStatusTip(self.tr( 'Save the current multiproject to a new file')) - self.saveasAct.setWhatsThis(self.trUtf8( + self.saveasAct.setWhatsThis(self.tr( """<b>Save as</b>""" """<p>This saves the current multiproject to a new file.</p>""" )) @@ -637,13 +637,13 @@ self.actions.append(self.saveasAct) self.addProjectAct = E5Action( - self.trUtf8('Add project to multiproject'), + self.tr('Add project to multiproject'), UI.PixmapCache.getIcon("fileProject.png"), - self.trUtf8('Add &project...'), 0, 0, + self.tr('Add &project...'), 0, 0, self, 'multi_project_add_project') - self.addProjectAct.setStatusTip(self.trUtf8( + self.addProjectAct.setStatusTip(self.tr( 'Add a project to the current multiproject')) - self.addProjectAct.setWhatsThis(self.trUtf8( + self.addProjectAct.setWhatsThis(self.tr( """<b>Add project...</b>""" """<p>This opens a dialog for adding a project""" """ to the current multiproject.</p>""" @@ -652,13 +652,13 @@ self.actions.append(self.addProjectAct) self.propsAct = E5Action( - self.trUtf8('Multiproject properties'), + self.tr('Multiproject properties'), UI.PixmapCache.getIcon("multiProjectProps.png"), - self.trUtf8('&Properties...'), 0, 0, self, + self.tr('&Properties...'), 0, 0, self, 'multi_project_properties') - self.propsAct.setStatusTip(self.trUtf8( + self.propsAct.setStatusTip(self.tr( 'Show the multiproject properties')) - self.propsAct.setWhatsThis(self.trUtf8( + self.propsAct.setWhatsThis(self.tr( """<b>Properties...</b>""" """<p>This shows a dialog to edit the multiproject""" """ properties.</p>""" @@ -678,8 +678,8 @@ @return the menu generated (QMenu) """ - menu = QMenu(self.trUtf8('&Multiproject'), self.parent()) - self.recentMenu = QMenu(self.trUtf8('Open &Recent Multiprojects'), + menu = QMenu(self.tr('&Multiproject'), self.parent()) + self.recentMenu = QMenu(self.tr('Open &Recent Multiprojects'), menu) self.__menus = { @@ -717,10 +717,10 @@ (E5ToolBarManager) @return the toolbar generated (QToolBar) """ - tb = QToolBar(self.trUtf8("Multiproject"), self.ui) + tb = QToolBar(self.tr("Multiproject"), self.ui) tb.setIconSize(UI.Config.ToolBarIconSize) tb.setObjectName("MultiProjectToolbar") - tb.setToolTip(self.trUtf8('Multiproject')) + tb.setToolTip(self.tr('Multiproject')) tb.addActions(self.actGrp1.actions()) tb.addAction(self.closeAct) @@ -779,7 +779,7 @@ idx += 1 self.recentMenu.addSeparator() - self.recentMenu.addAction(self.trUtf8('&Clear'), self.__clearRecent) + self.recentMenu.addAction(self.tr('&Clear'), self.__clearRecent) def __openRecent(self, act): """
--- a/MultiProject/MultiProjectBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/MultiProject/MultiProjectBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -245,21 +245,21 @@ Private method to create the popup menu. """ self.__menu = QMenu(self) - self.__menu.addAction(self.trUtf8("Open"), self.__openItem) - self.__menu.addAction(self.trUtf8("Remove"), self.__removeProject) - self.__menu.addAction(self.trUtf8("Properties"), + self.__menu.addAction(self.tr("Open"), self.__openItem) + self.__menu.addAction(self.tr("Remove"), self.__removeProject) + self.__menu.addAction(self.tr("Properties"), self.__showProjectProperties) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8("Add Project..."), + self.__menu.addAction(self.tr("Add Project..."), self.__addNewProject) 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("Add Project..."), + self.__backMenu.addAction(self.tr("Add Project..."), self.__addNewProject) self.__backMenu.addSeparator() - self.__backMenu.addAction(self.trUtf8("Configure..."), + self.__backMenu.addAction(self.tr("Configure..."), self.__configure) def __configure(self):
--- a/Network/IRC/IrcChannelWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcChannelWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -357,8 +357,8 @@ if self.__private: E5MessageBox.information( self, - self.trUtf8("Send Message"), - self.trUtf8( + self.tr("Send Message"), + self.tr( """Messages starting with a '/' are not allowed""" """ in private chats.""")) else: @@ -384,8 +384,8 @@ """ ok = E5MessageBox.yesNo( self, - self.trUtf8("Leave IRC channel"), - self.trUtf8( + self.tr("Leave IRC channel"), + self.tr( """Do you really want to leave the IRC channel <b>{0}</b>?""") .format(self.__name)) if ok: @@ -525,12 +525,12 @@ if Preferences.getIrc("NotifyMessage"): self.__ui.showNotification( UI.PixmapCache.getPixmap("irc48.png"), - self.trUtf8("Channel Message"), msg) + self.tr("Channel Message"), msg) elif Preferences.getIrc("NotifyNick") and \ self.__userName.lower() in msg.lower(): self.__ui.showNotification( UI.PixmapCache.getPixmap("irc48.png"), - self.trUtf8("Nick mentioned"), msg) + self.tr("Nick mentioned"), msg) def addUsers(self, users): """ @@ -553,13 +553,13 @@ if match.group(3).lower() == self.__name.lower(): if self.__userName != match.group(1): IrcUserItem(match.group(1), self.usersList) - msg = self.trUtf8( + msg = self.tr( "{0} has joined the channel {1} ({2}).").format( match.group(1), self.__name, match.group(2)) self.__addManagementMessage( IrcChannelWidget.JoinIndicator, msg) else: - msg = self.trUtf8( + msg = self.tr( "You have joined the channel {0} ({1}).").format( self.__name, match.group(2)) self.__addManagementMessage( @@ -568,7 +568,7 @@ Preferences.getIrc("NotifyJoinPart"): self.__ui.showNotification( UI.PixmapCache.getPixmap("irc48.png"), - self.trUtf8("Join Channel"), msg) + self.tr("Join Channel"), msg) return True return False @@ -585,15 +585,15 @@ self.usersList.takeItem(self.usersList.row(itm)) del itm if match.lastindex == 2: - msg = self.trUtf8("{0} has left {1}.").format( + msg = self.tr("{0} has left {1}.").format( match.group(1), self.__name) nmsg = msg self.__addManagementMessage( IrcChannelWidget.LeaveIndicator, msg) else: - msg = self.trUtf8("{0} has left {1}: {2}.").format( + msg = self.tr("{0} has left {1}: {2}.").format( match.group(1), self.__name, ircFilter(match.group(3))) - nmsg = self.trUtf8("{0} has left {1}: {2}.").format( + nmsg = self.tr("{0} has left {1}: {2}.").format( match.group(1), self.__name, match.group(3)) self.__addManagementMessage( IrcChannelWidget.LeaveIndicator, msg) @@ -601,7 +601,7 @@ Preferences.getIrc("NotifyJoinPart"): self.__ui.showNotification( UI.PixmapCache.getPixmap("irc48.png"), - self.trUtf8("Leave Channel"), nmsg) + self.tr("Leave Channel"), nmsg) return True return False @@ -618,12 +618,12 @@ self.usersList.takeItem(self.usersList.row(itm)) del itm if match.lastindex == 1: - msg = self.trUtf8("{0} has quit {1}.").format( + msg = self.tr("{0} has quit {1}.").format( match.group(1), self.__name) self.__addManagementMessage( IrcChannelWidget.MessageIndicator, msg) else: - msg = self.trUtf8("{0} has quit {1}: {2}.").format( + msg = self.tr("{0} has quit {1}: {2}.").format( match.group(1), self.__name, ircFilter(match.group(2))) self.__addManagementMessage( IrcChannelWidget.MessageIndicator, msg) @@ -631,7 +631,7 @@ Preferences.getIrc("NotifyJoinPart"): self.__ui.showNotification( UI.PixmapCache.getPixmap("irc48.png"), - self.trUtf8("Quit"), msg) + self.tr("Quit"), msg) # always return False for other channels and server to process return False @@ -649,13 +649,13 @@ if match.group(1) == self.__userName: self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("You are now known as {0}.").format( + self.tr("You are now known as {0}.").format( match.group(2))) self.__userName = match.group(2) else: self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("User {0} is now known as {1}.").format( + self.tr("User {0} is now known as {1}.").format( match.group(1), match.group(2))) # always return False for other channels and server to process @@ -692,8 +692,8 @@ """ if match.group(1).lower() == self.__name.lower(): self.__addManagementMessage( - self.trUtf8("Away"), - self.trUtf8("{0} is away: {1}").format( + self.tr("Away"), + self.tr("{0} is away: {1}").format( match.group(2), match.group(3))) return True @@ -710,7 +710,7 @@ self.topicLabel.setText(match.group(2)) self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - ircFilter(self.trUtf8('The channel topic is: "{0}".').format( + ircFilter(self.tr('The channel topic is: "{0}".').format( match.group(2)))) return True @@ -726,7 +726,7 @@ if match.group(1).lower() == self.__name.lower(): self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("The topic was set by {0} on {1}.").format( + self.tr("The topic was set by {0} on {1}.").format( match.group(2), QDateTime.fromTime_t(int(match.group(3))) .toString("yyyy-MM-dd hh:mm"))) return True @@ -743,7 +743,7 @@ if match.group(1).lower() == self.__name.lower(): self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - ircFilter(self.trUtf8("Channel URL: {0}").format( + ircFilter(self.tr("Channel URL: {0}").format( match.group(2)))) return True @@ -766,11 +766,11 @@ continue elif modeChar == "k": parameter = modesParameters.pop(0) - modes.append(self.trUtf8( + modes.append(self.tr( "password protected ({0})").format(parameter)) elif modeChar == "l": parameter = modesParameters.pop(0) - modes.append(self.trUtf8( + modes.append(self.tr( "limited to %n user(s)", "", int(parameter))) elif modeChar in modesDict: modes.append(modesDict[modeChar]) @@ -779,7 +779,7 @@ self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("Channel modes: {0}.").format(", ".join(modes))) + self.tr("Channel modes: {0}.").format(", ".join(modes))) return True @@ -795,7 +795,7 @@ if match.group(1).lower() == self.__name.lower(): self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("This channel was created on {0}.").format( + self.tr("This channel was created on {0}.").format( QDateTime.fromTime_t(int(match.group(2))) .toString("yyyy-MM-dd hh:mm"))) return True @@ -827,131 +827,131 @@ continue elif mode == "a": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'anonymous'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} removes the 'anonymous' mode from the" " channel.").format(nick) elif mode == "b": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets a ban on {1}.").format( nick, modesParameters.pop(0)) else: - message = self.trUtf8( + message = self.tr( "{0} removes the ban on {1}.").format( nick, modesParameters.pop(0)) elif mode == "c": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'no colors" " allowed'.").format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'allow color" " codes'.").format(nick) elif mode == "e": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets a ban exception on {1}.").format( nick, modesParameters.pop(0)) else: - message = self.trUtf8( + message = self.tr( "{0} removes the ban exception on {1}.").format( nick, modesParameters.pop(0)) elif mode == "i": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'invite only'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} removes the 'invite only' mode from the" " channel.").format(nick) elif mode == "k": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel key to '{1}'.").format( nick, modesParameters.pop(0)) else: - message = self.trUtf8( + message = self.tr( "{0} removes the channel key.").format(nick) elif mode == "l": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel limit to %n nick(s).", "", int(modesParameters.pop(0))).format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} removes the channel limit.").format(nick) elif mode == "m": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'moderated'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'unmoderated'.")\ .format(nick) elif mode == "n": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'no messages from" " outside'.").format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'allow messages" " from outside'.").format(nick) elif mode == "p": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'private'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'public'.")\ .format(nick) elif mode == "q": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'quiet'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} removes the 'quiet' mode from the channel.")\ .format(nick) elif mode == "r": continue elif mode == "s": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'secret'.")\ .format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} sets the channel mode to 'visible'.")\ .format(nick) elif mode == "t": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} switches on 'topic protection'.").format(nick) else: - message = self.trUtf8( + message = self.tr( "{0} switches off 'topic protection'.")\ .format(nick) elif mode == "I": if isPlus: - message = self.trUtf8( + message = self.tr( "{0} sets invitation mask {1}.").format( nick, modesParameters.pop(0)) else: - message = self.trUtf8( + message = self.tr( "{0} removes the invitation mask {1}.").format( nick, modesParameters.pop(0)) - self.__addManagementMessage(self.trUtf8("Mode"), message) + self.__addManagementMessage(self.tr("Mode"), message) return True @@ -971,7 +971,7 @@ self.__setEditTopicButton() self.__addManagementMessage( IrcChannelWidget.MessageIndicator, - self.trUtf8("{0} sets mode for {1}: {2}.").format( + self.tr("{0} sets mode for {1}: {2}.").format( match.group(1), match.group(4), match.group(3))) return True @@ -997,7 +997,7 @@ @return flag indicating whether the message was handled (boolean) """ self.__addManagementMessage( - self.trUtf8("Help"), + self.tr("Help"), "{0} {1}".format(match.group(1), ircFilter(match.group(2)))) return True @@ -1022,30 +1022,30 @@ if ctcpRequest == "version": msg = "Eric IRC client {0}, {1}".format(Version, Copyright) self.__addManagementMessage( - self.trUtf8("CTCP"), - self.trUtf8("Received Version request from {0}.").format( + self.tr("CTCP"), + self.tr("Received Version request from {0}.").format( match.group(1))) self.sendCtcpReply.emit(match.group(1), "VERSION " + msg) elif ctcpRequest == "ping": self.__addManagementMessage( - self.trUtf8("CTCP"), - self.trUtf8( + self.tr("CTCP"), + self.tr( "Received CTCP-PING request from {0}," " sending answer.").format(match.group(1))) self.sendCtcpReply.emit( match.group(1), "PING {0}".format(ctcpArg)) elif ctcpRequest == "clientinfo": self.__addManagementMessage( - self.trUtf8("CTCP"), - self.trUtf8( + self.tr("CTCP"), + self.tr( "Received CTCP-CLIENTINFO request from {0}," " sending answer.").format(match.group(1))) self.sendCtcpReply.emit( match.group(1), "CLIENTINFO CLIENTINFO PING VERSION") else: self.__addManagementMessage( - self.trUtf8("CTCP"), - self.trUtf8("Received unknown CTCP-{0} request from {1}.") + self.tr("CTCP"), + self.tr("Received unknown CTCP-{0} request from {1}.") .format(ctcpRequest, match.group(1))) return True @@ -1131,7 +1131,7 @@ '<span style=" color:{0}; background-color:{1};">{2}</span>'\ .format(Preferences.getIrc("MarkerLineForegroundColour"), Preferences.getIrc("MarkerLineBackgroundColour"), - self.trUtf8('--- New From Here ---')) + self.tr('--- New From Here ---')) self.messages.append(self.__markerLine) def unsetMarkerLine(self): @@ -1196,9 +1196,9 @@ htmlExtension = "html" fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Messages"), + self.tr("Save Messages"), "", - self.trUtf8( + self.tr( "HTML Files (*.{0});;Text Files (*.txt);;All Files (*)") .format(htmlExtension), None, @@ -1213,9 +1213,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Messages"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Messages"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -1232,8 +1232,8 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Error saving Messages"), - self.trUtf8( + self.tr("Error saving Messages"), + self.tr( """<p>The messages contents could not be written""" """ to <b>{0}</b></p><p>Reason: {1}</p>""") .format(fname, str(err))) @@ -1246,31 +1246,31 @@ self.__copyMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy"), self.__copyMessages) + self.tr("Copy"), self.__copyMessages) self.__messagesMenu.addSeparator() self.__cutAllMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8("Cut all"), self.__cutAllMessages) + self.tr("Cut all"), self.__cutAllMessages) self.__copyAllMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy all"), self.__copyAllMessages) + self.tr("Copy all"), self.__copyAllMessages) self.__messagesMenu.addSeparator() self.__clearMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8("Clear"), self.__clearMessages) + self.tr("Clear"), self.__clearMessages) self.__messagesMenu.addSeparator() self.__saveMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8("Save"), self.__saveMessages) + self.tr("Save"), self.__saveMessages) self.__messagesMenu.addSeparator() self.__setMarkerMessagesAct = self.__messagesMenu.addAction( - self.trUtf8("Mark Current Position"), self.setMarkerLine) + self.tr("Mark Current Position"), self.setMarkerLine) self.__unsetMarkerMessagesAct = self.__messagesMenu.addAction( - self.trUtf8("Remove Position Marker"), + self.tr("Remove Position Marker"), self.unsetMarkerLine) self.on_messages_copyAvailable(False) @@ -1320,13 +1320,13 @@ """ self.__usersMenu = QMenu(self) self.__whoIsAct = self.__usersMenu.addAction( - self.trUtf8("Who Is"), self.__whoIs) + self.tr("Who Is"), self.__whoIs) self.__usersMenu.addSeparator() self.__privateChatAct = self.__usersMenu.addAction( - self.trUtf8("Private Chat"), self.__openPrivateChat) + self.tr("Private Chat"), self.__openPrivateChat) self.__usersMenu.addSeparator() self.__usersListRefreshAct = self.__usersMenu.addAction( - self.trUtf8("Refresh"), self.__sendAutoWhoCommand) + self.tr("Refresh"), self.__sendAutoWhoCommand) @pyqtSlot(QPoint) def on_usersList_customContextMenuRequested(self, pos): @@ -1412,8 +1412,8 @@ self.initAutoWho() else: self.__addManagementMessage( - self.trUtf8("Who"), - self.trUtf8("End of WHO list for {0}.").format( + self.tr("Who"), + self.tr("End of WHO list for {0}.").format( match.group(1))) return True @@ -1434,11 +1434,11 @@ # group(5) user flags # group(6) real name if match.group(1).lower() == self.__name.lower(): - away = self.trUtf8(" (Away)") if match.group(5).startswith("G") \ + away = self.tr(" (Away)") if match.group(5).startswith("G") \ else "" self.__addManagementMessage( - self.trUtf8("Who"), - self.trUtf8("{0} is {1}@{2} ({3}){4}").format( + self.tr("Who"), + self.tr("{0} is {1}@{2} ({3}){4}").format( match.group(4), match.group(2), match.group(3), match.group(6), away)) return True @@ -1459,8 +1459,8 @@ if match.group(1) == self.__whoIsNick: realName = match.group(4).replace("<", "<").replace(">", ">") self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is {1}@{2} ({3}).").format( + self.tr("Whois"), + self.tr("{0} is {1}@{2} ({3}).").format( match.group(1), match.group(2), match.group(3), realName)) return True @@ -1505,33 +1505,33 @@ # show messages if userChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is a user on channels: {1}").format( + self.tr("Whois"), + self.tr("{0} is a user on channels: {1}").format( match.group(1), " ".join(userChannels))) if voiceChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} has voice on channels: {1}").format( + self.tr("Whois"), + self.tr("{0} has voice on channels: {1}").format( match.group(1), " ".join(voiceChannels))) if halfopChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is a halfop on channels: {1}").format( + self.tr("Whois"), + self.tr("{0} is a halfop on channels: {1}").format( match.group(1), " ".join(halfopChannels))) if opChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is an operator on channels: {1}").format( + self.tr("Whois"), + self.tr("{0} is an operator on channels: {1}").format( match.group(1), " ".join(opChannels))) if ownerChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is owner of channels: {1}").format( + self.tr("Whois"), + self.tr("{0} is owner of channels: {1}").format( match.group(1), " ".join(ownerChannels))) if adminChannels: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is admin on channels: {1}").format( + self.tr("Whois"), + self.tr("{0} is admin on channels: {1}").format( match.group(1), " ".join(adminChannels))) return True @@ -1549,8 +1549,8 @@ # group(3) server info if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is online via {1} ({2}).").format( + self.tr("Whois"), + self.tr("{0} is online via {1} ({2}).").format( match.group(1), match.group(2), match.group(3))) return True @@ -1568,12 +1568,12 @@ if match.group(1) == self.__whoIsNick: if match.group(2).lower().startswith("is an irc operator"): self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is an IRC Operator.").format( + self.tr("Whois"), + self.tr("{0} is an IRC Operator.").format( match.group(1))) else: self.__addManagementMessage( - self.trUtf8("Whois"), + self.tr("Whois"), "{0} {1}".format(match.group(1), match.group(2))) return True @@ -1600,13 +1600,13 @@ signonTime.setTime_t(signonTimestamp) if days: - daysString = self.trUtf8("%n day(s)", "", days) - hoursString = self.trUtf8("%n hour(s)", "", hours) - minutesString = self.trUtf8("%n minute(s)", "", minutes) - secondsString = self.trUtf8("%n second(s)", "", seconds) + daysString = self.tr("%n day(s)", "", days) + hoursString = self.tr("%n hour(s)", "", hours) + minutesString = self.tr("%n minute(s)", "", minutes) + secondsString = self.tr("%n second(s)", "", seconds) self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8( + self.tr("Whois"), + self.tr( "{0} has been idle for {1}, {2}, {3}, and {4}.", "{0} = name of person, {1} = (x days)," " {2} = (x hours), {3} = (x minutes)," @@ -1614,38 +1614,38 @@ match.group(1), daysString, hoursString, minutesString, secondsString)) elif hours: - hoursString = self.trUtf8("%n hour(s)", "", hours) - minutesString = self.trUtf8("%n minute(s)", "", minutes) - secondsString = self.trUtf8("%n second(s)", "", seconds) + hoursString = self.tr("%n hour(s)", "", hours) + minutesString = self.tr("%n minute(s)", "", minutes) + secondsString = self.tr("%n second(s)", "", seconds) self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8( + self.tr("Whois"), + self.tr( "{0} has been idle for {1}, {2}, and {3}.", "{0} = name of person, {1} = (x hours), " "{2} = (x minutes), {3} = (x seconds)") .format(match.group(1), hoursString, minutesString, secondsString)) elif minutes: - minutesString = self.trUtf8("%n minute(s)", "", minutes) - secondsString = self.trUtf8("%n second(s)", "", seconds) + minutesString = self.tr("%n minute(s)", "", minutes) + secondsString = self.tr("%n second(s)", "", seconds) self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8( + self.tr("Whois"), + self.tr( "{0} has been idle for {1} and {2}.", "{0} = name of person, {1} = (x minutes), " "{3} = (x seconds)") .format(match.group(1), minutesString, secondsString)) else: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8( + self.tr("Whois"), + self.tr( "{0} has been idle for %n second(s).", "", seconds).format(match.group(1))) if not signonTime.isNull(): self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} has been online since {1}.").format( + self.tr("Whois"), + self.tr("{0} has been online since {1}.").format( match.group(1), signonTime.toString("yyyy-MM-dd, hh:mm:ss"))) return True @@ -1664,8 +1664,8 @@ if match.group(1) == self.__whoIsNick: self.__whoIsNick = "" self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("End of WHOIS list for {0}.").format( + self.tr("Whois"), + self.tr("End of WHOIS list for {0}.").format( match.group(1))) return True @@ -1682,8 +1682,8 @@ # group(2) identified message if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is an identified user.").format( + self.tr("Whois"), + self.tr("{0} is an identified user.").format( match.group(1))) return True @@ -1700,8 +1700,8 @@ # group(2) helper message if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is available for help.").format( + self.tr("Whois"), + self.tr("{0} is available for help.").format( match.group(1))) return True @@ -1718,8 +1718,8 @@ # group(2) login name if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is logged in as {1}.").format( + self.tr("Whois"), + self.tr("{0} is logged in as {1}.").format( match.group(1), match.group(2))) return True @@ -1737,8 +1737,8 @@ # group(3) actual IP if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8( + self.tr("Whois"), + self.tr( "{0} is actually using the host {1} (IP: {2}).").format( match.group(1), match.group(2), match.group(3))) return True @@ -1755,8 +1755,8 @@ # group(1) nick if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is using a secure connection.").format( + self.tr("Whois"), + self.tr("{0} is using a secure connection.").format( match.group(1))) return True @@ -1774,8 +1774,8 @@ # group(3) IP if match.group(1) == self.__whoIsNick: self.__addManagementMessage( - self.trUtf8("Whois"), - self.trUtf8("{0} is connecting from {1} (IP: {2}).").format( + self.tr("Whois"), + self.tr("{0} is connecting from {1} (IP: {2}).").format( match.group(1), match.group(2), match.group(3))) return True @@ -1796,8 +1796,8 @@ """ topic, ok = QInputDialog.getText( self, - self.trUtf8("Edit Channel Topic"), - self.trUtf8("Enter the topic for this channel:"), + self.tr("Edit Channel Topic"), + self.tr("Enter the topic for this channel:"), QLineEdit.Normal, self.topicLabel.text()) if ok and topic != "":
--- a/Network/IRC/IrcIdentitiesEditDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcIdentitiesEditDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -168,8 +168,8 @@ if self.nicknamesList.count() == 0: E5MessageBox.critical( self, - self.trUtf8("Edit Identity"), - self.trUtf8( + self.tr("Edit Identity"), + self.tr( """The identity must contain at least one nick name.""")) block = self.identitiesCombo.blockSignals(True) identity = self.__currentIdentity.getName() @@ -185,8 +185,8 @@ if not self.realnameEdit.text(): E5MessageBox.critical( self, - self.trUtf8("Edit Identity"), - self.trUtf8("""The identity must have a real name.""")) + self.tr("Edit Identity"), + self.tr("""The identity must have a real name.""")) block = self.identitiesCombo.blockSignals(True) identity = self.__currentIdentity.getName() if identity == IrcIdentity.DefaultIdentityName: @@ -207,8 +207,8 @@ """ name, ok = QInputDialog.getText( self, - self.trUtf8("Add Identity"), - self.trUtf8("Identity Name:"), + self.tr("Add Identity"), + self.tr("Identity Name:"), QLineEdit.Normal) if ok: @@ -216,8 +216,8 @@ if name in self.__identities: E5MessageBox.critical( self, - self.trUtf8("Add Identity"), - self.trUtf8( + self.tr("Add Identity"), + self.tr( """An identity named <b>{0}</b> already exists.""" """ You must provide a different name.""").format( name)) @@ -233,8 +233,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Add Identity"), - self.trUtf8("""The identity has to have a name.""")) + self.tr("Add Identity"), + self.tr("""The identity has to have a name.""")) self.on_addButton_clicked() @pyqtSlot() @@ -245,8 +245,8 @@ currentIdentity = self.identitiesCombo.currentText() name, ok = QInputDialog.getText( self, - self.trUtf8("Copy Identity"), - self.trUtf8("Identity Name:"), + self.tr("Copy Identity"), + self.tr("Identity Name:"), QLineEdit.Normal, currentIdentity) @@ -255,8 +255,8 @@ if name in self.__identities: E5MessageBox.critical( self, - self.trUtf8("Copy Identity"), - self.trUtf8( + self.tr("Copy Identity"), + self.tr( """An identity named <b>{0}</b> already exists.""" """ You must provide a different name.""").format( name)) @@ -271,8 +271,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Copy Identity"), - self.trUtf8("""The identity has to have a name.""")) + self.tr("Copy Identity"), + self.tr("""The identity has to have a name.""")) self.on_copyButton_clicked() @pyqtSlot() @@ -283,8 +283,8 @@ currentIdentity = self.identitiesCombo.currentText() name, ok = QInputDialog.getText( self, - self.trUtf8("Rename Identity"), - self.trUtf8("Identity Name:"), + self.tr("Rename Identity"), + self.tr("Identity Name:"), QLineEdit.Normal, currentIdentity) @@ -293,8 +293,8 @@ if name in self.__identities: E5MessageBox.critical( self, - self.trUtf8("Rename Identity"), - self.trUtf8( + self.tr("Rename Identity"), + self.tr( """An identity named <b>{0}</b> already exists.""" """ You must provide a different name.""").format( name)) @@ -308,8 +308,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Copy Identity"), - self.trUtf8("""The identity has to have a name.""")) + self.tr("Copy Identity"), + self.tr("""The identity has to have a name.""")) self.on_renameButton_clicked() @pyqtSlot() @@ -330,17 +330,17 @@ break if inUse: - msg = self.trUtf8( + msg = self.tr( """This identity is in use. If you remove it, the network""" """ settings using it will fall back to the default""" """ identity. Should it be deleted anyway?""") else: - msg = self.trUtf8( + msg = self.tr( """Do you really want to delete all information for""" """ this identity?""") res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Identity"), + self.tr("Delete Identity"), msg, icon=E5MessageBox.Warning) if res:
--- a/Network/IRC/IrcNetworkEditDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcNetworkEditDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,9 +68,9 @@ for channelName in sorted(self.__network.getChannelNames()): channel = self.__network.getChannel(channelName) if channel.autoJoin(): - autoJoin = self.trUtf8("Yes") + autoJoin = self.tr("Yes") else: - autoJoin = self.trUtf8("No") + autoJoin = self.tr("No") QTreeWidgetItem(self.channelList, [channelName, autoJoin]) self.__updateOkButton() @@ -183,8 +183,8 @@ if itm: res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Channel"), - self.trUtf8( + self.tr("Delete Channel"), + self.tr( """Do you really want to delete channel <b>{0}</b>?""") .format(itm.text(0))) if res: @@ -244,15 +244,15 @@ channel.setAutoJoin(autoJoin) if itm: if autoJoin: - itm.setText(1, self.trUtf8("Yes")) + itm.setText(1, self.tr("Yes")) else: - itm.setText(1, self.trUtf8("No")) + itm.setText(1, self.tr("No")) self.__network.setChannel(channel) else: if autoJoin: - autoJoinTxt = self.trUtf8("Yes") + autoJoinTxt = self.tr("Yes") else: - autoJoinTxt = self.trUtf8("No") + autoJoinTxt = self.tr("No") QTreeWidgetItem(self.channelList, [name, autoJoinTxt]) self.__network.addChannel(channel)
--- a/Network/IRC/IrcNetworkListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcNetworkListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,22 +80,22 @@ identityName = network.getIdentityName() if identityName == IrcIdentity.DefaultIdentityName: identityName = IrcIdentity.DefaultIdentityDisplay - autoConnect = self.trUtf8("Yes") if network.autoConnect() \ - else self.trUtf8("No") + autoConnect = self.tr("Yes") if network.autoConnect() \ + else self.tr("No") QTreeWidgetItem( itm, - [self.trUtf8("Identity"), identityName]) + [self.tr("Identity"), identityName]) QTreeWidgetItem( itm, - [self.trUtf8("Server"), "{0}:{1}".format( + [self.tr("Server"), "{0}:{1}".format( server.getName(), server.getPort())]) QTreeWidgetItem( itm, - [self.trUtf8("Channels"), ", ".join(network.getChannelNames())]) + [self.tr("Channels"), ", ".join(network.getChannelNames())]) QTreeWidgetItem( itm, - [self.trUtf8("Auto-Connect"), autoConnect]) + [self.tr("Auto-Connect"), autoConnect]) self.__resizeColumns() @@ -160,8 +160,8 @@ networkName = itm.text(0) res = E5MessageBox.yesNo( self, - self.trUtf8("Delete Irc Network"), - self.trUtf8( + self.tr("Delete Irc Network"), + self.tr( """Do you really want to delete IRC network <b>{0}</b>?""") .format(networkName)) if res: @@ -233,10 +233,10 @@ @param itm reference to the network item (QTreeWidgetItem) @param on flag indicating the auto-connect state (boolean) """ - autoConnect = self.trUtf8("Yes") if on else self.trUtf8("No") + autoConnect = self.tr("Yes") if on else self.tr("No") for index in range(itm.childCount()): citm = itm.child(index) - if citm.text(0) == self.trUtf8("Auto-Connect"): + if citm.text(0) == self.tr("Auto-Connect"): citm.setText(1, autoConnect) @pyqtSlot()
--- a/Network/IRC/IrcNetworkWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcNetworkWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -292,12 +292,12 @@ self.connectButton.setIcon( UI.PixmapCache.getIcon("ircDisconnect.png")) self.connectButton.setToolTip( - self.trUtf8("Press to disconnect from the network")) + self.tr("Press to disconnect from the network")) else: self.connectButton.setIcon( UI.PixmapCache.getIcon("ircConnect.png")) self.connectButton.setToolTip( - self.trUtf8("Press to connect to the selected network")) + self.tr("Press to connect to the selected network")) def isConnected(self): """ @@ -369,9 +369,9 @@ htmlExtension = "html" fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Messages"), + self.tr("Save Messages"), "", - self.trUtf8( + self.tr( "HTML Files (*.{0});;Text Files (*.txt);;All Files (*)") .format(htmlExtension), None, @@ -386,9 +386,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Messages"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Messages"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -405,8 +405,8 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Error saving Messages"), - self.trUtf8( + self.tr("Error saving Messages"), + self.tr( """<p>The messages contents could not be written""" """ to <b>{0}</b></p><p>Reason: {1}</p>""") .format(fname, str(err))) @@ -419,26 +419,26 @@ self.__copyMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy"), self.__copyMessages) + self.tr("Copy"), self.__copyMessages) self.__messagesMenu.addSeparator() self.__cutAllMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8("Cut all"), self.__cutAllMessages) + self.tr("Cut all"), self.__cutAllMessages) self.__copyAllMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8("Copy all"), self.__copyAllMessages) + self.tr("Copy all"), self.__copyAllMessages) self.__messagesMenu.addSeparator() self.__clearMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8("Clear"), self.__clearMessages) + self.tr("Clear"), self.__clearMessages) self.__messagesMenu.addSeparator() self.__saveMessagesAct = \ self.__messagesMenu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8("Save"), self.__saveMessages) + self.tr("Save"), self.__saveMessages) self.on_messages_copyAvailable(False)
--- a/Network/IRC/IrcWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Network/IRC/IrcWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -60,7 +60,7 @@ self.__leaveButton.setIcon( UI.PixmapCache.getIcon("ircCloseChannel.png")) self.__leaveButton.setToolTip( - self.trUtf8("Press to leave the current channel")) + self.tr("Press to leave the current channel")) self.__leaveButton.clicked[()].connect(self.__leaveChannel) self.__leaveButton.setEnabled(False) self.channelsWidget.setCornerWidget( @@ -137,8 +137,8 @@ if Preferences.getIrc("AskOnShutdown"): ok = E5MessageBox.yesNo( self, - self.trUtf8("Disconnect from Server"), - self.trUtf8( + self.tr("Disconnect from Server"), + self.tr( """<p>Do you really want to disconnect from""" """ <b>{0}</b>?</p><p>All channels will be closed.""" """</p>""").format(self.__server.getName())) @@ -187,8 +187,8 @@ if useSSL and not SSL_AVAILABLE: E5MessageBox.critical( self, - self.trUtf8("SSL Connection"), - self.trUtf8( + self.tr("SSL Connection"), + self.tr( """An encrypted connection to the IRC""" """ network was requested but SSL is not""" """ available. Please change the server""" @@ -212,17 +212,17 @@ self.__connectionState = IrcWidget.ServerConnecting if useSSL: self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8("Looking for server {0} (port {1})" - " using an SSL encrypted connection" - "...").format(self.__server.getName(), - self.__server.getPort())) + self.tr("Info"), + self.tr("Looking for server {0} (port {1})" + " using an SSL encrypted connection" + "...").format(self.__server.getName(), + self.__server.getPort())) self.__socket.connectToHostEncrypted( self.__server.getName(), self.__server.getPort()) else: self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8( + self.tr("Info"), + self.tr( "Looking for server {0} (port {1})...").format( self.__server.getName(), self.__server.getPort())) @@ -234,15 +234,15 @@ else: ok = E5MessageBox.yesNo( self, - self.trUtf8("Disconnect from Server"), - self.trUtf8("""<p>Do you really want to disconnect from""" - """ <b>{0}</b>?</p><p>All channels will be""" - """ closed.</p>""") + self.tr("Disconnect from Server"), + self.tr("""<p>Do you really want to disconnect from""" + """ <b>{0}</b>?</p><p>All channels will be""" + """ closed.</p>""") .format(self.__server.getName())) if ok: self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8("Disconnecting from server {0}...").format( + self.tr("Info"), + self.tr("Disconnecting from server {0}...").format( self.__server.getName())) self.__closeAllChannels() self.__send("QUIT :" + self.__quitMessage) @@ -439,8 +439,8 @@ Private slot to indicate the host was found. """ self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8("Server found,connecting...")) + self.tr("Info"), + self.tr("Server found,connecting...")) def __hostConnected(self): """ @@ -448,8 +448,8 @@ established. """ self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8("Connected,logging in...")) + self.tr("Info"), + self.tr("Connected,logging in...")) self.networkWidget.setConnected(True) self.__registering = True @@ -482,8 +482,8 @@ if self.networkWidget.isConnected(): self.__closeAllChannels() self.networkWidget.addServerMessage( - self.trUtf8("Info"), - self.trUtf8("Server disconnected.")) + self.tr("Info"), + self.tr("Server disconnected.")) self.networkWidget.setRegistered(False) self.networkWidget.setConnected(False) self.__server = None @@ -527,8 +527,8 @@ else: # Oops, the message wasn't handled self.networkWidget.addErrorMessage( - self.trUtf8("Message Error"), - self.trUtf8( + self.tr("Message Error"), + self.tr( "Unknown message received from server:" "<br/>{0}").format(line)) @@ -551,7 +551,7 @@ if "!" in match.group(1): name = match.group(1).split("!", 1)[0] msg = "-{0}- {1}".format(name, msg) - self.networkWidget.addServerMessage(self.trUtf8("Notice"), msg) + self.networkWidget.addServerMessage(self.tr("Notice"), msg) return True elif name == "MODE": self.__registering = False @@ -562,22 +562,22 @@ if not self.isChannelName(name): if name == self.__nickName: if sourceNick == self.__nickName: - msg = self.trUtf8( + msg = self.tr( "You have set your personal modes to" " <b>[{0}]</b>.").format(modes) else: - msg = self.trUtf8( + msg = self.tr( "{0} has changed your personal modes to" " <b>[{1}]</b>.").format(sourceNick, modes) self.networkWidget.addServerMessage( - self.trUtf8("Mode"), msg, filterMsg=False) + self.tr("Mode"), msg, filterMsg=False) return True elif name == "PART": nick = match.group(1).split("!", 1)[0] if nick == self.__nickName: channel = match.group(3).split(None, 1)[0] self.networkWidget.addMessage( - self.trUtf8("You have left channel {0}.").format(channel)) + self.tr("You have left channel {0}.").format(channel)) return True elif name == "QUIT": # don't do anything with it here @@ -588,17 +588,17 @@ newNick = match.group(3).split(":", 1)[1] if oldNick == self.__nickName: self.networkWidget.addMessage( - self.trUtf8("You are now known as {0}.").format(newNick)) + self.tr("You are now known as {0}.").format(newNick)) self.__nickName = newNick self.networkWidget.setNickName(newNick) else: self.networkWidget.addMessage( - self.trUtf8("User {0} is now known as {1}.").format( + self.tr("User {0} is now known as {1}.").format( oldNick, newNick)) return True elif name == "ERROR": self.networkWidget.addErrorMessage( - self.trUtf8("Server Error"), match.group(3).split(":", 1)[1]) + self.tr("Server Error"), match.group(3).split(":", 1)[1]) return True return False @@ -633,7 +633,7 @@ else: self.__handleNickInUse() else: - self.networkWidget.addServerMessage(self.trUtf8("Error"), message) + self.networkWidget.addServerMessage(self.tr("Error"), message) return True @@ -648,43 +648,43 @@ """ # determine message type if code in [1, 2, 3, 4]: - msgType = self.trUtf8("Welcome") + msgType = self.tr("Welcome") elif code == 5: - msgType = self.trUtf8("Support") + msgType = self.tr("Support") elif code in [250, 251, 252, 253, 254, 255, 265, 266]: - msgType = self.trUtf8("User") + msgType = self.tr("User") elif code in [372, 375, 376]: - msgType = self.trUtf8("MOTD") + msgType = self.tr("MOTD") elif code in [305, 306]: - msgType = self.trUtf8("Away") + msgType = self.tr("Away") else: - msgType = self.trUtf8("Info ({0})").format(code) + msgType = self.tr("Info ({0})").format(code) # special treatment for some messages if code == 375: - message = self.trUtf8("Message of the day") + message = self.tr("Message of the day") elif code == 376: - message = self.trUtf8("End of message of the day") + message = self.tr("End of message of the day") elif code == 4: parts = message.strip().split() - message = self.trUtf8( + message = self.tr( "Server {0} (Version {1}), User-Modes: {2}," " Channel-Modes: {3}")\ .format(parts[1], parts[2], parts[3], parts[4]) elif code == 265: parts = message.strip().split() - message = self.trUtf8( + message = self.tr( "Current users on {0}: {1}, max. {2}").format( server, parts[1], parts[2]) elif code == 266: parts = message.strip().split() - message = self.trUtf8( + message = self.tr( "Current users on the network: {0}, max. {1}").format( parts[1], parts[2]) elif code == 305: - message = self.trUtf8("You are no longer marked as being away.") + message = self.tr("You are no longer marked as being away.") elif code == 306: - message = self.trUtf8("You have been marked as being away.") + message = self.tr("You have been marked as being away.") else: first, message = message.split(None, 1) if message.startswith(":"): @@ -746,39 +746,39 @@ # ignore this one, it's a disconnect if self.__sslErrorLock: self.networkWidget.addErrorMessage( - self.trUtf8("SSL Error"), - self.trUtf8( + self.tr("SSL Error"), + self.tr( """Connection to server {0} (port {1}) lost while""" """ waiting for user response to an SSL error.""") .format(self.__server.getName(), self.__server.getPort())) self.__connectionState = IrcWidget.ServerDisconnected elif error == QAbstractSocket.HostNotFoundError: self.networkWidget.addErrorMessage( - self.trUtf8("Socket Error"), - self.trUtf8( + self.tr("Socket Error"), + self.tr( "The host was not found. Please check the host name" " and port settings.")) elif error == QAbstractSocket.ConnectionRefusedError: self.networkWidget.addErrorMessage( - self.trUtf8("Socket Error"), - self.trUtf8( + self.tr("Socket Error"), + self.tr( "The connection was refused by the peer. Please check the" " host name and port settings.")) elif error == QAbstractSocket.SslHandshakeFailedError: self.networkWidget.addErrorMessage( - self.trUtf8("Socket Error"), - self.trUtf8("The SSL handshake failed.")) + self.tr("Socket Error"), + self.tr("The SSL handshake failed.")) else: if self.__socket: self.networkWidget.addErrorMessage( - self.trUtf8("Socket Error"), - self.trUtf8( + self.tr("Socket Error"), + self.tr( "The following network error occurred:<br/>{0}") .format(self.__socket.errorString())) else: self.networkWidget.addErrorMessage( - self.trUtf8("Socket Error"), - self.trUtf8("A network error occurred.")) + self.tr("Socket Error"), + self.tr("A network error occurred.")) def __sslErrors(self, errors): """ @@ -790,8 +790,8 @@ errors, self.__server.getName(), self.__server.getPort()) if ignored == E5SslErrorHandler.NotIgnored: self.networkWidget.addErrorMessage( - self.trUtf8("SSL Error"), - self.trUtf8( + self.tr("SSL Error"), + self.tr( """Could not connect to {0} (port {1}) using an SSL""" """ encrypted connection. Either the server does not""" """ support SSL (did you use the correct port?) or""" @@ -804,8 +804,8 @@ QSslConfiguration.defaultConfiguration()) if ignored == E5SslErrorHandler.UserIgnored: self.networkWidget.addErrorMessage( - self.trUtf8("SSL Error"), - self.trUtf8( + self.tr("SSL Error"), + self.tr( """The SSL certificate for the server {0} (port {1})""" """ failed the authenticity check. SSL errors""" """ were accepted by you.""") @@ -862,22 +862,22 @@ vers = " " + Version msg = "Eric IRC client{0}, {1}".format(vers, Copyright) self.networkWidget.addServerMessage( - self.trUtf8("CTCP"), - self.trUtf8("Received Version request from {0}.").format( + self.tr("CTCP"), + self.tr("Received Version request from {0}.").format( match.group(1))) self.__sendCtcpReply(match.group(1), "VERSION " + msg) elif ctcpRequest == "ping": self.networkWidget.addServerMessage( - self.trUtf8("CTCP"), - self.trUtf8( + self.tr("CTCP"), + self.tr( "Received CTCP-PING request from {0}," " sending answer.").format(match.group(1))) self.__sendCtcpReply( match.group(1), "PING {0}".format(ctcpArg)) elif ctcpRequest == "clientinfo": self.networkWidget.addServerMessage( - self.trUtf8("CTCP"), - self.trUtf8( + self.tr("CTCP"), + self.tr( "Received CTCP-CLIENTINFO request from {0}," " sending answer.").format(match.group(1))) self.__sendCtcpReply( @@ -885,8 +885,8 @@ "CLIENTINFO CLIENTINFO PING VERSION") else: self.networkWidget.addServerMessage( - self.trUtf8("CTCP"), - self.trUtf8( + self.tr("CTCP"), + self.tr( "Received unknown CTCP-{0} request from {1}.") .format(ctcpRequest, match.group(1))) return True @@ -901,7 +901,7 @@ index = self.channelsWidget.indexOf(channel) self.channelsWidget.setTabText( index, - self.trUtf8("{0} ({1})", "channel name, users count").format( + self.tr("{0} ({1})", "channel name, users count").format( channel.name(), channel.getUsersCount())) def __handleNickInUseLogin(self): @@ -915,8 +915,8 @@ self.__nickName = nick except IndexError: self.networkWidget.addServerMessage( - self.trUtf8("Critical"), - self.trUtf8( + self.tr("Critical"), + self.tr( "No nickname acceptable to the server configured" " for <b>{0}</b>. Disconnecting...") .format(self.__userName), @@ -934,8 +934,8 @@ Private method to handle a 443 server error. """ self.networkWidget.addServerMessage( - self.trUtf8("Critical"), - self.trUtf8("The given nickname is already in use.")) + self.tr("Critical"), + self.tr("The given nickname is already in use.")) def __changeNick(self, nick): """
--- a/PluginManager/PluginInfoDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PluginManager/PluginInfoDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,11 +40,11 @@ self.pluginList.sortByColumn(0, Qt.AscendingOrder) self.__menu = QMenu(self) - self.__menu.addAction(self.trUtf8('Show details'), self.__showDetails) + self.__menu.addAction(self.tr('Show details'), self.__showDetails) self.__activateAct = self.__menu.addAction( - self.trUtf8('Activate'), self.__activatePlugin) + self.tr('Activate'), self.__activatePlugin) self.__deactivateAct = self.__menu.addAction( - self.trUtf8('Deactivate'), self.__deactivatePlugin) + self.tr('Deactivate'), self.__deactivatePlugin) self.pluginList.setContextMenuPolicy(Qt.CustomContextMenu) self.pluginList.customContextMenuRequested.connect( self.__showContextMenu) @@ -70,8 +70,8 @@ info[0], info[1], info[2], - (info[3] and self.trUtf8("Yes") or self.trUtf8("No")), - (info[4] and self.trUtf8("Yes") or self.trUtf8("No")), + (info[3] and self.tr("Yes") or self.tr("No")), + (info[4] and self.tr("Yes") or self.tr("No")), info[5] ] itm = QTreeWidgetItem(self.pluginList, infoList) @@ -94,8 +94,8 @@ itm = self.pluginList.itemAt(coord) if itm is not None: autoactivate = (itm.text(self.__autoActivateColumn) == - self.trUtf8("Yes")) - if itm.text(self.__activeColumn) == self.trUtf8("Yes"): + self.tr("Yes")) + if itm.text(self.__activeColumn) == self.tr("Yes"): self.__activateAct.setEnabled(False) self.__deactivateAct.setEnabled(autoactivate) else:
--- a/PluginManager/PluginInstallDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PluginManager/PluginInstallDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -56,11 +56,11 @@ self.__external = False self.__backButton = self.buttonBox.addButton( - self.trUtf8("< Back"), QDialogButtonBox.ActionRole) + self.tr("< Back"), QDialogButtonBox.ActionRole) self.__nextButton = self.buttonBox.addButton( - self.trUtf8("Next >"), QDialogButtonBox.ActionRole) + self.tr("Next >"), QDialogButtonBox.ActionRole) self.__finishButton = self.buttonBox.addButton( - self.trUtf8("Install"), QDialogButtonBox.ActionRole) + self.tr("Install"), QDialogButtonBox.ActionRole) self.__closeButton = self.buttonBox.button(QDialogButtonBox.Close) self.__cancelButton = self.buttonBox.button(QDialogButtonBox.Cancel) @@ -68,13 +68,13 @@ userDir = self.__pluginManager.getPluginDir("user") if userDir is not None: self.destinationCombo.addItem( - self.trUtf8("User plugins directory"), + self.tr("User plugins directory"), userDir) globalDir = self.__pluginManager.getPluginDir("global") if globalDir is not None and os.access(globalDir, os.W_OK): self.destinationCombo.addItem( - self.trUtf8("Global plugins directory"), + self.tr("Global plugins directory"), globalDir) self.__installedDirs = [] @@ -137,7 +137,7 @@ self.__closeButton.hide() self.__cancelButton.show() - msg = self.trUtf8( + msg = self.tr( "Plugin ZIP-Archives:\n{0}\n\nDestination:\n{1} ({2})")\ .format("\n".join(self.__createArchivesList()), self.destinationCombo.currentText(), @@ -154,9 +154,9 @@ dn = Preferences.getPluginManager("DownloadPath") archives = E5FileDialog.getOpenFileNames( self, - self.trUtf8("Select plugin ZIP-archives"), + self.tr("Select plugin ZIP-archives"), dn, - self.trUtf8("Plugin archive (*.zip)")) + self.tr("Plugin archive (*.zip)")) if archives: matchflags = Qt.MatchFixedString @@ -219,21 +219,21 @@ self.summaryEdit.clear() for archive in self.__createArchivesList(): self.summaryEdit.append( - self.trUtf8("Installing {0} ...").format(archive)) + self.tr("Installing {0} ...").format(archive)) ok, msg, restart = self.__installPlugin(archive) res = res and ok if ok: - self.summaryEdit.append(self.trUtf8(" ok")) + self.summaryEdit.append(self.tr(" ok")) else: self.summaryEdit.append(msg) if restart: self.__restartNeeded = True self.summaryEdit.append("\n") if res: - self.summaryEdit.append(self.trUtf8( + self.summaryEdit.append(self.tr( """The plugins were installed successfully.""")) else: - self.summaryEdit.append(self.trUtf8( + self.summaryEdit.append(self.tr( """Some plugins could not be installed.""")) return res @@ -262,7 +262,7 @@ # check, if the archive exists if not os.path.exists(archive): return False, \ - self.trUtf8( + self.tr( """<p>The archive file <b>{0}</b> does not exist. """ """Aborting...</p>""").format(archive), \ False @@ -270,7 +270,7 @@ # check, if the archive is a valid zip file if not zipfile.is_zipfile(archive): return False, \ - self.trUtf8( + self.tr( """<p>The file <b>{0}</b> is not a valid plugin """ """ZIP-archive. Aborting...</p>""").format(archive), \ False @@ -278,7 +278,7 @@ # check, if the destination is writeable if not os.access(destination, os.W_OK): return False, \ - self.trUtf8( + self.tr( """<p>The destination directory <b>{0}</b> is not """ """writeable. Aborting...</p>""").format(destination), \ False @@ -297,7 +297,7 @@ if not pluginFound: return False, \ - self.trUtf8( + self.tr( """<p>The file <b>{0}</b> is not a valid plugin """ """ZIP-archive. Aborting...</p>""").format(archive), \ False @@ -342,7 +342,7 @@ if not packageName: return False, \ - self.trUtf8( + self.tr( """<p>The plugin module <b>{0}</b> does not contain """ """a 'packageName' attribute. Aborting...</p>""")\ .format(pluginFileName), \ @@ -350,7 +350,7 @@ if pyqtApi < 2: return False, \ - self.trUtf8( + self.tr( """<p>The plugin module <b>{0}</b> does not conform""" """ with the PyQt v2 API. Aborting...</p>""")\ .format(pluginFileName), \ @@ -361,8 +361,8 @@ packageName != "None" and \ os.path.exists(os.path.join(destination, packageName)): return False, \ - self.trUtf8("""<p>The plugin package <b>{0}</b> exists. """ - """Aborting...</p>""")\ + self.tr("""<p>The plugin package <b>{0}</b> exists. """ + """Aborting...</p>""")\ .format(os.path.join(destination, packageName)), \ False @@ -370,8 +370,8 @@ packageName != "None" and \ not os.path.exists(os.path.join(destination, packageName)): return False, \ - self.trUtf8("""<p>The plugin module <b>{0}</b> exists. """ - """Aborting...</p>""")\ + self.tr("""<p>The plugin module <b>{0}</b> exists. """ + """Aborting...</p>""")\ .format(os.path.join(destination, pluginFileName)), \ False @@ -437,26 +437,26 @@ except os.error as why: self.__rollback() return False, \ - self.trUtf8( + self.tr( "Error installing plugin. Reason: {0}").format(str(why)), \ False except IOError as why: self.__rollback() return False, \ - self.trUtf8( + self.tr( "Error installing plugin. Reason: {0}").format(str(why)), \ False except OSError as why: self.__rollback() return False, \ - self.trUtf8( + self.tr( "Error installing plugin. Reason: {0}").format(str(why)), \ False except: print("Unspecific exception installing plugin.", file=sys.stderr) self.__rollback() return False, \ - self.trUtf8("Unspecific exception installing plugin."), \ + self.tr("Unspecific exception installing plugin."), \ False # now compile the plugins
--- a/PluginManager/PluginManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PluginManager/PluginManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -184,7 +184,7 @@ except IOError: return ( False, - self.trUtf8("Could not create a package for {0}.") + self.tr("Could not create a package for {0}.") .format(self.__develPluginFile)) if Preferences.getPluginManager("ActivateExternal"): @@ -219,7 +219,7 @@ if not os.path.exists(self.pluginDirs["eric5"]): return ( False, - self.trUtf8( + self.tr( "The internal plugin directory <b>{0}</b>" " does not exits.").format(self.pluginDirs["eric5"])) @@ -336,7 +336,7 @@ fname = "{0}.py".format(os.path.join(directory, name)) module = imp.load_source(name, fname) if not hasattr(module, "autoactivate"): - module.error = self.trUtf8( + module.error = self.tr( "Module is missing the 'autoactivate' attribute.") self.__failedModules[name] = module raise PluginLoadError(name) @@ -346,8 +346,8 @@ if not hasattr(module, "pluginType") or \ not hasattr(module, "pluginTypename"): module.error = \ - self.trUtf8("Module is missing the 'pluginType' " - "and/or 'pluginTypename' attributes.") + self.tr("Module is missing the 'pluginType' " + "and/or 'pluginTypename' attributes.") self.__failedModules[name] = module raise PluginLoadError(name) else: @@ -361,7 +361,7 @@ print("Error loading plugin module:", name) except Exception as err: module = imp.new_module(name) - module.error = self.trUtf8( + module.error = self.tr( "Module failed to load. Error: {0}").format(str(err)) self.__failedModules[name] = module print("Error loading plugin module:", name) @@ -516,7 +516,7 @@ try: obj, ok = pluginObject.activate() except TypeError: - module.error = self.trUtf8( + module.error = self.tr( "Incompatible plugin activation method.") obj = None ok = True @@ -1022,8 +1022,8 @@ except (OSError, IOError) as err: E5MessageBox.critical( self.__ui, - self.trUtf8("Plugin Manager Error"), - self.trUtf8( + self.tr("Plugin Manager Error"), + self.tr( """<p>The plugin download directory""" """ <b>{0}</b> could not be created. Please""" """ configure it via the configuration""" @@ -1085,8 +1085,8 @@ if reply.error() != QNetworkReply.NoError: E5MessageBox.warning( None, - self.trUtf8("Error downloading file"), - self.trUtf8( + self.tr("Error downloading file"), + self.tr( """<p>Could not download the requested file""" """ from {0}.</p><p>Error: {1}</p>""" ).format(Preferences.getUI("PluginRepositoryUrl5"), @@ -1120,10 +1120,10 @@ if self.__updateAvailable: res = E5MessageBox.information( None, - self.trUtf8("New plugin versions available"), - self.trUtf8("<p>There are new plug-ins or plug-in" - " updates available. Use the plug-in" - " repository dialog to get them.</p>"), + self.tr("New plugin versions available"), + self.tr("<p>There are new plug-ins or plug-in" + " updates available. Use the plug-in" + " repository dialog to get them.</p>"), E5MessageBox.StandardButtons( E5MessageBox.Ignore | E5MessageBox.Open),
--- a/PluginManager/PluginRepositoryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PluginManager/PluginRepositoryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -66,18 +66,18 @@ self.setupUi(self) self.__updateButton = self.buttonBox.addButton( - self.trUtf8("Update"), QDialogButtonBox.ActionRole) + self.tr("Update"), QDialogButtonBox.ActionRole) self.__downloadButton = self.buttonBox.addButton( - self.trUtf8("Download"), QDialogButtonBox.ActionRole) + self.tr("Download"), QDialogButtonBox.ActionRole) self.__downloadButton.setEnabled(False) self.__downloadInstallButton = self.buttonBox.addButton( - self.trUtf8("Download && Install"), + self.tr("Download && Install"), QDialogButtonBox.ActionRole) self.__downloadInstallButton.setEnabled(False) self.__downloadCancelButton = self.buttonBox.addButton( - self.trUtf8("Cancel"), QDialogButtonBox.ActionRole) + self.tr("Cancel"), QDialogButtonBox.ActionRole) self.__installButton = \ - self.buttonBox.addButton(self.trUtf8("Close && Install"), + self.buttonBox.addButton(self.tr("Close && Install"), QDialogButtonBox.ActionRole) self.__downloadCancelButton.setEnabled(False) self.__installButton.setEnabled(False) @@ -273,8 +273,8 @@ if ui and ui.notificationsEnabled(): ui.showNotification( UI.PixmapCache.getPixmap("plugin48.png"), - self.trUtf8("Download Plugin Files"), - self.trUtf8("""The requested plugins were downloaded.""")) + self.tr("Download Plugin Files"), + self.tr("""The requested plugins were downloaded.""")) if self.__isDownloadInstall: self.closeAndInstall.emit() @@ -282,8 +282,8 @@ if ui is None or not ui.notificationsEnabled(): E5MessageBox.information( self, - self.trUtf8("Download Plugin Files"), - self.trUtf8("""The requested plugins were downloaded.""")) + self.tr("Download Plugin Files"), + self.tr("""The requested plugins were downloaded.""")) self.downloadProgress.setValue(0) # repopulate the list to update the refresh icons @@ -325,23 +325,23 @@ self.repositoryUrlEdit.setText(url) E5MessageBox.warning( self, - self.trUtf8("Plugins Repository URL Changed"), - self.trUtf8( + self.tr("Plugins Repository URL Changed"), + self.tr( """The URL of the Plugins Repository has""" """ changed. Select the "Update" button to get""" """ the new repository file.""")) else: E5MessageBox.critical( self, - self.trUtf8("Read plugins repository file"), - self.trUtf8("<p>The plugins repository file <b>{0}</b> " - "could not be read. Select Update</p>") + self.tr("Read plugins repository file"), + self.tr("<p>The plugins repository file <b>{0}</b> " + "could not be read. Select Update</p>") .format(self.pluginRepositoryFile)) else: self.__repositoryMissing = True QTreeWidgetItem( self.repositoryList, - ["", self.trUtf8( + ["", self.tr( "No plugin repository file available.\nSelect Update.") ]) self.repositoryList.resizeColumnToContents(1) @@ -393,8 +393,8 @@ if not self.__downloadCancelled: E5MessageBox.warning( self, - self.trUtf8("Error downloading file"), - self.trUtf8( + self.tr("Error downloading file"), + self.tr( """<p>Could not download the requested file""" """ from {0}.</p><p>Error: {1}</p>""" ).format(self.__downloadURL, reply.errorString()) @@ -465,21 +465,21 @@ if self.__stableItem is None: self.__stableItem = \ QTreeWidgetItem(self.repositoryList, - [self.trUtf8("Stable")]) + [self.tr("Stable")]) self.__stableItem.setExpanded(True) parent = self.__stableItem elif status == "unstable": if self.__unstableItem is None: self.__unstableItem = \ QTreeWidgetItem(self.repositoryList, - [self.trUtf8("Unstable")]) + [self.tr("Unstable")]) self.__unstableItem.setExpanded(True) parent = self.__unstableItem else: if self.__unknownItem is None: self.__unknownItem = \ QTreeWidgetItem(self.repositoryList, - [self.trUtf8("Unknown")]) + [self.tr("Unknown")]) self.__unknownItem.setExpanded(True) parent = self.__unknownItem itm = QTreeWidgetItem(parent, [name, version, short]) @@ -633,11 +633,11 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start the process.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(applPath), - self.trUtf8('OK')) + self.tr('OK')) self.close()
--- a/PluginManager/PluginUninstallDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PluginManager/PluginUninstallDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,13 +52,13 @@ self.__external = False self.pluginDirectoryCombo.addItem( - self.trUtf8("User plugins directory"), + self.tr("User plugins directory"), self.__pluginManager.getPluginDir("user")) globalDir = self.__pluginManager.getPluginDir("global") if globalDir is not None and os.access(globalDir, os.W_OK): self.pluginDirectoryCombo.addItem( - self.trUtf8("Global plugins directory"), + self.tr("Global plugins directory"), globalDir) @pyqtSlot(int) @@ -102,8 +102,8 @@ if not self.__pluginManager.unloadPlugin(pluginName): E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> could not be unloaded.""" """ Aborting...</p>""").format(pluginName)) return False @@ -114,8 +114,8 @@ if not hasattr(module, "packageName"): E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> has no 'packageName'""" """ attribute. Aborting...</p>""").format(pluginName)) return False @@ -167,8 +167,8 @@ except OSError as err: E5MessageBox.critical( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin package <b>{0}</b> could not be""" """ removed. Aborting...</p>""" """<p>Reason: {1}</p>""").format(packageDir, str(err))) @@ -179,8 +179,8 @@ if ui.notificationsEnabled(): ui.showNotification( UI.PixmapCache.getPixmap("plugin48.png"), - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> was uninstalled""" """ successfully from {1}.</p>""") .format(pluginName, pluginDirectory)) @@ -188,8 +188,8 @@ E5MessageBox.information( self, - self.trUtf8("Plugin Uninstallation"), - self.trUtf8( + self.tr("Plugin Uninstallation"), + self.tr( """<p>The plugin <b>{0}</b> was uninstalled successfully""" """ from {1}.</p>""") .format(pluginName, pluginDirectory))
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleCheckerDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -98,18 +98,18 @@ self.noFixIssuesSelectButton.setIcon( UI.PixmapCache.getIcon("select.png")) - self.docTypeComboBox.addItem(self.trUtf8("PEP-257"), "pep257") - self.docTypeComboBox.addItem(self.trUtf8("Eric"), "eric") + self.docTypeComboBox.addItem(self.tr("PEP-257"), "pep257") + self.docTypeComboBox.addItem(self.tr("Eric"), "eric") self.statisticsButton = self.buttonBox.addButton( - self.trUtf8("Statistics..."), QDialogButtonBox.ActionRole) + self.tr("Statistics..."), QDialogButtonBox.ActionRole) self.statisticsButton.setToolTip( - self.trUtf8("Press to show some statistics for the last run")) + self.tr("Press to show some statistics for the last run")) self.statisticsButton.setEnabled(False) self.showButton = self.buttonBox.addButton( - self.trUtf8("Show"), QDialogButtonBox.ActionRole) + self.tr("Show"), QDialogButtonBox.ActionRole) self.showButton.setToolTip( - self.trUtf8("Press to show all files containing an issue")) + self.tr("Press to show all files containing an issue")) self.showButton.setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -410,7 +410,7 @@ self.noResults = False self.__createResultItem( file, "1", "1", - self.trUtf8("Error: {0}").format(str(msg)) + self.tr("Error: {0}").format(str(msg)) .rstrip()[1:-1], False, False) progress += 1 continue @@ -493,7 +493,7 @@ position, text) if res == 1: text += "\n" + \ - self.trUtf8("Fix: {0}").format(msg) + self.tr("Fix: {0}").format(msg) self.__createResultItem( fname, lineno, position, text, True, True) @@ -517,7 +517,7 @@ itm = deferredFixes[id_] if fixed == 1: text = "\n" + \ - self.trUtf8("Fix: {0}").format(msg) + self.tr("Fix: {0}").format(msg) self.__modifyFixedResultItem(itm, text, True) else: self.__modifyFixedResultItem(itm, "", False) @@ -551,7 +551,7 @@ self.startButton.setEnabled(True) if self.noResults: - QTreeWidgetItem(self.resultList, [self.trUtf8('No issues found.')]) + QTreeWidgetItem(self.resultList, [self.tr('No issues found.')]) QApplication.processEvents() self.statisticsButton.setEnabled(False) self.showButton.setEnabled(False) @@ -878,7 +878,7 @@ lineno = len(source) fixed, msg, id_ = fixer.fixIssue(lineno, position, text) if fixed == 1: - text = "\n" + self.trUtf8("Fix: {0}").format(msg) + text = "\n" + self.tr("Fix: {0}").format(msg) self.__modifyFixedResultItem(itm, text, True) elif fixed == 0: self.__modifyFixedResultItem(itm, "", False) @@ -890,7 +890,7 @@ fixed, msg = deferredResults[id_] itm = deferredFixes[id_] if fixed == 1: - text = "\n" + self.trUtf8("Fix: {0}").format(msg) + text = "\n" + self.tr("Fix: {0}").format(msg) self.__modifyFixedResultItem(itm, text, True) else: self.__modifyFixedResultItem(itm, "", False)
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleFixer.py Sat Jan 11 11:55:33 2014 +0100 @@ -184,8 +184,8 @@ except (IOError, Utilities.CodingError, UnicodeError) as err: E5MessageBox.critical( self, - self.trUtf8("Fix Code Style Issues"), - self.trUtf8( + self.tr("Fix Code Style Issues"), + self.tr( """<p>Could not save the file <b>{0}</b>.""" """ Skipping it.</p><p>Reason: {1}</p>""") .format(self.__filename, str(err)) @@ -511,7 +511,7 @@ return ( 1, - self.trUtf8( + self.tr( "Triple single quotes converted to triple double quotes."), 0) @@ -541,7 +541,7 @@ self.__source[line] = newText return ( 1, - self.trUtf8('Introductory quotes corrected to be {0}"""') + self.tr('Introductory quotes corrected to be {0}"""') .format(insertChar), 0) @@ -579,7 +579,7 @@ self.__source[line + 1] = "" return ( 1, - self.trUtf8("Single line docstring put on one line."), + self.tr("Single line docstring put on one line."), 0) else: id = self.__getID() @@ -617,7 +617,7 @@ if newText: self.__source[line] = newText - return (1, self.trUtf8("Period added to summary line."), 0) + return (1, self.tr("Period added to summary line."), 0) else: return (0, "", 0) @@ -642,7 +642,7 @@ self.__source[line - 1] = "" return ( 1, - self.trUtf8( + self.tr( "Blank line before function/method docstring removed."), 0) else: @@ -671,7 +671,7 @@ self.__source[line] = self.__getEol() + self.__source[line] return ( 1, - self.trUtf8("Blank line inserted before class docstring."), + self.tr("Blank line inserted before class docstring."), 0) else: id = self.__getID() @@ -699,7 +699,7 @@ self.__source[line] += self.__getEol() return ( 1, - self.trUtf8("Blank line inserted after class docstring."), + self.tr("Blank line inserted after class docstring."), 0) else: id = self.__getID() @@ -731,7 +731,7 @@ self.__source[line] += self.__getEol() return ( 1, - self.trUtf8("Blank line inserted after docstring summary."), + self.tr("Blank line inserted after docstring summary."), 0) else: id = self.__getID() @@ -759,8 +759,8 @@ self.__source[line] = self.__getEol() + self.__source[line] return ( 1, - self.trUtf8("Blank line inserted after last paragraph" - " of docstring."), + self.tr("Blank line inserted after last paragraph" + " of docstring."), 0) else: id = self.__getID() @@ -800,9 +800,9 @@ indent + second + self.__getEol() self.__source[line] = newText if code == "D221": - msg = self.trUtf8("Leading quotes put on separate line.") + msg = self.tr("Leading quotes put on separate line.") else: - msg = self.trUtf8("Trailing quotes put on separate line.") + msg = self.tr("Trailing quotes put on separate line.") return (1, msg, 0) else: id = self.__getID() @@ -829,9 +829,9 @@ line = line - 1 self.__source[line - 1] = "" if code == "D242": - msg = self.trUtf8("Blank line before class docstring removed.") + msg = self.tr("Blank line before class docstring removed.") else: - msg = self.trUtf8( + msg = self.tr( "Blank line before function/method docstring removed.") return (1, msg, 0) else: @@ -859,9 +859,9 @@ line = line - 1 self.__source[line + 1] = "" if code == "D243": - msg = self.trUtf8("Blank line after class docstring removed.") + msg = self.tr("Blank line after class docstring removed.") else: - msg = self.trUtf8( + msg = self.tr( "Blank line after function/method docstring removed.") return (1, msg, 0) else: @@ -890,7 +890,7 @@ self.__source[line - 1] = "" return ( 1, - self.trUtf8("Blank line after last paragraph removed."), + self.tr("Blank line after last paragraph removed."), 0) else: id = self.__getID() @@ -917,9 +917,9 @@ if fixedLine is not None and fixedLine != self.__source[line - 1]: self.__source[line - 1] = fixedLine if code in ["E101", "W191"]: - msg = self.trUtf8("Tab converted to 4 spaces.") + msg = self.tr("Tab converted to 4 spaces.") else: - msg = self.trUtf8( + msg = self.tr( "Indentation adjusted to be a multiple of four.") return (1, msg, 0) else: @@ -948,10 +948,10 @@ changed = self.__fixReindent(line, pos, logical) if changed: if code == "E121": - msg = self.trUtf8( + msg = self.tr( "Indentation of continuation line corrected.") elif code == "E124": - msg = self.trUtf8( + msg = self.tr( "Indentation of closing bracket corrected.") return (1, msg, 0) return (0, "", 0) @@ -989,7 +989,7 @@ self.__indentWord + text.lstrip() return ( 1, - self.trUtf8( + self.tr( "Missing indentation of continuation line corrected."), 0) return (0, "", 0) @@ -1028,7 +1028,7 @@ self.__source[row] = newText changed = True if changed: - return (1, self.trUtf8( + return (1, self.tr( "Closing bracket aligned to opening bracket."), 0) return (0, "", 0) @@ -1063,7 +1063,7 @@ text = self.__source[row] self.__source[row] = self.__getIndent(text) + \ self.__indentWord + text.lstrip() - return (1, self.trUtf8("Indentation level changed."), 0) + return (1, self.tr("Indentation level changed."), 0) return (0, "", 0) else: id = self.__getID() @@ -1102,7 +1102,7 @@ self.__source[row] = newText changed = True if changed: - return (1, self.trUtf8( + return (1, self.tr( "Indentation level of hanging indentation changed."), 0) return (0, "", 0) @@ -1158,7 +1158,7 @@ self.__source[row] = newText changed = True if changed: - return (1, self.trUtf8("Visual indentation corrected."), 0) + return (1, self.tr("Visual indentation corrected."), 0) return (0, "", 0) else: id = self.__getID() @@ -1189,7 +1189,7 @@ return (0, "", 0) self.__source[line] = newText - return (1, self.trUtf8("Extraneous whitespace removed."), 0) + return (1, self.tr("Extraneous whitespace removed."), 0) def __fixE221(self, code, line, pos): """ @@ -1218,9 +1218,9 @@ self.__source[line] = newText if code in ["E225", "E226", "E227", "E228"]: - return (1, self.trUtf8("Missing whitespace added."), 0) + return (1, self.tr("Missing whitespace added."), 0) else: - return (1, self.trUtf8("Extraneous whitespace removed."), 0) + return (1, self.tr("Extraneous whitespace removed."), 0) def __fixE231(self, code, line, pos): """ @@ -1239,7 +1239,7 @@ pos = pos + 1 self.__source[line] = self.__source[line][:pos] + \ " " + self.__source[line][pos:] - return (1, self.trUtf8("Missing whitespace added."), 0) + return (1, self.tr("Missing whitespace added."), 0) def __fixE251(self, code, line, pos): """ @@ -1276,7 +1276,7 @@ self.__source[line + 1] = self.__source[line + 1].lstrip() else: self.__source[line] = newText - return (1, self.trUtf8("Extraneous whitespace removed."), 0) + return (1, self.tr("Extraneous whitespace removed."), 0) def __fixE261(self, code, line, pos): """ @@ -1297,7 +1297,7 @@ right = text[pos:].lstrip(' \t#') newText = left + (" # " + right if right.strip() else right) self.__source[line] = newText - return (1, self.trUtf8("Whitespace around comment sign corrected."), 0) + return (1, self.tr("Whitespace around comment sign corrected."), 0) def __fixE301(self, code, line, pos, apply=False): """ @@ -1316,7 +1316,7 @@ """ if apply: self.__source.insert(line - 1, self.__getEol()) - return (1, self.trUtf8("One blank line inserted."), 0) + return (1, self.tr("One blank line inserted."), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1368,10 +1368,10 @@ if changed: if delta < 0: - msg = self.trUtf8( + msg = self.tr( "%n blank line(s) inserted.", "", -delta) elif delta > 0: - msg = self.trUtf8( + msg = self.tr( "%n superfluous lines removed", "", delta) else: msg = "" @@ -1405,7 +1405,7 @@ index -= 1 else: break - return (1, self.trUtf8("Superfluous blank lines removed."), 0) + return (1, self.tr("Superfluous blank lines removed."), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1435,7 +1435,7 @@ index -= 1 else: break - return (1, self.trUtf8( + return (1, self.tr( "Superfluous blank lines after function decorator removed."), 0) else: @@ -1473,7 +1473,7 @@ newText = text[:pos].rstrip("\t ,") + self.__getEol() + \ self.__getIndent(text) + "import " + text[pos:].lstrip("\t ,") self.__source[line] = newText - return (1, self.trUtf8("Imports were put on separate lines."), 0) + return (1, self.tr("Imports were put on separate lines."), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1520,7 +1520,7 @@ if newNextText == " ": newNextText = "" self.__source[line + 1] = newNextText - return (1, self.trUtf8("Long lines have been shortened."), 0) + return (1, self.tr("Long lines have been shortened."), 0) else: return (0, "", 0) else: @@ -1543,7 +1543,7 @@ """ self.__source[line - 1] = \ self.__source[line - 1].rstrip("\n\r \t\\") + self.__getEol() - return (1, self.trUtf8("Redundant backslash in brackets removed."), 0) + return (1, self.tr("Redundant backslash in brackets removed."), 0) def __fixE701(self, code, line, pos, apply=False): """ @@ -1569,7 +1569,7 @@ self.__indentWord + text[pos:].lstrip("\n\r \t\\") + \ self.__getEol() self.__source[line] = newText - return (1, self.trUtf8("Compound statement corrected."), 0) + return (1, self.tr("Compound statement corrected."), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1604,7 +1604,7 @@ first = text[:pos].rstrip("\n\r \t;") + self.__getEol() second = text[pos:].lstrip("\n\r \t;") self.__source[line] = first + self.__getIndent(text) + second - return (1, self.trUtf8("Compound statement corrected."), 0) + return (1, self.tr("Compound statement corrected."), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1645,7 +1645,7 @@ return (0, "", 0) self.__source[line] = " ".join([left, center, right]) - return (1, self.trUtf8("Comparison to None/True/False corrected."), 0) + return (1, self.tr("Comparison to None/True/False corrected."), 0) def __fixN804(self, code, line, pos, apply=False): """ @@ -1684,7 +1684,7 @@ center = arg + ", " newText = left + center + right self.__source[line] = newText - return (1, self.trUtf8("'{0}' argument added.").format(arg), 0) + return (1, self.tr("'{0}' argument added.").format(arg), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1744,7 +1744,7 @@ else: self.__source[line] = indent + right - return (1, self.trUtf8("'{0}' argument removed.").format(arg), 0) + return (1, self.tr("'{0}' argument removed.").format(arg), 0) else: id = self.__getID() self.__stack.append((id, code, line, pos)) @@ -1765,7 +1765,7 @@ """ self.__source[line - 1] = re.sub(r'[\t ]+(\r?)$', r"\1", self.__source[line - 1]) - return (1, self.trUtf8("Whitespace stripped from end of line."), 0) + return (1, self.tr("Whitespace stripped from end of line."), 0) def __fixW292(self, code, line, pos): """ @@ -1781,7 +1781,7 @@ fix (integer) """ self.__source[line - 1] += self.__getEol() - return (1, self.trUtf8("newline added to end of file."), 0) + return (1, self.tr("newline added to end of file."), 0) def __fixW391(self, code, line, pos): """ @@ -1803,7 +1803,7 @@ index -= 1 else: break - return (1, self.trUtf8( + return (1, self.tr( "Superfluous trailing blank lines removed from end of file."), 0) def __fixW603(self, code, line, pos): @@ -1820,7 +1820,7 @@ fix (integer) """ self.__source[line - 1] = self.__source[line - 1].replace("<>", "!=") - return (1, self.trUtf8("'<>' replaced by '!='."), 0) + return (1, self.tr("'<>' replaced by '!='."), 0) class Reindenter(object):
--- a/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleStatisticsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/CheckerPlugins/CodeStyleChecker/CodeStyleStatisticsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,13 +65,13 @@ totalIssues += stats[code] self.totalIssues.setText( - self.trUtf8("%n issue(s) found", "", totalIssues)) + self.tr("%n issue(s) found", "", totalIssues)) self.fixedIssues.setText( - self.trUtf8("%n issue(s) fixed", "", fixesCount)) + self.tr("%n issue(s) fixed", "", fixesCount)) self.filesChecked.setText( - self.trUtf8("%n file(s) checked", "", filesCount)) + self.tr("%n file(s) checked", "", filesCount)) self.filesIssues.setText( - self.trUtf8("%n file(s) with issues found", "", filesIssues)) + self.tr("%n file(s) with issues found", "", filesIssues)) self.statisticsList.resizeColumnToContents(0) self.statisticsList.resizeColumnToContents(1)
--- a/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/CheckerPlugins/SyntaxChecker/SyntaxCheckerDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,9 +43,9 @@ self.setupUi(self) self.showButton = self.buttonBox.addButton( - self.trUtf8("Show"), QDialogButtonBox.ActionRole) + self.tr("Show"), QDialogButtonBox.ActionRole) self.showButton.setToolTip( - self.trUtf8("Press to show all files containing an issue")) + self.tr("Press to show all files containing an issue")) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -204,7 +204,7 @@ self.noResults = False self.__createResultItem( file, "1", 0, - self.trUtf8("Error: {0}").format(str(msg)) + self.tr("Error: {0}").format(str(msg)) .rstrip()[1:-1], "") progress += 1 continue @@ -290,7 +290,7 @@ self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) if self.noResults: - QTreeWidgetItem(self.resultList, [self.trUtf8('No issues found.')]) + QTreeWidgetItem(self.resultList, [self.tr('No issues found.')]) QApplication.processEvents() self.showButton.setEnabled(False) else:
--- a/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/CheckerPlugins/Tabnanny/TabnannyDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -205,7 +205,7 @@ if self.noResults: self.__createResultItem( - self.trUtf8('No indentation errors found.'), "", "") + self.tr('No indentation errors found.'), "", "") QApplication.processEvents() self.resultList.header().resizeSections(QHeaderView.ResizeToContents) self.resultList.header().setStretchLastSection(True) @@ -280,7 +280,7 @@ interpreter = Preferences.getDebugger("PythonInterpreter") if interpreter == "" or not Utilities.isExecutable(interpreter): return (True, filename, "1", - self.trUtf8("Python2 interpreter not configured.")) + self.tr("Python2 interpreter not configured.")) checker = os.path.join(getConfig('ericDir'), "UtilitiesPython2", "TabnannyChecker.py") @@ -304,4 +304,4 @@ return (False, None, None, None) return (True, filename, "1", - self.trUtf8("Python2 interpreter did not finish within 15s.")) + self.tr("Python2 interpreter did not finish within 15s."))
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiConfigDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -186,9 +186,9 @@ """ filename = E5FileDialog.getSaveFileName( self, - self.trUtf8("Select output file"), + self.tr("Select output file"), self.outputFileEdit.text(), - self.trUtf8("API files (*.api);;All files (*)")) + self.tr("API files (*.api);;All files (*)")) if filename: # make it relative, if it is in a subdirectory of the project path @@ -217,7 +217,7 @@ startDir = self.ppath directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select directory to exclude"), + self.tr("Select directory to exclude"), startDir, E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Plugins/DocumentationPlugins/Ericapi/EricapiExecDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/DocumentationPlugins/Ericapi/EricapiExecDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,14 +80,14 @@ self.process.finished.connect(self.__finish) self.setWindowTitle( - self.trUtf8('{0} - {1}').format(self.cmdname, self.filename)) + self.tr('{0} - {1}').format(self.cmdname, self.filename)) self.process.start(program, args) procStarted = self.process.waitForStarted(5000) if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format(program)) @@ -124,7 +124,7 @@ self.process = None self.contents.insertPlainText( - self.trUtf8('\n{0} finished.\n').format(self.cmdname)) + self.tr('\n{0} finished.\n').format(self.cmdname)) self.contents.ensureCursorVisible() def __readStdout(self):
--- a/Plugins/DocumentationPlugins/Ericdoc/EricdocConfigDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/DocumentationPlugins/Ericdoc/EricdocConfigDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,7 +50,7 @@ self.__initializeDefaults() - self.sampleText = self.trUtf8( + self.sampleText = self.tr( '''<?xml version="1.0" encoding="utf-8"?>''' '''<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"''' '''"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">''' @@ -295,7 +295,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select output directory"), + self.tr("Select output directory"), self.outputDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -320,7 +320,7 @@ startDir = self.ppath directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select directory to exclude"), + self.tr("Select directory to exclude"), startDir, E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -360,9 +360,9 @@ """ cssFile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select CSS style sheet"), + self.tr("Select CSS style sheet"), getConfig('ericCSSDir'), - self.trUtf8("Style sheet (*.css);;All files (*)")) + self.tr("Style sheet (*.css);;All files (*)")) if cssFile: # make it relative, if it is in a subdirectory of the project path @@ -509,7 +509,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select output directory for QtHelp files"), + self.tr("Select output directory for QtHelp files"), self.qtHelpDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Plugins/DocumentationPlugins/Ericdoc/EricdocExecDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/DocumentationPlugins/Ericdoc/EricdocExecDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,14 +80,14 @@ self.process.finished.connect(self.__finish) self.setWindowTitle( - self.trUtf8('{0} - {1}').format(self.cmdname, self.filename)) + self.tr('{0} - {1}').format(self.cmdname, self.filename)) self.process.start(program, args) procStarted = self.process.waitForStarted(5000) if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format(program)) @@ -124,7 +124,7 @@ self.process = None self.contents.insertPlainText( - self.trUtf8('\n{0} finished.\n').format(self.cmdname)) + self.tr('\n{0} finished.\n').format(self.cmdname)) self.contents.ensureCursorVisible() def __readStdout(self):
--- a/Plugins/PluginAbout.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginAbout.py Sat Jan 11 11:55:33 2014 +0100 @@ -74,13 +74,13 @@ acts = [] self.aboutAct = E5Action( - self.trUtf8('About {0}').format(UI.Info.Program), + self.tr('About {0}').format(UI.Info.Program), UI.PixmapCache.getIcon("helpAbout.png"), - self.trUtf8('&About {0}').format(UI.Info.Program), + self.tr('&About {0}').format(UI.Info.Program), 0, 0, self, 'about_eric') - 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 {0}</b>""" """<p>Display some information about this software.</p>""" ).format(UI.Info.Program)) @@ -89,12 +89,12 @@ acts.append(self.aboutAct) self.aboutQtAct = E5Action( - self.trUtf8('About Qt'), + self.tr('About Qt'), UI.PixmapCache.getIcon("helpAboutQt.png"), - self.trUtf8('About &Qt'), 0, 0, self, 'about_qt') + self.tr('About &Qt'), 0, 0, self, '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>""" ))
--- a/Plugins/PluginCodeStyleChecker.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginCodeStyleChecker.py Sat Jan 11 11:55:33 2014 +0100 @@ -77,12 +77,12 @@ menu = e5App().getObject("Project").getMenu("Checks") if menu: self.__projectAct = E5Action( - self.trUtf8('Check Code Style'), - self.trUtf8('&Code Style...'), 0, 0, + self.tr('Check Code Style'), + self.tr('&Code Style...'), 0, 0, self, 'project_check_pep8') self.__projectAct.setStatusTip( - self.trUtf8('Check code style.')) - self.__projectAct.setWhatsThis(self.trUtf8( + self.tr('Check code style.')) + self.__projectAct.setWhatsThis(self.tr( """<b>Check Code Style...</b>""" """<p>This checks Python files for compliance to the""" """ code style conventions given in various PEPs.</p>""" @@ -93,10 +93,10 @@ menu.addAction(self.__projectAct) self.__editorAct = E5Action( - self.trUtf8('Check Code Style'), - self.trUtf8('&Code Style...'), 0, 0, + self.tr('Check Code Style'), + self.tr('&Code Style...'), 0, 0, self, "") - self.__editorAct.setWhatsThis(self.trUtf8( + self.__editorAct.setWhatsThis(self.tr( """<b>Check Code Style...</b>""" """<p>This checks Python files for compliance to the""" """ code style conventions given in various PEPs.</p>""" @@ -173,10 +173,10 @@ self.__projectBrowserMenu = menu if self.__projectBrowserAct is None: self.__projectBrowserAct = E5Action( - self.trUtf8('Check Code Style'), - self.trUtf8('&Code Style...'), 0, 0, + self.tr('Check Code Style'), + self.tr('&Code Style...'), 0, 0, self, "") - self.__projectBrowserAct.setWhatsThis(self.trUtf8( + self.__projectBrowserAct.setWhatsThis(self.tr( """<b>Check Code Style...</b>""" """<p>This checks Python files for compliance to the""" """ code style conventions given in various PEPs.</p>"""
--- a/Plugins/PluginEricapi.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginEricapi.py Sat Jan 11 11:55:33 2014 +0100 @@ -93,12 +93,12 @@ menu = e5App().getObject("Project").getMenu("Apidoc") if menu: self.__projectAct = E5Action( - self.trUtf8('Generate API file (eric5_api)'), - self.trUtf8('Generate &API file (eric5_api)'), 0, 0, + self.tr('Generate API file (eric5_api)'), + self.tr('Generate &API file (eric5_api)'), 0, 0, self, 'doc_eric5_api') - self.__projectAct.setStatusTip(self.trUtf8( + self.__projectAct.setStatusTip(self.tr( 'Generate an API file using eric5_api')) - self.__projectAct.setWhatsThis(self.trUtf8( + self.__projectAct.setWhatsThis(self.tr( """<b>Generate API file</b>""" """<p>Generate an API file using eric5_api.</p>""" ))
--- a/Plugins/PluginEricdoc.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginEricdoc.py Sat Jan 11 11:55:33 2014 +0100 @@ -128,12 +128,12 @@ if menu: self.__projectAct = \ E5Action( - self.trUtf8('Generate documentation (eric5_doc)'), - self.trUtf8('Generate &documentation (eric5_doc)'), 0, 0, + self.tr('Generate documentation (eric5_doc)'), + self.tr('Generate &documentation (eric5_doc)'), 0, 0, self, 'doc_eric5_doc') self.__projectAct.setStatusTip( - self.trUtf8('Generate API documentation using eric5_doc')) - self.__projectAct.setWhatsThis(self.trUtf8( + self.tr('Generate API documentation using eric5_doc')) + self.__projectAct.setWhatsThis(self.tr( """<b>Generate documentation</b>""" """<p>Generate API documentation using eric5_doc.</p>""" ))
--- a/Plugins/PluginSyntaxChecker.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginSyntaxChecker.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,12 +73,12 @@ menu = e5App().getObject("Project").getMenu("Checks") if menu: self.__projectAct = E5Action( - self.trUtf8('Check Syntax'), - self.trUtf8('&Syntax...'), 0, 0, + self.tr('Check Syntax'), + self.tr('&Syntax...'), 0, 0, self, 'project_check_syntax') self.__projectAct.setStatusTip( - self.trUtf8('Check syntax.')) - self.__projectAct.setWhatsThis(self.trUtf8( + self.tr('Check syntax.')) + self.__projectAct.setWhatsThis(self.tr( """<b>Check Syntax...</b>""" """<p>This checks Python files for syntax errors.</p>""" )) @@ -87,10 +87,10 @@ menu.addAction(self.__projectAct) self.__editorAct = E5Action( - self.trUtf8('Check Syntax'), - self.trUtf8('&Syntax...'), 0, 0, + self.tr('Check Syntax'), + self.tr('&Syntax...'), 0, 0, self, "") - self.__editorAct.setWhatsThis(self.trUtf8( + self.__editorAct.setWhatsThis(self.tr( """<b>Check Syntax...</b>""" """<p>This checks Python files for syntax errors.</p>""" )) @@ -166,10 +166,10 @@ self.__projectBrowserMenu = menu if self.__projectBrowserAct is None: self.__projectBrowserAct = E5Action( - self.trUtf8('Check Syntax'), - self.trUtf8('&Syntax...'), 0, 0, + self.tr('Check Syntax'), + self.tr('&Syntax...'), 0, 0, self, "") - self.__projectBrowserAct.setWhatsThis(self.trUtf8( + self.__projectBrowserAct.setWhatsThis(self.tr( """<b>Check Syntax...</b>""" """<p>This checks Python files for syntax errors.</p>""" ))
--- a/Plugins/PluginTabnanny.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginTabnanny.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,12 +73,12 @@ menu = e5App().getObject("Project").getMenu("Checks") if menu: self.__projectAct = E5Action( - self.trUtf8('Check Indentations'), - self.trUtf8('&Indentations...'), 0, 0, + self.tr('Check Indentations'), + self.tr('&Indentations...'), 0, 0, self, 'project_check_indentations') self.__projectAct.setStatusTip( - self.trUtf8('Check indentations using tabnanny.')) - self.__projectAct.setWhatsThis(self.trUtf8( + self.tr('Check indentations using tabnanny.')) + self.__projectAct.setWhatsThis(self.tr( """<b>Check Indentations...</b>""" """<p>This checks Python files""" """ for bad indentations using tabnanny.</p>""" @@ -88,10 +88,10 @@ menu.addAction(self.__projectAct) self.__editorAct = E5Action( - self.trUtf8('Check Indentations'), - self.trUtf8('&Indentations...'), 0, 0, + self.tr('Check Indentations'), + self.tr('&Indentations...'), 0, 0, self, "") - self.__editorAct.setWhatsThis(self.trUtf8( + self.__editorAct.setWhatsThis(self.tr( """<b>Check Indentations...</b>""" """<p>This checks Python files""" """ for bad indentations using tabnanny.</p>""" @@ -168,10 +168,10 @@ self.__projectBrowserMenu = menu if self.__projectBrowserAct is None: self.__projectBrowserAct = E5Action( - self.trUtf8('Check Indentations'), - self.trUtf8('&Indentations...'), 0, 0, + self.tr('Check Indentations'), + self.tr('&Indentations...'), 0, 0, self, "") - self.__projectBrowserAct.setWhatsThis(self.trUtf8( + self.__projectBrowserAct.setWhatsThis(self.tr( """<b>Check Indentations...</b>""" """<p>This checks Python files""" """ for bad indentations using tabnanny.</p>"""
--- a/Plugins/PluginWizardE5MessageBox.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardE5MessageBox.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('E5MessageBox Wizard'), - self.trUtf8('&E5MessageBox Wizard...'), 0, 0, self, + self.tr('E5MessageBox Wizard'), + self.tr('&E5MessageBox Wizard...'), 0, 0, self, 'wizards_e5messagebox') - self.action.setStatusTip(self.trUtf8('E5MessageBox Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('E5MessageBox Wizard')) + self.action.setWhatsThis(self.tr( """<b>E5MessageBox Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create an E5MessageBox. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardPyRegExp.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardPyRegExp.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('Python re Wizard'), - self.trUtf8('&Python re Wizard...'), 0, 0, self, + self.tr('Python re Wizard'), + self.tr('&Python re Wizard...'), 0, 0, self, 'wizards_python_re') - self.action.setStatusTip(self.trUtf8('Python re Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('Python re Wizard')) + self.action.setWhatsThis(self.tr( """<b>Python re Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a Python re string. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQColorDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQColorDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QColorDialog Wizard'), - self.trUtf8('Q&ColorDialog Wizard...'), 0, 0, self, + self.tr('QColorDialog Wizard'), + self.tr('Q&ColorDialog Wizard...'), 0, 0, self, 'wizards_qcolordialog') - self.action.setStatusTip(self.trUtf8('QColorDialog Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QColorDialog Wizard')) + self.action.setWhatsThis(self.tr( """<b>QColorDialog Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QColorDialog. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQFileDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQFileDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -72,11 +72,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QFileDialog Wizard'), - self.trUtf8('Q&FileDialog Wizard...'), 0, 0, self, + self.tr('QFileDialog Wizard'), + self.tr('Q&FileDialog Wizard...'), 0, 0, self, 'wizards_qfiledialog') - self.action.setStatusTip(self.trUtf8('QFileDialog Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QFileDialog Wizard')) + self.action.setWhatsThis(self.tr( """<b>QFileDialog Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QFileDialog. The generated code is""" @@ -130,8 +130,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQFontDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQFontDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QFontDialog Wizard'), - self.trUtf8('Q&FontDialog Wizard...'), 0, 0, self, + self.tr('QFontDialog Wizard'), + self.tr('Q&FontDialog Wizard...'), 0, 0, self, 'wizards_qfontdialog') - self.action.setStatusTip(self.trUtf8('QFontDialog Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QFontDialog Wizard')) + self.action.setWhatsThis(self.tr( """<b>QFontDialog Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QFontDialog. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQInputDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQInputDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QInputDialog Wizard'), - self.trUtf8('Q&InputDialog Wizard...'), 0, 0, self, + self.tr('QInputDialog Wizard'), + self.tr('Q&InputDialog Wizard...'), 0, 0, self, 'wizards_qinputdialog') - self.action.setStatusTip(self.trUtf8('QInputDialog Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QInputDialog Wizard')) + self.action.setWhatsThis(self.tr( """<b>QInputDialog Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QInputDialog. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQMessageBox.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQMessageBox.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QMessageBox Wizard'), - self.trUtf8('Q&MessageBox Wizard...'), 0, 0, self, + self.tr('QMessageBox Wizard'), + self.tr('Q&MessageBox Wizard...'), 0, 0, self, 'wizards_qmessagebox') - self.action.setStatusTip(self.trUtf8('QMessageBox Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QMessageBox Wizard')) + self.action.setWhatsThis(self.tr( """<b>QMessageBox Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QMessageBox. The generated code is""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQRegExp.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQRegExp.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QRegExp Wizard'), - self.trUtf8('Q&RegExp Wizard...'), 0, 0, self, + self.tr('QRegExp Wizard'), + self.tr('Q&RegExp Wizard...'), 0, 0, self, 'wizards_qregexp') - self.action.setStatusTip(self.trUtf8('QRegExp Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QRegExp Wizard')) + self.action.setWhatsThis(self.tr( """<b>QRegExp Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QRegExp. The generated code is inserted""" @@ -120,8 +120,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/PluginWizardQRegularExpression.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/PluginWizardQRegularExpression.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,11 +68,11 @@ Private method to initialize the action. """ self.action = E5Action( - self.trUtf8('QRegularExpression Wizard'), - self.trUtf8('QRegularE&xpression Wizard...'), 0, 0, self, + self.tr('QRegularExpression Wizard'), + self.tr('QRegularE&xpression Wizard...'), 0, 0, self, 'wizards_qregularexpression') - self.action.setStatusTip(self.trUtf8('QRegularExpression Wizard')) - self.action.setWhatsThis(self.trUtf8( + self.action.setStatusTip(self.tr('QRegularExpression Wizard')) + self.action.setWhatsThis(self.tr( """<b>QRegularExpression Wizard</b>""" """<p>This wizard opens a dialog for entering all the parameters""" """ needed to create a QRegularExpression string. The generated""" @@ -121,8 +121,8 @@ if editor is None: E5MessageBox.critical( self.__ui, - self.trUtf8('No current editor'), - self.trUtf8('Please open or create a file first.')) + self.tr('No current editor'), + self.tr('Please open or create a file first.')) else: code, ok = self.__callForm(editor) if ok:
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarkDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,10 +40,10 @@ if mode == self.MOVE_MODE: self.nameEdit.hide() self.nameCombo.addItems([""] + sorted(bookmarksList)) - self.setWindowTitle(self.trUtf8("Move Bookmark")) + self.setWindowTitle(self.tr("Move Bookmark")) else: self.nameCombo.hide() - self.setWindowTitle(self.trUtf8("Define Bookmark")) + self.setWindowTitle(self.tr("Define Bookmark")) self.__bookmarksList = bookmarksList[:]
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksInOutDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -47,9 +47,9 @@ if mode not in [self.INCOMING, self.OUTGOING]: raise ValueError("Bad value for mode") if mode == self.INCOMING: - self.setWindowTitle(self.trUtf8("Mercurial Incoming Bookmarks")) + self.setWindowTitle(self.tr("Mercurial Incoming Bookmarks")) elif mode == self.OUTGOING: - self.setWindowTitle(self.trUtf8("Mercurial Outgoing Bookmarks")) + self.setWindowTitle(self.tr("Mercurial Outgoing Bookmarks")) self.process = QProcess() self.vcs = vcs @@ -139,8 +139,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -172,7 +172,7 @@ if self.bookmarksList.topLevelItemCount() == 0: # no bookmarks defined - self.__generateItem(self.trUtf8("no bookmarks found"), "") + self.__generateItem(self.tr("no bookmarks found"), "") self.__resizeColumns() self.__resort()
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -121,8 +121,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -155,7 +155,7 @@ if self.bookmarksList.topLevelItemCount() == 0: # no bookmarks defined self.__generateItem( - self.trUtf8("no bookmarks defined"), "", "", "") + self.tr("no bookmarks defined"), "", "", "") self.__resizeColumns() self.__resort()
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,14 +31,14 @@ Public method to generate the action objects. """ self.hgBookmarksListAct = E5Action( - self.trUtf8('List bookmarks'), + self.tr('List bookmarks'), UI.PixmapCache.getIcon("listBookmarks.png"), - self.trUtf8('List bookmarks...'), + self.tr('List bookmarks...'), 0, 0, self, 'mercurial_list_bookmarks') - self.hgBookmarksListAct.setStatusTip(self.trUtf8( + self.hgBookmarksListAct.setStatusTip(self.tr( 'List bookmarks of the project' )) - self.hgBookmarksListAct.setWhatsThis(self.trUtf8( + self.hgBookmarksListAct.setWhatsThis(self.tr( """<b>List bookmarks</b>""" """<p>This lists the bookmarks of the project.</p>""" )) @@ -46,14 +46,14 @@ self.actions.append(self.hgBookmarksListAct) self.hgBookmarkDefineAct = E5Action( - self.trUtf8('Define bookmark'), + self.tr('Define bookmark'), UI.PixmapCache.getIcon("addBookmark.png"), - self.trUtf8('Define bookmark...'), + self.tr('Define bookmark...'), 0, 0, self, 'mercurial_define_bookmark') - self.hgBookmarkDefineAct.setStatusTip(self.trUtf8( + self.hgBookmarkDefineAct.setStatusTip(self.tr( 'Define a bookmark for the project' )) - self.hgBookmarkDefineAct.setWhatsThis(self.trUtf8( + self.hgBookmarkDefineAct.setWhatsThis(self.tr( """<b>Define bookmark</b>""" """<p>This defines a bookmark for the project.</p>""" )) @@ -61,14 +61,14 @@ self.actions.append(self.hgBookmarkDefineAct) self.hgBookmarkDeleteAct = E5Action( - self.trUtf8('Delete bookmark'), + self.tr('Delete bookmark'), UI.PixmapCache.getIcon("deleteBookmark.png"), - self.trUtf8('Delete bookmark...'), + self.tr('Delete bookmark...'), 0, 0, self, 'mercurial_delete_bookmark') - self.hgBookmarkDeleteAct.setStatusTip(self.trUtf8( + self.hgBookmarkDeleteAct.setStatusTip(self.tr( 'Delete a bookmark of the project' )) - self.hgBookmarkDeleteAct.setWhatsThis(self.trUtf8( + self.hgBookmarkDeleteAct.setWhatsThis(self.tr( """<b>Delete bookmark</b>""" """<p>This deletes a bookmark of the project.</p>""" )) @@ -76,14 +76,14 @@ self.actions.append(self.hgBookmarkDeleteAct) self.hgBookmarkRenameAct = E5Action( - self.trUtf8('Rename bookmark'), + self.tr('Rename bookmark'), UI.PixmapCache.getIcon("renameBookmark.png"), - self.trUtf8('Rename bookmark...'), + self.tr('Rename bookmark...'), 0, 0, self, 'mercurial_rename_bookmark') - self.hgBookmarkRenameAct.setStatusTip(self.trUtf8( + self.hgBookmarkRenameAct.setStatusTip(self.tr( 'Rename a bookmark of the project' )) - self.hgBookmarkRenameAct.setWhatsThis(self.trUtf8( + self.hgBookmarkRenameAct.setWhatsThis(self.tr( """<b>Rename bookmark</b>""" """<p>This renames a bookmark of the project.</p>""" )) @@ -91,14 +91,14 @@ self.actions.append(self.hgBookmarkRenameAct) self.hgBookmarkMoveAct = E5Action( - self.trUtf8('Move bookmark'), + self.tr('Move bookmark'), UI.PixmapCache.getIcon("moveBookmark.png"), - self.trUtf8('Move bookmark...'), + self.tr('Move bookmark...'), 0, 0, self, 'mercurial_move_bookmark') - self.hgBookmarkMoveAct.setStatusTip(self.trUtf8( + self.hgBookmarkMoveAct.setStatusTip(self.tr( 'Move a bookmark of the project' )) - self.hgBookmarkMoveAct.setWhatsThis(self.trUtf8( + self.hgBookmarkMoveAct.setWhatsThis(self.tr( """<b>Move bookmark</b>""" """<p>This moves a bookmark of the project to another""" """ changeset.</p>""" @@ -107,14 +107,14 @@ self.actions.append(self.hgBookmarkMoveAct) self.hgBookmarkIncomingAct = E5Action( - self.trUtf8('Show incoming bookmarks'), + self.tr('Show incoming bookmarks'), UI.PixmapCache.getIcon("incomingBookmark.png"), - self.trUtf8('Show incoming bookmarks'), + self.tr('Show incoming bookmarks'), 0, 0, self, 'mercurial_incoming_bookmarks') - self.hgBookmarkIncomingAct.setStatusTip(self.trUtf8( + self.hgBookmarkIncomingAct.setStatusTip(self.tr( 'Show a list of incoming bookmarks' )) - self.hgBookmarkIncomingAct.setWhatsThis(self.trUtf8( + self.hgBookmarkIncomingAct.setWhatsThis(self.tr( """<b>Show incoming bookmarks</b>""" """<p>This shows a list of new bookmarks available at the remote""" """ repository.</p>""" @@ -124,14 +124,14 @@ self.actions.append(self.hgBookmarkIncomingAct) self.hgBookmarkPullAct = E5Action( - self.trUtf8('Pull bookmark'), + self.tr('Pull bookmark'), UI.PixmapCache.getIcon("pullBookmark.png"), - self.trUtf8('Pull bookmark'), + self.tr('Pull bookmark'), 0, 0, self, 'mercurial_pull_bookmark') - self.hgBookmarkPullAct.setStatusTip(self.trUtf8( + self.hgBookmarkPullAct.setStatusTip(self.tr( 'Pull a bookmark from a remote repository' )) - self.hgBookmarkPullAct.setWhatsThis(self.trUtf8( + self.hgBookmarkPullAct.setWhatsThis(self.tr( """<b>Pull bookmark</b>""" """<p>This pulls a bookmark from a remote repository into the """ """local repository.</p>""" @@ -140,14 +140,14 @@ self.actions.append(self.hgBookmarkPullAct) self.hgBookmarkOutgoingAct = E5Action( - self.trUtf8('Show outgoing bookmarks'), + self.tr('Show outgoing bookmarks'), UI.PixmapCache.getIcon("outgoingBookmark.png"), - self.trUtf8('Show outgoing bookmarks'), + self.tr('Show outgoing bookmarks'), 0, 0, self, 'mercurial_outgoing_bookmarks') - self.hgBookmarkOutgoingAct.setStatusTip(self.trUtf8( + self.hgBookmarkOutgoingAct.setStatusTip(self.tr( 'Show a list of outgoing bookmarks' )) - self.hgBookmarkOutgoingAct.setWhatsThis(self.trUtf8( + self.hgBookmarkOutgoingAct.setWhatsThis(self.tr( """<b>Show outgoing bookmarks</b>""" """<p>This shows a list of new bookmarks available at the local""" """ repository.</p>""" @@ -157,14 +157,14 @@ self.actions.append(self.hgBookmarkOutgoingAct) self.hgBookmarkPushAct = E5Action( - self.trUtf8('Push bookmark'), + self.tr('Push bookmark'), UI.PixmapCache.getIcon("pushBookmark.png"), - self.trUtf8('Push bookmark'), + self.tr('Push bookmark'), 0, 0, self, 'mercurial_push_bookmark') - self.hgBookmarkPushAct.setStatusTip(self.trUtf8( + self.hgBookmarkPushAct.setStatusTip(self.tr( 'Push a bookmark to a remote repository' )) - self.hgBookmarkPushAct.setWhatsThis(self.trUtf8( + self.hgBookmarkPushAct.setWhatsThis(self.tr( """<b>Push bookmark</b>""" """<p>This pushes a bookmark from the local repository to a """ """remote repository.</p>""" @@ -204,7 +204,7 @@ @return title of the menu (string) """ - return self.trUtf8("Bookmarks") + return self.tr("Bookmarks") def __hgBookmarksList(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/bookmarks.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/bookmarks.py Sat Jan 11 11:55:33 2014 +0100 @@ -124,7 +124,7 @@ args.append(rev) args.append(bookmark) - dia = HgDialog(self.trUtf8('Mercurial Bookmark'), self.vcs) + dia = HgDialog(self.tr('Mercurial Bookmark'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -144,8 +144,8 @@ bookmark, ok = QInputDialog.getItem( None, - self.trUtf8("Delete Bookmark"), - self.trUtf8("Select the bookmark to be deleted:"), + self.tr("Delete Bookmark"), + self.tr("Select the bookmark to be deleted:"), [""] + sorted(self.hgGetBookmarksList(repodir)), 0, True) if ok and bookmark: @@ -154,7 +154,7 @@ args.append("--delete") args.append(bookmark) - dia = HgDialog(self.trUtf8('Delete Mercurial Bookmark'), self.vcs) + dia = HgDialog(self.tr('Delete Mercurial Bookmark'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -183,7 +183,7 @@ args.append(oldName) args.append(newName) - dia = HgDialog(self.trUtf8('Rename Mercurial Bookmark'), self.vcs) + dia = HgDialog(self.tr('Rename Mercurial Bookmark'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -217,7 +217,7 @@ args.append(rev) args.append(bookmark) - dia = HgDialog(self.trUtf8('Move Mercurial Bookmark'), self.vcs) + dia = HgDialog(self.tr('Move Mercurial Bookmark'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -306,8 +306,8 @@ bookmark, ok = QInputDialog.getItem( None, - self.trUtf8("Pull Bookmark"), - self.trUtf8("Select the bookmark to be pulled:"), + self.tr("Pull Bookmark"), + self.tr("Select the bookmark to be pulled:"), [""] + sorted(bookmarks), 0, True) if ok and bookmark: @@ -316,7 +316,7 @@ args.append('--bookmark') args.append(bookmark) - dia = HgDialog(self.trUtf8( + dia = HgDialog(self.tr( 'Pulling bookmark from a remote Mercurial repository'), self.vcs) res = dia.startProcess(args, repodir) @@ -340,8 +340,8 @@ bookmark, ok = QInputDialog.getItem( None, - self.trUtf8("Push Bookmark"), - self.trUtf8("Select the bookmark to be push:"), + self.tr("Push Bookmark"), + self.tr("Select the bookmark to be push:"), [""] + sorted(bookmarks), 0, True) if ok and bookmark: @@ -350,7 +350,7 @@ args.append('--bookmark') args.append(bookmark) - dia = HgDialog(self.trUtf8( + dia = HgDialog(self.tr( 'Pushing bookmark to a remote Mercurial repository'), self.vcs) res = dia.startProcess(args, repodir)
--- a/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/FetchExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,14 +32,14 @@ Public method to generate the action objects. """ self.hgFetchAct = E5Action( - self.trUtf8('Fetch changes'), + self.tr('Fetch changes'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Fetch changes'), + self.tr('Fetch changes'), 0, 0, self, 'mercurial_fetch') - self.hgFetchAct.setStatusTip(self.trUtf8( + self.hgFetchAct.setStatusTip(self.tr( 'Fetch changes from a remote repository' )) - self.hgFetchAct.setWhatsThis(self.trUtf8( + self.hgFetchAct.setWhatsThis(self.tr( """<b>Fetch changes</b>""" """<p>This pulls changes from a remote repository into the """ """local repository. If the pulled changes add a new branch""" @@ -71,7 +71,7 @@ @return title of the menu (string) """ - return self.trUtf8("Fetch") + return self.tr("Fetch") def __hgFetch(self): """ @@ -82,8 +82,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Fetch"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Fetch"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/Plugins/VcsPlugins/vcsMercurial/FetchExtension/fetch.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/FetchExtension/fetch.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,7 +57,7 @@ args.append("-v") dia = HgDialog( - self.trUtf8('Fetching from a remote Mercurial repository'), + self.tr('Fetching from a remote Mercurial repository'), self.vcs) res = dia.startProcess(args, repodir) if res:
--- a/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignaturesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -115,8 +115,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -148,7 +148,7 @@ if self.signaturesList.topLevelItemCount() == 0: # no patches present - self.__generateItem("", "", self.trUtf8("no signatures found")) + self.__generateItem("", "", self.tr("no signatures found")) self.__resizeColumns() self.__resort() @@ -314,7 +314,7 @@ Private method to filter the log entries. """ searchRxText = self.rxEdit.text() - filterTop = self.categoryCombo.currentText() == self.trUtf8("Revision") + filterTop = self.categoryCombo.currentText() == self.tr("Revision") if filterTop and searchRxText.startswith("^"): searchRx = QRegExp( "^\s*{0}".format(searchRxText[1:]), Qt.CaseInsensitive)
--- a/Plugins/VcsPlugins/vcsMercurial/GpgExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/GpgExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,14 +31,14 @@ Public method to generate the action objects. """ self.hgGpgListAct = E5Action( - self.trUtf8('List Signed Changesets'), + self.tr('List Signed Changesets'), UI.PixmapCache.getIcon("changesetSignList.png"), - self.trUtf8('List Signed Changesets...'), + self.tr('List Signed Changesets...'), 0, 0, self, 'mercurial_gpg_list') - self.hgGpgListAct.setStatusTip(self.trUtf8( + self.hgGpgListAct.setStatusTip(self.tr( 'List signed changesets' )) - self.hgGpgListAct.setWhatsThis(self.trUtf8( + self.hgGpgListAct.setWhatsThis(self.tr( """<b>List Signed Changesets</b>""" """<p>This opens a dialog listing all signed changesets.</p>""" )) @@ -46,14 +46,14 @@ self.actions.append(self.hgGpgListAct) self.hgGpgVerifyAct = E5Action( - self.trUtf8('Verify Signatures'), + self.tr('Verify Signatures'), UI.PixmapCache.getIcon("changesetSignVerify.png"), - self.trUtf8('Verify Signatures'), + self.tr('Verify Signatures'), 0, 0, self, 'mercurial_gpg_verify') - self.hgGpgVerifyAct.setStatusTip(self.trUtf8( + self.hgGpgVerifyAct.setStatusTip(self.tr( 'Verify all signatures there may be for a particular revision' )) - self.hgGpgVerifyAct.setWhatsThis(self.trUtf8( + self.hgGpgVerifyAct.setWhatsThis(self.tr( """<b>Verify Signatures</b>""" """<p>This verifies all signatures there may be for a particular""" """ revision.</p>""" @@ -62,14 +62,14 @@ self.actions.append(self.hgGpgVerifyAct) self.hgGpgSignAct = E5Action( - self.trUtf8('Sign Revision'), + self.tr('Sign Revision'), UI.PixmapCache.getIcon("changesetSign.png"), - self.trUtf8('Sign Revision'), + self.tr('Sign Revision'), 0, 0, self, 'mercurial_gpg_sign') - self.hgGpgSignAct.setStatusTip(self.trUtf8( + self.hgGpgSignAct.setStatusTip(self.tr( 'Add a signature for a selected revision' )) - self.hgGpgSignAct.setWhatsThis(self.trUtf8( + self.hgGpgSignAct.setWhatsThis(self.tr( """<b>Sign Revision</b>""" """<p>This adds a signature for a selected revision.</p>""" )) @@ -99,7 +99,7 @@ @return title of the menu (string) """ - return self.trUtf8("GPG") + return self.tr("GPG") def __hgGpgSignatures(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/GpgExtension/gpg.py Sat Jan 11 11:55:33 2014 +0100 @@ -84,7 +84,7 @@ args.append("sigcheck") args.append(rev) - dia = HgDialog(self.trUtf8('Verify Signatures'), self.vcs) + dia = HgDialog(self.tr('Verify Signatures'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -132,7 +132,7 @@ if revision: args.append(revision) - dia = HgDialog(self.trUtf8('Sign Revision'), self.vcs) + dia = HgDialog(self.tr('Sign Revision'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_()
--- a/Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -84,7 +84,7 @@ """ path = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Add Sub-repository"), + self.tr("Add Sub-repository"), os.path.join(self.__projectPath, self.pathEdit.text()), E5FileDialog.Options(E5FileDialog.Option(0))) @@ -96,9 +96,9 @@ else: E5MessageBox.critical( self, - self.trUtf8("Add Sub-repository"), - self.trUtf8("""The sub-repository path must be inside""" - """ the project.""")) + self.tr("Add Sub-repository"), + self.tr("""The sub-repository path must be inside""" + """ the project.""")) return def getData(self):
--- a/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -135,8 +135,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg'))
--- a/Plugins/VcsPlugins/vcsMercurial/HgArchiveDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgArchiveDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,28 +42,28 @@ self.__activeCompleter.model().setNameFilters([]) self.typeComboBox.addItem( - self.trUtf8("Detect Automatically"), "") + self.tr("Detect Automatically"), "") self.typeComboBox.addItem( - self.trUtf8("Directory of Files"), "files") + self.tr("Directory of Files"), "files") self.typeComboBox.addItem( - self.trUtf8("Uncompressed TAR-Archive"), "tar") + self.tr("Uncompressed TAR-Archive"), "tar") self.typeComboBox.addItem( - self.trUtf8("Bzip2 compressed TAR-Archive"), "tbz2") + self.tr("Bzip2 compressed TAR-Archive"), "tbz2") self.typeComboBox.addItem( - self.trUtf8("Gzip compressed TAR-Archive"), "tgz") + self.tr("Gzip compressed TAR-Archive"), "tgz") self.typeComboBox.addItem( - self.trUtf8("Uncompressed ZIP-Archive"), "uzip") + self.tr("Uncompressed ZIP-Archive"), "uzip") self.typeComboBox.addItem( - self.trUtf8("Compressed ZIP-Archive"), "zip") + self.tr("Compressed ZIP-Archive"), "zip") self.__unixFileFilters = [ - self.trUtf8("Bzip2 compressed TAR-Archive (*.tar.bz2)"), - self.trUtf8("Gzip compressed TAR-Archive (*.tar.gz)"), - self.trUtf8("Uncompressed TAR-Archive (*.tar)"), + self.tr("Bzip2 compressed TAR-Archive (*.tar.bz2)"), + self.tr("Gzip compressed TAR-Archive (*.tar.gz)"), + self.tr("Uncompressed TAR-Archive (*.tar)"), ] self.__windowsFileFilters = [ - self.trUtf8("Compressed ZIP-Archive (*.zip)"), - self.trUtf8("Uncompressed ZIP-Archive (*.uzip)") + self.tr("Compressed ZIP-Archive (*.zip)"), + self.tr("Uncompressed ZIP-Archive (*.uzip)") ] if Utilities.isWindowsPlatform(): self.__fileFilters = ";;".join( @@ -71,7 +71,7 @@ else: self.__fileFilters = ";;".join( self.__unixFileFilters + self.__windowsFileFilters) - self.__fileFilters += ";;" + self.trUtf8("All Files (*)") + self.__fileFilters += ";;" + self.tr("All Files (*)") self.__typeFilters = { "tar": ["*.tar"], @@ -111,13 +111,13 @@ if type_ == "files": archive = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Archive Directory"), + self.tr("Select Archive Directory"), archive, E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) else: archive, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Select Archive File"), + self.tr("Select Archive File"), archive, self.__fileFilters, None,
--- a/Plugins/VcsPlugins/vcsMercurial/HgBackoutDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgBackoutDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -171,7 +171,7 @@ if self.messageEdit.toPlainText(): msg = self.messageEdit.toPlainText() else: - msg = self.trUtf8("Backed out changeset <{0}>.").format(rev) + msg = self.tr("Backed out changeset <{0}>.").format(rev) return (rev, self.mergeCheckBox.isChecked,
--- a/Plugins/VcsPlugins/vcsMercurial/HgClient.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgClient.py Sat Jan 11 11:55:33 2014 +0100 @@ -80,7 +80,7 @@ self.__server.start('hg', self.__serverArgs) serverStarted = self.__server.waitForStarted(5000) if not serverStarted: - return False, self.trUtf8( + return False, self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg') @@ -127,33 +127,33 @@ """ ch, msg = self.__readChannel() if not ch: - return False, self.trUtf8("Did not receive the 'hello' message.") + return False, self.tr("Did not receive the 'hello' message.") elif ch != "o": - return False, self.trUtf8("Received data on unexpected channel.") + return False, self.tr("Received data on unexpected channel.") msg = msg.split("\n") if not msg[0].startswith("capabilities: "): - return False, self.trUtf8( + return False, self.tr( "Bad 'hello' message, expected 'capabilities: '" " but got '{0}'.").format(msg[0]) self.__capabilities = msg[0][len('capabilities: '):] if not self.__capabilities: - return False, self.trUtf8("'capabilities' message did not contain" - " any capability.") + return False, self.tr("'capabilities' message did not contain" + " any capability.") self.__capabilities = set(self.__capabilities.split()) if "runcommand" not in self.__capabilities: return False, "'capabilities' did not contain 'runcommand'." if not msg[1].startswith("encoding: "): - return False, self.trUtf8( + return False, self.tr( "Bad 'hello' message, expected 'encoding: '" " but got '{0}'.").format(msg[1]) encoding = msg[1][len('encoding: '):] if not encoding: - return False, self.trUtf8("'encoding' message did not contain" - " any encoding.") + return False, self.tr("'encoding' message did not contain" + " any encoding.") self.__encoding = encoding return True, "" @@ -333,7 +333,7 @@ else: def myprompt(size): if outputBuffer is None: - msg = self.trUtf8("For message see output dialog.") + msg = self.tr("For message see output dialog.") else: msg = outputBuffer.getvalue() reply = self.__prompt(size, msg)
--- a/Plugins/VcsPlugins/vcsMercurial/HgCopyDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgCopyDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -47,7 +47,7 @@ self.targetCompleter = E5FileCompleter(self.targetEdit) if move: - self.setWindowTitle(self.trUtf8('Mercurial Move')) + self.setWindowTitle(self.tr('Mercurial Move')) else: self.forceCheckBox.setEnabled(False) self.forceCheckBox.setChecked(force) @@ -79,13 +79,13 @@ if os.path.isdir(self.source): target = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) else: target = E5FileDialog.getSaveFileName( self, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
--- a/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -145,8 +145,8 @@ self.inputGroup.setEnabled(False) E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg'))
--- a/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgDiffDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -113,7 +113,7 @@ args = [] if qdiff: args.append('qdiff') - self.setWindowTitle(self.trUtf8("Patch Contents")) + self.setWindowTitle(self.tr("Patch Contents")) else: args.append('diff') self.vcs.addArguments(args, self.vcs.options['global']) @@ -194,8 +194,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -220,7 +220,7 @@ if self.paras == 0: self.contents.insertPlainText( - self.trUtf8('There is no difference.')) + self.tr('There is no difference.')) return self.buttonBox.button(QDialogButtonBox.Save).setEnabled(True) @@ -233,8 +233,8 @@ self.contents.setTextCursor(tc) self.contents.ensureCursorVisible() - self.filesCombo.addItem(self.trUtf8("<Start>"), 0) - self.filesCombo.addItem(self.trUtf8("<End>"), -1) + self.filesCombo.addItem(self.tr("<Start>"), 0) + self.filesCombo.addItem(self.tr("<End>"), -1) for oldFile, newFile, pos in sorted(self.__fileSeparators): if oldFile != newFile: self.filesCombo.addItem( @@ -405,9 +405,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diff"), + self.tr("Save Diff"), fname, - self.trUtf8("Patch Files (*.diff)"), + self.tr("Patch Files (*.diff)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -422,9 +422,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diff"), - self.trUtf8("<p>The patch file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diff"), + self.tr("<p>The patch file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -437,8 +437,8 @@ f.close() except IOError as why: E5MessageBox.critical( - self, self.trUtf8('Save Diff'), - self.trUtf8( + self, self.tr('Save Diff'), + self.tr( '<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why)))
--- a/Plugins/VcsPlugins/vcsMercurial/HgExportDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgExportDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -75,7 +75,7 @@ """ dn = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Export Patches"), + self.tr("Export Patches"), self.directoryEdit.text(), E5FileDialog.Options(E5FileDialog.Option(0)))
--- a/Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -67,9 +67,9 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select patch file"), + self.tr("Select patch file"), self.patchFileEdit.text(), - self.trUtf8("Patch Files (*.diff *.patch);;All Files (*)")) + self.tr("Patch Files (*.diff *.patch);;All Files (*)")) if fn: self.patchFileEdit.setText(Utilities.toNativeSeparators(fn))
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,11 +57,11 @@ self.setupUi(self) if mode == "log": - self.setWindowTitle(self.trUtf8("Mercurial Log")) + self.setWindowTitle(self.tr("Mercurial Log")) elif mode == "incoming": - self.setWindowTitle(self.trUtf8("Mercurial Log (Incoming)")) + self.setWindowTitle(self.tr("Mercurial Log (Incoming)")) elif mode == "outgoing": - self.setWindowTitle(self.trUtf8("Mercurial Log (Outgoing)")) + self.setWindowTitle(self.tr("Mercurial Log (Outgoing)")) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -70,9 +70,9 @@ self.filesTree.header().setSortIndicator(0, Qt.AscendingOrder) self.refreshButton = self.buttonBox.addButton( - self.trUtf8("&Refresh"), QDialogButtonBox.ActionRole) + self.tr("&Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the list of changesets")) + self.tr("Press to refresh the list of changesets")) self.refreshButton.setEnabled(False) self.sbsCheckBox.setEnabled(isFile) @@ -89,14 +89,14 @@ self.__initData() - self.__allBranchesFilter = self.trUtf8("All") + self.__allBranchesFilter = self.tr("All") self.fromDate.setDisplayFormat("yyyy-MM-dd") self.toDate.setDisplayFormat("yyyy-MM-dd") self.fromDate.setDate(QDate.currentDate()) self.toDate.setDate(QDate.currentDate()) self.fieldCombo.setCurrentIndex(self.fieldCombo.findText( - self.trUtf8("Message"))) + self.tr("Message"))) self.limitSpinBox.setValue(self.vcs.getPlugin().getPreferences( "LogLimit")) self.stopCheckBox.setChecked(self.vcs.getPlugin().getPreferences( @@ -120,9 +120,9 @@ self.process.readyReadStandardError.connect(self.__readStderr) self.flags = { - 'A': self.trUtf8('Added'), - 'D': self.trUtf8('Deleted'), - 'M': self.trUtf8('Modified'), + 'A': self.tr('Added'), + 'D': self.tr('Deleted'), + 'M': self.tr('Modified'), } self.__dotRadius = 8 @@ -132,32 +132,32 @@ QSize(100 * self.__rowHeight, self.__rowHeight)) if self.vcs.version >= (1, 8): self.logTree.headerItem().setText( - self.logTree.columnCount(), self.trUtf8("Bookmarks")) + self.logTree.columnCount(), self.tr("Bookmarks")) if self.vcs.version < (2, 1): self.logTree.setColumnHidden(self.PhaseColumn, True) self.__actionsMenu = QMenu() if self.vcs.version >= (2, 0): self.__graftAct = self.__actionsMenu.addAction( - self.trUtf8("Copy Changesets"), self.__graftActTriggered) - self.__graftAct.setToolTip(self.trUtf8( + self.tr("Copy Changesets"), self.__graftActTriggered) + self.__graftAct.setToolTip(self.tr( "Copy the selected changesets to the current branch")) else: self.__graftAct = None if self.vcs.version >= (2, 1): self.__phaseAct = self.__actionsMenu.addAction( - self.trUtf8("Change Phase"), self.__phaseActTriggered) - self.__phaseAct.setToolTip(self.trUtf8( + self.tr("Change Phase"), self.__phaseActTriggered) + self.__phaseAct.setToolTip(self.tr( "Change the phase of the selected revisions")) - self.__phaseAct.setWhatsThis(self.trUtf8( + self.__phaseAct.setWhatsThis(self.tr( """<b>Change Phase</b>\n<p>This changes the phase of the""" """ selected revisions. The selected revisions have to have""" """ the same current phase.</p>""")) else: self.__phaseAct = None self.__tagAct = self.__actionsMenu.addAction( - self.trUtf8("Tag"), self.__tagActTriggered) - self.__tagAct.setToolTip(self.trUtf8("Tag the selected revision")) + self.tr("Tag"), self.__tagActTriggered) + self.__tagAct.setToolTip(self.tr("Tag the selected revision")) self.actionsButton.setIcon( UI.PixmapCache.getIcon("actionsToolButton.png")) self.actionsButton.setMenu(self.__actionsMenu) @@ -437,15 +437,15 @@ 'replace') else: if not finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the hg executable.") + errMsg = self.tr("Could not start the hg executable.") if errMsg: E5MessageBox.critical( self, - self.trUtf8("Mercurial Error"), + self.tr("Mercurial Error"), errMsg) if output: @@ -480,15 +480,15 @@ 'replace') else: if not finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the hg executable.") + errMsg = self.tr("Could not start the hg executable.") if errMsg: E5MessageBox.critical( self, - self.trUtf8("Mercurial Error"), + self.tr("Mercurial Error"), errMsg) if output: @@ -527,15 +527,15 @@ 'replace') else: if not finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the hg executable.") + errMsg = self.tr("Could not start the hg executable.") if errMsg: E5MessageBox.critical( self, - self.trUtf8("Mercurial Error"), + self.tr("Mercurial Error"), errMsg) if output: @@ -731,8 +731,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -1255,10 +1255,10 @@ closedBranch = branch + '--' txt = self.fieldCombo.currentText() - if txt == self.trUtf8("Author"): + if txt == self.tr("Author"): fieldIndex = self.AuthorColumn searchRx = QRegExp(self.rxEdit.text(), Qt.CaseInsensitive) - elif txt == self.trUtf8("Revision"): + elif txt == self.tr("Revision"): fieldIndex = self.RevisionColumn txt = self.rxEdit.text() if txt.startswith("^"): @@ -1414,8 +1414,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Copy Changesets"), - self.trUtf8( + self.tr("Copy Changesets"), + self.tr( """The project should be reread. Do this now?"""), yesDefault=True) if res:
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -56,7 +56,7 @@ self.__hgClient = self.vcs.getClient() self.contents.setHtml( - self.trUtf8('<b>Processing your request, please wait...</b>')) + self.tr('<b>Processing your request, please wait...</b>')) self.process.finished.connect(self.__procFinished) self.process.readyReadStandardOutput.connect(self.__readStdout) @@ -65,7 +65,7 @@ self.contents.anchorClicked.connect(self.__sourceChanged) self.revisions = [] # stack of remembered revisions - self.revString = self.trUtf8('Revision') + self.revString = self.tr('Revision') self.projectMode = False self.logEntries = [] # list of log entries @@ -190,8 +190,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -242,15 +242,15 @@ 'replace') else: if not finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the hg executable.") + errMsg = self.tr("Could not start the hg executable.") if errMsg: E5MessageBox.critical( self, - self.trUtf8("Mercurial Error"), + self.tr("Mercurial Error"), errMsg) if output: @@ -278,7 +278,7 @@ self.contents.clear() if not self.logEntries: - self.errors.append(self.trUtf8("No log available for '{0}'") + self.errors.append(self.tr("No log available for '{0}'") .format(self.filename)) self.errorGroup.show() return @@ -314,32 +314,32 @@ dstr += ' [<a href="{0}" name="{1}" id="{1}">{2}</a>]'.format( url.toString(), str(query, encoding="ascii"), - self.trUtf8('diff to {0}').format(parent), + self.tr('diff to {0}').format(parent), ) dstr += '<br />\n' html += dstr if "phase" in entry: - html += self.trUtf8("Phase: {0}<br />\n")\ + html += self.tr("Phase: {0}<br />\n")\ .format(entry["phase"]) - html += self.trUtf8("Branches: {0}<br />\n")\ + html += self.tr("Branches: {0}<br />\n")\ .format(entry["branches"]) - html += self.trUtf8("Tags: {0}<br />\n").format(entry["tags"]) + html += self.tr("Tags: {0}<br />\n").format(entry["tags"]) if "bookmarks" in entry: - html += self.trUtf8("Bookmarks: {0}<br />\n")\ + html += self.tr("Bookmarks: {0}<br />\n")\ .format(entry["bookmarks"]) - html += self.trUtf8("Parents: {0}<br />\n")\ + html += self.tr("Parents: {0}<br />\n")\ .format(entry["parents"]) - html += self.trUtf8('<i>Author: {0}</i><br />\n')\ + html += self.tr('<i>Author: {0}</i><br />\n')\ .format(entry["user"]) date, time = entry["date"].split()[:2] - html += self.trUtf8('<i>Date: {0}, {1}</i><br />\n')\ + html += self.tr('<i>Date: {0}, {1}</i><br />\n')\ .format(date, time) for line in entry["description"]: @@ -350,24 +350,24 @@ html += '<br />\n' for f in entry["file_adds"].strip().split(", "): if f in fileCopies: - html += self.trUtf8( + html += self.tr( 'Added {0} (copied from {1})<br />\n')\ .format(Utilities.html_encode(f), Utilities.html_encode(fileCopies[f])) else: - html += self.trUtf8('Added {0}<br />\n')\ + html += self.tr('Added {0}<br />\n')\ .format(Utilities.html_encode(f)) if entry["files_mods"]: html += '<br />\n' for f in entry["files_mods"].strip().split(", "): - html += self.trUtf8('Modified {0}<br />\n')\ + html += self.tr('Modified {0}<br />\n')\ .format(Utilities.html_encode(f)) if entry["file_dels"]: html += '<br />\n' for f in entry["file_dels"].strip().split(", "): - html += self.trUtf8('Deleted {0}<br />\n')\ + html += self.tr('Deleted {0}<br />\n')\ .format(Utilities.html_encode(f)) html += '</p>{0}<br/>\n'.format(80 * "=")
--- a/Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgNewProjectOptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -70,7 +70,7 @@ if self.protocolCombo.currentText() == "file://": directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Repository-Directory"), + self.tr("Select Repository-Directory"), self.vcsUrlEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -85,7 +85,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Project Directory"), + self.tr("Select Project Directory"), self.vcsProjectDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Plugins/VcsPlugins/vcsMercurial/HgPhaseDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgPhaseDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -28,9 +28,9 @@ self.setupUi(self) self.phaseCombo.addItem("", "") - self.phaseCombo.addItem(self.trUtf8("Public"), "p") - self.phaseCombo.addItem(self.trUtf8("Draft"), "d") - self.phaseCombo.addItem(self.trUtf8("Secret"), "s") + self.phaseCombo.addItem(self.tr("Public"), "p") + self.phaseCombo.addItem(self.tr("Draft"), "d") + self.phaseCombo.addItem(self.tr("Secret"), "s") self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
--- a/Plugins/VcsPlugins/vcsMercurial/HgRevisionSelectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgRevisionSelectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,8 +43,8 @@ self.bookmarkCombo.setHidden(True) if showNone: - self.tipButton.setText(self.trUtf8("No revision selected")) - self.tipButton.setToolTip(self.trUtf8( + self.tipButton.setText(self.tr("No revision selected")) + self.tipButton.setToolTip(self.tr( "Select to not specify a specific revision")) def __updateOK(self):
--- a/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgServeDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,46 +41,46 @@ self.__styles = ["paper", "coal", "gitweb", "monoblue", "spartan", ] - self.setWindowTitle(self.trUtf8("Mercurial Server")) + self.setWindowTitle(self.tr("Mercurial Server")) self.__startAct = QAction( UI.PixmapCache.getIcon( os.path.join("VcsPlugins", "vcsMercurial", "icons", "startServer.png")), - self.trUtf8("Start Server"), self) + self.tr("Start Server"), self) self.__startAct.triggered[()].connect(self.__startServer) self.__stopAct = QAction( UI.PixmapCache.getIcon( os.path.join("VcsPlugins", "vcsMercurial", "icons", "stopServer.png")), - self.trUtf8("Stop Server"), self) + self.tr("Stop Server"), self) self.__stopAct.triggered[()].connect(self.__stopServer) self.__browserAct = QAction( UI.PixmapCache.getIcon("home.png"), - self.trUtf8("Start Browser"), self) + self.tr("Start Browser"), self) self.__browserAct.triggered[()].connect(self.__startBrowser) self.__portSpin = QSpinBox(self) self.__portSpin.setMinimum(2048) self.__portSpin.setMaximum(65535) - self.__portSpin.setToolTip(self.trUtf8("Enter the server port")) + self.__portSpin.setToolTip(self.tr("Enter the server port")) self.__portSpin.setValue( self.vcs.getPlugin().getPreferences("ServerPort")) self.__styleCombo = QComboBox(self) self.__styleCombo.addItems(self.__styles) - self.__styleCombo.setToolTip(self.trUtf8("Select the style to use")) + self.__styleCombo.setToolTip(self.tr("Select the style to use")) self.__styleCombo.setCurrentIndex(self.__styleCombo.findText( self.vcs.getPlugin().getPreferences("ServerStyle"))) - self.__serverToolbar = QToolBar(self.trUtf8("Server"), self) + self.__serverToolbar = QToolBar(self.tr("Server"), self) self.__serverToolbar.addAction(self.__startAct) self.__serverToolbar.addAction(self.__stopAct) self.__serverToolbar.addSeparator() self.__serverToolbar.addWidget(self.__portSpin) self.__serverToolbar.addWidget(self.__styleCombo) - self.__browserToolbar = QToolBar(self.trUtf8("Browser"), self) + self.__browserToolbar = QToolBar(self.tr("Browser"), self) self.__browserToolbar.addAction(self.__browserAct) self.addToolBar(Qt.TopToolBarArea, self.__serverToolbar) @@ -137,8 +137,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg'))
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -44,9 +44,9 @@ self.__lastColumn = self.statusList.columnCount() self.refreshButton = self.buttonBox.addButton( - self.trUtf8("Refresh"), QDialogButtonBox.ActionRole) + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the status display")) + self.tr("Press to refresh the status display")) self.refreshButton.setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -75,28 +75,28 @@ self.menu = QMenu() if not mq: self.menuactions.append(self.menu.addAction( - self.trUtf8("Commit changes to repository..."), self.__commit)) + self.tr("Commit changes to repository..."), self.__commit)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Select all for commit"), self.__commitSelectAll)) + self.tr("Select all for commit"), self.__commitSelectAll)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Deselect all from commit"), + self.tr("Deselect all from commit"), self.__commitDeselectAll)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Add to repository"), self.__add)) + self.tr("Add to repository"), self.__add)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences"), self.__diff)) + self.tr("Show differences"), self.__diff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences side-by-side"), self.__sbsDiff)) + self.tr("Show differences side-by-side"), self.__sbsDiff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Remove from repository"), self.__forget)) + self.tr("Remove from repository"), self.__forget)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Revert changes"), self.__revert)) + self.tr("Revert changes"), self.__revert)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Restore missing"), self.__restoreMissing)) + self.tr("Restore missing"), self.__restoreMissing)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Adjust column sizes"), self.__resizeColumns)) + self.tr("Adjust column sizes"), self.__resizeColumns)) for act in self.menuactions: act.setEnabled(False) @@ -105,27 +105,27 @@ self.__showContextMenu) self.modifiedIndicators = [ - self.trUtf8('added'), - self.trUtf8('modified'), - self.trUtf8('removed'), + self.tr('added'), + self.tr('modified'), + self.tr('removed'), ] self.unversionedIndicators = [ - self.trUtf8('not tracked'), + self.tr('not tracked'), ] self.missingIndicators = [ - self.trUtf8('missing') + self.tr('missing') ] self.status = { - 'A': self.trUtf8('added'), - 'C': self.trUtf8('normal'), - 'I': self.trUtf8('ignored'), - 'M': self.trUtf8('modified'), - 'R': self.trUtf8('removed'), - '?': self.trUtf8('not tracked'), - '!': self.trUtf8('missing'), + 'A': self.tr('added'), + 'C': self.tr('normal'), + 'I': self.tr('ignored'), + 'M': self.tr('modified'), + 'R': self.tr('removed'), + '?': self.tr('not tracked'), + '!': self.tr('missing'), } def __resort(self): @@ -214,9 +214,9 @@ if self.__mq: self.setWindowTitle( - self.trUtf8("Mercurial Queue Repository Status")) + self.tr("Mercurial Queue Repository Status")) else: - self.setWindowTitle(self.trUtf8('Mercurial Status')) + self.setWindowTitle(self.tr('Mercurial Status')) args = [] args.append('status') @@ -278,8 +278,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -309,7 +309,7 @@ Qt.OtherFocusReason) self.__statusFilters.sort() - self.__statusFilters.insert(0, "<{0}>".format(self.trUtf8("all"))) + self.__statusFilters.insert(0, "<{0}>".format(self.tr("all"))) self.statusFilterCombo.addItems(self.__statusFilters) for act in self.menuactions: @@ -494,7 +494,7 @@ @param txt selected status filter (string) """ - if txt == "<{0}>".format(self.trUtf8("all")): + if txt == "<{0}>".format(self.tr("all")): for topIndex in range(self.statusList.topLevelItemCount()): topItem = self.statusList.topLevelItem(topIndex) topItem.setHidden(False) @@ -594,9 +594,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Commit"), - self.trUtf8("""There are no entries selected to be""" - """ committed.""")) + self.tr("Commit"), + self.tr("""There are no entries selected to be""" + """ committed.""")) return if Preferences.getVCS("AutoSaveFiles"): @@ -634,9 +634,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Add"), - self.trUtf8("""There are no unversioned entries""" - """ available/selected.""")) + self.tr("Add"), + self.tr("""There are no unversioned entries""" + """ available/selected.""")) return self.vcs.vcsAdd(names) @@ -656,9 +656,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Remove"), - self.trUtf8("""There are no missing entries""" - """ available/selected.""")) + self.tr("Remove"), + self.tr("""There are no missing entries""" + """ available/selected.""")) return self.vcs.hgForget(names) @@ -673,9 +673,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return self.vcs.hgRevert(names) @@ -697,9 +697,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no missing entries""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no missing entries""" + """ available/selected.""")) return self.vcs.hgRevert(names) @@ -715,9 +715,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Differences"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Differences"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return if self.diff is None: @@ -735,16 +735,16 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return elif len(names) > 1: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""Only one file with uncommitted changes""" - """ must be selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""Only one file with uncommitted changes""" + """ must be selected.""")) return self.vcs.hgSbsDiff(names[0])
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusMonitorThread.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusMonitorThread.py Sat Jan 11 11:55:33 2014 +0100 @@ -99,7 +99,7 @@ else: process.kill() process.waitForFinished() - error = self.trUtf8("Could not start the Mercurial process.") + error = self.tr("Could not start the Mercurial process.") if error: return False, error @@ -154,7 +154,7 @@ self.reportedStates = states return True, \ - self.trUtf8("Mercurial status checked successfully") + self.tr("Mercurial status checked successfully") def _shutdown(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/HgSummaryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgSummaryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -38,9 +38,9 @@ self.setupUi(self) self.refreshButton = self.buttonBox.addButton( - self.trUtf8("Refresh"), QDialogButtonBox.ActionRole) + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the summary display")) + self.tr("Press to refresh the summary display")) self.refreshButton.setEnabled(False) self.process = None @@ -105,8 +105,8 @@ if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -318,32 +318,32 @@ pindex += 1 changeset = "{0}:{1}".format(rev, node) if len(infoDict["parent"]) > 1: - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Parent #{0}</b></td><td>{1}</td></tr>") .format(pindex, changeset)) else: - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Parent</b></td><td>{0}</td></tr>") .format(changeset)) if tags: - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Tags</b></td><td>{0}</td></tr>") .format('<br/>'.join(tags.split()))) if message: - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Commit Message</b></td><td>{0}</td></tr>") .format(message)) if remarks: rem = [] if "@EMPTY@" in remarks: - rem.append(self.trUtf8("empty repository")) + rem.append(self.tr("empty repository")) if "@NO_REVISION@" in remarks: - rem.append(self.trUtf8("no revision checked out")) - info.append(self.trUtf8( + rem.append(self.tr("no revision checked out")) + info.append(self.tr( "<tr><td><b>Remarks</b></td><td>{0}</td></tr>") .format(", ".join(rem))) if "branch" in infoDict: - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Branch</b></td><td>{0}</td></tr>") .format(infoDict["branch"])) if "bookmarks" in infoDict: @@ -351,105 +351,105 @@ for i in range(len(bookmarks)): if bookmarks[i].startswith("*"): bookmarks[i] = "<b>{0}</b>".format(bookmarks[i]) - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Bookmarks</b></td><td>{0}</td></tr>") .format('<br/>'.join(bookmarks))) if "commit" in infoDict: cinfo = [] for category, count in infoDict["commit"][0].items(): if category == "modified": - cinfo.append(self.trUtf8("{0} modified").format(count)) + cinfo.append(self.tr("{0} modified").format(count)) elif category == "added": - cinfo.append(self.trUtf8("{0} added").format(count)) + cinfo.append(self.tr("{0} added").format(count)) elif category == "removed": - cinfo.append(self.trUtf8("{0} removed").format(count)) + cinfo.append(self.tr("{0} removed").format(count)) elif category == "renamed": - cinfo.append(self.trUtf8("{0} renamed").format(count)) + cinfo.append(self.tr("{0} renamed").format(count)) elif category == "copied": - cinfo.append(self.trUtf8("{0} copied").format(count)) + cinfo.append(self.tr("{0} copied").format(count)) elif category == "deleted": - cinfo.append(self.trUtf8("{0} deleted").format(count)) + cinfo.append(self.tr("{0} deleted").format(count)) elif category == "unknown": - cinfo.append(self.trUtf8("{0} unknown").format(count)) + cinfo.append(self.tr("{0} unknown").format(count)) elif category == "ignored": - cinfo.append(self.trUtf8("{0} ignored").format(count)) + cinfo.append(self.tr("{0} ignored").format(count)) elif category == "unresolved": cinfo.append( - self.trUtf8("{0} unresolved").format(count)) + self.tr("{0} unresolved").format(count)) elif category == "subrepos": - cinfo.append(self.trUtf8("{0} subrepos").format(count)) + cinfo.append(self.tr("{0} subrepos").format(count)) remark = infoDict["commit"][1] if remark == "merge": - cinfo.append(self.trUtf8("Merge needed")) + cinfo.append(self.tr("Merge needed")) elif remark == "new branch": - cinfo.append(self.trUtf8("New Branch")) + cinfo.append(self.tr("New Branch")) elif remark == "head closed": - cinfo.append(self.trUtf8("Head is closed")) + cinfo.append(self.tr("Head is closed")) elif remark == "clean": - cinfo.append(self.trUtf8("No commit required")) + cinfo.append(self.tr("No commit required")) elif remark == "new branch head": - cinfo.append(self.trUtf8("New Branch Head")) - info.append(self.trUtf8( + cinfo.append(self.tr("New Branch Head")) + info.append(self.tr( "<tr><td><b>Commit Status</b></td><td>{0}</td></tr>") .format("<br/>".join(cinfo))) if "update" in infoDict: if infoDict["update"][0] == "@CURRENT@": - uinfo = self.trUtf8("current") + uinfo = self.tr("current") elif infoDict["update"][0] == "@UPDATE@": - uinfo = self.trUtf8( + uinfo = self.tr( "%n new changeset(s)<br/>Update required", "", infoDict["update"][1]) elif infoDict["update"][0] == "@MERGE@": - uinfo1 = self.trUtf8( + uinfo1 = self.tr( "%n new changeset(s)", "", infoDict["update"][1]) - uinfo2 = self.trUtf8( + uinfo2 = self.tr( "%n branch head(s)", "", infoDict["update"][2]) - uinfo = self.trUtf8( + uinfo = self.tr( "{0}<br/>{1}<br/>Merge required", "0 is changesets, 1 is branch heads")\ .format(uinfo1, uinfo2) else: - uinfo = self.trUtf8("unknown status") - info.append(self.trUtf8( + uinfo = self.tr("unknown status") + info.append(self.tr( "<tr><td><b>Update Status</b></td><td>{0}</td></tr>") .format(uinfo)) if "remote" in infoDict: if infoDict["remote"] == (0, 0, 0, 0): - rinfo = self.trUtf8("synched") + rinfo = self.tr("synched") else: li = [] if infoDict["remote"][0]: - li.append(self.trUtf8("1 or more incoming")) + li.append(self.tr("1 or more incoming")) if infoDict["remote"][1]: - li.append(self.trUtf8("{0} outgoing") + li.append(self.tr("{0} outgoing") .format(infoDict["remote"][1])) if infoDict["remote"][2]: - li.append(self.trUtf8("%n incoming bookmark(s)", "", + li.append(self.tr("%n incoming bookmark(s)", "", infoDict["remote"][2])) if infoDict["remote"][3]: - li.append(self.trUtf8("%n outgoing bookmark(s)", "", + li.append(self.tr("%n outgoing bookmark(s)", "", infoDict["remote"][3])) rinfo = "<br/>".join(li) - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Remote Status</b></td><td>{0}</td></tr>") .format(rinfo)) if "mq" in infoDict: if infoDict["mq"] == (0, 0): - qinfo = self.trUtf8("empty queue") + qinfo = self.tr("empty queue") else: li = [] if infoDict["mq"][0]: - li.append(self.trUtf8("{0} applied") + li.append(self.tr("{0} applied") .format(infoDict["mq"][0])) if infoDict["mq"][1]: - li.append(self.trUtf8("{0} unapplied") + li.append(self.tr("{0} unapplied") .format(infoDict["mq"][1])) qinfo = "<br/>".join(li) - info.append(self.trUtf8( + info.append(self.tr( "<tr><td><b>Queues Status</b></td><td>{0}</td></tr>") .format(qinfo)) info.append("</table>") else: - info = [self.trUtf8("<p>No status information available.</p>")] + info = [self.tr("<p>No status information available.</p>")] self.summary.insertHtml("\n".join(info))
--- a/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgTagBranchListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -87,8 +87,8 @@ self.intercept = False self.tagsMode = tags if not tags: - self.setWindowTitle(self.trUtf8("Mercurial Branches List")) - self.tagList.headerItem().setText(2, self.trUtf8("Status")) + self.setWindowTitle(self.tr("Mercurial Branches List")) + self.tagList.headerItem().setText(2, self.tr("Status")) self.activateWindow() self.tagsList = tagsList @@ -134,8 +134,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -251,12 +251,12 @@ if self.tagsMode: status = "" else: - status = self.trUtf8("active") + status = self.tr("active") rev, changeset = li[-1].split(":", 1) del li[-1] else: if self.tagsMode: - status = self.trUtf8("yes") + status = self.tr("yes") else: status = li[-1][1:-1] rev, changeset = li[-2].split(":", 1)
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/ProjectBrowserHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -182,7 +182,7 @@ self.vcsMenuActions = [] self.vcsAddMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -196,83 +196,83 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository only'), + self.tr('Remove from repository only'), self.__HgForget) self.vcsMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Copy'), self.__HgCopy) + act = menu.addAction(self.tr('Copy'), self.__HgCopy) self.vcsMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__HgMove) + act = menu.addAction(self.tr('Move'), self.__HgMove) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__HgLogBrowser) + self.tr('Show log browser'), self.__HgLogBrowser) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side'), self.__HgSbsDiff) + self.tr('Show difference side-by-side'), self.__HgSbsDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__HgExtendedDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side (extended)'), + self.tr('Show difference side-by-side (extended)'), self.__HgSbsExtendedDiff) self.vcsMenuActions.append(act) self.annotateAct = menu.addAction( - self.trUtf8('Show annotated file'), + self.tr('Show annotated file'), self.__HgAnnotate) self.vcsMenuActions.append(self.annotateAct) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self.__HgRevert) + self.tr('Revert changes'), self.__HgRevert) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__HgResolve) + self.tr('Conflict resolved'), self.__HgResolve) self.vcsMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() @@ -290,7 +290,7 @@ self.vcsMultiMenuActions = [] self.vcsAddMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -304,55 +304,55 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository only'), + self.tr('Remove from repository only'), self.__HgForget) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__HgExtendedDiff) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self.__HgRevert) + self.tr('Revert changes'), self.__HgRevert) self.vcsMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__HgResolve) + self.tr('Conflict resolved'), self.__HgResolve) self.vcsMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() @@ -366,7 +366,7 @@ @param mainMenu reference to the menu to be amended """ - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -378,13 +378,13 @@ act.setFont(font) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() @@ -404,7 +404,7 @@ self.vcsDirMenuActions = [] self.vcsAddDirMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -418,64 +418,64 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Copy'), self.__HgCopy) + act = menu.addAction(self.tr('Copy'), self.__HgCopy) self.vcsDirMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__HgMove) + act = menu.addAction(self.tr('Move'), self.__HgMove) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__HgLogBrowser) + self.tr('Show log browser'), self.__HgLogBrowser) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__HgExtendedDiff) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self.__HgRevert) + self.tr('Revert changes'), self.__HgRevert) self.vcsDirMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__HgResolve) + self.tr('Conflict resolved'), self.__HgResolve) self.vcsDirMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() @@ -495,7 +495,7 @@ self.vcsDirMultiMenuActions = [] self.vcsAddDirMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -509,50 +509,50 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__HgExtendedDiff) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self.__HgRevert) + self.tr('Revert changes'), self.__HgRevert) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__HgResolve) + self.tr('Conflict resolved'), self.__HgResolve) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() @@ -689,8 +689,8 @@ dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Remove from repository only"), - self.trUtf8( + self.tr("Remove from repository only"), + self.tr( "Do you really want to remove these files" " from the repository?"), names) @@ -702,8 +702,8 @@ dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Remove from repository only"), - self.trUtf8( + self.tr("Remove from repository only"), + self.tr( "Do you really want to remove these files" " from the repository?"), files)
--- a/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -97,14 +97,14 @@ Public method to generate the action objects. """ self.vcsNewAct = E5Action( - self.trUtf8('New from repository'), + self.tr('New from repository'), UI.PixmapCache.getIcon("vcsCheckout.png"), - self.trUtf8('&New from repository...'), 0, 0, + self.tr('&New from repository...'), 0, 0, self, 'mercurial_new') - self.vcsNewAct.setStatusTip(self.trUtf8( + self.vcsNewAct.setStatusTip(self.tr( 'Create (clone) a new project from a Mercurial repository' )) - self.vcsNewAct.setWhatsThis(self.trUtf8( + self.vcsNewAct.setWhatsThis(self.tr( """<b>New from repository</b>""" """<p>This creates (clones) a new local project from """ """a Mercurial repository.</p>""" @@ -113,14 +113,14 @@ self.actions.append(self.vcsNewAct) self.hgIncomingAct = E5Action( - self.trUtf8('Show incoming log'), + self.tr('Show incoming log'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Show incoming log'), + self.tr('Show incoming log'), 0, 0, self, 'mercurial_incoming') - self.hgIncomingAct.setStatusTip(self.trUtf8( + self.hgIncomingAct.setStatusTip(self.tr( 'Show the log of incoming changes' )) - self.hgIncomingAct.setWhatsThis(self.trUtf8( + self.hgIncomingAct.setWhatsThis(self.tr( """<b>Show incoming log</b>""" """<p>This shows the log of changes coming into the""" """ repository.</p>""" @@ -129,14 +129,14 @@ self.actions.append(self.hgIncomingAct) self.hgPullAct = E5Action( - self.trUtf8('Pull changes'), + self.tr('Pull changes'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Pull changes'), + self.tr('Pull changes'), 0, 0, self, 'mercurial_pull') - self.hgPullAct.setStatusTip(self.trUtf8( + self.hgPullAct.setStatusTip(self.tr( 'Pull changes from a remote repository' )) - self.hgPullAct.setWhatsThis(self.trUtf8( + self.hgPullAct.setWhatsThis(self.tr( """<b>Pull changes</b>""" """<p>This pulls changes from a remote repository into the """ """local repository.</p>""" @@ -145,14 +145,14 @@ self.actions.append(self.hgPullAct) self.vcsUpdateAct = E5Action( - self.trUtf8('Update from repository'), + self.tr('Update from repository'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('&Update from repository'), 0, 0, self, + self.tr('&Update from repository'), 0, 0, self, 'mercurial_update') - self.vcsUpdateAct.setStatusTip(self.trUtf8( + self.vcsUpdateAct.setStatusTip(self.tr( 'Update the local project from the Mercurial repository' )) - self.vcsUpdateAct.setWhatsThis(self.trUtf8( + self.vcsUpdateAct.setWhatsThis(self.tr( """<b>Update from repository</b>""" """<p>This updates the local project from the Mercurial""" """ repository.</p>""" @@ -161,14 +161,14 @@ self.actions.append(self.vcsUpdateAct) self.vcsCommitAct = E5Action( - self.trUtf8('Commit changes to repository'), + self.tr('Commit changes to repository'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('&Commit changes to repository...'), 0, 0, self, + self.tr('&Commit changes to repository...'), 0, 0, self, 'mercurial_commit') - self.vcsCommitAct.setStatusTip(self.trUtf8( + self.vcsCommitAct.setStatusTip(self.tr( 'Commit changes to the local project to the Mercurial repository' )) - self.vcsCommitAct.setWhatsThis(self.trUtf8( + self.vcsCommitAct.setWhatsThis(self.tr( """<b>Commit changes to repository</b>""" """<p>This commits changes to the local project to the """ """Mercurial repository.</p>""" @@ -177,14 +177,14 @@ self.actions.append(self.vcsCommitAct) self.hgOutgoingAct = E5Action( - self.trUtf8('Show outgoing log'), + self.tr('Show outgoing log'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Show outgoing log'), + self.tr('Show outgoing log'), 0, 0, self, 'mercurial_outgoing') - self.hgOutgoingAct.setStatusTip(self.trUtf8( + self.hgOutgoingAct.setStatusTip(self.tr( 'Show the log of outgoing changes' )) - self.hgOutgoingAct.setWhatsThis(self.trUtf8( + self.hgOutgoingAct.setWhatsThis(self.tr( """<b>Show outgoing log</b>""" """<p>This shows the log of changes outgoing out of the""" """ repository.</p>""" @@ -193,14 +193,14 @@ self.actions.append(self.hgOutgoingAct) self.hgPushAct = E5Action( - self.trUtf8('Push changes'), + self.tr('Push changes'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Push changes'), + self.tr('Push changes'), 0, 0, self, 'mercurial_push') - self.hgPushAct.setStatusTip(self.trUtf8( + self.hgPushAct.setStatusTip(self.tr( 'Push changes to a remote repository' )) - self.hgPushAct.setWhatsThis(self.trUtf8( + self.hgPushAct.setWhatsThis(self.tr( """<b>Push changes</b>""" """<p>This pushes changes from the local repository to a """ """remote repository.</p>""" @@ -209,14 +209,14 @@ self.actions.append(self.hgPushAct) self.hgPushForcedAct = E5Action( - self.trUtf8('Push changes (force)'), + self.tr('Push changes (force)'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Push changes (force)'), + self.tr('Push changes (force)'), 0, 0, self, 'mercurial_push_forced') - self.hgPushForcedAct.setStatusTip(self.trUtf8( + self.hgPushForcedAct.setStatusTip(self.tr( 'Push changes to a remote repository with force option' )) - self.hgPushForcedAct.setWhatsThis(self.trUtf8( + self.hgPushForcedAct.setWhatsThis(self.tr( """<b>Push changes (force)</b>""" """<p>This pushes changes from the local repository to a """ """remote repository using the 'force' option.</p>""" @@ -225,14 +225,14 @@ self.actions.append(self.hgPushForcedAct) self.vcsExportAct = E5Action( - self.trUtf8('Export from repository'), + self.tr('Export from repository'), UI.PixmapCache.getIcon("vcsExport.png"), - self.trUtf8('&Export from repository...'), + self.tr('&Export from repository...'), 0, 0, self, 'mercurial_export_repo') - self.vcsExportAct.setStatusTip(self.trUtf8( + self.vcsExportAct.setStatusTip(self.tr( 'Export a project from the repository' )) - self.vcsExportAct.setWhatsThis(self.trUtf8( + self.vcsExportAct.setWhatsThis(self.tr( """<b>Export from repository</b>""" """<p>This exports a project from the repository.</p>""" )) @@ -240,14 +240,14 @@ self.actions.append(self.vcsExportAct) self.vcsLogAct = E5Action( - self.trUtf8('Show log'), + self.tr('Show log'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show &log'), + self.tr('Show &log'), 0, 0, self, 'mercurial_log') - self.vcsLogAct.setStatusTip(self.trUtf8( + self.vcsLogAct.setStatusTip(self.tr( 'Show the log of the local project' )) - self.vcsLogAct.setWhatsThis(self.trUtf8( + self.vcsLogAct.setWhatsThis(self.tr( """<b>Show log</b>""" """<p>This shows the log of the local project.</p>""" )) @@ -255,14 +255,14 @@ self.actions.append(self.vcsLogAct) self.hgLogBrowserAct = E5Action( - self.trUtf8('Show log browser'), + self.tr('Show log browser'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), + self.tr('Show log browser'), 0, 0, self, 'mercurial_log_browser') - self.hgLogBrowserAct.setStatusTip(self.trUtf8( + self.hgLogBrowserAct.setStatusTip(self.tr( 'Show a dialog to browse the log of the local project' )) - self.hgLogBrowserAct.setWhatsThis(self.trUtf8( + self.hgLogBrowserAct.setWhatsThis(self.tr( """<b>Show log browser</b>""" """<p>This shows a dialog to browse the log of the local""" """ project. A limited number of entries is shown first.""" @@ -272,14 +272,14 @@ self.actions.append(self.hgLogBrowserAct) self.vcsDiffAct = E5Action( - self.trUtf8('Show difference'), + self.tr('Show difference'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show &difference'), + self.tr('Show &difference'), 0, 0, self, 'mercurial_diff') - self.vcsDiffAct.setStatusTip(self.trUtf8( + self.vcsDiffAct.setStatusTip(self.tr( 'Show the difference of the local project to the repository' )) - self.vcsDiffAct.setWhatsThis(self.trUtf8( + self.vcsDiffAct.setWhatsThis(self.tr( """<b>Show difference</b>""" """<p>This shows the difference of the local project to the""" """ repository.</p>""" @@ -288,14 +288,14 @@ self.actions.append(self.vcsDiffAct) self.hgExtDiffAct = E5Action( - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), 0, 0, self, 'mercurial_extendeddiff') - self.hgExtDiffAct.setStatusTip(self.trUtf8( + self.hgExtDiffAct.setStatusTip(self.tr( 'Show the difference of revisions of the project to the repository' )) - self.hgExtDiffAct.setWhatsThis(self.trUtf8( + self.hgExtDiffAct.setWhatsThis(self.tr( """<b>Show difference (extended)</b>""" """<p>This shows the difference of selectable revisions of the""" """ project.</p>""" @@ -304,14 +304,14 @@ self.actions.append(self.hgExtDiffAct) self.vcsStatusAct = E5Action( - self.trUtf8('Show status'), + self.tr('Show status'), UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show &status...'), + self.tr('Show &status...'), 0, 0, self, 'mercurial_status') - self.vcsStatusAct.setStatusTip(self.trUtf8( + self.vcsStatusAct.setStatusTip(self.tr( 'Show the status of the local project' )) - self.vcsStatusAct.setWhatsThis(self.trUtf8( + self.vcsStatusAct.setWhatsThis(self.tr( """<b>Show status</b>""" """<p>This shows the status of the local project.</p>""" )) @@ -319,14 +319,14 @@ self.actions.append(self.vcsStatusAct) self.hgSummaryAct = E5Action( - self.trUtf8('Show Summary'), + self.tr('Show Summary'), UI.PixmapCache.getIcon("vcsSummary.png"), - self.trUtf8('Show summary...'), + self.tr('Show summary...'), 0, 0, self, 'mercurial_summary') - self.hgSummaryAct.setStatusTip(self.trUtf8( + self.hgSummaryAct.setStatusTip(self.tr( 'Show summary information of the working directory status' )) - self.hgSummaryAct.setWhatsThis(self.trUtf8( + self.hgSummaryAct.setWhatsThis(self.tr( """<b>Show summary</b>""" """<p>This shows some summary information of the working""" """ directory status.</p>""" @@ -335,13 +335,13 @@ self.actions.append(self.hgSummaryAct) self.hgHeadsAct = E5Action( - self.trUtf8('Show heads'), - self.trUtf8('Show heads'), + self.tr('Show heads'), + self.tr('Show heads'), 0, 0, self, 'mercurial_heads') - self.hgHeadsAct.setStatusTip(self.trUtf8( + self.hgHeadsAct.setStatusTip(self.tr( 'Show the heads of the repository' )) - self.hgHeadsAct.setWhatsThis(self.trUtf8( + self.hgHeadsAct.setWhatsThis(self.tr( """<b>Show heads</b>""" """<p>This shows the heads of the repository.</p>""" )) @@ -349,13 +349,13 @@ self.actions.append(self.hgHeadsAct) self.hgParentsAct = E5Action( - self.trUtf8('Show parents'), - self.trUtf8('Show parents'), + self.tr('Show parents'), + self.tr('Show parents'), 0, 0, self, 'mercurial_parents') - self.hgParentsAct.setStatusTip(self.trUtf8( + self.hgParentsAct.setStatusTip(self.tr( 'Show the parents of the repository' )) - self.hgParentsAct.setWhatsThis(self.trUtf8( + self.hgParentsAct.setWhatsThis(self.tr( """<b>Show parents</b>""" """<p>This shows the parents of the repository.</p>""" )) @@ -363,13 +363,13 @@ self.actions.append(self.hgParentsAct) self.hgTipAct = E5Action( - self.trUtf8('Show tip'), - self.trUtf8('Show tip'), + self.tr('Show tip'), + self.tr('Show tip'), 0, 0, self, 'mercurial_tip') - self.hgTipAct.setStatusTip(self.trUtf8( + self.hgTipAct.setStatusTip(self.tr( 'Show the tip of the repository' )) - self.hgTipAct.setWhatsThis(self.trUtf8( + self.hgTipAct.setWhatsThis(self.tr( """<b>Show tip</b>""" """<p>This shows the tip of the repository.</p>""" )) @@ -377,14 +377,14 @@ self.actions.append(self.hgTipAct) self.vcsRevertAct = E5Action( - self.trUtf8('Revert changes'), + self.tr('Revert changes'), UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Re&vert changes'), + self.tr('Re&vert changes'), 0, 0, self, 'mercurial_revert') - self.vcsRevertAct.setStatusTip(self.trUtf8( + self.vcsRevertAct.setStatusTip(self.tr( 'Revert all changes made to the local project' )) - self.vcsRevertAct.setWhatsThis(self.trUtf8( + self.vcsRevertAct.setWhatsThis(self.tr( """<b>Revert changes</b>""" """<p>This reverts all changes made to the local project.</p>""" )) @@ -392,14 +392,14 @@ self.actions.append(self.vcsRevertAct) self.vcsMergeAct = E5Action( - self.trUtf8('Merge'), + self.tr('Merge'), UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Mer&ge changes...'), + self.tr('Mer&ge changes...'), 0, 0, self, 'mercurial_merge') - self.vcsMergeAct.setStatusTip(self.trUtf8( + self.vcsMergeAct.setStatusTip(self.tr( 'Merge changes of a revision into the local project' )) - self.vcsMergeAct.setWhatsThis(self.trUtf8( + self.vcsMergeAct.setWhatsThis(self.tr( """<b>Merge</b>""" """<p>This merges changes of a revision into the local""" """ project.</p>""" @@ -408,13 +408,13 @@ self.actions.append(self.vcsMergeAct) self.vcsResolveAct = E5Action( - self.trUtf8('Conflicts resolved'), - self.trUtf8('Con&flicts resolved'), + self.tr('Conflicts resolved'), + self.tr('Con&flicts resolved'), 0, 0, self, 'mercurial_resolve') - self.vcsResolveAct.setStatusTip(self.trUtf8( + self.vcsResolveAct.setStatusTip(self.tr( 'Mark all conflicts of the local project as resolved' )) - self.vcsResolveAct.setWhatsThis(self.trUtf8( + self.vcsResolveAct.setWhatsThis(self.tr( """<b>Conflicts resolved</b>""" """<p>This marks all conflicts of the local project as""" """ resolved.</p>""" @@ -423,14 +423,14 @@ self.actions.append(self.vcsResolveAct) self.vcsTagAct = E5Action( - self.trUtf8('Tag in repository'), + self.tr('Tag in repository'), UI.PixmapCache.getIcon("vcsTag.png"), - self.trUtf8('&Tag in repository...'), + self.tr('&Tag in repository...'), 0, 0, self, 'mercurial_tag') - self.vcsTagAct.setStatusTip(self.trUtf8( + self.vcsTagAct.setStatusTip(self.tr( 'Tag the local project in the repository' )) - self.vcsTagAct.setWhatsThis(self.trUtf8( + self.vcsTagAct.setWhatsThis(self.tr( """<b>Tag in repository</b>""" """<p>This tags the local project in the repository.</p>""" )) @@ -438,13 +438,13 @@ self.actions.append(self.vcsTagAct) self.hgTagListAct = E5Action( - self.trUtf8('List tags'), - self.trUtf8('List tags...'), + self.tr('List tags'), + self.tr('List tags...'), 0, 0, self, 'mercurial_list_tags') - self.hgTagListAct.setStatusTip(self.trUtf8( + self.hgTagListAct.setStatusTip(self.tr( 'List tags of the project' )) - self.hgTagListAct.setWhatsThis(self.trUtf8( + self.hgTagListAct.setWhatsThis(self.tr( """<b>List tags</b>""" """<p>This lists the tags of the project.</p>""" )) @@ -452,13 +452,13 @@ self.actions.append(self.hgTagListAct) self.hgBranchListAct = E5Action( - self.trUtf8('List branches'), - self.trUtf8('List branches...'), + self.tr('List branches'), + self.tr('List branches...'), 0, 0, self, 'mercurial_list_branches') - self.hgBranchListAct.setStatusTip(self.trUtf8( + self.hgBranchListAct.setStatusTip(self.tr( 'List branches of the project' )) - self.hgBranchListAct.setWhatsThis(self.trUtf8( + self.hgBranchListAct.setWhatsThis(self.tr( """<b>List branches</b>""" """<p>This lists the branches of the project.</p>""" )) @@ -466,14 +466,14 @@ self.actions.append(self.hgBranchListAct) self.hgBranchAct = E5Action( - self.trUtf8('Create branch'), + self.tr('Create branch'), UI.PixmapCache.getIcon("vcsBranch.png"), - self.trUtf8('Create &branch...'), + self.tr('Create &branch...'), 0, 0, self, 'mercurial_branch') - self.hgBranchAct.setStatusTip(self.trUtf8( + self.hgBranchAct.setStatusTip(self.tr( 'Create a new branch for the local project in the repository' )) - self.hgBranchAct.setWhatsThis(self.trUtf8( + self.hgBranchAct.setWhatsThis(self.tr( """<b>Create branch</b>""" """<p>This creates a new branch for the local project """ """in the repository.</p>""" @@ -482,14 +482,14 @@ self.actions.append(self.hgBranchAct) self.hgPushBranchAct = E5Action( - self.trUtf8('Push new branch'), - self.trUtf8('Push new branch'), + self.tr('Push new branch'), + self.tr('Push new branch'), 0, 0, self, 'mercurial_push_branch') - self.hgPushBranchAct.setStatusTip(self.trUtf8( + self.hgPushBranchAct.setStatusTip(self.tr( 'Push the current branch of the local project as a new named' ' branch' )) - self.hgPushBranchAct.setWhatsThis(self.trUtf8( + self.hgPushBranchAct.setWhatsThis(self.tr( """<b>Push new branch</b>""" """<p>This pushes the current branch of the local project""" """ as a new named branch.</p>""" @@ -498,13 +498,13 @@ self.actions.append(self.hgPushBranchAct) self.hgCloseBranchAct = E5Action( - self.trUtf8('Close branch'), - self.trUtf8('Close branch'), + self.tr('Close branch'), + self.tr('Close branch'), 0, 0, self, 'mercurial_close_branch') - self.hgCloseBranchAct.setStatusTip(self.trUtf8( + self.hgCloseBranchAct.setStatusTip(self.tr( 'Close the current branch of the local project' )) - self.hgCloseBranchAct.setWhatsThis(self.trUtf8( + self.hgCloseBranchAct.setWhatsThis(self.tr( """<b>Close branch</b>""" """<p>This closes the current branch of the local project.</p>""" )) @@ -512,13 +512,13 @@ self.actions.append(self.hgCloseBranchAct) self.hgShowBranchAct = E5Action( - self.trUtf8('Show current branch'), - self.trUtf8('Show current branch'), + self.tr('Show current branch'), + self.tr('Show current branch'), 0, 0, self, 'mercurial_show_branch') - self.hgShowBranchAct.setStatusTip(self.trUtf8( + self.hgShowBranchAct.setStatusTip(self.tr( 'Show the current branch of the project' )) - self.hgShowBranchAct.setWhatsThis(self.trUtf8( + self.hgShowBranchAct.setWhatsThis(self.tr( """<b>Show current branch</b>""" """<p>This shows the current branch of the project.</p>""" )) @@ -526,14 +526,14 @@ self.actions.append(self.hgShowBranchAct) self.vcsSwitchAct = E5Action( - self.trUtf8('Switch'), + self.tr('Switch'), UI.PixmapCache.getIcon("vcsSwitch.png"), - self.trUtf8('S&witch...'), + self.tr('S&witch...'), 0, 0, self, 'mercurial_switch') - self.vcsSwitchAct.setStatusTip(self.trUtf8( + self.vcsSwitchAct.setStatusTip(self.tr( 'Switch the working directory to another revision' )) - self.vcsSwitchAct.setWhatsThis(self.trUtf8( + self.vcsSwitchAct.setWhatsThis(self.tr( """<b>Switch</b>""" """<p>This switches the working directory to another""" """ revision.</p>""" @@ -542,13 +542,13 @@ self.actions.append(self.vcsSwitchAct) self.vcsCleanupAct = E5Action( - self.trUtf8('Cleanup'), - self.trUtf8('Cleanu&p'), + self.tr('Cleanup'), + self.tr('Cleanu&p'), 0, 0, self, 'mercurial_cleanup') - self.vcsCleanupAct.setStatusTip(self.trUtf8( + self.vcsCleanupAct.setStatusTip(self.tr( 'Cleanup the local project' )) - self.vcsCleanupAct.setWhatsThis(self.trUtf8( + self.vcsCleanupAct.setWhatsThis(self.tr( """<b>Cleanup</b>""" """<p>This performs a cleanup of the local project.</p>""" )) @@ -556,13 +556,13 @@ self.actions.append(self.vcsCleanupAct) self.vcsCommandAct = E5Action( - self.trUtf8('Execute command'), - self.trUtf8('E&xecute command...'), + self.tr('Execute command'), + self.tr('E&xecute command...'), 0, 0, self, 'mercurial_command') - self.vcsCommandAct.setStatusTip(self.trUtf8( + self.vcsCommandAct.setStatusTip(self.tr( 'Execute an arbitrary Mercurial command' )) - self.vcsCommandAct.setWhatsThis(self.trUtf8( + self.vcsCommandAct.setWhatsThis(self.tr( """<b>Execute command</b>""" """<p>This opens a dialog to enter an arbitrary Mercurial""" """ command.</p>""" @@ -571,12 +571,12 @@ self.actions.append(self.vcsCommandAct) self.vcsPropsAct = E5Action( - self.trUtf8('Command options'), - self.trUtf8('Command &options...'), 0, 0, self, + self.tr('Command options'), + self.tr('Command &options...'), 0, 0, self, 'mercurial_options') - self.vcsPropsAct.setStatusTip(self.trUtf8( + self.vcsPropsAct.setStatusTip(self.tr( 'Show the Mercurial command options')) - self.vcsPropsAct.setWhatsThis(self.trUtf8( + self.vcsPropsAct.setWhatsThis(self.tr( """<b>Command options...</b>""" """<p>This shows a dialog to edit the Mercurial command""" """ options.</p>""" @@ -585,13 +585,13 @@ self.actions.append(self.vcsPropsAct) self.hgConfigAct = E5Action( - self.trUtf8('Configure'), - self.trUtf8('Configure...'), + self.tr('Configure'), + self.tr('Configure...'), 0, 0, self, 'mercurial_configure') - self.hgConfigAct.setStatusTip(self.trUtf8( + self.hgConfigAct.setStatusTip(self.tr( 'Show the configuration dialog with the Mercurial page selected' )) - self.hgConfigAct.setWhatsThis(self.trUtf8( + self.hgConfigAct.setWhatsThis(self.tr( """<b>Configure</b>""" """<p>Show the configuration dialog with the Mercurial page""" """ selected.</p>""" @@ -600,13 +600,13 @@ self.actions.append(self.hgConfigAct) self.hgEditUserConfigAct = E5Action( - self.trUtf8('Edit user configuration'), - self.trUtf8('Edit user configuration...'), + self.tr('Edit user configuration'), + self.tr('Edit user configuration...'), 0, 0, self, 'mercurial_user_configure') - self.hgEditUserConfigAct.setStatusTip(self.trUtf8( + self.hgEditUserConfigAct.setStatusTip(self.tr( 'Show an editor to edit the user configuration file' )) - self.hgEditUserConfigAct.setWhatsThis(self.trUtf8( + self.hgEditUserConfigAct.setWhatsThis(self.tr( """<b>Edit user configuration</b>""" """<p>Show an editor to edit the user configuration file.</p>""" )) @@ -614,13 +614,13 @@ self.actions.append(self.hgEditUserConfigAct) self.hgRepoConfigAct = E5Action( - self.trUtf8('Edit repository configuration'), - self.trUtf8('Edit repository configuration...'), + self.tr('Edit repository configuration'), + self.tr('Edit repository configuration...'), 0, 0, self, 'mercurial_repo_configure') - self.hgRepoConfigAct.setStatusTip(self.trUtf8( + self.hgRepoConfigAct.setStatusTip(self.tr( 'Show an editor to edit the repository configuration file' )) - self.hgRepoConfigAct.setWhatsThis(self.trUtf8( + self.hgRepoConfigAct.setWhatsThis(self.tr( """<b>Edit repository configuration</b>""" """<p>Show an editor to edit the repository configuration""" """ file.</p>""" @@ -629,14 +629,14 @@ self.actions.append(self.hgRepoConfigAct) self.hgShowConfigAct = E5Action( - self.trUtf8('Show combined configuration settings'), - self.trUtf8('Show combined configuration settings...'), + self.tr('Show combined configuration settings'), + self.tr('Show combined configuration settings...'), 0, 0, self, 'mercurial_show_config') - self.hgShowConfigAct.setStatusTip(self.trUtf8( + self.hgShowConfigAct.setStatusTip(self.tr( 'Show the combined configuration settings from all configuration' ' files' )) - self.hgShowConfigAct.setWhatsThis(self.trUtf8( + self.hgShowConfigAct.setWhatsThis(self.tr( """<b>Show combined configuration settings</b>""" """<p>This shows the combined configuration settings""" """ from all configuration files.</p>""" @@ -645,13 +645,13 @@ self.actions.append(self.hgShowConfigAct) self.hgShowPathsAct = E5Action( - self.trUtf8('Show paths'), - self.trUtf8('Show paths...'), + self.tr('Show paths'), + self.tr('Show paths...'), 0, 0, self, 'mercurial_show_paths') - self.hgShowPathsAct.setStatusTip(self.trUtf8( + self.hgShowPathsAct.setStatusTip(self.tr( 'Show the aliases for remote repositories' )) - self.hgShowPathsAct.setWhatsThis(self.trUtf8( + self.hgShowPathsAct.setWhatsThis(self.tr( """<b>Show paths</b>""" """<p>This shows the aliases for remote repositories.</p>""" )) @@ -659,13 +659,13 @@ self.actions.append(self.hgShowPathsAct) self.hgVerifyAct = E5Action( - self.trUtf8('Verify repository'), - self.trUtf8('Verify repository...'), + self.tr('Verify repository'), + self.tr('Verify repository...'), 0, 0, self, 'mercurial_verify') - self.hgVerifyAct.setStatusTip(self.trUtf8( + self.hgVerifyAct.setStatusTip(self.tr( 'Verify the integrity of the repository' )) - self.hgVerifyAct.setWhatsThis(self.trUtf8( + self.hgVerifyAct.setWhatsThis(self.tr( """<b>Verify repository</b>""" """<p>This verifies the integrity of the repository.</p>""" )) @@ -673,13 +673,13 @@ self.actions.append(self.hgVerifyAct) self.hgRecoverAct = E5Action( - self.trUtf8('Recover'), - self.trUtf8('Recover...'), + self.tr('Recover'), + self.tr('Recover...'), 0, 0, self, 'mercurial_recover') - self.hgRecoverAct.setStatusTip(self.trUtf8( + self.hgRecoverAct.setStatusTip(self.tr( 'Recover from an interrupted transaction' )) - self.hgRecoverAct.setWhatsThis(self.trUtf8( + self.hgRecoverAct.setWhatsThis(self.tr( """<b>Recover</b>""" """<p>This recovers from an interrupted transaction.</p>""" )) @@ -687,13 +687,13 @@ self.actions.append(self.hgRecoverAct) self.hgIdentifyAct = E5Action( - self.trUtf8('Identify'), - self.trUtf8('Identify...'), + self.tr('Identify'), + self.tr('Identify...'), 0, 0, self, 'mercurial_identify') - self.hgIdentifyAct.setStatusTip(self.trUtf8( + self.hgIdentifyAct.setStatusTip(self.tr( 'Identify the project directory' )) - self.hgIdentifyAct.setWhatsThis(self.trUtf8( + self.hgIdentifyAct.setWhatsThis(self.tr( """<b>Identify</b>""" """<p>This identifies the project directory.</p>""" )) @@ -701,13 +701,13 @@ self.actions.append(self.hgIdentifyAct) self.hgCreateIgnoreAct = E5Action( - self.trUtf8('Create .hgignore'), - self.trUtf8('Create .hgignore'), + self.tr('Create .hgignore'), + self.tr('Create .hgignore'), 0, 0, self, 'mercurial_create ignore') - self.hgCreateIgnoreAct.setStatusTip(self.trUtf8( + self.hgCreateIgnoreAct.setStatusTip(self.tr( 'Create a .hgignore file with default values' )) - self.hgCreateIgnoreAct.setWhatsThis(self.trUtf8( + self.hgCreateIgnoreAct.setWhatsThis(self.tr( """<b>Create .hgignore</b>""" """<p>This creates a .hgignore file with default values.</p>""" )) @@ -715,13 +715,13 @@ self.actions.append(self.hgCreateIgnoreAct) self.hgBundleAct = E5Action( - self.trUtf8('Create changegroup'), - self.trUtf8('Create changegroup...'), + self.tr('Create changegroup'), + self.tr('Create changegroup...'), 0, 0, self, 'mercurial_bundle') - self.hgBundleAct.setStatusTip(self.trUtf8( + self.hgBundleAct.setStatusTip(self.tr( 'Create changegroup file collecting changesets' )) - self.hgBundleAct.setWhatsThis(self.trUtf8( + self.hgBundleAct.setWhatsThis(self.tr( """<b>Create changegroup</b>""" """<p>This creates a changegroup file collecting selected""" """ changesets (hg bundle).</p>""" @@ -730,13 +730,13 @@ self.actions.append(self.hgBundleAct) self.hgPreviewBundleAct = E5Action( - self.trUtf8('Preview changegroup'), - self.trUtf8('Preview changegroup...'), + self.tr('Preview changegroup'), + self.tr('Preview changegroup...'), 0, 0, self, 'mercurial_preview_bundle') - self.hgPreviewBundleAct.setStatusTip(self.trUtf8( + self.hgPreviewBundleAct.setStatusTip(self.tr( 'Preview a changegroup file containing a collection of changesets' )) - self.hgPreviewBundleAct.setWhatsThis(self.trUtf8( + self.hgPreviewBundleAct.setWhatsThis(self.tr( """<b>Preview changegroup</b>""" """<p>This previews a changegroup file containing a collection""" """ of changesets.</p>""" @@ -745,13 +745,13 @@ self.actions.append(self.hgPreviewBundleAct) self.hgIdentifyBundleAct = E5Action( - self.trUtf8('Identify changegroup'), - self.trUtf8('Identify changegroup...'), + self.tr('Identify changegroup'), + self.tr('Identify changegroup...'), 0, 0, self, 'mercurial_identify_bundle') - self.hgIdentifyBundleAct.setStatusTip(self.trUtf8( + self.hgIdentifyBundleAct.setStatusTip(self.tr( 'Identify a changegroup file containing a collection of changesets' )) - self.hgIdentifyBundleAct.setWhatsThis(self.trUtf8( + self.hgIdentifyBundleAct.setWhatsThis(self.tr( """<b>Identify changegroup</b>""" """<p>This identifies a changegroup file containing a""" """ collection of changesets.</p>""" @@ -760,13 +760,13 @@ self.actions.append(self.hgIdentifyBundleAct) self.hgUnbundleAct = E5Action( - self.trUtf8('Apply changegroups'), - self.trUtf8('Apply changegroups...'), + self.tr('Apply changegroups'), + self.tr('Apply changegroups...'), 0, 0, self, 'mercurial_unbundle') - self.hgUnbundleAct.setStatusTip(self.trUtf8( + self.hgUnbundleAct.setStatusTip(self.tr( 'Apply one or several changegroup files' )) - self.hgUnbundleAct.setWhatsThis(self.trUtf8( + self.hgUnbundleAct.setWhatsThis(self.tr( """<b>Apply changegroups</b>""" """<p>This applies one or several changegroup files generated by""" """ the 'Create changegroup' action (hg unbundle).</p>""" @@ -775,13 +775,13 @@ self.actions.append(self.hgUnbundleAct) self.hgBisectGoodAct = E5Action( - self.trUtf8('Mark as "good"'), - self.trUtf8('Mark as "good"...'), + self.tr('Mark as "good"'), + self.tr('Mark as "good"...'), 0, 0, self, 'mercurial_bisect_good') - self.hgBisectGoodAct.setStatusTip(self.trUtf8( + self.hgBisectGoodAct.setStatusTip(self.tr( 'Mark a selectable changeset as good' )) - self.hgBisectGoodAct.setWhatsThis(self.trUtf8( + self.hgBisectGoodAct.setWhatsThis(self.tr( """<b>Mark as good</b>""" """<p>This marks a selectable changeset as good.</p>""" )) @@ -789,13 +789,13 @@ self.actions.append(self.hgBisectGoodAct) self.hgBisectBadAct = E5Action( - self.trUtf8('Mark as "bad"'), - self.trUtf8('Mark as "bad"...'), + self.tr('Mark as "bad"'), + self.tr('Mark as "bad"...'), 0, 0, self, 'mercurial_bisect_bad') - self.hgBisectBadAct.setStatusTip(self.trUtf8( + self.hgBisectBadAct.setStatusTip(self.tr( 'Mark a selectable changeset as bad' )) - self.hgBisectBadAct.setWhatsThis(self.trUtf8( + self.hgBisectBadAct.setWhatsThis(self.tr( """<b>Mark as bad</b>""" """<p>This marks a selectable changeset as bad.</p>""" )) @@ -803,13 +803,13 @@ self.actions.append(self.hgBisectBadAct) self.hgBisectSkipAct = E5Action( - self.trUtf8('Skip'), - self.trUtf8('Skip...'), + self.tr('Skip'), + self.tr('Skip...'), 0, 0, self, 'mercurial_bisect_skip') - self.hgBisectSkipAct.setStatusTip(self.trUtf8( + self.hgBisectSkipAct.setStatusTip(self.tr( 'Skip a selectable changeset' )) - self.hgBisectSkipAct.setWhatsThis(self.trUtf8( + self.hgBisectSkipAct.setWhatsThis(self.tr( """<b>Skip</b>""" """<p>This skips a selectable changeset.</p>""" )) @@ -817,13 +817,13 @@ self.actions.append(self.hgBisectSkipAct) self.hgBisectResetAct = E5Action( - self.trUtf8('Reset'), - self.trUtf8('Reset'), + self.tr('Reset'), + self.tr('Reset'), 0, 0, self, 'mercurial_bisect_reset') - self.hgBisectResetAct.setStatusTip(self.trUtf8( + self.hgBisectResetAct.setStatusTip(self.tr( 'Reset the bisect search data' )) - self.hgBisectResetAct.setWhatsThis(self.trUtf8( + self.hgBisectResetAct.setWhatsThis(self.tr( """<b>Reset</b>""" """<p>This resets the bisect search data.</p>""" )) @@ -831,13 +831,13 @@ self.actions.append(self.hgBisectResetAct) self.hgBackoutAct = E5Action( - self.trUtf8('Back out changeset'), - self.trUtf8('Back out changeset'), + self.tr('Back out changeset'), + self.tr('Back out changeset'), 0, 0, self, 'mercurial_backout') - self.hgBackoutAct.setStatusTip(self.trUtf8( + self.hgBackoutAct.setStatusTip(self.tr( 'Back out changes of an earlier changeset' )) - self.hgBackoutAct.setWhatsThis(self.trUtf8( + self.hgBackoutAct.setWhatsThis(self.tr( """<b>Back out changeset</b>""" """<p>This backs out changes of an earlier changeset.</p>""" )) @@ -845,13 +845,13 @@ self.actions.append(self.hgBackoutAct) self.hgRollbackAct = E5Action( - self.trUtf8('Rollback last transaction'), - self.trUtf8('Rollback last transaction'), + self.tr('Rollback last transaction'), + self.tr('Rollback last transaction'), 0, 0, self, 'mercurial_rollback') - self.hgRollbackAct.setStatusTip(self.trUtf8( + self.hgRollbackAct.setStatusTip(self.tr( 'Rollback the last transaction' )) - self.hgRollbackAct.setWhatsThis(self.trUtf8( + self.hgRollbackAct.setWhatsThis(self.tr( """<b>Rollback last transaction</b>""" """<p>This performs a rollback of the last transaction.""" """ Transactions are used to encapsulate the effects of all""" @@ -872,13 +872,13 @@ self.actions.append(self.hgRollbackAct) self.hgServeAct = E5Action( - self.trUtf8('Serve project repository'), - self.trUtf8('Serve project repository...'), + self.tr('Serve project repository'), + self.tr('Serve project repository...'), 0, 0, self, 'mercurial_serve') - self.hgServeAct.setStatusTip(self.trUtf8( + self.hgServeAct.setStatusTip(self.tr( 'Serve the project repository' )) - self.hgServeAct.setWhatsThis(self.trUtf8( + self.hgServeAct.setWhatsThis(self.tr( """<b>Serve project repository</b>""" """<p>This serves the project repository.</p>""" )) @@ -886,13 +886,13 @@ self.actions.append(self.hgServeAct) self.hgImportAct = E5Action( - self.trUtf8('Import Patch'), - self.trUtf8('Import Patch...'), + self.tr('Import Patch'), + self.tr('Import Patch...'), 0, 0, self, 'mercurial_import') - self.hgImportAct.setStatusTip(self.trUtf8( + self.hgImportAct.setStatusTip(self.tr( 'Import a patch from a patch file' )) - self.hgImportAct.setWhatsThis(self.trUtf8( + self.hgImportAct.setWhatsThis(self.tr( """<b>Import Patch</b>""" """<p>This imports a patch from a patch file into the""" """ project.</p>""" @@ -901,13 +901,13 @@ self.actions.append(self.hgImportAct) self.hgExportAct = E5Action( - self.trUtf8('Export Patches'), - self.trUtf8('Export Patches...'), + self.tr('Export Patches'), + self.tr('Export Patches...'), 0, 0, self, 'mercurial_export') - self.hgExportAct.setStatusTip(self.trUtf8( + self.hgExportAct.setStatusTip(self.tr( 'Export revisions to patch files' )) - self.hgExportAct.setWhatsThis(self.trUtf8( + self.hgExportAct.setWhatsThis(self.tr( """<b>Export Patches</b>""" """<p>This exports revisions of the project to patch files.</p>""" )) @@ -915,13 +915,13 @@ self.actions.append(self.hgExportAct) self.hgPhaseAct = E5Action( - self.trUtf8('Change Phase'), - self.trUtf8('Change Phase...'), + self.tr('Change Phase'), + self.tr('Change Phase...'), 0, 0, self, 'mercurial_change_phase') - self.hgPhaseAct.setStatusTip(self.trUtf8( + self.hgPhaseAct.setStatusTip(self.tr( 'Change the phase of revisions' )) - self.hgPhaseAct.setWhatsThis(self.trUtf8( + self.hgPhaseAct.setWhatsThis(self.tr( """<b>Change Phase</b>""" """<p>This changes the phase of revisions.</p>""" )) @@ -929,14 +929,14 @@ self.actions.append(self.hgPhaseAct) self.hgGraftAct = E5Action( - self.trUtf8('Copy Changesets'), + self.tr('Copy Changesets'), UI.PixmapCache.getIcon("vcsGraft.png"), - self.trUtf8('Copy Changesets'), + self.tr('Copy Changesets'), 0, 0, self, 'mercurial_graft') - self.hgGraftAct.setStatusTip(self.trUtf8( + self.hgGraftAct.setStatusTip(self.tr( 'Copies changesets from another branch' )) - self.hgGraftAct.setWhatsThis(self.trUtf8( + self.hgGraftAct.setWhatsThis(self.tr( """<b>Copy Changesets</b>""" """<p>This copies changesets from another branch on top of the""" """ current working directory with the user, date and""" @@ -946,13 +946,13 @@ self.actions.append(self.hgGraftAct) self.hgGraftContinueAct = E5Action( - self.trUtf8('Continue Copying Session'), - self.trUtf8('Continue Copying Session'), + self.tr('Continue Copying Session'), + self.tr('Continue Copying Session'), 0, 0, self, 'mercurial_graft_continue') - self.hgGraftContinueAct.setStatusTip(self.trUtf8( + self.hgGraftContinueAct.setStatusTip(self.tr( 'Continue the last copying session after conflicts were resolved' )) - self.hgGraftContinueAct.setWhatsThis(self.trUtf8( + self.hgGraftContinueAct.setWhatsThis(self.tr( """<b>Continue Copying Session</b>""" """<p>This continues the last copying session after conflicts""" """ were resolved.</p>""" @@ -961,14 +961,14 @@ self.actions.append(self.hgGraftContinueAct) self.hgAddSubrepoAct = E5Action( - self.trUtf8('Add'), + self.tr('Add'), UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add...'), + self.tr('Add...'), 0, 0, self, 'mercurial_add_subrepo') - self.hgAddSubrepoAct.setStatusTip(self.trUtf8( + self.hgAddSubrepoAct.setStatusTip(self.tr( 'Add a sub-repository' )) - self.hgAddSubrepoAct.setWhatsThis(self.trUtf8( + self.hgAddSubrepoAct.setWhatsThis(self.tr( """<b>Add...</b>""" """<p>Add a sub-repository to the project.</p>""" )) @@ -976,14 +976,14 @@ self.actions.append(self.hgAddSubrepoAct) self.hgRemoveSubreposAct = E5Action( - self.trUtf8('Remove'), + self.tr('Remove'), UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove...'), + self.tr('Remove...'), 0, 0, self, 'mercurial_remove_subrepos') - self.hgRemoveSubreposAct.setStatusTip(self.trUtf8( + self.hgRemoveSubreposAct.setStatusTip(self.tr( 'Remove sub-repositories' )) - self.hgRemoveSubreposAct.setWhatsThis(self.trUtf8( + self.hgRemoveSubreposAct.setWhatsThis(self.tr( """<b>Remove...</b>""" """<p>Remove sub-repositories from the project.</p>""" )) @@ -992,14 +992,14 @@ self.actions.append(self.hgRemoveSubreposAct) self.hgArchiveAct = E5Action( - self.trUtf8('Create unversioned archive'), + self.tr('Create unversioned archive'), UI.PixmapCache.getIcon("vcsExport.png"), - self.trUtf8('Create unversioned archive...'), + self.tr('Create unversioned archive...'), 0, 0, self, 'mercurial_archive') - self.hgArchiveAct.setStatusTip(self.trUtf8( + self.hgArchiveAct.setStatusTip(self.tr( 'Create an unversioned archive from the repository' )) - self.hgArchiveAct.setWhatsThis(self.trUtf8( + self.hgArchiveAct.setWhatsThis(self.tr( """<b>Create unversioned archive...</b>""" """<p>This creates an unversioned archive from the""" """ repository.</p>""" @@ -1017,7 +1017,7 @@ self.subMenus = [] - adminMenu = QMenu(self.trUtf8("Repository Administration"), menu) + adminMenu = QMenu(self.tr("Repository Administration"), menu) adminMenu.setTearOffEnabled(True) adminMenu.addAction(self.hgHeadsAct) adminMenu.addAction(self.hgParentsAct) @@ -1040,7 +1040,7 @@ adminMenu.addAction(self.hgVerifyAct) self.subMenus.append(adminMenu) - specialsMenu = QMenu(self.trUtf8("Specials"), menu) + specialsMenu = QMenu(self.tr("Specials"), menu) specialsMenu.setTearOffEnabled(True) specialsMenu.addAction(self.hgArchiveAct) specialsMenu.addSeparator() @@ -1049,7 +1049,7 @@ specialsMenu.addAction(self.hgServeAct) self.subMenus.append(specialsMenu) - bundleMenu = QMenu(self.trUtf8("Changegroup Management"), menu) + bundleMenu = QMenu(self.tr("Changegroup Management"), menu) bundleMenu.setTearOffEnabled(True) bundleMenu.addAction(self.hgBundleAct) bundleMenu.addAction(self.hgIdentifyBundleAct) @@ -1057,13 +1057,13 @@ bundleMenu.addAction(self.hgUnbundleAct) self.subMenus.append(bundleMenu) - patchMenu = QMenu(self.trUtf8("Patch Management"), menu) + patchMenu = QMenu(self.tr("Patch Management"), menu) patchMenu.setTearOffEnabled(True) patchMenu.addAction(self.hgImportAct) patchMenu.addAction(self.hgExportAct) self.subMenus.append(patchMenu) - bisectMenu = QMenu(self.trUtf8("Bisect"), menu) + bisectMenu = QMenu(self.tr("Bisect"), menu) bisectMenu.setTearOffEnabled(True) bisectMenu.addAction(self.hgBisectGoodAct) bisectMenu.addAction(self.hgBisectBadAct) @@ -1071,7 +1071,7 @@ bisectMenu.addAction(self.hgBisectResetAct) self.subMenus.append(bisectMenu) - self.__extensionsMenu = QMenu(self.trUtf8("Extensions"), menu) + self.__extensionsMenu = QMenu(self.tr("Extensions"), menu) self.__extensionsMenu.setTearOffEnabled(True) self.__extensionsMenu.aboutToShow.connect(self.__showExtensionMenu) self.extensionMenus = {} @@ -1083,7 +1083,7 @@ self.vcs.activeExtensionsChanged.connect(self.__showExtensionMenu) if self.vcs.version >= (2, 0): - graftMenu = QMenu(self.trUtf8("Graft"), menu) + graftMenu = QMenu(self.tr("Graft"), menu) graftMenu.setIcon(UI.PixmapCache.getIcon("vcsGraft.png")) graftMenu.setTearOffEnabled(True) graftMenu.addAction(self.hgGraftAct) @@ -1092,7 +1092,7 @@ graftMenu = None if self.vcs.version >= (1, 8): - subrepoMenu = QMenu(self.trUtf8("Sub-Repository"), menu) + subrepoMenu = QMenu(self.tr("Sub-Repository"), menu) subrepoMenu.setTearOffEnabled(True) subrepoMenu.addAction(self.hgAddSubrepoAct) subrepoMenu.addAction(self.hgRemoveSubreposAct) @@ -1237,8 +1237,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Pull"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Pull"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -1400,8 +1400,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Apply changegroups"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Apply changegroups"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -1456,8 +1456,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Import Patch"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Import Patch"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -1476,8 +1476,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Revert Changes"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Revert Changes"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -1496,8 +1496,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Copy Changesets"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Copy Changesets"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -1511,8 +1511,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Copy Changesets (Continue)"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Copy Changesets (Continue)"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,14 +31,14 @@ Public method to generate the action objects. """ self.hgPurgeAct = E5Action( - self.trUtf8('Purge Files'), + self.tr('Purge Files'), UI.PixmapCache.getIcon("fileDelete.png"), - self.trUtf8('Purge Files'), + self.tr('Purge Files'), 0, 0, self, 'mercurial_purge') - self.hgPurgeAct.setStatusTip(self.trUtf8( + self.hgPurgeAct.setStatusTip(self.tr( 'Delete files and directories not known to Mercurial' )) - self.hgPurgeAct.setWhatsThis(self.trUtf8( + self.hgPurgeAct.setWhatsThis(self.tr( """<b>Purge Files</b>""" """<p>This deletes files and directories not known to Mercurial.""" """ That means that purge will delete:<ul>""" @@ -51,14 +51,14 @@ self.actions.append(self.hgPurgeAct) self.hgPurgeAllAct = E5Action( - self.trUtf8('Purge All Files'), - self.trUtf8('Purge All Files'), + self.tr('Purge All Files'), + self.tr('Purge All Files'), 0, 0, self, 'mercurial_purge_all') - self.hgPurgeAllAct.setStatusTip(self.trUtf8( + self.hgPurgeAllAct.setStatusTip(self.tr( 'Delete files and directories not known to Mercurial including' ' ignored ones' )) - self.hgPurgeAllAct.setWhatsThis(self.trUtf8( + self.hgPurgeAllAct.setWhatsThis(self.tr( """<b>Purge All Files</b>""" """<p>This deletes files and directories not known to Mercurial.""" """ That means that purge will delete:<ul>""" @@ -72,14 +72,14 @@ self.actions.append(self.hgPurgeAllAct) self.hgPurgeListAct = E5Action( - self.trUtf8('List Files to be Purged'), + self.tr('List Files to be Purged'), UI.PixmapCache.getIcon("fileDeleteList.png"), - self.trUtf8('List Files to be Purged...'), + self.tr('List Files to be Purged...'), 0, 0, self, 'mercurial_purge_list') - self.hgPurgeListAct.setStatusTip(self.trUtf8( + self.hgPurgeListAct.setStatusTip(self.tr( 'List files and directories not known to Mercurial' )) - self.hgPurgeListAct.setWhatsThis(self.trUtf8( + self.hgPurgeListAct.setWhatsThis(self.tr( """<b>List Files to be Purged</b>""" """<p>This lists files and directories not known to Mercurial.""" """ These would be deleted by the "Purge Files" menu entry.</p>""" @@ -88,14 +88,14 @@ self.actions.append(self.hgPurgeListAct) self.hgPurgeAllListAct = E5Action( - self.trUtf8('List All Files to be Purged'), - self.trUtf8('List All Files to be Purged...'), + self.tr('List All Files to be Purged'), + self.tr('List All Files to be Purged...'), 0, 0, self, 'mercurial_purge_all_list') - self.hgPurgeAllListAct.setStatusTip(self.trUtf8( + self.hgPurgeAllListAct.setStatusTip(self.tr( 'List files and directories not known to Mercurial including' ' ignored ones' )) - self.hgPurgeAllListAct.setWhatsThis(self.trUtf8( + self.hgPurgeAllListAct.setWhatsThis(self.tr( """<b>List All Files to be Purged</b>""" """<p>This lists files and directories not known to Mercurial""" """ including ignored ones. These would be deleted by the""" @@ -129,7 +129,7 @@ @return title of the menu (string) """ - return self.trUtf8("Purge") + return self.tr("Purge") def __hgPurge(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/PurgeExtension/purge.py Sat Jan 11 11:55:33 2014 +0100 @@ -92,13 +92,13 @@ return if all: - title = self.trUtf8("Purge All Files") - message = self.trUtf8( + title = self.tr("Purge All Files") + message = self.tr( """Do really want to delete all files not tracked by""" """ Mercurial (including ignored ones)?""") else: - title = self.trUtf8("Purge Files") - message = self.trUtf8( + title = self.tr("Purge Files") + message = self.tr( """Do really want to delete files not tracked by Mercurial?""") entries = self.__getEntries(repodir, all) from UI.DeleteFilesConfirmationDialog import \
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesDefineGuardsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesDefineGuardsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,9 +73,9 @@ if self.__dirtyList: res = E5MessageBox.question( self, - self.trUtf8("Unsaved Changes"), - self.trUtf8("""The guards list has been changed.""" - """ Shall the changes be applied?"""), + self.tr("Unsaved Changes"), + self.tr("""The guards list has been changed.""" + """ Shall the changes be applied?"""), E5MessageBox.StandardButtons( E5MessageBox.Apply | E5MessageBox.Discard), @@ -116,9 +116,9 @@ if self.__dirtyList: res = E5MessageBox.question( self, - self.trUtf8("Unsaved Changes"), - self.trUtf8("""The guards list has been changed.""" - """ Shall the changes be applied?"""), + self.tr("Unsaved Changes"), + self.tr("""The guards list has been changed.""" + """ Shall the changes be applied?"""), E5MessageBox.StandardButtons( E5MessageBox.Apply | E5MessageBox.Discard), @@ -239,8 +239,8 @@ """ res = E5MessageBox.yesNo( self, - self.trUtf8("Remove Guards"), - self.trUtf8( + self.tr("Remove Guards"), + self.tr( """Do you really want to remove the selected guards?""")) if res: for guardItem in self.guardsList.selectedItems(): @@ -302,17 +302,17 @@ else: E5MessageBox.warning( self, - self.trUtf8("Apply Guard Definitions"), - self.trUtf8( + self.tr("Apply Guard Definitions"), + self.tr( """The Mercurial process did not finish""" """ in time.""")) if error: E5MessageBox.warning( self, - self.trUtf8("Apply Guard Definitions"), - self.trUtf8("""<p>The defined guards could not be""" - """ applied.</p><p>Reason: {0}</p>""") + self.tr("Apply Guard Definitions"), + self.tr("""<p>The defined guards could not be""" + """ applied.</p><p>Reason: {0}</p>""") .format(error)) else: self.__dirtyList = False
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesGuardsSelectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesGuardsSelectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,7 +40,7 @@ if listOnly: self.buttonBox.button(QDialogButtonBox.Cancel).hide() self.guardsList.setSelectionMode(QAbstractItemView.NoSelection) - self.setWindowTitle(self.trUtf8("Active Guards")) + self.setWindowTitle(self.tr("Active Guards")) def getData(self): """
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesHeaderDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -106,8 +106,8 @@ if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -194,5 +194,5 @@ @param out error to be shown (string) """ - self.messageEdit.appendPlainText(self.trUtf8("Error: ")) + self.messageEdit.appendPlainText(self.tr("Error: ")) self.messageEdit.appendPlainText(out)
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListAllGuardsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListAllGuardsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -90,9 +90,9 @@ guard = guard[1:] else: icon = None - guard = self.trUtf8("Unguarded") + guard = self.tr("Unguarded") itm = QTreeWidgetItem(patchItm, [guard]) if icon: itm.setIcon(0, icon) else: - QTreeWidgetItem(self.guardsTree, [self.trUtf8("no patches found")]) + QTreeWidgetItem(self.guardsTree, [self.tr("no patches found")])
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,10 +49,10 @@ self.process.readyReadStandardError.connect(self.__readStderr) self.__statusDict = { - "A": self.trUtf8("applied"), - "U": self.trUtf8("not applied"), - "G": self.trUtf8("guarded"), - "D": self.trUtf8("missing"), + "A": self.tr("applied"), + "U": self.tr("not applied"), + "G": self.tr("guarded"), + "D": self.tr("missing"), } self.show() @@ -149,8 +149,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -191,8 +191,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('hg')) @@ -225,7 +225,7 @@ if self.patchesList.topLevelItemCount() == 0: # no patches present self.__generateItem( - 0, "", self.trUtf8("no patches found"), "", True) + 0, "", self.tr("no patches found"), "", True) self.__resizeColumns() self.__resort() @@ -296,7 +296,7 @@ try: statusStr = self.__statusDict[status] except KeyError: - statusStr = self.trUtf8("unknown") + statusStr = self.tr("unknown") itm = QTreeWidgetItem(self.patchesList) itm.setData(0, Qt.DisplayRole, index) itm.setData(1, Qt.DisplayRole, name)
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesListGuardsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -122,7 +122,7 @@ guard = guard[1:] else: icon = None - guard = self.trUtf8("Unguarded") + guard = self.tr("Unguarded") itm = QListWidgetItem(guard, self.guardsList) if icon: itm.setIcon(icon)
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesQueueManagementDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,9 +65,9 @@ self.buttonBox.removeButton( self.buttonBox.button(QDialogButtonBox.Cancel)) self.refreshButton = self.buttonBox.addButton( - self.trUtf8("Refresh"), QDialogButtonBox.ActionRole) + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the queues list")) + self.tr("Press to refresh the queues list")) self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) else: self.buttonBox.removeButton(
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesRenamePatchDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -29,7 +29,7 @@ self.setupUi(self) self.currentButton.setText( - self.trUtf8("Current Patch ({0})").format(currentPatch)) + self.tr("Current Patch ({0})").format(currentPatch)) self.nameCombo.addItems([""] + patchesList) self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,13 +32,13 @@ Public method to generate the action objects. """ self.hgQueueInitAct = E5Action( - self.trUtf8('Init Queue Repository'), - self.trUtf8('Init Queue Repository'), + self.tr('Init Queue Repository'), + self.tr('Init Queue Repository'), 0, 0, self, 'mercurial_queues_init') - self.hgQueueInitAct.setStatusTip(self.trUtf8( + self.hgQueueInitAct.setStatusTip(self.tr( 'Initialize a new versioned queue repository' )) - self.hgQueueInitAct.setWhatsThis(self.trUtf8( + self.hgQueueInitAct.setWhatsThis(self.tr( """<b>Init Queue Repository</b>""" """<p>This initializes a new versioned queue repository inside""" """ the current repository.</p>""" @@ -47,13 +47,13 @@ self.actions.append(self.hgQueueInitAct) self.hgQueueCommitAct = E5Action( - self.trUtf8('Commit changes'), - self.trUtf8('Commit changes...'), + self.tr('Commit changes'), + self.tr('Commit changes...'), 0, 0, self, 'mercurial_queues_commit') - self.hgQueueCommitAct.setStatusTip(self.trUtf8( + self.hgQueueCommitAct.setStatusTip(self.tr( 'Commit changes in the queue repository' )) - self.hgQueueCommitAct.setWhatsThis(self.trUtf8( + self.hgQueueCommitAct.setWhatsThis(self.tr( """<b>Commit changes...</b>""" """<p>This commits changes in the queue repository.</p>""" )) @@ -61,13 +61,13 @@ self.actions.append(self.hgQueueCommitAct) self.hgQueueNewAct = E5Action( - self.trUtf8('New Patch'), - self.trUtf8('New Patch...'), + self.tr('New Patch'), + self.tr('New Patch...'), 0, 0, self, 'mercurial_queues_new') - self.hgQueueNewAct.setStatusTip(self.trUtf8( + self.hgQueueNewAct.setStatusTip(self.tr( 'Create a new patch' )) - self.hgQueueNewAct.setWhatsThis(self.trUtf8( + self.hgQueueNewAct.setWhatsThis(self.tr( """<b>New Patch</b>""" """<p>This creates a new named patch.</p>""" )) @@ -75,13 +75,13 @@ self.actions.append(self.hgQueueNewAct) self.hgQueueRefreshAct = E5Action( - self.trUtf8('Update Current Patch'), - self.trUtf8('Update Current Patch'), + self.tr('Update Current Patch'), + self.tr('Update Current Patch'), 0, 0, self, 'mercurial_queues_refresh') - self.hgQueueRefreshAct.setStatusTip(self.trUtf8( + self.hgQueueRefreshAct.setStatusTip(self.tr( 'Update the current patch' )) - self.hgQueueRefreshAct.setWhatsThis(self.trUtf8( + self.hgQueueRefreshAct.setWhatsThis(self.tr( """<b>Update Current Patch</b>""" """<p>This updates the current patch.</p>""" )) @@ -90,13 +90,13 @@ self.actions.append(self.hgQueueRefreshAct) self.hgQueueRefreshMessageAct = E5Action( - self.trUtf8('Update Current Patch (with Message)'), - self.trUtf8('Update Current Patch (with Message)'), + self.tr('Update Current Patch (with Message)'), + self.tr('Update Current Patch (with Message)'), 0, 0, self, 'mercurial_queues_refresh_message') - self.hgQueueRefreshMessageAct.setStatusTip(self.trUtf8( + self.hgQueueRefreshMessageAct.setStatusTip(self.tr( 'Update the current patch and edit commit message' )) - self.hgQueueRefreshMessageAct.setWhatsThis(self.trUtf8( + self.hgQueueRefreshMessageAct.setWhatsThis(self.tr( """<b>Update Current Patch (with Message)</b>""" """<p>This updates the current patch after giving the chance""" """ to change the current commit message.</p>""" @@ -106,13 +106,13 @@ self.actions.append(self.hgQueueRefreshMessageAct) self.hgQueueDiffAct = E5Action( - self.trUtf8('Show Current Patch'), - self.trUtf8('Show Current Patch...'), + self.tr('Show Current Patch'), + self.tr('Show Current Patch...'), 0, 0, self, 'mercurial_queues_show') - self.hgQueueDiffAct.setStatusTip(self.trUtf8( + self.hgQueueDiffAct.setStatusTip(self.tr( 'Show the contents the current patch' )) - self.hgQueueDiffAct.setWhatsThis(self.trUtf8( + self.hgQueueDiffAct.setWhatsThis(self.tr( """<b>Show Current Patch</b>""" """<p>This shows the contents of the current patch including""" """ any changes which have been made in the working directory""" @@ -122,13 +122,13 @@ self.actions.append(self.hgQueueDiffAct) self.hgQueueHeaderAct = E5Action( - self.trUtf8('Show Current Message'), - self.trUtf8('Show Current Message...'), + self.tr('Show Current Message'), + self.tr('Show Current Message...'), 0, 0, self, 'mercurial_queues_show_message') - self.hgQueueHeaderAct.setStatusTip(self.trUtf8( + self.hgQueueHeaderAct.setStatusTip(self.tr( 'Show the commit message of the current patch' )) - self.hgQueueHeaderAct.setWhatsThis(self.trUtf8( + self.hgQueueHeaderAct.setWhatsThis(self.tr( """<b>Show Current Message</b>""" """<p>This shows the commit message of the current patch.</p>""" )) @@ -136,13 +136,13 @@ self.actions.append(self.hgQueueHeaderAct) self.hgQueueListAct = E5Action( - self.trUtf8('List Patches'), - self.trUtf8('List Patches...'), + self.tr('List Patches'), + self.tr('List Patches...'), 0, 0, self, 'mercurial_queues_list') - self.hgQueueListAct.setStatusTip(self.trUtf8( + self.hgQueueListAct.setStatusTip(self.tr( 'List applied and unapplied patches' )) - self.hgQueueListAct.setWhatsThis(self.trUtf8( + self.hgQueueListAct.setWhatsThis(self.tr( """<b>List Patches</b>""" """<p>This lists all applied and unapplied patches.</p>""" )) @@ -150,13 +150,13 @@ self.actions.append(self.hgQueueListAct) self.hgQueueFinishAct = E5Action( - self.trUtf8('Finish Applied Patches'), - self.trUtf8('Finish Applied Patches'), + self.tr('Finish Applied Patches'), + self.tr('Finish Applied Patches'), 0, 0, self, 'mercurial_queues_finish_applied') - self.hgQueueFinishAct.setStatusTip(self.trUtf8( + self.hgQueueFinishAct.setStatusTip(self.tr( 'Finish applied patches' )) - self.hgQueueFinishAct.setWhatsThis(self.trUtf8( + self.hgQueueFinishAct.setWhatsThis(self.tr( """<b>Finish Applied Patches</b>""" """<p>This finishes the applied patches by moving them out of""" """ mq control into regular repository history.</p>""" @@ -166,13 +166,13 @@ self.actions.append(self.hgQueueFinishAct) self.hgQueueRenameAct = E5Action( - self.trUtf8('Rename Patch'), - self.trUtf8('Rename Patch'), + self.tr('Rename Patch'), + self.tr('Rename Patch'), 0, 0, self, 'mercurial_queues_rename') - self.hgQueueRenameAct.setStatusTip(self.trUtf8( + self.hgQueueRenameAct.setStatusTip(self.tr( 'Rename a patch' )) - self.hgQueueRenameAct.setWhatsThis(self.trUtf8( + self.hgQueueRenameAct.setWhatsThis(self.tr( """<b>Rename Patch</b>""" """<p>This renames the current or a named patch.</p>""" )) @@ -180,13 +180,13 @@ self.actions.append(self.hgQueueRenameAct) self.hgQueueDeleteAct = E5Action( - self.trUtf8('Delete Patch'), - self.trUtf8('Delete Patch'), + self.tr('Delete Patch'), + self.tr('Delete Patch'), 0, 0, self, 'mercurial_queues_delete') - self.hgQueueDeleteAct.setStatusTip(self.trUtf8( + self.hgQueueDeleteAct.setStatusTip(self.tr( 'Delete unapplied patch' )) - self.hgQueueDeleteAct.setWhatsThis(self.trUtf8( + self.hgQueueDeleteAct.setWhatsThis(self.tr( """<b>Delete Patch</b>""" """<p>This deletes an unapplied patch.</p>""" )) @@ -194,13 +194,13 @@ self.actions.append(self.hgQueueDeleteAct) self.hgQueueFoldAct = E5Action( - self.trUtf8('Fold Patches'), - self.trUtf8('Fold Patches'), + self.tr('Fold Patches'), + self.tr('Fold Patches'), 0, 0, self, 'mercurial_queues_fold') - self.hgQueueFoldAct.setStatusTip(self.trUtf8( + self.hgQueueFoldAct.setStatusTip(self.tr( 'Fold unapplied patches into the current patch' )) - self.hgQueueFoldAct.setWhatsThis(self.trUtf8( + self.hgQueueFoldAct.setWhatsThis(self.tr( """<b>Fold Patches</b>""" """<p>This folds unapplied patches into the current patch.</p>""" )) @@ -209,13 +209,13 @@ self.actions.append(self.hgQueueFoldAct) self.hgQueueStatusAct = E5Action( - self.trUtf8('Show Status'), - self.trUtf8('Show &Status...'), + self.tr('Show Status'), + self.tr('Show &Status...'), 0, 0, self, 'mercurial_queues_status') - self.hgQueueStatusAct.setStatusTip(self.trUtf8( + self.hgQueueStatusAct.setStatusTip(self.tr( 'Show the status of the queue repository' )) - self.hgQueueStatusAct.setWhatsThis(self.trUtf8( + self.hgQueueStatusAct.setWhatsThis(self.tr( """<b>Show Status</b>""" """<p>This shows the status of the queue repository.</p>""" )) @@ -232,13 +232,13 @@ Public method to generate the push and pop action objects. """ self.hgQueuePushAct = E5Action( - self.trUtf8('Push Next Patch'), - self.trUtf8('Push Next Patch'), + self.tr('Push Next Patch'), + self.tr('Push Next Patch'), 0, 0, self, 'mercurial_queues_push_next') - self.hgQueuePushAct.setStatusTip(self.trUtf8( + self.hgQueuePushAct.setStatusTip(self.tr( 'Push the next patch onto the stack' )) - self.hgQueuePushAct.setWhatsThis(self.trUtf8( + self.hgQueuePushAct.setWhatsThis(self.tr( """<b>Push Next Patch</b>""" """<p>This pushes the next patch onto the stack of applied""" """ patches.</p>""" @@ -247,13 +247,13 @@ self.actions.append(self.hgQueuePushAct) self.hgQueuePushAllAct = E5Action( - self.trUtf8('Push All Patches'), - self.trUtf8('Push All Patches'), + self.tr('Push All Patches'), + self.tr('Push All Patches'), 0, 0, self, 'mercurial_queues_push_all') - self.hgQueuePushAllAct.setStatusTip(self.trUtf8( + self.hgQueuePushAllAct.setStatusTip(self.tr( 'Push all patches onto the stack' )) - self.hgQueuePushAllAct.setWhatsThis(self.trUtf8( + self.hgQueuePushAllAct.setWhatsThis(self.tr( """<b>Push All Patches</b>""" """<p>This pushes all patches onto the stack of applied""" """ patches.</p>""" @@ -263,13 +263,13 @@ self.actions.append(self.hgQueuePushAllAct) self.hgQueuePushUntilAct = E5Action( - self.trUtf8('Push Patches'), - self.trUtf8('Push Patches'), + self.tr('Push Patches'), + self.tr('Push Patches'), 0, 0, self, 'mercurial_queues_push_until') - self.hgQueuePushUntilAct.setStatusTip(self.trUtf8( + self.hgQueuePushUntilAct.setStatusTip(self.tr( 'Push patches onto the stack' )) - self.hgQueuePushUntilAct.setWhatsThis(self.trUtf8( + self.hgQueuePushUntilAct.setWhatsThis(self.tr( """<b>Push Patches</b>""" """<p>This pushes patches onto the stack of applied patches""" """ until a named patch is at the top of the stack.</p>""" @@ -279,13 +279,13 @@ self.actions.append(self.hgQueuePushUntilAct) self.hgQueuePopAct = E5Action( - self.trUtf8('Pop Current Patch'), - self.trUtf8('Pop Current Patch'), + self.tr('Pop Current Patch'), + self.tr('Pop Current Patch'), 0, 0, self, 'mercurial_queues_pop_current') - self.hgQueuePopAct.setStatusTip(self.trUtf8( + self.hgQueuePopAct.setStatusTip(self.tr( 'Pop the current patch off the stack' )) - self.hgQueuePopAct.setWhatsThis(self.trUtf8( + self.hgQueuePopAct.setWhatsThis(self.tr( """<b>Pop Current Patch</b>""" """<p>This pops the current patch off the stack of applied""" """ patches.</p>""" @@ -294,13 +294,13 @@ self.actions.append(self.hgQueuePopAct) self.hgQueuePopAllAct = E5Action( - self.trUtf8('Pop All Patches'), - self.trUtf8('Pop All Patches'), + self.tr('Pop All Patches'), + self.tr('Pop All Patches'), 0, 0, self, 'mercurial_queues_pop_all') - self.hgQueuePopAllAct.setStatusTip(self.trUtf8( + self.hgQueuePopAllAct.setStatusTip(self.tr( 'Pop all patches off the stack' )) - self.hgQueuePopAllAct.setWhatsThis(self.trUtf8( + self.hgQueuePopAllAct.setWhatsThis(self.tr( """<b>Pop All Patches</b>""" """<p>This pops all patches off the stack of applied""" """ patches.</p>""" @@ -310,13 +310,13 @@ self.actions.append(self.hgQueuePopAllAct) self.hgQueuePopUntilAct = E5Action( - self.trUtf8('Pop Patches'), - self.trUtf8('Pop Patches'), + self.tr('Pop Patches'), + self.tr('Pop Patches'), 0, 0, self, 'mercurial_queues_pop_until') - self.hgQueuePopUntilAct.setStatusTip(self.trUtf8( + self.hgQueuePopUntilAct.setStatusTip(self.tr( 'Pop patches off the stack' )) - self.hgQueuePopUntilAct.setWhatsThis(self.trUtf8( + self.hgQueuePopUntilAct.setWhatsThis(self.tr( """<b>Pop Patches</b>""" """<p>This pops patches off the stack of applied patches""" """ until a named patch is at the top of the stack.</p>""" @@ -325,13 +325,13 @@ self.actions.append(self.hgQueuePopUntilAct) self.hgQueueGotoAct = E5Action( - self.trUtf8('Go to Patch'), - self.trUtf8('Go to Patch'), + self.tr('Go to Patch'), + self.tr('Go to Patch'), 0, 0, self, 'mercurial_queues_goto') - self.hgQueueGotoAct.setStatusTip(self.trUtf8( + self.hgQueueGotoAct.setStatusTip(self.tr( 'Push or pop patches until named patch is at top of stack' )) - self.hgQueueGotoAct.setWhatsThis(self.trUtf8( + self.hgQueueGotoAct.setWhatsThis(self.tr( """<b>Go to Patch</b>""" """<p>This pushes or pops patches until a named patch is at the""" """ top of the stack.</p>""" @@ -344,13 +344,13 @@ Public method to generate the push and pop (force) action objects. """ self.hgQueuePushForceAct = E5Action( - self.trUtf8('Push Next Patch'), - self.trUtf8('Push Next Patch'), + self.tr('Push Next Patch'), + self.tr('Push Next Patch'), 0, 0, self, 'mercurial_queues_push_next_force') - self.hgQueuePushForceAct.setStatusTip(self.trUtf8( + self.hgQueuePushForceAct.setStatusTip(self.tr( 'Push the next patch onto the stack on top of local changes' )) - self.hgQueuePushForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePushForceAct.setWhatsThis(self.tr( """<b>Push Next Patch</b>""" """<p>This pushes the next patch onto the stack of applied""" """ patches on top of local changes.</p>""" @@ -360,13 +360,13 @@ self.actions.append(self.hgQueuePushForceAct) self.hgQueuePushAllForceAct = E5Action( - self.trUtf8('Push All Patches'), - self.trUtf8('Push All Patches'), + self.tr('Push All Patches'), + self.tr('Push All Patches'), 0, 0, self, 'mercurial_queues_push_all_force') - self.hgQueuePushAllForceAct.setStatusTip(self.trUtf8( + self.hgQueuePushAllForceAct.setStatusTip(self.tr( 'Push all patches onto the stack on top of local changes' )) - self.hgQueuePushAllForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePushAllForceAct.setWhatsThis(self.tr( """<b>Push All Patches</b>""" """<p>This pushes all patches onto the stack of applied patches""" """ on top of local changes.</p>""" @@ -376,13 +376,13 @@ self.actions.append(self.hgQueuePushAllForceAct) self.hgQueuePushUntilForceAct = E5Action( - self.trUtf8('Push Patches'), - self.trUtf8('Push Patches'), + self.tr('Push Patches'), + self.tr('Push Patches'), 0, 0, self, 'mercurial_queues_push_until_force') - self.hgQueuePushUntilForceAct.setStatusTip(self.trUtf8( + self.hgQueuePushUntilForceAct.setStatusTip(self.tr( 'Push patches onto the stack on top of local changes' )) - self.hgQueuePushUntilForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePushUntilForceAct.setWhatsThis(self.tr( """<b>Push Patches</b>""" """<p>This pushes patches onto the stack of applied patches""" """ until a named patch is at the top of the stack on top of""" @@ -393,13 +393,13 @@ self.actions.append(self.hgQueuePushUntilForceAct) self.hgQueuePopForceAct = E5Action( - self.trUtf8('Pop Current Patch'), - self.trUtf8('Pop Current Patch'), + self.tr('Pop Current Patch'), + self.tr('Pop Current Patch'), 0, 0, self, 'mercurial_queues_pop_current_force') - self.hgQueuePopForceAct.setStatusTip(self.trUtf8( + self.hgQueuePopForceAct.setStatusTip(self.tr( 'Pop the current patch off the stack forgetting local changes' )) - self.hgQueuePopForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePopForceAct.setWhatsThis(self.tr( """<b>Pop Current Patch</b>""" """<p>This pops the current patch off the stack of applied""" """ patches""" @@ -410,13 +410,13 @@ self.actions.append(self.hgQueuePopForceAct) self.hgQueuePopAllForceAct = E5Action( - self.trUtf8('Pop All Patches'), - self.trUtf8('Pop All Patches'), + self.tr('Pop All Patches'), + self.tr('Pop All Patches'), 0, 0, self, 'mercurial_queues_pop_all_force') - self.hgQueuePopAllForceAct.setStatusTip(self.trUtf8( + self.hgQueuePopAllForceAct.setStatusTip(self.tr( 'Pop all patches off the stack forgetting local changes' )) - self.hgQueuePopAllForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePopAllForceAct.setWhatsThis(self.tr( """<b>Pop All Patches</b>""" """<p>This pops all patches off the stack of applied patches""" """ forgetting local changes.</p>""" @@ -426,13 +426,13 @@ self.actions.append(self.hgQueuePopAllForceAct) self.hgQueuePopUntilForceAct = E5Action( - self.trUtf8('Pop Patches'), - self.trUtf8('Pop Patches'), + self.tr('Pop Patches'), + self.tr('Pop Patches'), 0, 0, self, 'mercurial_queues_pop_until_force') - self.hgQueuePopUntilForceAct.setStatusTip(self.trUtf8( + self.hgQueuePopUntilForceAct.setStatusTip(self.tr( 'Pop patches off the stack forgetting local changes' )) - self.hgQueuePopUntilForceAct.setWhatsThis(self.trUtf8( + self.hgQueuePopUntilForceAct.setWhatsThis(self.tr( """<b>Pop Patches</b>""" """<p>This pops patches off the stack of applied patches until""" """ a named patch is at the top of the stack forgetting local""" @@ -443,14 +443,14 @@ self.actions.append(self.hgQueuePopUntilForceAct) self.hgQueueGotoForceAct = E5Action( - self.trUtf8('Go to Patch'), - self.trUtf8('Go to Patch'), + self.tr('Go to Patch'), + self.tr('Go to Patch'), 0, 0, self, 'mercurial_queues_goto_force') - self.hgQueueGotoForceAct.setStatusTip(self.trUtf8( + self.hgQueueGotoForceAct.setStatusTip(self.tr( 'Push or pop patches until named patch is at top of stack' ' overwriting any local changes' )) - self.hgQueueGotoForceAct.setWhatsThis(self.trUtf8( + self.hgQueueGotoForceAct.setWhatsThis(self.tr( """<b>Go to Patch</b>""" """<p>This pushes or pops patches until a named patch is at the""" """ top of the stack overwriting any local changes.</p>""" @@ -464,13 +464,13 @@ Public method to generate the guards action objects. """ self.hgQueueDefineGuardsAct = E5Action( - self.trUtf8('Define Guards'), - self.trUtf8('Define Guards...'), + self.tr('Define Guards'), + self.tr('Define Guards...'), 0, 0, self, 'mercurial_queues_guards_define') - self.hgQueueDefineGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueDefineGuardsAct.setStatusTip(self.tr( 'Define guards for the current or a named patch' )) - self.hgQueueDefineGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueDefineGuardsAct.setWhatsThis(self.tr( """<b>Define Guards</b>""" """<p>This opens a dialog to define guards for the current""" """ or a named patch.</p>""" @@ -480,13 +480,13 @@ self.actions.append(self.hgQueueDefineGuardsAct) self.hgQueueDropAllGuardsAct = E5Action( - self.trUtf8('Drop All Guards'), - self.trUtf8('Drop All Guards...'), + self.tr('Drop All Guards'), + self.tr('Drop All Guards...'), 0, 0, self, 'mercurial_queues_guards_drop_all') - self.hgQueueDropAllGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueDropAllGuardsAct.setStatusTip(self.tr( 'Drop all guards of the current or a named patch' )) - self.hgQueueDropAllGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueDropAllGuardsAct.setWhatsThis(self.tr( """<b>Drop All Guards</b>""" """<p>This drops all guards of the current or a named patch.</p>""" )) @@ -495,13 +495,13 @@ self.actions.append(self.hgQueueDropAllGuardsAct) self.hgQueueListGuardsAct = E5Action( - self.trUtf8('List Guards'), - self.trUtf8('List Guards...'), + self.tr('List Guards'), + self.tr('List Guards...'), 0, 0, self, 'mercurial_queues_guards_list') - self.hgQueueListGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueListGuardsAct.setStatusTip(self.tr( 'List guards of the current or a named patch' )) - self.hgQueueListGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueListGuardsAct.setWhatsThis(self.tr( """<b>List Guards</b>""" """<p>This lists the guards of the current or a named patch.</p>""" )) @@ -510,13 +510,13 @@ self.actions.append(self.hgQueueListGuardsAct) self.hgQueueListAllGuardsAct = E5Action( - self.trUtf8('List All Guards'), - self.trUtf8('List All Guards...'), + self.tr('List All Guards'), + self.tr('List All Guards...'), 0, 0, self, 'mercurial_queues_guards_list_all') - self.hgQueueListAllGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueListAllGuardsAct.setStatusTip(self.tr( 'List all guards of all patches' )) - self.hgQueueListAllGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueListAllGuardsAct.setWhatsThis(self.tr( """<b>List All Guards</b>""" """<p>This lists all guards of all patches.</p>""" )) @@ -525,13 +525,13 @@ self.actions.append(self.hgQueueListAllGuardsAct) self.hgQueueActivateGuardsAct = E5Action( - self.trUtf8('Set Active Guards'), - self.trUtf8('Set Active Guards...'), + self.tr('Set Active Guards'), + self.tr('Set Active Guards...'), 0, 0, self, 'mercurial_queues_guards_set_active') - self.hgQueueActivateGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueActivateGuardsAct.setStatusTip(self.tr( 'Set the list of active guards' )) - self.hgQueueActivateGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueActivateGuardsAct.setWhatsThis(self.tr( """<b>Set Active Guards</b>""" """<p>This opens a dialog to set the active guards.</p>""" )) @@ -540,13 +540,13 @@ self.actions.append(self.hgQueueActivateGuardsAct) self.hgQueueDeactivateGuardsAct = E5Action( - self.trUtf8('Deactivate Guards'), - self.trUtf8('Deactivate Guards...'), + self.tr('Deactivate Guards'), + self.tr('Deactivate Guards...'), 0, 0, self, 'mercurial_queues_guards_deactivate') - self.hgQueueDeactivateGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueDeactivateGuardsAct.setStatusTip(self.tr( 'Deactivate all active guards' )) - self.hgQueueDeactivateGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueDeactivateGuardsAct.setWhatsThis(self.tr( """<b>Deactivate Guards</b>""" """<p>This deactivates all active guards.</p>""" )) @@ -555,13 +555,13 @@ self.actions.append(self.hgQueueDeactivateGuardsAct) self.hgQueueIdentifyActiveGuardsAct = E5Action( - self.trUtf8('Identify Active Guards'), - self.trUtf8('Identify Active Guards...'), + self.tr('Identify Active Guards'), + self.tr('Identify Active Guards...'), 0, 0, self, 'mercurial_queues_guards_identify_active') - self.hgQueueIdentifyActiveGuardsAct.setStatusTip(self.trUtf8( + self.hgQueueIdentifyActiveGuardsAct.setStatusTip(self.tr( 'Show a list of active guards' )) - self.hgQueueIdentifyActiveGuardsAct.setWhatsThis(self.trUtf8( + self.hgQueueIdentifyActiveGuardsAct.setWhatsThis(self.tr( """<b>Identify Active Guards</b>""" """<p>This opens a dialog showing a list of active guards.</p>""" )) @@ -574,13 +574,13 @@ Public method to generate the queues management action objects. """ self.hgQueueCreateQueueAct = E5Action( - self.trUtf8('Create Queue'), - self.trUtf8('Create Queue'), + self.tr('Create Queue'), + self.tr('Create Queue'), 0, 0, self, 'mercurial_queues_create_queue') - self.hgQueueCreateQueueAct.setStatusTip(self.trUtf8( + self.hgQueueCreateQueueAct.setStatusTip(self.tr( 'Create a new patch queue' )) - self.hgQueueCreateQueueAct.setWhatsThis(self.trUtf8( + self.hgQueueCreateQueueAct.setWhatsThis(self.tr( """<b>Create Queue</b>""" """<p>This creates a new patch queue.</p>""" )) @@ -589,13 +589,13 @@ self.actions.append(self.hgQueueCreateQueueAct) self.hgQueueRenameQueueAct = E5Action( - self.trUtf8('Rename Queue'), - self.trUtf8('Rename Queue'), + self.tr('Rename Queue'), + self.tr('Rename Queue'), 0, 0, self, 'mercurial_queues_rename_queue') - self.hgQueueRenameQueueAct.setStatusTip(self.trUtf8( + self.hgQueueRenameQueueAct.setStatusTip(self.tr( 'Rename the active patch queue' )) - self.hgQueueRenameQueueAct.setWhatsThis(self.trUtf8( + self.hgQueueRenameQueueAct.setWhatsThis(self.tr( """<b>Rename Queue</b>""" """<p>This renames the active patch queue.</p>""" )) @@ -604,13 +604,13 @@ self.actions.append(self.hgQueueRenameQueueAct) self.hgQueueDeleteQueueAct = E5Action( - self.trUtf8('Delete Queue'), - self.trUtf8('Delete Queue'), + self.tr('Delete Queue'), + self.tr('Delete Queue'), 0, 0, self, 'mercurial_queues_delete_queue') - self.hgQueueDeleteQueueAct.setStatusTip(self.trUtf8( + self.hgQueueDeleteQueueAct.setStatusTip(self.tr( 'Delete the reference to a patch queue' )) - self.hgQueueDeleteQueueAct.setWhatsThis(self.trUtf8( + self.hgQueueDeleteQueueAct.setWhatsThis(self.tr( """<b>Delete Queue</b>""" """<p>This deletes the reference to a patch queue.</p>""" )) @@ -619,14 +619,14 @@ self.actions.append(self.hgQueueDeleteQueueAct) self.hgQueuePurgeQueueAct = E5Action( - self.trUtf8('Purge Queue'), - self.trUtf8('Purge Queue'), + self.tr('Purge Queue'), + self.tr('Purge Queue'), 0, 0, self, 'mercurial_queues_purge_queue') - self.hgQueuePurgeQueueAct.setStatusTip(self.trUtf8( + self.hgQueuePurgeQueueAct.setStatusTip(self.tr( 'Delete the reference to a patch queue and remove the patch' ' directory' )) - self.hgQueuePurgeQueueAct.setWhatsThis(self.trUtf8( + self.hgQueuePurgeQueueAct.setWhatsThis(self.tr( """<b>Purge Queue</b>""" """<p>This deletes the reference to a patch queue and removes""" """ the patch directory.</p>""" @@ -636,13 +636,13 @@ self.actions.append(self.hgQueuePurgeQueueAct) self.hgQueueActivateQueueAct = E5Action( - self.trUtf8('Activate Queue'), - self.trUtf8('Activate Queue'), + self.tr('Activate Queue'), + self.tr('Activate Queue'), 0, 0, self, 'mercurial_queues_activate_queue') - self.hgQueueActivateQueueAct.setStatusTip(self.trUtf8( + self.hgQueueActivateQueueAct.setStatusTip(self.tr( 'Set the active queue' )) - self.hgQueueActivateQueueAct.setWhatsThis(self.trUtf8( + self.hgQueueActivateQueueAct.setWhatsThis(self.tr( """<b>Activate Queue</b>""" """<p>This sets the active queue.</p>""" )) @@ -651,13 +651,13 @@ self.actions.append(self.hgQueueActivateQueueAct) self.hgQueueListQueuesAct = E5Action( - self.trUtf8('List Queues'), - self.trUtf8('List Queues...'), + self.tr('List Queues'), + self.tr('List Queues...'), 0, 0, self, 'mercurial_queues_list_queues') - self.hgQueueListQueuesAct.setStatusTip(self.trUtf8( + self.hgQueueListQueuesAct.setStatusTip(self.tr( 'List the available queues' )) - self.hgQueueListQueuesAct.setWhatsThis(self.trUtf8( + self.hgQueueListQueuesAct.setWhatsThis(self.tr( """<b>List Queues</b>""" """<p>This opens a dialog showing all available queues.</p>""" )) @@ -675,7 +675,7 @@ menu = QMenu(self.menuTitle(), mainMenu) menu.setTearOffEnabled(True) - pushPopMenu = QMenu(self.trUtf8("Push/Pop"), menu) + pushPopMenu = QMenu(self.tr("Push/Pop"), menu) pushPopMenu.setTearOffEnabled(True) pushPopMenu.addAction(self.hgQueuePushAct) pushPopMenu.addAction(self.hgQueuePushUntilAct) @@ -687,7 +687,7 @@ pushPopMenu.addSeparator() pushPopMenu.addAction(self.hgQueueGotoAct) - pushPopForceMenu = QMenu(self.trUtf8("Push/Pop (force)"), menu) + pushPopForceMenu = QMenu(self.tr("Push/Pop (force)"), menu) pushPopForceMenu.setTearOffEnabled(True) pushPopForceMenu.addAction(self.hgQueuePushForceAct) pushPopForceMenu.addAction(self.hgQueuePushUntilForceAct) @@ -699,7 +699,7 @@ pushPopForceMenu.addSeparator() pushPopForceMenu.addAction(self.hgQueueGotoForceAct) - guardsMenu = QMenu(self.trUtf8("Guards"), menu) + guardsMenu = QMenu(self.tr("Guards"), menu) guardsMenu.setTearOffEnabled(True) guardsMenu.addAction(self.hgQueueDefineGuardsAct) guardsMenu.addAction(self.hgQueueDropAllGuardsAct) @@ -712,7 +712,7 @@ guardsMenu.addSeparator() guardsMenu.addAction(self.hgQueueIdentifyActiveGuardsAct) - queuesMenu = QMenu(self.trUtf8("Queue Management"), menu) + queuesMenu = QMenu(self.tr("Queue Management"), menu) queuesMenu.setTearOffEnabled(True) queuesMenu.addAction(self.hgQueueCreateQueueAct) queuesMenu.addAction(self.hgQueueRenameQueueAct) @@ -758,7 +758,7 @@ @return title of the menu (string) """ - return self.trUtf8("Queues") + return self.tr("Queues") def __hgQueueNewPatch(self): """ @@ -816,8 +816,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Changing Applied Patches"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Changing Applied Patches"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/queues.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/queues.py Sat Jan 11 11:55:33 2014 +0100 @@ -266,7 +266,7 @@ args.append(dateStr) args.append(name) - dia = HgDialog(self.trUtf8('New Patch'), self.vcs) + dia = HgDialog(self.tr('New Patch'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -316,7 +316,7 @@ else: return - dia = HgDialog(self.trUtf8('Update Current Patch'), self.vcs) + dia = HgDialog(self.tr('Update Current Patch'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -372,15 +372,15 @@ args = [] if operation == Queues.POP: args.append("qpop") - title = self.trUtf8("Pop Patches") + title = self.tr("Pop Patches") listType = Queues.APPLIED_LIST elif operation == Queues.PUSH: args.append("qpush") - title = self.trUtf8("Push Patches") + title = self.tr("Push Patches") listType = Queues.UNAPPLIED_LIST elif operation == Queues.GOTO: args.append("qgoto") - title = self.trUtf8("Go to Patch") + title = self.tr("Go to Patch") listType = Queues.SERIES_LIST else: raise ValueError("illegal value for operation") @@ -394,8 +394,8 @@ if patchnames: patch, ok = QInputDialog.getItem( None, - self.trUtf8("Select Patch"), - self.trUtf8("Select the target patch name:"), + self.tr("Select Patch"), + self.tr("Select the target patch name:"), patchnames, 0, False) if ok and patch: @@ -405,8 +405,8 @@ else: E5MessageBox.information( None, - self.trUtf8("Select Patch"), - self.trUtf8("""No patches to select from.""")) + self.tr("Select Patch"), + self.tr("""No patches to select from.""")) return False dia = HgDialog(title, self.vcs) @@ -445,7 +445,7 @@ args.append("qfinish") args.append("--applied") - dia = HgDialog(self.trUtf8('Finish Applied Patches'), self.vcs) + dia = HgDialog(self.tr('Finish Applied Patches'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -479,7 +479,7 @@ args.append(selectedPatch) args.append(newName) - dia = HgDialog(self.trUtf8("Rename Patch"), self.vcs) + dia = HgDialog(self.tr("Rename Patch"), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -504,22 +504,22 @@ if patchnames: patch, ok = QInputDialog.getItem( None, - self.trUtf8("Select Patch"), - self.trUtf8("Select the patch to be deleted:"), + self.tr("Select Patch"), + self.tr("Select the patch to be deleted:"), patchnames, 0, False) if ok and patch: args.append(patch) - dia = HgDialog(self.trUtf8("Delete Patch"), self.vcs) + dia = HgDialog(self.tr("Delete Patch"), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() else: E5MessageBox.information( None, - self.trUtf8("Select Patch"), - self.trUtf8("""No patches to select from.""")) + self.tr("Select Patch"), + self.tr("""No patches to select from.""")) def hgQueueFoldUnappliedPatches(self, name): """ @@ -550,20 +550,20 @@ if patchesList: args.extend(patchesList) - dia = HgDialog(self.trUtf8("Fold Patches"), self.vcs) + dia = HgDialog(self.tr("Fold Patches"), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() else: E5MessageBox.information( None, - self.trUtf8("Fold Patches"), - self.trUtf8("""No patches selected.""")) + self.tr("Fold Patches"), + self.tr("""No patches selected.""")) else: E5MessageBox.information( None, - self.trUtf8("Fold Patches"), - self.trUtf8("""No patches available to be folded.""")) + self.tr("Fold Patches"), + self.tr("""No patches available to be folded.""")) def hgQueueGuardsList(self, name): """ @@ -589,8 +589,8 @@ else: E5MessageBox.information( None, - self.trUtf8("List Guards"), - self.trUtf8("""No patches available to list guards for.""")) + self.tr("List Guards"), + self.tr("""No patches available to list guards for.""")) def hgQueueGuardsListAll(self, name): """ @@ -627,8 +627,8 @@ else: E5MessageBox.information( None, - self.trUtf8("Define Guards"), - self.trUtf8("""No patches available to define guards for.""")) + self.tr("Define Guards"), + self.tr("""No patches available to define guards for.""")) def hgQueueGuardsDropAll(self, name): """ @@ -648,9 +648,9 @@ if patchnames: patch, ok = QInputDialog.getItem( None, - self.trUtf8("Drop All Guards"), - self.trUtf8("Select the patch to drop guards for" - " (leave empty for the current patch):"), + self.tr("Drop All Guards"), + self.tr("Select the patch to drop guards for" + " (leave empty for the current patch):"), [""] + patchnames, 0, False) if ok: @@ -673,8 +673,8 @@ else: E5MessageBox.information( None, - self.trUtf8("Drop All Guards"), - self.trUtf8("""No patches available to define guards for.""")) + self.tr("Drop All Guards"), + self.tr("""No patches available to define guards for.""")) def hgQueueGuardsSetActive(self, name): """ @@ -703,15 +703,15 @@ args.append("qselect") args.extend(guards) - dia = HgDialog(self.trUtf8('Set Active Guards'), self.vcs) + dia = HgDialog(self.tr('Set Active Guards'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() else: E5MessageBox.information( None, - self.trUtf8("Set Active Guards"), - self.trUtf8("""No guards available to select from.""")) + self.tr("Set Active Guards"), + self.tr("""No guards available to select from.""")) return def hgQueueGuardsDeactivate(self, name): @@ -731,7 +731,7 @@ args.append("qselect") args.append("--none") - dia = HgDialog(self.trUtf8('Deactivate Guards'), self.vcs) + dia = HgDialog(self.tr('Deactivate Guards'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -771,9 +771,9 @@ return if isCreate: - title = self.trUtf8("Create New Queue") + title = self.tr("Create New Queue") else: - title = self.trUtf8("Rename Active Queue") + title = self.tr("Rename Active Queue") from .HgQueuesQueueManagementDialog import \ HgQueuesQueueManagementDialog dlg = HgQueuesQueueManagementDialog( @@ -810,10 +810,10 @@ if error: if isCreate: - errMsg = self.trUtf8( + errMsg = self.tr( "Error while creating a new queue.") else: - errMsg = self.trUtf8( + errMsg = self.tr( "Error while renaming the active queue.") E5MessageBox.warning( None, @@ -842,11 +842,11 @@ return if operation == Queues.QUEUE_PURGE: - title = self.trUtf8("Purge Queue") + title = self.tr("Purge Queue") elif operation == Queues.QUEUE_DELETE: - title = self.trUtf8("Delete Queue") + title = self.tr("Delete Queue") elif operation == Queues.QUEUE_ACTIVATE: - title = self.trUtf8("Activate Queue") + title = self.tr("Activate Queue") else: raise ValueError("illegal value for operation") @@ -886,11 +886,11 @@ if error: if operation == Queues.QUEUE_PURGE: - errMsg = self.trUtf8("Error while purging the queue.") + errMsg = self.tr("Error while purging the queue.") elif operation == Queues.QUEUE_DELETE: - errMsg = self.trUtf8("Error while deleting the queue.") + errMsg = self.tr("Error while deleting the queue.") elif operation == Queues.QUEUE_ACTIVATE: - errMsg = self.trUtf8( + errMsg = self.tr( "Error while setting the active queue.") E5MessageBox.warning( None, @@ -918,7 +918,7 @@ HgQueuesQueueManagementDialog self.queuesListQueuesDialog = HgQueuesQueueManagementDialog( HgQueuesQueueManagementDialog.NO_INPUT, - self.trUtf8("Available Queues"), + self.tr("Available Queues"), False, repodir, self.vcs) self.queuesListQueuesDialog.show() @@ -941,7 +941,7 @@ args.append(repodir) # init is not possible with the command server dia = HgDialog( - self.trUtf8('Initializing new queue repository'), self.vcs) + self.tr('Initializing new queue repository'), self.vcs) res = dia.startProcess(args) if res: dia.exec_()
--- a/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,14 +32,14 @@ Public method to generate the action objects. """ self.hgRebaseAct = E5Action( - self.trUtf8('Rebase Changesets'), + self.tr('Rebase Changesets'), UI.PixmapCache.getIcon("vcsRebase.png"), - self.trUtf8('Rebase Changesets'), + self.tr('Rebase Changesets'), 0, 0, self, 'mercurial_rebase') - self.hgRebaseAct.setStatusTip(self.trUtf8( + self.hgRebaseAct.setStatusTip(self.tr( 'Rebase changesets to another branch' )) - self.hgRebaseAct.setWhatsThis(self.trUtf8( + self.hgRebaseAct.setWhatsThis(self.tr( """<b>Rebase Changesets</b>""" """<p>This rebases changesets to another branch.</p>""" )) @@ -47,13 +47,13 @@ self.actions.append(self.hgRebaseAct) self.hgRebaseContinueAct = E5Action( - self.trUtf8('Continue Rebase Session'), - self.trUtf8('Continue Rebase Session'), + self.tr('Continue Rebase Session'), + self.tr('Continue Rebase Session'), 0, 0, self, 'mercurial_rebase_continue') - self.hgRebaseContinueAct.setStatusTip(self.trUtf8( + self.hgRebaseContinueAct.setStatusTip(self.tr( 'Continue the last rebase session after repair' )) - self.hgRebaseContinueAct.setWhatsThis(self.trUtf8( + self.hgRebaseContinueAct.setWhatsThis(self.tr( """<b>Continue Rebase Session</b>""" """<p>This continues the last rebase session after repair.</p>""" )) @@ -61,13 +61,13 @@ self.actions.append(self.hgRebaseContinueAct) self.hgRebaseAbortAct = E5Action( - self.trUtf8('Abort Rebase Session'), - self.trUtf8('Abort Rebase Session'), + self.tr('Abort Rebase Session'), + self.tr('Abort Rebase Session'), 0, 0, self, 'mercurial_rebase_abort') - self.hgRebaseAbortAct.setStatusTip(self.trUtf8( + self.hgRebaseAbortAct.setStatusTip(self.tr( 'Abort the last rebase session' )) - self.hgRebaseAbortAct.setWhatsThis(self.trUtf8( + self.hgRebaseAbortAct.setWhatsThis(self.tr( """<b>Abort Rebase Session</b>""" """<p>This aborts the last rebase session.</p>""" )) @@ -97,7 +97,7 @@ @return title of the menu (string) """ - return self.trUtf8("Rebase") + return self.tr("Rebase") def __hgRebase(self): """ @@ -108,8 +108,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Rebase Changesets"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Rebase Changesets"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -123,8 +123,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Rebase Changesets (Continue)"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Rebase Changesets (Continue)"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -138,8 +138,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Rebase Changesets (Abort)"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Rebase Changesets (Abort)"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/rebase.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/RebaseExtension/rebase.py Sat Jan 11 11:55:33 2014 +0100 @@ -77,7 +77,7 @@ args.append("--detach") args.append("--verbose") - dia = HgDialog(self.trUtf8('Rebase Changesets'), self.vcs) + dia = HgDialog(self.tr('Rebase Changesets'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -104,7 +104,7 @@ args.append("--continue") args.append("--verbose") - dia = HgDialog(self.trUtf8('Rebase Changesets (Continue)'), self.vcs) + dia = HgDialog(self.tr('Rebase Changesets (Continue)'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -131,7 +131,7 @@ args.append("--abort") args.append("--verbose") - dia = HgDialog(self.trUtf8('Rebase Changesets (Abort)'), self.vcs) + dia = HgDialog(self.tr('Rebase Changesets (Abort)'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_()
--- a/Plugins/VcsPlugins/vcsMercurial/TransplantExtension/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/TransplantExtension/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,14 +46,14 @@ Public method to generate the action objects. """ self.hgTransplantAct = E5Action( - self.trUtf8('Transplant Changesets'), + self.tr('Transplant Changesets'), UI.PixmapCache.getIcon("vcsTransplant.png"), - self.trUtf8('Transplant Changesets'), + self.tr('Transplant Changesets'), 0, 0, self, 'mercurial_transplant') - self.hgTransplantAct.setStatusTip(self.trUtf8( + self.hgTransplantAct.setStatusTip(self.tr( 'Transplant changesets from another branch' )) - self.hgTransplantAct.setWhatsThis(self.trUtf8( + self.hgTransplantAct.setWhatsThis(self.tr( """<b>Transplant Changesets</b>""" """<p>This transplants changesets from another branch on top""" """ of the current working directory with the log of the""" @@ -63,13 +63,13 @@ self.actions.append(self.hgTransplantAct) self.hgTransplantContinueAct = E5Action( - self.trUtf8('Continue Transplant Session'), - self.trUtf8('Continue Transplant Session'), + self.tr('Continue Transplant Session'), + self.tr('Continue Transplant Session'), 0, 0, self, 'mercurial_transplant_continue') - self.hgTransplantContinueAct.setStatusTip(self.trUtf8( + self.hgTransplantContinueAct.setStatusTip(self.tr( 'Continue the last transplant session after repair' )) - self.hgTransplantContinueAct.setWhatsThis(self.trUtf8( + self.hgTransplantContinueAct.setWhatsThis(self.tr( """<b>Continue Transplant Session</b>""" """<p>This continues the last transplant session after""" """ repair.</p>""" @@ -90,7 +90,7 @@ if self.vcs.version >= (2, 3): # transplant is deprecated as of Mercurial 2.3 menu.addAction( - self.trUtf8("Transplant is deprecated")).setEnabled(False) + self.tr("Transplant is deprecated")).setEnabled(False) else: menu.setTearOffEnabled(True) @@ -105,7 +105,7 @@ @return title of the menu (string) """ - return self.trUtf8("Transplant") + return self.tr("Transplant") def __hgTransplant(self): """ @@ -116,8 +116,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Transplant Changesets"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Transplant Changesets"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -131,8 +131,8 @@ if shouldReopen: res = E5MessageBox.yesNo( None, - self.trUtf8("Transplant Changesets (Continue)"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Transplant Changesets (Continue)"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/Plugins/VcsPlugins/vcsMercurial/TransplantExtension/transplant.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/TransplantExtension/transplant.py Sat Jan 11 11:55:33 2014 +0100 @@ -69,7 +69,7 @@ args.append("--log") args.extend(revs) - dia = HgDialog(self.trUtf8('Transplant Changesets'), self.vcs) + dia = HgDialog(self.tr('Transplant Changesets'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -97,7 +97,7 @@ args.append("--verbose") dia = HgDialog( - self.trUtf8('Transplant Changesets (Continue)'), self.vcs) + self.tr('Transplant Changesets (Continue)'), self.vcs) res = dia.startProcess(args, repodir) if res: dia.exec_()
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/hg.py Sat Jan 11 11:55:33 2014 +0100 @@ -225,14 +225,14 @@ return True, errMsg else: if finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process finished with the exit code {0}")\ .format(process.exitCode()) else: - errMsg = self.trUtf8( + errMsg = self.tr( "The hg process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the hg executable.") + errMsg = self.tr("Could not start the hg executable.") return False, errMsg @@ -262,8 +262,8 @@ if not success: E5MessageBox.critical( self.__ui, - self.trUtf8("Create project repository"), - self.trUtf8( + self.tr("Create project repository"), + self.tr( """The project repository could not be created.""")) else: pfn = project.pfile @@ -290,7 +290,7 @@ args.append('init') args.append(projectDir) # init is not possible with the command server - dia = HgDialog(self.trUtf8('Creating Mercurial repository'), self) + dia = HgDialog(self.tr('Creating Mercurial repository'), self) res = dia.startProcess(args) if res: dia.exec_() @@ -308,7 +308,7 @@ args.append('--message') args.append(msg) dia = HgDialog( - self.trUtf8('Initial commit to Mercurial repository'), + self.tr('Initial commit to Mercurial repository'), self) res = dia.startProcess(args, projectDir) if res: @@ -356,7 +356,7 @@ return err == "" else: dia = HgDialog( - self.trUtf8('Cloning project from a Mercurial repository'), + self.tr('Cloning project from a Mercurial repository'), self) res = dia.startProcess(args) if res: @@ -453,8 +453,8 @@ if not ok: res = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Commit Changes"), - self.trUtf8( + self.tr("Commit Changes"), + self.tr( """The commit affects files, that have unsaved""" """ changes. Shall the commit be continued?"""), icon=E5MessageBox.Warning) @@ -520,7 +520,7 @@ self.startSynchronizedProcess(QProcess(), "hg", args, dname) else: dia = HgDialog( - self.trUtf8('Committing changes to Mercurial repository'), + self.tr('Committing changes to Mercurial repository'), self) res = dia.startProcess(args, dname) if res: @@ -574,7 +574,7 @@ out, err = self.__client.runcommand(args) res = False else: - dia = HgDialog(self.trUtf8( + dia = HgDialog(self.tr( 'Synchronizing with the Mercurial repository'), self) res = dia.startProcess(args, repodir) @@ -628,7 +628,7 @@ out, err = self.__client.runcommand(args) else: dia = HgDialog( - self.trUtf8( + self.tr( 'Adding files/directories to the Mercurial repository'), self) res = dia.startProcess(args, repodir) @@ -700,7 +700,7 @@ res = err == "" else: dia = HgDialog( - self.trUtf8( + self.tr( 'Removing files/directories from the Mercurial' ' repository'), self) @@ -766,7 +766,7 @@ out, err = self.__client.runcommand(args) res = err == "" else: - dia = HgDialog(self.trUtf8('Renaming {0}').format(name), self) + dia = HgDialog(self.tr('Renaming {0}').format(name), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -930,7 +930,7 @@ args.append("Removed {1}tag <{0}>.".format(tag, msgPart)) args.append(tag) - dia = HgDialog(self.trUtf8('Tagging in the Mercurial repository'), + dia = HgDialog(self.tr('Tagging in the Mercurial repository'), self) res = dia.startProcess(args, repodir) if res: @@ -975,8 +975,8 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Revert changes"), - self.trUtf8( + self.tr("Revert changes"), + self.tr( "Do you really want to revert all changes to these files" " or directories?"), names) @@ -984,11 +984,11 @@ else: yes = E5MessageBox.yesNo( None, - self.trUtf8("Revert changes"), - self.trUtf8("""Do you really want to revert all changes of""" - """ the project?""")) + self.tr("Revert changes"), + self.tr("""Do you really want to revert all changes of""" + """ the project?""")) if yes: - dia = HgDialog(self.trUtf8('Reverting changes'), self) + dia = HgDialog(self.tr('Reverting changes'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -1043,7 +1043,7 @@ args.append("--rev") args.append(rev) - dia = HgDialog(self.trUtf8('Merging').format(name), self) + dia = HgDialog(self.tr('Merging').format(name), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -1301,7 +1301,7 @@ if os.path.splitdrive(repodir)[1] == os.sep: return - dia = HgDialog(self.trUtf8('Mercurial command'), self) + dia = HgDialog(self.tr('Mercurial command'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -1514,7 +1514,7 @@ return False dia = HgDialog( - self.trUtf8('Copying {0}').format(name), self) + self.tr('Copying {0}').format(name), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -1763,10 +1763,10 @@ process.readAllStandardError(), Preferences.getSystem("IOEncoding"), 'replace') else: - error = self.trUtf8( + error = self.tr( "The hg process did not finish within 30s.") else: - error = self.trUtf8( + error = self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.').format('hg') else: @@ -1817,7 +1817,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Mercurial Side-by-Side Difference"), + self.tr("Mercurial Side-by-Side Difference"), error) return name1 = "{0} (rev. {1})".format(name, rev1 and rev1 or ".") @@ -1827,7 +1827,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Mercurial Side-by-Side Difference"), + self.tr("Mercurial Side-by-Side Difference"), error) return name2 = "{0} (rev. {1})".format(name, rev2) @@ -1840,8 +1840,8 @@ except IOError: E5MessageBox.critical( self.__ui, - self.trUtf8("Mercurial Side-by-Side Difference"), - self.trUtf8( + self.tr("Mercurial Side-by-Side Difference"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(name)) return @@ -1914,10 +1914,10 @@ self.bundleFile and \ os.path.exists(self.bundleFile): command = "unbundle" - title = self.trUtf8('Apply changegroups') + title = self.tr('Apply changegroups') else: command = "pull" - title = self.trUtf8('Pulling from a remote Mercurial repository') + title = self.tr('Pulling from a remote Mercurial repository') args = [] args.append(command) @@ -1971,7 +1971,7 @@ return dia = HgDialog( - self.trUtf8('Pushing to a remote Mercurial repository'), self) + self.tr('Pushing to a remote Mercurial repository'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2101,7 +2101,7 @@ if os.path.splitdrive(repodir)[1] == os.sep: return - dia = HgDialog(self.trUtf8('Resolving files/directories'), self) + dia = HgDialog(self.tr('Resolving files/directories'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2124,8 +2124,8 @@ name, ok = QInputDialog.getItem( None, - self.trUtf8("Create Branch"), - self.trUtf8("Enter branch name"), + self.tr("Create Branch"), + self.tr("Enter branch name"), sorted(self.hgGetBranchesList(repodir)), 0, True) if ok and name: @@ -2134,7 +2134,7 @@ args.append(name.strip().replace(" ", "_")) dia = HgDialog( - self.trUtf8('Creating branch in the Mercurial repository'), + self.tr('Creating branch in the Mercurial repository'), self) res = dia.startProcess(args, repodir) if res: @@ -2158,7 +2158,7 @@ args = [] args.append("branch") - dia = HgDialog(self.trUtf8('Showing current branch'), self) + dia = HgDialog(self.tr('Showing current branch'), self) res = dia.startProcess(args, repodir, False) if res: dia.exec_() @@ -2226,7 +2226,7 @@ args.append('verify') dia = HgDialog( - self.trUtf8('Verifying the integrity of the Mercurial repository'), + self.tr('Verifying the integrity of the Mercurial repository'), self) res = dia.startProcess(args, repodir) if res: @@ -2252,7 +2252,7 @@ args.append("--untrusted") dia = HgDialog( - self.trUtf8('Showing the combined configuration settings'), + self.tr('Showing the combined configuration settings'), self) res = dia.startProcess(args, repodir, False) if res: @@ -2277,7 +2277,7 @@ args.append('paths') dia = HgDialog( - self.trUtf8('Showing aliases for remote repositories'), + self.tr('Showing aliases for remote repositories'), self) res = dia.startProcess(args, repodir, False) if res: @@ -2302,7 +2302,7 @@ args.append('recover') dia = HgDialog( - self.trUtf8('Recovering from interrupted transaction'), + self.tr('Recovering from interrupted transaction'), self) res = dia.startProcess(args, repodir, False) if res: @@ -2326,7 +2326,7 @@ args = [] args.append('identify') - dia = HgDialog(self.trUtf8('Identifying project directory'), self) + dia = HgDialog(self.tr('Identifying project directory'), self) res = dia.startProcess(args, repodir, False) if res: dia.exec_() @@ -2364,9 +2364,9 @@ if os.path.exists(ignoreName): res = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Create .hgignore file"), - self.trUtf8("""<p>The file <b>{0}</b> exists already.""" - """ Overwrite it?</p>""").format(ignoreName), + self.tr("Create .hgignore file"), + self.tr("""<p>The file <b>{0}</b> exists already.""" + """ Overwrite it?</p>""").format(ignoreName), icon=E5MessageBox.Warning) else: res = True @@ -2418,9 +2418,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( None, - self.trUtf8("Create changegroup"), + self.tr("Create changegroup"), self.__lastChangeGroupPath or repodir, - self.trUtf8("Mercurial Changegroup Files (*.hg)"), + self.tr("Mercurial Changegroup Files (*.hg)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -2435,9 +2435,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Create changegroup"), - self.trUtf8("<p>The Mercurial changegroup file <b>{0}</b> " - "already exists. Overwrite it?</p>") + self.tr("Create changegroup"), + self.tr("<p>The Mercurial changegroup file <b>{0}</b> " + "already exists. Overwrite it?</p>") .format(fname), icon=E5MessageBox.Warning) if not res: @@ -2460,7 +2460,7 @@ args.append(compression) args.append(fname) - dia = HgDialog(self.trUtf8('Create changegroup'), self) + dia = HgDialog(self.tr('Create changegroup'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2483,9 +2483,9 @@ file = E5FileDialog.getOpenFileName( None, - self.trUtf8("Preview changegroup"), + self.tr("Preview changegroup"), self.__lastChangeGroupPath or repodir, - self.trUtf8("Mercurial Changegroup Files (*.hg);;All Files (*)")) + self.tr("Mercurial Changegroup Files (*.hg);;All Files (*)")) if file: self.__lastChangeGroupPath = os.path.dirname(file) @@ -2518,9 +2518,9 @@ file = E5FileDialog.getOpenFileName( None, - self.trUtf8("Preview changegroup"), + self.tr("Preview changegroup"), self.__lastChangeGroupPath or repodir, - self.trUtf8("Mercurial Changegroup Files (*.hg);;All Files (*)")) + self.tr("Mercurial Changegroup Files (*.hg);;All Files (*)")) if file: self.__lastChangeGroupPath = os.path.dirname(file) @@ -2528,7 +2528,7 @@ args.append('identify') args.append(file) - dia = HgDialog(self.trUtf8('Identifying changegroup file'), self) + dia = HgDialog(self.tr('Identifying changegroup file'), self) res = dia.startProcess(args, repodir, False) if res: dia.exec_() @@ -2553,16 +2553,16 @@ res = False files = E5FileDialog.getOpenFileNames( None, - self.trUtf8("Apply changegroups"), + self.tr("Apply changegroups"), self.__lastChangeGroupPath or repodir, - self.trUtf8("Mercurial Changegroup Files (*.hg);;All Files (*)")) + self.tr("Mercurial Changegroup Files (*.hg);;All Files (*)")) if files: self.__lastChangeGroupPath = os.path.dirname(files[0]) update = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Apply changegroups"), - self.trUtf8("""Shall the working directory be updated?"""), + self.tr("Apply changegroups"), + self.tr("""Shall the working directory be updated?"""), yesDefault=True) args = [] @@ -2572,7 +2572,7 @@ args.append("--verbose") args.extend(files) - dia = HgDialog(self.trUtf8('Apply changegroups'), self) + dia = HgDialog(self.tr('Apply changegroups'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2591,7 +2591,7 @@ """ if subcommand not in ("good", "bad", "skip", "reset"): raise ValueError( - self.trUtf8("Bisect subcommand ({0}) invalid.") + self.tr("Bisect subcommand ({0}) invalid.") .format(subcommand)) dname, fname = self.splitPath(name) @@ -2628,7 +2628,7 @@ args.append(rev) dia = HgDialog( - self.trUtf8('Mercurial Bisect ({0})').format(subcommand), self) + self.tr('Mercurial Bisect ({0})').format(subcommand), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2662,7 +2662,7 @@ return dia = HgDialog( - self.trUtf8('Removing files from the Mercurial repository only'), + self.tr('Removing files from the Mercurial repository only'), self) res = dia.startProcess(args, repodir) if res: @@ -2703,8 +2703,8 @@ if not rev: E5MessageBox.warning( self.__ui, - self.trUtf8("Backing out changeset"), - self.trUtf8("""No revision given. Aborting...""")) + self.tr("Backing out changeset"), + self.tr("""No revision given. Aborting...""")) return args = [] @@ -2722,7 +2722,7 @@ args.append(message) args.append(rev) - dia = HgDialog(self.trUtf8('Backing out changeset'), self) + dia = HgDialog(self.tr('Backing out changeset'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2744,12 +2744,12 @@ res = E5MessageBox.yesNo( None, - self.trUtf8("Rollback last transaction"), - self.trUtf8("""Are you sure you want to rollback the last""" - """ transaction?"""), + self.tr("Rollback last transaction"), + self.tr("""Are you sure you want to rollback the last""" + """ transaction?"""), icon=E5MessageBox.Warning) if res: - dia = HgDialog(self.trUtf8('Rollback last transaction'), self) + dia = HgDialog(self.tr('Rollback last transaction'), self) res = dia.startProcess(["rollback"], repodir) if res: dia.exec_() @@ -2818,7 +2818,7 @@ args.append("--force") args.append(patchFile) - dia = HgDialog(self.trUtf8("Import Patch"), self) + dia = HgDialog(self.tr("Import Patch"), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2866,7 +2866,7 @@ for rev in revisions: args.append(rev) - dia = HgDialog(self.trUtf8("Export Patches"), self) + dia = HgDialog(self.tr("Export Patches"), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2914,7 +2914,7 @@ for rev in revs: args.append(rev) - dia = HgDialog(self.trUtf8("Change Phase"), self) + dia = HgDialog(self.tr("Change Phase"), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2968,7 +2968,7 @@ args.append("--dry-run") args.extend(revs) - dia = HgDialog(self.trUtf8('Copy Changesets'), self) + dia = HgDialog(self.tr('Copy Changesets'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -2995,7 +2995,7 @@ args.append("--continue") args.append("--verbose") - dia = HgDialog(self.trUtf8('Copy Changesets (Continue)'), self) + dia = HgDialog(self.tr('Copy Changesets (Continue)'), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -3031,7 +3031,7 @@ args.append("--subrepos") args.append(archive) - dia = HgDialog(self.trUtf8("Create Unversioned Archive"), self) + dia = HgDialog(self.tr("Create Unversioned Archive"), self) res = dia.startProcess(args, repodir) if res: dia.exec_() @@ -3086,8 +3086,8 @@ except IOError as err: E5MessageBox.critical( self.__ui, - self.trUtf8("Add Sub-repository"), - self.trUtf8( + self.tr("Add Sub-repository"), + self.tr( """<p>The sub-repositories file .hgsub could not""" """ be read.</p><p>Reason: {0}</p>""") .format(str(err))) @@ -3096,8 +3096,8 @@ if entry in contents: E5MessageBox.critical( self.__ui, - self.trUtf8("Add Sub-repository"), - self.trUtf8( + self.tr("Add Sub-repository"), + self.tr( """<p>The sub-repositories file .hgsub already""" """ contains an entry <b>{0}</b>.""" """ Aborting...</p>""").format(entry)) @@ -3115,8 +3115,8 @@ except IOError as err: E5MessageBox.critical( self.__ui, - self.trUtf8("Add Sub-repository"), - self.trUtf8( + self.tr("Add Sub-repository"), + self.tr( """<p>The sub-repositories file .hgsub could not""" """ be written to.</p><p>Reason: {0}</p>""") .format(str(err))) @@ -3136,9 +3136,9 @@ if not os.path.isfile(hgsub): E5MessageBox.critical( self.__ui, - self.trUtf8("Remove Sub-repositories"), - self.trUtf8("""<p>The sub-repositories file .hgsub does not""" - """ exist. Aborting...</p>""")) + self.tr("Remove Sub-repositories"), + self.tr("""<p>The sub-repositories file .hgsub does not""" + """ exist. Aborting...</p>""")) return try: @@ -3148,9 +3148,9 @@ except IOError as err: E5MessageBox.critical( self.__ui, - self.trUtf8("Remove Sub-repositories"), - self.trUtf8("""<p>The sub-repositories file .hgsub could not""" - """ be read.</p><p>Reason: {0}</p>""") + self.tr("Remove Sub-repositories"), + self.tr("""<p>The sub-repositories file .hgsub could not""" + """ be read.</p><p>Reason: {0}</p>""") .format(str(err))) return @@ -3167,8 +3167,8 @@ except IOError as err: E5MessageBox.critical( self.__ui, - self.trUtf8("Remove Sub-repositories"), - self.trUtf8( + self.tr("Remove Sub-repositories"), + self.tr( """<p>The sub-repositories file .hgsub could not""" """ be written to.</p><p>Reason: {0}</p>""") .format(str(err))) @@ -3198,8 +3198,8 @@ if not ok: E5MessageBox.warning( None, - self.trUtf8("Mercurial Command Server"), - self.trUtf8( + self.tr("Mercurial Command Server"), + self.tr( """<p>The Mercurial Command Server could not be""" """ restarted.</p><p>Reason: {0}</p>""").format(err)) self.__client = None @@ -3336,8 +3336,8 @@ else: E5MessageBox.warning( None, - self.trUtf8("Mercurial Command Server"), - self.trUtf8( + self.tr("Mercurial Command Server"), + self.tr( """<p>The Mercurial Command Server could not be""" """ started.</p><p>Reason: {0}</p>""").format(err))
--- a/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -195,7 +195,7 @@ self.vcsMenuActions = [] self.vcsAddMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -208,140 +208,140 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMenuActions.append(act) if 1 in self.browser.specialMenuEntries: self.vcsMenuAddTree = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add tree to repository'), + self.tr('Add tree to repository'), self._VCSAddTree) self.vcsAddMenuActions.append(self.vcsMenuAddTree) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( - self.trUtf8('Copy'), self.__SVNCopy) + self.tr('Copy'), self.__SVNCopy) self.vcsMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__SVNMove) + act = menu.addAction(self.tr('Move'), self.__SVNMove) self.vcsMenuActions.append(act) if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__SVNLogBrowser) + self.tr('Show log browser'), self.__SVNLogBrowser) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRepo.png"), - self.trUtf8('Show repository info'), self.__SVNInfo) + self.tr('Show repository info'), self.__SVNInfo) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side'), self.__SVNSbsDiff) + self.tr('Show difference side-by-side'), self.__SVNSbsDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side (extended)'), + self.tr('Show difference side-by-side (extended)'), self.__SVNSbsExtendedDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsMenuActions.append(act) self.blameAct = menu.addAction( - self.trUtf8('Show annotated file'), + self.tr('Show annotated file'), self.__SVNBlame) self.vcsMenuActions.append(self.blameAct) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLock.png"), - self.trUtf8('Lock'), self.__SVNLock) + self.tr('Lock'), self.__SVNLock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Unlock'), self.__SVNUnlock) + self.tr('Unlock'), self.__SVNUnlock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Break Lock'), self.__SVNBreakLock) + self.tr('Break Lock'), self.__SVNBreakLock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Steal Lock'), self.__SVNStealLock) + self.tr('Steal Lock'), self.__SVNStealLock) self.vcsMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -357,7 +357,7 @@ self.vcsMultiMenuActions = [] self.vcsAddMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -370,102 +370,102 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMultiMenuActions.append(act) if 1 in self.browser.specialMenuEntries: self.vcsMultiMenuAddTree = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add tree to repository'), self._VCSAddTree) + self.tr('Add tree to repository'), self._VCSAddTree) self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMultiMenuActions.append(act) if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLock.png"), - self.trUtf8('Lock'), self.__SVNLock) + self.tr('Lock'), self.__SVNLock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Unlock'), self.__SVNUnlock) + self.tr('Unlock'), self.__SVNUnlock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Break Lock'), self.__SVNBreakLock) + self.tr('Break Lock'), self.__SVNBreakLock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Steal Lock'), self.__SVNStealLock) + self.tr('Steal Lock'), self.__SVNStealLock) self.vcsMultiMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsMultiMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -477,7 +477,7 @@ @param mainMenu reference to the menu to be amended """ - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -488,16 +488,16 @@ act.setFont(font) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -515,7 +515,7 @@ self.vcsDirMenuActions = [] self.vcsAddDirMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -528,102 +528,102 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Copy'), self.__SVNCopy) + act = menu.addAction(self.tr('Copy'), self.__SVNCopy) self.vcsDirMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__SVNMove) + act = menu.addAction(self.tr('Move'), self.__SVNMove) self.vcsDirMenuActions.append(act) if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__SVNLogBrowser) + self.tr('Show log browser'), self.__SVNLogBrowser) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRepo.png"), - self.trUtf8('Show repository info'), self.__SVNInfo) + self.tr('Show repository info'), self.__SVNInfo) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsDirMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsDirMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsDirMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsDirMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsDirMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -641,7 +641,7 @@ self.vcsDirMultiMenuActions = [] self.vcsAddDirMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -654,84 +654,84 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMultiMenuActions.append(act) if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsDirMultiMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu)
--- a/Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,14 +46,14 @@ Public method to generate the action objects. """ self.vcsNewAct = E5Action( - self.trUtf8('New from repository'), + self.tr('New from repository'), UI.PixmapCache.getIcon("vcsCheckout.png"), - self.trUtf8('&New from repository...'), 0, 0, self, + self.tr('&New from repository...'), 0, 0, self, 'subversion_new') - self.vcsNewAct.setStatusTip(self.trUtf8( + self.vcsNewAct.setStatusTip(self.tr( 'Create a new project from the VCS repository' )) - self.vcsNewAct.setWhatsThis(self.trUtf8( + self.vcsNewAct.setWhatsThis(self.tr( """<b>New from repository</b>""" """<p>This creates a new local project from the VCS""" """ repository.</p>""" @@ -62,14 +62,14 @@ self.actions.append(self.vcsNewAct) self.vcsUpdateAct = E5Action( - self.trUtf8('Update from repository'), + self.tr('Update from repository'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('&Update from repository'), 0, 0, self, + self.tr('&Update from repository'), 0, 0, self, 'subversion_update') - self.vcsUpdateAct.setStatusTip(self.trUtf8( + self.vcsUpdateAct.setStatusTip(self.tr( 'Update the local project from the VCS repository' )) - self.vcsUpdateAct.setWhatsThis(self.trUtf8( + self.vcsUpdateAct.setWhatsThis(self.tr( """<b>Update from repository</b>""" """<p>This updates the local project from the VCS""" """ repository.</p>""" @@ -78,14 +78,14 @@ self.actions.append(self.vcsUpdateAct) self.vcsCommitAct = E5Action( - self.trUtf8('Commit changes to repository'), + self.tr('Commit changes to repository'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('&Commit changes to repository...'), 0, 0, self, + self.tr('&Commit changes to repository...'), 0, 0, self, 'subversion_commit') - self.vcsCommitAct.setStatusTip(self.trUtf8( + self.vcsCommitAct.setStatusTip(self.tr( 'Commit changes to the local project to the VCS repository' )) - self.vcsCommitAct.setWhatsThis(self.trUtf8( + self.vcsCommitAct.setWhatsThis(self.tr( """<b>Commit changes to repository</b>""" """<p>This commits changes to the local project to the VCS""" """ repository.</p>""" @@ -94,14 +94,14 @@ self.actions.append(self.vcsCommitAct) self.vcsLogAct = E5Action( - self.trUtf8('Show log'), + self.tr('Show log'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show &log'), + self.tr('Show &log'), 0, 0, self, 'subversion_log') - self.vcsLogAct.setStatusTip(self.trUtf8( + self.vcsLogAct.setStatusTip(self.tr( 'Show the log of the local project' )) - self.vcsLogAct.setWhatsThis(self.trUtf8( + self.vcsLogAct.setWhatsThis(self.tr( """<b>Show log</b>""" """<p>This shows the log of the local project.</p>""" )) @@ -109,14 +109,14 @@ self.actions.append(self.vcsLogAct) self.svnLogBrowserAct = E5Action( - self.trUtf8('Show log browser'), + self.tr('Show log browser'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), + self.tr('Show log browser'), 0, 0, self, 'subversion_log_browser') - self.svnLogBrowserAct.setStatusTip(self.trUtf8( + self.svnLogBrowserAct.setStatusTip(self.tr( 'Show a dialog to browse the log of the local project' )) - self.svnLogBrowserAct.setWhatsThis(self.trUtf8( + self.svnLogBrowserAct.setWhatsThis(self.tr( """<b>Show log browser</b>""" """<p>This shows a dialog to browse the log of the local""" """ project. A limited number of entries is shown first. More""" @@ -126,14 +126,14 @@ self.actions.append(self.svnLogBrowserAct) self.vcsDiffAct = E5Action( - self.trUtf8('Show difference'), + self.tr('Show difference'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show &difference'), + self.tr('Show &difference'), 0, 0, self, 'subversion_diff') - self.vcsDiffAct.setStatusTip(self.trUtf8( + self.vcsDiffAct.setStatusTip(self.tr( 'Show the difference of the local project to the repository' )) - self.vcsDiffAct.setWhatsThis(self.trUtf8( + self.vcsDiffAct.setWhatsThis(self.tr( """<b>Show difference</b>""" """<p>This shows the difference of the local project to the""" """ repository.</p>""" @@ -142,14 +142,14 @@ self.actions.append(self.vcsDiffAct) self.svnExtDiffAct = E5Action( - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), 0, 0, self, 'subversion_extendeddiff') - self.svnExtDiffAct.setStatusTip(self.trUtf8( + self.svnExtDiffAct.setStatusTip(self.tr( 'Show the difference of revisions of the project to the repository' )) - self.svnExtDiffAct.setWhatsThis(self.trUtf8( + self.svnExtDiffAct.setWhatsThis(self.tr( """<b>Show difference (extended)</b>""" """<p>This shows the difference of selectable revisions of""" """ the project.</p>""" @@ -158,14 +158,14 @@ self.actions.append(self.svnExtDiffAct) self.svnUrlDiffAct = E5Action( - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), 0, 0, self, 'subversion_urldiff') - self.svnUrlDiffAct.setStatusTip(self.trUtf8( + self.svnUrlDiffAct.setStatusTip(self.tr( 'Show the difference of the project between two repository URLs' )) - self.svnUrlDiffAct.setWhatsThis(self.trUtf8( + self.svnUrlDiffAct.setWhatsThis(self.tr( """<b>Show difference (URLs)</b>""" """<p>This shows the difference of the project between""" """ two repository URLs.</p>""" @@ -174,14 +174,14 @@ self.actions.append(self.svnUrlDiffAct) self.vcsStatusAct = E5Action( - self.trUtf8('Show status'), + self.tr('Show status'), UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show &status'), + self.tr('Show &status'), 0, 0, self, 'subversion_status') - self.vcsStatusAct.setStatusTip(self.trUtf8( + self.vcsStatusAct.setStatusTip(self.tr( 'Show the status of the local project' )) - self.vcsStatusAct.setWhatsThis(self.trUtf8( + self.vcsStatusAct.setWhatsThis(self.tr( """<b>Show status</b>""" """<p>This shows the status of the local project.</p>""" )) @@ -189,14 +189,14 @@ self.actions.append(self.vcsStatusAct) self.svnChangeListsAct = E5Action( - self.trUtf8('Show change lists'), + self.tr('Show change lists'), UI.PixmapCache.getIcon("vcsChangeLists.png"), - self.trUtf8('Show change lists'), + self.tr('Show change lists'), 0, 0, self, 'subversion_changelists') - self.svnChangeListsAct.setStatusTip(self.trUtf8( + self.svnChangeListsAct.setStatusTip(self.tr( 'Show the change lists and associated files of the local project' )) - self.svnChangeListsAct.setWhatsThis(self.trUtf8( + self.svnChangeListsAct.setWhatsThis(self.tr( """<b>Show change lists</b>""" """<p>This shows the change lists and associated files of the""" """ local project.</p>""" @@ -205,14 +205,14 @@ self.actions.append(self.svnChangeListsAct) self.svnRepoInfoAct = E5Action( - self.trUtf8('Show repository info'), + self.tr('Show repository info'), UI.PixmapCache.getIcon("vcsRepo.png"), - self.trUtf8('Show repository info'), + self.tr('Show repository info'), 0, 0, self, 'subversion_repoinfo') - self.svnRepoInfoAct.setStatusTip(self.trUtf8( + self.svnRepoInfoAct.setStatusTip(self.tr( 'Show some repository related information for the local project' )) - self.svnRepoInfoAct.setWhatsThis(self.trUtf8( + self.svnRepoInfoAct.setWhatsThis(self.tr( """<b>Show repository info</b>""" """<p>This shows some repository related information for""" """ the local project.</p>""" @@ -221,14 +221,14 @@ self.actions.append(self.svnRepoInfoAct) self.vcsTagAct = E5Action( - self.trUtf8('Tag in repository'), + self.tr('Tag in repository'), UI.PixmapCache.getIcon("vcsTag.png"), - self.trUtf8('&Tag in repository...'), + self.tr('&Tag in repository...'), 0, 0, self, 'subversion_tag') - self.vcsTagAct.setStatusTip(self.trUtf8( + self.vcsTagAct.setStatusTip(self.tr( 'Tag the local project in the repository' )) - self.vcsTagAct.setWhatsThis(self.trUtf8( + self.vcsTagAct.setWhatsThis(self.tr( """<b>Tag in repository</b>""" """<p>This tags the local project in the repository.</p>""" )) @@ -236,14 +236,14 @@ self.actions.append(self.vcsTagAct) self.vcsExportAct = E5Action( - self.trUtf8('Export from repository'), + self.tr('Export from repository'), UI.PixmapCache.getIcon("vcsExport.png"), - self.trUtf8('&Export from repository...'), + self.tr('&Export from repository...'), 0, 0, self, 'subversion_export') - self.vcsExportAct.setStatusTip(self.trUtf8( + self.vcsExportAct.setStatusTip(self.tr( 'Export a project from the repository' )) - self.vcsExportAct.setWhatsThis(self.trUtf8( + self.vcsExportAct.setWhatsThis(self.tr( """<b>Export from repository</b>""" """<p>This exports a project from the repository.</p>""" )) @@ -251,12 +251,12 @@ self.actions.append(self.vcsExportAct) self.vcsPropsAct = E5Action( - self.trUtf8('Command options'), - self.trUtf8('Command &options...'), 0, 0, self, + self.tr('Command options'), + self.tr('Command &options...'), 0, 0, self, 'subversion_options') - self.vcsPropsAct.setStatusTip(self.trUtf8( + self.vcsPropsAct.setStatusTip(self.tr( 'Show the VCS command options')) - self.vcsPropsAct.setWhatsThis(self.trUtf8( + self.vcsPropsAct.setWhatsThis(self.tr( """<b>Command options...</b>""" """<p>This shows a dialog to edit the VCS command options.</p>""" )) @@ -264,14 +264,14 @@ self.actions.append(self.vcsPropsAct) self.vcsRevertAct = E5Action( - self.trUtf8('Revert changes'), + self.tr('Revert changes'), UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Re&vert changes'), + self.tr('Re&vert changes'), 0, 0, self, 'subversion_revert') - self.vcsRevertAct.setStatusTip(self.trUtf8( + self.vcsRevertAct.setStatusTip(self.tr( 'Revert all changes made to the local project' )) - self.vcsRevertAct.setWhatsThis(self.trUtf8( + self.vcsRevertAct.setWhatsThis(self.tr( """<b>Revert changes</b>""" """<p>This reverts all changes made to the local project.</p>""" )) @@ -279,14 +279,14 @@ self.actions.append(self.vcsRevertAct) self.vcsMergeAct = E5Action( - self.trUtf8('Merge'), + self.tr('Merge'), UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Mer&ge changes...'), + self.tr('Mer&ge changes...'), 0, 0, self, 'subversion_merge') - self.vcsMergeAct.setStatusTip(self.trUtf8( + self.vcsMergeAct.setStatusTip(self.tr( 'Merge changes of a tag/revision into the local project' )) - self.vcsMergeAct.setWhatsThis(self.trUtf8( + self.vcsMergeAct.setWhatsThis(self.tr( """<b>Merge</b>""" """<p>This merges changes of a tag/revision into the local""" """ project.</p>""" @@ -295,14 +295,14 @@ self.actions.append(self.vcsMergeAct) self.vcsSwitchAct = E5Action( - self.trUtf8('Switch'), + self.tr('Switch'), UI.PixmapCache.getIcon("vcsSwitch.png"), - self.trUtf8('S&witch...'), + self.tr('S&witch...'), 0, 0, self, 'subversion_switch') - self.vcsSwitchAct.setStatusTip(self.trUtf8( + self.vcsSwitchAct.setStatusTip(self.tr( 'Switch the local copy to another tag/branch' )) - self.vcsSwitchAct.setWhatsThis(self.trUtf8( + self.vcsSwitchAct.setWhatsThis(self.tr( """<b>Switch</b>""" """<p>This switches the local copy to another tag/branch.</p>""" )) @@ -310,13 +310,13 @@ self.actions.append(self.vcsSwitchAct) self.vcsResolveAct = E5Action( - self.trUtf8('Conflicts resolved'), - self.trUtf8('Con&flicts resolved'), + self.tr('Conflicts resolved'), + self.tr('Con&flicts resolved'), 0, 0, self, 'subversion_resolve') - self.vcsResolveAct.setStatusTip(self.trUtf8( + self.vcsResolveAct.setStatusTip(self.tr( 'Mark all conflicts of the local project as resolved' )) - self.vcsResolveAct.setWhatsThis(self.trUtf8( + self.vcsResolveAct.setWhatsThis(self.tr( """<b>Conflicts resolved</b>""" """<p>This marks all conflicts of the local project as""" """ resolved.</p>""" @@ -325,13 +325,13 @@ self.actions.append(self.vcsResolveAct) self.vcsCleanupAct = E5Action( - self.trUtf8('Cleanup'), - self.trUtf8('Cleanu&p'), + self.tr('Cleanup'), + self.tr('Cleanu&p'), 0, 0, self, 'subversion_cleanup') - self.vcsCleanupAct.setStatusTip(self.trUtf8( + self.vcsCleanupAct.setStatusTip(self.tr( 'Cleanup the local project' )) - self.vcsCleanupAct.setWhatsThis(self.trUtf8( + self.vcsCleanupAct.setWhatsThis(self.tr( """<b>Cleanup</b>""" """<p>This performs a cleanup of the local project.</p>""" )) @@ -339,13 +339,13 @@ self.actions.append(self.vcsCleanupAct) self.vcsCommandAct = E5Action( - self.trUtf8('Execute command'), - self.trUtf8('E&xecute command...'), + self.tr('Execute command'), + self.tr('E&xecute command...'), 0, 0, self, 'subversion_command') - self.vcsCommandAct.setStatusTip(self.trUtf8( + self.vcsCommandAct.setStatusTip(self.tr( 'Execute an arbitrary VCS command' )) - self.vcsCommandAct.setWhatsThis(self.trUtf8( + self.vcsCommandAct.setWhatsThis(self.tr( """<b>Execute command</b>""" """<p>This opens a dialog to enter an arbitrary VCS command.</p>""" )) @@ -353,13 +353,13 @@ self.actions.append(self.vcsCommandAct) self.svnTagListAct = E5Action( - self.trUtf8('List tags'), - self.trUtf8('List tags...'), + self.tr('List tags'), + self.tr('List tags...'), 0, 0, self, 'subversion_list_tags') - self.svnTagListAct.setStatusTip(self.trUtf8( + self.svnTagListAct.setStatusTip(self.tr( 'List tags of the project' )) - self.svnTagListAct.setWhatsThis(self.trUtf8( + self.svnTagListAct.setWhatsThis(self.tr( """<b>List tags</b>""" """<p>This lists the tags of the project.</p>""" )) @@ -367,13 +367,13 @@ self.actions.append(self.svnTagListAct) self.svnBranchListAct = E5Action( - self.trUtf8('List branches'), - self.trUtf8('List branches...'), + self.tr('List branches'), + self.tr('List branches...'), 0, 0, self, 'subversion_list_branches') - self.svnBranchListAct.setStatusTip(self.trUtf8( + self.svnBranchListAct.setStatusTip(self.tr( 'List branches of the project' )) - self.svnBranchListAct.setWhatsThis(self.trUtf8( + self.svnBranchListAct.setWhatsThis(self.tr( """<b>List branches</b>""" """<p>This lists the branches of the project.</p>""" )) @@ -381,13 +381,13 @@ self.actions.append(self.svnBranchListAct) self.svnListAct = E5Action( - self.trUtf8('List repository contents'), - self.trUtf8('List repository contents...'), + self.tr('List repository contents'), + self.tr('List repository contents...'), 0, 0, self, 'subversion_contents') - self.svnListAct.setStatusTip(self.trUtf8( + self.svnListAct.setStatusTip(self.tr( 'Lists the contents of the repository' )) - self.svnListAct.setWhatsThis(self.trUtf8( + self.svnListAct.setWhatsThis(self.tr( """<b>List repository contents</b>""" """<p>This lists the contents of the repository.</p>""" )) @@ -395,13 +395,13 @@ self.actions.append(self.svnListAct) self.svnPropSetAct = E5Action( - self.trUtf8('Set Property'), - self.trUtf8('Set Property...'), + self.tr('Set Property'), + self.tr('Set Property...'), 0, 0, self, 'subversion_property_set') - self.svnPropSetAct.setStatusTip(self.trUtf8( + self.svnPropSetAct.setStatusTip(self.tr( 'Set a property for the project files' )) - self.svnPropSetAct.setWhatsThis(self.trUtf8( + self.svnPropSetAct.setWhatsThis(self.tr( """<b>Set Property</b>""" """<p>This sets a property for the project files.</p>""" )) @@ -409,13 +409,13 @@ self.actions.append(self.svnPropSetAct) self.svnPropListAct = E5Action( - self.trUtf8('List Properties'), - self.trUtf8('List Properties...'), + self.tr('List Properties'), + self.tr('List Properties...'), 0, 0, self, 'subversion_property_list') - self.svnPropListAct.setStatusTip(self.trUtf8( + self.svnPropListAct.setStatusTip(self.tr( 'List properties of the project files' )) - self.svnPropListAct.setWhatsThis(self.trUtf8( + self.svnPropListAct.setWhatsThis(self.tr( """<b>List Properties</b>""" """<p>This lists the properties of the project files.</p>""" )) @@ -423,13 +423,13 @@ self.actions.append(self.svnPropListAct) self.svnPropDelAct = E5Action( - self.trUtf8('Delete Property'), - self.trUtf8('Delete Property...'), + self.tr('Delete Property'), + self.tr('Delete Property...'), 0, 0, self, 'subversion_property_delete') - self.svnPropDelAct.setStatusTip(self.trUtf8( + self.svnPropDelAct.setStatusTip(self.tr( 'Delete a property for the project files' )) - self.svnPropDelAct.setWhatsThis(self.trUtf8( + self.svnPropDelAct.setWhatsThis(self.tr( """<b>Delete Property</b>""" """<p>This deletes a property for the project files.</p>""" )) @@ -437,14 +437,14 @@ self.actions.append(self.svnPropDelAct) self.svnRelocateAct = E5Action( - self.trUtf8('Relocate'), + self.tr('Relocate'), UI.PixmapCache.getIcon("vcsSwitch.png"), - self.trUtf8('Relocate...'), + self.tr('Relocate...'), 0, 0, self, 'subversion_relocate') - self.svnRelocateAct.setStatusTip(self.trUtf8( + self.svnRelocateAct.setStatusTip(self.tr( 'Relocate the working copy to a new repository URL' )) - self.svnRelocateAct.setWhatsThis(self.trUtf8( + self.svnRelocateAct.setWhatsThis(self.tr( """<b>Relocate</b>""" """<p>This relocates the working copy to a new repository""" """ URL.</p>""" @@ -453,14 +453,14 @@ self.actions.append(self.svnRelocateAct) self.svnRepoBrowserAct = E5Action( - self.trUtf8('Repository Browser'), + self.tr('Repository Browser'), UI.PixmapCache.getIcon("vcsRepoBrowser.png"), - self.trUtf8('Repository Browser...'), + self.tr('Repository Browser...'), 0, 0, self, 'subversion_repo_browser') - self.svnRepoBrowserAct.setStatusTip(self.trUtf8( + self.svnRepoBrowserAct.setStatusTip(self.tr( 'Show the Repository Browser dialog' )) - self.svnRepoBrowserAct.setWhatsThis(self.trUtf8( + self.svnRepoBrowserAct.setWhatsThis(self.tr( """<b>Repository Browser</b>""" """<p>This shows the Repository Browser dialog.</p>""" )) @@ -468,13 +468,13 @@ self.actions.append(self.svnRepoBrowserAct) self.svnConfigAct = E5Action( - self.trUtf8('Configure'), - self.trUtf8('Configure...'), + self.tr('Configure'), + self.tr('Configure...'), 0, 0, self, 'subversion_configure') - self.svnConfigAct.setStatusTip(self.trUtf8( + self.svnConfigAct.setStatusTip(self.tr( 'Show the configuration dialog with the Subversion page selected' )) - self.svnConfigAct.setWhatsThis(self.trUtf8( + self.svnConfigAct.setWhatsThis(self.tr( """<b>Configure</b>""" """<p>Show the configuration dialog with the Subversion page""" """ selected.</p>""" @@ -483,13 +483,13 @@ self.actions.append(self.svnConfigAct) self.svnUpgradeAct = E5Action( - self.trUtf8('Upgrade'), - self.trUtf8('Upgrade...'), + self.tr('Upgrade'), + self.tr('Upgrade...'), 0, 0, self, 'subversion_upgrade') - self.svnUpgradeAct.setStatusTip(self.trUtf8( + self.svnUpgradeAct.setStatusTip(self.tr( 'Upgrade the working copy to the current format' )) - self.svnUpgradeAct.setWhatsThis(self.trUtf8( + self.svnUpgradeAct.setWhatsThis(self.tr( """<b>Upgrade</b>""" """<p>Upgrades the working copy to the current format.</p>""" ))
--- a/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,7 +73,7 @@ self.cancelled = False self.filesLabel.setText( - self.trUtf8("Files (relative to {0}):").format(path)) + self.tr("Files (relative to {0}):").format(path)) QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) QApplication.processEvents() @@ -107,7 +107,7 @@ self.buttonBox.button(QDialogButtonBox.Close).setDefault(True) if len(self.changeListsDict) == 0: - self.changeLists.addItem(self.trUtf8("No changelists found")) + self.changeLists.addItem(self.tr("No changelists found")) self.buttonBox.button(QDialogButtonBox.Close).setFocus( Qt.OtherFocusReason) else:
--- a/Plugins/VcsPlugins/vcsPySvn/SvnCommandDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnCommandDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -18,6 +18,7 @@ import Utilities import UI.PixmapCache + class SvnCommandDialog(QDialog, Ui_SvnCommandDialog): """ Class implementing the Subversion command dialog. @@ -71,7 +72,7 @@ cwd = self.projectDirLabel.text() d = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Working directory"), + self.tr("Working directory"), cwd, E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Plugins/VcsPlugins/vcsPySvn/SvnCopyDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnCopyDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -47,7 +47,7 @@ self.targetCompleter = E5FileCompleter(self.targetEdit) if move: - self.setWindowTitle(self.trUtf8('Subversion Move')) + self.setWindowTitle(self.tr('Subversion Move')) else: self.forceCheckBox.setEnabled(False) self.forceCheckBox.setChecked(force) @@ -79,13 +79,13 @@ if os.path.isdir(self.source): target = E5FileDialog.getExistingDirectory( None, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) else: target = E5FileDialog.getSaveFileName( None, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,15 +73,15 @@ """ msg = "" if eventDict["action"] == pysvn.wc_notify_action.update_completed: - msg = self.trUtf8("Revision {0}.\n").format( + msg = self.tr("Revision {0}.\n").format( eventDict["revision"].number) elif eventDict["path"] != "" and \ eventDict["action"] in svnNotifyActionMap and \ svnNotifyActionMap[eventDict["action"]] is not None: mime = eventDict["mime_type"] == "application/octet-stream" and \ - self.trUtf8(" (binary)") or "" - msg = self.trUtf8("{0} {1}{2}\n")\ - .format(self.trUtf8(svnNotifyActionMap[eventDict["action"]]), + self.tr(" (binary)") or "" + msg = self.tr("{0} {1}{2}\n")\ + .format(self.tr(svnNotifyActionMap[eventDict["action"]]), eventDict["path"], mime) if '.e4p' in eventDict["path"]:
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDialogMixin.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnDialogMixin.py Sat Jan 11 11:55:33 2014 +0100 @@ -94,16 +94,16 @@ parent = isinstance(self, QWidget) and self or None msgBox = E5MessageBox.E5MessageBox( E5MessageBox.Question, - self.trUtf8("Subversion SSL Server Certificate"), - self.trUtf8("""<p>Accept the following SSL certificate?</p>""" - """<table>""" - """<tr><td>Realm:</td><td>{0}</td></tr>""" - """<tr><td>Hostname:</td><td>{1}</td></tr>""" - """<tr><td>Fingerprint:</td><td>{2}</td></tr>""" - """<tr><td>Valid from:</td><td>{3}</td></tr>""" - """<tr><td>Valid until:</td><td>{4}</td></tr>""" - """<tr><td>Issuer name:</td><td>{5}</td></tr>""" - """</table>""") + self.tr("Subversion SSL Server Certificate"), + self.tr("""<p>Accept the following SSL certificate?</p>""" + """<table>""" + """<tr><td>Realm:</td><td>{0}</td></tr>""" + """<tr><td>Hostname:</td><td>{1}</td></tr>""" + """<tr><td>Fingerprint:</td><td>{2}</td></tr>""" + """<tr><td>Valid from:</td><td>{3}</td></tr>""" + """<tr><td>Valid until:</td><td>{4}</td></tr>""" + """<tr><td>Issuer name:</td><td>{5}</td></tr>""" + """</table>""") .format(trust_dict["realm"], trust_dict["hostname"], trust_dict["finger_print"], @@ -111,11 +111,11 @@ trust_dict["valid_until"], trust_dict["issuer_dname"]), modal=True, parent=parent) - permButton = msgBox.addButton(self.trUtf8("&Permanent accept"), + permButton = msgBox.addButton(self.tr("&Permanent accept"), E5MessageBox.AcceptRole) - tempButton = msgBox.addButton(self.trUtf8("&Temporary accept"), + tempButton = msgBox.addButton(self.tr("&Temporary accept"), E5MessageBox.AcceptRole) - msgBox.addButton(self.trUtf8("&Reject"), E5MessageBox.RejectRole) + msgBox.addButton(self.tr("&Reject"), E5MessageBox.RejectRole) msgBox.exec_() if cursor is not None: QApplication.setOverrideCursor(cursor)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -160,8 +160,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Subversion Diff"), - self.trUtf8("""There is no temporary directory available.""")) + self.tr("Subversion Diff"), + self.tr("""There is no temporary directory available.""")) return tmpdir = os.path.join(tmpdir, 'svn_tmp') @@ -202,7 +202,7 @@ dname += "/" for name in fnames: self.__showError( - self.trUtf8("Processing file '{0}'...\n").format(name)) + self.tr("Processing file '{0}'...\n").format(name)) if urls is not None: url1 = "{0}/{1}{2}".format(urls[0], dname, name) url2 = "{0}/{1}{2}".format(urls[1], dname, name) @@ -258,7 +258,7 @@ if self.paras == 0: self.contents.insertPlainText( - self.trUtf8('There is no difference.')) + self.tr('There is no difference.')) return self.buttonBox.button(QDialogButtonBox.Save).setEnabled(True) @@ -327,8 +327,8 @@ self.contents.setTextCursor(tc) self.contents.ensureCursorVisible() - self.filesCombo.addItem(self.trUtf8("<Start>"), 0) - self.filesCombo.addItem(self.trUtf8("<End>"), -1) + self.filesCombo.addItem(self.tr("<Start>"), 0) + self.filesCombo.addItem(self.tr("<End>"), -1) for oldFile, newFile, pos in sorted(self.__fileSeparators): if oldFile != newFile: self.filesCombo.addItem( @@ -407,9 +407,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diff"), + self.tr("Save Diff"), fname, - self.trUtf8("Patch Files (*.diff)"), + self.tr("Patch Files (*.diff)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -424,9 +424,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diff"), - self.trUtf8("<p>The patch file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diff"), + self.tr("<p>The patch file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -439,8 +439,8 @@ f.close() except IOError as why: E5MessageBox.critical( - self, self.trUtf8('Save Diff'), - self.trUtf8( + self, self.tr('Save Diff'), + self.tr( '<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why)))
--- a/Plugins/VcsPlugins/vcsPySvn/SvnInfoDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnInfoDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -63,109 +63,109 @@ entries = self.client.info2(fn, recurse=False) infoStr = "<table>" for path, info in entries: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Path (relative to project):</b></td>" "<td>{0}</td></tr>").format(path) if info['URL']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Url:</b></td><td>{0}</td></tr>")\ .format(info['URL']) if info['rev']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Revision:</b></td><td>{0}</td></tr>")\ .format(info['rev'].number) if info['repos_root_URL']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Repository root URL:</b></td>" "<td>{0}</td></tr>").format(info['repos_root_URL']) if info['repos_UUID']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Repository UUID:</b></td>" "<td>{0}</td></tr>").format(info['repos_UUID']) if info['last_changed_author']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Last changed author:</b></td>" "<td>{0}</td></tr>")\ .format(info['last_changed_author']) if info['last_changed_date']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Last Changed Date:</b></td>" "<td>{0}</td></tr>")\ .format(formatTime(info['last_changed_date'])) if info['last_changed_rev'] and \ info['last_changed_rev'].kind == \ pysvn.opt_revision_kind.number: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Last changed revision:</b></td>" "<td>{0}</td></tr>")\ .format(info['last_changed_rev'].number) if info['kind']: if info['kind'] == pysvn.node_kind.file: - nodeKind = self.trUtf8("file") + nodeKind = self.tr("file") elif info['kind'] == pysvn.node_kind.dir: - nodeKind = self.trUtf8("directory") + nodeKind = self.tr("directory") elif info['kind'] == pysvn.node_kind.none: - nodeKind = self.trUtf8("none") + nodeKind = self.tr("none") else: - nodeKind = self.trUtf8("unknown") - infoStr += self.trUtf8( + nodeKind = self.tr("unknown") + infoStr += self.tr( "<tr><td><b>Node kind:</b></td><td>{0}</td></tr>")\ .format(nodeKind) if info['lock']: lockInfo = info['lock'] - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Lock Owner:</b></td><td>{0}</td></tr>")\ .format(lockInfo['owner']) - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Lock Creation Date:</b></td>" "<td>{0}</td></tr>")\ .format(formatTime(lockInfo['creation_date'])) if lockInfo['expiration_date'] is not None: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Lock Expiration Date:</b></td>" "<td>{0}</td></tr>")\ .format(formatTime(lockInfo['expiration_date'])) - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Lock Token:</b></td><td>{0}</td></tr>")\ .format(lockInfo['token']) - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Lock Comment:</b></td><td>{0}</td></tr>")\ .format(lockInfo['comment']) if info['wc_info']: wcInfo = info['wc_info'] if wcInfo['schedule']: if wcInfo['schedule'] == pysvn.wc_schedule.normal: - schedule = self.trUtf8("normal") + schedule = self.tr("normal") elif wcInfo['schedule'] == pysvn.wc_schedule.add: - schedule = self.trUtf8("add") + schedule = self.tr("add") elif wcInfo['schedule'] == pysvn.wc_schedule.delete: - schedule = self.trUtf8("delete") + schedule = self.tr("delete") elif wcInfo['schedule'] == pysvn.wc_schedule.replace: - schedule = self.trUtf8("replace") - infoStr += self.trUtf8( + schedule = self.tr("replace") + infoStr += self.tr( "<tr><td><b>Schedule:</b></td><td>{0}</td></tr>")\ .format(schedule) if wcInfo['copyfrom_url']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Copied From URL:</b></td>" "<td>{0}</td></tr>")\ .format(wcInfo['copyfrom_url']) - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Copied From Rev:</b></td>" "<td>{0}</td></tr>")\ .format(wcInfo['copyfrom_rev'].number) if wcInfo['text_time']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Text Last Updated:</b></td>" "<td>{0}</td></tr>")\ .format(formatTime(wcInfo['text_time'])) if wcInfo['prop_time']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Properties Last Updated:</b></td>" "<td>{0}</td></tr>")\ .format(formatTime(wcInfo['prop_time'])) if wcInfo['checksum']: - infoStr += self.trUtf8( + infoStr += self.tr( "<tr><td><b>Checksum:</b></td><td>{0}</td></tr>")\ .format(wcInfo['checksum']) infoStr += "</table>"
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -59,7 +59,7 @@ self.fromDate.setDate(QDate.currentDate()) self.toDate.setDate(QDate.currentDate()) self.fieldCombo.setCurrentIndex( - self.fieldCombo.findText(self.trUtf8("Message"))) + self.fieldCombo.findText(self.tr("Message"))) self.limitSpinBox.setValue( self.vcs.getPlugin().getPreferences("LogLimit")) self.stopCheckBox.setChecked( @@ -69,10 +69,10 @@ self.__changesRole = Qt.UserRole + 1 self.flags = { - 'A': self.trUtf8('Added'), - 'D': self.trUtf8('Deleted'), - 'M': self.trUtf8('Modified'), - 'R': self.trUtf8('Replaced'), + 'A': self.tr('Added'), + 'D': self.tr('Deleted'), + 'M': self.tr('Modified'), + 'R': self.tr('Replaced'), } self.diff = None @@ -447,7 +447,7 @@ """ E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), + self.tr("Subversion Error"), msg) @pyqtSlot(QDate) @@ -494,10 +494,10 @@ from_ = self.fromDate.date().toString("yyyy-MM-dd") to_ = self.toDate.date().addDays(1).toString("yyyy-MM-dd") txt = self.fieldCombo.currentText() - if txt == self.trUtf8("Author"): + if txt == self.tr("Author"): fieldIndex = 1 searchRx = QRegExp(self.rxEdit.text(), Qt.CaseInsensitive) - elif txt == self.trUtf8("Revision"): + elif txt == self.tr("Revision"): fieldIndex = 0 txt = self.rxEdit.text() if txt.startswith("^"):
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLogDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -48,17 +48,17 @@ self.vcs = vcs self.contents.setHtml( - self.trUtf8('<b>Processing your request, please wait...</b>')) + self.tr('<b>Processing your request, please wait...</b>')) self.contents.anchorClicked.connect(self.__sourceChanged) self.flags = { - 'A': self.trUtf8('Added'), - 'D': self.trUtf8('Deleted'), - 'M': self.trUtf8('Modified') + 'A': self.tr('Added'), + 'D': self.tr('Deleted'), + 'M': self.tr('Modified') } - self.revString = self.trUtf8('revision') + self.revString = self.tr('revision') self.diff = None self.sbsCheckBox.setEnabled(isFile) @@ -142,18 +142,18 @@ url.setEncodedQuery(query) dstr += ' [<a href="{0}" name="{1}">{2}</a>]'.format( url.toString(), query, - self.trUtf8('diff to {0}').format(lv) + self.tr('diff to {0}').format(lv) ) except IndexError: pass dstr += '<br />\n' self.contents.insertHtml(dstr) - dstr = self.trUtf8('<i>author: {0}</i><br />\n')\ + dstr = self.tr('<i>author: {0}</i><br />\n')\ .format(log["author"]) self.contents.insertHtml(dstr) - dstr = self.trUtf8('<i>date: {0}</i><br />\n')\ + dstr = self.tr('<i>date: {0}</i><br />\n')\ .format(formatTime(log["date"])) self.contents.insertHtml(dstr) @@ -170,7 +170,7 @@ .format(self.flags[changeInfo["action"]], changeInfo["path"]) if changeInfo["copyfrom_path"] is not None: - dstr += self.trUtf8( + dstr += self.tr( " (copied from {0}, revision {1})")\ .format(changeInfo["copyfrom_path"], changeInfo["copyfrom_revision"].number)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnLoginDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnLoginDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -30,7 +30,7 @@ self.setupUi(self) self.realmLabel.setText( - self.trUtf8("<b>Enter login data for realm {0}.</b>") + self.tr("<b>Enter login data for realm {0}.</b>") .format(realm)) self.usernameEdit.setText(username) self.saveCheckBox.setEnabled(may_save)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -23,6 +23,7 @@ import Preferences import UI.PixmapCache + class SvnNewProjectOptionsDialog(QDialog, Ui_SvnNewProjectOptionsDialog): """ Class implementing the Options Dialog for a new project from the @@ -68,7 +69,7 @@ if self.protocolCombo.currentText() == "file://": directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Repository-Directory"), + self.tr("Select Repository-Directory"), self.vcsUrlEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -96,7 +97,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Project Directory"), + self.tr("Select Project Directory"), self.vcsProjectDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -125,13 +126,13 @@ if protocol == "file://": self.networkPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.localPath) - self.vcsUrlLabel.setText(self.trUtf8("Pat&h:")) + self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: self.localPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.networkPath) - self.vcsUrlLabel.setText(self.trUtf8("&URL:")) + self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnOptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,7 +65,7 @@ if self.protocolCombo.currentText() == "file://": directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Repository-Directory"), + self.tr("Select Repository-Directory"), self.vcsUrlEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -96,13 +96,13 @@ if protocol == "file://": self.networkPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.localPath) - self.vcsUrlLabel.setText(self.trUtf8("Pat&h:")) + self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: self.localPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.networkPath) - self.vcsUrlLabel.setText(self.trUtf8("&URL:")) + self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str)
--- a/Plugins/VcsPlugins/vcsPySvn/SvnPropListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnPropListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -125,7 +125,7 @@ button. """ if not self.propsFound: - self.__generateItem("", self.trUtf8("None"), "") + self.__generateItem("", self.tr("None"), "") self.__resort() self.__resizeColumns()
--- a/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -198,8 +198,8 @@ self.__showError(e.args[0]) except AttributeError: self.__showError( - self.trUtf8("The installed version of PySvn should be " - "1.4.0 or better.")) + self.tr("The installed version of PySvn should be " + "1.4.0 or better.")) finally: locker.unlock() QApplication.restoreOverrideCursor() @@ -275,7 +275,7 @@ """ E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), + self.tr("Subversion Error"), msg) def accept(self):
--- a/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,10 +57,10 @@ self.__lastColumn = self.statusList.columnCount() self.refreshButton = \ - self.buttonBox.addButton(self.trUtf8("Refresh"), + self.buttonBox.addButton(self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the status display")) + self.tr("Press to refresh the status display")) self.refreshButton.setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -78,44 +78,44 @@ self.menuactions = [] self.menu = QMenu() self.menuactions.append(self.menu.addAction( - self.trUtf8("Commit changes to repository..."), self.__commit)) + self.tr("Commit changes to repository..."), self.__commit)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Select all for commit"), self.__commitSelectAll)) + self.tr("Select all for commit"), self.__commitSelectAll)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Deselect all from commit"), self.__commitDeselectAll)) + self.tr("Deselect all from commit"), self.__commitDeselectAll)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Add to repository"), self.__add)) + self.tr("Add to repository"), self.__add)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences"), self.__diff)) + self.tr("Show differences"), self.__diff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences side-by-side"), self.__sbsDiff)) + self.tr("Show differences side-by-side"), self.__sbsDiff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Revert changes"), self.__revert)) + self.tr("Revert changes"), self.__revert)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Restore missing"), self.__restoreMissing)) + self.tr("Restore missing"), self.__restoreMissing)) if pysvn.svn_version >= (1, 5, 0) and pysvn.version >= (1, 6, 0): self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Add to Changelist"), self.__addToChangelist)) + self.tr("Add to Changelist"), self.__addToChangelist)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__removeFromChangelist)) if self.vcs.version >= (1, 2, 0): self.menu.addSeparator() self.menuactions.append( - self.menu.addAction(self.trUtf8("Lock"), self.__lock)) + self.menu.addAction(self.tr("Lock"), self.__lock)) self.menuactions.append( - self.menu.addAction(self.trUtf8("Unlock"), self.__unlock)) + self.menu.addAction(self.tr("Unlock"), self.__unlock)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Break lock"), + self.tr("Break lock"), self.__breakLock)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Steal lock"), + self.tr("Steal lock"), self.__stealLock)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Adjust column sizes"), + self.tr("Adjust column sizes"), self.__resizeColumns)) for act in self.menuactions: act.setEnabled(False) @@ -125,43 +125,43 @@ self.__showContextMenu) self.modifiedIndicators = [ - self.trUtf8(svnStatusMap[pysvn.wc_status_kind.added]), - self.trUtf8(svnStatusMap[pysvn.wc_status_kind.deleted]), - self.trUtf8(svnStatusMap[pysvn.wc_status_kind.modified]) + self.tr(svnStatusMap[pysvn.wc_status_kind.added]), + self.tr(svnStatusMap[pysvn.wc_status_kind.deleted]), + self.tr(svnStatusMap[pysvn.wc_status_kind.modified]) ] self.missingIndicators = [ - self.trUtf8(svnStatusMap[pysvn.wc_status_kind.missing]), + self.tr(svnStatusMap[pysvn.wc_status_kind.missing]), ] self.unversionedIndicators = [ - self.trUtf8(svnStatusMap[pysvn.wc_status_kind.unversioned]), + self.tr(svnStatusMap[pysvn.wc_status_kind.unversioned]), ] self.lockedIndicators = [ - self.trUtf8('locked'), + self.tr('locked'), ] self.stealBreakLockIndicators = [ - self.trUtf8('other lock'), - self.trUtf8('stolen lock'), - self.trUtf8('broken lock'), + self.tr('other lock'), + self.tr('stolen lock'), + self.tr('broken lock'), ] self.unlockedIndicators = [ - self.trUtf8('not locked'), + self.tr('not locked'), ] self.lockinfo = { - ' ': self.trUtf8('not locked'), - 'L': self.trUtf8('locked'), - 'O': self.trUtf8('other lock'), - 'S': self.trUtf8('stolen lock'), - 'B': self.trUtf8('broken lock'), + ' ': self.tr('not locked'), + 'L': self.tr('locked'), + 'O': self.tr('other lock'), + 'S': self.tr('stolen lock'), + 'B': self.tr('broken lock'), } self.yesno = [ - self.trUtf8('no'), - self.trUtf8('yes'), + self.tr('no'), + self.tr('yes'), ] self.client = self.vcs.getClient() @@ -209,12 +209,12 @@ @param author author of the last change (string) @param path path of the file or directory (string) """ - statusText = self.trUtf8(svnStatusMap[status]) + statusText = self.tr(svnStatusMap[status]) itm = QTreeWidgetItem(self.statusList) itm.setData(0, Qt.DisplayRole, "") itm.setData(1, Qt.DisplayRole, changelist) itm.setData(2, Qt.DisplayRole, statusText) - itm.setData(3, Qt.DisplayRole, self.trUtf8(svnStatusMap[propStatus])) + itm.setData(3, Qt.DisplayRole, self.tr(svnStatusMap[propStatus])) itm.setData(4, Qt.DisplayRole, self.yesno[locked]) itm.setData(5, Qt.DisplayRole, self.yesno[history]) itm.setData(6, Qt.DisplayRole, self.yesno[switched]) @@ -279,7 +279,7 @@ self.args = fn - self.setWindowTitle(self.trUtf8('Subversion Status')) + self.setWindowTitle(self.tr('Subversion Status')) self.activateWindow() self.raise_() @@ -432,7 +432,7 @@ self.__updateCommitButton() self.__statusFilters.sort() - self.__statusFilters.insert(0, "<{0}>".format(self.trUtf8("all"))) + self.__statusFilters.insert(0, "<{0}>".format(self.tr("all"))) self.statusFilterCombo.addItems(self.__statusFilters) for act in self.menuactions: @@ -510,7 +510,7 @@ @param txt selected status filter (string) """ - if txt == "<{0}>".format(self.trUtf8("all")): + if txt == "<{0}>".format(self.tr("all")): for topIndex in range(self.statusList.topLevelItemCount()): topItem = self.statusList.topLevelItem(topIndex) topItem.setHidden(False) @@ -600,9 +600,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Commit"), - self.trUtf8("""There are no entries selected to be""" - """ committed.""")) + self.tr("Commit"), + self.tr("""There are no entries selected to be""" + """ committed.""")) return if Preferences.getVCS("AutoSaveFiles"): @@ -640,9 +640,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Add"), - self.trUtf8("""There are no unversioned entries""" - """ available/selected.""")) + self.tr("Add"), + self.tr("""There are no unversioned entries""" + """ available/selected.""")) return self.vcs.vcsAdd(names) @@ -662,9 +662,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return self.vcs.vcsRevert(names) @@ -686,9 +686,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no missing entries""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no missing entries""" + """ available/selected.""")) return self.vcs.vcsRevert(names) @@ -704,9 +704,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Differences"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Differences"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return if self.diff is None: @@ -725,16 +725,16 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return elif len(names) > 1: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""Only one file with uncommitted changes""" - """ must be selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""Only one file with uncommitted changes""" + """ must be selected.""")) return self.vcs.svnSbsDiff(names[0]) @@ -748,9 +748,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Lock"), - self.trUtf8("""There are no unlocked files""" - """ available/selected.""")) + self.tr("Lock"), + self.tr("""There are no unlocked files""" + """ available/selected.""")) return self.vcs.svnLock(names, parent=self) @@ -765,9 +765,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Unlock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Unlock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnUnlock(names, parent=self) @@ -783,9 +783,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Break Lock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Break Lock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnUnlock(names, parent=self, breakIt=True) @@ -801,9 +801,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Steal Lock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Steal Lock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnLock(names, parent=self, stealIt=True) @@ -818,8 +818,8 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Remove from Changelist"), - self.trUtf8( + self.tr("Remove from Changelist"), + self.tr( """There are no files available/selected not """ """belonging to a changelist.""" ) @@ -837,8 +837,8 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Remove from Changelist"), - self.trUtf8( + self.tr("Remove from Changelist"), + self.tr( """There are no files available/selected belonging""" """ to a changelist.""" )
--- a/Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py Sat Jan 11 11:55:33 2014 +0100 @@ -110,7 +110,7 @@ self.statusList.append(" {0}".format(name)) self.reportedStates = states res = True - statusStr = self.trUtf8( + statusStr = self.tr( "Subversion status checked successfully (using pysvn)") except pysvn.ClientError as e: res = False
--- a/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -67,7 +67,7 @@ self.errorGroup.hide() if not tags: - self.setWindowTitle(self.trUtf8("Subversion Branches List")) + self.setWindowTitle(self.tr("Subversion Branches List")) self.activateWindow() QApplication.processEvents() @@ -77,8 +77,8 @@ if reposURL is None: E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The list operation""" """ will be aborted""")) @@ -91,8 +91,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The list operation will""" """ be aborted""")) @@ -107,9 +107,9 @@ else: reposPath, ok = QInputDialog.getText( self, - self.trUtf8("Subversion List"), - self.trUtf8("Enter the repository URL containing the" - " tags or branches"), + self.tr("Subversion List"), + self.tr("Enter the repository URL containing the" + " tags or branches"), QLineEdit.Normal, self.vcs.svnNormalizeURL(reposURL)) if not ok: @@ -118,8 +118,8 @@ if not reposPath: E5MessageBox.critical( self, - self.trUtf8("Subversion List"), - self.trUtf8( + self.tr("Subversion List"), + self.tr( """The repository URL is empty. Aborting...""")) self.close() return False @@ -150,8 +150,8 @@ res = False except AttributeError: self.__showError( - self.trUtf8("The installed version of PySvn should be" - " 1.4.0 or better.")) + self.tr("The installed version of PySvn should be" + " 1.4.0 or better.")) res = False locker.unlock() self.__finish()
--- a/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,8 +52,8 @@ if reposURL is None: E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The operation will""" """ be aborted""")) @@ -66,8 +66,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The operation will""" """ be aborted"""))
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py Sat Jan 11 11:55:33 2014 +0100 @@ -199,8 +199,8 @@ if not success: E5MessageBox.critical( self.__ui, - self.trUtf8("Create project in repository"), - self.trUtf8( + self.tr("Create project in repository"), + self.tr( """The project could not be created in the repository.""" """ Maybe the given repository doesn't exist or the""" """ repository server is down.""")) @@ -223,8 +223,8 @@ if not os.path.isfile(pfn): E5MessageBox.critical( self.__ui, - self.trUtf8("New project"), - self.trUtf8( + self.tr("New project"), + self.tr( """The project could not be checked out of the""" """ repository.<br />""" """Restoring the original contents.""")) @@ -295,7 +295,7 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Importing project into Subversion repository'), + self.tr('Importing project into Subversion repository'), "import{0} --message {1} .".format( (not recurse) and " --non-recursive" or "", msg), client) @@ -310,7 +310,7 @@ dlg.showError(e.args[0]) locker.unlock() if not noDialog: - rev and dlg.showMessage(self.trUtf8("Imported revision {0}.\n") + rev and dlg.showMessage(self.tr("Imported revision {0}.\n") .format(rev.number)) dlg.finish() dlg.exec_() @@ -348,8 +348,8 @@ not tag.startswith('branches'): type_, ok = QInputDialog.getItem( None, - self.trUtf8("Subversion Checkout"), - self.trUtf8( + self.tr("Subversion Checkout"), + self.tr( "The tag must be a normal tag (tags) or" " a branch tag (branches)." " Please select from the list."), @@ -368,7 +368,7 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Checking project out of Subversion repository'), + self.tr('Checking project out of Subversion repository'), "checkout{0} {1} {2}".format( (not recurse) and " --non-recursive" or "", url, projectDir), @@ -413,8 +413,8 @@ not tag.startswith('branches'): type_, ok = QInputDialog.getItem( None, - self.trUtf8("Subversion Export"), - self.trUtf8( + self.tr("Subversion Export"), + self.tr( "The tag must be a normal tag (tags) or" " a branch tag (branches)." " Please select from the list."), @@ -432,7 +432,7 @@ url = self.__svnURL(svnUrl) client = self.getClient() dlg = SvnDialog( - self.trUtf8('Exporting project from Subversion repository'), + self.tr('Exporting project from Subversion repository'), "export --force{0} {1} {2}".format( (not recurse) and " --non-recursive" or "", url, projectDir), @@ -513,8 +513,8 @@ if not ok: res = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Commit Changes"), - self.trUtf8( + self.tr("Commit Changes"), + self.tr( """The commit affects files, that have unsaved""" """ changes. Shall the commit be continued?"""), icon=E5MessageBox.Warning) @@ -555,7 +555,7 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Commiting changes to Subversion repository'), + self.tr('Commiting changes to Subversion repository'), "commit{0}{1}{2}{3} --message {4} {5}".format( (not recurse) and " --non-recursive" or "", keeplocks and " --keep-locks" or "", @@ -580,7 +580,7 @@ dlg.showError(e.args[0]) locker.unlock() if not noDialog: - rev and dlg.showMessage(self.trUtf8("Committed revision {0}.") + rev and dlg.showMessage(self.tr("Committed revision {0}.") .format(rev.number)) dlg.finish() dlg.exec_() @@ -613,7 +613,7 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Synchronizing with the Subversion repository'), + self.tr('Synchronizing with the Subversion repository'), "update{0} {1}".format( (not recurse) and " --non-recursive" or "", " ".join(fnames)), @@ -721,8 +721,8 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Adding files/directories to the Subversion' - ' repository'), + self.tr('Adding files/directories to the Subversion' + ' repository'), "add --non-recursive{0}{1} {2}".format( force and " --force" or "", noignore and " --no-ignore" or "", @@ -829,7 +829,7 @@ ignore = "--ignore" in opts client = self.getClient() dlg = SvnDialog( - self.trUtf8('Adding directory trees to the Subversion repository'), + self.tr('Adding directory trees to the Subversion repository'), "add{0}{1} {2}".format( force and " --force" or "", ignore and " --ignore" or "", @@ -866,8 +866,8 @@ client = self.getClient() if not noDialog: dlg = SvnDialog( - self.trUtf8('Removing files/directories from the Subversion' - ' repository'), + self.tr('Removing files/directories from the Subversion' + ' repository'), "remove{0} {1}".format( force and " --force" or "", " ".join(name)), @@ -930,7 +930,7 @@ if not noDialog: dlg = \ SvnDialog( - self.trUtf8('Moving {0}').format(name), + self.tr('Moving {0}').format(name), "move{0}{1} {2} {3}".format( force and " --force" or "", log and (" --message {0}".format(log)) or "", @@ -972,8 +972,8 @@ isFile = os.path.isfile(name) noEntries, ok = QInputDialog.getInt( None, - self.trUtf8("Subversion Log"), - self.trUtf8("Select number of entries to show."), + self.tr("Subversion Log"), + self.tr("Select number of entries to show."), self.getPlugin().getPreferences("LogLimit"), 1, 999999, 1) if ok: from .SvnLogDialog import SvnLogDialog @@ -1040,8 +1040,8 @@ if reposURL is None: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The tag operation""" """ will be aborted""")) @@ -1067,8 +1067,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The tag operation will""" """ be aborted""")) @@ -1089,7 +1089,7 @@ if tagOp in [1, 2]: log = 'Created tag <{0}>'.format(self.tagName) dlg = SvnDialog( - self.trUtf8('Tagging {0} in the Subversion repository') + self.tr('Tagging {0} in the Subversion repository') .format(name), "copy --message {0} {1} {2}".format(log, reposURL, url), client, log=log) @@ -1103,7 +1103,7 @@ else: log = 'Deleted tag <{0}>'.format(self.tagName) dlg = SvnDialog( - self.trUtf8('Tagging {0} in the Subversion repository') + self.tr('Tagging {0} in the Subversion repository') .format(name), "remove --message {0} {1}".format(log, url), client, log=log) @@ -1115,7 +1115,7 @@ dlg.showError(e.args[0]) locker.unlock() rev and dlg.showMessage( - self.trUtf8("Revision {0}.\n").format(rev.number)) + self.tr("Revision {0}.\n").format(rev.number)) dlg.finish() dlg.exec_() @@ -1138,8 +1138,8 @@ DeleteFilesConfirmationDialog dia = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Revert changes"), - self.trUtf8( + self.tr("Revert changes"), + self.tr( "Do you really want to revert all changes to these files" " or directories?"), name) @@ -1147,13 +1147,13 @@ else: yes = E5MessageBox.yesNo( None, - self.trUtf8("Revert changes"), - self.trUtf8("""Do you really want to revert all changes of""" - """ the project?""")) + self.tr("Revert changes"), + self.tr("""Do you really want to revert all changes of""" + """ the project?""")) if yes: client = self.getClient() dlg = SvnDialog( - self.trUtf8('Reverting changes'), + self.tr('Reverting changes'), "revert {0} {1}".format( (not recurse) and " --non-recursive" or "", " ".join(name)), @@ -1183,8 +1183,8 @@ if reposURL is None: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The switch""" """ operation will be aborted""")) @@ -1210,8 +1210,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The switch operation will""" """ be aborted""")) @@ -1232,14 +1232,14 @@ tn = url client = self.getClient() - dlg = SvnDialog(self.trUtf8('Switching to {0}').format(tn), + dlg = SvnDialog(self.tr('Switching to {0}').format(tn), "switch {0} {1}".format(url, name), client) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: rev = client.switch(name, url) - dlg.showMessage(self.trUtf8("Revision {0}.\n").format(rev.number)) + dlg.showMessage(self.tr("Revision {0}.\n").format(rev.number)) except pysvn.ClientError as e: dlg.showError(e.args[0]) locker.unlock() @@ -1336,7 +1336,7 @@ client = self.getClient() dlg = \ SvnDialog( - self.trUtf8('Merging {0}').format(name), + self.tr('Merging {0}').format(name), "merge{0}{1} {2} {3} {4}".format( (not recurse) and " --non-recursive" or "", force and " --force" or "", @@ -1634,7 +1634,7 @@ @param name directory name to be cleaned up (string) """ client = self.getClient() - dlg = SvnDialog(self.trUtf8('Cleaning up {0}').format(name), + dlg = SvnDialog(self.tr('Cleaning up {0}').format(name), "cleanup {0}".format(name), client) QApplication.processEvents() @@ -1673,7 +1673,7 @@ from Plugins.VcsPlugins.vcsSubversion.SvnDialog import \ SvnDialog as SvnProcessDialog - dia = SvnProcessDialog(self.trUtf8('Subversion command')) + dia = SvnProcessDialog(self.tr('Subversion command')) res = dia.startProcess(args, wd) if res: dia.exec_() @@ -1790,7 +1790,7 @@ opts = self.options['global'] recurse = "--non-recursive" not in opts client = self.getClient() - dlg = SvnDialog(self.trUtf8('Resolving conficts'), + dlg = SvnDialog(self.tr('Resolving conficts'), "resolved{0} {1}".format( (not recurse) and " --non-recursive" or "", " ".join(fnames)), @@ -1831,7 +1831,7 @@ target = target dlg = \ SvnDialog( - self.trUtf8('Copying {0}').format(name), + self.tr('Copying {0}').format(name), "copy{0} {1} {2}".format( log and (" --message {0}".format(log)) or "", name, target), @@ -1883,8 +1883,8 @@ if not propName: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Set Property"), - self.trUtf8( + self.tr("Subversion Set Property"), + self.tr( """You have to supply a property name. Aborting.""")) return @@ -1902,7 +1902,7 @@ client = self.getClient() dlg = \ SvnDialog( - self.trUtf8('Subversion Set Property'), + self.tr('Subversion Set Property'), "propset{0}{1} {2} {3} {4}".format( recurse and " --recurse" or "", skipchecks and " --skip-checks" or "", @@ -1917,7 +1917,7 @@ except pysvn.ClientError as e: dlg.showError(e.args[0]) locker.unlock() - dlg.showMessage(self.trUtf8("Property set.")) + dlg.showMessage(self.tr("Property set.")) dlg.finish() dlg.exec_() os.chdir(cwd) @@ -1937,8 +1937,8 @@ if not propName: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Delete Property"), - self.trUtf8( + self.tr("Subversion Delete Property"), + self.tr( """You have to supply a property name. Aborting.""")) return @@ -1956,7 +1956,7 @@ client = self.getClient() dlg = \ SvnDialog( - self.trUtf8('Subversion Delete Property'), + self.tr('Subversion Delete Property'), "propdel{0}{1} {2} {3}".format( recurse and " --recurse" or "", skipchecks and " --skip-checks" or "", @@ -1970,7 +1970,7 @@ except pysvn.ClientError as e: dlg.showError(e.args[0]) locker.unlock() - dlg.showMessage(self.trUtf8("Property deleted.")) + dlg.showMessage(self.tr("Property deleted.")) dlg.finish() dlg.exec_() os.chdir(cwd) @@ -2166,7 +2166,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), + self.tr("Subversion Side-by-Side Difference"), error) return name1 = "{0} (rev. {1})".format(name, rev1 and rev1 or ".") @@ -2176,7 +2176,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), + self.tr("Subversion Side-by-Side Difference"), error) return name2 = "{0} (rev. {1})".format(name, rev2) @@ -2189,8 +2189,8 @@ except IOError: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), - self.trUtf8( + self.tr("Subversion Side-by-Side Difference"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(name)) return @@ -2227,8 +2227,8 @@ """ comment, ok = QInputDialog.getText( None, - self.trUtf8("Subversion Lock"), - self.trUtf8("Enter lock comment"), + self.tr("Subversion Lock"), + self.tr("Enter lock comment"), QLineEdit.Normal) if not ok: @@ -2246,7 +2246,7 @@ client = self.getClient() dlg = \ SvnDialog( - self.trUtf8('Locking in the Subversion repository'), + self.tr('Locking in the Subversion repository'), "lock{0}{1} {2}".format( stealIt and " --force" or "", comment and (" --message {0}".format(comment)) or "", @@ -2286,7 +2286,7 @@ client = self.getClient() dlg = \ SvnDialog( - self.trUtf8('Unlocking in the Subversion repository'), + self.tr('Unlocking in the Subversion repository'), "unlock{0} {1}".format( breakIt and " --force" or "", " ".join(fnames)), @@ -2333,7 +2333,7 @@ projectPath) client = self.getClient() dlg = \ - SvnDialog(self.trUtf8('Relocating'), msg, client) + SvnDialog(self.tr('Relocating'), msg, client) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -2361,8 +2361,8 @@ if url is None: url, ok = QInputDialog.getText( None, - self.trUtf8("Repository Browser"), - self.trUtf8("Enter the repository URL."), + self.tr("Repository Browser"), + self.tr("Enter the repository URL."), QLineEdit.Normal) if not ok or not url: return @@ -2384,7 +2384,7 @@ names = [names] client = self.getClient() dlg = \ - SvnDialog(self.trUtf8('Remove from changelist'), + SvnDialog(self.tr('Remove from changelist'), "changelist --remove {0}".format(" ".join(names)), client) QApplication.processEvents() @@ -2412,8 +2412,8 @@ clname, ok = QInputDialog.getItem( None, - self.trUtf8("Add to changelist"), - self.trUtf8("Enter name of the changelist:"), + self.tr("Add to changelist"), + self.tr("Enter name of the changelist:"), sorted(self.svnGetChangelists()), 0, True) if not ok or not clname: @@ -2421,7 +2421,7 @@ client = self.getClient() dlg = \ - SvnDialog(self.trUtf8('Add to changelist'), + SvnDialog(self.tr('Add to changelist'), "changelist {0}".format(" ".join(names)), client) QApplication.processEvents() @@ -2480,7 +2480,7 @@ """ client = self.getClient() dlg = \ - SvnDialog(self.trUtf8('Upgrade'), + SvnDialog(self.tr('Upgrade'), "upgrade {0}".format(path), client) QApplication.processEvents()
--- a/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/ProjectBrowserHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -193,7 +193,7 @@ self.vcsMenuActions = [] self.vcsAddMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -207,136 +207,136 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMenuActions.append(act) if 1 in self.browser.specialMenuEntries: self.vcsMenuAddTree = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add tree to repository'), + self.tr('Add tree to repository'), self._VCSAddTree) self.vcsAddMenuActions.append(self.vcsMenuAddTree) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Copy'), self.__SVNCopy) + act = menu.addAction(self.tr('Copy'), self.__SVNCopy) self.vcsMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__SVNMove) + act = menu.addAction(self.tr('Move'), self.__SVNMove) self.vcsMenuActions.append(act) if self.vcs.version >= (1, 5, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__SVNLogBrowser) + self.tr('Show log browser'), self.__SVNLogBrowser) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side'), self.__SVNSbsDiff) + self.tr('Show difference side-by-side'), self.__SVNSbsDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsSbsDiff.png"), - self.trUtf8('Show difference side-by-side (extended)'), + self.tr('Show difference side-by-side (extended)'), self.__SVNSbsExtendedDiff) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsMenuActions.append(act) self.blameAct = menu.addAction( - self.trUtf8('Show annotated file'), + self.tr('Show annotated file'), self.__SVNBlame) self.vcsMenuActions.append(self.blameAct) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsMenuActions.append(act) if self.vcs.version >= (1, 2, 0): menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLock.png"), - self.trUtf8('Lock'), self.__SVNLock) + self.tr('Lock'), self.__SVNLock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Unlock'), self.__SVNUnlock) + self.tr('Unlock'), self.__SVNUnlock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Break Lock'), self.__SVNBreakLock) + self.tr('Break Lock'), self.__SVNBreakLock) self.vcsMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Steal Lock'), self.__SVNStealLock) + self.tr('Steal Lock'), self.__SVNStealLock) self.vcsMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -352,7 +352,7 @@ self.vcsMultiMenuActions = [] self.vcsAddMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -366,103 +366,103 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddMultiMenuActions.append(act) if 1 in self.browser.specialMenuEntries: self.vcsMultiMenuAddTree = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add tree to repository'), self._VCSAddTree) + self.tr('Add tree to repository'), self._VCSAddTree) self.vcsAddMultiMenuActions.append(self.vcsMultiMenuAddTree) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsMultiMenuActions.append(act) if self.vcs.version >= (1, 5, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsMultiMenuActions.append(act) if self.vcs.version >= (1, 2, 0): menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLock.png"), - self.trUtf8('Lock'), self.__SVNLock) + self.tr('Lock'), self.__SVNLock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Unlock'), self.__SVNUnlock) + self.tr('Unlock'), self.__SVNUnlock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Break Lock'), self.__SVNBreakLock) + self.tr('Break Lock'), self.__SVNBreakLock) self.vcsMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsUnlock.png"), - self.trUtf8('Steal Lock'), self.__SVNStealLock) + self.tr('Steal Lock'), self.__SVNStealLock) self.vcsMultiMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsMultiMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -474,7 +474,7 @@ @param mainMenu reference to the menu to be amended """ - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -486,16 +486,16 @@ act.setFont(font) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -513,7 +513,7 @@ self.vcsDirMenuActions = [] self.vcsAddDirMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -527,98 +527,98 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Copy'), self.__SVNCopy) + act = menu.addAction(self.tr('Copy'), self.__SVNCopy) self.vcsDirMenuActions.append(act) - act = menu.addAction(self.trUtf8('Move'), self.__SVNMove) + act = menu.addAction(self.tr('Move'), self.__SVNMove) self.vcsDirMenuActions.append(act) if self.vcs.version >= (1, 5, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log'), self._VCSLog) + self.tr('Show log'), self._VCSLog) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), self.__SVNLogBrowser) + self.tr('Show log browser'), self.__SVNLogBrowser) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsDirMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsDirMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsDirMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsDirMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsDirMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsDirMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsDirMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu) @@ -636,7 +636,7 @@ self.vcsDirMultiMenuActions = [] self.vcsAddDirMultiMenuActions = [] - menu = QMenu(self.trUtf8("Version Control")) + menu = QMenu(self.tr("Version Control")) act = menu.addAction( UI.PixmapCache.getIcon( @@ -650,84 +650,84 @@ act = menu.addAction( UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('Update from repository'), self._VCSUpdate) + self.tr('Update from repository'), self._VCSUpdate) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('Commit changes to repository...'), + self.tr('Commit changes to repository...'), self._VCSCommit) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsAdd.png"), - self.trUtf8('Add to repository'), self._VCSAdd) + self.tr('Add to repository'), self._VCSAdd) self.vcsAddDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsRemove.png"), - self.trUtf8('Remove from repository (and disk)'), + self.tr('Remove from repository (and disk)'), self._VCSRemove) self.vcsDirMultiMenuActions.append(act) if self.vcs.version >= (1, 5, 0): menu.addSeparator() act = menu.addAction( - self.trUtf8("Add to Changelist"), + self.tr("Add to Changelist"), self.__SVNAddToChangelist) self.vcsMenuActions.append(act) act = menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__SVNRemoveFromChangelist) self.vcsMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show status'), self._VCSStatus) + self.tr('Show status'), self._VCSStatus) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference'), self._VCSDiff) + self.tr('Show difference'), self._VCSDiff) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), self.__SVNExtendedDiff) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), self.__SVNUrlDiff) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() act = menu.addAction( UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Revert changes'), self._VCSRevert) + self.tr('Revert changes'), self._VCSRevert) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Merge changes'), self._VCSMerge) + self.tr('Merge changes'), self._VCSMerge) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('Conflict resolved'), self.__SVNResolve) + self.tr('Conflict resolved'), self.__SVNResolve) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() - act = menu.addAction(self.trUtf8('Set Property'), self.__SVNSetProp) + act = menu.addAction(self.tr('Set Property'), self.__SVNSetProp) self.vcsDirMultiMenuActions.append(act) act = menu.addAction( - self.trUtf8('List Properties'), self.__SVNListProps) + self.tr('List Properties'), self.__SVNListProps) self.vcsDirMultiMenuActions.append(act) - act = menu.addAction(self.trUtf8('Delete Property'), self.__SVNDelProp) + act = menu.addAction(self.tr('Delete Property'), self.__SVNDelProp) self.vcsDirMultiMenuActions.append(act) menu.addSeparator() - menu.addAction(self.trUtf8('Select all local file entries'), + menu.addAction(self.tr('Select all local file entries'), self.browser.selectLocalEntries) - menu.addAction(self.trUtf8('Select all versioned file entries'), + menu.addAction(self.tr('Select all versioned file entries'), self.browser.selectVCSEntries) - menu.addAction(self.trUtf8('Select all local directory entries'), + menu.addAction(self.tr('Select all local directory entries'), self.browser.selectLocalDirEntries) - menu.addAction(self.trUtf8('Select all versioned directory entries'), + menu.addAction(self.tr('Select all versioned directory entries'), self.browser.selectVCSDirEntries) menu.addSeparator() - menu.addAction(self.trUtf8("Configure..."), self.__SVNConfigure) + menu.addAction(self.tr("Configure..."), self.__SVNConfigure) mainMenu.addSeparator() mainMenu.addMenu(menu)
--- a/Plugins/VcsPlugins/vcsSubversion/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,14 +46,14 @@ Public method to generate the action objects. """ self.vcsNewAct = E5Action( - self.trUtf8('New from repository'), + self.tr('New from repository'), UI.PixmapCache.getIcon("vcsCheckout.png"), - self.trUtf8('&New from repository...'), 0, 0, self, + self.tr('&New from repository...'), 0, 0, self, 'subversion_new') - self.vcsNewAct.setStatusTip(self.trUtf8( + self.vcsNewAct.setStatusTip(self.tr( 'Create a new project from the VCS repository' )) - self.vcsNewAct.setWhatsThis(self.trUtf8( + self.vcsNewAct.setWhatsThis(self.tr( """<b>New from repository</b>""" """<p>This creates a new local project from the VCS""" """ repository.</p>""" @@ -62,14 +62,14 @@ self.actions.append(self.vcsNewAct) self.vcsUpdateAct = E5Action( - self.trUtf8('Update from repository'), + self.tr('Update from repository'), UI.PixmapCache.getIcon("vcsUpdate.png"), - self.trUtf8('&Update from repository'), 0, 0, self, + self.tr('&Update from repository'), 0, 0, self, 'subversion_update') - self.vcsUpdateAct.setStatusTip(self.trUtf8( + self.vcsUpdateAct.setStatusTip(self.tr( 'Update the local project from the VCS repository' )) - self.vcsUpdateAct.setWhatsThis(self.trUtf8( + self.vcsUpdateAct.setWhatsThis(self.tr( """<b>Update from repository</b>""" """<p>This updates the local project from the VCS""" """ repository.</p>""" @@ -78,14 +78,14 @@ self.actions.append(self.vcsUpdateAct) self.vcsCommitAct = E5Action( - self.trUtf8('Commit changes to repository'), + self.tr('Commit changes to repository'), UI.PixmapCache.getIcon("vcsCommit.png"), - self.trUtf8('&Commit changes to repository...'), 0, 0, self, + self.tr('&Commit changes to repository...'), 0, 0, self, 'subversion_commit') - self.vcsCommitAct.setStatusTip(self.trUtf8( + self.vcsCommitAct.setStatusTip(self.tr( 'Commit changes to the local project to the VCS repository' )) - self.vcsCommitAct.setWhatsThis(self.trUtf8( + self.vcsCommitAct.setWhatsThis(self.tr( """<b>Commit changes to repository</b>""" """<p>This commits changes to the local project to the VCS""" """ repository.</p>""" @@ -94,14 +94,14 @@ self.actions.append(self.vcsCommitAct) self.vcsLogAct = E5Action( - self.trUtf8('Show log'), + self.tr('Show log'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show &log'), + self.tr('Show &log'), 0, 0, self, 'subversion_log') - self.vcsLogAct.setStatusTip(self.trUtf8( + self.vcsLogAct.setStatusTip(self.tr( 'Show the log of the local project' )) - self.vcsLogAct.setWhatsThis(self.trUtf8( + self.vcsLogAct.setWhatsThis(self.tr( """<b>Show log</b>""" """<p>This shows the log of the local project.</p>""" )) @@ -109,14 +109,14 @@ self.actions.append(self.vcsLogAct) self.svnLogBrowserAct = E5Action( - self.trUtf8('Show log browser'), + self.tr('Show log browser'), UI.PixmapCache.getIcon("vcsLog.png"), - self.trUtf8('Show log browser'), + self.tr('Show log browser'), 0, 0, self, 'subversion_log_browser') - self.svnLogBrowserAct.setStatusTip(self.trUtf8( + self.svnLogBrowserAct.setStatusTip(self.tr( 'Show a dialog to browse the log of the local project' )) - self.svnLogBrowserAct.setWhatsThis(self.trUtf8( + self.svnLogBrowserAct.setWhatsThis(self.tr( """<b>Show log browser</b>""" """<p>This shows a dialog to browse the log of the local""" """ project. A limited number of entries is shown first. More""" @@ -126,14 +126,14 @@ self.actions.append(self.svnLogBrowserAct) self.vcsDiffAct = E5Action( - self.trUtf8('Show difference'), + self.tr('Show difference'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show &difference'), + self.tr('Show &difference'), 0, 0, self, 'subversion_diff') - self.vcsDiffAct.setStatusTip(self.trUtf8( + self.vcsDiffAct.setStatusTip(self.tr( 'Show the difference of the local project to the repository' )) - self.vcsDiffAct.setWhatsThis(self.trUtf8( + self.vcsDiffAct.setWhatsThis(self.tr( """<b>Show difference</b>""" """<p>This shows the difference of the local project to the""" """ repository.</p>""" @@ -142,14 +142,14 @@ self.actions.append(self.vcsDiffAct) self.svnExtDiffAct = E5Action( - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (extended)'), + self.tr('Show difference (extended)'), 0, 0, self, 'subversion_extendeddiff') - self.svnExtDiffAct.setStatusTip(self.trUtf8( + self.svnExtDiffAct.setStatusTip(self.tr( 'Show the difference of revisions of the project to the repository' )) - self.svnExtDiffAct.setWhatsThis(self.trUtf8( + self.svnExtDiffAct.setWhatsThis(self.tr( """<b>Show difference (extended)</b>""" """<p>This shows the difference of selectable revisions of""" """ the project.</p>""" @@ -158,14 +158,14 @@ self.actions.append(self.svnExtDiffAct) self.svnUrlDiffAct = E5Action( - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), UI.PixmapCache.getIcon("vcsDiff.png"), - self.trUtf8('Show difference (URLs)'), + self.tr('Show difference (URLs)'), 0, 0, self, 'subversion_urldiff') - self.svnUrlDiffAct.setStatusTip(self.trUtf8( + self.svnUrlDiffAct.setStatusTip(self.tr( 'Show the difference of the project between two repository URLs' )) - self.svnUrlDiffAct.setWhatsThis(self.trUtf8( + self.svnUrlDiffAct.setWhatsThis(self.tr( """<b>Show difference (URLs)</b>""" """<p>This shows the difference of the project between""" """ two repository URLs.</p>""" @@ -174,14 +174,14 @@ self.actions.append(self.svnUrlDiffAct) self.vcsStatusAct = E5Action( - self.trUtf8('Show status'), + self.tr('Show status'), UI.PixmapCache.getIcon("vcsStatus.png"), - self.trUtf8('Show &status'), + self.tr('Show &status'), 0, 0, self, 'subversion_status') - self.vcsStatusAct.setStatusTip(self.trUtf8( + self.vcsStatusAct.setStatusTip(self.tr( 'Show the status of the local project' )) - self.vcsStatusAct.setWhatsThis(self.trUtf8( + self.vcsStatusAct.setWhatsThis(self.tr( """<b>Show status</b>""" """<p>This shows the status of the local project.</p>""" )) @@ -189,14 +189,14 @@ self.actions.append(self.vcsStatusAct) self.svnChangeListsAct = E5Action( - self.trUtf8('Show change lists'), + self.tr('Show change lists'), UI.PixmapCache.getIcon("vcsChangeLists.png"), - self.trUtf8('Show change lists'), + self.tr('Show change lists'), 0, 0, self, 'subversion_changelists') - self.svnChangeListsAct.setStatusTip(self.trUtf8( + self.svnChangeListsAct.setStatusTip(self.tr( 'Show the change lists and associated files of the local project' )) - self.svnChangeListsAct.setWhatsThis(self.trUtf8( + self.svnChangeListsAct.setWhatsThis(self.tr( """<b>Show change lists</b>""" """<p>This shows the change lists and associated files of the""" """ local project.</p>""" @@ -205,14 +205,14 @@ self.actions.append(self.svnChangeListsAct) self.vcsTagAct = E5Action( - self.trUtf8('Tag in repository'), + self.tr('Tag in repository'), UI.PixmapCache.getIcon("vcsTag.png"), - self.trUtf8('&Tag in repository...'), + self.tr('&Tag in repository...'), 0, 0, self, 'subversion_tag') - self.vcsTagAct.setStatusTip(self.trUtf8( + self.vcsTagAct.setStatusTip(self.tr( 'Tag the local project in the repository' )) - self.vcsTagAct.setWhatsThis(self.trUtf8( + self.vcsTagAct.setWhatsThis(self.tr( """<b>Tag in repository</b>""" """<p>This tags the local project in the repository.</p>""" )) @@ -220,14 +220,14 @@ self.actions.append(self.vcsTagAct) self.vcsExportAct = E5Action( - self.trUtf8('Export from repository'), + self.tr('Export from repository'), UI.PixmapCache.getIcon("vcsExport.png"), - self.trUtf8('&Export from repository...'), + self.tr('&Export from repository...'), 0, 0, self, 'subversion_export') - self.vcsExportAct.setStatusTip(self.trUtf8( + self.vcsExportAct.setStatusTip(self.tr( 'Export a project from the repository' )) - self.vcsExportAct.setWhatsThis(self.trUtf8( + self.vcsExportAct.setWhatsThis(self.tr( """<b>Export from repository</b>""" """<p>This exports a project from the repository.</p>""" )) @@ -235,12 +235,12 @@ self.actions.append(self.vcsExportAct) self.vcsPropsAct = E5Action( - self.trUtf8('Command options'), - self.trUtf8('Command &options...'), 0, 0, self, + self.tr('Command options'), + self.tr('Command &options...'), 0, 0, self, 'subversion_options') - self.vcsPropsAct.setStatusTip(self.trUtf8( + self.vcsPropsAct.setStatusTip(self.tr( 'Show the VCS command options')) - self.vcsPropsAct.setWhatsThis(self.trUtf8( + self.vcsPropsAct.setWhatsThis(self.tr( """<b>Command options...</b>""" """<p>This shows a dialog to edit the VCS command options.</p>""" )) @@ -248,14 +248,14 @@ self.actions.append(self.vcsPropsAct) self.vcsRevertAct = E5Action( - self.trUtf8('Revert changes'), + self.tr('Revert changes'), UI.PixmapCache.getIcon("vcsRevert.png"), - self.trUtf8('Re&vert changes'), + self.tr('Re&vert changes'), 0, 0, self, 'subversion_revert') - self.vcsRevertAct.setStatusTip(self.trUtf8( + self.vcsRevertAct.setStatusTip(self.tr( 'Revert all changes made to the local project' )) - self.vcsRevertAct.setWhatsThis(self.trUtf8( + self.vcsRevertAct.setWhatsThis(self.tr( """<b>Revert changes</b>""" """<p>This reverts all changes made to the local project.</p>""" )) @@ -263,14 +263,14 @@ self.actions.append(self.vcsRevertAct) self.vcsMergeAct = E5Action( - self.trUtf8('Merge'), + self.tr('Merge'), UI.PixmapCache.getIcon("vcsMerge.png"), - self.trUtf8('Mer&ge changes...'), + self.tr('Mer&ge changes...'), 0, 0, self, 'subversion_merge') - self.vcsMergeAct.setStatusTip(self.trUtf8( + self.vcsMergeAct.setStatusTip(self.tr( 'Merge changes of a tag/revision into the local project' )) - self.vcsMergeAct.setWhatsThis(self.trUtf8( + self.vcsMergeAct.setWhatsThis(self.tr( """<b>Merge</b>""" """<p>This merges changes of a tag/revision into the local""" """ project.</p>""" @@ -279,14 +279,14 @@ self.actions.append(self.vcsMergeAct) self.vcsSwitchAct = E5Action( - self.trUtf8('Switch'), + self.tr('Switch'), UI.PixmapCache.getIcon("vcsSwitch.png"), - self.trUtf8('S&witch...'), + self.tr('S&witch...'), 0, 0, self, 'subversion_switch') - self.vcsSwitchAct.setStatusTip(self.trUtf8( + self.vcsSwitchAct.setStatusTip(self.tr( 'Switch the local copy to another tag/branch' )) - self.vcsSwitchAct.setWhatsThis(self.trUtf8( + self.vcsSwitchAct.setWhatsThis(self.tr( """<b>Switch</b>""" """<p>This switches the local copy to another tag/branch.</p>""" )) @@ -294,13 +294,13 @@ self.actions.append(self.vcsSwitchAct) self.vcsResolveAct = E5Action( - self.trUtf8('Conflicts resolved'), - self.trUtf8('Con&flicts resolved'), + self.tr('Conflicts resolved'), + self.tr('Con&flicts resolved'), 0, 0, self, 'subversion_resolve') - self.vcsResolveAct.setStatusTip(self.trUtf8( + self.vcsResolveAct.setStatusTip(self.tr( 'Mark all conflicts of the local project as resolved' )) - self.vcsResolveAct.setWhatsThis(self.trUtf8( + self.vcsResolveAct.setWhatsThis(self.tr( """<b>Conflicts resolved</b>""" """<p>This marks all conflicts of the local project as""" """ resolved.</p>""" @@ -309,13 +309,13 @@ self.actions.append(self.vcsResolveAct) self.vcsCleanupAct = E5Action( - self.trUtf8('Cleanup'), - self.trUtf8('Cleanu&p'), + self.tr('Cleanup'), + self.tr('Cleanu&p'), 0, 0, self, 'subversion_cleanup') - self.vcsCleanupAct.setStatusTip(self.trUtf8( + self.vcsCleanupAct.setStatusTip(self.tr( 'Cleanup the local project' )) - self.vcsCleanupAct.setWhatsThis(self.trUtf8( + self.vcsCleanupAct.setWhatsThis(self.tr( """<b>Cleanup</b>""" """<p>This performs a cleanup of the local project.</p>""" )) @@ -323,13 +323,13 @@ self.actions.append(self.vcsCleanupAct) self.vcsCommandAct = E5Action( - self.trUtf8('Execute command'), - self.trUtf8('E&xecute command...'), + self.tr('Execute command'), + self.tr('E&xecute command...'), 0, 0, self, 'subversion_command') - self.vcsCommandAct.setStatusTip(self.trUtf8( + self.vcsCommandAct.setStatusTip(self.tr( 'Execute an arbitrary VCS command' )) - self.vcsCommandAct.setWhatsThis(self.trUtf8( + self.vcsCommandAct.setWhatsThis(self.tr( """<b>Execute command</b>""" """<p>This opens a dialog to enter an arbitrary VCS command.</p>""" )) @@ -337,13 +337,13 @@ self.actions.append(self.vcsCommandAct) self.svnTagListAct = E5Action( - self.trUtf8('List tags'), - self.trUtf8('List tags...'), + self.tr('List tags'), + self.tr('List tags...'), 0, 0, self, 'subversion_list_tags') - self.svnTagListAct.setStatusTip(self.trUtf8( + self.svnTagListAct.setStatusTip(self.tr( 'List tags of the project' )) - self.svnTagListAct.setWhatsThis(self.trUtf8( + self.svnTagListAct.setWhatsThis(self.tr( """<b>List tags</b>""" """<p>This lists the tags of the project.</p>""" )) @@ -351,13 +351,13 @@ self.actions.append(self.svnTagListAct) self.svnBranchListAct = E5Action( - self.trUtf8('List branches'), - self.trUtf8('List branches...'), + self.tr('List branches'), + self.tr('List branches...'), 0, 0, self, 'subversion_list_branches') - self.svnBranchListAct.setStatusTip(self.trUtf8( + self.svnBranchListAct.setStatusTip(self.tr( 'List branches of the project' )) - self.svnBranchListAct.setWhatsThis(self.trUtf8( + self.svnBranchListAct.setWhatsThis(self.tr( """<b>List branches</b>""" """<p>This lists the branches of the project.</p>""" )) @@ -365,13 +365,13 @@ self.actions.append(self.svnBranchListAct) self.svnListAct = E5Action( - self.trUtf8('List repository contents'), - self.trUtf8('List repository contents...'), + self.tr('List repository contents'), + self.tr('List repository contents...'), 0, 0, self, 'subversion_contents') - self.svnListAct.setStatusTip(self.trUtf8( + self.svnListAct.setStatusTip(self.tr( 'Lists the contents of the repository' )) - self.svnListAct.setWhatsThis(self.trUtf8( + self.svnListAct.setWhatsThis(self.tr( """<b>List repository contents</b>""" """<p>This lists the contents of the repository.</p>""" )) @@ -379,13 +379,13 @@ self.actions.append(self.svnListAct) self.svnPropSetAct = E5Action( - self.trUtf8('Set Property'), - self.trUtf8('Set Property...'), + self.tr('Set Property'), + self.tr('Set Property...'), 0, 0, self, 'subversion_property_set') - self.svnPropSetAct.setStatusTip(self.trUtf8( + self.svnPropSetAct.setStatusTip(self.tr( 'Set a property for the project files' )) - self.svnPropSetAct.setWhatsThis(self.trUtf8( + self.svnPropSetAct.setWhatsThis(self.tr( """<b>Set Property</b>""" """<p>This sets a property for the project files.</p>""" )) @@ -393,13 +393,13 @@ self.actions.append(self.svnPropSetAct) self.svnPropListAct = E5Action( - self.trUtf8('List Properties'), - self.trUtf8('List Properties...'), + self.tr('List Properties'), + self.tr('List Properties...'), 0, 0, self, 'subversion_property_list') - self.svnPropListAct.setStatusTip(self.trUtf8( + self.svnPropListAct.setStatusTip(self.tr( 'List properties of the project files' )) - self.svnPropListAct.setWhatsThis(self.trUtf8( + self.svnPropListAct.setWhatsThis(self.tr( """<b>List Properties</b>""" """<p>This lists the properties of the project files.</p>""" )) @@ -407,13 +407,13 @@ self.actions.append(self.svnPropListAct) self.svnPropDelAct = E5Action( - self.trUtf8('Delete Property'), - self.trUtf8('Delete Property...'), + self.tr('Delete Property'), + self.tr('Delete Property...'), 0, 0, self, 'subversion_property_delete') - self.svnPropDelAct.setStatusTip(self.trUtf8( + self.svnPropDelAct.setStatusTip(self.tr( 'Delete a property for the project files' )) - self.svnPropDelAct.setWhatsThis(self.trUtf8( + self.svnPropDelAct.setWhatsThis(self.tr( """<b>Delete Property</b>""" """<p>This deletes a property for the project files.</p>""" )) @@ -421,14 +421,14 @@ self.actions.append(self.svnPropDelAct) self.svnRelocateAct = E5Action( - self.trUtf8('Relocate'), + self.tr('Relocate'), UI.PixmapCache.getIcon("vcsSwitch.png"), - self.trUtf8('Relocate...'), + self.tr('Relocate...'), 0, 0, self, 'subversion_relocate') - self.svnRelocateAct.setStatusTip(self.trUtf8( + self.svnRelocateAct.setStatusTip(self.tr( 'Relocate the working copy to a new repository URL' )) - self.svnRelocateAct.setWhatsThis(self.trUtf8( + self.svnRelocateAct.setWhatsThis(self.tr( """<b>Relocate</b>""" """<p>This relocates the working copy to a new repository""" """ URL.</p>""" @@ -437,14 +437,14 @@ self.actions.append(self.svnRelocateAct) self.svnRepoBrowserAct = E5Action( - self.trUtf8('Repository Browser'), + self.tr('Repository Browser'), UI.PixmapCache.getIcon("vcsRepoBrowser.png"), - self.trUtf8('Repository Browser...'), + self.tr('Repository Browser...'), 0, 0, self, 'subversion_repo_browser') - self.svnRepoBrowserAct.setStatusTip(self.trUtf8( + self.svnRepoBrowserAct.setStatusTip(self.tr( 'Show the Repository Browser dialog' )) - self.svnRepoBrowserAct.setWhatsThis(self.trUtf8( + self.svnRepoBrowserAct.setWhatsThis(self.tr( """<b>Repository Browser</b>""" """<p>This shows the Repository Browser dialog.</p>""" )) @@ -452,13 +452,13 @@ self.actions.append(self.svnRepoBrowserAct) self.svnConfigAct = E5Action( - self.trUtf8('Configure'), - self.trUtf8('Configure...'), + self.tr('Configure'), + self.tr('Configure...'), 0, 0, self, 'subversion_configure') - self.svnConfigAct.setStatusTip(self.trUtf8( + self.svnConfigAct.setStatusTip(self.tr( 'Show the configuration dialog with the Subversion page selected' )) - self.svnConfigAct.setWhatsThis(self.trUtf8( + self.svnConfigAct.setWhatsThis(self.tr( """<b>Configure</b>""" """<p>Show the configuration dialog with the Subversion page""" """ selected.</p>""" @@ -467,13 +467,13 @@ self.actions.append(self.svnConfigAct) self.svnUpgradeAct = E5Action( - self.trUtf8('Upgrade'), - self.trUtf8('Upgrade...'), + self.tr('Upgrade'), + self.tr('Upgrade...'), 0, 0, self, 'subversion_upgrade') - self.svnUpgradeAct.setStatusTip(self.trUtf8( + self.svnUpgradeAct.setStatusTip(self.tr( 'Upgrade the working copy to the current format' )) - self.svnUpgradeAct.setWhatsThis(self.trUtf8( + self.svnUpgradeAct.setWhatsThis(self.tr( """<b>Upgrade</b>""" """<p>Upgrades the working copy to the current format.</p>""" ))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -98,8 +98,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn'))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnChangeListsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -74,7 +74,7 @@ self.changeListsDict = {} self.filesLabel.setText( - self.trUtf8("Files (relative to {0}):").format(path)) + self.tr("Files (relative to {0}):").format(path)) self.errorGroup.hide() self.intercept = False @@ -110,8 +110,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -138,7 +138,7 @@ self.inputGroup.hide() if len(self.changeListsDict) == 0: - self.changeLists.addItem(self.trUtf8("No changelists found")) + self.changeLists.addItem(self.tr("No changelists found")) self.buttonBox.button(QDialogButtonBox.Close).setFocus( Qt.OtherFocusReason) else:
--- a/Plugins/VcsPlugins/vcsSubversion/SvnCommandDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnCommandDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -72,7 +72,7 @@ cwd = self.projectDirLabel.text() d = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Working directory"), + self.tr("Working directory"), cwd, E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnCopyDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnCopyDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -20,6 +20,7 @@ import Utilities import UI.PixmapCache + class SvnCopyDialog(QDialog, Ui_SvnCopyDialog): """ Class implementing a dialog to enter the data for a copy or rename @@ -46,7 +47,7 @@ self.targetCompleter = E5FileCompleter(self.targetEdit) if move: - self.setWindowTitle(self.trUtf8('Subversion Move')) + self.setWindowTitle(self.tr('Subversion Move')) else: self.forceCheckBox.setEnabled(False) self.forceCheckBox.setChecked(force) @@ -78,13 +79,13 @@ if os.path.isdir(self.source): target = E5FileDialog.getExistingDirectory( None, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) else: target = E5FileDialog.getSaveFileName( None, - self.trUtf8("Select target"), + self.tr("Select target"), self.targetEdit.text(), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -146,8 +146,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn'))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnDiffDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -176,8 +176,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -194,7 +194,7 @@ if self.paras == 0: self.contents.insertPlainText( - self.trUtf8('There is no difference.')) + self.tr('There is no difference.')) return self.buttonBox.button(QDialogButtonBox.Save).setEnabled(True) @@ -207,8 +207,8 @@ self.contents.setTextCursor(tc) self.contents.ensureCursorVisible() - self.filesCombo.addItem(self.trUtf8("<Start>"), 0) - self.filesCombo.addItem(self.trUtf8("<End>"), -1) + self.filesCombo.addItem(self.tr("<Start>"), 0) + self.filesCombo.addItem(self.tr("<End>"), -1) for oldFile, newFile, pos in sorted(self.__fileSeparators): if oldFile != newFile: self.filesCombo.addItem( @@ -366,9 +366,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diff"), + self.tr("Save Diff"), fname, - self.trUtf8("Patch Files (*.diff)"), + self.tr("Patch Files (*.diff)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -383,9 +383,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diff"), - self.trUtf8("<p>The patch file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diff"), + self.tr("<p>The patch file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -398,8 +398,8 @@ f.close() except IOError as why: E5MessageBox.critical( - self, self.trUtf8('Save Diff'), - self.trUtf8( + self, self.tr('Save Diff'), + self.tr( '<p>The patch file <b>{0}</b> could not be saved.' '<br>Reason: {1}</p>') .format(fname, str(why)))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogBrowserDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -55,7 +55,7 @@ self.fromDate.setDate(QDate.currentDate()) self.toDate.setDate(QDate.currentDate()) self.fieldCombo.setCurrentIndex( - self.fieldCombo.findText(self.trUtf8("Message"))) + self.fieldCombo.findText(self.tr("Message"))) self.limitSpinBox.setValue( self.vcs.getPlugin().getPreferences("LogLimit")) self.stopCheckBox.setChecked( @@ -89,10 +89,10 @@ # three blanks followed by A or D or M followed by path self.flags = { - 'A': self.trUtf8('Added'), - 'D': self.trUtf8('Deleted'), - 'M': self.trUtf8('Modified'), - 'R': self.trUtf8('Replaced'), + 'A': self.tr('Added'), + 'D': self.tr('Deleted'), + 'M': self.tr('Modified'), + 'R': self.tr('Replaced'), } self.buf = [] # buffer for stdout @@ -252,8 +252,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -570,10 +570,10 @@ from_ = self.fromDate.date().toString("yyyy-MM-dd") to_ = self.toDate.date().addDays(1).toString("yyyy-MM-dd") txt = self.fieldCombo.currentText() - if txt == self.trUtf8("Author"): + if txt == self.tr("Author"): fieldIndex = 1 searchRx = QRegExp(self.rxEdit.text(), Qt.CaseInsensitive) - elif txt == self.trUtf8("Revision"): + elif txt == self.tr("Revision"): fieldIndex = 0 txt = self.rxEdit.text() if txt.startswith("^"):
--- a/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnLogDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -46,7 +46,7 @@ self.vcs = vcs self.contents.setHtml( - self.trUtf8('<b>Processing your request, please wait...</b>')) + self.tr('<b>Processing your request, please wait...</b>')) self.process.finished.connect(self.__procFinished) self.process.readyReadStandardOutput.connect(self.__readStdout) @@ -71,13 +71,13 @@ self.rx_changed = QRegExp('Changed .*\\s*') self.flags = { - 'A': self.trUtf8('Added'), - 'D': self.trUtf8('Deleted'), - 'M': self.trUtf8('Modified') + 'A': self.tr('Added'), + 'D': self.tr('Deleted'), + 'M': self.tr('Modified') } self.revisions = [] # stack of remembered revisions - self.revString = self.trUtf8('revision') + self.revString = self.tr('revision') self.buf = [] # buffer for stdout self.diff = None @@ -134,8 +134,8 @@ self.inputGroup.setEnabled(False) E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -182,17 +182,17 @@ dstr += ' [<a href="{0}" name="{1}">{2}</a>]'.format( url.toString(), query, - self.trUtf8('diff to {0}').format(lv), + self.tr('diff to {0}').format(lv), ) except IndexError: pass dstr += '<br />\n' self.contents.insertHtml(dstr) - dstr = self.trUtf8('<i>author: {0}</i><br />\n').format(author) + dstr = self.tr('<i>author: {0}</i><br />\n').format(author) self.contents.insertHtml(dstr) - dstr = self.trUtf8('<i>date: {0}</i><br />\n').format(date) + dstr = self.tr('<i>date: {0}</i><br />\n').format(date) self.contents.insertHtml(dstr) elif self.rx_sep.exactMatch(s) or self.rx_sep2.exactMatch(s):
--- a/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnNewProjectOptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -69,7 +69,7 @@ if self.protocolCombo.currentText() == "file://": directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Repository-Directory"), + self.tr("Select Repository-Directory"), self.vcsUrlEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -97,7 +97,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Project Directory"), + self.tr("Select Project Directory"), self.vcsProjectDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -126,13 +126,13 @@ if protocol == "file://": self.networkPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.localPath) - self.vcsUrlLabel.setText(self.trUtf8("Pat&h:")) + self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: self.localPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.networkPath) - self.vcsUrlLabel.setText(self.trUtf8("&URL:")) + self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str)
--- a/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,7 +65,7 @@ if self.protocolCombo.currentText() == "file://": directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Repository-Directory"), + self.tr("Select Repository-Directory"), self.vcsUrlEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -96,13 +96,13 @@ if protocol == "file://": self.networkPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.localPath) - self.vcsUrlLabel.setText(self.trUtf8("Pat&h:")) + self.vcsUrlLabel.setText(self.tr("Pat&h:")) self.localProtocol = True else: if self.localProtocol: self.localPath = self.vcsUrlEdit.text() self.vcsUrlEdit.setText(self.networkPath) - self.vcsUrlLabel.setText(self.trUtf8("&URL:")) + self.vcsUrlLabel.setText(self.tr("&URL:")) self.localProtocol = False @pyqtSlot(str)
--- a/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnPropListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -125,8 +125,8 @@ if not procStarted: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn'))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnPropSetDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,7 +43,7 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select file for property"), + self.tr("Select file for property"), self.propFileEdit.text(), "")
--- a/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -184,8 +184,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -257,8 +257,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn'))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnStatusDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,10 +50,10 @@ self.__lastColumn = self.statusList.columnCount() self.refreshButton = \ - self.buttonBox.addButton(self.trUtf8("Refresh"), + self.buttonBox.addButton(self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( - self.trUtf8("Press to refresh the status display")) + self.tr("Press to refresh the status display")) self.refreshButton.setEnabled(False) self.buttonBox.button(QDialogButtonBox.Close).setEnabled(False) self.buttonBox.button(QDialogButtonBox.Cancel).setDefault(True) @@ -72,44 +72,44 @@ self.menuactions = [] self.menu = QMenu() self.menuactions.append(self.menu.addAction( - self.trUtf8("Commit changes to repository..."), self.__commit)) + self.tr("Commit changes to repository..."), self.__commit)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Select all for commit"), self.__commitSelectAll)) + self.tr("Select all for commit"), self.__commitSelectAll)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Deselect all from commit"), self.__commitDeselectAll)) + self.tr("Deselect all from commit"), self.__commitDeselectAll)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Add to repository"), self.__add)) + self.tr("Add to repository"), self.__add)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences"), self.__diff)) + self.tr("Show differences"), self.__diff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Show differences side-by-side"), self.__sbsDiff)) + self.tr("Show differences side-by-side"), self.__sbsDiff)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Revert changes"), self.__revert)) + self.tr("Revert changes"), self.__revert)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Restore missing"), self.__restoreMissing)) + self.tr("Restore missing"), self.__restoreMissing)) if self.vcs.version >= (1, 5, 0): self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Add to Changelist"), self.__addToChangelist)) + self.tr("Add to Changelist"), self.__addToChangelist)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Remove from Changelist"), + self.tr("Remove from Changelist"), self.__removeFromChangelist)) if self.vcs.version >= (1, 2, 0): self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Lock"), self.__lock)) + self.tr("Lock"), self.__lock)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Unlock"), self.__unlock)) + self.tr("Unlock"), self.__unlock)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Break lock"), + self.tr("Break lock"), self.__breakLock)) self.menuactions.append(self.menu.addAction( - self.trUtf8("Steal lock"), + self.tr("Steal lock"), self.__stealLock)) self.menu.addSeparator() self.menuactions.append(self.menu.addAction( - self.trUtf8("Adjust column sizes"), + self.tr("Adjust column sizes"), self.__resizeColumns)) for act in self.menuactions: act.setEnabled(False) @@ -119,73 +119,73 @@ self.__showContextMenu) self.modifiedIndicators = [ - self.trUtf8('added'), - self.trUtf8('deleted'), - self.trUtf8('modified'), + self.tr('added'), + self.tr('deleted'), + self.tr('modified'), ] self.missingIndicators = [ - self.trUtf8('missing'), + self.tr('missing'), ] self.unversionedIndicators = [ - self.trUtf8('unversioned'), + self.tr('unversioned'), ] self.lockedIndicators = [ - self.trUtf8('locked'), + self.tr('locked'), ] self.stealBreakLockIndicators = [ - self.trUtf8('other lock'), - self.trUtf8('stolen lock'), - self.trUtf8('broken lock'), + self.tr('other lock'), + self.tr('stolen lock'), + self.tr('broken lock'), ] self.unlockedIndicators = [ - self.trUtf8('not locked'), + self.tr('not locked'), ] self.status = { - ' ': self.trUtf8('normal'), - 'A': self.trUtf8('added'), - 'D': self.trUtf8('deleted'), - 'M': self.trUtf8('modified'), - 'R': self.trUtf8('replaced'), - 'C': self.trUtf8('conflict'), - 'X': self.trUtf8('external'), - 'I': self.trUtf8('ignored'), - '?': self.trUtf8('unversioned'), - '!': self.trUtf8('missing'), - '~': self.trUtf8('type error'), + ' ': self.tr('normal'), + 'A': self.tr('added'), + 'D': self.tr('deleted'), + 'M': self.tr('modified'), + 'R': self.tr('replaced'), + 'C': self.tr('conflict'), + 'X': self.tr('external'), + 'I': self.tr('ignored'), + '?': self.tr('unversioned'), + '!': self.tr('missing'), + '~': self.tr('type error'), } self.propStatus = { - ' ': self.trUtf8('normal'), - 'M': self.trUtf8('modified'), - 'C': self.trUtf8('conflict'), + ' ': self.tr('normal'), + 'M': self.tr('modified'), + 'C': self.tr('conflict'), } self.locked = { - ' ': self.trUtf8('no'), - 'L': self.trUtf8('yes'), + ' ': self.tr('no'), + 'L': self.tr('yes'), } self.history = { - ' ': self.trUtf8('no'), - '+': self.trUtf8('yes'), + ' ': self.tr('no'), + '+': self.tr('yes'), } self.switched = { - ' ': self.trUtf8('no'), - 'S': self.trUtf8('yes'), + ' ': self.tr('no'), + 'S': self.tr('yes'), } self.lockinfo = { - ' ': self.trUtf8('not locked'), - 'K': self.trUtf8('locked'), - 'O': self.trUtf8('other lock'), - 'T': self.trUtf8('stolen lock'), - 'B': self.trUtf8('broken lock'), + ' ': self.tr('not locked'), + 'K': self.tr('locked'), + 'O': self.tr('other lock'), + 'T': self.tr('stolen lock'), + 'B': self.tr('broken lock'), } self.uptodate = { - ' ': self.trUtf8('yes'), - '*': self.trUtf8('no'), + ' ': self.tr('yes'), + '*': self.tr('no'), } self.rx_status = QRegExp( @@ -383,7 +383,7 @@ self.process.setWorkingDirectory(self.dname) - self.setWindowTitle(self.trUtf8('Subversion Status')) + self.setWindowTitle(self.tr('Subversion Status')) self.process.start('svn', args) procStarted = self.process.waitForStarted(5000) @@ -392,8 +392,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn')) @@ -423,7 +423,7 @@ self.refreshButton.setEnabled(True) self.__statusFilters.sort() - self.__statusFilters.insert(0, "<{0}>".format(self.trUtf8("all"))) + self.__statusFilters.insert(0, "<{0}>".format(self.tr("all"))) self.statusFilterCombo.addItems(self.__statusFilters) for act in self.menuactions: @@ -619,7 +619,7 @@ @param txt selected status filter (string) """ - if txt == "<{0}>".format(self.trUtf8("all")): + if txt == "<{0}>".format(self.tr("all")): for topIndex in range(self.statusList.topLevelItemCount()): topItem = self.statusList.topLevelItem(topIndex) topItem.setHidden(False) @@ -709,9 +709,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Commit"), - self.trUtf8("""There are no entries selected to be""" - """ committed.""")) + self.tr("Commit"), + self.tr("""There are no entries selected to be""" + """ committed.""")) return if Preferences.getVCS("AutoSaveFiles"): @@ -749,9 +749,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Add"), - self.trUtf8("""There are no unversioned entries""" - """ available/selected.""")) + self.tr("Add"), + self.tr("""There are no unversioned entries""" + """ available/selected.""")) return self.vcs.vcsAdd(names) @@ -771,9 +771,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return self.vcs.vcsRevert(names) @@ -795,9 +795,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Revert"), - self.trUtf8("""There are no missing entries""" - """ available/selected.""")) + self.tr("Revert"), + self.tr("""There are no missing entries""" + """ available/selected.""")) return self.vcs.vcsRevert(names) @@ -813,9 +813,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Differences"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Differences"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return if self.diff is None: @@ -834,16 +834,16 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""There are no uncommitted changes""" - """ available/selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""There are no uncommitted changes""" + """ available/selected.""")) return elif len(names) > 1: E5MessageBox.information( self, - self.trUtf8("Side-by-Side Diff"), - self.trUtf8("""Only one file with uncommitted changes""" - """ must be selected.""")) + self.tr("Side-by-Side Diff"), + self.tr("""Only one file with uncommitted changes""" + """ must be selected.""")) return self.vcs.svnSbsDiff(names[0]) @@ -857,9 +857,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Lock"), - self.trUtf8("""There are no unlocked files""" - """ available/selected.""")) + self.tr("Lock"), + self.tr("""There are no unlocked files""" + """ available/selected.""")) return self.vcs.svnLock(names, parent=self) @@ -874,9 +874,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Unlock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Unlock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnUnlock(names, parent=self) @@ -892,9 +892,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Break Lock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Break Lock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnUnlock(names, parent=self, breakIt=True) @@ -910,9 +910,9 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Steal Lock"), - self.trUtf8("""There are no locked files""" - """ available/selected.""")) + self.tr("Steal Lock"), + self.tr("""There are no locked files""" + """ available/selected.""")) return self.vcs.svnLock(names, parent=self, stealIt=True) @@ -927,8 +927,8 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Remove from Changelist"), - self.trUtf8( + self.tr("Remove from Changelist"), + self.tr( """There are no files available/selected not """ """belonging to a changelist.""" ) @@ -946,8 +946,8 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Remove from Changelist"), - self.trUtf8( + self.tr("Remove from Changelist"), + self.tr( """There are no files available/selected belonging""" """ to a changelist.""" )
--- a/Plugins/VcsPlugins/vcsSubversion/SvnStatusMonitorThread.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnStatusMonitorThread.py Sat Jan 11 11:55:33 2014 +0100 @@ -109,7 +109,7 @@ if name not in states: self.statusList.append(" {0}".format(name)) self.reportedStates = states - return True, self.trUtf8( + return True, self.tr( "Subversion status checked successfully (using svn)") else: process.kill() @@ -121,5 +121,5 @@ else: process.kill() process.waitForFinished() - return False, self.trUtf8( + return False, self.tr( "Could not start the Subversion process.")
--- a/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnTagBranchListDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -82,7 +82,7 @@ self.intercept = False if not tags: - self.setWindowTitle(self.trUtf8("Subversion Branches List")) + self.setWindowTitle(self.tr("Subversion Branches List")) self.activateWindow() self.tagsList = tagsList @@ -95,8 +95,8 @@ if reposURL is None: E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The list operation""" """ will be aborted""")) @@ -114,8 +114,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The list operation will""" """ be aborted""")) @@ -131,9 +131,9 @@ else: reposPath, ok = QInputDialog.getText( self, - self.trUtf8("Subversion List"), - self.trUtf8("Enter the repository URL containing the tags" - " or branches"), + self.tr("Subversion List"), + self.tr("Enter the repository URL containing the tags" + " or branches"), QLineEdit.Normal, self.vcs.svnNormalizeURL(reposURL)) if not ok: @@ -142,9 +142,9 @@ if not reposPath: E5MessageBox.critical( self, - self.trUtf8("Subversion List"), - self.trUtf8("""The repository URL is empty.""" - """ Aborting...""")) + self.tr("Subversion List"), + self.tr("""The repository URL is empty.""" + """ Aborting...""")) self.close() return args.append(reposPath) @@ -159,8 +159,8 @@ self.inputGroup.hide() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format('svn'))
--- a/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -50,8 +50,8 @@ if reposURL is None: E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The operation will""" """ be aborted""")) @@ -64,8 +64,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The list operation will""" """ be aborted"""))
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py Sat Jan 11 11:55:33 2014 +0100 @@ -170,14 +170,14 @@ return True, errMsg else: if finished: - errMsg = self.trUtf8( + errMsg = self.tr( "The svn process finished with the exit code {0}")\ .format(process.exitCode()) else: - errMsg = self.trUtf8( + errMsg = self.tr( "The svn process did not finish within 30s.") else: - errMsg = self.trUtf8("Could not start the svn executable.") + errMsg = self.tr("Could not start the svn executable.") return False, errMsg @@ -207,8 +207,8 @@ if not success: E5MessageBox.critical( self.__ui, - self.trUtf8("Create project in repository"), - self.trUtf8( + self.tr("Create project in repository"), + self.tr( """The project could not be created in the repository.""" """ Maybe the given repository doesn't exist or the""" """ repository server is down.""")) @@ -231,8 +231,8 @@ if not os.path.isfile(pfn): E5MessageBox.critical( self.__ui, - self.trUtf8("New project"), - self.trUtf8( + self.tr("New project"), + self.tr( """The project could not be checked out of the""" """ repository.<br />""" """Restoring the original contents.""")) @@ -306,7 +306,7 @@ QProcess(), "svn", args, os.path.join(tmpDir, project)) else: dia = SvnDialog( - self.trUtf8('Importing project into Subversion repository')) + self.tr('Importing project into Subversion repository')) res = dia.startProcess(args, os.path.join(tmpDir, project)) if res: dia.exec_() @@ -344,8 +344,8 @@ not tag.startswith('branches'): type, ok = QInputDialog.getItem( None, - self.trUtf8("Subversion Checkout"), - self.trUtf8( + self.tr("Subversion Checkout"), + self.tr( "The tag must be a normal tag (tags) or" " a branch tag (branches)." " Please select from the list."), @@ -369,7 +369,7 @@ return self.startSynchronizedProcess(QProcess(), 'svn', args) else: dia = SvnDialog( - self.trUtf8('Checking project out of Subversion repository')) + self.tr('Checking project out of Subversion repository')) res = dia.startProcess(args) if res: dia.exec_() @@ -400,8 +400,8 @@ not tag.startswith('branches'): type, ok = QInputDialog.getItem( None, - self.trUtf8("Subversion Export"), - self.trUtf8( + self.tr("Subversion Export"), + self.tr( "The tag must be a normal tag (tags) or" " a branch tag (branches)." " Please select from the list."), @@ -422,7 +422,7 @@ args.append(projectDir) dia = SvnDialog( - self.trUtf8('Exporting project from Subversion repository')) + self.tr('Exporting project from Subversion repository')) res = dia.startProcess(args) if res: dia.exec_() @@ -492,8 +492,8 @@ if not ok: res = E5MessageBox.yesNo( self.__ui, - self.trUtf8("Commit Changes"), - self.trUtf8( + self.tr("Commit Changes"), + self.tr( """The commit affects files, that have unsaved""" """ changes. Shall the commit be continued?"""), icon=E5MessageBox.Warning) @@ -541,7 +541,7 @@ self.startSynchronizedProcess(QProcess(), "svn", args, dname) else: dia = SvnDialog( - self.trUtf8('Commiting changes to Subversion repository')) + self.tr('Commiting changes to Subversion repository')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -578,7 +578,7 @@ res = False else: dia = SvnDialog( - self.trUtf8('Synchronizing with the Subversion repository')) + self.tr('Synchronizing with the Subversion repository')) res = dia.startProcess(args, dname, True) if res: dia.exec_() @@ -674,8 +674,8 @@ self.startSynchronizedProcess(QProcess(), "svn", args, wdir) else: dia = SvnDialog( - self.trUtf8('Adding files/directories to the Subversion' - ' repository')) + self.tr('Adding files/directories to the Subversion' + ' repository')) res = dia.startProcess(args, wdir) if res: dia.exec_() @@ -764,7 +764,7 @@ args.append(path) dia = SvnDialog( - self.trUtf8('Adding directory trees to the Subversion repository')) + self.tr('Adding directory trees to the Subversion repository')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -799,8 +799,8 @@ res = self.startSynchronizedProcess(QProcess(), "svn", args) else: dia = SvnDialog( - self.trUtf8('Removing files/directories from the Subversion' - ' repository')) + self.tr('Removing files/directories from the Subversion' + ' repository')) res = dia.startProcess(args) if res: dia.exec_() @@ -858,7 +858,7 @@ if noDialog: res = self.startSynchronizedProcess(QProcess(), "svn", args) else: - dia = SvnDialog(self.trUtf8('Moving {0}') + dia = SvnDialog(self.tr('Moving {0}') .format(name)) res = dia.startProcess(args) if res: @@ -887,8 +887,8 @@ isFile = os.path.isfile(name) noEntries, ok = QInputDialog.getInt( None, - self.trUtf8("Subversion Log"), - self.trUtf8("Select number of entries to show."), + self.tr("Subversion Log"), + self.tr("Select number of entries to show."), self.getPlugin().getPreferences("LogLimit"), 1, 999999, 1) if ok: from .SvnLogDialog import SvnLogDialog @@ -953,8 +953,8 @@ if reposURL is None: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The tag operation""" """ will be aborted""")) @@ -980,8 +980,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The tag operation will""" """ be aborted""")) @@ -1013,7 +1013,7 @@ args.append('Deleted tag <{0}>'.format(tag)) args.append(url) - dia = SvnDialog(self.trUtf8('Tagging {0} in the Subversion repository') + dia = SvnDialog(self.tr('Tagging {0} in the Subversion repository') .format(name)) res = dia.startProcess(args) if res: @@ -1044,19 +1044,19 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Revert changes"), - self.trUtf8("Do you really want to revert all changes to" - " these files or directories?"), + self.tr("Revert changes"), + self.tr("Do you really want to revert all changes to" + " these files or directories?"), names) yes = dlg.exec_() == QDialog.Accepted else: yes = E5MessageBox.yesNo( None, - self.trUtf8("Revert changes"), - self.trUtf8("""Do you really want to revert all changes of""" - """ the project?""")) + self.tr("Revert changes"), + self.tr("""Do you really want to revert all changes of""" + """ the project?""")) if yes: - dia = SvnDialog(self.trUtf8('Reverting changes')) + dia = SvnDialog(self.tr('Reverting changes')) res = dia.startProcess(args) if res: dia.exec_() @@ -1075,8 +1075,8 @@ if reposURL is None: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository could not be""" """ retrieved from the working copy. The switch""" """ operation will be aborted""")) @@ -1102,8 +1102,8 @@ if not rx_base.exactMatch(reposURL): E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Error"), - self.trUtf8( + self.tr("Subversion Error"), + self.tr( """The URL of the project repository has an""" """ invalid format. The switch operation will""" """ be aborted""")) @@ -1131,7 +1131,7 @@ args.append(url) args.append(name) - dia = SvnDialog(self.trUtf8('Switching to {0}') + dia = SvnDialog(self.tr('Switching to {0}') .format(tn)) res = dia.startProcess(args, setLanguage=True) if res: @@ -1196,7 +1196,7 @@ args.append(self.__svnURL(urlrev2)) args.append(fname) - dia = SvnDialog(self.trUtf8('Merging {0}').format(name)) + dia = SvnDialog(self.tr('Merging {0}').format(name)) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -1462,7 +1462,7 @@ self.addArguments(args, self.options['global']) args.append(name) - dia = SvnDialog(self.trUtf8('Cleaning up {0}') + dia = SvnDialog(self.tr('Cleaning up {0}') .format(name)) res = dia.startProcess(args) if res: @@ -1492,7 +1492,7 @@ args = [] self.addArguments(args, commandList) - dia = SvnDialog(self.trUtf8('Subversion command')) + dia = SvnDialog(self.tr('Subversion command')) res = dia.startProcess(args, wd) if res: dia.exec_() @@ -1662,7 +1662,7 @@ args.append('--recursive') args.append(name) - dia = SvnDialog(self.trUtf8('Resolving conficts')) + dia = SvnDialog(self.tr('Resolving conficts')) res = dia.startProcess(args) if res: dia.exec_() @@ -1693,7 +1693,7 @@ args.append(name) args.append(target) - dia = SvnDialog(self.trUtf8('Copying {0}') + dia = SvnDialog(self.tr('Copying {0}') .format(name)) res = dia.startProcess(args) if res: @@ -1734,9 +1734,9 @@ if not propName: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Set Property"), - self.trUtf8("""You have to supply a property name.""" - """ Aborting.""")) + self.tr("Subversion Set Property"), + self.tr("""You have to supply a property name.""" + """ Aborting.""")) return args = [] @@ -1755,7 +1755,7 @@ dname, fname = self.splitPath(name) args.append(fname) - dia = SvnDialog(self.trUtf8('Subversion Set Property')) + dia = SvnDialog(self.tr('Subversion Set Property')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -1769,8 +1769,8 @@ """ propName, ok = QInputDialog.getText( None, - self.trUtf8("Subversion Delete Property"), - self.trUtf8("Enter property name"), + self.tr("Subversion Delete Property"), + self.tr("Enter property name"), QLineEdit.Normal) if not ok: @@ -1779,9 +1779,9 @@ if not propName: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Delete Property"), - self.trUtf8("""You have to supply a property name.""" - """ Aborting.""")) + self.tr("Subversion Delete Property"), + self.tr("""You have to supply a property name.""" + """ Aborting.""")) return args = [] @@ -1797,7 +1797,7 @@ dname, fname = self.splitPath(name) args.append(fname) - dia = SvnDialog(self.trUtf8('Subversion Delete Property')) + dia = SvnDialog(self.tr('Subversion Delete Property')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -1954,10 +1954,10 @@ process.readAllStandardError(), Preferences.getSystem("IOEncoding"), 'replace') else: - error = self.trUtf8( + error = self.tr( "The svn process did not finish within 30s.") else: - error = self.trUtf8( + error = self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.').format('svn') @@ -1994,7 +1994,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), + self.tr("Subversion Side-by-Side Difference"), error) return name1 = "{0} (rev. {1})".format(name, rev1 and rev1 or ".") @@ -2004,7 +2004,7 @@ if error: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), + self.tr("Subversion Side-by-Side Difference"), error) return name2 = "{0} (rev. {1})".format(name, rev2) @@ -2017,8 +2017,8 @@ except IOError: E5MessageBox.critical( self.__ui, - self.trUtf8("Subversion Side-by-Side Difference"), - self.trUtf8( + self.tr("Subversion Side-by-Side Difference"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(name)) return @@ -2065,7 +2065,7 @@ args.append(fname) dia = SvnDialog( - self.trUtf8('Locking in the Subversion repository'), parent) + self.tr('Locking in the Subversion repository'), parent) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -2093,7 +2093,7 @@ args.append(fname) dia = SvnDialog( - self.trUtf8('Unlocking in the Subversion repository'), parent) + self.tr('Unlocking in the Subversion repository'), parent) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -2117,7 +2117,7 @@ args.append(newUrl) args.append(projectPath) - dia = SvnDialog(self.trUtf8('Relocating')) + dia = SvnDialog(self.tr('Relocating')) res = dia.startProcess(args) if res: dia.exec_() @@ -2136,8 +2136,8 @@ if url is None: url, ok = QInputDialog.getText( None, - self.trUtf8("Repository Browser"), - self.trUtf8("Enter the repository URL."), + self.tr("Repository Browser"), + self.tr("Enter the repository URL."), QLineEdit.Normal) if not ok or not url: return @@ -2168,7 +2168,7 @@ dname, fname = self.splitPath(names) args.append(fname) - dia = SvnDialog(self.trUtf8('Remove from changelist')) + dia = SvnDialog(self.tr('Remove from changelist')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -2184,8 +2184,8 @@ """ clname, ok = QInputDialog.getItem( None, - self.trUtf8("Add to changelist"), - self.trUtf8("Enter name of the changelist:"), + self.tr("Add to changelist"), + self.tr("Enter name of the changelist:"), sorted(self.svnGetChangelists()), 0, True) if not ok or not clname: @@ -2203,7 +2203,7 @@ dname, fname = self.splitPath(names) args.append(fname) - dia = SvnDialog(self.trUtf8('Remove from changelist')) + dia = SvnDialog(self.tr('Remove from changelist')) res = dia.startProcess(args, dname) if res: dia.exec_() @@ -2268,7 +2268,7 @@ args.append("upgrade") args.append(".") - dia = SvnDialog(self.trUtf8('Upgrade')) + dia = SvnDialog(self.tr('Upgrade')) res = dia.startProcess(args, path) if res: dia.exec_()
--- a/Plugins/ViewManagerPlugins/Listspace/Listspace.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/ViewManagerPlugins/Listspace/Listspace.py Sat Jan 11 11:55:33 2014 +0100 @@ -227,34 +227,34 @@ self.__menu = QMenu(self) self.__menu.addAction( UI.PixmapCache.getIcon("tabClose.png"), - self.trUtf8('Close'), self.__contextMenuClose) + self.tr('Close'), self.__contextMenuClose) self.closeOthersMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("tabCloseOther.png"), - self.trUtf8("Close Others"), + self.tr("Close Others"), self.__contextMenuCloseOthers) self.__menu.addAction( - self.trUtf8('Close All'), self.__contextMenuCloseAll) + self.tr('Close All'), self.__contextMenuCloseAll) self.__menu.addSeparator() self.saveMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('Save'), self.__contextMenuSave) + self.tr('Save'), self.__contextMenuSave) self.__menu.addAction( UI.PixmapCache.getIcon("fileSaveAs.png"), - self.trUtf8('Save As...'), self.__contextMenuSaveAs) + self.tr('Save As...'), self.__contextMenuSaveAs) self.__menu.addAction( UI.PixmapCache.getIcon("fileSaveAll.png"), - self.trUtf8('Save All'), self.__contextMenuSaveAll) + self.tr('Save All'), self.__contextMenuSaveAll) self.__menu.addSeparator() self.openRejectionsMenuAct = self.__menu.addAction( - self.trUtf8("Open 'rejection' file"), + self.tr("Open 'rejection' file"), self.__contextMenuOpenRejections) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8('Print'), self.__contextMenuPrintFile) + self.tr('Print'), self.__contextMenuPrintFile) self.__menu.addSeparator() self.copyPathAct = self.__menu.addAction( - self.trUtf8("Copy Path to Clipboard"), + self.tr("Copy Path to Clipboard"), self.__contextMenuCopyPathToClipboard) def __showMenu(self, point): @@ -384,13 +384,13 @@ if fn is None: if not noName: self.untitledCount += 1 - noName = self.trUtf8("Untitled {0}").format(self.untitledCount) + noName = self.tr("Untitled {0}").format(self.untitledCount) self.viewlist.addItem(noName) editor.setNoName(noName) else: txt = os.path.basename(fn) if not QFileInfo(fn).isWritable(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) itm = QListWidgetItem(txt) itm.setToolTip(fn) self.viewlist.addItem(itm) @@ -505,7 +505,7 @@ index = self.editors.index(editor) txt = os.path.basename(newName) if not QFileInfo(newName).isWritable(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) itm = self.viewlist.item(index) itm.setText(txt) itm.setToolTip(newName)
--- a/Plugins/ViewManagerPlugins/Tabview/Tabview.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/ViewManagerPlugins/Tabview/Tabview.py Sat Jan 11 11:55:33 2014 +0100 @@ -189,7 +189,7 @@ self.navigationButton = QToolButton(self) self.navigationButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) - self.navigationButton.setToolTip(self.trUtf8("Show a navigation menu")) + self.navigationButton.setToolTip(self.tr("Show a navigation menu")) self.navigationButton.setPopupMode(QToolButton.InstantPopup) self.navigationButton.setMenu(self.__navigationMenu) self.navigationButton.setEnabled(False) @@ -200,7 +200,7 @@ self.closeButton = QToolButton(self) self.closeButton.setIcon(UI.PixmapCache.getIcon("close.png")) self.closeButton.setToolTip( - self.trUtf8("Close the current editor")) + self.tr("Close the current editor")) self.closeButton.setEnabled(False) self.closeButton.clicked[bool].connect(self.__closeButtonClicked) self.rightCornerWidgetLayout.addWidget(self.closeButton) @@ -232,46 +232,46 @@ self.__menu = QMenu(self) self.leftMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("1leftarrow.png"), - self.trUtf8('Move Left'), self.__contextMenuMoveLeft) + self.tr('Move Left'), self.__contextMenuMoveLeft) self.rightMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("1rightarrow.png"), - self.trUtf8('Move Right'), self.__contextMenuMoveRight) + self.tr('Move Right'), self.__contextMenuMoveRight) self.firstMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("2leftarrow.png"), - self.trUtf8('Move First'), self.__contextMenuMoveFirst) + self.tr('Move First'), self.__contextMenuMoveFirst) self.lastMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("2rightarrow.png"), - self.trUtf8('Move Last'), self.__contextMenuMoveLast) + self.tr('Move Last'), self.__contextMenuMoveLast) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("tabClose.png"), - self.trUtf8('Close'), self.__contextMenuClose) + self.tr('Close'), self.__contextMenuClose) self.closeOthersMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("tabCloseOther.png"), - self.trUtf8("Close Others"), self.__contextMenuCloseOthers) + self.tr("Close Others"), self.__contextMenuCloseOthers) self.__menu.addAction( - self.trUtf8('Close All'), self.__contextMenuCloseAll) + self.tr('Close All'), self.__contextMenuCloseAll) self.__menu.addSeparator() self.saveMenuAct = self.__menu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('Save'), self.__contextMenuSave) + self.tr('Save'), self.__contextMenuSave) self.__menu.addAction( UI.PixmapCache.getIcon("fileSaveAs.png"), - self.trUtf8('Save As...'), self.__contextMenuSaveAs) + self.tr('Save As...'), self.__contextMenuSaveAs) self.__menu.addAction( UI.PixmapCache.getIcon("fileSaveAll.png"), - self.trUtf8('Save All'), self.__contextMenuSaveAll) + self.tr('Save All'), self.__contextMenuSaveAll) self.__menu.addSeparator() self.openRejectionsMenuAct = self.__menu.addAction( - self.trUtf8("Open 'rejection' file"), + self.tr("Open 'rejection' file"), self.__contextMenuOpenRejections) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8('Print'), self.__contextMenuPrintFile) + self.tr('Print'), self.__contextMenuPrintFile) self.__menu.addSeparator() self.copyPathAct = self.__menu.addAction( - self.trUtf8("Copy Path to Clipboard"), + self.tr("Copy Path to Clipboard"), self.__contextMenuCopyPathToClipboard) def __showContextMenu(self, coord, index): @@ -413,7 +413,7 @@ if len(txt) > maxFileNameChars: txt = "...{0}".format(txt[-maxFileNameChars:]) if editor.isReadOnly(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) assembly = editor.parent() index = self.indexOf(assembly) @@ -854,7 +854,7 @@ if fn is None: if not noName: self.untitledCount += 1 - noName = self.trUtf8("Untitled {0}").format(self.untitledCount) + noName = self.tr("Untitled {0}").format(self.untitledCount) self.currentTabWidget.addTab(win, noName) editor.setNoName(noName) else: @@ -865,7 +865,7 @@ if len(txt) > self.maxFileNameChars: txt = "...{0}".format(txt[-self.maxFileNameChars:]) if not QFileInfo(fn).isWritable(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) self.currentTabWidget.addTab(win, txt) index = self.currentTabWidget.indexOf(win) self.currentTabWidget.setTabToolTip(index, fn) @@ -895,7 +895,7 @@ if fn is None: if not noName: self.untitledCount += 1 - noName = self.trUtf8("Untitled {0}").format(self.untitledCount) + noName = self.tr("Untitled {0}").format(self.untitledCount) tabWidget.insertWidget(index, win, noName) editor.setNoName(noName) else: @@ -906,7 +906,7 @@ if len(txt) > self.maxFileNameChars: txt = "...{0}".format(txt[-self.maxFileNameChars:]) if not QFileInfo(fn).isWritable(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) nindex = tabWidget.insertWidget(index, win, txt) tabWidget.setTabToolTip(nindex, fn) tabWidget.setCurrentWidget(win) @@ -1233,7 +1233,7 @@ if len(txt) > self.maxFileNameChars: txt = "...{0}".format(txt[-self.maxFileNameChars:]) if not QFileInfo(fn).isWritable(): - txt = self.trUtf8("{0} (ro)").format(txt) + txt = self.tr("{0} (ro)").format(txt) tabWidget.setTabText(index, txt) def getTabWidgetById(self, id_):
--- a/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/ColorDialogWizard/ColorDialogWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -34,7 +34,7 @@ self.setupUi(self) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) def on_buttonBox_clicked(self, button): """ @@ -66,8 +66,8 @@ except: E5MessageBox.critical( self, - self.trUtf8("QColorDialog Wizard Error"), - self.trUtf8( + self.tr("QColorDialog Wizard Error"), + self.tr( """<p>The colour <b>{0}</b> is not valid.</p>""") .format(coStr)) @@ -148,7 +148,7 @@ else: code += '{0}QColor(Qt.white),{1}'.format(istring, os.linesep) code += '{0}{1},{2}'.format(istring, parent, os.linesep) - code += '{0}self.trUtf8("{1}"),{2}'.format( + code += '{0}self.tr("{1}"),{2}'.format( istring, self.eTitle.text(), os.linesep) code += '{0}QColorDialog.ColorDialogOptions(' \ 'QColorDialog.ShowAlphaChannel)'.format(istring) @@ -163,7 +163,7 @@ code += '{0}{1},{2}'.format( istring, self.eRGB.text(), os.linesep) code += '{0}{1},{2}'.format(istring, parent, os.linesep) - code += '{0}self.trUtf8("{1}"),{2}'.format( + code += '{0}self.tr("{1}"),{2}'.format( istring, self.eTitle.text(), os.linesep) code += '{0}QColorDialog.ColorDialogOptions(' \ 'QColorDialog.ShowAlphaChannel)'.format(istring)
--- a/Plugins/WizardPlugins/E5MessageBoxWizard/E5MessageBoxWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/E5MessageBoxWizard/E5MessageBoxWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,25 +32,25 @@ # keep the following three lists in sync self.buttonsList = [ - self.trUtf8("No button"), - self.trUtf8("Abort"), - self.trUtf8("Apply"), - self.trUtf8("Cancel"), - self.trUtf8("Close"), - self.trUtf8("Discard"), - self.trUtf8("Help"), - self.trUtf8("Ignore"), - self.trUtf8("No"), - self.trUtf8("No to all"), - self.trUtf8("Ok"), - self.trUtf8("Open"), - self.trUtf8("Reset"), - self.trUtf8("Restore defaults"), - self.trUtf8("Retry"), - self.trUtf8("Save"), - self.trUtf8("Save all"), - self.trUtf8("Yes"), - self.trUtf8("Yes to all"), + self.tr("No button"), + self.tr("Abort"), + self.tr("Apply"), + self.tr("Cancel"), + self.tr("Close"), + self.tr("Discard"), + self.tr("Help"), + self.tr("Ignore"), + self.tr("No"), + self.tr("No to all"), + self.tr("Ok"), + self.tr("Open"), + self.tr("Reset"), + self.tr("Restore defaults"), + self.tr("Retry"), + self.tr("Save"), + self.tr("Save all"), + self.tr("Yes"), + self.tr("Yes to all"), ] self.buttonsCodeListBinary = [ E5MessageBox.NoButton, @@ -98,7 +98,7 @@ self.defaultCombo.addItems(self.buttonsList) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) self.__enabledGroups() @@ -511,11 +511,11 @@ resvar, os.linesep) msgdlg += '{0}{1},{2}'.format(istring, parent, os.linesep) - msgdlg += '{0}self.trUtf8("{1}")'.format( + msgdlg += '{0}self.tr("{1}")'.format( istring, self.eCaption.text()) if not self.rAboutQt.isChecked(): - msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( + msgdlg += ',{0}{1}self.tr("""{2}""")'.format( os.linesep, istring, self.eMessage.toPlainText()) if self.rInformation.isChecked() or \ @@ -548,9 +548,9 @@ msgdlg = "{0} = E5MessageBox.E5MessageBox({1}".format( resvar, os.linesep) msgdlg += '{0}{1},{2}'.format(istring, icon, os.linesep) - msgdlg += '{0}self.trUtf8("{1}")'.format( + msgdlg += '{0}self.tr("{1}")'.format( istring, self.eCaption.text()) - msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( + msgdlg += ',{0}{1}self.tr("""{2}""")'.format( os.linesep, istring, self.eMessage.toPlainText()) if self.modalCheck.isChecked(): msgdlg += ',{0}{1}modal=True'.format(os.linesep, istring)
--- a/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/FileDialogWizard/FileDialogWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -68,7 +68,7 @@ self.cFilters.toggled[bool].connect(self.__toggleGroupsAndTest) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) def __adjustOptions(self, options): """ @@ -297,7 +297,7 @@ if not self.eCaption.text(): code += '"",{0}{1}'.format(os.linesep, istring) else: - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) if not self.eStartWith.text(): code += '"",{0}{1}'.format(os.linesep, istring) @@ -305,7 +305,7 @@ if self.cStartWith.isChecked(): fmt = '{0},{1}{2}' else: - fmt = 'self.trUtf8("{0}"),{1}{2}' + fmt = 'self.tr("{0}"),{1}{2}' code += fmt.format(self.eStartWith.text(), os.linesep, istring) if self.eFilters.text() == "": code += '""' @@ -313,7 +313,7 @@ if self.cFilters.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' code += fmt.format(self.eFilters.text()) if self.rfOpenFile.isChecked() or self.__pyqtVariant == 5: if self.eInitialFilter.text() == "": @@ -322,7 +322,7 @@ if self.cInitialFilter.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' filter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, filter) if not self.cSymlinks.isChecked(): @@ -341,7 +341,7 @@ if not self.eCaption.text(): code += '"",{0}{1}'.format(os.linesep, istring) else: - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) if not self.eStartWith.text(): code += '"",{0}{1}'.format(os.linesep, istring) @@ -349,7 +349,7 @@ if self.cStartWith.isChecked(): fmt = '{0},{1}{2}' else: - fmt = 'self.trUtf8("{0}"),{1}{2}' + fmt = 'self.tr("{0}"),{1}{2}' code += fmt.format(self.eStartWith.text(), os.linesep, istring) if not self.eFilters.text(): code += '""' @@ -357,7 +357,7 @@ if self.cFilters.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' code += fmt.format(self.eFilters.text()) if self.rfOpenFiles.isChecked() or self.__pyqtVariant == 5: if self.eInitialFilter.text() == "": @@ -366,7 +366,7 @@ if self.cInitialFilter.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' filter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, filter) if not self.cSymlinks.isChecked(): @@ -385,7 +385,7 @@ if not self.eCaption.text(): code += '"",{0}{1}'.format(os.linesep, istring) else: - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) if not self.eStartWith.text(): code += '"",{0}{1}'.format(os.linesep, istring) @@ -393,7 +393,7 @@ if self.cStartWith.isChecked(): fmt = '{0},{1}{2}' else: - fmt = 'self.trUtf8("{0}"),{1}{2}' + fmt = 'self.tr("{0}"),{1}{2}' code += fmt.format(self.eStartWith.text(), os.linesep, istring) if not self.eFilters.text(): code += '""' @@ -401,7 +401,7 @@ if self.cFilters.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' code += fmt.format(self.eFilters.text()) if self.rfSaveFile.isChecked() or self.__pyqtVariant == 5: if self.eInitialFilter.text() == "": @@ -410,7 +410,7 @@ if self.cInitialFilter.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' filter = fmt.format(self.eInitialFilter.text()) code += ',{0}{1}{2}'.format(os.linesep, istring, filter) if (not self.cSymlinks.isChecked()) or \ @@ -432,7 +432,7 @@ if not self.eCaption.text(): code += '"",{0}{1}'.format(os.linesep, istring) else: - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) if not self.eWorkDir.text(): code += '""' @@ -440,7 +440,7 @@ if self.cWorkDir.isChecked(): fmt = '{0}' else: - fmt = 'self.trUtf8("{0}")' + fmt = 'self.tr("{0}")' code += fmt.format(self.eWorkDir.text()) code += ',{0}{1}QFileDialog.Options('.format(os.linesep, istring) if not self.cSymlinks.isChecked():
--- a/Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,7 +32,7 @@ self.setupUi(self) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) self.font = None @@ -122,7 +122,7 @@ if title: code += ',{0}{1}{2}'.format( os.linesep, istring, parent) - code += ',{0}{1}self.trUtf8("{2}")'.format( + code += ',{0}{1}self.tr("{2}")'.format( os.linesep, istring, title) elif parent != "None": code += ',{0}{1}{2}'.format(
--- a/Plugins/WizardPlugins/InputDialogWizard/InputDialogWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/InputDialogWizard/InputDialogWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -41,7 +41,7 @@ QDoubleValidator(-2147483647, 2147483647, 99, self.eDoubleTo)) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) @pyqtSlot(bool) def on_rItem_toggled(self, checked): @@ -140,9 +140,9 @@ if self.rText.isChecked(): code += 'getText({0}{1}'.format(os.linesep, istring) code += '{0},{1}{2}'.format(parent, os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eLabel.text(), os.linesep, istring) if self.rEchoNormal.isChecked(): code += 'QLineEdit.Normal' @@ -151,15 +151,15 @@ else: code += 'QLineEdit.Password' if self.eTextDefault.text(): - code += ',{0}{1}self.trUtf8("{2}")'.format( + code += ',{0}{1}self.tr("{2}")'.format( os.linesep, istring, self.eTextDefault.text()) code += '){0}'.format(estring) elif self.rInteger.isChecked(): code += 'getInt({0}{1}'.format(os.linesep, istring) code += '{0},{1}{2}'.format(parent, os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eLabel.text(), os.linesep, istring) code += '{0:d}, {1:d}, {2:d}, {3:d}){4}'.format( self.sIntDefault.value(), self.sIntFrom.value(), @@ -179,9 +179,9 @@ doubleTo = 2147483647 code += 'getDouble({0}{1}'.format(os.linesep, istring) code += '{0},{1}{2}'.format(parent, os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eLabel.text(), os.linesep, istring) code += '{0}, {1}, {2}, {3:d}){4}'.format( doubleDefault, doubleFrom, doubleTo, @@ -189,9 +189,9 @@ elif self.rItem.isChecked(): code += 'getItem({0}{1}'.format(os.linesep, istring) code += '{0},{1}{2}'.format(parent, os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eCaption.text(), os.linesep, istring) - code += 'self.trUtf8("{0}"),{1}{2}'.format( + code += 'self.tr("{0}"),{1}{2}'.format( self.eLabel.text(), os.linesep, istring) code += '{0},{1}{2}'.format( self.eVariable.text(), os.linesep, istring)
--- a/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/MessageBoxWizard/MessageBoxWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -33,25 +33,25 @@ # keep the following three lists in sync self.buttonsList = [ - self.trUtf8("No button"), - self.trUtf8("Abort"), - self.trUtf8("Apply"), - self.trUtf8("Cancel"), - self.trUtf8("Close"), - self.trUtf8("Discard"), - self.trUtf8("Help"), - self.trUtf8("Ignore"), - self.trUtf8("No"), - self.trUtf8("No to all"), - self.trUtf8("Ok"), - self.trUtf8("Open"), - self.trUtf8("Reset"), - self.trUtf8("Restore defaults"), - self.trUtf8("Retry"), - self.trUtf8("Save"), - self.trUtf8("Save all"), - self.trUtf8("Yes"), - self.trUtf8("Yes to all"), + self.tr("No button"), + self.tr("Abort"), + self.tr("Apply"), + self.tr("Cancel"), + self.tr("Close"), + self.tr("Discard"), + self.tr("Help"), + self.tr("Ignore"), + self.tr("No"), + self.tr("No to all"), + self.tr("Ok"), + self.tr("Open"), + self.tr("Reset"), + self.tr("Restore defaults"), + self.tr("Retry"), + self.tr("Save"), + self.tr("Save all"), + self.tr("Yes"), + self.tr("Yes to all"), ] self.buttonsCodeListBinary = [ QMessageBox.NoButton, @@ -99,7 +99,7 @@ self.defaultCombo.addItems(self.buttonsList) self.bTest = self.buttonBox.addButton( - self.trUtf8("Test"), QDialogButtonBox.ActionRole) + self.tr("Test"), QDialogButtonBox.ActionRole) def __testQt42(self): """ @@ -340,15 +340,15 @@ if self.rAboutQt.isChecked(): if self.eCaption.text(): msgdlg += '{0}{1}{2}'.format(os.linesep, istring, parent) - msgdlg += ',{0}{1}self.trUtf8("{2}")'.format( + msgdlg += ',{0}{1}self.tr("{2}")'.format( os.linesep, istring, self.eCaption.text()) else: msgdlg += parent else: msgdlg += '{0}{1}{2}'.format(os.linesep, istring, parent) - msgdlg += ',{0}{1}self.trUtf8("{2}")'.format( + msgdlg += ',{0}{1}self.tr("{2}")'.format( os.linesep, istring, self.eCaption.text()) - msgdlg += ',{0}{1}self.trUtf8("""{2}""")'.format( + msgdlg += ',{0}{1}self.tr("""{2}""")'.format( os.linesep, istring, self.eMessage.toPlainText()) if not self.rAbout.isChecked() and not self.rAboutQt.isChecked(): msgdlg += self.__getButtonCode(istring, indString)
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardCharactersDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,18 +43,18 @@ self.comboItems = [] self.singleComboItems = [] # these are in addition to the above - self.comboItems.append(self.trUtf8("Normal character")) + self.comboItems.append(self.tr("Normal character")) self.comboItems.append( - self.trUtf8("Unicode character in hexadecimal notation")) + self.tr("Unicode character in hexadecimal notation")) self.comboItems.append( - self.trUtf8("Unicode character in octal notation")) - self.singleComboItems.append(self.trUtf8("---")) - self.singleComboItems.append(self.trUtf8("Bell character (\\a)")) - self.singleComboItems.append(self.trUtf8("Page break (\\f)")) - self.singleComboItems.append(self.trUtf8("Line feed (\\n)")) - self.singleComboItems.append(self.trUtf8("Carriage return (\\r)")) - self.singleComboItems.append(self.trUtf8("Horizontal tabulator (\\t)")) - self.singleComboItems.append(self.trUtf8("Vertical tabulator (\\v)")) + self.tr("Unicode character in octal notation")) + self.singleComboItems.append(self.tr("---")) + self.singleComboItems.append(self.tr("Bell character (\\a)")) + self.singleComboItems.append(self.tr("Page break (\\f)")) + self.singleComboItems.append(self.tr("Line feed (\\n)")) + self.singleComboItems.append(self.tr("Carriage return (\\r)")) + self.singleComboItems.append(self.tr("Horizontal tabulator (\\t)")) + self.singleComboItems.append(self.tr("Vertical tabulator (\\v)")) self.charValidator = QRegExpValidator(QRegExp(".{0,1}"), self) self.hexValidator = QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), self) @@ -85,7 +85,7 @@ hlayout0.setSpacing(6) hlayout0.setObjectName("hlayout0") self.moreSinglesButton = QPushButton( - self.trUtf8("Additional Entries"), self.singlesBox) + self.tr("Additional Entries"), self.singlesBox) self.moreSinglesButton.setObjectName("moreSinglesButton") hlayout0.addWidget(self.moreSinglesButton) hspacer0 = QSpacerItem( @@ -119,7 +119,7 @@ hlayout1.setSpacing(6) hlayout1.setObjectName("hlayout1") self.moreRangesButton = QPushButton( - self.trUtf8("Additional Entries"), self.rangesBox) + self.tr("Additional Entries"), self.rangesBox) self.moreSinglesButton.setObjectName("moreRangesButton") hlayout1.addWidget(self.moreRangesButton) hspacer1 = QSpacerItem( @@ -177,12 +177,12 @@ cb1.setEditable(False) cb1.addItems(self.comboItems) hboxLayout.addWidget(cb1) - l1 = QLabel(self.trUtf8("Between:"), hbox) + l1 = QLabel(self.tr("Between:"), hbox) hboxLayout.addWidget(l1) le1 = QLineEdit(hbox) le1.setValidator(self.charValidator) hboxLayout.addWidget(le1) - l2 = QLabel(self.trUtf8("And:"), hbox) + l2 = QLabel(self.tr("And:"), hbox) hboxLayout.addWidget(l2) le2 = QLineEdit(hbox) le2.setValidator(self.charValidator)
--- a/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/PyRegExpWizard/PyRegExpWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -70,25 +70,25 @@ self.namedGroups = re.compile(r"""\(?P<([^>]+)>""").findall self.saveButton = self.buttonBox.addButton( - self.trUtf8("Save"), QDialogButtonBox.ActionRole) + self.tr("Save"), QDialogButtonBox.ActionRole) self.saveButton.setToolTip( - self.trUtf8("Save the regular expression to a file")) + self.tr("Save the regular expression to a file")) self.loadButton = self.buttonBox.addButton( - self.trUtf8("Load"), QDialogButtonBox.ActionRole) + self.tr("Load"), QDialogButtonBox.ActionRole) self.loadButton.setToolTip( - self.trUtf8("Load a regular expression from a file")) + self.tr("Load a regular expression from a file")) self.validateButton = self.buttonBox.addButton( - self.trUtf8("Validate"), QDialogButtonBox.ActionRole) + self.tr("Validate"), QDialogButtonBox.ActionRole) self.validateButton.setToolTip( - self.trUtf8("Validate the regular expression")) + self.tr("Validate the regular expression")) self.executeButton = self.buttonBox.addButton( - self.trUtf8("Execute"), QDialogButtonBox.ActionRole) + self.tr("Execute"), QDialogButtonBox.ActionRole) self.executeButton.setToolTip( - self.trUtf8("Execute the regular expression")) + self.tr("Execute the regular expression")) self.nextButton = self.buttonBox.addButton( - self.trUtf8("Next match"), QDialogButtonBox.ActionRole) + self.tr("Next match"), QDialogButtonBox.ActionRole) self.nextButton.setToolTip( - self.trUtf8("Show the next match of the regular expression")) + self.tr("Show the next match of the regular expression")) self.nextButton.setEnabled(False) if fromEric: @@ -97,9 +97,9 @@ self.copyButton = None else: self.copyButton = self.buttonBox.addButton( - self.trUtf8("Copy"), QDialogButtonBox.ActionRole) + self.tr("Copy"), QDialogButtonBox.ActionRole) self.copyButton.setToolTip( - self.trUtf8("Copy the regular expression to the clipboard")) + self.tr("Copy the regular expression to the clipboard")) self.buttonBox.setStandardButtons(QDialogButtonBox.Close) self.variableLabel.hide() self.variableLineEdit.hide() @@ -178,14 +178,14 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Named reference"), - self.trUtf8("""No named groups have been defined yet.""")) + self.tr("Named reference"), + self.tr("""No named groups have been defined yet.""")) return groupName, ok = QInputDialog.getItem( self, - self.trUtf8("Named reference"), - self.trUtf8("Select group name:"), + self.tr("Named reference"), + self.tr("Select group name:"), names, 0, True) if ok and groupName: @@ -315,9 +315,9 @@ """ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save regular expression"), + self.tr("Save regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)"), + self.tr("RegExp Files (*.rx);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -329,9 +329,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save regular expression"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save regular expression"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -344,9 +344,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -356,9 +356,9 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Load regular expression"), + self.tr("Load regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)")) + self.tr("RegExp Files (*.rx);;All Files (*)")) if fname: try: f = open( @@ -369,9 +369,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -417,27 +417,27 @@ re.compile(regex, flags) E5MessageBox.information( self, - self.trUtf8("Validation"), - self.trUtf8("""The regular expression is valid.""")) + self.tr("Validation"), + self.tr("""The regular expression is valid.""")) except re.error as e: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(str(e))) return except IndexError: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: missing""" - """ group name""")) + self.tr("Error"), + self.tr("""Invalid regular expression: missing""" + """ group name""")) return else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression must be given.""")) + self.tr("Error"), + self.tr("""A regular expression must be given.""")) @pyqtSlot() def on_executeButton_clicked(self, startpos=0): @@ -486,7 +486,7 @@ self.resultTable.setRowCount(0) self.resultTable.setRowCount(OFFSET) self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Regexp"))) + row, 0, QTableWidgetItem(self.tr("Regexp"))) self.resultTable.setItem( row, 1, QTableWidgetItem(regex)) @@ -497,7 +497,7 @@ row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Offset"))) + QTableWidgetItem(self.tr("Offset"))) self.resultTable.setItem( row, 1, QTableWidgetItem("{0:d}".format(matchobj.start(0)))) @@ -505,22 +505,22 @@ row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Captures"))) + QTableWidgetItem(self.tr("Captures"))) self.resultTable.setItem( row, 1, QTableWidgetItem("{0:d}".format(captures))) row += 1 self.resultTable.setItem( row, 1, - QTableWidgetItem(self.trUtf8("Text"))) + QTableWidgetItem(self.tr("Text"))) self.resultTable.setItem( row, 2, - QTableWidgetItem(self.trUtf8("Characters"))) + QTableWidgetItem(self.tr("Characters"))) row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Match"))) + QTableWidgetItem(self.tr("Match"))) self.resultTable.setItem( row, 1, QTableWidgetItem(matchobj.group(0))) @@ -536,7 +536,7 @@ self.resultTable.setItem( row, 0, QTableWidgetItem( - self.trUtf8("Capture #{0}").format(i))) + self.tr("Capture #{0}").format(i))) self.resultTable.setItem( row, 1, QTableWidgetItem(matchobj.group(i))) self.resultTable.setItem( @@ -555,11 +555,11 @@ if startpos > 0: self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("No more matches"))) + QTableWidgetItem(self.tr("No more matches"))) else: self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("No matches"))) + QTableWidgetItem(self.tr("No matches"))) # remove the highlight tc = self.textTextEdit.textCursor() @@ -573,23 +573,23 @@ except re.error as e: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(str(e))) return except IndexError: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: missing""" - """ group name""")) + self.tr("Error"), + self.tr("""Invalid regular expression: missing""" + """ group name""")) return else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression and a text must be""" - """ given.""")) + self.tr("Error"), + self.tr("""A regular expression and a text must be""" + """ given.""")) @pyqtSlot() def on_nextButton_clicked(self): @@ -615,9 +615,9 @@ # set the checkboxes self.localeCheckBox.setEnabled(checked) if checked: - self.unicodeCheckBox.setText(self.trUtf8("Unicode")) + self.unicodeCheckBox.setText(self.tr("Unicode")) else: - self.unicodeCheckBox.setText(self.trUtf8("ASCII")) + self.unicodeCheckBox.setText(self.tr("ASCII")) self.unicodeCheckBox.setChecked(not self.unicodeCheckBox.isChecked()) # clear the result table
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardCharactersDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,46 +49,46 @@ self.comboItems = [] self.singleComboItems = [] # these are in addition to the above - self.comboItems.append((self.trUtf8("Normal character"), "-c")) + self.comboItems.append((self.tr("Normal character"), "-c")) if mode == QRegExpWizardCharactersDialog.RegExpMode: - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr( "Unicode character in hexadecimal notation"), "-h")) - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr( "ASCII/Latin1 character in octal notation"), "-o")) self.singleComboItems.append(("---", "-i")) self.singleComboItems.append( - (self.trUtf8("Bell character (\\a)"), "\\a")) + (self.tr("Bell character (\\a)"), "\\a")) self.singleComboItems.append( - (self.trUtf8("Page break (\\f)"), "\\f")) + (self.tr("Page break (\\f)"), "\\f")) self.singleComboItems.append( - (self.trUtf8("Line feed (\\n)"), "\\n")) + (self.tr("Line feed (\\n)"), "\\n")) self.singleComboItems.append( - (self.trUtf8("Carriage return (\\r)"), "\\r")) + (self.tr("Carriage return (\\r)"), "\\r")) self.singleComboItems.append( - (self.trUtf8("Horizontal tabulator (\\t)"), "\\t")) + (self.tr("Horizontal tabulator (\\t)"), "\\t")) self.singleComboItems.append( - (self.trUtf8("Vertical tabulator (\\v)"), "\\v")) + (self.tr("Vertical tabulator (\\v)"), "\\v")) elif mode == QRegExpWizardCharactersDialog.W3CMode: - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr( "Unicode character in hexadecimal notation"), "-h")) - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr( "ASCII/Latin1 character in octal notation"), "-o")) self.singleComboItems.append(("---", "-i")) self.singleComboItems.append( - (self.trUtf8("Line feed (\\n)"), "\\n")) + (self.tr("Line feed (\\n)"), "\\n")) self.singleComboItems.append( - (self.trUtf8("Carriage return (\\r)"), "\\r")) + (self.tr("Carriage return (\\r)"), "\\r")) self.singleComboItems.append( - (self.trUtf8("Horizontal tabulator (\\t)"), "\\t")) + (self.tr("Horizontal tabulator (\\t)"), "\\t")) self.singleComboItems.append(("---", "-i")) self.singleComboItems.append( - (self.trUtf8("Character Category"), "-ccp")) + (self.tr("Character Category"), "-ccp")) self.singleComboItems.append( - (self.trUtf8("Character Block"), "-cbp")) + (self.tr("Character Block"), "-cbp")) self.singleComboItems.append( - (self.trUtf8("Not Character Category"), "-ccn")) + (self.tr("Not Character Category"), "-ccn")) self.singleComboItems.append( - (self.trUtf8("Not Character Block"), "-cbn")) + (self.tr("Not Character Block"), "-cbn")) self.charValidator = QRegExpValidator(QRegExp(".{0,1}"), self) self.hexValidator = QRegExpValidator(QRegExp("[0-9a-fA-F]{0,4}"), self) @@ -120,7 +120,7 @@ hlayout0.setSpacing(6) hlayout0.setObjectName("hlayout0") self.moreSinglesButton = QPushButton( - self.trUtf8("Additional Entries"), self.singlesBox) + self.tr("Additional Entries"), self.singlesBox) self.moreSinglesButton.setObjectName("moreSinglesButton") hlayout0.addWidget(self.moreSinglesButton) hspacer0 = QSpacerItem( @@ -155,7 +155,7 @@ hlayout1.setSpacing(6) hlayout1.setObjectName("hlayout1") self.moreRangesButton = QPushButton( - self.trUtf8("Additional Entries"), self.rangesBox) + self.tr("Additional Entries"), self.rangesBox) self.moreSinglesButton.setObjectName("moreRangesButton") hlayout1.addWidget(self.moreRangesButton) hspacer1 = QSpacerItem( @@ -170,230 +170,230 @@ """ self.__characterCategories = ( # display name code - (self.trUtf8("Letter, Any"), "L"), - (self.trUtf8("Letter, Uppercase"), "Lu"), - (self.trUtf8("Letter, Lowercase"), "Ll"), - (self.trUtf8("Letter, Titlecase"), "Lt"), - (self.trUtf8("Letter, Modifier"), "Lm"), - (self.trUtf8("Letter, Other"), "Lo"), - (self.trUtf8("Mark, Any"), "M"), - (self.trUtf8("Mark, Nonspacing"), "Mn"), - (self.trUtf8("Mark, Spacing Combining"), "Mc"), - (self.trUtf8("Mark, Enclosing"), "Me"), - (self.trUtf8("Number, Any"), "N"), - (self.trUtf8("Number, Decimal Digit"), "Nd"), - (self.trUtf8("Number, Letter"), "Nl"), - (self.trUtf8("Number, Other"), "No"), - (self.trUtf8("Punctuation, Any"), "P"), - (self.trUtf8("Punctuation, Connector"), "Pc"), - (self.trUtf8("Punctuation, Dash"), "Pd"), - (self.trUtf8("Punctuation, Open"), "Ps"), - (self.trUtf8("Punctuation, Close"), "Pe"), - (self.trUtf8("Punctuation, Initial Quote"), "Pi"), - (self.trUtf8("Punctuation, Final Quote"), "Pf"), - (self.trUtf8("Punctuation, Other"), "Po"), - (self.trUtf8("Symbol, Any"), "S"), - (self.trUtf8("Symbol, Math"), "Sm"), - (self.trUtf8("Symbol, Currency"), "Sc"), - (self.trUtf8("Symbol, Modifier"), "Sk"), - (self.trUtf8("Symbol, Other"), "So"), - (self.trUtf8("Separator, Any"), "Z"), - (self.trUtf8("Separator, Space"), "Zs"), - (self.trUtf8("Separator, Line"), "Zl"), - (self.trUtf8("Separator, Paragraph"), "Zp"), - (self.trUtf8("Other, Any"), "C"), - (self.trUtf8("Other, Control"), "Cc"), - (self.trUtf8("Other, Format"), "Cf"), - (self.trUtf8("Other, Private Use"), "Co"), - (self.trUtf8("Other, Not Assigned"), "Cn"), + (self.tr("Letter, Any"), "L"), + (self.tr("Letter, Uppercase"), "Lu"), + (self.tr("Letter, Lowercase"), "Ll"), + (self.tr("Letter, Titlecase"), "Lt"), + (self.tr("Letter, Modifier"), "Lm"), + (self.tr("Letter, Other"), "Lo"), + (self.tr("Mark, Any"), "M"), + (self.tr("Mark, Nonspacing"), "Mn"), + (self.tr("Mark, Spacing Combining"), "Mc"), + (self.tr("Mark, Enclosing"), "Me"), + (self.tr("Number, Any"), "N"), + (self.tr("Number, Decimal Digit"), "Nd"), + (self.tr("Number, Letter"), "Nl"), + (self.tr("Number, Other"), "No"), + (self.tr("Punctuation, Any"), "P"), + (self.tr("Punctuation, Connector"), "Pc"), + (self.tr("Punctuation, Dash"), "Pd"), + (self.tr("Punctuation, Open"), "Ps"), + (self.tr("Punctuation, Close"), "Pe"), + (self.tr("Punctuation, Initial Quote"), "Pi"), + (self.tr("Punctuation, Final Quote"), "Pf"), + (self.tr("Punctuation, Other"), "Po"), + (self.tr("Symbol, Any"), "S"), + (self.tr("Symbol, Math"), "Sm"), + (self.tr("Symbol, Currency"), "Sc"), + (self.tr("Symbol, Modifier"), "Sk"), + (self.tr("Symbol, Other"), "So"), + (self.tr("Separator, Any"), "Z"), + (self.tr("Separator, Space"), "Zs"), + (self.tr("Separator, Line"), "Zl"), + (self.tr("Separator, Paragraph"), "Zp"), + (self.tr("Other, Any"), "C"), + (self.tr("Other, Control"), "Cc"), + (self.tr("Other, Format"), "Cf"), + (self.tr("Other, Private Use"), "Co"), + (self.tr("Other, Not Assigned"), "Cn"), ) self.__characterBlocks = ( - (self.trUtf8("Basic Latin"), + (self.tr("Basic Latin"), "IsBasicLatin"), - (self.trUtf8("Latin-1 Supplement"), + (self.tr("Latin-1 Supplement"), "IsLatin-1Supplement"), - (self.trUtf8("Latin Extended-A"), + (self.tr("Latin Extended-A"), "IsLatinExtended-A"), - (self.trUtf8("Latin Extended-B"), + (self.tr("Latin Extended-B"), "IsLatinExtended-B"), - (self.trUtf8("IPA Extensions"), + (self.tr("IPA Extensions"), "IsIPAExtensions"), - (self.trUtf8("Spacing Modifier Letters"), + (self.tr("Spacing Modifier Letters"), "IsSpacingModifierLetters"), - (self.trUtf8("Combining Diacritical Marks"), + (self.tr("Combining Diacritical Marks"), "IsCombiningDiacriticalMarks"), - (self.trUtf8("Greek"), + (self.tr("Greek"), "IsGreek"), - (self.trUtf8("Cyrillic"), + (self.tr("Cyrillic"), "IsCyrillic"), - (self.trUtf8("Armenian"), + (self.tr("Armenian"), "IsArmenian"), - (self.trUtf8("Hebrew"), + (self.tr("Hebrew"), "IsHebrew"), - (self.trUtf8("Arabic"), + (self.tr("Arabic"), "IsArabic"), - (self.trUtf8("Syriac"), + (self.tr("Syriac"), "IsSyriac"), - (self.trUtf8("Thaana"), + (self.tr("Thaana"), "IsThaana"), - (self.trUtf8("Devanagari"), + (self.tr("Devanagari"), "IsDevanagari"), - (self.trUtf8("Bengali"), + (self.tr("Bengali"), "IsBengali"), - (self.trUtf8("Gurmukhi"), + (self.tr("Gurmukhi"), "IsBengali"), - (self.trUtf8("Gujarati"), + (self.tr("Gujarati"), "IsGujarati"), - (self.trUtf8("Oriya"), + (self.tr("Oriya"), "IsOriya"), - (self.trUtf8("Tamil"), + (self.tr("Tamil"), "IsTamil"), - (self.trUtf8("Telugu"), + (self.tr("Telugu"), "IsTelugu"), - (self.trUtf8("Kannada"), + (self.tr("Kannada"), "IsKannada"), - (self.trUtf8("Malayalam"), + (self.tr("Malayalam"), "IsMalayalam"), - (self.trUtf8("Sinhala"), + (self.tr("Sinhala"), "IsSinhala"), - (self.trUtf8("Thai"), + (self.tr("Thai"), "IsThai"), - (self.trUtf8("Lao"), + (self.tr("Lao"), "IsLao"), - (self.trUtf8("Tibetan"), + (self.tr("Tibetan"), "IsTibetan"), - (self.trUtf8("Myanmar"), + (self.tr("Myanmar"), "IsMyanmar"), - (self.trUtf8("Georgian"), + (self.tr("Georgian"), "IsGeorgian"), - (self.trUtf8("Hangul Jamo"), + (self.tr("Hangul Jamo"), "IsHangulJamo"), - (self.trUtf8("Ethiopic"), + (self.tr("Ethiopic"), "IsEthiopic"), - (self.trUtf8("Cherokee"), + (self.tr("Cherokee"), "IsCherokee"), - (self.trUtf8("Unified Canadian Aboriginal Syllabics"), + (self.tr("Unified Canadian Aboriginal Syllabics"), "IsUnifiedCanadianAboriginalSyllabics"), - (self.trUtf8("Ogham"), + (self.tr("Ogham"), "IsOgham"), - (self.trUtf8("Runic"), + (self.tr("Runic"), "IsRunic"), - (self.trUtf8("Khmer"), + (self.tr("Khmer"), "IsKhmer"), - (self.trUtf8("Mongolian"), + (self.tr("Mongolian"), "IsMongolian"), - (self.trUtf8("Latin Extended Additional"), + (self.tr("Latin Extended Additional"), "IsLatinExtendedAdditional"), - (self.trUtf8("Greek Extended"), + (self.tr("Greek Extended"), "IsGreekExtended"), - (self.trUtf8("General Punctuation"), + (self.tr("General Punctuation"), "IsGeneralPunctuation"), - (self.trUtf8("Superscripts and Subscripts"), + (self.tr("Superscripts and Subscripts"), "IsSuperscriptsandSubscripts"), - (self.trUtf8("Currency Symbols"), + (self.tr("Currency Symbols"), "IsCurrencySymbols"), - (self.trUtf8("Combining Marks for Symbols"), + (self.tr("Combining Marks for Symbols"), "IsCombiningMarksforSymbols"), - (self.trUtf8("Letterlike Symbols"), + (self.tr("Letterlike Symbols"), "IsLetterlikeSymbols"), - (self.trUtf8("Number Forms"), + (self.tr("Number Forms"), "IsNumberForms"), - (self.trUtf8("Arrows"), + (self.tr("Arrows"), "IsArrows"), - (self.trUtf8("Mathematical Operators"), + (self.tr("Mathematical Operators"), "IsMathematicalOperators"), - (self.trUtf8("Miscellaneous Technical"), + (self.tr("Miscellaneous Technical"), "IsMiscellaneousTechnical"), - (self.trUtf8("Control Pictures"), + (self.tr("Control Pictures"), "IsControlPictures"), - (self.trUtf8("Optical Character Recognition"), + (self.tr("Optical Character Recognition"), "IsOpticalCharacterRecognition"), - (self.trUtf8("Enclosed Alphanumerics"), + (self.tr("Enclosed Alphanumerics"), "IsEnclosedAlphanumerics"), - (self.trUtf8("Box Drawing"), + (self.tr("Box Drawing"), "IsBoxDrawing"), - (self.trUtf8("Block Elements"), + (self.tr("Block Elements"), "IsBlockElements"), - (self.trUtf8("Geometric Shapes"), + (self.tr("Geometric Shapes"), "IsGeometricShapes"), - (self.trUtf8("Miscellaneous Symbols"), + (self.tr("Miscellaneous Symbols"), "IsMiscellaneousSymbols"), - (self.trUtf8("Dingbats"), + (self.tr("Dingbats"), "IsDingbats"), - (self.trUtf8("Braille Patterns"), + (self.tr("Braille Patterns"), "IsBraillePatterns"), - (self.trUtf8("CJK Radicals Supplement"), + (self.tr("CJK Radicals Supplement"), "IsCJKRadicalsSupplement"), - (self.trUtf8("KangXi Radicals"), + (self.tr("KangXi Radicals"), "IsKangXiRadicals"), - (self.trUtf8("Ideographic Description Chars"), + (self.tr("Ideographic Description Chars"), "IsIdeographicDescriptionChars"), - (self.trUtf8("CJK Symbols and Punctuation"), + (self.tr("CJK Symbols and Punctuation"), "IsCJKSymbolsandPunctuation"), - (self.trUtf8("Hiragana"), + (self.tr("Hiragana"), "IsHiragana"), - (self.trUtf8("Katakana"), + (self.tr("Katakana"), "IsKatakana"), - (self.trUtf8("Bopomofo"), + (self.tr("Bopomofo"), "IsBopomofo"), - (self.trUtf8("Hangul Compatibility Jamo"), + (self.tr("Hangul Compatibility Jamo"), "IsHangulCompatibilityJamo"), - (self.trUtf8("Kanbun"), + (self.tr("Kanbun"), "IsKanbun"), - (self.trUtf8("Bopomofo Extended"), + (self.tr("Bopomofo Extended"), "IsBopomofoExtended"), - (self.trUtf8("Enclosed CJK Letters and Months"), + (self.tr("Enclosed CJK Letters and Months"), "IsEnclosedCJKLettersandMonths"), - (self.trUtf8("CJK Compatibility"), + (self.tr("CJK Compatibility"), "IsCJKCompatibility"), - (self.trUtf8("CJK Unified Ideographs Extension A"), + (self.tr("CJK Unified Ideographs Extension A"), "IsCJKUnifiedIdeographsExtensionA"), - (self.trUtf8("CJK Unified Ideographs"), + (self.tr("CJK Unified Ideographs"), "IsCJKUnifiedIdeographs"), - (self.trUtf8("Yi Syllables"), + (self.tr("Yi Syllables"), "IsYiSyllables"), - (self.trUtf8("Yi Radicals"), + (self.tr("Yi Radicals"), "IsYiRadicals"), - (self.trUtf8("Hangul Syllables"), + (self.tr("Hangul Syllables"), "IsHangulSyllables"), - (self.trUtf8("Private Use"), + (self.tr("Private Use"), "IsPrivateUse"), - (self.trUtf8("CJK Compatibility Ideographs"), + (self.tr("CJK Compatibility Ideographs"), "IsCJKCompatibilityIdeographs"), - (self.trUtf8("Alphabetic Presentation Forms"), + (self.tr("Alphabetic Presentation Forms"), "IsAlphabeticPresentationForms"), - (self.trUtf8("Arabic Presentation Forms-A"), + (self.tr("Arabic Presentation Forms-A"), "IsArabicPresentationForms-A"), - (self.trUtf8("Combining Half Marks"), + (self.tr("Combining Half Marks"), "IsCombiningHalfMarks"), - (self.trUtf8("CJK Compatibility Forms"), + (self.tr("CJK Compatibility Forms"), "IsCJKCompatibilityForms"), - (self.trUtf8("Small Form Variants"), + (self.tr("Small Form Variants"), "IsSmallFormVariants"), - (self.trUtf8("Arabic Presentation Forms-B"), + (self.tr("Arabic Presentation Forms-B"), "IsArabicPresentationForms-B"), - (self.trUtf8("Halfwidth and Fullwidth Forms"), + (self.tr("Halfwidth and Fullwidth Forms"), "IsHalfwidthandFullwidthForms"), - (self.trUtf8("Specials"), + (self.tr("Specials"), "IsSpecials"), - (self.trUtf8("Old Italic"), + (self.tr("Old Italic"), "IsOldItalic"), - (self.trUtf8("Gothic"), + (self.tr("Gothic"), "IsGothic"), - (self.trUtf8("Deseret"), + (self.tr("Deseret"), "IsDeseret"), - (self.trUtf8("Byzantine Musical Symbols"), + (self.tr("Byzantine Musical Symbols"), "IsByzantineMusicalSymbols"), - (self.trUtf8("Musical Symbols"), + (self.tr("Musical Symbols"), "IsMusicalSymbols"), - (self.trUtf8("Mathematical Alphanumeric Symbols"), + (self.tr("Mathematical Alphanumeric Symbols"), "IsMathematicalAlphanumericSymbols"), - (self.trUtf8("CJK Unified Ideographic Extension B"), + (self.tr("CJK Unified Ideographic Extension B"), "IsCJKUnifiedIdeographicExtensionB"), - (self.trUtf8("CJK Compatapility Ideographic Supplement"), + (self.tr("CJK Compatapility Ideographic Supplement"), "IsCJKCompatapilityIdeographicSupplement"), - (self.trUtf8("Tags"), + (self.tr("Tags"), "IsTags"), ) @@ -467,12 +467,12 @@ cb1.setEditable(False) self.__populateCharTypeCombo(cb1, False) hboxLayout.addWidget(cb1) - l1 = QLabel(self.trUtf8("Between:"), hbox) + l1 = QLabel(self.tr("Between:"), hbox) hboxLayout.addWidget(l1) le1 = QLineEdit(hbox) le1.setValidator(self.charValidator) hboxLayout.addWidget(le1) - l2 = QLabel(self.trUtf8("And:"), hbox) + l2 = QLabel(self.tr("And:"), hbox) hboxLayout.addWidget(l2) le2 = QLineEdit(hbox) le2.setValidator(self.charValidator)
--- a/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/QRegExpWizard/QRegExpWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -82,25 +82,25 @@ self.syntaxCombo.setCurrentIndex(1) self.saveButton = self.buttonBox.addButton( - self.trUtf8("Save"), QDialogButtonBox.ActionRole) + self.tr("Save"), QDialogButtonBox.ActionRole) self.saveButton.setToolTip( - self.trUtf8("Save the regular expression to a file")) + self.tr("Save the regular expression to a file")) self.loadButton = self.buttonBox.addButton( - self.trUtf8("Load"), QDialogButtonBox.ActionRole) + self.tr("Load"), QDialogButtonBox.ActionRole) self.loadButton.setToolTip( - self.trUtf8("Load a regular expression from a file")) + self.tr("Load a regular expression from a file")) self.validateButton = self.buttonBox.addButton( - self.trUtf8("Validate"), QDialogButtonBox.ActionRole) + self.tr("Validate"), QDialogButtonBox.ActionRole) self.validateButton.setToolTip( - self.trUtf8("Validate the regular expression")) + self.tr("Validate the regular expression")) self.executeButton = self.buttonBox.addButton( - self.trUtf8("Execute"), QDialogButtonBox.ActionRole) + self.tr("Execute"), QDialogButtonBox.ActionRole) self.executeButton.setToolTip( - self.trUtf8("Execute the regular expression")) + self.tr("Execute the regular expression")) self.nextButton = self.buttonBox.addButton( - self.trUtf8("Next match"), QDialogButtonBox.ActionRole) + self.tr("Next match"), QDialogButtonBox.ActionRole) self.nextButton.setToolTip( - self.trUtf8("Show the next match of the regular expression")) + self.tr("Show the next match of the regular expression")) self.nextButton.setEnabled(False) if fromEric: @@ -109,9 +109,9 @@ self.copyButton = None else: self.copyButton = self.buttonBox.addButton( - self.trUtf8("Copy"), QDialogButtonBox.ActionRole) + self.tr("Copy"), QDialogButtonBox.ActionRole) self.copyButton.setToolTip( - self.trUtf8("Copy the regular expression to the clipboard")) + self.tr("Copy the regular expression to the clipboard")) self.buttonBox.setStandardButtons(QDialogButtonBox.Close) self.variableLabel.hide() self.variableLineEdit.hide() @@ -336,9 +336,9 @@ """ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save regular expression"), + self.tr("Save regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)"), + self.tr("RegExp Files (*.rx);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -350,9 +350,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save regular expression"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save regular expression"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -367,9 +367,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -379,9 +379,9 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Load regular expression"), + self.tr("Load regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)")) + self.tr("RegExp Files (*.rx);;All Files (*)")) if fname: try: f = open( @@ -398,9 +398,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -436,20 +436,20 @@ if re.isValid(): E5MessageBox.information( self, - self.trUtf8("Validation"), - self.trUtf8("""The regular expression is valid.""")) + self.tr("Validation"), + self.tr("""The regular expression is valid.""")) else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(re.errorString())) return else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression must be given.""")) + self.tr("Error"), + self.tr("""A regular expression must be given.""")) @pyqtSlot() def on_executeButton_clicked(self, startpos=0): @@ -476,8 +476,8 @@ if not re.isValid(): E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(re.errorString())) return offset = re.indexIn(text, startpos) @@ -490,7 +490,7 @@ self.resultTable.setRowCount(0) self.resultTable.setRowCount(OFFSET) self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Regexp"))) + row, 0, QTableWidgetItem(self.tr("Regexp"))) self.resultTable.setItem(row, 1, QTableWidgetItem(regex)) if offset != -1: @@ -498,25 +498,25 @@ self.nextButton.setEnabled(True) row += 1 self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Offset"))) + row, 0, QTableWidgetItem(self.tr("Offset"))) self.resultTable.setItem( row, 1, QTableWidgetItem("{0:d}".format(offset))) if not wildcard: row += 1 self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Captures"))) + row, 0, QTableWidgetItem(self.tr("Captures"))) self.resultTable.setItem( row, 1, QTableWidgetItem("{0:d}".format(captures))) row += 1 self.resultTable.setItem( - row, 1, QTableWidgetItem(self.trUtf8("Text"))) + row, 1, QTableWidgetItem(self.tr("Text"))) self.resultTable.setItem( - row, 2, QTableWidgetItem(self.trUtf8("Characters"))) + row, 2, QTableWidgetItem(self.tr("Characters"))) row += 1 self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Match"))) + row, 0, QTableWidgetItem(self.tr("Match"))) self.resultTable.setItem( row, 1, QTableWidgetItem(re.cap(0))) self.resultTable.setItem( @@ -531,7 +531,7 @@ self.resultTable.setItem( row, 0, QTableWidgetItem( - self.trUtf8("Capture #{0}").format(i))) + self.tr("Capture #{0}").format(i))) self.resultTable.setItem( row, 1, QTableWidgetItem(re.cap(i))) @@ -554,11 +554,11 @@ if startpos > 0: self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("No more matches"))) + QTableWidgetItem(self.tr("No more matches"))) else: self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("No matches"))) + QTableWidgetItem(self.tr("No matches"))) # remove the highlight tc = self.textTextEdit.textCursor() @@ -572,9 +572,9 @@ else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression and a text must""" - """ be given.""")) + self.tr("Error"), + self.tr("""A regular expression and a text must""" + """ be given.""")) @pyqtSlot() def on_nextButton_clicked(self):
--- a/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardCharactersDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardCharactersDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -34,28 +34,28 @@ self.comboItems = [] self.singleComboItems = [] # these are in addition to the above - self.comboItems.append((self.trUtf8("Normal character"), "-c")) - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr("Normal character"), "-c")) + self.comboItems.append((self.tr( "Unicode character in hexadecimal notation"), "-h")) - self.comboItems.append((self.trUtf8( + self.comboItems.append((self.tr( "ASCII/Latin1 character in octal notation"), "-o")) self.singleComboItems.extend([ ("---", "-i"), - (self.trUtf8("Bell character (\\a)"), "\\a"), - (self.trUtf8("Escape character (\\e)"), "\\e"), - (self.trUtf8("Page break (\\f)"), "\\f"), - (self.trUtf8("Line feed (\\n)"), "\\n"), - (self.trUtf8("Carriage return (\\r)"), "\\r"), - (self.trUtf8("Horizontal tabulator (\\t)"), "\\t"), + (self.tr("Bell character (\\a)"), "\\a"), + (self.tr("Escape character (\\e)"), "\\e"), + (self.tr("Page break (\\f)"), "\\f"), + (self.tr("Line feed (\\n)"), "\\n"), + (self.tr("Carriage return (\\r)"), "\\r"), + (self.tr("Horizontal tabulator (\\t)"), "\\t"), ("---", "-i"), - (self.trUtf8("Character Category"), "-ccp"), - (self.trUtf8("Special Character Category"), "-csp"), - (self.trUtf8("Character Block"), "-cbp"), - (self.trUtf8("POSIX Named Set"), "-psp"), - (self.trUtf8("Not Character Category"), "-ccn"), - (self.trUtf8("Not Character Block"), "-cbn"), - (self.trUtf8("Not Special Character Category"), "-csn"), - (self.trUtf8("Not POSIX Named Set"), "-psn"), + (self.tr("Character Category"), "-ccp"), + (self.tr("Special Character Category"), "-csp"), + (self.tr("Character Block"), "-cbp"), + (self.tr("POSIX Named Set"), "-psp"), + (self.tr("Not Character Category"), "-ccn"), + (self.tr("Not Character Block"), "-cbn"), + (self.tr("Not Special Character Category"), "-csn"), + (self.tr("Not POSIX Named Set"), "-psn"), ]) self.charValidator = QRegExpValidator(QRegExp(".{0,1}"), self) @@ -88,7 +88,7 @@ hlayout0.setSpacing(6) hlayout0.setObjectName("hlayout0") self.moreSinglesButton = QPushButton( - self.trUtf8("Additional Entries"), self.singlesBox) + self.tr("Additional Entries"), self.singlesBox) self.moreSinglesButton.setObjectName("moreSinglesButton") hlayout0.addWidget(self.moreSinglesButton) hspacer0 = QSpacerItem( @@ -123,7 +123,7 @@ hlayout1.setSpacing(6) hlayout1.setObjectName("hlayout1") self.moreRangesButton = QPushButton( - self.trUtf8("Additional Entries"), self.rangesBox) + self.tr("Additional Entries"), self.rangesBox) self.moreSinglesButton.setObjectName("moreRangesButton") hlayout1.addWidget(self.moreRangesButton) hspacer1 = QSpacerItem( @@ -138,177 +138,177 @@ """ self.__characterCategories = ( # display name code - (self.trUtf8("Letter, Any"), "L"), - (self.trUtf8("Letter, Lower case"), "Ll"), - (self.trUtf8("Letter, Modifier"), "Lm"), - (self.trUtf8("Letter, Other"), "Lo"), - (self.trUtf8("Letter, Title case"), "Lt"), - (self.trUtf8("Letter, Upper case"), "Lu"), - (self.trUtf8("Letter, Lower, Upper or Title"), "L&"), - (self.trUtf8("Mark, Any"), "M"), - (self.trUtf8("Mark, Spacing"), "Mc"), - (self.trUtf8("Mark, Enclosing"), "Me"), - (self.trUtf8("Mark, Non-spacing"), "Mn"), - (self.trUtf8("Number, Any"), "N"), - (self.trUtf8("Number, Decimal"), "Nd"), - (self.trUtf8("Number, Letter"), "Nl"), - (self.trUtf8("Number, Other"), "No"), - (self.trUtf8("Punctuation, Any"), "P"), - (self.trUtf8("Punctuation, Connector"), "Pc"), - (self.trUtf8("Punctuation, Dash"), "Pd"), - (self.trUtf8("Punctuation, Close"), "Pe"), - (self.trUtf8("Punctuation, Final"), "Pf"), - (self.trUtf8("Punctuation, Initial"), "Pi"), - (self.trUtf8("Punctuation, Other"), "Po"), - (self.trUtf8("Punctuation, Open"), "Ps"), - (self.trUtf8("Symbol, Any"), "S"), - (self.trUtf8("Symbol, Currency"), "Sc"), - (self.trUtf8("Symbol, Modifier"), "Sk"), - (self.trUtf8("Symbol, Mathematical"), "Sm"), - (self.trUtf8("Symbol, Other"), "So"), - (self.trUtf8("Separator, Any"), "Z"), - (self.trUtf8("Separator, Line"), "Zl"), - (self.trUtf8("Separator, Paragraph"), "Zp"), - (self.trUtf8("Separator, Space"), "Zs"), - (self.trUtf8("Other, Any"), "C"), - (self.trUtf8("Other, Control"), "Cc"), - (self.trUtf8("Other, Format"), "Cf"), - (self.trUtf8("Other, Unassigned"), "Cn"), - (self.trUtf8("Other, Private Use"), "Co"), - (self.trUtf8("Other, Surrogat"), "Cn"), + (self.tr("Letter, Any"), "L"), + (self.tr("Letter, Lower case"), "Ll"), + (self.tr("Letter, Modifier"), "Lm"), + (self.tr("Letter, Other"), "Lo"), + (self.tr("Letter, Title case"), "Lt"), + (self.tr("Letter, Upper case"), "Lu"), + (self.tr("Letter, Lower, Upper or Title"), "L&"), + (self.tr("Mark, Any"), "M"), + (self.tr("Mark, Spacing"), "Mc"), + (self.tr("Mark, Enclosing"), "Me"), + (self.tr("Mark, Non-spacing"), "Mn"), + (self.tr("Number, Any"), "N"), + (self.tr("Number, Decimal"), "Nd"), + (self.tr("Number, Letter"), "Nl"), + (self.tr("Number, Other"), "No"), + (self.tr("Punctuation, Any"), "P"), + (self.tr("Punctuation, Connector"), "Pc"), + (self.tr("Punctuation, Dash"), "Pd"), + (self.tr("Punctuation, Close"), "Pe"), + (self.tr("Punctuation, Final"), "Pf"), + (self.tr("Punctuation, Initial"), "Pi"), + (self.tr("Punctuation, Other"), "Po"), + (self.tr("Punctuation, Open"), "Ps"), + (self.tr("Symbol, Any"), "S"), + (self.tr("Symbol, Currency"), "Sc"), + (self.tr("Symbol, Modifier"), "Sk"), + (self.tr("Symbol, Mathematical"), "Sm"), + (self.tr("Symbol, Other"), "So"), + (self.tr("Separator, Any"), "Z"), + (self.tr("Separator, Line"), "Zl"), + (self.tr("Separator, Paragraph"), "Zp"), + (self.tr("Separator, Space"), "Zs"), + (self.tr("Other, Any"), "C"), + (self.tr("Other, Control"), "Cc"), + (self.tr("Other, Format"), "Cf"), + (self.tr("Other, Unassigned"), "Cn"), + (self.tr("Other, Private Use"), "Co"), + (self.tr("Other, Surrogat"), "Cn"), ) self.__specialCharacterCategories = ( # display name code - (self.trUtf8("Alphanumeric"), "Xan"), - (self.trUtf8("POSIX Space"), "Xps"), - (self.trUtf8("Perl Space"), "Xsp"), - (self.trUtf8("Universal Character"), "Xuc"), - (self.trUtf8("Perl Word"), "Xan"), + (self.tr("Alphanumeric"), "Xan"), + (self.tr("POSIX Space"), "Xps"), + (self.tr("Perl Space"), "Xsp"), + (self.tr("Universal Character"), "Xuc"), + (self.tr("Perl Word"), "Xan"), ) self.__characterBlocks = ( # display name code - (self.trUtf8("Arabic"), "Arabic"), - (self.trUtf8("Armenian"), "Armenian"), - (self.trUtf8("Avestan"), "Avestan"), - (self.trUtf8("Balinese"), "Balinese"), - (self.trUtf8("Bamum"), "Bamum"), - (self.trUtf8("Batak"), "Batak"), - (self.trUtf8("Bengali"), "Bengali"), - (self.trUtf8("Bopomofo"), "Bopomofo"), - (self.trUtf8("Brahmi"), "Brahmi"), - (self.trUtf8("Braille"), "Braille"), - (self.trUtf8("Buginese"), "Buginese"), - (self.trUtf8("Buhid"), "Buhid"), - (self.trUtf8("Canadian Aboriginal"), "Canadian_Aboriginal"), - (self.trUtf8("Carian"), "Carian"), - (self.trUtf8("Chakma"), "Chakma"), - (self.trUtf8("Cham"), "Cham"), - (self.trUtf8("Cherokee"), "Cherokee"), - (self.trUtf8("Common"), "Common"), - (self.trUtf8("Coptic"), "Coptic"), - (self.trUtf8("Cuneiform"), "Cuneiform"), - (self.trUtf8("Cypriot"), "Cypriot"), - (self.trUtf8("Cyrillic"), "Cyrillic"), - (self.trUtf8("Deseret"), "Deseret,"), - (self.trUtf8("Devanagari"), "Devanagari"), - (self.trUtf8("Egyptian Hieroglyphs"), "Egyptian_Hieroglyphs"), - (self.trUtf8("Ethiopic"), "Ethiopic"), - (self.trUtf8("Georgian"), "Georgian"), - (self.trUtf8("Glagolitic"), "Glagolitic"), - (self.trUtf8("Gothic"), "Gothic"), - (self.trUtf8("Greek"), "Greek"), - (self.trUtf8("Gujarati"), "Gujarati"), - (self.trUtf8("Gurmukhi"), "Gurmukhi"), - (self.trUtf8("Han"), "Han"), - (self.trUtf8("Hangul"), "Hangul"), - (self.trUtf8("Hanunoo"), "Hanunoo"), - (self.trUtf8("Hebrew"), "Hebrew"), - (self.trUtf8("Hiragana"), "Hiragana"), - (self.trUtf8("Imperial Aramaic"), "Imperial_Aramaic"), - (self.trUtf8("Inherited"), "Inherited"), - (self.trUtf8("Inscriptional Pahlavi"), "Inscriptional_Pahlavi"), - (self.trUtf8("Inscriptional Parthian"), "Inscriptional_Parthian"), - (self.trUtf8("Javanese"), "Javanese"), - (self.trUtf8("Kaithi"), "Kaithi"), - (self.trUtf8("Kannada"), "Kannada"), - (self.trUtf8("Katakana"), "Katakana"), - (self.trUtf8("Kayah Li"), "Kayah_Li"), - (self.trUtf8("Kharoshthi"), "Kharoshthi"), - (self.trUtf8("Khmer"), "Khmer"), - (self.trUtf8("Lao"), "Lao"), - (self.trUtf8("Latin"), "Latin"), - (self.trUtf8("Lepcha"), "Lepcha"), - (self.trUtf8("Limbu"), "Limbu"), - (self.trUtf8("Linear B"), "Linear_B"), - (self.trUtf8("Lisu"), "Lisu"), - (self.trUtf8("Lycian"), "Lycian"), - (self.trUtf8("Lydian"), "Lydian"), - (self.trUtf8("Malayalam"), "Malayalam"), - (self.trUtf8("Mandaic"), "Mandaic"), - (self.trUtf8("Meetei Mayek"), "Meetei_Mayek"), - (self.trUtf8("Meroitic Cursive"), "Meroitic_Cursive"), - (self.trUtf8("Meroitic Hieroglyphs"), "Meroitic_Hieroglyphs"), - (self.trUtf8("Miao"), "Miao"), - (self.trUtf8("Mongolian"), "Mongolian"), - (self.trUtf8("Myanmar"), "Myanmar"), - (self.trUtf8("New Tai Lue"), "New_Tai_Lue"), - (self.trUtf8("N'Ko"), "Nko"), - (self.trUtf8("Ogham"), "Ogham"), - (self.trUtf8("Old Italic"), "Old_Italic"), - (self.trUtf8("Old Persian"), "Old_Persian"), - (self.trUtf8("Old South Arabian"), "Old_South_Arabian"), - (self.trUtf8("Old Turkic"), "Old_Turkic,"), - (self.trUtf8("Ol Chiki"), "Ol_Chiki"), - (self.trUtf8("Oriya"), "Oriya"), - (self.trUtf8("Osmanya"), "Osmanya"), - (self.trUtf8("Phags-pa"), "Phags_Pa"), - (self.trUtf8("Phoenician"), "Phoenician"), - (self.trUtf8("Rejang"), "Rejang"), - (self.trUtf8("Runic"), "Runic"), - (self.trUtf8("Samaritan"), "Samaritan"), - (self.trUtf8("Saurashtra"), "Saurashtra"), - (self.trUtf8("Sharada"), "Sharada"), - (self.trUtf8("Shavian"), "Shavian"), - (self.trUtf8("Sinhala"), "Sinhala"), - (self.trUtf8("Sora Sompeng"), "Sora_Sompeng"), - (self.trUtf8("Sundanese"), "Sundanese"), - (self.trUtf8("Syloti Nagri"), "Syloti_Nagri"), - (self.trUtf8("Syriac"), "Syriac"), - (self.trUtf8("Tagalog"), "Tagalog"), - (self.trUtf8("Tagbanwa"), "Tagbanwa"), - (self.trUtf8("Tai Le"), "Tai_Le"), - (self.trUtf8("Tai Tham"), "Tai_Tham"), - (self.trUtf8("Tai Viet"), "Tai_Viet"), - (self.trUtf8("Takri"), "Takri"), - (self.trUtf8("Tamil"), "Tamil"), - (self.trUtf8("Telugu"), "Telugu"), - (self.trUtf8("Thaana"), "Thaana"), - (self.trUtf8("Thai"), "Thai"), - (self.trUtf8("Tibetan"), "Tibetan"), - (self.trUtf8("Tifinagh"), "Tifinagh"), - (self.trUtf8("Ugaritic"), "Ugaritic"), - (self.trUtf8("Vai"), "Vai"), - (self.trUtf8("Yi"), "Yi"), + (self.tr("Arabic"), "Arabic"), + (self.tr("Armenian"), "Armenian"), + (self.tr("Avestan"), "Avestan"), + (self.tr("Balinese"), "Balinese"), + (self.tr("Bamum"), "Bamum"), + (self.tr("Batak"), "Batak"), + (self.tr("Bengali"), "Bengali"), + (self.tr("Bopomofo"), "Bopomofo"), + (self.tr("Brahmi"), "Brahmi"), + (self.tr("Braille"), "Braille"), + (self.tr("Buginese"), "Buginese"), + (self.tr("Buhid"), "Buhid"), + (self.tr("Canadian Aboriginal"), "Canadian_Aboriginal"), + (self.tr("Carian"), "Carian"), + (self.tr("Chakma"), "Chakma"), + (self.tr("Cham"), "Cham"), + (self.tr("Cherokee"), "Cherokee"), + (self.tr("Common"), "Common"), + (self.tr("Coptic"), "Coptic"), + (self.tr("Cuneiform"), "Cuneiform"), + (self.tr("Cypriot"), "Cypriot"), + (self.tr("Cyrillic"), "Cyrillic"), + (self.tr("Deseret"), "Deseret,"), + (self.tr("Devanagari"), "Devanagari"), + (self.tr("Egyptian Hieroglyphs"), "Egyptian_Hieroglyphs"), + (self.tr("Ethiopic"), "Ethiopic"), + (self.tr("Georgian"), "Georgian"), + (self.tr("Glagolitic"), "Glagolitic"), + (self.tr("Gothic"), "Gothic"), + (self.tr("Greek"), "Greek"), + (self.tr("Gujarati"), "Gujarati"), + (self.tr("Gurmukhi"), "Gurmukhi"), + (self.tr("Han"), "Han"), + (self.tr("Hangul"), "Hangul"), + (self.tr("Hanunoo"), "Hanunoo"), + (self.tr("Hebrew"), "Hebrew"), + (self.tr("Hiragana"), "Hiragana"), + (self.tr("Imperial Aramaic"), "Imperial_Aramaic"), + (self.tr("Inherited"), "Inherited"), + (self.tr("Inscriptional Pahlavi"), "Inscriptional_Pahlavi"), + (self.tr("Inscriptional Parthian"), "Inscriptional_Parthian"), + (self.tr("Javanese"), "Javanese"), + (self.tr("Kaithi"), "Kaithi"), + (self.tr("Kannada"), "Kannada"), + (self.tr("Katakana"), "Katakana"), + (self.tr("Kayah Li"), "Kayah_Li"), + (self.tr("Kharoshthi"), "Kharoshthi"), + (self.tr("Khmer"), "Khmer"), + (self.tr("Lao"), "Lao"), + (self.tr("Latin"), "Latin"), + (self.tr("Lepcha"), "Lepcha"), + (self.tr("Limbu"), "Limbu"), + (self.tr("Linear B"), "Linear_B"), + (self.tr("Lisu"), "Lisu"), + (self.tr("Lycian"), "Lycian"), + (self.tr("Lydian"), "Lydian"), + (self.tr("Malayalam"), "Malayalam"), + (self.tr("Mandaic"), "Mandaic"), + (self.tr("Meetei Mayek"), "Meetei_Mayek"), + (self.tr("Meroitic Cursive"), "Meroitic_Cursive"), + (self.tr("Meroitic Hieroglyphs"), "Meroitic_Hieroglyphs"), + (self.tr("Miao"), "Miao"), + (self.tr("Mongolian"), "Mongolian"), + (self.tr("Myanmar"), "Myanmar"), + (self.tr("New Tai Lue"), "New_Tai_Lue"), + (self.tr("N'Ko"), "Nko"), + (self.tr("Ogham"), "Ogham"), + (self.tr("Old Italic"), "Old_Italic"), + (self.tr("Old Persian"), "Old_Persian"), + (self.tr("Old South Arabian"), "Old_South_Arabian"), + (self.tr("Old Turkic"), "Old_Turkic,"), + (self.tr("Ol Chiki"), "Ol_Chiki"), + (self.tr("Oriya"), "Oriya"), + (self.tr("Osmanya"), "Osmanya"), + (self.tr("Phags-pa"), "Phags_Pa"), + (self.tr("Phoenician"), "Phoenician"), + (self.tr("Rejang"), "Rejang"), + (self.tr("Runic"), "Runic"), + (self.tr("Samaritan"), "Samaritan"), + (self.tr("Saurashtra"), "Saurashtra"), + (self.tr("Sharada"), "Sharada"), + (self.tr("Shavian"), "Shavian"), + (self.tr("Sinhala"), "Sinhala"), + (self.tr("Sora Sompeng"), "Sora_Sompeng"), + (self.tr("Sundanese"), "Sundanese"), + (self.tr("Syloti Nagri"), "Syloti_Nagri"), + (self.tr("Syriac"), "Syriac"), + (self.tr("Tagalog"), "Tagalog"), + (self.tr("Tagbanwa"), "Tagbanwa"), + (self.tr("Tai Le"), "Tai_Le"), + (self.tr("Tai Tham"), "Tai_Tham"), + (self.tr("Tai Viet"), "Tai_Viet"), + (self.tr("Takri"), "Takri"), + (self.tr("Tamil"), "Tamil"), + (self.tr("Telugu"), "Telugu"), + (self.tr("Thaana"), "Thaana"), + (self.tr("Thai"), "Thai"), + (self.tr("Tibetan"), "Tibetan"), + (self.tr("Tifinagh"), "Tifinagh"), + (self.tr("Ugaritic"), "Ugaritic"), + (self.tr("Vai"), "Vai"), + (self.tr("Yi"), "Yi"), ) self.__posixNamedSets = ( # display name code - (self.trUtf8("Alphanumeric"), "alnum"), - (self.trUtf8("Alphabetic"), "alpha"), - (self.trUtf8("ASCII"), "ascii"), - (self.trUtf8("Word Letter"), "word"), - (self.trUtf8("Lower Case Letter"), "lower"), - (self.trUtf8("Upper Case Letter"), "upper"), - (self.trUtf8("Decimal Digit"), "digit"), - (self.trUtf8("Hexadecimal Digit"), "xdigit"), - (self.trUtf8("Space or Tab"), "blank"), - (self.trUtf8("White Space"), "space"), - (self.trUtf8("Printing (excl. space)"), "graph"), - (self.trUtf8("Printing (incl. space)"), "print"), - (self.trUtf8("Printing (excl. alphanumeric)"), "punct"), - (self.trUtf8("Control Character"), "cntrl"), + (self.tr("Alphanumeric"), "alnum"), + (self.tr("Alphabetic"), "alpha"), + (self.tr("ASCII"), "ascii"), + (self.tr("Word Letter"), "word"), + (self.tr("Lower Case Letter"), "lower"), + (self.tr("Upper Case Letter"), "upper"), + (self.tr("Decimal Digit"), "digit"), + (self.tr("Hexadecimal Digit"), "xdigit"), + (self.tr("Space or Tab"), "blank"), + (self.tr("White Space"), "space"), + (self.tr("Printing (excl. space)"), "graph"), + (self.tr("Printing (incl. space)"), "print"), + (self.tr("Printing (excl. alphanumeric)"), "punct"), + (self.tr("Control Character"), "cntrl"), ) def __populateCharTypeCombo(self, combo, isSingle): @@ -381,12 +381,12 @@ cb1.setEditable(False) self.__populateCharTypeCombo(cb1, False) hboxLayout.addWidget(cb1) - l1 = QLabel(self.trUtf8("Between:"), hbox) + l1 = QLabel(self.tr("Between:"), hbox) hboxLayout.addWidget(l1) le1 = QLineEdit(hbox) le1.setValidator(self.charValidator) hboxLayout.addWidget(le1) - l2 = QLabel(self.trUtf8("And:"), hbox) + l2 = QLabel(self.tr("And:"), hbox) hboxLayout.addWidget(l2) le2 = QLineEdit(hbox) le2.setValidator(self.charValidator)
--- a/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Plugins/WizardPlugins/QRegularExpressionWizard/QRegularExpressionWizardDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -90,26 +90,26 @@ self.__pyqt5Available = True self.saveButton = self.buttonBox.addButton( - self.trUtf8("Save"), QDialogButtonBox.ActionRole) + self.tr("Save"), QDialogButtonBox.ActionRole) self.saveButton.setToolTip( - self.trUtf8("Save the regular expression to a file")) + self.tr("Save the regular expression to a file")) self.loadButton = self.buttonBox.addButton( - self.trUtf8("Load"), QDialogButtonBox.ActionRole) + self.tr("Load"), QDialogButtonBox.ActionRole) self.loadButton.setToolTip( - self.trUtf8("Load a regular expression from a file")) + self.tr("Load a regular expression from a file")) if qVersion() >= "5.0.0" and self.__pyqt5Available: self.validateButton = self.buttonBox.addButton( - self.trUtf8("Validate"), QDialogButtonBox.ActionRole) + self.tr("Validate"), QDialogButtonBox.ActionRole) self.validateButton.setToolTip( - self.trUtf8("Validate the regular expression")) + self.tr("Validate the regular expression")) self.executeButton = self.buttonBox.addButton( - self.trUtf8("Execute"), QDialogButtonBox.ActionRole) + self.tr("Execute"), QDialogButtonBox.ActionRole) self.executeButton.setToolTip( - self.trUtf8("Execute the regular expression")) + self.tr("Execute the regular expression")) self.nextButton = self.buttonBox.addButton( - self.trUtf8("Next match"), QDialogButtonBox.ActionRole) + self.tr("Next match"), QDialogButtonBox.ActionRole) self.nextButton.setToolTip( - self.trUtf8("Show the next match of the regular expression")) + self.tr("Show the next match of the regular expression")) self.nextButton.setEnabled(False) else: self.validateButton = None @@ -122,9 +122,9 @@ self.copyButton = None else: self.copyButton = self.buttonBox.addButton( - self.trUtf8("Copy"), QDialogButtonBox.ActionRole) + self.tr("Copy"), QDialogButtonBox.ActionRole) self.copyButton.setToolTip( - self.trUtf8("Copy the regular expression to the clipboard")) + self.tr("Copy the regular expression to the clipboard")) self.buttonBox.setStandardButtons(QDialogButtonBox.Close) self.variableLabel.hide() self.variableLineEdit.hide() @@ -164,9 +164,9 @@ if responseDict["error"]: E5MessageBox.critical( self, - self.trUtf8("Communication Error"), - self.trUtf8("""<p>The PyQt5 backend reported""" - """ an error.</p><p>{0}</p>""") + self.tr("Communication Error"), + self.tr("""<p>The PyQt5 backend reported""" + """ an error.</p><p>{0}</p>""") .format(responseDict["error"])) responseDict = {} @@ -279,14 +279,14 @@ if not names: E5MessageBox.information( self, - self.trUtf8("Named reference"), - self.trUtf8("""No named groups have been defined yet.""")) + self.tr("Named reference"), + self.tr("""No named groups have been defined yet.""")) return groupName, ok = QInputDialog.getItem( self, - self.trUtf8("Named reference"), - self.trUtf8("Select group name:"), + self.tr("Named reference"), + self.tr("Select group name:"), names, 0, True) if ok and groupName: @@ -395,9 +395,9 @@ """ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save regular expression"), + self.tr("Save regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)"), + self.tr("RegExp Files (*.rx);;All Files (*)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) if fname: @@ -409,9 +409,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save regular expression"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save regular expression"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -424,9 +424,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -436,9 +436,9 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Load regular expression"), + self.tr("Load regular expression"), "", - self.trUtf8("RegExp Files (*.rx);;All Files (*)")) + self.tr("RegExp Files (*.rx);;All Files (*)")) if fname: try: f = open( @@ -449,9 +449,9 @@ except IOError as err: E5MessageBox.information( self, - self.trUtf8("Save regular expression"), - self.trUtf8("""<p>The regular expression could not""" - """ be saved.</p><p>Reason: {0}</p>""") + self.tr("Save regular expression"), + self.tr("""<p>The regular expression could not""" + """ be saved.</p><p>Reason: {0}</p>""") .format(str(err))) @pyqtSlot() @@ -502,14 +502,14 @@ if response["valid"]: E5MessageBox.information( self, - self.trUtf8("Validation"), - self.trUtf8( + self.tr("Validation"), + self.tr( """The regular expression is valid.""")) else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(response["errorMessage"])) # move cursor to error offset offset = response["errorOffset"] @@ -521,20 +521,20 @@ else: E5MessageBox.critical( self, - self.trUtf8("Communication Error"), - self.trUtf8("""Invalid response received from""" - """ PyQt5 backend.""")) + self.tr("Communication Error"), + self.tr("""Invalid response received from""" + """ PyQt5 backend.""")) else: E5MessageBox.critical( self, - self.trUtf8("Communication Error"), - self.trUtf8("""Communication with PyQt5 backend""" - """ failed.""")) + self.tr("Communication Error"), + self.tr("""Communication with PyQt5 backend""" + """ failed.""")) else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression must be given.""")) + self.tr("Error"), + self.tr("""A regular expression must be given.""")) @pyqtSlot() def on_executeButton_clicked(self, startpos=0): @@ -577,8 +577,8 @@ if "valid" in response: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""Invalid regular expression: {0}""") + self.tr("Error"), + self.tr("""Invalid regular expression: {0}""") .format(response["errorMessage"])) # move cursor to error offset offset = response["errorOffset"] @@ -596,7 +596,7 @@ self.resultTable.setRowCount(0) self.resultTable.setRowCount(OFFSET) self.resultTable.setItem( - row, 0, QTableWidgetItem(self.trUtf8("Regexp"))) + row, 0, QTableWidgetItem(self.tr("Regexp"))) self.resultTable.setItem( row, 1, QTableWidgetItem(regexp)) if response["matched"]: @@ -608,7 +608,7 @@ row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Offset"))) + QTableWidgetItem(self.tr("Offset"))) self.resultTable.setItem( row, 1, QTableWidgetItem("{0:d}".format(offset))) @@ -616,7 +616,7 @@ row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Captures"))) + QTableWidgetItem(self.tr("Captures"))) self.resultTable.setItem( row, 1, QTableWidgetItem( @@ -624,15 +624,15 @@ row += 1 self.resultTable.setItem( row, 1, - QTableWidgetItem(self.trUtf8("Text"))) + QTableWidgetItem(self.tr("Text"))) self.resultTable.setItem( row, 2, - QTableWidgetItem(self.trUtf8("Characters"))) + QTableWidgetItem(self.tr("Characters"))) row += 1 self.resultTable.setItem( row, 0, - QTableWidgetItem(self.trUtf8("Match"))) + QTableWidgetItem(self.tr("Match"))) self.resultTable.setItem( row, 1, QTableWidgetItem(captures[0][0])) @@ -648,7 +648,7 @@ self.resultTable.setItem( row, 0, QTableWidgetItem( - self.trUtf8("Capture #{0}") + self.tr("Capture #{0}") .format(i))) self.resultTable.setItem( row, 1, @@ -672,12 +672,12 @@ self.resultTable.setItem( row, 0, QTableWidgetItem( - self.trUtf8("No more matches"))) + self.tr("No more matches"))) else: self.resultTable.setItem( row, 0, QTableWidgetItem( - self.trUtf8("No matches"))) + self.tr("No matches"))) # remove the highlight tc = self.textTextEdit.textCursor() @@ -691,21 +691,21 @@ else: E5MessageBox.critical( self, - self.trUtf8("Communication Error"), - self.trUtf8("""Invalid response received from""" - """ PyQt5 backend.""")) + self.tr("Communication Error"), + self.tr("""Invalid response received from""" + """ PyQt5 backend.""")) else: E5MessageBox.critical( self, - self.trUtf8("Communication Error"), - self.trUtf8("""Communication with PyQt5""" - """ backend failed.""")) + self.tr("Communication Error"), + self.tr("""Communication with PyQt5""" + """ backend failed.""")) else: E5MessageBox.critical( self, - self.trUtf8("Error"), - self.trUtf8("""A regular expression and a text must""" - """ be given.""")) + self.tr("Error"), + self.tr("""A regular expression and a text must""" + """ be given.""")) @pyqtSlot() def on_nextButton_clicked(self):
--- a/Preferences/ConfigurationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -119,191 +119,191 @@ # create the configuration page. This must have the method # save to save the settings. "applicationPage": - [self.trUtf8("Application"), "preferences-application.png", + [self.tr("Application"), "preferences-application.png", "ApplicationPage", None, None], "cooperationPage": - [self.trUtf8("Cooperation"), "preferences-cooperation.png", + [self.tr("Cooperation"), "preferences-cooperation.png", "CooperationPage", None, None], "corbaPage": - [self.trUtf8("CORBA"), "preferences-orbit.png", + [self.tr("CORBA"), "preferences-orbit.png", "CorbaPage", None, None], "emailPage": - [self.trUtf8("Email"), "preferences-mail_generic.png", + [self.tr("Email"), "preferences-mail_generic.png", "EmailPage", None, None], "graphicsPage": - [self.trUtf8("Graphics"), "preferences-graphics.png", + [self.tr("Graphics"), "preferences-graphics.png", "GraphicsPage", None, None], "iconsPage": - [self.trUtf8("Icons"), "preferences-icons.png", + [self.tr("Icons"), "preferences-icons.png", "IconsPage", None, None], "ircPage": - [self.trUtf8("IRC"), "irc.png", + [self.tr("IRC"), "irc.png", "IrcPage", None, None], "networkPage": - [self.trUtf8("Network"), "preferences-network.png", + [self.tr("Network"), "preferences-network.png", "NetworkPage", None, None], "notificationsPage": - [self.trUtf8("Notifications"), + [self.tr("Notifications"), "preferences-notifications.png", "NotificationsPage", None, None], "pluginManagerPage": - [self.trUtf8("Plugin Manager"), + [self.tr("Plugin Manager"), "preferences-pluginmanager.png", "PluginManagerPage", None, None], "printerPage": - [self.trUtf8("Printer"), "preferences-printer.png", + [self.tr("Printer"), "preferences-printer.png", "PrinterPage", None, None], "pythonPage": - [self.trUtf8("Python"), "preferences-python.png", + [self.tr("Python"), "preferences-python.png", "PythonPage", None, None], "qtPage": - [self.trUtf8("Qt"), "preferences-qtlogo.png", + [self.tr("Qt"), "preferences-qtlogo.png", "QtPage", None, None], "securityPage": - [self.trUtf8("Security"), "preferences-security.png", + [self.tr("Security"), "preferences-security.png", "SecurityPage", None, None], "shellPage": - [self.trUtf8("Shell"), "preferences-shell.png", + [self.tr("Shell"), "preferences-shell.png", "ShellPage", None, None], "tasksPage": - [self.trUtf8("Tasks"), "task.png", + [self.tr("Tasks"), "task.png", "TasksPage", None, None], "templatesPage": - [self.trUtf8("Templates"), "preferences-template.png", + [self.tr("Templates"), "preferences-template.png", "TemplatesPage", None, None], "trayStarterPage": - [self.trUtf8("Tray Starter"), "erict.png", + [self.tr("Tray Starter"), "erict.png", "TrayStarterPage", None, None], "vcsPage": - [self.trUtf8("Version Control Systems"), + [self.tr("Version Control Systems"), "preferences-vcs.png", "VcsPage", None, None], "0debuggerPage": - [self.trUtf8("Debugger"), "preferences-debugger.png", + [self.tr("Debugger"), "preferences-debugger.png", None, None, None], "debuggerGeneralPage": - [self.trUtf8("General"), "preferences-debugger.png", + [self.tr("General"), "preferences-debugger.png", "DebuggerGeneralPage", "0debuggerPage", None], "debuggerPythonPage": - [self.trUtf8("Python"), "preferences-pyDebugger.png", + [self.tr("Python"), "preferences-pyDebugger.png", "DebuggerPythonPage", "0debuggerPage", None], "debuggerPython3Page": - [self.trUtf8("Python3"), "preferences-pyDebugger.png", + [self.tr("Python3"), "preferences-pyDebugger.png", "DebuggerPython3Page", "0debuggerPage", None], "debuggerRubyPage": - [self.trUtf8("Ruby"), "preferences-rbDebugger.png", + [self.tr("Ruby"), "preferences-rbDebugger.png", "DebuggerRubyPage", "0debuggerPage", None], "0editorPage": - [self.trUtf8("Editor"), "preferences-editor.png", + [self.tr("Editor"), "preferences-editor.png", None, None, None], "editorAPIsPage": - [self.trUtf8("APIs"), "preferences-api.png", + [self.tr("APIs"), "preferences-api.png", "EditorAPIsPage", "0editorPage", None], "editorAutocompletionPage": - [self.trUtf8("Autocompletion"), + [self.tr("Autocompletion"), "preferences-autocompletion.png", "EditorAutocompletionPage", "0editorPage", None], "editorAutocompletionQScintillaPage": - [self.trUtf8("QScintilla"), "qscintilla.png", + [self.tr("QScintilla"), "qscintilla.png", "EditorAutocompletionQScintillaPage", "editorAutocompletionPage", None], "editorCalltipsPage": - [self.trUtf8("Calltips"), "preferences-calltips.png", + [self.tr("Calltips"), "preferences-calltips.png", "EditorCalltipsPage", "0editorPage", None], "editorCalltipsQScintillaPage": - [self.trUtf8("QScintilla"), "qscintilla.png", + [self.tr("QScintilla"), "qscintilla.png", "EditorCalltipsQScintillaPage", "editorCalltipsPage", None], "editorGeneralPage": - [self.trUtf8("General"), "preferences-general.png", + [self.tr("General"), "preferences-general.png", "EditorGeneralPage", "0editorPage", None], "editorFilePage": - [self.trUtf8("Filehandling"), + [self.tr("Filehandling"), "preferences-filehandling.png", "EditorFilePage", "0editorPage", None], "editorSearchPage": - [self.trUtf8("Searching"), "preferences-search.png", + [self.tr("Searching"), "preferences-search.png", "EditorSearchPage", "0editorPage", None], "editorSpellCheckingPage": - [self.trUtf8("Spell checking"), + [self.tr("Spell checking"), "preferences-spellchecking.png", "EditorSpellCheckingPage", "0editorPage", None], "editorStylesPage": - [self.trUtf8("Style"), "preferences-styles.png", + [self.tr("Style"), "preferences-styles.png", "EditorStylesPage", "0editorPage", None], "editorSyntaxPage": - [self.trUtf8("Code Checkers"), "preferences-debugger.png", + [self.tr("Code Checkers"), "preferences-debugger.png", "EditorSyntaxPage", "0editorPage", None], "editorTypingPage": - [self.trUtf8("Typing"), "preferences-typing.png", + [self.tr("Typing"), "preferences-typing.png", "EditorTypingPage", "0editorPage", None], "editorExportersPage": - [self.trUtf8("Exporters"), "preferences-exporters.png", + [self.tr("Exporters"), "preferences-exporters.png", "EditorExportersPage", "0editorPage", None], "1editorLexerPage": - [self.trUtf8("Highlighters"), + [self.tr("Highlighters"), "preferences-highlighting-styles.png", None, "0editorPage", None], "editorHighlightersPage": - [self.trUtf8("Filetype Associations"), + [self.tr("Filetype Associations"), "preferences-highlighter-association.png", "EditorHighlightersPage", "1editorLexerPage", None], "editorHighlightingStylesPage": - [self.trUtf8("Styles"), + [self.tr("Styles"), "preferences-highlighting-styles.png", "EditorHighlightingStylesPage", "1editorLexerPage", None], "editorKeywordsPage": - [self.trUtf8("Keywords"), "preferences-keywords.png", + [self.tr("Keywords"), "preferences-keywords.png", "EditorKeywordsPage", "1editorLexerPage", None], "editorPropertiesPage": - [self.trUtf8("Properties"), "preferences-properties.png", + [self.tr("Properties"), "preferences-properties.png", "EditorPropertiesPage", "1editorLexerPage", None], "0helpPage": - [self.trUtf8("Help"), "preferences-help.png", + [self.tr("Help"), "preferences-help.png", None, None, None], "helpAppearancePage": - [self.trUtf8("Appearance"), "preferences-styles.png", + [self.tr("Appearance"), "preferences-styles.png", "HelpAppearancePage", "0helpPage", None], "helpDocumentationPage": - [self.trUtf8("Help Documentation"), + [self.tr("Help Documentation"), "preferences-helpdocumentation.png", "HelpDocumentationPage", "0helpPage", None], "helpViewersPage": - [self.trUtf8("Help Viewers"), + [self.tr("Help Viewers"), "preferences-helpviewers.png", "HelpViewersPage", "0helpPage", None], "helpVirusTotalPage": - [self.trUtf8("VirusTotal Interface"), "virustotal.png", + [self.tr("VirusTotal Interface"), "virustotal.png", "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": - [self.trUtf8("eric5 Web Browser"), "ericWeb.png", + [self.tr("eric5 Web Browser"), "ericWeb.png", "HelpWebBrowserPage", "0helpPage", None], "0projectPage": - [self.trUtf8("Project"), "preferences-project.png", + [self.tr("Project"), "preferences-project.png", None, None, None], "projectBrowserPage": - [self.trUtf8("Project Viewer"), "preferences-project.png", + [self.tr("Project Viewer"), "preferences-project.png", "ProjectBrowserPage", "0projectPage", None], "projectPage": - [self.trUtf8("Project"), "preferences-project.png", + [self.tr("Project"), "preferences-project.png", "ProjectPage", "0projectPage", None], "multiProjectPage": - [self.trUtf8("Multiproject"), + [self.tr("Multiproject"), "preferences-multiproject.png", "MultiProjectPage", "0projectPage", None], "0interfacePage": - [self.trUtf8("Interface"), "preferences-interface.png", + [self.tr("Interface"), "preferences-interface.png", None, None, None], "interfacePage": - [self.trUtf8("Interface"), "preferences-interface.png", + [self.tr("Interface"), "preferences-interface.png", "InterfacePage", "0interfacePage", None], "viewmanagerPage": - [self.trUtf8("Viewmanager"), "preferences-viewmanager.png", + [self.tr("Viewmanager"), "preferences-viewmanager.png", "ViewmanagerPage", "0interfacePage", None], } @@ -318,33 +318,33 @@ # create the configuration page. This must have the method # save to save the settings. "interfacePage": - [self.trUtf8("Interface"), "preferences-interface.png", + [self.tr("Interface"), "preferences-interface.png", "HelpInterfacePage", None, None], "networkPage": - [self.trUtf8("Network"), "preferences-network.png", + [self.tr("Network"), "preferences-network.png", "NetworkPage", None, None], "printerPage": - [self.trUtf8("Printer"), "preferences-printer.png", + [self.tr("Printer"), "preferences-printer.png", "PrinterPage", None, None], "securityPage": - [self.trUtf8("Security"), "preferences-security.png", + [self.tr("Security"), "preferences-security.png", "SecurityPage", None, None], "0helpPage": - [self.trUtf8("Help"), "preferences-help.png", + [self.tr("Help"), "preferences-help.png", None, None, None], "helpAppearancePage": - [self.trUtf8("Appearance"), "preferences-styles.png", + [self.tr("Appearance"), "preferences-styles.png", "HelpAppearancePage", "0helpPage", None], "helpDocumentationPage": - [self.trUtf8("Help Documentation"), + [self.tr("Help Documentation"), "preferences-helpdocumentation.png", "HelpDocumentationPage", "0helpPage", None], "helpVirusTotalPage": - [self.trUtf8("VirusTotal Interface"), "virustotal.png", + [self.tr("VirusTotal Interface"), "virustotal.png", "HelpVirusTotalPage", "0helpPage", None], "helpWebBrowserPage": - [self.trUtf8("eric5 Web Browser"), "ericWeb.png", + [self.tr("eric5 Web Browser"), "ericWeb.png", "HelpWebBrowserPage", "0helpPage", None], } elif displayMode == ConfigurationWidget.TrayStarterMode: @@ -356,7 +356,7 @@ # create the configuration page. This must have the method # save to save the settings. "trayStarterPage": - [self.trUtf8("Tray Starter"), "erict.png", + [self.tr("Tray Starter"), "erict.png", "TrayStarterPage", None, None], } else: @@ -418,7 +418,7 @@ self.leftVBoxLayout.setSpacing(0) self.leftVBoxLayout.setObjectName("leftVBoxLayout") self.configListFilter = E5ClearableLineEdit( - self, self.trUtf8("Enter filter text...")) + self, self.tr("Enter filter text...")) self.configListFilter.setObjectName("configListFilter") self.leftVBoxLayout.addWidget(self.configListFilter) self.configList = QTreeWidget() @@ -479,14 +479,14 @@ self.buttonBox.button(QDialogButtonBox.Reset).setEnabled(False) self.verticalLayout_2.addWidget(self.buttonBox) - self.setWindowTitle(self.trUtf8("Preferences")) + self.setWindowTitle(self.tr("Preferences")) self.configList.header().hide() self.configList.header().setSortIndicator(0, Qt.AscendingOrder) self.configList.setSortingEnabled(True) self.textLabel1.setText( - self.trUtf8("Please select an entry of the list \n" - "to display the configuration page.")) + self.tr("Please select an entry of the list \n" + "to display the configuration page.")) QMetaObject.connectSlotsByName(self) self.setTabOrder(self.configList, self.configStack) @@ -558,9 +558,9 @@ except ImportError: E5MessageBox.critical( self, - self.trUtf8("Configuration Page Error"), - self.trUtf8("""<p>The configuration page <b>{0}</b>""" - """ could not be loaded.</p>""").format(name)) + self.tr("Configuration Page Error"), + self.tr("""<p>The configuration page <b>{0}</b>""" + """ could not be loaded.</p>""").format(name)) return None def __showConfigurationPage(self, itm, column):
--- a/Preferences/ConfigurationPages/CorbaPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/CorbaPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,7 +52,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select IDL compiler"), + self.tr("Select IDL compiler"), self.idlEdit.text(), "")
--- a/Preferences/ConfigurationPages/DebuggerGeneralPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/DebuggerGeneralPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -238,8 +238,8 @@ """ allowedHost, ok = QInputDialog.getText( None, - self.trUtf8("Add allowed host"), - self.trUtf8("Enter the IP address of an allowed host"), + self.tr("Add allowed host"), + self.tr("Enter the IP address of an allowed host"), QLineEdit.Normal) if ok and allowedHost: if QHostAddress(allowedHost).protocol() in \ @@ -248,8 +248,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Add allowed host"), - self.trUtf8( + self.tr("Add allowed host"), + self.tr( """<p>The entered address <b>{0}</b> is not""" """ a valid IP v4 or IP v6 address.""" """ Aborting...</p>""") @@ -270,8 +270,8 @@ allowedHost = self.allowedHostsList.currentItem().text() allowedHost, ok = QInputDialog.getText( None, - self.trUtf8("Edit allowed host"), - self.trUtf8("Enter the IP address of an allowed host"), + self.tr("Edit allowed host"), + self.tr("Enter the IP address of an allowed host"), QLineEdit.Normal, allowedHost) if ok and allowedHost: @@ -281,8 +281,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Edit allowed host"), - self.trUtf8( + self.tr("Edit allowed host"), + self.tr( """<p>The entered address <b>{0}</b> is not""" """ a valid IP v4 or IP v6 address.""" """ Aborting...</p>""")
--- a/Preferences/ConfigurationPages/DebuggerPython3Page.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/DebuggerPython3Page.py Sat Jan 11 11:55:33 2014 +0100 @@ -96,7 +96,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Python interpreter for Debug Client"), + self.tr("Select Python interpreter for Debug Client"), self.interpreterEdit.text(), "") @@ -111,9 +111,9 @@ """ file = E5FileDialog.getOpenFileName( None, - self.trUtf8("Select Debug Client"), + self.tr("Select Debug Client"), self.debugClientEdit.text(), - self.trUtf8("Python Files (*.py *.py3)")) + self.tr("Python Files (*.py *.py3)")) if file: self.debugClientEdit.setText(
--- a/Preferences/ConfigurationPages/DebuggerPythonPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/DebuggerPythonPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -91,7 +91,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Python interpreter for Debug Client"), + self.tr("Select Python interpreter for Debug Client"), self.interpreterEdit.text(), "") @@ -106,9 +106,9 @@ """ file = E5FileDialog.getOpenFileName( None, - self.trUtf8("Select Debug Client"), + self.tr("Select Debug Client"), self.debugClientEdit.text(), - self.trUtf8("Python Files (*.py *.py2)")) + self.tr("Python Files (*.py *.py2)")) if file: self.debugClientEdit.setText(
--- a/Preferences/ConfigurationPages/DebuggerRubyPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/DebuggerRubyPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -61,7 +61,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Ruby interpreter for Debug Client"), + self.tr("Select Ruby interpreter for Debug Client"), self.rubyInterpreterEdit.text()) if file:
--- a/Preferences/ConfigurationPages/EditorAPIsPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorAPIsPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,7 +36,7 @@ self.apiFileButton.setIcon(UI.PixmapCache.getIcon("open.png")) - self.prepareApiButton.setText(self.trUtf8("Compile APIs")) + self.prepareApiButton.setText(self.tr("Compile APIs")) self.__currentAPI = None self.__inPreparation = False @@ -138,9 +138,9 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select API file"), + self.tr("Select API file"), self.apiFileEdit.text(), - self.trUtf8("API File (*.api);;All Files (*)")) + self.tr("API File (*.api);;All Files (*)")) if file: self.apiFileEdit.setText(Utilities.toNativeSeparators(file)) @@ -182,8 +182,8 @@ QFileInfo(installedAPIFile).fileName()) file, ok = QInputDialog.getItem( self, - self.trUtf8("Add from installed APIs"), - self.trUtf8("Select from the list of installed API files"), + self.tr("Add from installed APIs"), + self.tr("Select from the list of installed API files"), installedAPIFilesShort, 0, False) if ok: @@ -193,9 +193,9 @@ else: E5MessageBox.warning( self, - self.trUtf8("Add from installed APIs"), - self.trUtf8("""There are no APIs installed yet.""" - """ Selection is not available.""")) + self.tr("Add from installed APIs"), + self.tr("""There are no APIs installed yet.""" + """ Selection is not available.""")) self.addInstalledApiFileButton.setEnabled(False) self.prepareApiButton.setEnabled(self.apiList.count() > 0) @@ -212,8 +212,8 @@ pluginAPIFilesDict[QFileInfo(apiFile).fileName()] = apiFile file, ok = QInputDialog.getItem( self, - self.trUtf8("Add from Plugin APIs"), - self.trUtf8( + self.tr("Add from Plugin APIs"), + self.tr( "Select from the list of API files installed by plugins"), sorted(pluginAPIFilesDict.keys()), 0, False) @@ -243,7 +243,7 @@ self.prepareApiProgressBar.reset() self.prepareApiProgressBar.setRange(0, 100) self.prepareApiProgressBar.setValue(0) - self.prepareApiButton.setText(self.trUtf8("Compile APIs")) + self.prepareApiButton.setText(self.tr("Compile APIs")) self.__inPreparation = False def __apiPreparationCancelled(self): @@ -258,7 +258,7 @@ """ self.prepareApiProgressBar.setRange(0, 0) self.prepareApiProgressBar.setValue(0) - self.prepareApiButton.setText(self.trUtf8("Cancel compilation")) + self.prepareApiButton.setText(self.tr("Cancel compilation")) self.__inPreparation = True def saveState(self):
--- a/Preferences/ConfigurationPages/EditorCalltipsPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorCalltipsPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -31,10 +31,10 @@ if QSCINTILLA_VERSION() >= 0x020700: self.positionComboBox.addItem( - self.trUtf8("Below Text"), + self.tr("Below Text"), QsciScintilla.CallTipsBelowText) self.positionComboBox.addItem( - self.trUtf8("Above Text"), + self.tr("Above Text"), QsciScintilla.CallTipsAboveText) else: self.calltipsPositionBox.hide()
--- a/Preferences/ConfigurationPages/EditorExportersPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorExportersPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,12 +40,12 @@ for exporter in exporters: self.exportersCombo.addItem(exporter, self.pageIds[exporter]) - self.pdfFontCombo.addItem(self.trUtf8("Courier"), "Courier") - self.pdfFontCombo.addItem(self.trUtf8("Helvetica"), "Helvetica") - self.pdfFontCombo.addItem(self.trUtf8("Times"), "Times") + self.pdfFontCombo.addItem(self.tr("Courier"), "Courier") + self.pdfFontCombo.addItem(self.tr("Helvetica"), "Helvetica") + self.pdfFontCombo.addItem(self.tr("Times"), "Times") - self.pdfPageSizeCombo.addItem(self.trUtf8("A4"), "A4") - self.pdfPageSizeCombo.addItem(self.trUtf8("Letter"), "Letter") + self.pdfPageSizeCombo.addItem(self.tr("A4"), "A4") + self.pdfPageSizeCombo.addItem(self.tr("Letter"), "Letter") # HTML self.htmlWysiwygCheckBox.setChecked(
--- a/Preferences/ConfigurationPages/EditorFilePage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorFilePage.py Sat Jan 11 11:55:33 2014 +0100 @@ -201,18 +201,18 @@ filter.count("*") != 1: E5MessageBox.critical( self, - self.trUtf8("Add File Filter"), - self.trUtf8("""A Save File Filter must contain exactly one""" - """ wildcard pattern. Yours contains {0}.""") + self.tr("Add File Filter"), + self.tr("""A Save File Filter must contain exactly one""" + """ wildcard pattern. Yours contains {0}.""") .format(filter.count("*"))) return False if filter.count("*") == 0: E5MessageBox.critical( self, - self.trUtf8("Add File Filter"), - self.trUtf8("""A File Filter must contain at least one""" - """ wildcard pattern.""")) + self.tr("Add File Filter"), + self.tr("""A File Filter must contain at least one""" + """ wildcard pattern.""")) return False return True @@ -224,8 +224,8 @@ """ filter, ok = QInputDialog.getText( self, - self.trUtf8("Add File Filter"), - self.trUtf8("Enter the file filter entry:"), + self.tr("Add File Filter"), + self.tr("Enter the file filter entry:"), QLineEdit.Normal) if ok and filter: if self.__checkFileFilter(filter): @@ -241,8 +241,8 @@ filter = self.fileFiltersList.currentItem().text() filter, ok = QInputDialog.getText( self, - self.trUtf8("Add File Filter"), - self.trUtf8("Enter the file filter entry:"), + self.tr("Add File Filter"), + self.tr("Enter the file filter entry:"), QLineEdit.Normal, filter) if ok and filter:
--- a/Preferences/ConfigurationPages/EditorHighlightersPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorHighlightersPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -48,7 +48,7 @@ except AttributeError: self.extsep = "." - self.extras = ["-----------", self.trUtf8("Alternative")] + self.extras = ["-----------", self.tr("Alternative")] languages = [''] + sorted(lexers.keys()) + self.extras self.editorLexerCombo.addItems(languages) @@ -137,7 +137,7 @@ if lexer.startswith("Pygments|"): pygmentsLexer = lexer.split("|")[1] pygmentsIndex = self.pygmentsLexerCombo.findText(pygmentsLexer) - lexer = self.trUtf8("Alternative") + lexer = self.tr("Alternative") else: pygmentsIndex = 0 index = self.editorLexerCombo.findText(lexer)
--- a/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorHighlightingStylesPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,29 +40,29 @@ self.setObjectName("EditorHighlightingStylesPage") self.__fontButtonMenu = QMenu() - act = self.__fontButtonMenu.addAction(self.trUtf8("Font")) + act = self.__fontButtonMenu.addAction(self.tr("Font")) act.setData(self.FONT) self.__fontButtonMenu.addSeparator() act = self.__fontButtonMenu.addAction( - self.trUtf8("Family and Size only")) + self.tr("Family and Size only")) act.setData(self.FAMILYANDSIZE) - act = self.__fontButtonMenu.addAction(self.trUtf8("Family only")) + act = self.__fontButtonMenu.addAction(self.tr("Family only")) act.setData(self.FAMILYONLY) - act = self.__fontButtonMenu.addAction(self.trUtf8("Size only")) + act = self.__fontButtonMenu.addAction(self.tr("Size only")) act.setData(self.SIZEONLY) self.__fontButtonMenu.triggered.connect(self.__fontButtonMenuTriggered) self.fontButton.setMenu(self.__fontButtonMenu) self.__allFontsButtonMenu = QMenu() - act = self.__allFontsButtonMenu.addAction(self.trUtf8("Font")) + act = self.__allFontsButtonMenu.addAction(self.tr("Font")) act.setData(self.FONT) self.__allFontsButtonMenu.addSeparator() act = self.__allFontsButtonMenu.addAction( - self.trUtf8("Family and Size only")) + self.tr("Family and Size only")) act.setData(self.FAMILYANDSIZE) - act = self.__allFontsButtonMenu.addAction(self.trUtf8("Family only")) + act = self.__allFontsButtonMenu.addAction(self.tr("Family only")) act.setData(self.FAMILYONLY) - act = self.__allFontsButtonMenu.addAction(self.trUtf8("Size only")) + act = self.__allFontsButtonMenu.addAction(self.tr("Size only")) act.setData(self.SIZEONLY) self.__allFontsButtonMenu.triggered.connect( self.__allFontsButtonMenuTriggered) @@ -324,12 +324,12 @@ Private method used to set the eolfill for all styles of a selected lexer. """ - on = self.trUtf8("Enabled") - off = self.trUtf8("Disabled") + on = self.tr("Enabled") + off = self.tr("Disabled") selection, ok = QInputDialog.getItem( self, - self.trUtf8("Fill to end of line"), - self.trUtf8("Select fill to end of line for all styles"), + self.tr("Fill to end of line"), + self.tr("Select fill to end of line for all styles"), [on, off], 0, False) if ok: @@ -413,9 +413,9 @@ """ fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Export Highlighting Styles"), + self.tr("Export Highlighting Styles"), "", - self.trUtf8("Highlighting styles file (*.e4h)"), + self.tr("Highlighting styles file (*.e4h)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -436,8 +436,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Export Highlighting Styles"), - self.trUtf8( + self.tr("Export Highlighting Styles"), + self.tr( """<p>The highlighting styles could not be exported""" """ to file <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(fn, f.errorString()) @@ -452,9 +452,9 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Import Highlighting Styles"), + self.tr("Import Highlighting Styles"), "", - self.trUtf8("Highlighting styles file (*.e4h)")) + self.tr("Highlighting styles file (*.e4h)")) if not fn: return @@ -468,8 +468,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Import Highlighting Styles"), - self.trUtf8( + self.tr("Import Highlighting Styles"), + self.tr( """<p>The highlighting styles could not be read""" """ from file <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(fn, f.errorString())
--- a/Preferences/ConfigurationPages/EditorSpellCheckingPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorSpellCheckingPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -112,9 +112,9 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select personal word list"), + self.tr("Select personal word list"), self.pwlEdit.text(), - self.trUtf8("Dictionary File (*.dic);;All Files (*)")) + self.tr("Dictionary File (*.dic);;All Files (*)")) if file: self.pwlEdit.setText(Utilities.toNativeSeparators(file)) @@ -126,9 +126,9 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select personal exclude list"), + self.tr("Select personal exclude list"), self.pelEdit.text(), - self.trUtf8("Dictionary File (*.dic);;All Files (*)")) + self.tr("Dictionary File (*.dic);;All Files (*)")) if file: self.pelEdit.setText(Utilities.toNativeSeparators(file))
--- a/Preferences/ConfigurationPages/EditorStylesPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EditorStylesPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -48,20 +48,20 @@ ] self.wrapModeComboBox.addItem( - self.trUtf8("Disabled"), QsciScintilla.WrapNone) + self.tr("Disabled"), QsciScintilla.WrapNone) self.wrapModeComboBox.addItem( - self.trUtf8("Word Boundary"), QsciScintilla.WrapWord) + self.tr("Word Boundary"), QsciScintilla.WrapWord) self.wrapModeComboBox.addItem( - self.trUtf8("Character Boundary"), QsciScintilla.WrapCharacter) + self.tr("Character Boundary"), QsciScintilla.WrapCharacter) self.wrapVisualComboBox.addItem( - self.trUtf8("No Indicator"), QsciScintilla.WrapFlagNone) + self.tr("No Indicator"), QsciScintilla.WrapFlagNone) self.wrapVisualComboBox.addItem( - self.trUtf8("Indicator by Text"), QsciScintilla.WrapFlagByText) + self.tr("Indicator by Text"), QsciScintilla.WrapFlagByText) self.wrapVisualComboBox.addItem( - self.trUtf8("Indicator by Margin"), QsciScintilla.WrapFlagByBorder) + self.tr("Indicator by Margin"), QsciScintilla.WrapFlagByBorder) if QSCINTILLA_VERSION() >= 0x020700: self.wrapVisualComboBox.addItem( - self.trUtf8("Indicator in Line Number Margin"), + self.tr("Indicator in Line Number Margin"), QsciScintilla.WrapFlagInMargin) if QSCINTILLA_VERSION() < 0x020800:
--- a/Preferences/ConfigurationPages/EmailPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/EmailPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -133,8 +133,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.information( self, - self.trUtf8("Login Test"), - self.trUtf8("""The login test succeeded.""")) + self.tr("Login Test"), + self.tr("""The login test succeeded.""")) except (smtplib.SMTPException, socket.error) as e: QApplication.restoreOverrideCursor() if isinstance(e, smtplib.SMTPResponseException): @@ -150,8 +150,8 @@ errorStr = str(e) E5MessageBox.critical( self, - self.trUtf8("Login Test"), - self.trUtf8( + self.tr("Login Test"), + self.tr( """<p>The login test failed.<br>Reason: {0}</p>""") .format(errorStr)) server.quit() @@ -170,8 +170,8 @@ errorStr = str(e) E5MessageBox.critical( self, - self.trUtf8("Login Test"), - self.trUtf8("""<p>The login test failed.<br>Reason: {0}</p>""") + self.tr("Login Test"), + self.tr("""<p>The login test failed.<br>Reason: {0}</p>""") .format(errorStr))
--- a/Preferences/ConfigurationPages/HelpAppearancePage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/HelpAppearancePage.py Sat Jan 11 11:55:33 2014 +0100 @@ -134,7 +134,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Style Sheet"), + self.tr("Select Style Sheet"), self.styleSheetEdit.text(), "")
--- a/Preferences/ConfigurationPages/HelpDocumentationPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/HelpDocumentationPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -108,9 +108,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Python 2 documentation entry"), + self.tr("Select Python 2 documentation entry"), QUrl(self.python2DocDirEdit.text()).path(), - self.trUtf8( + self.tr( "HTML Files (*.html *.htm);;" "Compressed Help Files (*.chm);;" "All Files (*)")) @@ -125,9 +125,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Python 3 documentation entry"), + self.tr("Select Python 3 documentation entry"), QUrl(self.pythonDocDirEdit.text()).path(), - self.trUtf8( + self.tr( "HTML Files (*.html *.htm);;" "Compressed Help Files (*.chm);;" "All Files (*)")) @@ -142,9 +142,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Qt4 documentation entry"), + self.tr("Select Qt4 documentation entry"), QUrl(self.qt4DocDirEdit.text()).path(), - self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) + self.tr("HTML Files (*.html *.htm);;All Files (*)")) if entry: self.qt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) @@ -156,9 +156,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Qt5 documentation entry"), + self.tr("Select Qt5 documentation entry"), QUrl(self.qt5DocDirEdit.text()).path(), - self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) + self.tr("HTML Files (*.html *.htm);;All Files (*)")) if entry: self.qt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) @@ -170,9 +170,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select PyQt4 documentation entry"), + self.tr("Select PyQt4 documentation entry"), QUrl(self.pyqt4DocDirEdit.text()).path(), - self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) + self.tr("HTML Files (*.html *.htm);;All Files (*)")) if entry: self.pyqt4DocDirEdit.setText(Utilities.toNativeSeparators(entry)) @@ -184,9 +184,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select PyQt5 documentation entry"), + self.tr("Select PyQt5 documentation entry"), QUrl(self.pyqt4DocDirEdit.text()).path(), - self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) + self.tr("HTML Files (*.html *.htm);;All Files (*)")) if entry: self.pyqt5DocDirEdit.setText(Utilities.toNativeSeparators(entry)) @@ -198,9 +198,9 @@ """ entry = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select PySide documentation entry"), + self.tr("Select PySide documentation entry"), QUrl(self.pysideDocDirEdit.text()).path(), - self.trUtf8("HTML Files (*.html *.htm);;All Files (*)")) + self.tr("HTML Files (*.html *.htm);;All Files (*)")) if entry: self.pysideDocDirEdit.setText(Utilities.toNativeSeparators(entry))
--- a/Preferences/ConfigurationPages/HelpInterfacePage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/HelpInterfacePage.py Sat Jan 11 11:55:33 2014 +0100 @@ -17,6 +17,7 @@ import Utilities import UI.PixmapCache + class HelpInterfacePage(ConfigurationPageBase, Ui_HelpInterfacePage): """ Class implementing the Interface configuration page (variant for web @@ -56,7 +57,7 @@ """ curStyle = Preferences.getUI("Style") styles = sorted(list(QStyleFactory.keys())) - self.styleComboBox.addItem(self.trUtf8('System'), "System") + self.styleComboBox.addItem(self.tr('System'), "System") for style in styles: self.styleComboBox.addItem(style, style) currentIndex = self.styleComboBox.findData(curStyle) @@ -71,9 +72,9 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select style sheet file"), + self.tr("Select style sheet file"), self.styleSheetEdit.text(), - self.trUtf8( + self.tr( "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" "All files (*)"))
--- a/Preferences/ConfigurationPages/HelpViewersPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/HelpViewersPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -20,6 +20,7 @@ import Utilities import UI.PixmapCache + class HelpViewersPage(ConfigurationPageBase, Ui_HelpViewersPage): """ Class implementing the Help Viewers configuration page. @@ -80,7 +81,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Custom Viewer"), + self.tr("Select Custom Viewer"), self.customViewerEdit.text(), "") @@ -94,7 +95,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Web-Browser"), + self.tr("Select Web-Browser"), self.webbrowserEdit.text(), "") @@ -108,7 +109,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select PDF-Viewer"), + self.tr("Select PDF-Viewer"), self.pdfviewerEdit.text(), "") @@ -122,7 +123,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select CHM-Viewer"), + self.tr("Select CHM-Viewer"), self.chmviewerEdit.text(), "")
--- a/Preferences/ConfigurationPages/HelpVirusTotalPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/HelpVirusTotalPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -74,7 +74,7 @@ """ self.testResultLabel.setHidden(False) self.testResultLabel.setText( - self.trUtf8("Checking validity of the service key...")) + self.tr("Checking validity of the service key...")) if self.vtSecureCheckBox.isChecked(): protocol = "https" else: @@ -92,14 +92,14 @@ """ if result: self.testResultLabel.setText( - self.trUtf8("The service key is valid.")) + self.tr("The service key is valid.")) else: if msg == "": - self.testResultLabel.setText(self.trUtf8( + self.testResultLabel.setText(self.tr( '<font color="#FF0000">The service key is' ' not valid.</font>')) else: - self.testResultLabel.setText(self.trUtf8( + self.testResultLabel.setText(self.tr( '<font color="#FF0000"><b>Error:</b> {0}</font>') .format(msg))
--- a/Preferences/ConfigurationPages/IconsPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/IconsPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -129,7 +129,7 @@ """ dir = E5FileDialog.getExistingDirectory( None, - self.trUtf8("Select icon directory"), + self.tr("Select icon directory"), "", E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Preferences/ConfigurationPages/InterfacePage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/InterfacePage.py Sat Jan 11 11:55:33 2014 +0100 @@ -208,7 +208,7 @@ """ curStyle = Preferences.getUI("Style") styles = sorted(list(QStyleFactory.keys())) - self.styleComboBox.addItem(self.trUtf8('System'), "System") + self.styleComboBox.addItem(self.tr('System'), "System") for style in styles: self.styleComboBox.addItem(style, style) currentIndex = self.styleComboBox.findData(curStyle) @@ -251,7 +251,7 @@ self.languageComboBox.clear() self.languageComboBox.addItem("English (default)", "None") - self.languageComboBox.addItem(self.trUtf8('System'), "System") + self.languageComboBox.addItem(self.tr('System'), "System") for locale in localeList: self.languageComboBox.addItem(locales[locale], locale) self.languageComboBox.setCurrentIndex(currentIndex) @@ -263,9 +263,9 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select style sheet file"), + self.tr("Select style sheet file"), self.styleSheetEdit.text(), - self.trUtf8( + self.tr( "Qt Style Sheets (*.qss);;Cascading Style Sheets (*.css);;" "All files (*)"))
--- a/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/MasterPasswordEntryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,7 +32,7 @@ self.currentPasswordEdit.setEnabled(False) if hasattr(self.currentPasswordEdit, "setPlaceholderText"): self.currentPasswordEdit.setPlaceholderText( - self.trUtf8("(not defined yet)")) + self.tr("(not defined yet)")) self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) @@ -47,22 +47,22 @@ enable = verifyPassword( self.currentPasswordEdit.text(), self.__oldPasswordHash) if not enable: - error = error or self.trUtf8("Wrong password entered.") + error = error or self.tr("Wrong password entered.") if self.newPasswordEdit.text() == "": enable = False - error = error or self.trUtf8("New password must not be empty.") + error = error or self.tr("New password must not be empty.") if self.newPasswordEdit.text() != "" and \ self.newPasswordEdit.text() != self.newPasswordAgainEdit.text(): enable = False - error = error or self.trUtf8("Repeated password is wrong.") + error = error or self.tr("Repeated password is wrong.") if self.currentPasswordEdit.isEnabled(): if self.newPasswordEdit.text() == self.currentPasswordEdit.text(): enable = False error = error or \ - self.trUtf8("Old and new password must not be the same.") + self.tr("Old and new password must not be the same.") self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enable) self.errorLabel.setText(error)
--- a/Preferences/ConfigurationPages/MultiProjectPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/MultiProjectPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -72,7 +72,7 @@ default = Utilities.getHomeDir() directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Workspace Directory"), + self.tr("Select Workspace Directory"), default, E5FileDialog.Options(0))
--- a/Preferences/ConfigurationPages/NetworkPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/NetworkPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -40,25 +40,25 @@ self.downloadDirCompleter = E5DirCompleter(self.downloadDirEdit) self.ftpProxyTypeCombo.addItem( - self.trUtf8("No FTP Proxy"), E5FtpProxyType.NoProxy) + self.tr("No FTP Proxy"), E5FtpProxyType.NoProxy) self.ftpProxyTypeCombo.addItem( - self.trUtf8("No Proxy Authentication required"), + self.tr("No Proxy Authentication required"), E5FtpProxyType.NonAuthorizing) self.ftpProxyTypeCombo.addItem( - self.trUtf8("User@Server"), E5FtpProxyType.UserAtServer) + self.tr("User@Server"), E5FtpProxyType.UserAtServer) self.ftpProxyTypeCombo.addItem( - self.trUtf8("SITE"), E5FtpProxyType.Site) + self.tr("SITE"), E5FtpProxyType.Site) self.ftpProxyTypeCombo.addItem( - self.trUtf8("OPEN"), E5FtpProxyType.Open) + self.tr("OPEN"), E5FtpProxyType.Open) self.ftpProxyTypeCombo.addItem( - self.trUtf8("User@Proxyuser@Server"), + self.tr("User@Proxyuser@Server"), E5FtpProxyType.UserAtProxyuserAtServer) self.ftpProxyTypeCombo.addItem( - self.trUtf8("Proxyuser@Server"), E5FtpProxyType.ProxyuserAtServer) + self.tr("Proxyuser@Server"), E5FtpProxyType.ProxyuserAtServer) self.ftpProxyTypeCombo.addItem( - self.trUtf8("AUTH and RESP"), E5FtpProxyType.AuthResp) + self.tr("AUTH and RESP"), E5FtpProxyType.AuthResp) self.ftpProxyTypeCombo.addItem( - self.trUtf8("Bluecoat Proxy"), E5FtpProxyType.Bluecoat) + self.tr("Bluecoat Proxy"), E5FtpProxyType.Bluecoat) # set initial values self.downloadDirEdit.setText(Preferences.getUI("DownloadPath")) @@ -182,7 +182,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select download directory"), + self.tr("Select download directory"), self.downloadDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Preferences/ConfigurationPages/NotificationsPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/NotificationsPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -76,10 +76,10 @@ parent=self, setPosition=True) self.__notification.setPixmap( UI.PixmapCache.getPixmap("notification48.png")) - self.__notification.setHeading(self.trUtf8("Visual Selection")) + self.__notification.setHeading(self.tr("Visual Selection")) self.__notification.setText( - self.trUtf8("Drag the notification window to" - " the desired place and release the button.")) + self.tr("Drag the notification window to" + " the desired place and release the button.")) self.__notification.move( QPoint(self.xSpinBox.value(), self.ySpinBox.value())) self.__notification.show()
--- a/Preferences/ConfigurationPages/PluginManagerPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/PluginManagerPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -96,7 +96,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select plugins download directory"), + self.tr("Select plugins download directory"), self.downloadDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Preferences/ConfigurationPages/QtPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/QtPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,7 +57,7 @@ """ dir = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select Qt4 Translations Directory"), + self.tr("Select Qt4 Translations Directory"), self.qt4TransEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/Preferences/ConfigurationPages/ViewmanagerPage.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ConfigurationPages/ViewmanagerPage.py Sat Jan 11 11:55:33 2014 +0100 @@ -39,14 +39,14 @@ keys = sorted(self.viewmanagers.keys()) for key in keys: self.windowComboBox.addItem( - self.trUtf8(self.viewmanagers[key]), key) + self.tr(self.viewmanagers[key]), key) currentIndex = self.windowComboBox.findText( - self.trUtf8(self.viewmanagers[currentVm])) + self.tr(self.viewmanagers[currentVm])) self.windowComboBox.setCurrentIndex(currentIndex) self.on_windowComboBox_activated(currentIndex) self.tabViewGroupBox.setTitle( - self.trUtf8(self.viewmanagers["tabview"])) + self.tr(self.viewmanagers["tabview"])) self.filenameLengthSpinBox.setValue( Preferences.getUI("TabViewManagerFilenameLength"))
--- a/Preferences/ProgramsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ProgramsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,9 +42,9 @@ self.programsList.columnCount(), "") self.searchButton = self.buttonBox.addButton( - self.trUtf8("Search"), QDialogButtonBox.ActionRole) + self.tr("Search"), QDialogButtonBox.ActionRole) self.searchButton.setToolTip( - self.trUtf8("Press to search for programs")) + self.tr("Press to search for programs")) def show(self): """ @@ -83,7 +83,7 @@ Utilities.generateQtToolName("lrelease") exe = os.path.join(Utilities.getQtBinariesPath(), exe) version = self.__createProgramEntry( - self.trUtf8("Translation Converter (Qt)"), exe, '-version', + self.tr("Translation Converter (Qt)"), exe, '-version', 'lrelease', -1) # 1b. Qt Designer if Utilities.isWindowsPlatform(): @@ -97,7 +97,7 @@ Utilities.getQtBinariesPath(), Utilities.generateQtToolName("designer")) self.__createProgramEntry( - self.trUtf8("Qt Designer"), exe, version=version) + self.tr("Qt Designer"), exe, version=version) # 1c. Qt Linguist if Utilities.isWindowsPlatform(): exe = os.path.join( @@ -110,7 +110,7 @@ Utilities.getQtBinariesPath(), Utilities.generateQtToolName("linguist")) self.__createProgramEntry( - self.trUtf8("Qt Linguist"), exe, version=version) + self.tr("Qt Linguist"), exe, version=version) # 1d. Qt Assistant if Utilities.isWindowsPlatform(): exe = os.path.join( @@ -123,66 +123,66 @@ Utilities.getQtBinariesPath(), Utilities.generateQtToolName("assistant")) self.__createProgramEntry( - self.trUtf8("Qt Assistant"), exe, version=version) + self.tr("Qt Assistant"), exe, version=version) # 2. do the PyQt programs # 2a. Translation Extractor PyQt4 self.__createProgramEntry( - self.trUtf8("Translation Extractor (Python, PyQt4)"), + self.tr("Translation Extractor (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pylupdate4.exe" or "pylupdate4", '-version', 'pylupdate', -1) # 2b. Forms Compiler PyQt4 self.__createProgramEntry( - self.trUtf8("Forms Compiler (Python, PyQt4)"), + self.tr("Forms Compiler (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pyuic4.bat" or "pyuic4", '--version', 'Python User', 4) # 2c. Resource Compiler PyQt4 self.__createProgramEntry( - self.trUtf8("Resource Compiler (Python, PyQt4)"), + self.tr("Resource Compiler (Python, PyQt4)"), Utilities.isWindowsPlatform() and "pyrcc4.exe" or "pyrcc4", '-version', 'Resource Compiler', -1) # 2d. Translation Extractor PyQt5 self.__createProgramEntry( - self.trUtf8("Translation Extractor (Python, PyQt5)"), + self.tr("Translation Extractor (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pylupdate5.exe" or "pylupdate5", '-version', 'pylupdate', -1) # 2e. Forms Compiler PyQt4 self.__createProgramEntry( - self.trUtf8("Forms Compiler (Python, PyQt5)"), + self.tr("Forms Compiler (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pyuic5.bat" or "pyuic5", '--version', 'Python User', 4) # 2f. Resource Compiler PyQt4 self.__createProgramEntry( - self.trUtf8("Resource Compiler (Python, PyQt5)"), + self.tr("Resource Compiler (Python, PyQt5)"), Utilities.isWindowsPlatform() and "pyrcc5.exe" or "pyrcc5", '-version', 'Resource Compiler', -1) # 3. do the PySide programs # 3a. Translation Extractor PySide self.__createProgramEntry( - self.trUtf8("Translation Extractor (Python, PySide)"), + self.tr("Translation Extractor (Python, PySide)"), Utilities.generatePySideToolPath("pyside-lupdate"), '-version', '', -1, versionRe='lupdate') # 3b. Forms Compiler PySide self.__createProgramEntry( - self.trUtf8("Forms Compiler (Python, PySide)"), + self.tr("Forms Compiler (Python, PySide)"), Utilities.generatePySideToolPath("pyside-uic"), '--version', 'PySide User', 5, versionCleanup=(0, -1)) # 3.c Resource Compiler PySide self.__createProgramEntry( - self.trUtf8("Resource Compiler (Python, PySide)"), + self.tr("Resource Compiler (Python, PySide)"), Utilities.generatePySideToolPath("pyside-rcc"), '-version', 'Resource Compiler', -1) # 4. do the Ruby programs # 4a. Forms Compiler for Qt4 self.__createProgramEntry( - self.trUtf8("Forms Compiler (Ruby, Qt4)"), + self.tr("Forms Compiler (Ruby, Qt4)"), Utilities.isWindowsPlatform() and "rbuic4.exe" or "rbuic4", '-version', 'Qt', -1) # 4b. Resource Compiler for Qt4 self.__createProgramEntry( - self.trUtf8("Resource Compiler (Ruby, Qt4)"), + self.tr("Resource Compiler (Ruby, Qt4)"), Utilities.isWindowsPlatform() and "rbrcc.exe" or "rbrcc", '-version', 'Ruby Resource Compiler', -1) @@ -192,7 +192,7 @@ if Utilities.isWindowsPlatform(): exe += ".exe" self.__createProgramEntry( - self.trUtf8("CORBA IDL Compiler"), exe, '-V', 'omniidl', -1) + self.tr("CORBA IDL Compiler"), exe, '-V', 'omniidl', -1) # 6. do the spell checking entry try: @@ -204,12 +204,12 @@ try: version = enchant.__version__ except AttributeError: - version = self.trUtf8("(unknown)") + version = self.tr("(unknown)") except (ImportError, AttributeError, OSError): text = "enchant" version = "" self.__createEntry( - self.trUtf8("Spell Checker - PyEnchant"), text, version) + self.tr("Spell Checker - PyEnchant"), text, version) # 7. do the pygments entry try: @@ -221,12 +221,12 @@ try: version = pygments.__version__ except AttributeError: - version = self.trUtf8("(unknown)") + version = self.tr("(unknown)") except (ImportError, AttributeError, OSError): text = "pygments" version = "" self.__createEntry( - self.trUtf8("Source Highlighter - Pygments"), text, version) + self.tr("Source Highlighter - Pygments"), text, version) # do the plugin related programs pm = e5App().getObject("PluginManager") @@ -285,7 +285,7 @@ font.setBold(True) itm.setFont(0, font) if not exe: - itm.setText(1, self.trUtf8("(not configured)")) + itm.setText(1, self.tr("(not configured)")) else: if os.path.isabs(exe): if not Utilities.isExecutable(exe): @@ -319,13 +319,13 @@ ] break except IndexError: - version = self.trUtf8("(unknown)") + version = self.tr("(unknown)") else: - version = self.trUtf8("(not executable)") + version = self.tr("(not executable)") QTreeWidgetItem(itm, [exe, version]) itm.setExpanded(True) else: - itm.setText(1, self.trUtf8("(not found)")) + itm.setText(1, self.tr("(not found)")) QApplication.processEvents() self.programsList.header().resizeSections(QHeaderView.ResizeToContents) self.programsList.header().setStretchLastSection(True) @@ -348,7 +348,7 @@ QTreeWidgetItem(itm, [entryText, entryVersion]) itm.setExpanded(True) else: - itm.setText(1, self.trUtf8("(not found)")) + itm.setText(1, self.tr("(not found)")) QApplication.processEvents() self.programsList.header().resizeSections(QHeaderView.ResizeToContents) self.programsList.header().setStretchLastSection(True)
--- a/Preferences/ShortcutsDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ShortcutsDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -121,56 +121,56 @@ pm.initOnDemandPlugins() # populate the various lists - self.projectItem = self.__generateCategoryItem(self.trUtf8("Project")) + self.projectItem = self.__generateCategoryItem(self.tr("Project")) for act in e5App().getObject("Project").getActions(): self.__generateShortcutItem(self.projectItem, act) - self.uiItem = self.__generateCategoryItem(self.trUtf8("General")) + self.uiItem = self.__generateCategoryItem(self.tr("General")) for act in e5App().getObject("UserInterface").getActions('ui'): self.__generateShortcutItem(self.uiItem, act) - self.wizardsItem = self.__generateCategoryItem(self.trUtf8("Wizards")) + self.wizardsItem = self.__generateCategoryItem(self.tr("Wizards")) for act in e5App().getObject("UserInterface").getActions('wizards'): self.__generateShortcutItem(self.wizardsItem, act) - self.debugItem = self.__generateCategoryItem(self.trUtf8("Debug")) + self.debugItem = self.__generateCategoryItem(self.tr("Debug")) for act in e5App().getObject("DebugUI").getActions(): self.__generateShortcutItem(self.debugItem, act) - self.editItem = self.__generateCategoryItem(self.trUtf8("Edit")) + self.editItem = self.__generateCategoryItem(self.tr("Edit")) for act in e5App().getObject("ViewManager").getActions('edit'): self.__generateShortcutItem(self.editItem, act) - self.fileItem = self.__generateCategoryItem(self.trUtf8("File")) + self.fileItem = self.__generateCategoryItem(self.tr("File")) for act in e5App().getObject("ViewManager").getActions('file'): self.__generateShortcutItem(self.fileItem, act) - self.searchItem = self.__generateCategoryItem(self.trUtf8("Search")) + self.searchItem = self.__generateCategoryItem(self.tr("Search")) for act in e5App().getObject("ViewManager").getActions('search'): self.__generateShortcutItem(self.searchItem, act) - self.viewItem = self.__generateCategoryItem(self.trUtf8("View")) + self.viewItem = self.__generateCategoryItem(self.tr("View")) for act in e5App().getObject("ViewManager").getActions('view'): self.__generateShortcutItem(self.viewItem, act) - self.macroItem = self.__generateCategoryItem(self.trUtf8("Macro")) + self.macroItem = self.__generateCategoryItem(self.tr("Macro")) for act in e5App().getObject("ViewManager").getActions('macro'): self.__generateShortcutItem(self.macroItem, act) self.bookmarkItem = self.__generateCategoryItem( - self.trUtf8("Bookmarks")) + self.tr("Bookmarks")) for act in e5App().getObject("ViewManager").getActions('bookmark'): self.__generateShortcutItem(self.bookmarkItem, act) self.spellingItem = self.__generateCategoryItem( - self.trUtf8("Spelling")) + self.tr("Spelling")) for act in e5App().getObject("ViewManager").getActions('spelling'): self.__generateShortcutItem(self.spellingItem, act) actions = e5App().getObject("ViewManager").getActions('window') if actions: self.windowItem = self.__generateCategoryItem( - self.trUtf8("Window")) + self.tr("Window")) for act in actions: self.__generateShortcutItem(self.windowItem, act) @@ -185,7 +185,7 @@ self.pluginCategoryItems.append(categoryItem) self.helpViewerItem = self.__generateCategoryItem( - self.trUtf8("eric5 Web Browser")) + self.tr("eric5 Web Browser")) for act in e5App().getObject("DummyHelpViewer").getActions(): self.__generateShortcutItem(self.helpViewerItem, act, True) @@ -310,8 +310,8 @@ if keystr == itmseq: res = E5MessageBox.yesNo( self, - self.trUtf8("Edit shortcuts"), - self.trUtf8( + self.tr("Edit shortcuts"), + self.tr( """<p><b>{0}</b> has already been""" """ allocated to the <b>{1}</b> action. """ """Remove this binding?</p>""") @@ -330,8 +330,8 @@ if itmseq.startswith("{0}+".format(keystr)): res = E5MessageBox.yesNo( self, - self.trUtf8("Edit shortcuts"), - self.trUtf8( + self.tr("Edit shortcuts"), + self.tr( """<p><b>{0}</b> hides the <b>{1}</b>""" """ action. Remove this binding?</p>""") .format(keystr, itm.text(0)), @@ -347,8 +347,8 @@ if keystr.startswith("{0}+".format(itmseq)): res = E5MessageBox.yesNo( self, - self.trUtf8("Edit shortcuts"), - self.trUtf8( + self.tr("Edit shortcuts"), + self.tr( """<p><b>{0}</b> is hidden by the """ """<b>{1}</b> action. """ """Remove this binding?</p>""")
--- a/Preferences/ToolConfigurationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ToolConfigurationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -20,6 +20,7 @@ import Utilities import UI.PixmapCache + class ToolConfigurationDialog(QDialog, Ui_ToolConfigurationDialog): """ Class implementing a configuration dialog for the tools menu. @@ -41,11 +42,11 @@ self.executableCompleter = E5FileCompleter(self.executableEdit) self.redirectionModes = [ - ("no", self.trUtf8("no redirection")), - ("show", self.trUtf8("show output")), - ("insert", self.trUtf8("insert into current editor")), + ("no", self.tr("no redirection")), + ("show", self.tr("show output")), + ("insert", self.tr("insert into current editor")), ("replaceSelection", - self.trUtf8("replace selection of current editor")), + self.tr("replace selection of current editor")), ] self.toollist = copy.deepcopy(toollist) @@ -103,8 +104,8 @@ if not executable: E5MessageBox.critical( self, - self.trUtf8("Add tool entry"), - self.trUtf8( + self.tr("Add tool entry"), + self.tr( "You have to set an executable to add to the" " Tools-Menu first.")) return @@ -112,8 +113,8 @@ if not menutext: E5MessageBox.critical( self, - self.trUtf8("Add tool entry"), - self.trUtf8( + self.tr("Add tool entry"), + self.tr( "You have to insert a menuentry text to add the" " selected program to the Tools-Menu first.")) return @@ -121,8 +122,8 @@ if not Utilities.isinpath(executable): E5MessageBox.critical( self, - self.trUtf8("Add tool entry"), - self.trUtf8( + self.tr("Add tool entry"), + self.tr( "The selected file could not be found or" " is not an executable." " Please choose an executable filename.")) @@ -132,8 +133,8 @@ menutext, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical( self, - self.trUtf8("Add tool entry"), - self.trUtf8("An entry for the menu text {0} already exists.") + self.tr("Add tool entry"), + self.tr("An entry for the menu text {0} already exists.") .format(menutext)) return @@ -165,8 +166,8 @@ if not executable: E5MessageBox.critical( self, - self.trUtf8("Change tool entry"), - self.trUtf8( + self.tr("Change tool entry"), + self.tr( "You have to set an executable to change the" " Tools-Menu entry.")) return @@ -174,8 +175,8 @@ if not menutext: E5MessageBox.critical( self, - self.trUtf8("Change tool entry"), - self.trUtf8( + self.tr("Change tool entry"), + self.tr( "You have to insert a menuentry text to change the" " selected Tools-Menu entry.")) return @@ -183,8 +184,8 @@ if not Utilities.isinpath(executable): E5MessageBox.critical( self, - self.trUtf8("Change tool entry"), - self.trUtf8( + self.tr("Change tool entry"), + self.tr( "The selected file could not be found or" " is not an executable." " Please choose an existing executable filename.")) @@ -270,7 +271,7 @@ """ execfile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select executable"), + self.tr("Select executable"), self.executableEdit.text(), "") if execfile: @@ -278,8 +279,8 @@ if not Utilities.isinpath(execfile): E5MessageBox.critical( self, - self.trUtf8("Select executable"), - self.trUtf8( + self.tr("Select executable"), + self.tr( "The selected file is not an executable." " Please choose an executable filename.")) return @@ -293,9 +294,9 @@ """ icon = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select icon file"), + self.tr("Select icon file"), self.iconEdit.text(), - self.trUtf8("Icon files (*.png)")) + self.tr("Icon files (*.png)")) if icon: self.iconEdit.setText(icon)
--- a/Preferences/ToolGroupConfigurationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Preferences/ToolGroupConfigurationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -58,16 +58,16 @@ if not groupName: E5MessageBox.critical( self, - self.trUtf8("Add tool group entry"), - self.trUtf8("You have to give a name for the group to add.")) + self.tr("Add tool group entry"), + self.tr("You have to give a name for the group to add.")) return if len(self.groupsList.findItems( groupName, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical( self, - self.trUtf8("Add tool group entry"), - self.trUtf8("An entry for the group name {0} already exists.") + self.tr("Add tool group entry"), + self.tr("An entry for the group name {0} already exists.") .format(groupName)) return @@ -88,16 +88,16 @@ if not groupName: E5MessageBox.critical( self, - self.trUtf8("Add tool group entry"), - self.trUtf8("You have to give a name for the group to add.")) + self.tr("Add tool group entry"), + self.tr("You have to give a name for the group to add.")) return if len(self.groupsList.findItems( groupName, Qt.MatchFlags(Qt.MatchExactly))): E5MessageBox.critical( self, - self.trUtf8("Add tool group entry"), - self.trUtf8("An entry for the group name {0} already exists.") + self.tr("Add tool group entry"), + self.tr("An entry for the group name {0} already exists.") .format(groupName)) return @@ -115,9 +115,9 @@ res = E5MessageBox.yesNo( self, - self.trUtf8("Delete tool group entry"), - self.trUtf8("""<p>Do you really want to delete the tool group""" - """ <b>"{0}"</b>?</p>""") + self.tr("Delete tool group entry"), + self.tr("""<p>Do you really want to delete the tool group""" + """ <b>"{0}"</b>?</p>""") .format(self.groupsList.currentItem().text()), icon=E5MessageBox.Warning) if not res:
--- a/Project/AddDirectoryDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/AddDirectoryDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,31 +52,31 @@ # enable all dialog elements if filter == 'source': # it is a source file self.filterComboBox.addItem( - self.trUtf8("Source Files"), "SOURCES") + self.tr("Source Files"), "SOURCES") elif filter == 'form': self.filterComboBox.addItem( - self.trUtf8("Forms Files"), "FORMS") + self.tr("Forms Files"), "FORMS") elif filter == 'resource': self.filterComboBox.addItem( - self.trUtf8("Resource Files"), "RESOURCES") + self.tr("Resource Files"), "RESOURCES") elif filter == 'interface': self.filterComboBox.addItem( - self.trUtf8("Interface Files"), "INTERFACES") + self.tr("Interface Files"), "INTERFACES") elif filter == 'others': self.filterComboBox.addItem( - self.trUtf8("Other Files (*)"), "OTHERS") + self.tr("Other Files (*)"), "OTHERS") self.on_filterComboBox_highlighted('(*)') else: self.filterComboBox.addItem( - self.trUtf8("Source Files"), "SOURCES") + self.tr("Source Files"), "SOURCES") self.filterComboBox.addItem( - self.trUtf8("Forms Files"), "FORMS") + self.tr("Forms Files"), "FORMS") self.filterComboBox.addItem( - self.trUtf8("Resource Files"), "RESOURCES") + self.tr("Resource Files"), "RESOURCES") self.filterComboBox.addItem( - self.trUtf8("Interface Files"), "INTERFACES") + self.tr("Interface Files"), "INTERFACES") self.filterComboBox.addItem( - self.trUtf8("Other Files (*)"), "OTHERS") + self.tr("Other Files (*)"), "OTHERS") self.filterComboBox.setCurrentIndex(0) @pyqtSlot(str) @@ -110,7 +110,7 @@ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select directory"), + self.tr("Select directory"), startdir) if directory:
--- a/Project/AddFileDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/AddFileDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -67,7 +67,7 @@ startdir = self.startdir directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select target directory"), + self.tr("Select target directory"), startdir) if directory: @@ -95,7 +95,7 @@ for pattern, filetype in list(self.filetypes.items()): if filetype in patterns: patterns[filetype].append(pattern) - dfilter = self.trUtf8( + dfilter = self.tr( "Source Files ({0});;" "Forms Files ({1});;" "Resource Files ({2});;" @@ -108,50 +108,50 @@ " ".join(patterns["RESOURCES"]), " ".join(patterns["INTERFACES"]), " ".join(patterns["TRANSLATIONS"])) - caption = self.trUtf8("Select Files") + caption = self.tr("Select Files") elif self.filter == 'form': patterns = [] for pattern, filetype in list(self.filetypes.items()): if filetype == "FORMS": patterns.append(pattern) - dfilter = self.trUtf8("Forms Files ({0})")\ + dfilter = self.tr("Forms Files ({0})")\ .format(" ".join(patterns)) - caption = self.trUtf8("Select user-interface files") + caption = self.tr("Select user-interface files") elif self.filter == "resource": patterns = [] for pattern, filetype in list(self.filetypes.items()): if filetype == "RESOURCES": patterns.append(pattern) - dfilter = self.trUtf8("Resource Files ({0})")\ + dfilter = self.tr("Resource Files ({0})")\ .format(" ".join(patterns)) - caption = self.trUtf8("Select resource files") + caption = self.tr("Select resource files") elif self.filter == 'source': patterns = [] for pattern, filetype in list(self.filetypes.items()): if filetype == "SOURCES": patterns.append(pattern) - dfilter = self.trUtf8("Source Files ({0});;All Files (*)")\ + dfilter = self.tr("Source Files ({0});;All Files (*)")\ .format(" ".join(patterns)) - caption = self.trUtf8("Select source files") + caption = self.tr("Select source files") elif self.filter == 'interface': patterns = [] for pattern, filetype in list(self.filetypes.items()): if filetype == "INTERFACES": patterns.append(pattern) - dfilter = self.trUtf8("Interface Files ({0})")\ + dfilter = self.tr("Interface Files ({0})")\ .format(" ".join(patterns)) - caption = self.trUtf8("Select interface files") + caption = self.tr("Select interface files") elif self.filter == 'translation': patterns = [] for pattern, filetype in list(self.filetypes.items()): if filetype == "TRANSLATIONS": patterns.append(pattern) - dfilter = self.trUtf8("Translation Files ({0})")\ + dfilter = self.tr("Translation Files ({0})")\ .format(" ".join(patterns)) - caption = self.trUtf8("Select translation files") + caption = self.tr("Select translation files") elif self.filter == 'others': - dfilter = self.trUtf8("All Files (*)") - caption = self.trUtf8("Select files") + dfilter = self.tr("All Files (*)") + caption = self.tr("Select files") else: return
--- a/Project/AddFoundFilesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/AddFoundFilesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,12 +36,12 @@ self.setupUi(self) self.addAllButton = self.buttonBox.addButton( - self.trUtf8("Add All"), QDialogButtonBox.AcceptRole) - self.addAllButton.setToolTip(self.trUtf8("Add all files.")) + self.tr("Add All"), QDialogButtonBox.AcceptRole) + self.addAllButton.setToolTip(self.tr("Add all files.")) self.addSelectedButton = self.buttonBox.addButton( - self.trUtf8("Add Selected"), QDialogButtonBox.AcceptRole) + self.tr("Add Selected"), QDialogButtonBox.AcceptRole) self.addSelectedButton.setToolTip( - self.trUtf8("Add selected files only.")) + self.tr("Add selected files only.")) self.fileList.addItems(files)
--- a/Project/CreateDialogCodeDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/CreateDialogCodeDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -115,8 +115,8 @@ self.__initError = True E5MessageBox.critical( self, - self.trUtf8("Create Dialog Code"), - self.trUtf8( + self.tr("Create Dialog Code"), + self.tr( """The file <b>{0}</b> exists but does not contain""" """ any classes.""").format(self.srcFile)) @@ -144,8 +144,8 @@ except (AttributeError, ImportError) as err: E5MessageBox.critical( self, - self.trUtf8("uic error"), - self.trUtf8( + self.tr("uic error"), + self.tr( """<p>There was an error loading the form <b>{0}</b>""" """.</p><p>{1}</p>""").format(self.formFile, str(err))) return "" @@ -162,8 +162,8 @@ except (AttributeError, ImportError) as err: E5MessageBox.critical( self, - self.trUtf8("uic error"), - self.trUtf8( + self.tr("uic error"), + self.tr( """<p>There was an error loading the form <b>{0}</b>""" """.</p><p>{1}</p>""").format(self.formFile, str(err))) return "" @@ -326,8 +326,8 @@ except (AttributeError, ImportError) as err: E5MessageBox.critical( self, - self.trUtf8("uic error"), - self.trUtf8( + self.tr("uic error"), + self.tr( """<p>There was an error loading the form <b>{0}</b>""" """.</p><p>{1}</p>""").format(self.formFile, str(err))) @@ -395,8 +395,8 @@ except IOError as why: E5MessageBox.critical( self, - self.trUtf8("Code Generation"), - self.trUtf8( + self.tr("Code Generation"), + self.tr( """<p>Could not open the code template file""" """ "{0}".</p><p>Reason: {1}</p>""") .format(tmplName, str(why))) @@ -431,8 +431,8 @@ except IOError as why: E5MessageBox.critical( self, - self.trUtf8("Code Generation"), - self.trUtf8( + self.tr("Code Generation"), + self.tr( """<p>Could not open the source file "{0}".</p>""" """<p>Reason: {1}</p>""") .format(self.srcFile, str(why))) @@ -510,9 +510,9 @@ except IOError as why: E5MessageBox.critical( self, - self.trUtf8("Code Generation"), - self.trUtf8("""<p>Could not write the source file "{0}".</p>""" - """<p>Reason: {1}</p>""") + self.tr("Code Generation"), + self.tr("""<p>Could not write the source file "{0}".</p>""" + """<p>Reason: {1}</p>""") .format(self.filenameEdit.text(), str(why))) return
--- a/Project/DebuggerPropertiesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/DebuggerPropertiesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -112,7 +112,7 @@ """ file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select interpreter for Debug Client"), + self.tr("Select interpreter for Debug Client"), self.interpreterEdit.text(), "") @@ -126,10 +126,10 @@ """ filters = self.project.dbgFilters[ self.project.pdata["PROGLANGUAGE"][0]] - filters += self.trUtf8("All Files (*)") + filters += self.tr("All Files (*)") file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Debug Client"), + self.tr("Select Debug Client"), self.debugClientEdit.text(), filters)
--- a/Project/FiletypeAssociationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/FiletypeAssociationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -35,12 +35,12 @@ # keep these lists in sync self.filetypes = ["SOURCES", "FORMS", "TRANSLATIONS", "RESOURCES", "INTERFACES", "OTHERS", "__IGNORE__"] - self.filetypeStrings = [self.trUtf8("Sources"), self.trUtf8("Forms"), - self.trUtf8("Translations"), - self.trUtf8("Resources"), - self.trUtf8("Interfaces"), - self.trUtf8("Others"), - self.trUtf8("Ignore")] + self.filetypeStrings = [self.tr("Sources"), self.tr("Forms"), + self.tr("Translations"), + self.tr("Resources"), + self.tr("Interfaces"), + self.tr("Others"), + self.tr("Ignore")] self.filetypeCombo.addItems(self.filetypeStrings) self.project = project
--- a/Project/LexerAssociationDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/LexerAssociationDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -43,7 +43,7 @@ except AttributeError: self.extsep = "." - self.extras = ["-----------", self.trUtf8("Alternative")] + self.extras = ["-----------", self.tr("Alternative")] import QScintilla.Lexers languages = [''] + \ @@ -126,7 +126,7 @@ if lexer.startswith("Pygments|"): pygmentsLexer = lexer.split("|")[1] pygmentsIndex = self.pygmentsLexerCombo.findText(pygmentsLexer) - lexer = self.trUtf8("Alternative") + lexer = self.tr("Alternative") else: pygmentsIndex = 0 index = self.editorLexerCombo.findText(lexer)
--- a/Project/NewDialogClassDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/NewDialogClassDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -55,7 +55,7 @@ """ path = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select source directory"), + self.tr("Select source directory"), QDir.fromNativeSeparators(self.pathnameEdit.text())) if path: self.pathnameEdit.setText(QDir.toNativeSeparators(path))
--- a/Project/Project.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/Project.py Sat Jan 11 11:55:33 2014 +0100 @@ -182,13 +182,13 @@ } self.dbgFilters = { - "Python2": self.trUtf8( + "Python2": self.tr( "Python2 Files (*.py2);;" "Python2 GUI Files (*.pyw2);;"), - "Python3": self.trUtf8( + "Python3": self.tr( "Python3 Files (*.py *.py3);;" "Python3 GUI Files (*.pyw *.pyw3);;"), - "Ruby": self.trUtf8("Ruby Files (*.rb);;"), + "Ruby": self.tr("Ruby Files (*.rb);;"), } self.vcsMenu = None @@ -231,13 +231,13 @@ self.__lexerAssociationCallbacks = {} self.__binaryTranslationsCallbacks = {} - self.__projectTypes["Qt4"] = self.trUtf8("Qt GUI") - self.__projectTypes["Qt4C"] = self.trUtf8("Qt Console") - self.__projectTypes["PyQt5"] = self.trUtf8("PyQt5 GUI") - self.__projectTypes["PyQt5C"] = self.trUtf8("PyQt5 Console") - self.__projectTypes["E4Plugin"] = self.trUtf8("Eric Plugin") - self.__projectTypes["Console"] = self.trUtf8("Console") - self.__projectTypes["Other"] = self.trUtf8("Other") + self.__projectTypes["Qt4"] = self.tr("Qt GUI") + self.__projectTypes["Qt4C"] = self.tr("Qt Console") + self.__projectTypes["PyQt5"] = self.tr("PyQt5 GUI") + self.__projectTypes["PyQt5C"] = self.tr("PyQt5 Console") + self.__projectTypes["E4Plugin"] = self.tr("Eric Plugin") + self.__projectTypes["Console"] = self.tr("Console") + self.__projectTypes["Other"] = self.tr("Other") self.__projectProgLanguages = { "Python2": ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", @@ -249,8 +249,8 @@ pyside2, pyside3 = Utilities.checkPyside() if pyside2 or pyside3: - self.__projectTypes["PySide"] = self.trUtf8("PySide GUI") - self.__projectTypes["PySideC"] = self.trUtf8("PySide Console") + self.__projectTypes["PySide"] = self.tr("PySide GUI") + self.__projectTypes["PySideC"] = self.tr("PySide Console") if pyside2: self.__projectProgLanguages["Python2"].extend( ["PySide", "PySideC"]) @@ -312,8 +312,8 @@ if progLanguage not in self.__projectProgLanguages: E5MessageBox.critical( self.ui, - self.trUtf8("Registering Project Type"), - self.trUtf8( + self.tr("Registering Project Type"), + self.tr( """<p>The Programming Language <b>{0}</b> is not""" """ supported.</p>""") .format(progLanguage) @@ -323,8 +323,8 @@ if type_ in self.__projectProgLanguages[progLanguage]: E5MessageBox.critical( self.ui, - self.trUtf8("Registering Project Type"), - self.trUtf8( + self.tr("Registering Project Type"), + self.tr( """<p>The Project type <b>{0}</b> is already""" """ registered with Programming Language""" """ <b>{1}</b>.</p>""") @@ -335,9 +335,9 @@ if type_ in self.__projectTypes: E5MessageBox.critical( self.ui, - self.trUtf8("Registering Project Type"), - self.trUtf8("""<p>The Project type <b>{0}</b> is already""" - """ registered.</p>""").format(type_) + self.tr("Registering Project Type"), + self.tr("""<p>The Project type <b>{0}</b> is already""" + """ registered.</p>""").format(type_) ) else: self.__projectTypes[type_] = description @@ -669,8 +669,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.ui, - self.trUtf8("Read project file"), - self.trUtf8( + self.tr("Read project file"), + self.tr( "<p>The project file <b>{0}</b> could not be read.</p>") .format(fn)) return False @@ -769,8 +769,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Save project file"), - self.trUtf8( + self.tr("Save project file"), + self.tr( "<p>The project file <b>{0}</b> could not be" " written.</p>").format(fn)) res = False @@ -805,8 +805,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Read user project properties"), - self.trUtf8( + self.tr("Read user project properties"), + self.tr( "<p>The user specific project properties file" " <b>{0}</b> could not be read.</p>").format(fn)) @@ -829,8 +829,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Save user project properties"), - self.trUtf8( + self.tr("Save user project properties"), + self.tr( "<p>The user specific project properties file <b>{0}</b>" " could not be written.</p>").format(fn)) @@ -863,8 +863,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Read project session"), - self.trUtf8("Please save the project first.")) + self.tr("Read project session"), + self.tr("Please save the project first.")) return fn, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -881,8 +881,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Read project session"), - self.trUtf8( + self.tr("Read project session"), + self.tr( "<p>The project session file <b>{0}</b> could not be" " read.</p>").format(fn)) @@ -898,8 +898,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Save project session"), - self.trUtf8("Please save the project first.")) + self.tr("Save project session"), + self.tr("Please save the project first.")) return fn, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -916,8 +916,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Save project session"), - self.trUtf8( + self.tr("Save project session"), + self.tr( "<p>The project session file <b>{0}</b> could not be" " written.</p>").format(fn)) @@ -928,8 +928,8 @@ if self.pfile is None: E5MessageBox.critical( self.ui, - self.trUtf8("Delete project session"), - self.trUtf8("Please save the project first.")) + self.tr("Delete project session"), + self.tr("Please save the project first.")) return fname, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -942,8 +942,8 @@ except OSError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete project session"), - self.trUtf8( + self.tr("Delete project session"), + self.tr( "<p>The project session file <b>{0}</b> could" " not be deleted.</p>").format(fn)) @@ -954,8 +954,8 @@ if self.pfile is None: E5MessageBox.critical( self.ui, - self.trUtf8("Read tasks"), - self.trUtf8("Please save the project first.")) + self.tr("Read tasks"), + self.tr("Please save the project first.")) return fn, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -971,8 +971,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Read tasks"), - self.trUtf8( + self.tr("Read tasks"), + self.tr( "<p>The tasks file <b>{0}</b> could not be read.</p>") .format(fn)) @@ -991,8 +991,8 @@ if not ok: E5MessageBox.critical( self.ui, - self.trUtf8("Save tasks"), - self.trUtf8( + self.tr("Save tasks"), + self.tr( "<p>The tasks file <b>{0}</b> could not be written.</p>") .format(fn)) return @@ -1030,8 +1030,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Read debugger properties"), - self.trUtf8("Please save the project first.")) + self.tr("Read debugger properties"), + self.tr("Please save the project first.")) return fn, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -1047,8 +1047,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Read debugger properties"), - self.trUtf8( + self.tr("Read debugger properties"), + self.tr( "<p>The project debugger properties file <b>{0}</b>" " could not be read.</p>").format(fn)) @@ -1063,8 +1063,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Save debugger properties"), - self.trUtf8("Please save the project first.")) + self.tr("Save debugger properties"), + self.tr("Please save the project first.")) return fn, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -1080,8 +1080,8 @@ if not quiet: E5MessageBox.critical( self.ui, - self.trUtf8("Save debugger properties"), - self.trUtf8( + self.tr("Save debugger properties"), + self.tr( "<p>The project debugger properties file <b>{0}</b>" " could not be written.</p>").format(fn)) @@ -1092,8 +1092,8 @@ if self.pfile is None: E5MessageBox.critical( self.ui, - self.trUtf8("Delete debugger properties"), - self.trUtf8("Please save the project first.")) + self.tr("Delete debugger properties"), + self.tr("Please save the project first.")) return fname, ext = os.path.splitext(os.path.basename(self.pfile)) @@ -1106,8 +1106,8 @@ except OSError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete debugger properties"), - self.trUtf8( + self.tr("Delete debugger properties"), + self.tr( "<p>The project debugger properties file" " <b>{0}</b> could not be deleted.</p>") .format(fn)) @@ -1202,8 +1202,8 @@ self.pdata["TRANSLATIONPATTERN"][0] == '': E5MessageBox.critical( self.ui, - self.trUtf8("Add Language"), - self.trUtf8( + self.tr("Add Language"), + self.tr( "You have to specify a translation pattern first.")) return @@ -1297,8 +1297,8 @@ except IOError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete translation"), - self.trUtf8( + self.tr("Delete translation"), + self.tr( "<p>The selected translation file <b>{0}</b> could not be" " deleted.</p>").format(langFile)) return @@ -1318,8 +1318,8 @@ except IOError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete translation"), - self.trUtf8( + self.tr("Delete translation"), + self.tr( "<p>The selected translation file <b>{0}</b> could" " not be deleted.</p>").format(qmFile)) return @@ -1443,8 +1443,8 @@ if os.path.exists(targetfile): res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Add file"), - self.trUtf8( + self.tr("Add file"), + self.tr( "<p>The file <b>{0}</b> already" " exists.</p><p>Overwrite it?</p>") .format(targetfile), @@ -1456,8 +1456,8 @@ except IOError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Add file"), - self.trUtf8( + self.tr("Add file"), + self.tr( "<p>The selected file <b>{0}</b> could" " not be added to <b>{1}</b>.</p>" "<p>Reason: {2}</p>") @@ -1468,8 +1468,8 @@ else: E5MessageBox.critical( self.ui, - self.trUtf8("Add file"), - self.trUtf8("The target directory must not be empty.")) + self.tr("Add file"), + self.tr("The target directory must not be empty.")) def __addSingleDirectory(self, filetype, source, target, quiet=False): """ @@ -1499,8 +1499,8 @@ if not quiet: E5MessageBox.information( self.ui, - self.trUtf8("Add directory"), - self.trUtf8( + self.tr("Add directory"), + self.tr( "<p>The source directory doesn't contain" " any files belonging to the selected category.</p>")) return @@ -1512,8 +1512,8 @@ except IOError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Add directory"), - self.trUtf8( + self.tr("Add directory"), + self.tr( "<p>The target directory <b>{0}</b> could not be" " created.</p><p>Reason: {1}</p>") .format(target, str(why))) @@ -1530,8 +1530,8 @@ if os.path.exists(targetfile): res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Add directory"), - self.trUtf8( + self.tr("Add directory"), + self.tr( "<p>The file <b>{0}</b> already exists.</p>" "<p>Overwrite it?</p>") .format(targetfile), @@ -1584,8 +1584,8 @@ if target == '': E5MessageBox.critical( self.ui, - self.trUtf8("Add directory"), - self.trUtf8("The target directory must not be empty.")) + self.tr("Add directory"), + self.tr("The target directory must not be empty.")) return if filetype == 'OTHERS': @@ -1595,8 +1595,8 @@ if source == '': E5MessageBox.critical( self.ui, - self.trUtf8("Add directory"), - self.trUtf8("The source directory must not be empty.")) + self.tr("Add directory"), + self.tr("The source directory must not be empty.")) return if recursive: @@ -1719,7 +1719,7 @@ if newfn is None: newfn = E5FileDialog.getSaveFileName( None, - self.trUtf8("Rename file"), + self.tr("Rename file"), oldfn, "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -1730,9 +1730,9 @@ if os.path.exists(newfn): res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Rename File"), - self.trUtf8("""<p>The file <b>{0}</b> already exists.""" - """ Overwrite it?</p>""") + self.tr("Rename File"), + self.tr("""<p>The file <b>{0}</b> already exists.""" + """ Overwrite it?</p>""") .format(newfn), icon=E5MessageBox.Warning) if not res: @@ -1743,8 +1743,8 @@ except OSError as msg: E5MessageBox.critical( self.ui, - self.trUtf8("Rename File"), - self.trUtf8( + self.tr("Rename File"), + self.tr( """<p>The file <b>{0}</b> could not be renamed.<br />""" """Reason: {1}</p>""").format(oldfn, str(msg))) return False @@ -1935,8 +1935,8 @@ except EnvironmentError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete file"), - self.trUtf8( + self.tr("Delete file"), + self.tr( "<p>The selected file <b>{0}</b> could not be" " deleted.</p>").format(fn)) return False @@ -1960,8 +1960,8 @@ except EnvironmentError: E5MessageBox.critical( self.ui, - self.trUtf8("Delete directory"), - self.trUtf8( + self.tr("Delete directory"), + self.tr( "<p>The selected directory <b>{0}</b> could not be" " deleted.</p>").format(dn)) return False @@ -2043,8 +2043,8 @@ except EnvironmentError: E5MessageBox.critical( self.ui, - self.trUtf8("Create project directory"), - self.trUtf8( + self.tr("Create project directory"), + self.tr( "<p>The project directory <b>{0}</b> could not" " be created.</p>") .format(self.ppath)) @@ -2097,8 +2097,8 @@ except IOError as err: E5MessageBox.critical( self.ui, - self.trUtf8("Create main script"), - self.trUtf8( + self.tr("Create main script"), + self.tr( "<p>The mainscript <b>{0}</b> could not" " be created.<br/>Reason: {1}</p>") .format(self.ppath, str(err))) @@ -2109,8 +2109,8 @@ # add existing files to the project res = E5MessageBox.yesNo( self.ui, - self.trUtf8("New Project"), - self.trUtf8("""Add existing files to the project?"""), + self.tr("New Project"), + self.tr("""Add existing files to the project?"""), yesDefault=True) if res: self.newProjectAddFiles(ms) @@ -2137,8 +2137,8 @@ vcsList.append(vcsSystemDisplay) res, vcs_ok = QInputDialog.getItem( None, - self.trUtf8("New Project"), - self.trUtf8("Select Version Control System"), + self.tr("New Project"), + self.tr("Select Version Control System"), vcsList, 0, False) if vcs_ok: @@ -2159,8 +2159,8 @@ # edit VCS command options vcores = E5MessageBox.yesNo( self.ui, - self.trUtf8("New Project"), - self.trUtf8( + self.tr("New Project"), + self.tr( """Would you like to edit the VCS""" """ command options?""")) if vcores: @@ -2173,8 +2173,8 @@ if res == 0: apres = E5MessageBox.yesNo( self.ui, - self.trUtf8("New project"), - self.trUtf8( + self.tr("New project"), + self.tr( "Shall the project file be added" " to the repository?"), yesDefault=True) @@ -2191,18 +2191,18 @@ self.vcsRequested: vcsSystemsDict = e5App().getObject("PluginManager")\ .getPluginDisplayStrings("version_control") - vcsSystemsDisplay = [self.trUtf8("None")] + vcsSystemsDisplay = [self.tr("None")] keys = sorted(vcsSystemsDict.keys()) for key in keys: vcsSystemsDisplay.append(vcsSystemsDict[key]) vcsSelected, ok = QInputDialog.getItem( None, - self.trUtf8("New Project"), - self.trUtf8( + self.tr("New Project"), + self.tr( "Select version control system for the project"), vcsSystemsDisplay, 0, False) - if ok and vcsSelected != self.trUtf8("None"): + if ok and vcsSelected != self.tr("None"): for vcsSystem, vcsSystemDisplay in vcsSystemsDict.items(): if vcsSystemDisplay == vcsSelected: break @@ -2224,8 +2224,8 @@ # edit VCS command options vcores = E5MessageBox.yesNo( self.ui, - self.trUtf8("New Project"), - self.trUtf8( + self.tr("New Project"), + self.tr( """Would you like to edit the VCS command""" """ options?""")) if vcores: @@ -2297,8 +2297,8 @@ else: pattern, ok = QInputDialog.getText( None, - self.trUtf8("Translation Pattern"), - self.trUtf8( + self.tr("Translation Pattern"), + self.tr( "Enter the path pattern for translation files " "(use '%language%' in place of the language code):"), QLineEdit.Normal, @@ -2488,10 +2488,10 @@ if fn is None: fn = E5FileDialog.getOpenFileName( self.parent(), - self.trUtf8("Open project"), + self.tr("Open project"), Preferences.getMultiProject("Workspace") or Utilities.getHomeDir(), - self.trUtf8("Project Files (*.e4p)")) + self.tr("Project Files (*.e4p)")) QApplication.processEvents() @@ -2535,8 +2535,8 @@ QApplication.restoreOverrideCursor() res, vcs_ok = QInputDialog.getItem( None, - self.trUtf8("New Project"), - self.trUtf8( + self.tr("New Project"), + self.tr( "Select Version Control System"), vcsList, 0, False) @@ -2660,7 +2660,7 @@ @return flag indicating success (boolean) """ - defaultFilter = self.trUtf8("Project Files (*.e4p)") + defaultFilter = self.tr("Project Files (*.e4p)") if self.ppath: defaultPath = self.ppath else: @@ -2668,9 +2668,9 @@ Utilities.getHomeDir() fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self.parent(), - self.trUtf8("Save project as"), + self.tr("Save project as"), defaultPath, - self.trUtf8("Project Files (*.e4p)"), + self.tr("Project Files (*.e4p)"), defaultFilter, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -2683,9 +2683,9 @@ if QFileInfo(fn).exists(): res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Save File"), - self.trUtf8("""<p>The file <b>{0}</b> already exists.""" - """ Overwrite it?</p>""").format(fn), + self.tr("Save File"), + self.tr("""<p>The file <b>{0}</b> already exists.""" + """ Overwrite it?</p>""").format(fn), icon=E5MessageBox.Warning) if not res: return False @@ -2719,8 +2719,8 @@ if self.isDirty(): res = E5MessageBox.okToClearData( self.parent(), - self.trUtf8("Close Project"), - self.trUtf8("The current project has unsaved changes."), + self.tr("Close Project"), + self.tr("The current project has unsaved changes."), self.saveProject) if res: self.setDirty(False) @@ -2849,8 +2849,8 @@ if reportSyntaxErrors and filesWithSyntaxErrors > 0: E5MessageBox.critical( self.ui, - self.trUtf8("Syntax errors detected"), - self.trUtf8( + self.tr("Syntax errors detected"), + self.tr( """The project contains %n file(s) with syntax errors.""", "", filesWithSyntaxErrors) ) @@ -2881,8 +2881,8 @@ if reportSyntaxErrors and filesWithSyntaxErrors > 0: E5MessageBox.critical( self.ui, - self.trUtf8("Syntax errors detected"), - self.trUtf8( + self.tr("Syntax errors detected"), + self.tr( """The project contains %n file(s) with syntax errors.""", "", filesWithSyntaxErrors) ) @@ -3257,12 +3257,12 @@ self.actGrp1 = createActionGroup(self) act = E5Action( - self.trUtf8('New project'), + self.tr('New project'), UI.PixmapCache.getIcon("projectNew.png"), - self.trUtf8('&New...'), 0, 0, + self.tr('&New...'), 0, 0, self.actGrp1, 'project_new') - act.setStatusTip(self.trUtf8('Generate a new project')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Generate a new project')) + act.setWhatsThis(self.tr( """<b>New...</b>""" """<p>This opens a dialog for entering the info for a""" """ new project.</p>""" @@ -3271,12 +3271,12 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Open project'), + self.tr('Open project'), UI.PixmapCache.getIcon("projectOpen.png"), - self.trUtf8('&Open...'), 0, 0, + self.tr('&Open...'), 0, 0, self.actGrp1, 'project_open') - act.setStatusTip(self.trUtf8('Open an existing project')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Open an existing project')) + act.setWhatsThis(self.tr( """<b>Open...</b>""" """<p>This opens an existing project.</p>""" )) @@ -3284,11 +3284,11 @@ self.actions.append(act) self.closeAct = E5Action( - self.trUtf8('Close project'), + self.tr('Close project'), UI.PixmapCache.getIcon("projectClose.png"), - self.trUtf8('&Close'), 0, 0, self, 'project_close') - self.closeAct.setStatusTip(self.trUtf8('Close the current project')) - self.closeAct.setWhatsThis(self.trUtf8( + self.tr('&Close'), 0, 0, self, 'project_close') + self.closeAct.setStatusTip(self.tr('Close the current project')) + self.closeAct.setWhatsThis(self.tr( """<b>Close</b>""" """<p>This closes the current project.</p>""" )) @@ -3296,11 +3296,11 @@ self.actions.append(self.closeAct) self.saveAct = E5Action( - self.trUtf8('Save project'), + self.tr('Save project'), UI.PixmapCache.getIcon("projectSave.png"), - self.trUtf8('&Save'), 0, 0, self, 'project_save') - self.saveAct.setStatusTip(self.trUtf8('Save the current project')) - self.saveAct.setWhatsThis(self.trUtf8( + self.tr('&Save'), 0, 0, self, 'project_save') + self.saveAct.setStatusTip(self.tr('Save the current project')) + self.saveAct.setWhatsThis(self.tr( """<b>Save</b>""" """<p>This saves the current project.</p>""" )) @@ -3308,12 +3308,12 @@ self.actions.append(self.saveAct) self.saveasAct = E5Action( - self.trUtf8('Save project as'), + self.tr('Save project as'), UI.PixmapCache.getIcon("projectSaveAs.png"), - self.trUtf8('Save &as...'), 0, 0, self, 'project_save_as') - self.saveasAct.setStatusTip(self.trUtf8( + self.tr('Save &as...'), 0, 0, self, 'project_save_as') + self.saveasAct.setStatusTip(self.tr( 'Save the current project to a new file')) - self.saveasAct.setWhatsThis(self.trUtf8( + self.saveasAct.setWhatsThis(self.tr( """<b>Save as</b>""" """<p>This saves the current project to a new file.</p>""" )) @@ -3323,13 +3323,13 @@ self.actGrp2 = createActionGroup(self) self.addFilesAct = E5Action( - self.trUtf8('Add files to project'), + self.tr('Add files to project'), UI.PixmapCache.getIcon("fileMisc.png"), - self.trUtf8('Add &files...'), 0, 0, + self.tr('Add &files...'), 0, 0, self.actGrp2, 'project_add_file') - self.addFilesAct.setStatusTip(self.trUtf8( + self.addFilesAct.setStatusTip(self.tr( 'Add files to the current project')) - self.addFilesAct.setWhatsThis(self.trUtf8( + self.addFilesAct.setWhatsThis(self.tr( """<b>Add files...</b>""" """<p>This opens a dialog for adding files""" """ to the current project. The place to add is""" @@ -3339,13 +3339,13 @@ self.actions.append(self.addFilesAct) self.addDirectoryAct = E5Action( - self.trUtf8('Add directory to project'), + self.tr('Add directory to project'), UI.PixmapCache.getIcon("dirOpen.png"), - self.trUtf8('Add directory...'), 0, 0, + self.tr('Add directory...'), 0, 0, self.actGrp2, 'project_add_directory') self.addDirectoryAct.setStatusTip( - self.trUtf8('Add a directory to the current project')) - self.addDirectoryAct.setWhatsThis(self.trUtf8( + self.tr('Add a directory to the current project')) + self.addDirectoryAct.setWhatsThis(self.tr( """<b>Add directory...</b>""" """<p>This opens a dialog for adding a directory""" """ to the current project.</p>""" @@ -3354,13 +3354,13 @@ self.actions.append(self.addDirectoryAct) self.addLanguageAct = E5Action( - self.trUtf8('Add translation to project'), + self.tr('Add translation to project'), UI.PixmapCache.getIcon("linguist4.png"), - self.trUtf8('Add &translation...'), 0, 0, + self.tr('Add &translation...'), 0, 0, self.actGrp2, 'project_add_translation') self.addLanguageAct.setStatusTip( - self.trUtf8('Add a translation to the current project')) - self.addLanguageAct.setWhatsThis(self.trUtf8( + self.tr('Add a translation to the current project')) + self.addLanguageAct.setWhatsThis(self.tr( """<b>Add translation...</b>""" """<p>This opens a dialog for add a translation""" """ to the current project.</p>""" @@ -3369,12 +3369,12 @@ self.actions.append(self.addLanguageAct) act = E5Action( - self.trUtf8('Search new files'), - self.trUtf8('Searc&h new files...'), 0, 0, + self.tr('Search new files'), + self.tr('Searc&h new files...'), 0, 0, self.actGrp2, 'project_search_new_files') - act.setStatusTip(self.trUtf8( + act.setStatusTip(self.tr( 'Search new files in the project directory.')) - act.setWhatsThis(self.trUtf8( + act.setWhatsThis(self.tr( """<b>Search new files...</b>""" """<p>This searches for new files (sources, *.ui, *.idl) in""" """ the project directory and registered subdirectories.</p>""" @@ -3383,12 +3383,12 @@ self.actions.append(act) self.propsAct = E5Action( - self.trUtf8('Project properties'), + self.tr('Project properties'), UI.PixmapCache.getIcon("projectProps.png"), - self.trUtf8('&Properties...'), 0, 0, self, + self.tr('&Properties...'), 0, 0, self, 'project_properties') - self.propsAct.setStatusTip(self.trUtf8('Show the project properties')) - self.propsAct.setWhatsThis(self.trUtf8( + self.propsAct.setStatusTip(self.tr('Show the project properties')) + self.propsAct.setWhatsThis(self.tr( """<b>Properties...</b>""" """<p>This shows a dialog to edit the project properties.</p>""" )) @@ -3396,13 +3396,13 @@ self.actions.append(self.propsAct) self.userPropsAct = E5Action( - self.trUtf8('User project properties'), + self.tr('User project properties'), UI.PixmapCache.getIcon("projectUserProps.png"), - self.trUtf8('&User Properties...'), 0, 0, self, + self.tr('&User Properties...'), 0, 0, self, 'project_user_properties') - self.userPropsAct.setStatusTip(self.trUtf8( + self.userPropsAct.setStatusTip(self.tr( 'Show the user specific project properties')) - self.userPropsAct.setWhatsThis(self.trUtf8( + self.userPropsAct.setWhatsThis(self.tr( """<b>User Properties...</b>""" """<p>This shows a dialog to edit the user specific project""" """ properties.</p>""" @@ -3411,12 +3411,12 @@ self.actions.append(self.userPropsAct) self.filetypesAct = E5Action( - self.trUtf8('Filetype Associations'), - self.trUtf8('Filetype Associations...'), 0, 0, + self.tr('Filetype Associations'), + self.tr('Filetype Associations...'), 0, 0, self, 'project_filetype_associatios') self.filetypesAct.setStatusTip( - self.trUtf8('Show the project filetype associations')) - self.filetypesAct.setWhatsThis(self.trUtf8( + self.tr('Show the project filetype associations')) + self.filetypesAct.setWhatsThis(self.tr( """<b>Filetype Associations...</b>""" """<p>This shows a dialog to edit the filetype associations of""" """ the project. These associations determine the type""" @@ -3429,12 +3429,12 @@ self.actions.append(self.filetypesAct) self.lexersAct = E5Action( - self.trUtf8('Lexer Associations'), - self.trUtf8('Lexer Associations...'), 0, 0, + self.tr('Lexer Associations'), + self.tr('Lexer Associations...'), 0, 0, self, 'project_lexer_associatios') - self.lexersAct.setStatusTip(self.trUtf8( + self.lexersAct.setStatusTip(self.tr( 'Show the project lexer associations (overriding defaults)')) - self.lexersAct.setWhatsThis(self.trUtf8( + self.lexersAct.setWhatsThis(self.tr( """<b>Lexer Associations...</b>""" """<p>This shows a dialog to edit the lexer associations of""" """ the project. These associations override the global lexer""" @@ -3447,11 +3447,11 @@ self.dbgActGrp = createActionGroup(self) act = E5Action( - self.trUtf8('Debugger Properties'), - self.trUtf8('Debugger &Properties...'), 0, 0, + self.tr('Debugger Properties'), + self.tr('Debugger &Properties...'), 0, 0, self.dbgActGrp, 'project_debugger_properties') - act.setStatusTip(self.trUtf8('Show the debugger properties')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Show the debugger properties')) + act.setWhatsThis(self.tr( """<b>Debugger Properties...</b>""" """<p>This shows a dialog to edit project specific debugger""" """ settings.</p>""" @@ -3460,11 +3460,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Load'), - self.trUtf8('&Load'), 0, 0, + self.tr('Load'), + self.tr('&Load'), 0, 0, self.dbgActGrp, 'project_debugger_properties_load') - act.setStatusTip(self.trUtf8('Load the debugger properties')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Load the debugger properties')) + act.setWhatsThis(self.tr( """<b>Load Debugger Properties</b>""" """<p>This loads the project specific debugger settings.</p>""" )) @@ -3472,11 +3472,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Save'), - self.trUtf8('&Save'), 0, 0, + self.tr('Save'), + self.tr('&Save'), 0, 0, self.dbgActGrp, 'project_debugger_properties_save') - act.setStatusTip(self.trUtf8('Save the debugger properties')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Save the debugger properties')) + act.setWhatsThis(self.tr( """<b>Save Debugger Properties</b>""" """<p>This saves the project specific debugger settings.</p>""" )) @@ -3484,11 +3484,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Delete'), - self.trUtf8('&Delete'), 0, 0, + self.tr('Delete'), + self.tr('&Delete'), 0, 0, self.dbgActGrp, 'project_debugger_properties_delete') - act.setStatusTip(self.trUtf8('Delete the debugger properties')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Delete the debugger properties')) + act.setWhatsThis(self.tr( """<b>Delete Debugger Properties</b>""" """<p>This deletes the file containing the project specific""" """ debugger settings.</p>""" @@ -3497,11 +3497,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Reset'), - self.trUtf8('&Reset'), 0, 0, + self.tr('Reset'), + self.tr('&Reset'), 0, 0, self.dbgActGrp, 'project_debugger_properties_resets') - act.setStatusTip(self.trUtf8('Reset the debugger properties')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Reset the debugger properties')) + act.setWhatsThis(self.tr( """<b>Reset Debugger Properties</b>""" """<p>This resets the project specific debugger settings.</p>""" )) @@ -3511,11 +3511,11 @@ self.sessActGrp = createActionGroup(self) act = E5Action( - self.trUtf8('Load session'), - self.trUtf8('Load session'), 0, 0, + self.tr('Load session'), + self.tr('Load session'), 0, 0, self.sessActGrp, 'project_load_session') - act.setStatusTip(self.trUtf8('Load the projects session file.')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Load the projects session file.')) + act.setWhatsThis(self.tr( """<b>Load session</b>""" """<p>This loads the projects session file. The session consists""" """ of the following data.<br>""" @@ -3529,11 +3529,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Save session'), - self.trUtf8('Save session'), 0, 0, + self.tr('Save session'), + self.tr('Save session'), 0, 0, self.sessActGrp, 'project_save_session') - act.setStatusTip(self.trUtf8('Save the projects session file.')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Save the projects session file.')) + act.setWhatsThis(self.tr( """<b>Save session</b>""" """<p>This saves the projects session file. The session consists""" """ of the following data.<br>""" @@ -3547,11 +3547,11 @@ self.actions.append(act) act = E5Action( - self.trUtf8('Delete session'), - self.trUtf8('Delete session'), 0, 0, + self.tr('Delete session'), + self.tr('Delete session'), 0, 0, self.sessActGrp, 'project_delete_session') - act.setStatusTip(self.trUtf8('Delete the projects session file.')) - act.setWhatsThis(self.trUtf8( + act.setStatusTip(self.tr('Delete the projects session file.')) + act.setWhatsThis(self.tr( """<b>Delete session</b>""" """<p>This deletes the projects session file</p>""" )) @@ -3561,12 +3561,12 @@ self.chkGrp = createActionGroup(self) self.codeMetricsAct = E5Action( - self.trUtf8('Code Metrics'), - self.trUtf8('&Code Metrics...'), 0, 0, + self.tr('Code Metrics'), + self.tr('&Code Metrics...'), 0, 0, self.chkGrp, 'project_code_metrics') self.codeMetricsAct.setStatusTip( - self.trUtf8('Show some code metrics for the project.')) - self.codeMetricsAct.setWhatsThis(self.trUtf8( + self.tr('Show some code metrics for the project.')) + self.codeMetricsAct.setWhatsThis(self.tr( """<b>Code Metrics...</b>""" """<p>This shows some code metrics for all Python files in""" """ the project.</p>""" @@ -3575,12 +3575,12 @@ self.actions.append(self.codeMetricsAct) self.codeCoverageAct = E5Action( - self.trUtf8('Python Code Coverage'), - self.trUtf8('Code Co&verage...'), 0, 0, + self.tr('Python Code Coverage'), + self.tr('Code Co&verage...'), 0, 0, self.chkGrp, 'project_code_coverage') self.codeCoverageAct.setStatusTip( - self.trUtf8('Show code coverage information for the project.')) - self.codeCoverageAct.setWhatsThis(self.trUtf8( + self.tr('Show code coverage information for the project.')) + self.codeCoverageAct.setWhatsThis(self.tr( """<b>Code Coverage...</b>""" """<p>This shows the code coverage information for all Python""" """ files in the project.</p>""" @@ -3589,12 +3589,12 @@ self.actions.append(self.codeCoverageAct) self.codeProfileAct = E5Action( - self.trUtf8('Profile Data'), - self.trUtf8('&Profile Data...'), 0, 0, + self.tr('Profile Data'), + self.tr('&Profile Data...'), 0, 0, self.chkGrp, 'project_profile_data') self.codeProfileAct.setStatusTip( - self.trUtf8('Show profiling data for the project.')) - self.codeProfileAct.setWhatsThis(self.trUtf8( + self.tr('Show profiling data for the project.')) + self.codeProfileAct.setWhatsThis(self.tr( """<b>Profile Data...</b>""" """<p>This shows the profiling data for the project.</p>""" )) @@ -3604,12 +3604,12 @@ self.graphicsGrp = createActionGroup(self) self.applicationDiagramAct = E5Action( - self.trUtf8('Application Diagram'), - self.trUtf8('&Application Diagram...'), 0, 0, + self.tr('Application Diagram'), + self.tr('&Application Diagram...'), 0, 0, self.graphicsGrp, 'project_application_diagram') self.applicationDiagramAct.setStatusTip( - self.trUtf8('Show a diagram of the project.')) - self.applicationDiagramAct.setWhatsThis(self.trUtf8( + self.tr('Show a diagram of the project.')) + self.applicationDiagramAct.setWhatsThis(self.tr( """<b>Application Diagram...</b>""" """<p>This shows a diagram of the project.</p>""" )) @@ -3618,12 +3618,12 @@ self.actions.append(self.applicationDiagramAct) self.loadDiagramAct = E5Action( - self.trUtf8('Load Diagram'), - self.trUtf8('&Load Diagram...'), 0, 0, + self.tr('Load Diagram'), + self.tr('&Load Diagram...'), 0, 0, self.graphicsGrp, 'project_load_diagram') self.loadDiagramAct.setStatusTip( - self.trUtf8('Load a diagram from file.')) - self.loadDiagramAct.setWhatsThis(self.trUtf8( + self.tr('Load a diagram from file.')) + self.loadDiagramAct.setWhatsThis(self.tr( """<b>Load Diagram...</b>""" """<p>This loads a diagram from file.</p>""" )) @@ -3633,13 +3633,13 @@ self.pluginGrp = createActionGroup(self) self.pluginPkgListAct = E5Action( - self.trUtf8('Create Package List'), + self.tr('Create Package List'), UI.PixmapCache.getIcon("pluginArchiveList.png"), - self.trUtf8('Create &Package List'), 0, 0, + self.tr('Create &Package List'), 0, 0, self.pluginGrp, 'project_plugin_pkglist') self.pluginPkgListAct.setStatusTip( - self.trUtf8('Create an initial PKGLIST file for an eric5 plugin.')) - self.pluginPkgListAct.setWhatsThis(self.trUtf8( + self.tr('Create an initial PKGLIST file for an eric5 plugin.')) + self.pluginPkgListAct.setWhatsThis(self.tr( """<b>Create Package List</b>""" """<p>This creates an initial list of files to include in an""" """ eric5 plugin archive. The list is created from the project""" @@ -3649,13 +3649,13 @@ self.actions.append(self.pluginPkgListAct) self.pluginArchiveAct = E5Action( - self.trUtf8('Create Plugin Archive'), + self.tr('Create Plugin Archive'), UI.PixmapCache.getIcon("pluginArchive.png"), - self.trUtf8('Create Plugin &Archive'), 0, 0, + self.tr('Create Plugin &Archive'), 0, 0, self.pluginGrp, 'project_plugin_archive') self.pluginArchiveAct.setStatusTip( - self.trUtf8('Create an eric5 plugin archive file.')) - self.pluginArchiveAct.setWhatsThis(self.trUtf8( + self.tr('Create an eric5 plugin archive file.')) + self.pluginArchiveAct.setWhatsThis(self.tr( """<b>Create Plugin Archive</b>""" """<p>This creates an eric5 plugin archive file using the list""" """ of files given in the PKGLIST file. The archive name is""" @@ -3665,13 +3665,13 @@ self.actions.append(self.pluginArchiveAct) self.pluginSArchiveAct = E5Action( - self.trUtf8('Create Plugin Archive (Snapshot)'), + self.tr('Create Plugin Archive (Snapshot)'), UI.PixmapCache.getIcon("pluginArchiveSnapshot.png"), - self.trUtf8('Create Plugin Archive (&Snapshot)'), 0, 0, + self.tr('Create Plugin Archive (&Snapshot)'), 0, 0, self.pluginGrp, 'project_plugin_sarchive') - self.pluginSArchiveAct.setStatusTip(self.trUtf8( + self.pluginSArchiveAct.setStatusTip(self.tr( 'Create an eric5 plugin archive file (snapshot release).')) - self.pluginSArchiveAct.setWhatsThis(self.trUtf8( + self.pluginSArchiveAct.setWhatsThis(self.tr( """<b>Create Plugin Archive (Snapshot)</b>""" """<p>This creates an eric5 plugin archive file using the list""" """ of files given in the PKGLIST file. The archive name is""" @@ -3700,21 +3700,21 @@ @return the menu generated (QMenu) """ - menu = QMenu(self.trUtf8('&Project'), self.parent()) - self.recentMenu = QMenu(self.trUtf8('Open &Recent Projects'), menu) - self.vcsMenu = QMenu(self.trUtf8('&Version Control'), menu) + menu = QMenu(self.tr('&Project'), self.parent()) + self.recentMenu = QMenu(self.tr('Open &Recent Projects'), menu) + self.vcsMenu = QMenu(self.tr('&Version Control'), menu) self.vcsMenu.setTearOffEnabled(True) self.vcsProjectHelper.initMenu(self.vcsMenu) self.vcsMenu.setEnabled(self.vcsSoftwareAvailable()) - self.checksMenu = QMenu(self.trUtf8('Chec&k'), menu) + self.checksMenu = QMenu(self.tr('Chec&k'), menu) self.checksMenu.setTearOffEnabled(True) - self.menuShow = QMenu(self.trUtf8('Sho&w'), menu) - self.graphicsMenu = QMenu(self.trUtf8('&Diagrams'), menu) - self.sessionMenu = QMenu(self.trUtf8('Session'), menu) - self.apidocMenu = QMenu(self.trUtf8('Source &Documentation'), menu) + self.menuShow = QMenu(self.tr('Sho&w'), menu) + self.graphicsMenu = QMenu(self.tr('&Diagrams'), menu) + self.sessionMenu = QMenu(self.tr('Session'), menu) + self.apidocMenu = QMenu(self.tr('Source &Documentation'), menu) self.apidocMenu.setTearOffEnabled(True) - self.debuggerMenu = QMenu(self.trUtf8('Debugger'), menu) - self.packagersMenu = QMenu(self.trUtf8('Pac&kagers'), menu) + self.debuggerMenu = QMenu(self.tr('Debugger'), menu) + self.packagersMenu = QMenu(self.tr('Pac&kagers'), menu) self.packagersMenu.setTearOffEnabled(True) self.__menus = { @@ -3818,10 +3818,10 @@ (E5ToolBarManager) @return the toolbar generated (QToolBar) """ - tb = QToolBar(self.trUtf8("Project"), self.ui) + tb = QToolBar(self.tr("Project"), self.ui) tb.setIconSize(UI.Config.ToolBarIconSize) tb.setObjectName("ProjectToolbar") - tb.setToolTip(self.trUtf8('Project')) + tb.setToolTip(self.tr('Project')) tb.addActions(self.actGrp1.actions()) tb.addAction(self.closeAct) @@ -3883,7 +3883,7 @@ idx += 1 self.recentMenu.addSeparator() - self.recentMenu.addAction(self.trUtf8('&Clear'), self.__clearRecent) + self.recentMenu.addAction(self.tr('&Clear'), self.__clearRecent) def __openRecent(self, act): """ @@ -4005,8 +4005,8 @@ if onUserDemand: E5MessageBox.information( self.ui, - self.trUtf8("Search New Files"), - self.trUtf8("There were no new files found to be added.")) + self.tr("Search New Files"), + self.tr("There were no new files found to be added.")) return # autoInclude is not set, show a dialog @@ -4140,8 +4140,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.ui, - self.trUtf8("Version Control System"), - self.trUtf8( + self.tr("Version Control System"), + self.tr( "<p>The selected VCS <b>{0}</b> could not be" " found. <br/>Reverting override.</p><p>{1}</p>") .format(vcsSystem, msg)) @@ -4151,8 +4151,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.ui, - self.trUtf8("Version Control System"), - self.trUtf8( + self.tr("Version Control System"), + self.tr( "<p>The selected VCS <b>{0}</b> could not be" " found.<br/>Disabling version control.</p>" "<p>{1}</p>").format(vcsSystem, msg)) @@ -4268,8 +4268,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Coverage Data"), - self.trUtf8( + self.tr("Coverage Data"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -4291,8 +4291,8 @@ if len(files) > 1: fn, ok = QInputDialog.getItem( None, - self.trUtf8("Code Coverage"), - self.trUtf8("Please select a coverage file"), + self.tr("Code Coverage"), + self.tr("Please select a coverage file"), files, 0, False) if not ok: @@ -4317,8 +4317,8 @@ if fn is None: E5MessageBox.critical( self.ui, - self.trUtf8("Profile Data"), - self.trUtf8( + self.tr("Profile Data"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -4340,8 +4340,8 @@ if len(files) > 1: fn, ok = QInputDialog.getItem( None, - self.trUtf8("Profile Data"), - self.trUtf8("Please select a profile file"), + self.tr("Profile Data"), + self.tr("Please select a profile file"), files, 0, False) if not ok: @@ -4394,8 +4394,8 @@ """ res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Application Diagram"), - self.trUtf8("""Include module names?"""), + self.tr("Application Diagram"), + self.tr("""Include module names?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog @@ -4512,8 +4512,8 @@ if os.path.exists(pkglist): res = E5MessageBox.yesNo( self.ui, - self.trUtf8("Create Package List"), - self.trUtf8( + self.tr("Create Package List"), + self.tr( "<p>The file <b>PKGLIST</b> already" " exists.</p><p>Overwrite it?</p>"), icon=E5MessageBox.Warning) @@ -4552,8 +4552,8 @@ except IOError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Package List"), - self.trUtf8( + self.tr("Create Package List"), + self.tr( """<p>The file <b>PKGLIST</b> could not be created.</p>""" """<p>Reason: {0}</p>""").format(str(why))) return @@ -4571,17 +4571,17 @@ if not os.path.exists(pkglist): E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8("""<p>The file <b>PKGLIST</b> does not exist. """ - """Aborting...</p>""")) + self.tr("Create Plugin Archive"), + self.tr("""<p>The file <b>PKGLIST</b> does not exist. """ + """Aborting...</p>""")) return if len(self.pdata["MAINSCRIPT"]) == 0 or \ len(self.pdata["MAINSCRIPT"][0]) == 0: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """The project does not have a main script defined. """ """Aborting...""")) return @@ -4594,8 +4594,8 @@ except IOError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The file <b>PKGLIST</b> could not be read.</p>""" """<p>Reason: {0}</p>""").format(str(why))) return @@ -4607,8 +4607,8 @@ except IOError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The eric5 plugin archive file <b>{0}</b> could """ """not be created.</p>""" """<p>Reason: {1}</p>""").format(archive, str(why))) @@ -4633,8 +4633,8 @@ except OSError as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The file <b>{0}</b> could not be stored """ """in the archive. Ignoring it.</p>""" """<p>Reason: {1}</p>""") @@ -4648,16 +4648,16 @@ if self.ui.notificationsEnabled(): self.ui.showNotification( UI.PixmapCache.getPixmap("pluginArchive48.png"), - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The eric5 plugin archive file <b>{0}</b> was """ """created successfully.</p>""") .format(os.path.basename(archive))) else: E5MessageBox.information( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The eric5 plugin archive file <b>{0}</b> was """ """created successfully.</p>""").format(archive)) @@ -4701,10 +4701,10 @@ except (IOError, UnicodeError) as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8("""<p>The plugin file <b>{0}</b> could """ - """not be read.</p>""" - """<p>Reason: {1}</p>""") + self.tr("Create Plugin Archive"), + self.tr("""<p>The plugin file <b>{0}</b> could """ + """not be read.</p>""" + """<p>Reason: {1}</p>""") .format(filename, str(why))) return b"", "" @@ -4742,8 +4742,8 @@ except (IOError, UnicodeError) as why: E5MessageBox.critical( self.ui, - self.trUtf8("Create Plugin Archive"), - self.trUtf8( + self.tr("Create Plugin Archive"), + self.tr( """<p>The plugin file <b>{0}</b> could """ """not be read.</p> <p>Reason: {1}</p>""") .format(filename, str(why)))
--- a/Project/ProjectBaseBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectBaseBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -292,9 +292,9 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete directories"), - self.trUtf8("Do you really want to delete these directories from" - " the project?"), + self.tr("Delete directories"), + self.tr("Do you really want to delete these directories from" + " the project?"), dirs) if dlg.exec_() == QDialog.Accepted:
--- a/Project/ProjectBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -63,13 +63,13 @@ "Z": "VcsConflict", } self.vcsStatusText = { - " ": self.trUtf8("up to date"), - "A": self.trUtf8("files added"), - "M": self.trUtf8("local modifications"), - "O": self.trUtf8("files removed"), - "R": self.trUtf8("files replaced"), - "U": self.trUtf8("update required"), - "Z": self.trUtf8("conflict"), + " ": self.tr("up to date"), + "A": self.tr("files added"), + "M": self.tr("local modifications"), + "O": self.tr("files removed"), + "R": self.tr("files replaced"), + "U": self.tr("update required"), + "Z": self.tr("conflict"), } self.__vcsStateChanged(" ") @@ -379,6 +379,6 @@ Preferences.getProjectBrowserColour( self.vcsStatusColorNames[state])) if state not in self.vcsStatusText: - self.vcsStatusIndicator.setToolTip(self.trUtf8("unknown status")) + self.vcsStatusIndicator.setToolTip(self.tr("unknown status")) else: self.vcsStatusIndicator.setToolTip(self.vcsStatusText[state])
--- a/Project/ProjectBrowserModel.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectBrowserModel.py Sat Jan 11 11:55:33 2014 +0100 @@ -225,9 +225,9 @@ """ super().__init__(parent, nopopulate=True) - rootData = self.trUtf8("Name") + rootData = self.tr("Name") self.rootItem = BrowserItem(None, rootData) - self.rootItem.itemData.append(self.trUtf8("VCS Status")) + self.rootItem.itemData.append(self.tr("VCS Status")) self.progDir = None self.project = parent @@ -371,7 +371,7 @@ self.project.clearStatusMonitorCachedState( f.absoluteFilePath()) else: - node.addVcsStatus(self.trUtf8("local")) + node.addVcsStatus(self.tr("local")) self._addItem(node, parentItem) if repopulate: self.endInsertRows() @@ -444,7 +444,7 @@ self.project.vcs.canBeCommitted: itm.addVcsStatus(self.project.vcs.vcsName()) else: - itm.addVcsStatus(self.trUtf8("local")) + itm.addVcsStatus(self.tr("local")) else: itm.addVcsStatus("") self.inRefresh = False @@ -704,7 +704,7 @@ if state == self.project.vcs.canBeCommitted: node.addVcsStatus(self.project.vcs.vcsName()) else: - node.addVcsStatus(self.trUtf8("local")) + node.addVcsStatus(self.tr("local")) self.endInsertRows() # step 2: check for removed entries @@ -739,7 +739,7 @@ if state == self.project.vcs.canBeCommitted: item.addVcsStatus(self.project.vcs.vcsName()) else: - item.addVcsStatus(self.trUtf8("local")) + item.addVcsStatus(self.tr("local")) else: item.addVcsStatus("") @@ -757,7 +757,7 @@ if state == self.project.vcs.canBeCommitted: item.setVcsStatus(self.project.vcs.vcsName()) else: - item.setVcsStatus(self.trUtf8("local")) + item.setVcsStatus(self.tr("local")) if recursive: name = os.path.dirname(name) parentItem = item.parent()
--- a/Project/ProjectFormsBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectFormsBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -66,9 +66,9 @@ self.selectedItemsFilter = \ [ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem] - self.setWindowTitle(self.trUtf8('Forms')) + self.setWindowTitle(self.tr('Forms')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Forms Browser</b>""" """<p>This allows to easily see all forms contained in the""" """ current project. Several actions can be executed via the""" @@ -87,25 +87,25 @@ 'qtoolbox4.tmpl', 'qstackedwidget4.tmpl' ] self.templateTypes4 = [ - self.trUtf8("Dialog"), - self.trUtf8("Widget"), - self.trUtf8("Main Window"), - self.trUtf8("Dialog with Buttonbox (Bottom)"), - self.trUtf8("Dialog with Buttonbox (Right)"), - self.trUtf8("Dialog with Buttons (Bottom)"), - self.trUtf8("Dialog with Buttons (Bottom-Center)"), - self.trUtf8("Dialog with Buttons (Right)"), + self.tr("Dialog"), + self.tr("Widget"), + self.tr("Main Window"), + self.tr("Dialog with Buttonbox (Bottom)"), + self.tr("Dialog with Buttonbox (Right)"), + self.tr("Dialog with Buttons (Bottom)"), + self.tr("Dialog with Buttons (Bottom-Center)"), + self.tr("Dialog with Buttons (Right)"), '', - self.trUtf8("QWizard"), - self.trUtf8("QWizardPage"), - self.trUtf8("QDockWidget"), - self.trUtf8("QFrame"), - self.trUtf8("QGroupBox"), - self.trUtf8("QScrollArea"), - self.trUtf8("QMdiArea"), - self.trUtf8("QTabWidget"), - self.trUtf8("QToolBox"), - self.trUtf8("QStackedWidget"), + self.tr("QWizard"), + self.tr("QWizardPage"), + self.tr("QDockWidget"), + self.tr("QFrame"), + self.tr("QGroupBox"), + self.tr("QScrollArea"), + self.tr("QMdiArea"), + self.tr("QTabWidget"), + self.tr("QToolBox"), + self.tr("QStackedWidget"), ] self.compileProc = None @@ -125,39 +125,39 @@ if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: self.menu.addAction( - self.trUtf8('Compile form'), self.__compileForm) + self.tr('Compile form'), self.__compileForm) self.menu.addAction( - self.trUtf8('Compile all forms'), + self.tr('Compile all forms'), self.__compileAllForms) self.menu.addAction( - self.trUtf8('Generate Dialog Code...'), + self.tr('Generate Dialog Code...'), self.__generateDialogCode) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Open in Qt-Designer'), self.__openFile) + self.tr('Open in Qt-Designer'), self.__openFile) self.menu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Preview form'), self.__UIPreview) + self.menu.addAction(self.tr('Preview form'), self.__UIPreview) self.menu.addAction( - self.trUtf8('Preview translations'), self.__TRPreview) + self.tr('Preview translations'), self.__TRPreview) else: if self.hooks["compileForm"] is not None: self.menu.addAction( self.hooksMenuEntries.get( "compileForm", - self.trUtf8('Compile form')), self.__compileForm) + self.tr('Compile form')), self.__compileForm) if self.hooks["compileAllForms"] is not None: self.menu.addAction( self.hooksMenuEntries.get( "compileAllForms", - self.trUtf8('Compile all forms')), + self.tr('Compile all forms')), self.__compileAllForms) if self.hooks["generateDialogCode"] is not None: self.menu.addAction( self.hooksMenuEntries.get( "generateDialogCode", - self.trUtf8('Generate Dialog Code...')), + self.tr('Generate Dialog Code...')), self.__generateDialogCode) if self.hooks["compileForm"] is not None or \ self.hooks["compileAllForms"] is not None or \ @@ -165,64 +165,64 @@ self.menu.addSeparator() if self.hooks["open"] is not None: self.menu.addAction( - self.hooksMenuEntries.get("open", self.trUtf8('Open')), + self.hooksMenuEntries.get("open", self.tr('Open')), self.__openFile) - self.menu.addAction(self.trUtf8('Open'), self.__openFileInEditor) + self.menu.addAction(self.tr('Open'), self.__openFileInEditor) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Rename file'), self._renameFile) + act = self.menu.addAction(self.tr('Rename file'), self._renameFile) self.menuActions.append(act) act = self.menu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.menuActions.append(act) - act = self.menu.addAction(self.trUtf8('Delete'), self.__deleteFile) + act = self.menu.addAction(self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.menu.addSeparator() if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.menu.addAction(self.trUtf8('New form...'), self.__newForm) + self.menu.addAction(self.tr('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: self.menu.addAction( self.hooksMenuEntries.get( - "newForm", self.trUtf8('New form...')), self.__newForm) - self.menu.addAction(self.trUtf8('Add forms...'), self.__addFormFiles) + "newForm", self.tr('New form...')), self.__newForm) + self.menu.addAction(self.tr('Add forms...'), self.__addFormFiles) self.menu.addAction( - self.trUtf8('Add forms directory...'), self.__addFormsDirectory) + self.tr('Add forms directory...'), self.__addFormsDirectory) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) self.backMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"] or \ self.hooks["compileAllForms"] is not None: self.backMenu.addAction( - self.trUtf8('Compile all forms'), self.__compileAllForms) + self.tr('Compile all forms'), self.__compileAllForms) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('New form...'), self.__newForm) + self.backMenu.addAction(self.tr('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: self.backMenu.addAction( self.hooksMenuEntries.get( - "newForm", self.trUtf8('New form...')), self.__newForm) + "newForm", self.tr('New form...')), self.__newForm) self.backMenu.addAction( - self.trUtf8('Add forms...'), self.project.addUiFiles) + self.tr('Add forms...'), self.project.addUiFiles) self.backMenu.addAction( - self.trUtf8('Add forms directory...'), self.project.addUiDir) + self.tr('Add forms directory...'), self.project.addUiDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.setEnabled(False) # create the menu for multiple selected files @@ -230,115 +230,115 @@ if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: act = self.multiMenu.addAction( - self.trUtf8('Compile forms'), self.__compileSelectedForms) + self.tr('Compile forms'), self.__compileSelectedForms) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Open in Qt-Designer'), self.__openFile) + self.tr('Open in Qt-Designer'), self.__openFile) self.multiMenu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Preview translations'), self.__TRPreview) + self.tr('Preview translations'), self.__TRPreview) else: if self.hooks["compileSelectedForms"] is not None: act = self.multiMenu.addAction( self.hooksMenuEntries.get( "compileSelectedForms", - self.trUtf8('Compile forms')), + self.tr('Compile forms')), self.__compileSelectedForms) self.multiMenu.addSeparator() if self.hooks["open"] is not None: self.multiMenu.addAction( - self.hooksMenuEntries.get("open", self.trUtf8('Open')), + self.hooksMenuEntries.get("open", self.tr('Open')), self.__openFile) self.multiMenu.addAction( - self.trUtf8('Open'), self.__openFileInEditor) + self.tr('Open'), self.__openFileInEditor) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: self.dirMenu.addAction( - self.trUtf8('Compile all forms'), self.__compileAllForms) + self.tr('Compile all forms'), self.__compileAllForms) self.dirMenu.addSeparator() else: if self.hooks["compileAllForms"] is not None: self.dirMenu.addAction( self.hooksMenuEntries.get( "compileAllForms", - self.trUtf8('Compile all forms')), + self.tr('Compile all forms')), self.__compileAllForms) self.dirMenu.addSeparator() act = self.dirMenu.addAction( - self.trUtf8('Remove from project'), self._removeDir) + self.tr('Remove from project'), self._removeDir) self.dirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Delete'), self._deleteDirectory) + self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: - self.dirMenu.addAction(self.trUtf8('New form...'), self.__newForm) + self.dirMenu.addAction(self.tr('New form...'), self.__newForm) else: if self.hooks["newForm"] is not None: self.dirMenu.addAction( self.hooksMenuEntries.get( "newForm", - self.trUtf8('New form...')), self.__newForm) + self.tr('New form...')), self.__newForm) self.dirMenu.addAction( - self.trUtf8('Add forms...'), self.__addFormFiles) + self.tr('Add forms...'), self.__addFormFiles) self.dirMenu.addAction( - self.trUtf8('Add forms directory...'), self.__addFormsDirectory) + self.tr('Add forms directory...'), self.__addFormsDirectory) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "PyQt5", "E4Plugin", "PySide"]: self.dirMultiMenu.addAction( - self.trUtf8('Compile all forms'), self.__compileAllForms) + self.tr('Compile all forms'), self.__compileAllForms) self.dirMultiMenu.addSeparator() else: if self.hooks["compileAllForms"] is not None: self.dirMultiMenu.addAction( self.hooksMenuEntries.get( "compileAllForms", - self.trUtf8('Compile all forms')), + self.tr('Compile all forms')), self.__compileAllForms) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Add forms...'), self.project.addUiFiles) + self.tr('Add forms...'), self.project.addUiFiles) self.dirMultiMenu.addAction( - self.trUtf8('Add forms directory...'), self.project.addUiDir) + self.tr('Add forms directory...'), self.project.addUiDir) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMultiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.menu.aboutToShow.connect(self.__showContextMenu) self.multiMenu.aboutToShow.connect(self.__showContextMenuMulti) @@ -545,8 +545,8 @@ """ selectedForm, ok = QInputDialog.getItem( None, - self.trUtf8("New Form"), - self.trUtf8("Select a form type:"), + self.tr("New Form"), + self.tr("Select a form type:"), self.templateTypes4, 0, False) if not ok or not selectedForm: @@ -559,9 +559,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("New Form"), + self.tr("New Form"), path, - self.trUtf8("Qt User-Interface Files (*.ui);;All Files (*)"), + self.tr("Qt User-Interface Files (*.ui);;All Files (*)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -578,8 +578,8 @@ if os.path.exists(fname): res = E5MessageBox.yesNo( self, - self.trUtf8("New Form"), - self.trUtf8("The file already exists! Overwrite it?"), + self.tr("New Form"), + self.tr("The file already exists! Overwrite it?"), icon=E5MessageBox.Warning) if not res: # user selected to not overwrite @@ -590,8 +590,8 @@ except IOError as e: E5MessageBox.critical( self, - self.trUtf8("New Form"), - self.trUtf8( + self.tr("New Form"), + self.tr( "<p>The new form file <b>{0}</b> could not be created.<br>" "Problem: {1}</p>").format(fname, str(e))) return @@ -617,8 +617,8 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete forms"), - self.trUtf8( + self.tr("Delete forms"), + self.tr( "Do you really want to delete these forms from the project?"), files) @@ -688,42 +688,42 @@ if not self.noDialog and not ui.notificationsEnabled(): E5MessageBox.information( self, - self.trUtf8("Form Compilation"), - self.trUtf8("The compilation of the form file" - " was successful.")) + self.tr("Form Compilation"), + self.tr("The compilation of the form file" + " was successful.")) else: ui.showNotification( UI.PixmapCache.getPixmap("designer48.png"), - self.trUtf8("Form Compilation"), - self.trUtf8("The compilation of the form file" - " was successful.")) + self.tr("Form Compilation"), + self.tr("The compilation of the form file" + " was successful.")) self.project.projectFormCompiled.emit(self.compiledFile) except IOError as msg: if not self.noDialog: E5MessageBox.information( self, - self.trUtf8("Form Compilation"), - self.trUtf8( + self.tr("Form Compilation"), + self.tr( "<p>The compilation of the form file failed.</p>" "<p>Reason: {0}</p>").format(str(msg))) else: ui.showNotification( UI.PixmapCache.getPixmap("designer48.png"), - self.trUtf8("Form Compilation"), - self.trUtf8( + self.tr("Form Compilation"), + self.tr( "<p>The compilation of the form file failed.</p>" "<p>Reason: {0}</p>").format(str(msg))) else: if not self.noDialog: E5MessageBox.information( self, - self.trUtf8("Form Compilation"), - self.trUtf8("The compilation of the form file failed.")) + self.tr("Form Compilation"), + self.tr("The compilation of the form file failed.")) else: ui.showNotification( UI.PixmapCache.getPixmap("designer48.png"), - self.trUtf8("Form Compilation"), - self.trUtf8("The compilation of the form file failed.")) + self.tr("Form Compilation"), + self.tr("The compilation of the form file failed.")) self.compileProc = None def __compileUI(self, fn, noDialog=False, progress=None): @@ -800,8 +800,8 @@ progress.cancel() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'Could not start {0}.<br>' 'Ensure that it is in the search path.' ).format(self.uicompiler)) @@ -853,9 +853,9 @@ else: numForms = len(self.project.pdata["FORMS"]) progress = E5ProgressDialog( - self.trUtf8("Compiling forms..."), - self.trUtf8("Abort"), 0, numForms, - self.trUtf8("%v/%m Forms"), self) + self.tr("Compiling forms..."), + self.tr("Abort"), 0, numForms, + self.tr("%v/%m Forms"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0 @@ -890,9 +890,9 @@ else: numForms = len(files) progress = E5ProgressDialog( - self.trUtf8("Compiling forms..."), - self.trUtf8("Abort"), 0, numForms, - self.trUtf8("%v/%m Forms"), self) + self.tr("Compiling forms..."), + self.tr("Abort"), 0, numForms, + self.tr("%v/%m Forms"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0 @@ -927,8 +927,8 @@ return progress = E5ProgressDialog( - self.trUtf8("Determining changed forms..."), - None, 0, 100, self.trUtf8("%v/%m Forms")) + self.tr("Determining changed forms..."), + None, 0, 100, self.tr("%v/%m Forms")) progress.setMinimumDuration(0) i = 0 @@ -955,7 +955,7 @@ if changedForms: progress.setLabelText( - self.trUtf8("Compiling changed forms...")) + self.tr("Compiling changed forms...")) progress.setMaximum(len(changedForms)) i = 0 progress.setValue(i)
--- a/Project/ProjectInterfacesBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectInterfacesBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -69,9 +69,9 @@ self.selectedItemsFilter = \ [ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem] - self.setWindowTitle(self.trUtf8('Interfaces (IDL)')) + self.setWindowTitle(self.tr('Interfaces (IDL)')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Interfaces Browser</b>""" """<p>This allows to easily see all interfaces (CORBA IDL files)""" """ contained in the current project. Several actions can be""" @@ -93,159 +93,159 @@ self.sourceMenu = QMenu(self) if self.omniidl is not None: self.sourceMenu.addAction( - self.trUtf8('Compile interface'), self.__compileInterface) + self.tr('Compile interface'), self.__compileInterface) self.sourceMenu.addAction( - self.trUtf8('Compile all interfaces'), + self.tr('Compile all interfaces'), self.__compileAllInterfaces) - self.sourceMenu.addAction(self.trUtf8('Open'), self._openItem) + self.sourceMenu.addAction(self.tr('Open'), self._openItem) self.sourceMenu.addSeparator() act = self.sourceMenu.addAction( - self.trUtf8('Rename file'), self._renameFile) + self.tr('Rename file'), self._renameFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) + self.tr('Add interfaces...'), self.__addInterfaceFiles) self.sourceMenu.addAction( - self.trUtf8('Add interfaces directory...'), + self.tr('Add interfaces directory...'), self.__addInterfacesDirectory) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.sourceMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.sourceMenu.addAction(self.tr('Configure...'), self._configure) self.sourceMenu.addAction( - self.trUtf8('Configure CORBA...'), self.__configureCorba) + self.tr('Configure CORBA...'), self.__configureCorba) self.menu = QMenu(self) if self.omniidl is not None: self.menu.addAction( - self.trUtf8('Compile interface'), self.__compileInterface) + self.tr('Compile interface'), self.__compileInterface) self.menu.addAction( - self.trUtf8('Compile all interfaces'), + self.tr('Compile all interfaces'), self.__compileAllInterfaces) - self.menu.addAction(self.trUtf8('Open'), self._openItem) + self.menu.addAction(self.tr('Open'), self._openItem) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) + self.tr('Add interfaces...'), self.__addInterfaceFiles) self.menu.addAction( - self.trUtf8('Add interfaces directory...'), + self.tr('Add interfaces directory...'), self.__addInterfacesDirectory) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) self.menu.addAction( - self.trUtf8('Configure CORBA...'), self.__configureCorba) + self.tr('Configure CORBA...'), self.__configureCorba) self.backMenu = QMenu(self) if self.omniidl is not None: self.backMenu.addAction( - self.trUtf8('Compile all interfaces'), + self.tr('Compile all interfaces'), self.__compileAllInterfaces) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Add interfaces...'), self.project.addIdlFiles) + self.tr('Add interfaces...'), self.project.addIdlFiles) self.backMenu.addAction( - self.trUtf8('Add interfaces directory...'), self.project.addIdlDir) + self.tr('Add interfaces directory...'), self.project.addIdlDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.addAction( - self.trUtf8('Configure CORBA...'), self.__configureCorba) + self.tr('Configure CORBA...'), self.__configureCorba) self.backMenu.setEnabled(False) # create the menu for multiple selected files self.multiMenu = QMenu(self) if self.omniidl is not None: self.multiMenu.addAction( - self.trUtf8('Compile interfaces'), + self.tr('Compile interfaces'), self.__compileSelectedInterfaces) - self.multiMenu.addAction(self.trUtf8('Open'), self._openItem) + self.multiMenu.addAction(self.tr('Open'), self._openItem) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.multiMenu.addAction( - self.trUtf8('Configure CORBA...'), self.__configureCorba) + self.tr('Configure CORBA...'), self.__configureCorba) self.dirMenu = QMenu(self) if self.omniidl is not None: self.dirMenu.addAction( - self.trUtf8('Compile all interfaces'), + self.tr('Compile all interfaces'), self.__compileAllInterfaces) self.dirMenu.addSeparator() act = self.dirMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.dirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Delete'), self._deleteDirectory) + self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Add interfaces...'), self.__addInterfaceFiles) + self.tr('Add interfaces...'), self.__addInterfaceFiles) self.dirMenu.addAction( - self.trUtf8('Add interfaces directory...'), + self.tr('Add interfaces directory...'), self.__addInterfacesDirectory) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu.addAction( - self.trUtf8('Configure CORBA...'), self.__configureCorba) + self.tr('Configure CORBA...'), self.__configureCorba) self.dirMultiMenu = QMenu(self) if self.omniidl is not None: self.dirMultiMenu.addAction( - self.trUtf8('Compile all interfaces'), + self.tr('Compile all interfaces'), self.__compileAllInterfaces) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Add interfaces...'), self.project.addIdlFiles) + self.tr('Add interfaces...'), self.project.addIdlFiles) self.dirMultiMenu.addAction( - self.trUtf8('Add interfaces directory...'), self.project.addIdlDir) + self.tr('Add interfaces directory...'), self.project.addIdlDir) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMultiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Configure...'), self._configure) - self.dirMultiMenu.addAction(self.trUtf8('Configure CORBA...'), + self.tr('Configure...'), self._configure) + self.dirMultiMenu.addAction(self.tr('Configure CORBA...'), self.__configureCorba) self.sourceMenu.aboutToShow.connect(self.__showContextMenu) @@ -418,9 +418,9 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete interfaces"), - self.trUtf8("Do you really want to delete these interfaces from" - " the project?"), + self.tr("Delete interfaces"), + self.tr("Do you really want to delete these interfaces from" + " the project?"), files) if dlg.exec_() == QDialog.Accepted: @@ -487,29 +487,29 @@ if not self.noDialog and not ui.notificationsEnabled(): E5MessageBox.information( self, - self.trUtf8("Interface Compilation"), - self.trUtf8( + self.tr("Interface Compilation"), + self.tr( "The compilation of the interface file was" " successful.")) else: ui.showNotification( UI.PixmapCache.getPixmap("corba48.png"), - self.trUtf8("Interface Compilation"), - self.trUtf8( + self.tr("Interface Compilation"), + self.tr( "The compilation of the interface file was" " successful.")) else: if not self.noDialog: E5MessageBox.information( self, - self.trUtf8("Interface Compilation"), - self.trUtf8( + self.tr("Interface Compilation"), + self.tr( "The compilation of the interface file failed.")) else: ui.showNotification( UI.PixmapCache.getPixmap("corba48.png"), - self.trUtf8("Interface Compilation"), - self.trUtf8( + self.tr("Interface Compilation"), + self.tr( "The compilation of the interface file failed.")) self.compileProc = None @@ -549,8 +549,8 @@ progress.cancel() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start {0}.<br>' 'Ensure that it is in the search path.</p>' ).format(self.omniidl)) @@ -573,9 +573,9 @@ if self.omniidl is not None: numIDLs = len(self.project.pdata["INTERFACES"]) progress = E5ProgressDialog( - self.trUtf8("Compiling interfaces..."), - self.trUtf8("Abort"), 0, numIDLs, - self.trUtf8("%v/%m Interfaces"), self) + self.tr("Compiling interfaces..."), + self.tr("Abort"), 0, numIDLs, + self.tr("%v/%m Interfaces"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0 @@ -607,9 +607,9 @@ for itm in items] numIDLs = len(files) progress = E5ProgressDialog( - self.trUtf8("Compiling interfaces..."), - self.trUtf8("Abort"), 0, numIDLs, - self.trUtf8("%v/%m Interfaces"), self) + self.tr("Compiling interfaces..."), + self.tr("Abort"), 0, numIDLs, + self.tr("%v/%m Interfaces"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0
--- a/Project/ProjectOthersBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectOthersBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -49,9 +49,9 @@ ProjectBrowserDirectoryItem] self.specialMenuEntries = [1] - self.setWindowTitle(self.trUtf8('Others')) + self.setWindowTitle(self.tr('Others')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Others Browser</b>""" """<p>This allows to easily see all other files and directories""" """ contained in the current project. Several actions can be""" @@ -69,62 +69,62 @@ ProjectBaseBrowser._createPopupMenus(self) self.editPixmapAct = self.menu.addAction( - self.trUtf8('Open in Icon Editor'), self._editPixmap) + self.tr('Open in Icon Editor'), self._editPixmap) self.menu.addSeparator() self.renameFileAct = self.menu.addAction( - self.trUtf8('Rename file'), self._renameFile) + self.tr('Rename file'), self._renameFile) self.menuActions.append(self.renameFileAct) act = self.menu.addAction( - self.trUtf8('Remove from project'), self.__removeItem) + self.tr('Remove from project'), self.__removeItem) self.menuActions.append(act) - act = self.menu.addAction(self.trUtf8('Delete'), self.__deleteItem) + act = self.menu.addAction(self.tr('Delete'), self.__deleteItem) self.menuActions.append(act) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Add files...'), self.project.addOthersFiles) + self.tr('Add files...'), self.project.addOthersFiles) self.menu.addAction( - self.trUtf8('Add directory...'), self.project.addOthersDir) + self.tr('Add directory...'), self.project.addOthersDir) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Refresh'), self.__refreshItem) + self.menu.addAction(self.tr('Refresh'), self.__refreshItem) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) 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('Add files...'), self.project.addOthersFiles) + self.tr('Add files...'), self.project.addOthersFiles) self.backMenu.addAction( - self.trUtf8('Add directory...'), self.project.addOthersDir) + self.tr('Add directory...'), self.project.addOthersDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.setEnabled(False) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self.__removeItem) + self.tr('Remove from project'), self.__removeItem) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteItem) + self.tr('Delete'), self.__deleteItem) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.menu.aboutToShow.connect(self.__showContextMenu) self.multiMenu.aboutToShow.connect(self.__showContextMenuMulti) @@ -293,8 +293,8 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete files/directories"), - self.trUtf8( + self.tr("Delete files/directories"), + self.tr( "Do you really want to delete these entries from the" " project?"), names)
--- a/Project/ProjectResourcesBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectResourcesBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -58,9 +58,9 @@ self.selectedItemsFilter = \ [ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem] - self.setWindowTitle(self.trUtf8('Resources')) + self.setWindowTitle(self.tr('Resources')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Resources Browser</b>""" """<p>This allows to easily see all resources contained in the""" """ current project. Several actions can be executed via the""" @@ -83,10 +83,10 @@ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: self.menu.addAction( - self.trUtf8('Compile resource'), + self.tr('Compile resource'), self.__compileResource) self.menu.addAction( - self.trUtf8('Compile all resources'), + self.tr('Compile all resources'), self.__compileAllResources) self.menu.addSeparator() else: @@ -94,89 +94,89 @@ self.menu.addAction( self.hooksMenuEntries.get( "compileResource", - self.trUtf8('Compile resource')), + self.tr('Compile resource')), self.__compileResource) if self.hooks["compileAllResources"] is not None: self.menu.addAction( self.hooksMenuEntries.get( "compileAllResources", - self.trUtf8('Compile all resources')), + self.tr('Compile all resources')), self.__compileAllResources) if self.hooks["compileResource"] is not None or \ self.hooks["compileAllResources"] is not None: self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Open'), self.__openFile) + self.menu.addAction(self.tr('Open'), self.__openFile) self.menu.addSeparator() - act = self.menu.addAction(self.trUtf8('Rename file'), self._renameFile) + act = self.menu.addAction(self.tr('Rename file'), self._renameFile) self.menuActions.append(act) act = self.menu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.menuActions.append(act) - act = self.menu.addAction(self.trUtf8('Delete'), self.__deleteFile) + act = self.menu.addAction(self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.menu.addSeparator() if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: self.menu.addAction( - self.trUtf8('New resource...'), self.__newResource) + self.tr('New resource...'), self.__newResource) else: if self.hooks["newResource"] is not None: self.menu.addAction( self.hooksMenuEntries.get( "newResource", - self.trUtf8('New resource...')), self.__newResource) + self.tr('New resource...')), self.__newResource) self.menu.addAction( - self.trUtf8('Add resources...'), self.__addResourceFiles) + self.tr('Add resources...'), self.__addResourceFiles) self.menu.addAction( - self.trUtf8('Add resources directory...'), + self.tr('Add resources directory...'), self.__addResourcesDirectory) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) self.backMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: self.backMenu.addAction( - self.trUtf8('Compile all resources'), + self.tr('Compile all resources'), self.__compileAllResources) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('New resource...'), self.__newResource) + self.tr('New resource...'), self.__newResource) else: if self.hooks["compileAllResources"] is not None: self.backMenu.addAction( self.hooksMenuEntries.get( "compileAllResources", - self.trUtf8('Compile all resources')), + self.tr('Compile all resources')), self.__compileAllResources) self.backMenu.addSeparator() if self.hooks["newResource"] is not None: self.backMenu.addAction( self.hooksMenuEntries.get( "newResource", - self.trUtf8('New resource...')), self.__newResource) + self.tr('New resource...')), self.__newResource) self.backMenu.addAction( - self.trUtf8('Add resources...'), self.project.addResourceFiles) + self.tr('Add resources...'), self.project.addResourceFiles) self.backMenu.addAction( - self.trUtf8('Add resources directory...'), + self.tr('Add resources directory...'), self.project.addResourceDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.setEnabled(False) # create the menu for multiple selected files @@ -185,7 +185,7 @@ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: act = self.multiMenu.addAction( - self.trUtf8('Compile resources'), + self.tr('Compile resources'), self.__compileSelectedResources) self.multiMenu.addSeparator() else: @@ -193,31 +193,31 @@ act = self.multiMenu.addAction( self.hooksMenuEntries.get( "compileSelectedResources", - self.trUtf8('Compile resources')), + self.tr('Compile resources')), self.__compileSelectedResources) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Open'), self.__openFile) + self.multiMenu.addAction(self.tr('Open'), self.__openFile) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: self.dirMenu.addAction( - self.trUtf8('Compile all resources'), + self.tr('Compile all resources'), self.__compileAllResources) self.dirMenu.addSeparator() else: @@ -225,40 +225,40 @@ self.dirMenu.addAction( self.hooksMenuEntries.get( "compileAllResources", - self.trUtf8('Compile all resources')), + self.tr('Compile all resources')), self.__compileAllResources) self.dirMenu.addSeparator() act = self.dirMenu.addAction( - self.trUtf8('Remove from project'), self._removeDir) + self.tr('Remove from project'), self._removeDir) self.dirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Delete'), self._deleteDirectory) + self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('New resource...'), self.__newResource) + self.tr('New resource...'), self.__newResource) self.dirMenu.addAction( - self.trUtf8('Add resources...'), self.__addResourceFiles) + self.tr('Add resources...'), self.__addResourceFiles) self.dirMenu.addAction( - self.trUtf8('Add resources directory...'), + self.tr('Add resources directory...'), self.__addResourcesDirectory) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: self.dirMultiMenu.addAction( - self.trUtf8('Compile all resources'), + self.tr('Compile all resources'), self.__compileAllResources) self.dirMultiMenu.addSeparator() else: @@ -266,23 +266,23 @@ self.dirMultiMenu.addAction( self.hooksMenuEntries.get( "compileAllResources", - self.trUtf8('Compile all resources')), + self.tr('Compile all resources')), self.__compileAllResources) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Add resources...'), + self.tr('Add resources...'), self.project.addResourceFiles) self.dirMultiMenu.addAction( - self.trUtf8('Add resources directory...'), + self.tr('Add resources directory...'), self.project.addResourceDir) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMultiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.menu.aboutToShow.connect(self.__showContextMenu) self.multiMenu.aboutToShow.connect(self.__showContextMenuMulti) @@ -437,9 +437,9 @@ else: fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("New Resource"), + self.tr("New Resource"), path, - self.trUtf8("Qt Resource Files (*.qrc)"), + self.tr("Qt Resource Files (*.qrc)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -456,8 +456,8 @@ if os.path.exists(fname): res = E5MessageBox.yesNo( self, - self.trUtf8("New Resource"), - self.trUtf8("The file already exists! Overwrite it?"), + self.tr("New Resource"), + self.tr("The file already exists! Overwrite it?"), icon=E5MessageBox.Warning) if not res: # user selected to not overwrite @@ -478,8 +478,8 @@ except IOError as e: E5MessageBox.critical( self, - self.trUtf8("New Resource"), - self.trUtf8( + self.tr("New Resource"), + self.tr( "<p>The new resource file <b>{0}</b> could not" " be created.<br>Problem: {1}</p>") .format(fname, str(e))) @@ -506,8 +506,8 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete resources"), - self.trUtf8( + self.tr("Delete resources"), + self.tr( "Do you really want to delete these resources from the" " project?"), files) @@ -579,35 +579,35 @@ if not self.noDialog and not ui.notificationsEnabled(): E5MessageBox.information( self, - self.trUtf8("Resource Compilation"), - self.trUtf8("The compilation of the resource file" - " was successful.")) + self.tr("Resource Compilation"), + self.tr("The compilation of the resource file" + " was successful.")) else: ui.showNotification( UI.PixmapCache.getPixmap("resourcesCompiler48.png"), - self.trUtf8("Resource Compilation"), - self.trUtf8("The compilation of the resource file" - " was successful.")) + self.tr("Resource Compilation"), + self.tr("The compilation of the resource file" + " was successful.")) except IOError as msg: if not self.noDialog: E5MessageBox.information( self, - self.trUtf8("Resource Compilation"), - self.trUtf8( + self.tr("Resource Compilation"), + self.tr( "<p>The compilation of the resource file" " failed.</p><p>Reason: {0}</p>").format(str(msg))) else: if not self.noDialog: E5MessageBox.information( self, - self.trUtf8("Resource Compilation"), - self.trUtf8( + self.tr("Resource Compilation"), + self.tr( "The compilation of the resource file failed.")) else: ui.showNotification( UI.PixmapCache.getPixmap("resourcesCompiler48.png"), - self.trUtf8("Resource Compilation"), - self.trUtf8( + self.tr("Resource Compilation"), + self.tr( "The compilation of the resource file failed.")) self.compileProc = None @@ -692,8 +692,8 @@ progress.cancel() E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'Could not start {0}.<br>' 'Ensure that it is in the search path.' ).format(self.rccCompiler)) @@ -720,9 +720,9 @@ else: numResources = len(self.project.pdata["RESOURCES"]) progress = E5ProgressDialog( - self.trUtf8("Compiling resources..."), - self.trUtf8("Abort"), 0, numResources, - self.trUtf8("%v/%m Resources"), self) + self.tr("Compiling resources..."), + self.tr("Abort"), 0, numResources, + self.tr("%v/%m Resources"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0 @@ -756,9 +756,9 @@ else: numResources = len(files) progress = E5ProgressDialog( - self.trUtf8("Compiling resources..."), - self.trUtf8("Abort"), 0, numResources, - self.trUtf8("%v/%m Resources"), self) + self.tr("Compiling resources..."), + self.tr("Abort"), 0, numResources, + self.tr("%v/%m Resources"), self) progress.setModal(True) progress.setMinimumDuration(0) i = 0 @@ -826,8 +826,8 @@ self.project.pdata["RESOURCES"]) else: progress = E5ProgressDialog( - self.trUtf8("Determining changed resources..."), - None, 0, 100, self.trUtf8("%v/%m Resources")) + self.tr("Determining changed resources..."), + None, 0, 100, self.tr("%v/%m Resources")) progress.setMinimumDuration(0) i = 0 @@ -860,7 +860,7 @@ if changedResources: progress.setLabelText( - self.trUtf8("Compiling changed resources...")) + self.tr("Compiling changed resources...")) progress.setMaximum(len(changedResources)) i = 0 progress.setValue(i)
--- a/Project/ProjectSourcesBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectSourcesBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -55,9 +55,9 @@ self.selectedItemsFilter = \ [ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem] - self.setWindowTitle(self.trUtf8('Sources')) + self.setWindowTitle(self.tr('Sources')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Sources Browser</b>""" """<p>This allows to easily see all sources contained in the""" """ current project. Several actions can be executed via the""" @@ -113,53 +113,53 @@ """ Privat method to generate the popup menus for a Python project. """ - self.checksMenu = QMenu(self.trUtf8('Check')) + self.checksMenu = QMenu(self.tr('Check')) self.checksMenu.aboutToShow.connect(self.__showContextMenuCheck) - self.menuShow = QMenu(self.trUtf8('Show')) + self.menuShow = QMenu(self.tr('Show')) self.menuShow.addAction( - self.trUtf8('Code metrics...'), self.__showCodeMetrics) + self.tr('Code metrics...'), self.__showCodeMetrics) self.coverageMenuAction = self.menuShow.addAction( - self.trUtf8('Code coverage...'), self.__showCodeCoverage) + self.tr('Code coverage...'), self.__showCodeCoverage) self.profileMenuAction = self.menuShow.addAction( - self.trUtf8('Profile data...'), self.__showProfileData) + self.tr('Profile data...'), self.__showProfileData) self.menuShow.aboutToShow.connect(self.__showContextMenuShow) - self.graphicsMenu = QMenu(self.trUtf8('Diagrams')) + self.graphicsMenu = QMenu(self.tr('Diagrams')) self.classDiagramAction = self.graphicsMenu.addAction( - self.trUtf8("Class Diagram..."), self.__showClassDiagram) + self.tr("Class Diagram..."), self.__showClassDiagram) self.graphicsMenu.addAction( - self.trUtf8("Package Diagram..."), self.__showPackageDiagram) + self.tr("Package Diagram..."), self.__showPackageDiagram) self.importsDiagramAction = self.graphicsMenu.addAction( - self.trUtf8("Imports Diagram..."), self.__showImportsDiagram) + self.tr("Imports Diagram..."), self.__showImportsDiagram) self.graphicsMenu.addAction( - self.trUtf8("Application Diagram..."), + self.tr("Application Diagram..."), self.__showApplicationDiagram) self.graphicsMenu.addSeparator() self.graphicsMenu.addAction( UI.PixmapCache.getIcon("open.png"), - self.trUtf8("Load Diagram..."), self.__loadDiagram) + self.tr("Load Diagram..."), self.__loadDiagram) self.graphicsMenu.aboutToShow.connect(self.__showContextMenuGraphics) self.unittestAction = self.sourceMenu.addAction( - self.trUtf8('Run unittest...'), self.handleUnittest) + self.tr('Run unittest...'), self.handleUnittest) self.sourceMenu.addSeparator() act = self.sourceMenu.addAction( - self.trUtf8('Rename file'), self._renameFile) + self.tr('Rename file'), self._renameFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.sourceMenu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.sourceMenu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.sourceMenu.addSeparator() act = self.sourceMenu.addMenu(self.graphicsMenu) self.sourceMenu.addSeparator() @@ -168,32 +168,32 @@ self.sourceMenuActions["Show"] = self.sourceMenu.addMenu(self.menuShow) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.sourceMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.sourceMenu.addAction(self.tr('Configure...'), self._configure) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.menu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.menu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) # create the attribute menu - self.gotoMenu = QMenu(self.trUtf8("Goto"), self) + self.gotoMenu = QMenu(self.tr("Goto"), self) self.gotoMenu.aboutToShow.connect(self._showGotoMenu) self.gotoMenu.triggered.connect(self._gotoAttribute) @@ -201,88 +201,88 @@ self.attributeMenu.addMenu(self.gotoMenu) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.attributeMenu.addAction( - self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.tr('Add source files...'), self.project.addSourceFiles) self.attributeMenu.addAction( - self.trUtf8('Add source directory...'), self.project.addSourceDir) + self.tr('Add source directory...'), self.project.addSourceDir) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.attributeMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.backMenu = QMenu(self) self.backMenu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.backMenu.addAction( - self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.tr('Add source files...'), self.project.addSourceFiles) self.backMenu.addAction( - self.trUtf8('Add source directory...'), self.project.addSourceDir) + self.tr('Add source directory...'), self.project.addSourceDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.setEnabled(False) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) act = self.dirMenu.addAction( - self.trUtf8('Remove from project'), self._removeDir) + self.tr('Remove from project'), self._removeDir) self.dirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Delete'), self._deleteDirectory) + self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.dirMenu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.dirMenu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.dirMenu.addSeparator() act = self.dirMenu.addMenu(self.graphicsMenu) self.dirMenu.addSeparator() self.dirMenu.addMenu(self.checksMenu) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) self.dirMultiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMultiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.sourceMenu.aboutToShow.connect(self.__showContextMenu) self.multiMenu.aboutToShow.connect(self.__showContextMenuMulti) @@ -295,59 +295,59 @@ """ Privat method to generate the popup menus for a Ruby project. """ - self.graphicsMenu = QMenu(self.trUtf8('Diagrams')) + self.graphicsMenu = QMenu(self.tr('Diagrams')) self.classDiagramAction = self.graphicsMenu.addAction( - self.trUtf8("Class Diagram..."), self.__showClassDiagram) + self.tr("Class Diagram..."), self.__showClassDiagram) self.graphicsMenu.addAction( - self.trUtf8("Package Diagram..."), self.__showPackageDiagram) + self.tr("Package Diagram..."), self.__showPackageDiagram) self.graphicsMenu.addAction( - self.trUtf8("Application Diagram..."), + self.tr("Application Diagram..."), self.__showApplicationDiagram) self.graphicsMenu.addSeparator() self.graphicsMenu.addAction( UI.PixmapCache.getIcon("fileOpen.png"), - self.trUtf8("Load Diagram..."), self.__loadDiagram) + self.tr("Load Diagram..."), self.__loadDiagram) self.sourceMenu.addSeparator() act = self.sourceMenu.addAction( - self.trUtf8('Rename file'), self._renameFile) + self.tr('Rename file'), self._renameFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.menuActions.append(act) act = self.sourceMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.menuActions.append(act) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.sourceMenu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.sourceMenu.addSeparator() act = self.sourceMenu.addMenu(self.graphicsMenu) self.sourceMenu.addSeparator() self.sourceMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.sourceMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.sourceMenu.addSeparator() - self.sourceMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.sourceMenu.addAction(self.tr('Configure...'), self._configure) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.menu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.menu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) # create the attribute menu - self.gotoMenu = QMenu(self.trUtf8("Goto"), self) + self.gotoMenu = QMenu(self.tr("Goto"), self) self.gotoMenu.aboutToShow.connect(self._showGotoMenu) self.gotoMenu.triggered.connect(self._gotoAttribute) @@ -355,76 +355,76 @@ self.attributeMenu.addMenu(self.gotoMenu) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('New package...'), self.__addNewPackage) + self.tr('New package...'), self.__addNewPackage) self.attributeMenu.addAction( - self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.tr('Add source files...'), self.project.addSourceFiles) self.attributeMenu.addAction( - self.trUtf8('Add source directory...'), self.project.addSourceDir) + self.tr('Add source directory...'), self.project.addSourceDir) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.attributeMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.attributeMenu.addSeparator() self.attributeMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.backMenu = QMenu(self) self.backMenu.addAction( - self.trUtf8('Add source files...'), self.project.addSourceFiles) + self.tr('Add source files...'), self.project.addSourceFiles) self.backMenu.addAction( - self.trUtf8('Add source directory...'), self.project.addSourceDir) + self.tr('Add source directory...'), self.project.addSourceDir) self.backMenu.addSeparator() self.backMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.backMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.backMenu.setEnabled(False) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self._removeFile) + self.tr('Remove from project'), self._removeFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteFile) + self.tr('Delete'), self.__deleteFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() self.multiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.multiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) act = self.dirMenu.addAction( - self.trUtf8('Remove from project'), self._removeDir) + self.tr('Remove from project'), self._removeDir) self.dirMenuActions.append(act) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Add source files...'), self.__addSourceFiles) + self.tr('Add source files...'), self.__addSourceFiles) self.dirMenu.addAction( - self.trUtf8('Add source directory...'), self.__addSourceDirectory) + self.tr('Add source directory...'), self.__addSourceDirectory) self.dirMenu.addSeparator() act = self.dirMenu.addMenu(self.graphicsMenu) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = QMenu(self) self.dirMultiMenu.addAction( - self.trUtf8('Expand all directories'), self._expandAllDirs) + self.tr('Expand all directories'), self._expandAllDirs) self.dirMultiMenu.addAction( - self.trUtf8('Collapse all directories'), self._collapseAllDirs) + self.tr('Collapse all directories'), self._collapseAllDirs) self.dirMultiMenu.addSeparator() self.dirMultiMenu.addAction( - self.trUtf8('Configure...'), self._configure) + self.tr('Configure...'), self._configure) self.sourceMenu.aboutToShow.connect(self.__showContextMenu) self.multiMenu.aboutToShow.connect(self.__showContextMenuMulti) @@ -663,8 +663,8 @@ except OSError as err: E5MessageBox.critical( self, - self.trUtf8("Add new Python package"), - self.trUtf8( + self.tr("Add new Python package"), + self.tr( """<p>The package directory <b>{0}</b> could""" """ not be created. Aborting...</p>""" """<p>Reason: {1}</p>""") @@ -678,8 +678,8 @@ except IOError as err: E5MessageBox.critical( self, - self.trUtf8("Add new Python package"), - self.trUtf8( + self.tr("Add new Python package"), + self.tr( """<p>The package file <b>{0}</b> could""" """ not be created. Aborting...</p>""" """<p>Reason: {1}</p>""") @@ -739,8 +739,8 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete files"), - self.trUtf8( + self.tr("Delete files"), + self.tr( "Do you really want to delete these files from the project?"), files) @@ -813,8 +813,8 @@ if len(files) > 1: pfn, ok = QInputDialog.getItem( None, - self.trUtf8("Code Coverage"), - self.trUtf8("Please select a coverage file"), + self.tr("Code Coverage"), + self.tr("Please select a coverage file"), files, 0, False) if not ok: @@ -867,8 +867,8 @@ if len(files) > 1: pfn, ok = QInputDialog.getItem( None, - self.trUtf8("Profile Data"), - self.trUtf8("Please select a profile file"), + self.tr("Profile Data"), + self.tr("Please select a profile file"), files, 0, False) if not ok: @@ -904,8 +904,8 @@ fn = itm.dirName() res = E5MessageBox.yesNo( self, - self.trUtf8("Class Diagram"), - self.trUtf8("""Include class attributes?"""), + self.tr("Class Diagram"), + self.tr("""Include class attributes?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog self.classDiagram = UMLDialog(UMLDialog.ClassDiagram, self.project, fn, @@ -924,8 +924,8 @@ package = os.path.isdir(fn) and fn or os.path.dirname(fn) res = E5MessageBox.yesNo( self, - self.trUtf8("Imports Diagram"), - self.trUtf8("""Include imports from external modules?""")) + self.tr("Imports Diagram"), + self.tr("""Include imports from external modules?""")) from Graphics.UMLDialog import UMLDialog self.importsDiagram = UMLDialog( UMLDialog.ImportsDiagram, self.project, package, @@ -944,8 +944,8 @@ package = os.path.isdir(fn) and fn or os.path.dirname(fn) res = E5MessageBox.yesNo( self, - self.trUtf8("Package Diagram"), - self.trUtf8("""Include class attributes?"""), + self.tr("Package Diagram"), + self.tr("""Include class attributes?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog self.packageDiagram = UMLDialog( @@ -959,8 +959,8 @@ """ res = E5MessageBox.yesNo( self, - self.trUtf8("Application Diagram"), - self.trUtf8("""Include module names?"""), + self.tr("Application Diagram"), + self.tr("""Include module names?"""), yesDefault=True) from Graphics.UMLDialog import UMLDialog self.applicationDiagram = UMLDialog(
--- a/Project/ProjectTranslationsBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/ProjectTranslationsBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -65,9 +65,9 @@ self.selectedItemsFilter = \ [ProjectBrowserFileItem, ProjectBrowserSimpleDirectoryItem] - self.setWindowTitle(self.trUtf8('Translations')) + self.setWindowTitle(self.tr('Translations')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>Project Translations Browser</b>""" """<p>This allows to easily see all translations contained in""" """ the current project. Several actions can be executed via""" @@ -110,49 +110,49 @@ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: act = self.menu.addAction( - self.trUtf8('Generate translation'), self.__generateSelected) + self.tr('Generate translation'), self.__generateSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Generate translation (with obsolete)'), + self.tr('Generate translation (with obsolete)'), self.__generateObsoleteSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Generate all translations'), self.__generateAll) + self.tr('Generate all translations'), self.__generateAll) self.tsprocMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Generate all translations (with obsolete)'), + self.tr('Generate all translations (with obsolete)'), self.__generateObsoleteAll) self.tsprocMenuActions.append(act) self.menu.addSeparator() act = self.menu.addAction( - self.trUtf8('Open in Qt-Linguist'), self._openItem) + self.tr('Open in Qt-Linguist'), self._openItem) self.tsMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.tsMenuActions.append(act) self.menu.addSeparator() act = self.menu.addAction( - self.trUtf8('Release translation'), self.__releaseSelected) + self.tr('Release translation'), self.__releaseSelected) self.tsMenuActions.append(act) self.qmprocMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Release all translations'), self.__releaseAll) + self.tr('Release all translations'), self.__releaseAll) self.qmprocMenuActions.append(act) self.menu.addSeparator() act = self.menu.addAction( - self.trUtf8('Preview translation'), self.__TRPreview) + self.tr('Preview translation'), self.__TRPreview) self.qmMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Preview all translations'), self.__TRPreviewAll) + self.tr('Preview all translations'), self.__TRPreviewAll) self.menu.addSeparator() else: if self.hooks["extractMessages"] is not None: act = self.menu.addAction( self.hooksMenuEntries.get( "extractMessages", - self.trUtf8('Extract messages')), + self.tr('Extract messages')), self.__extractMessages) self.menuActions.append(act) self.menu.addSeparator() @@ -160,7 +160,7 @@ act = self.menu.addAction( self.hooksMenuEntries.get( "generateSelected", - self.trUtf8('Generate translation')), + self.tr('Generate translation')), self.__generateSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) @@ -168,7 +168,7 @@ act = self.menu.addAction( self.hooksMenuEntries.get( "generateSelectedWithObsolete", - self.trUtf8('Generate translation (with obsolete)')), + self.tr('Generate translation (with obsolete)')), self.__generateObsoleteSelected) self.tsMenuActions.append(act) self.tsprocMenuActions.append(act) @@ -176,14 +176,14 @@ act = self.menu.addAction( self.hooksMenuEntries.get( "generateAll", - self.trUtf8('Generate all translations')), + self.tr('Generate all translations')), self.__generateAll) self.tsprocMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.menu.addAction( self.hooksMenuEntries.get( "generateAllWithObsolete", - self.trUtf8( + self.tr( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) self.tsprocMenuActions.append(act) @@ -191,18 +191,18 @@ if self.hooks["open"] is not None: act = self.menu.addAction( self.hooksMenuEntries.get( - "open", self.trUtf8('Open')), + "open", self.tr('Open')), self._openItem) self.tsMenuActions.append(act) act = self.menu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.tsMenuActions.append(act) self.menu.addSeparator() if self.hooks["releaseSelected"] is not None: act = self.menu.addAction( self.hooksMenuEntries.get( "releaseSelected", - self.trUtf8('Release translation')), + self.tr('Release translation')), self.__releaseSelected) self.tsMenuActions.append(act) self.qmprocMenuActions.append(act) @@ -210,68 +210,68 @@ act = self.menu.addAction( self.hooksMenuEntries.get( "releaseAll", - self.trUtf8('Release all translations')), + self.tr('Release all translations')), self.__releaseAll) self.qmprocMenuActions.append(act) self.menu.addSeparator() act = self.menu.addAction( - self.trUtf8('Remove from project'), self.__removeLanguageFile) + self.tr('Remove from project'), self.__removeLanguageFile) self.menuActions.append(act) act = self.menu.addAction( - self.trUtf8('Delete'), self.__deleteLanguageFile) + self.tr('Delete'), self.__deleteLanguageFile) self.menuActions.append(act) self.menu.addSeparator() self.__addTranslationAct = self.menu.addAction( - self.trUtf8('Add translation...'), self.project.addLanguage) + self.tr('Add translation...'), self.project.addLanguage) self.menu.addAction( - self.trUtf8('Add translation files...'), + self.tr('Add translation files...'), self.__addTranslationFiles) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Configure...'), self._configure) + self.menu.addAction(self.tr('Configure...'), self._configure) self.backMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: act = self.backMenu.addAction( - self.trUtf8('Generate all translations'), + self.tr('Generate all translations'), self.__generateAll) self.tsprocBackMenuActions.append(act) act = self.backMenu.addAction( - self.trUtf8('Generate all translations (with obsolete)'), + self.tr('Generate all translations (with obsolete)'), self.__generateObsoleteAll) self.tsprocBackMenuActions.append(act) act = self.backMenu.addAction( - self.trUtf8('Release all translations'), + self.tr('Release all translations'), self.__releaseAll) self.qmprocBackMenuActions.append(act) self.backMenu.addSeparator() act = self.backMenu.addAction( - self.trUtf8('Preview all translations'), + self.tr('Preview all translations'), self.__TRPreview) else: if self.hooks["extractMessages"] is not None: act = self.backMenu.addAction( self.hooksMenuEntries.get( "extractMessages", - self.trUtf8('Extract messages')), + self.tr('Extract messages')), self.__extractMessages) self.backMenu.addSeparator() if self.hooks["generateAll"] is not None: act = self.backMenu.addAction( self.hooksMenuEntries.get( "generateAll", - self.trUtf8('Generate all translations')), + self.tr('Generate all translations')), self.__generateAll) self.tsprocBackMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.backMenu.addAction( self.hooksMenuEntries.get( "generateAllWithObsolete", - self.trUtf8( + self.tr( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) self.tsprocBackMenuActions.append(act) @@ -279,17 +279,17 @@ act = self.backMenu.addAction( self.hooksMenuEntries.get( "releaseAll", - self.trUtf8('Release all translations')), + self.tr('Release all translations')), self.__releaseAll) self.qmprocBackMenuActions.append(act) self.backMenu.addSeparator() self.__addTranslationBackAct = self.backMenu.addAction( - self.trUtf8('Add translation...'), self.project.addLanguage) + self.tr('Add translation...'), self.project.addLanguage) self.backMenu.addAction( - self.trUtf8('Add translation files...'), + self.tr('Add translation files...'), self.__addTranslationFiles) self.backMenu.addSeparator() - self.backMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.backMenu.addAction(self.tr('Configure...'), self._configure) self.backMenu.setEnabled(False) # create the menu for multiple selected files @@ -298,37 +298,37 @@ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: act = self.multiMenu.addAction( - self.trUtf8('Generate translations'), + self.tr('Generate translations'), self.__generateSelected) self.tsMultiMenuActions.append(act) self.tsprocMultiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Generate translations (with obsolete)'), + self.tr('Generate translations (with obsolete)'), self.__generateObsoleteSelected) self.tsMultiMenuActions.append(act) self.tsprocMultiMenuActions.append(act) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Open in Qt-Linguist'), self._openItem) + self.tr('Open in Qt-Linguist'), self._openItem) self.tsMultiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.tsMultiMenuActions.append(act) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Release translations'), self.__releaseSelected) + self.tr('Release translations'), self.__releaseSelected) self.tsMultiMenuActions.append(act) self.qmprocMultiMenuActions.append(act) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Preview translations'), self.__TRPreview) + self.tr('Preview translations'), self.__TRPreview) self.qmMultiMenuActions.append(act) else: if self.hooks["extractMessages"] is not None: act = self.multiMenu.addAction( self.hooksMenuEntries.get( "extractMessages", - self.trUtf8('Extract messages')), + self.tr('Extract messages')), self.__extractMessages) self.multiMenuActions.append(act) self.multiMenu.addSeparator() @@ -336,7 +336,7 @@ act = self.multiMenu.addAction( self.hooksMenuEntries.get( "generateSelected", - self.trUtf8('Generate translations')), + self.tr('Generate translations')), self.__generateSelected) self.tsMultiMenuActions.append(act) self.tsprocMultiMenuActions.append(act) @@ -344,7 +344,7 @@ act = self.multiMenu.addAction( self.hooksMenuEntries.get( "generateSelectedWithObsolete", - self.trUtf8('Generate translations (with obsolete)')), + self.tr('Generate translations (with obsolete)')), self.__generateObsoleteSelected) self.tsMultiMenuActions.append(act) self.tsprocMultiMenuActions.append(act) @@ -352,57 +352,57 @@ if self.hooks["open"] is not None: act = self.multiMenu.addAction( self.hooksMenuEntries.get( - "open", self.trUtf8('Open')), + "open", self.tr('Open')), self._openItem) self.tsMultiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Open in Editor'), self.__openFileInEditor) + self.tr('Open in Editor'), self.__openFileInEditor) self.tsMultiMenuActions.append(act) self.multiMenu.addSeparator() if self.hooks["releaseSelected"] is not None: act = self.multiMenu.addAction( self.hooksMenuEntries.get( "releaseSelected", - self.trUtf8('Release translations')), + self.tr('Release translations')), self.__releaseSelected) self.tsMultiMenuActions.append(act) self.qmprocMultiMenuActions.append(act) self.multiMenu.addSeparator() act = self.multiMenu.addAction( - self.trUtf8('Remove from project'), self.__removeLanguageFile) + self.tr('Remove from project'), self.__removeLanguageFile) self.multiMenuActions.append(act) act = self.multiMenu.addAction( - self.trUtf8('Delete'), self.__deleteLanguageFile) + self.tr('Delete'), self.__deleteLanguageFile) self.multiMenuActions.append(act) self.multiMenu.addSeparator() - self.multiMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.multiMenu.addAction(self.tr('Configure...'), self._configure) self.dirMenu = QMenu(self) if self.project.getProjectType() in \ ["Qt4", "Qt4C", "PyQt5", "PyQt5C", "E4Plugin", "PySide", "PySideC"]: act = self.dirMenu.addAction( - self.trUtf8('Generate all translations'), + self.tr('Generate all translations'), self.__generateAll) self.tsprocDirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Generate all translations (with obsolete)'), + self.tr('Generate all translations (with obsolete)'), self.__generateObsoleteAll) self.tsprocDirMenuActions.append(act) act = self.dirMenu.addAction( - self.trUtf8('Release all translations'), + self.tr('Release all translations'), self.__releaseAll) self.qmprocDirMenuActions.append(act) self.dirMenu.addSeparator() act = self.dirMenu.addAction( - self.trUtf8('Preview all translations'), + self.tr('Preview all translations'), self.__TRPreview) else: if self.hooks["extractMessages"] is not None: act = self.dirMenu.addAction( self.hooksMenuEntries.get( "extractMessages", - self.trUtf8('Extract messages')), + self.tr('Extract messages')), self.__extractMessages) self.dirMenuActions.append(act) self.dirMenu.addSeparator() @@ -410,14 +410,14 @@ act = self.dirMenu.addAction( self.hooksMenuEntries.get( "generateAll", - self.trUtf8('Generate all translations')), + self.tr('Generate all translations')), self.__generateAll) self.tsprocDirMenuActions.append(act) if self.hooks["generateAllWithObsolete"] is not None: act = self.dirMenu.addAction( self.hooksMenuEntries.get( "generateAllWithObsolete", - self.trUtf8( + self.tr( 'Generate all translations (with obsolete)')), self.__generateObsoleteAll) self.tsprocDirMenuActions.append(act) @@ -425,24 +425,24 @@ act = self.dirMenu.addAction( self.hooksMenuEntries.get( "releaseAll", - self.trUtf8('Release all translations')), + self.tr('Release all translations')), self.__releaseAll) self.qmprocDirMenuActions.append(act) self.dirMenu.addSeparator() act = self.dirMenu.addAction( - self.trUtf8('Delete'), self._deleteDirectory) + self.tr('Delete'), self._deleteDirectory) self.dirMenuActions.append(act) self.dirMenu.addSeparator() self.__addTranslationDirAct = self.dirMenu.addAction( - self.trUtf8('Add translation...'), self.project.addLanguage) + self.tr('Add translation...'), self.project.addLanguage) self.dirMenu.addAction( - self.trUtf8('Add translation files...'), + self.tr('Add translation files...'), self.__addTranslationFiles) self.dirMenu.addSeparator() self.dirMenu.addAction( - self.trUtf8('Copy Path to Clipboard'), self._copyToClipboard) + self.tr('Copy Path to Clipboard'), self._copyToClipboard) self.dirMenu.addSeparator() - self.dirMenu.addAction(self.trUtf8('Configure...'), self._configure) + self.dirMenu.addAction(self.tr('Configure...'), self._configure) self.dirMultiMenu = None @@ -675,9 +675,9 @@ DeleteFilesConfirmationDialog dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Delete translation files"), - self.trUtf8("Do you really want to delete these translation files" - " from the project?"), + self.tr("Delete translation files"), + self.tr("Do you really want to delete these translation files" + " from the project?"), translationFiles) if dlg.exec_() == QDialog.Accepted: @@ -778,8 +778,8 @@ if not langs: E5MessageBox.warning( self, - self.trUtf8("Write temporary project file"), - self.trUtf8("""No translation files (*.ts) selected.""")) + self.tr("Write temporary project file"), + self.tr("""No translation files (*.ts) selected.""")) return False # create a prefix relative from the *.ts down to the project path @@ -827,8 +827,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Write temporary project file"), - self.trUtf8( + self.tr("Write temporary project file"), + self.tr( "<p>The temporary project file <b>{0}</b> could not" " be written.</p>").format(outFile)) @@ -936,22 +936,22 @@ if ui.notificationsEnabled(): ui.showNotification( UI.PixmapCache.getPixmap("linguist48.png"), - self.trUtf8("Translation file generation"), - self.trUtf8( + self.tr("Translation file generation"), + self.tr( "The generation of the translation files (*.ts)" " was successful.")) else: E5MessageBox.information( self, - self.trUtf8("Translation file generation"), - self.trUtf8( + self.tr("Translation file generation"), + self.tr( "The generation of the translation files (*.ts)" " was successful.")) else: E5MessageBox.critical( self, - self.trUtf8("Translation file generation"), - self.trUtf8( + self.tr("Translation file generation"), + self.tr( "The generation of the translation files (*.ts) has" " failed.")) @@ -1058,8 +1058,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'Could not start {0}.<br>' 'Ensure that it is in the search path.' ).format(self.pylupdate)) @@ -1121,15 +1121,15 @@ if ui.notificationsEnabled(): ui.showNotification( UI.PixmapCache.getPixmap("linguist48.png"), - self.trUtf8("Translation file release"), - self.trUtf8("The release of the translation files (*.qm)" - " was successful.")) + self.tr("Translation file release"), + self.tr("The release of the translation files (*.qm)" + " was successful.")) else: E5MessageBox.information( self, - self.trUtf8("Translation file release"), - self.trUtf8("The release of the translation files (*.qm)" - " was successful.")) + self.tr("Translation file release"), + self.tr("The release of the translation files (*.qm)" + " was successful.")) if self.project.pdata["TRANSLATIONSBINPATH"] and \ self.project.pdata["TRANSLATIONSBINPATH"][0]: target = os.path.join( @@ -1144,8 +1144,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Translation file release"), - self.trUtf8( + self.tr("Translation file release"), + self.tr( "The release of the translation files (*.qm) has failed.")) proc = self.sender() @@ -1230,8 +1230,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start lrelease.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(lrelease))
--- a/Project/PropertiesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/PropertiesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -110,13 +110,13 @@ except KeyError: vcsSystemDisplay = "None" self.vcsLabel.setText( - self.trUtf8( + self.tr( "The project is version controlled by <b>{0}</b>.") .format(vcsSystemDisplay)) self.vcsInfoButton.show() else: self.vcsLabel.setText( - self.trUtf8("The project is not version controlled.")) + self.tr("The project is not version controlled.")) self.vcsInfoButton.hide() self.vcsCheckBox.hide() else: @@ -158,7 +158,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select project directory"), + self.tr("Select project directory"), self.dirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -207,11 +207,11 @@ for pattern, filetype in list(self.project.pdata["FILETYPES"].items()): if filetype == "SOURCES": patterns.append(pattern) - filters = self.trUtf8("Source Files ({0});;All Files (*)")\ + filters = self.tr("Source Files ({0});;All Files (*)")\ .format(" ".join(patterns)) fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select main script file"), + self.tr("Select main script file"), dir, filters)
--- a/Project/SpellingPropertiesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/SpellingPropertiesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -47,7 +47,7 @@ self.pelCompleter = E5FileCompleter(self.pelEdit) from QScintilla.SpellChecker import SpellChecker - self.spellingComboBox.addItem(self.trUtf8("<default>")) + self.spellingComboBox.addItem(self.tr("<default>")) self.spellingComboBox.addItems( sorted(SpellChecker.getAvailableLanguages())) @@ -83,9 +83,9 @@ os.path.join(self.project.ppath, pwl)) file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select project word list"), + self.tr("Select project word list"), pwl, - self.trUtf8("Dictionary File (*.dic);;All Files (*)")) + self.tr("Dictionary File (*.dic);;All Files (*)")) if file: self.pwlEdit.setText(self.project.getRelativePath( @@ -104,9 +104,9 @@ os.path.join(self.project.ppath, pel)) file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select project exclude list"), + self.tr("Select project exclude list"), pel, - self.trUtf8("Dictionary File (*.dic);;All Files (*)")) + self.tr("Dictionary File (*.dic);;All Files (*)")) if file: self.pelEdit.setText(self.project.getRelativePath(
--- a/Project/TranslationPropertiesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Project/TranslationPropertiesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -61,11 +61,11 @@ for pattern, filetype in list(self.project.pdata["FILETYPES"].items()): if filetype in patterns: patterns[filetype].append(pattern) - self.filters = self.trUtf8("Source Files ({0});;")\ + self.filters = self.tr("Source Files ({0});;")\ .format(" ".join(patterns["SOURCES"])) - self.filters += self.trUtf8("Forms Files ({0});;")\ + self.filters += self.tr("Forms Files ({0});;")\ .format(" ".join(patterns["FORMS"])) - self.filters += self.trUtf8("All Files (*)") + self.filters += self.tr("All Files (*)") def initDialog(self): """ @@ -100,7 +100,7 @@ os.path.join(self.project.ppath, tp)) tsfile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select translation file"), + self.tr("Select translation file"), tp, "") @@ -129,7 +129,7 @@ os.path.join(self.project.ppath, tbp)) directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select directory for binary translations"), + self.tr("Select directory for binary translations"), tbp) if directory: @@ -172,7 +172,7 @@ """ texcept = E5FileDialog.getOpenFileName( self, - self.trUtf8("Exempt file from translation"), + self.tr("Exempt file from translation"), self.project.ppath, self.filters) if texcept: @@ -185,7 +185,7 @@ """ texcept = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Exempt directory from translation"), + self.tr("Exempt directory from translation"), self.project.ppath, E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) if texcept:
--- a/PyUnit/UnittestDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/PyUnit/UnittestDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -63,24 +63,24 @@ self.fileDialogButton.setIcon(UI.PixmapCache.getIcon("open.png")) self.startButton = self.buttonBox.addButton( - self.trUtf8("Start"), QDialogButtonBox.ActionRole) - self.startButton.setToolTip(self.trUtf8( + self.tr("Start"), QDialogButtonBox.ActionRole) + self.startButton.setToolTip(self.tr( "Start the selected testsuite")) - self.startButton.setWhatsThis(self.trUtf8( + self.startButton.setWhatsThis(self.tr( """<b>Start Test</b>""" """<p>This button starts the selected testsuite.</p>""")) self.startFailedButton = self.buttonBox.addButton( - self.trUtf8("Rerun Failed"), QDialogButtonBox.ActionRole) + self.tr("Rerun Failed"), QDialogButtonBox.ActionRole) self.startFailedButton.setToolTip( - self.trUtf8("Reruns failed tests of the selected testsuite")) - self.startFailedButton.setWhatsThis(self.trUtf8( + self.tr("Reruns failed tests of the selected testsuite")) + self.startFailedButton.setWhatsThis(self.tr( """<b>Rerun Failed</b>""" """<p>This button reruns all failed tests of the selected""" """ testsuite.</p>""")) self.stopButton = self.buttonBox.addButton( - self.trUtf8("Stop"), QDialogButtonBox.ActionRole) - self.stopButton.setToolTip(self.trUtf8("Stop the running unittest")) - self.stopButton.setWhatsThis(self.trUtf8( + self.tr("Stop"), QDialogButtonBox.ActionRole) + self.stopButton.setToolTip(self.tr("Stop the running unittest")) + self.stopButton.setWhatsThis(self.tr( """<b>Stop Test</b>""" """<p>This button stops a running unittest.</p>""")) self.stopButton.setEnabled(False) @@ -94,7 +94,7 @@ self.windowFlags() | Qt.WindowFlags( Qt.WindowContextHelpButtonHint)) self.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) - self.setWindowTitle(self.trUtf8("Unittest")) + self.setWindowTitle(self.tr("Unittest")) if dbs: self.ui = ui else: @@ -114,8 +114,8 @@ self.insertProg(prog) self.rxPatterns = [ - self.trUtf8("^Failure: "), - self.trUtf8("^Error: "), + self.tr("^Failure: "), + self.tr("^Error: "), ] self.__failedTests = [] @@ -193,11 +193,11 @@ py3Extensions = \ ' '.join(["*{0}".format(ext) for ext in self.dbs.getExtensions('Python3')]) - filter = self.trUtf8( + filter = self.tr( "Python3 Files ({1});;Python2 Files ({0});;All Files (*)")\ .format(py2Extensions, py3Extensions) else: - filter = self.trUtf8("Python Files (*.py);;All Files (*)") + filter = self.tr("Python Files (*.py);;All Files (*)") prog = E5FileDialog.getOpenFileName( self, "", @@ -258,13 +258,13 @@ if not prog: E5MessageBox.critical( self, - self.trUtf8("Unittest"), - self.trUtf8("You must enter a test suite file.")) + self.tr("Unittest"), + self.tr("You must enter a test suite file.")) return # prepend the selected file to the testsuite combobox self.insertProg(prog) - self.sbLabel.setText(self.trUtf8("Preparing Testsuite")) + self.sbLabel.setText(self.tr("Preparing Testsuite")) QApplication.processEvents() testFunctionName = self.testComboBox.currentText() @@ -333,8 +333,8 @@ exc_type, exc_value, exc_tb = sys.exc_info() E5MessageBox.critical( self, - self.trUtf8("Unittest"), - self.trUtf8( + self.tr("Unittest"), + self.tr( "<p>Unable to run test <b>{0}</b>.<br>" "{1}<br>{2}</p>") .format(self.testName, str(exc_type), @@ -392,8 +392,8 @@ if nrTests == 0: E5MessageBox.critical( self, - self.trUtf8("Unittest"), - self.trUtf8( + self.tr("Unittest"), + self.tr( "<p>Unable to run test <b>{0}</b>.<br>{1}<br>{2}</p>") .format(self.testName, exc_type, exc_value)) return @@ -459,7 +459,7 @@ self.stopButton.setEnabled(True) self.startButton.setEnabled(False) self.stopButton.setDefault(True) - self.sbLabel.setText(self.trUtf8("Running")) + self.sbLabel.setText(self.tr("Running")) self.progressLed.on() QApplication.processEvents() @@ -483,10 +483,10 @@ self.startFailedButton.setDefault(False) self.startButton.setDefault(True) if self.runCount == 1: - self.sbLabel.setText(self.trUtf8("Ran {0} test in {1:.3f}s") + self.sbLabel.setText(self.tr("Ran {0} test in {1:.3f}s") .format(self.runCount, self.timeTaken)) else: - self.sbLabel.setText(self.trUtf8("Ran {0} tests in {1:.3f}s") + self.sbLabel.setText(self.tr("Ran {0} tests in {1:.3f}s") .format(self.runCount, self.timeTaken)) self.progressLed.off() @@ -502,7 +502,7 @@ """ self.failCount += 1 self.progressCounterFailureCount.setText(str(self.failCount)) - itm = QListWidgetItem(self.trUtf8("Failure: {0}").format(test)) + itm = QListWidgetItem(self.tr("Failure: {0}").format(test)) itm.setData(Qt.UserRole, (test, exc)) self.errorsListWidget.insertItem(0, itm) self.__failedTests.append(id) @@ -517,7 +517,7 @@ """ self.errorCount += 1 self.progressCounterErrorCount.setText(str(self.errorCount)) - itm = QListWidgetItem(self.trUtf8("Error: {0}").format(test)) + itm = QListWidgetItem(self.tr("Error: {0}").format(test)) itm.setData(Qt.UserRole, (test, exc)) self.errorsListWidget.insertItem(0, itm) self.__failedTests.append(id) @@ -532,7 +532,7 @@ """ self.skippedCount += 1 self.progressCounterSkippedCount.setText(str(self.skippedCount)) - itm = QListWidgetItem(self.trUtf8(" Skipped: {0}").format(reason)) + itm = QListWidgetItem(self.tr(" Skipped: {0}").format(reason)) itm.setForeground(Qt.blue) self.testsListWidget.insertItem(1, itm) @@ -547,7 +547,7 @@ self.expectedFailureCount += 1 self.progressCounterExpectedFailureCount.setText( str(self.expectedFailureCount)) - itm = QListWidgetItem(self.trUtf8(" Expected Failure")) + itm = QListWidgetItem(self.tr(" Expected Failure")) itm.setForeground(Qt.blue) self.testsListWidget.insertItem(1, itm) @@ -561,7 +561,7 @@ self.unexpectedSuccessCount += 1 self.progressCounterUnexpectedSuccessCount.setText( str(self.unexpectedSuccessCount)) - itm = QListWidgetItem(self.trUtf8(" Unexpected Success")) + itm = QListWidgetItem(self.tr(" Unexpected Success")) itm.setForeground(Qt.red) self.testsListWidget.insertItem(1, itm) @@ -623,7 +623,7 @@ self.dlg.traceback = ui.traceback ui.showButton = ui.buttonBox.addButton( - self.trUtf8("Show Source"), QDialogButtonBox.ActionRole) + self.tr("Show Source"), QDialogButtonBox.ActionRole) ui.buttonBox.button(QDialogButtonBox.Close).setDefault(True) self.dlg.setWindowTitle(text)
--- a/QScintilla/Editor.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Editor.py Sat Jan 11 11:55:33 2014 +0100 @@ -314,10 +314,10 @@ Preferences.getEditor("WarnFilesize"): res = E5MessageBox.yesNo( self, - self.trUtf8("Open File"), - self.trUtf8("""<p>The size of the file <b>{0}</b>""" - """ is <b>{1} KB</b>.""" - """ Do you really want to load it?</p>""") + self.tr("Open File"), + self.tr("""<p>The size of the file <b>{0}</b>""" + """ is <b>{1} KB</b>.""" + """ Do you really want to load it?</p>""") .format(self.fileName, QFileInfo(self.fileName).size() // 1024), icon=E5MessageBox.Warning) @@ -366,7 +366,7 @@ self.__updateReadOnly(True) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>A Source Editor Window</b>""" """<p>This window is used to display and edit a source file.""" """ You can open as many of these as you like. The name of the""" @@ -620,86 +620,86 @@ self.menuActs["Undo"] = self.menu.addAction( UI.PixmapCache.getIcon("editUndo.png"), - self.trUtf8('Undo'), self.undo) + self.tr('Undo'), self.undo) self.menuActs["Redo"] = self.menu.addAction( UI.PixmapCache.getIcon("editRedo.png"), - self.trUtf8('Redo'), self.redo) + self.tr('Redo'), self.redo) self.menuActs["Revert"] = self.menu.addAction( - self.trUtf8("Revert to last saved state"), + self.tr("Revert to last saved state"), self.revertToUnmodified) self.menu.addSeparator() self.menuActs["Cut"] = self.menu.addAction( UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8('Cut'), self.cut) + self.tr('Cut'), self.cut) self.menuActs["Copy"] = self.menu.addAction( UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('Copy'), self.copy) + self.tr('Copy'), self.copy) self.menu.addAction( UI.PixmapCache.getIcon("editPaste.png"), - self.trUtf8('Paste'), self.paste) + self.tr('Paste'), self.paste) if not self.miniMenu: self.menu.addSeparator() self.menu.addAction( UI.PixmapCache.getIcon("editIndent.png"), - self.trUtf8('Indent'), self.indentLineOrSelection) + self.tr('Indent'), self.indentLineOrSelection) self.menu.addAction( UI.PixmapCache.getIcon("editUnindent.png"), - self.trUtf8('Unindent'), self.unindentLineOrSelection) + self.tr('Unindent'), self.unindentLineOrSelection) self.menuActs["Comment"] = self.menu.addAction( UI.PixmapCache.getIcon("editComment.png"), - self.trUtf8('Comment'), self.commentLineOrSelection) + self.tr('Comment'), self.commentLineOrSelection) self.menuActs["Uncomment"] = self.menu.addAction( UI.PixmapCache.getIcon("editUncomment.png"), - self.trUtf8('Uncomment'), self.uncommentLineOrSelection) + self.tr('Uncomment'), self.uncommentLineOrSelection) self.menuActs["StreamComment"] = self.menu.addAction( - self.trUtf8('Stream Comment'), + self.tr('Stream Comment'), self.streamCommentLineOrSelection) self.menuActs["BoxComment"] = self.menu.addAction( - self.trUtf8('Box Comment'), + self.tr('Box Comment'), self.boxCommentLineOrSelection) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Select to brace'), self.selectToMatchingBrace) - self.menu.addAction(self.trUtf8('Select all'), self.__selectAll) + self.tr('Select to brace'), self.selectToMatchingBrace) + self.menu.addAction(self.tr('Select all'), self.__selectAll) self.menu.addAction( - self.trUtf8('Deselect all'), self.__deselectAll) + self.tr('Deselect all'), self.__deselectAll) self.menu.addSeparator() self.menuActs["SpellCheck"] = self.menu.addAction( UI.PixmapCache.getIcon("spellchecking.png"), - self.trUtf8('Check spelling...'), self.checkSpelling) + self.tr('Check spelling...'), self.checkSpelling) self.menuActs["SpellCheckSelection"] = self.menu.addAction( UI.PixmapCache.getIcon("spellchecking.png"), - self.trUtf8('Check spelling of selection...'), + self.tr('Check spelling of selection...'), self.__checkSpellingSelection) self.menuActs["SpellCheckRemove"] = self.menu.addAction( - self.trUtf8("Remove from dictionary"), + self.tr("Remove from dictionary"), self.__removeFromSpellingDictionary) self.menu.addSeparator() self.menu.addAction( - self.trUtf8('Shorten empty lines'), self.shortenEmptyLines) + self.tr('Shorten empty lines'), self.shortenEmptyLines) self.menu.addSeparator() self.menuActs["Languages"] = self.menu.addMenu(self.languagesMenu) self.menuActs["Encodings"] = self.menu.addMenu(self.encodingsMenu) self.menuActs["Eol"] = self.menu.addMenu(self.eolMenu) self.menu.addSeparator() self.menuActs["MonospacedFont"] = self.menu.addAction( - self.trUtf8("Use Monospaced Font"), + self.tr("Use Monospaced Font"), self.handleMonospacedEnable) self.menuActs["MonospacedFont"].setCheckable(True) self.menuActs["MonospacedFont"].setChecked(self.useMonospaced) self.menuActs["AutosaveEnable"] = self.menu.addAction( - self.trUtf8("Autosave enabled"), self.__autosaveEnable) + self.tr("Autosave enabled"), self.__autosaveEnable) self.menuActs["AutosaveEnable"].setCheckable(True) self.menuActs["AutosaveEnable"].setChecked(self.autosaveEnabled) self.menuActs["TypingAidsEnabled"] = self.menu.addAction( - self.trUtf8("Typing aids enabled"), self.__toggleTypingAids) + self.tr("Typing aids enabled"), self.__toggleTypingAids) self.menuActs["TypingAidsEnabled"].setCheckable(True) self.menuActs["TypingAidsEnabled"].setEnabled( self.completer is not None) self.menuActs["TypingAidsEnabled"].setChecked( self.completer is not None and self.completer.isEnabled()) self.menuActs["AutoCompletionEnable"] = self.menu.addAction( - self.trUtf8("Autocompletion enabled"), + self.tr("Autocompletion enabled"), self.__toggleAutoCompletionEnable) self.menuActs["AutoCompletionEnable"].setCheckable(True) self.menuActs["AutoCompletionEnable"].setChecked( @@ -720,35 +720,35 @@ self.menu.addSeparator() self.menu.addAction( UI.PixmapCache.getIcon("documentNewView.png"), - self.trUtf8('New Document View'), self.__newView) + self.tr('New Document View'), self.__newView) self.menuActs["NewSplit"] = self.menu.addAction( UI.PixmapCache.getIcon("splitVertical.png"), - self.trUtf8('New Document View (with new split)'), + self.tr('New Document View (with new split)'), self.__newViewNewSplit) self.menuActs["NewSplit"].setEnabled(self.vm.canSplit()) self.menu.addAction( UI.PixmapCache.getIcon("close.png"), - self.trUtf8('Close'), self.__contextClose) + self.tr('Close'), self.__contextClose) self.menu.addSeparator() self.menuActs["Save"] = self.menu.addAction( UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('Save'), self.__contextSave) + self.tr('Save'), self.__contextSave) self.menu.addAction( UI.PixmapCache.getIcon("fileSaveAs.png"), - self.trUtf8('Save As...'), self.__contextSaveAs) + self.tr('Save As...'), self.__contextSaveAs) if not self.miniMenu: self.menu.addMenu(self.exportersMenu) self.menu.addSeparator() self.menuActs["OpenRejections"] = self.menu.addAction( - self.trUtf8("Open 'rejection' file"), + self.tr("Open 'rejection' file"), self.__contextOpenRejections) self.menu.addSeparator() self.menu.addAction( UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8("Print Preview"), self.printPreviewFile) + self.tr("Print Preview"), self.printPreviewFile) self.menu.addAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8('Print'), self.printFile) + self.tr('Print'), self.printFile) else: self.menuActs["OpenRejections"] = None @@ -767,20 +767,20 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Autocomplete')) + menu = QMenu(self.tr('Autocomplete')) self.menuActs["acDynamic"] = menu.addAction( - self.trUtf8('dynamic'), self.autoComplete) + self.tr('dynamic'), self.autoComplete) menu.addSeparator() menu.addAction( - self.trUtf8('from Document'), self.autoCompleteFromDocument) + self.tr('from Document'), self.autoCompleteFromDocument) self.menuActs["acAPI"] = menu.addAction( - self.trUtf8('from APIs'), self.autoCompleteFromAPIs) + self.tr('from APIs'), self.autoCompleteFromAPIs) self.menuActs["acAPIDocument"] = menu.addAction( - self.trUtf8('from Document and APIs'), self.autoCompleteFromAll) + self.tr('from Document and APIs'), self.autoCompleteFromAll) menu.addSeparator() self.menuActs["calltip"] = menu.addAction( - self.trUtf8('Calltip'), self.callTip) + self.tr('Calltip'), self.callTip) menu.aboutToShow.connect(self.__showContextMenuAutocompletion) @@ -792,7 +792,7 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Check')) + menu = QMenu(self.tr('Check')) menu.aboutToShow.connect(self.__showContextMenuChecks) return menu @@ -802,7 +802,7 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Tools')) + menu = QMenu(self.tr('Tools')) menu.aboutToShow.connect(self.__showContextMenuTools) return menu @@ -812,19 +812,19 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Show')) - - menu.addAction(self.trUtf8('Code metrics...'), self.__showCodeMetrics) + menu = QMenu(self.tr('Show')) + + menu.addAction(self.tr('Code metrics...'), self.__showCodeMetrics) self.coverageMenuAct = menu.addAction( - self.trUtf8('Code coverage...'), self.__showCodeCoverage) + self.tr('Code coverage...'), self.__showCodeCoverage) self.coverageShowAnnotationMenuAct = menu.addAction( - self.trUtf8('Show code coverage annotations'), + self.tr('Show code coverage annotations'), self.codeCoverageShowAnnotations) self.coverageHideAnnotationMenuAct = menu.addAction( - self.trUtf8('Hide code coverage annotations'), + self.tr('Hide code coverage annotations'), self.__codeCoverageHideAnnotations) self.profileMenuAct = menu.addAction( - self.trUtf8('Profile data...'), self.__showProfileData) + self.tr('Profile data...'), self.__showProfileData) menu.aboutToShow.connect(self.__showContextMenuShow) @@ -836,21 +836,21 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Diagrams')) + menu = QMenu(self.tr('Diagrams')) menu.addAction( - self.trUtf8('Class Diagram...'), self.__showClassDiagram) + self.tr('Class Diagram...'), self.__showClassDiagram) menu.addAction( - self.trUtf8('Package Diagram...'), self.__showPackageDiagram) + self.tr('Package Diagram...'), self.__showPackageDiagram) menu.addAction( - self.trUtf8('Imports Diagram...'), self.__showImportsDiagram) + self.tr('Imports Diagram...'), self.__showImportsDiagram) self.applicationDiagramMenuAct = menu.addAction( - self.trUtf8('Application Diagram...'), + self.tr('Application Diagram...'), self.__showApplicationDiagram) menu.addSeparator() menu.addAction( UI.PixmapCache.getIcon("open.png"), - self.trUtf8("Load Diagram..."), self.__loadDiagram) + self.tr("Load Diagram..."), self.__loadDiagram) menu.aboutToShow.connect(self.__showContextMenuGraphics) @@ -862,10 +862,10 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8("Languages")) + menu = QMenu(self.tr("Languages")) self.languagesActGrp = QActionGroup(self) - self.noLanguageAct = menu.addAction(self.trUtf8("No Language")) + self.noLanguageAct = menu.addAction(self.tr("No Language")) self.noLanguageAct.setCheckable(True) self.noLanguageAct.setData("None") self.languagesActGrp.addAction(self.noLanguageAct) @@ -888,11 +888,11 @@ self.languagesActGrp.addAction(act) menu.addSeparator() - self.pygmentsAct = menu.addAction(self.trUtf8("Guessed")) + self.pygmentsAct = menu.addAction(self.tr("Guessed")) self.pygmentsAct.setCheckable(True) self.pygmentsAct.setData("Guessed") self.languagesActGrp.addAction(self.pygmentsAct) - self.pygmentsSelAct = menu.addAction(self.trUtf8("Alternatives")) + self.pygmentsSelAct = menu.addAction(self.tr("Alternatives")) self.pygmentsSelAct.setData("Alternatives") menu.triggered.connect(self.__languageMenuTriggered) @@ -908,7 +908,7 @@ """ self.supportedEncodings = {} - menu = QMenu(self.trUtf8("Encodings")) + menu = QMenu(self.tr("Encodings")) self.encodingsActGrp = QActionGroup(self) @@ -932,26 +932,26 @@ """ self.supportedEols = {} - menu = QMenu(self.trUtf8("End-of-Line Type")) + menu = QMenu(self.tr("End-of-Line Type")) self.eolActGrp = QActionGroup(self) act = menu.addAction(UI.PixmapCache.getIcon("eolLinux.png"), - self.trUtf8("Unix")) + self.tr("Unix")) act.setCheckable(True) act.setData('\n') self.supportedEols['\n'] = act self.eolActGrp.addAction(act) act = menu.addAction(UI.PixmapCache.getIcon("eolWindows.png"), - self.trUtf8("Windows")) + self.tr("Windows")) act.setCheckable(True) act.setData('\r\n') self.supportedEols['\r\n'] = act self.eolActGrp.addAction(act) act = menu.addAction(UI.PixmapCache.getIcon("eolMac.png"), - self.trUtf8("Macintosh")) + self.tr("Macintosh")) act.setCheckable(True) act.setData('\r') self.supportedEols['\r'] = act @@ -968,7 +968,7 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8("Export as")) + menu = QMenu(self.tr("Export as")) from . import Exporters supportedExporters = Exporters.getSupportedFormats() @@ -1001,13 +1001,13 @@ self.bmMarginMenu = QMenu() self.bmMarginMenu.addAction( - self.trUtf8('Toggle bookmark'), self.menuToggleBookmark) + self.tr('Toggle bookmark'), self.menuToggleBookmark) self.marginMenuActs["NextBookmark"] = self.bmMarginMenu.addAction( - self.trUtf8('Next bookmark'), self.nextBookmark) + self.tr('Next bookmark'), self.nextBookmark) self.marginMenuActs["PreviousBookmark"] = self.bmMarginMenu.addAction( - self.trUtf8('Previous bookmark'), self.previousBookmark) + self.tr('Previous bookmark'), self.previousBookmark) self.marginMenuActs["ClearBookmark"] = self.bmMarginMenu.addAction( - self.trUtf8('Clear all bookmarks'), self.clearBookmarks) + self.tr('Clear all bookmarks'), self.clearBookmarks) self.bmMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) @@ -1015,23 +1015,23 @@ self.bpMarginMenu = QMenu() self.marginMenuActs["Breakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Toggle breakpoint'), self.menuToggleBreakpoint) + self.tr('Toggle breakpoint'), self.menuToggleBreakpoint) self.marginMenuActs["TempBreakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Toggle temporary breakpoint'), + self.tr('Toggle temporary breakpoint'), self.__menuToggleTemporaryBreakpoint) self.marginMenuActs["EditBreakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Edit breakpoint...'), self.menuEditBreakpoint) + self.tr('Edit breakpoint...'), self.menuEditBreakpoint) self.marginMenuActs["EnableBreakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Enable breakpoint'), + self.tr('Enable breakpoint'), self.__menuToggleBreakpointEnabled) self.marginMenuActs["NextBreakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Next breakpoint'), self.menuNextBreakpoint) + self.tr('Next breakpoint'), self.menuNextBreakpoint) self.marginMenuActs["PreviousBreakpoint"] = \ self.bpMarginMenu.addAction( - self.trUtf8('Previous breakpoint'), + self.tr('Previous breakpoint'), self.menuPreviousBreakpoint) self.marginMenuActs["ClearBreakpoint"] = self.bpMarginMenu.addAction( - self.trUtf8('Clear all breakpoints'), self.__menuClearBreakpoints) + self.tr('Clear all breakpoints'), self.__menuClearBreakpoints) self.bpMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) @@ -1040,48 +1040,48 @@ self.marginMenuActs["GotoSyntaxError"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Goto syntax error'), self.gotoSyntaxError) + self.tr('Goto syntax error'), self.gotoSyntaxError) self.marginMenuActs["ShowSyntaxError"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Show syntax error message'), + self.tr('Show syntax error message'), self.__showSyntaxError) self.marginMenuActs["ClearSyntaxError"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Clear syntax error'), self.clearSyntaxError) + self.tr('Clear syntax error'), self.clearSyntaxError) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextWarningMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8("Next warning"), self.nextWarning) + self.tr("Next warning"), self.nextWarning) self.marginMenuActs["PreviousWarningMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8("Previous warning"), self.previousWarning) + self.tr("Previous warning"), self.previousWarning) self.marginMenuActs["ShowWarning"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Show warning message'), self.__showWarning) + self.tr('Show warning message'), self.__showWarning) self.marginMenuActs["ClearWarnings"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Clear warnings'), self.clearWarnings) + self.tr('Clear warnings'), self.clearWarnings) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextCoverageMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Next uncovered line'), self.nextUncovered) + self.tr('Next uncovered line'), self.nextUncovered) self.marginMenuActs["PreviousCoverageMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Previous uncovered line'), self.previousUncovered) + self.tr('Previous uncovered line'), self.previousUncovered) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextTaskMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Next task'), self.nextTask) + self.tr('Next task'), self.nextTask) self.marginMenuActs["PreviousTaskMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Previous task'), self.previousTask) + self.tr('Previous task'), self.previousTask) self.indicMarginMenu.addSeparator() self.marginMenuActs["NextChangeMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Next change'), self.nextChange) + self.tr('Next change'), self.nextChange) self.marginMenuActs["PreviousChangeMarker"] = \ self.indicMarginMenu.addAction( - self.trUtf8('Previous change'), self.previousChange) + self.tr('Previous change'), self.previousChange) self.indicMarginMenu.aboutToShow.connect(self.__showContextMenuMargin) @@ -1092,71 +1092,71 @@ self.marginMenu = QMenu() self.marginMenu.addAction( - self.trUtf8('Toggle bookmark'), self.menuToggleBookmark) + self.tr('Toggle bookmark'), self.menuToggleBookmark) self.marginMenuActs["NextBookmark"] = self.marginMenu.addAction( - self.trUtf8('Next bookmark'), self.nextBookmark) + self.tr('Next bookmark'), self.nextBookmark) self.marginMenuActs["PreviousBookmark"] = self.marginMenu.addAction( - self.trUtf8('Previous bookmark'), self.previousBookmark) + self.tr('Previous bookmark'), self.previousBookmark) self.marginMenuActs["ClearBookmark"] = self.marginMenu.addAction( - self.trUtf8('Clear all bookmarks'), self.clearBookmarks) + self.tr('Clear all bookmarks'), self.clearBookmarks) self.marginMenu.addSeparator() self.marginMenuActs["GotoSyntaxError"] = self.marginMenu.addAction( - self.trUtf8('Goto syntax error'), self.gotoSyntaxError) + self.tr('Goto syntax error'), self.gotoSyntaxError) self.marginMenuActs["ShowSyntaxError"] = self.marginMenu.addAction( - self.trUtf8('Show syntax error message'), self.__showSyntaxError) + self.tr('Show syntax error message'), self.__showSyntaxError) self.marginMenuActs["ClearSyntaxError"] = self.marginMenu.addAction( - self.trUtf8('Clear syntax error'), self.clearSyntaxError) + self.tr('Clear syntax error'), self.clearSyntaxError) self.marginMenu.addSeparator() self.marginMenuActs["NextWarningMarker"] = self.marginMenu.addAction( - self.trUtf8("Next warning"), self.nextWarning) + self.tr("Next warning"), self.nextWarning) self.marginMenuActs["PreviousWarningMarker"] = \ self.marginMenu.addAction( - self.trUtf8("Previous warning"), self.previousWarning) + self.tr("Previous warning"), self.previousWarning) self.marginMenuActs["ShowWarning"] = self.marginMenu.addAction( - self.trUtf8('Show warning message'), self.__showWarning) + self.tr('Show warning message'), self.__showWarning) self.marginMenuActs["ClearWarnings"] = self.marginMenu.addAction( - self.trUtf8('Clear warnings'), self.clearWarnings) + self.tr('Clear warnings'), self.clearWarnings) self.marginMenu.addSeparator() self.marginMenuActs["Breakpoint"] = self.marginMenu.addAction( - self.trUtf8('Toggle breakpoint'), self.menuToggleBreakpoint) + self.tr('Toggle breakpoint'), self.menuToggleBreakpoint) self.marginMenuActs["TempBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Toggle temporary breakpoint'), + self.tr('Toggle temporary breakpoint'), self.__menuToggleTemporaryBreakpoint) self.marginMenuActs["EditBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Edit breakpoint...'), self.menuEditBreakpoint) + self.tr('Edit breakpoint...'), self.menuEditBreakpoint) self.marginMenuActs["EnableBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Enable breakpoint'), + self.tr('Enable breakpoint'), self.__menuToggleBreakpointEnabled) self.marginMenuActs["NextBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Next breakpoint'), self.menuNextBreakpoint) + self.tr('Next breakpoint'), self.menuNextBreakpoint) self.marginMenuActs["PreviousBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Previous breakpoint'), self.menuPreviousBreakpoint) + self.tr('Previous breakpoint'), self.menuPreviousBreakpoint) self.marginMenuActs["ClearBreakpoint"] = self.marginMenu.addAction( - self.trUtf8('Clear all breakpoints'), self.__menuClearBreakpoints) + self.tr('Clear all breakpoints'), self.__menuClearBreakpoints) self.marginMenu.addSeparator() self.marginMenuActs["NextCoverageMarker"] = self.marginMenu.addAction( - self.trUtf8('Next uncovered line'), self.nextUncovered) + self.tr('Next uncovered line'), self.nextUncovered) self.marginMenuActs["PreviousCoverageMarker"] = \ self.marginMenu.addAction( - self.trUtf8('Previous uncovered line'), self.previousUncovered) + self.tr('Previous uncovered line'), self.previousUncovered) self.marginMenu.addSeparator() self.marginMenuActs["NextTaskMarker"] = self.marginMenu.addAction( - self.trUtf8('Next task'), self.nextTask) + self.tr('Next task'), self.nextTask) self.marginMenuActs["PreviousTaskMarker"] = self.marginMenu.addAction( - self.trUtf8('Previous task'), self.previousTask) + self.tr('Previous task'), self.previousTask) self.marginMenu.addSeparator() self.marginMenuActs["NextChangeMarker"] = self.marginMenu.addAction( - self.trUtf8('Next change'), self.nextChange) + self.tr('Next change'), self.nextChange) self.marginMenuActs["PreviousChangeMarker"] = \ self.marginMenu.addAction( - self.trUtf8('Previous change'), self.previousChange) + self.tr('Previous change'), self.previousChange) self.marginMenu.addSeparator() self.marginMenuActs["LMBbookmarks"] = self.marginMenu.addAction( - self.trUtf8('LMB toggles bookmarks'), self.__lmBbookmarks) + self.tr('LMB toggles bookmarks'), self.__lmBbookmarks) self.marginMenuActs["LMBbookmarks"].setCheckable(True) self.marginMenuActs["LMBbookmarks"].setChecked(False) self.marginMenuActs["LMBbreakpoints"] = self.marginMenu.addAction( - self.trUtf8('LMB toggles breakpoints'), self.__lmBbreakpoints) + self.tr('LMB toggles breakpoints'), self.__lmBbreakpoints) self.marginMenuActs["LMBbreakpoints"].setCheckable(True) self.marginMenuActs["LMBbreakpoints"].setChecked(True) @@ -1185,16 +1185,16 @@ else: E5MessageBox.critical( self, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>No exporter available for the """ """export format <b>{0}</b>. Aborting...</p>""") .format(exporterFormat)) else: E5MessageBox.critical( self, - self.trUtf8("Export source"), - self.trUtf8("""No export format given. Aborting...""")) + self.tr("Export source"), + self.tr("""No export format given. Aborting...""")) def __showContextMenuLanguages(self): """ @@ -1203,10 +1203,10 @@ """ if self.apiLanguage.startswith("Pygments|"): self.pygmentsSelAct.setText( - self.trUtf8("Alternatives ({0})").format( + self.tr("Alternatives ({0})").format( self.getLanguage(normalized=False))) else: - self.pygmentsSelAct.setText(self.trUtf8("Alternatives")) + self.pygmentsSelAct.setText(self.tr("Alternatives")) self.showMenu.emit("Languages", self.languagesMenu, self) def __selectPygmentsLexer(self): @@ -1224,8 +1224,8 @@ lexerSel = 0 lexerName, ok = QInputDialog.getItem( self, - self.trUtf8("Pygments Lexer"), - self.trUtf8("Select the Pygments lexer to apply."), + self.tr("Pygments Lexer"), + self.tr("Select the Pygments lexer to apply."), lexerList, lexerSel, False) @@ -1661,9 +1661,9 @@ """ E5MessageBox.warning( self, - self.trUtf8("Modification of Read Only file"), - self.trUtf8("""You are attempting to change a read only file. """ - """Please save to a different file first.""")) + self.tr("Modification of Read Only file"), + self.tr("""You are attempting to change a read only file. """ + """Please save to a different file first.""")) def setNoName(self, noName): """ @@ -2355,7 +2355,7 @@ if self.hasSelectedText(): printDialog.addEnabledOption(QAbstractPrintDialog.PrintSelection) if printDialog.exec_() == QDialog.Accepted: - sb.showMessage(self.trUtf8('Printing...')) + sb.showMessage(self.tr('Printing...')) QApplication.processEvents() fn = self.getFileName() if fn is not None: @@ -2372,12 +2372,12 @@ else: res = printer.printRange(self) if res: - sb.showMessage(self.trUtf8('Printing completed'), 2000) + sb.showMessage(self.tr('Printing completed'), 2000) else: - sb.showMessage(self.trUtf8('Error while printing'), 2000) + sb.showMessage(self.tr('Error while printing'), 2000) QApplication.processEvents() else: - sb.showMessage(self.trUtf8('Printing aborted'), 2000) + sb.showMessage(self.tr('Printing aborted'), 2000) QApplication.processEvents() def printPreviewFile(self): @@ -2700,8 +2700,8 @@ fn = self.noName res = E5MessageBox.okToClearData( self, - self.trUtf8("File Modified"), - self.trUtf8("<p>The file <b>{0}</b> has unsaved changes.</p>") + self.tr("File Modified"), + self.tr("<p>The file <b>{0}</b> has unsaved changes.</p>") .format(fn), self.saveFile) if res: @@ -2749,9 +2749,9 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.vm, - self.trUtf8('Open File'), - self.trUtf8('<p>The file <b>{0}</b> could not be opened.</p>' - '<p>Reason: {1}</p>') + self.tr('Open File'), + self.tr('<p>The file <b>{0}</b> could not be opened.</p>' + '<p>Reason: {1}</p>') .format(fn, str(why))) QApplication.restoreOverrideCursor() raise @@ -2852,9 +2852,9 @@ except (IOError, Utilities.CodingError, UnicodeError) as why: E5MessageBox.critical( self, - self.trUtf8('Save File'), - self.trUtf8('<p>The file <b>{0}</b> could not be saved.<br/>' - 'Reason: {1}</p>') + self.tr('Save File'), + self.tr('<p>The file <b>{0}</b> could not be saved.<br/>' + 'Reason: {1}</p>') .format(fn, str(why))) return False @@ -2901,7 +2901,7 @@ defaultFilter = Preferences.getEditor("DefaultSaveFilter") fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save File"), + self.tr("Save File"), path, Lexers.getSaveFileFiltersList(True, True), defaultFilter, @@ -2919,9 +2919,9 @@ if QFileInfo(fn).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save File"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fn), + self.tr("Save File"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fn), icon=E5MessageBox.Warning) if not res: return False @@ -4226,8 +4226,8 @@ else: E5MessageBox.information( self, - self.trUtf8("Autocompletion"), - self.trUtf8( + self.tr("Autocompletion"), + self.tr( """Autocompletion is not available because""" """ there is no autocompletion source set.""")) @@ -4327,10 +4327,10 @@ # there is another provider registered already E5MessageBox.warning( self, - self.trUtf8("Activating Auto-Completion Provider"), - self.trUtf8("""Auto-completion provider cannot be connected""" - """ because there is already another one active.""" - """ Please check your configuration.""")) + self.tr("Activating Auto-Completion Provider"), + self.tr("""Auto-completion provider cannot be connected""" + """ because there is already another one active.""" + """ Please check your configuration.""")) return if self.autoCompletionThreshold() > 0: @@ -4517,10 +4517,10 @@ # there is another provider registered already E5MessageBox.warning( self, - self.trUtf8("Activating Calltip Provider"), - self.trUtf8("""Calltip provider cannot be connected""" - """ because there is already another one active.""" - """ Please check your configuration.""")) + self.tr("Activating Calltip Provider"), + self.tr("""Calltip provider cannot be connected""" + """ because there is already another one active.""" + """ Please check your configuration.""")) return self.__ctHookFunction = func @@ -4751,10 +4751,10 @@ self.marginMenuActs["EnableBreakpoint"].setEnabled(False) if self.markersAtLine(self.line) & (1 << self.dbreakpoint): self.marginMenuActs["EnableBreakpoint"].setText( - self.trUtf8('Enable breakpoint')) + self.tr('Enable breakpoint')) else: self.marginMenuActs["EnableBreakpoint"].setText( - self.trUtf8('Disable breakpoint')) + self.tr('Disable breakpoint')) if self.breaks: self.marginMenuActs["NextBreakpoint"].setEnabled(True) self.marginMenuActs["PreviousBreakpoint"].setEnabled(True) @@ -5109,8 +5109,8 @@ if len(files) > 1: fn, ok = QInputDialog.getItem( self, - self.trUtf8("Code Coverage"), - self.trUtf8("Please select a coverage file"), + self.tr("Code Coverage"), + self.tr("Please select a coverage file"), files, 0, False) if not ok: @@ -5165,15 +5165,15 @@ if not silent: E5MessageBox.information( self, - self.trUtf8("Show Code Coverage Annotations"), - self.trUtf8("""All lines have been covered.""")) + self.tr("Show Code Coverage Annotations"), + self.tr("""All lines have been covered.""")) self.showingNotcoveredMarkers = True else: if not silent: E5MessageBox.warning( self, - self.trUtf8("Show Code Coverage Annotations"), - self.trUtf8("""There is no coverage file available.""")) + self.tr("Show Code Coverage Annotations"), + self.tr("""There is no coverage file available.""")) def __codeCoverageHideAnnotations(self): """ @@ -5270,8 +5270,8 @@ if len(files) > 1: fn, ok = QInputDialog.getItem( self, - self.trUtf8("Profile Data"), - self.trUtf8("Please select a profile file"), + self.tr("Profile Data"), + self.tr("Please select a profile file"), files, 0, False) if not ok: @@ -5407,14 +5407,14 @@ errors = [e[0] for e in self.syntaxerrors[handle]] E5MessageBox.critical( self, - self.trUtf8("Syntax Error"), + self.tr("Syntax Error"), "\n".join(errors)) break else: E5MessageBox.critical( self, - self.trUtf8("Syntax Error"), - self.trUtf8("No syntax error message available.")) + self.tr("Syntax Error"), + self.tr("No syntax error message available.")) ########################################################################### ## Warning handling methods below @@ -5576,14 +5576,14 @@ if self.markerLine(handle) == line: E5MessageBox.warning( self, - self.trUtf8("Warning"), + self.tr("Warning"), '\n'.join([w[0] for w in self.warnings[handle]])) break else: E5MessageBox.warning( self, - self.trUtf8("Warning"), - self.trUtf8("No warning messages available.")) + self.tr("Warning"), + self.tr("No warning messages available.")) ########################################################################### ## Annotation handling methods below @@ -5642,17 +5642,17 @@ for msg, warningType in self.warnings[handle]: if warningType == self.WarningStyle: styleAnnotations.append( - self.trUtf8("Style: {0}").format(msg)) + self.tr("Style: {0}").format(msg)) else: warningAnnotations.append( - self.trUtf8("Warning: {0}").format(msg)) + self.tr("Warning: {0}").format(msg)) # step 2: do syntax errors for handle in self.syntaxerrors.keys(): if self.markerLine(handle) == line: for msg, _ in self.syntaxerrors[handle]: errorAnnotations.append( - self.trUtf8("Error: {0}").format(msg)) + self.tr("Error: {0}").format(msg)) annotations = [] if styleAnnotations: @@ -5707,8 +5707,8 @@ qs.sort() return QInputDialog.getItem( self, - self.trUtf8("Macro Name"), - self.trUtf8("Select a macro name:"), + self.tr("Macro Name"), + self.tr("Select a macro name:"), qs, 0, False) @@ -5735,9 +5735,9 @@ configDir = Utilities.getConfigDir() fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Load macro file"), + self.tr("Load macro file"), configDir, - self.trUtf8("Macro files (*.macro)")) + self.tr("Macro files (*.macro)")) if not fname: return # user aborted @@ -5749,8 +5749,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Error loading macro"), - self.trUtf8( + self.tr("Error loading macro"), + self.tr( "<p>The macro file <b>{0}</b> could not be read.</p>") .format(fname)) return @@ -5758,8 +5758,8 @@ if len(lines) != 2: E5MessageBox.critical( self, - self.trUtf8("Error loading macro"), - self.trUtf8("<p>The macro file <b>{0}</b> is corrupt.</p>") + self.tr("Error loading macro"), + self.tr("<p>The macro file <b>{0}</b> is corrupt.</p>") .format(fname)) return @@ -5778,9 +5778,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save macro file"), + self.tr("Save macro file"), configDir, - self.trUtf8("Macro files (*.macro)"), + self.tr("Macro files (*.macro)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -5795,9 +5795,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save macro"), - self.trUtf8("<p>The macro file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save macro"), + self.tr("<p>The macro file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -5811,8 +5811,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Error saving macro"), - self.trUtf8( + self.tr("Error saving macro"), + self.tr( "<p>The macro file <b>{0}</b> could not be written.</p>") .format(fname)) return @@ -5824,8 +5824,8 @@ if self.recording: res = E5MessageBox.yesNo( self, - self.trUtf8("Start Macro Recording"), - self.trUtf8("Macro recording is already active. Start new?"), + self.tr("Start Macro Recording"), + self.tr("Macro recording is already active. Start new?"), icon=E5MessageBox.Warning, yesDefault=True) if res: @@ -5850,8 +5850,8 @@ name, ok = QInputDialog.getText( self, - self.trUtf8("Macro Recording"), - self.trUtf8("Enter name of the macro:"), + self.tr("Macro Recording"), + self.tr("Enter name of the macro:"), QLineEdit.Normal) if ok and name: @@ -5970,19 +5970,19 @@ if Preferences.getEditor("AutoReopen") and not self.isModified(): self.refresh() else: - msg = self.trUtf8( + msg = self.tr( """<p>The file <b>{0}</b> has been changed while it""" """ was opened in eric5. Reread it?</p>""")\ .format(self.fileName) yesDefault = True if self.isModified(): - msg += self.trUtf8( + msg += self.tr( """<br><b>Warning:</b> You will lose""" """ your changes upon reopening it.""") yesDefault = False res = E5MessageBox.yesNo( self, - self.trUtf8("File changed"), msg, + self.tr("File changed"), msg, icon=E5MessageBox.Warning, yesDefault=yesDefault) if res: @@ -6026,7 +6026,7 @@ else: cap = self.fileName if self.isReadOnly(): - cap = self.trUtf8("{0} (ro)").format(cap) + cap = self.tr("{0} (ro)").format(cap) self.setWindowTitle(cap) super().changeEvent(evt) @@ -6119,7 +6119,7 @@ return cap = self.fileName if readOnly: - cap = self.trUtf8("{0} (ro)".format(cap)) + cap = self.tr("{0} (ro)".format(cap)) self.setReadOnly(readOnly) self.setWindowTitle(cap) self.captionChanged.emit(cap, self) @@ -6254,8 +6254,8 @@ else: E5MessageBox.information( self, - self.trUtf8("Drop Error"), - self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") + self.tr("Drop Error"), + self.tr("""<p><b>{0}</b> is not a file.</p>""") .format(fname)) event.acceptProposedAction() else: @@ -6273,21 +6273,21 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8('Resources')) + menu = QMenu(self.tr('Resources')) menu.addAction( - self.trUtf8('Add file...'), self.__addFileResource) + self.tr('Add file...'), self.__addFileResource) menu.addAction( - self.trUtf8('Add files...'), self.__addFileResources) + self.tr('Add files...'), self.__addFileResources) menu.addAction( - self.trUtf8('Add aliased file...'), + self.tr('Add aliased file...'), self.__addFileAliasResource) menu.addAction( - self.trUtf8('Add localized resource...'), + self.tr('Add localized resource...'), self.__addLocalizedResource) menu.addSeparator() menu.addAction( - self.trUtf8('Add resource frame'), self.__addResourceFrame) + self.tr('Add resource frame'), self.__addResourceFrame) menu.aboutToShow.connect(self.__showContextMenuResources) @@ -6307,7 +6307,7 @@ dirStr = os.path.dirname(self.fileName) file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Add file resource"), + self.tr("Add file resource"), dirStr, "") if file: @@ -6323,7 +6323,7 @@ dirStr = os.path.dirname(self.fileName) files = E5FileDialog.getOpenFileNames( self, - self.trUtf8("Add file resources"), + self.tr("Add file resources"), dirStr, "") if files: @@ -6343,15 +6343,15 @@ dirStr = os.path.dirname(self.fileName) file = E5FileDialog.getOpenFileName( self, - self.trUtf8("Add aliased file resource"), + self.tr("Add aliased file resource"), dirStr, "") if file: relFile = QDir(dirStr).relativeFilePath(file) alias, ok = QInputDialog.getText( self, - self.trUtf8("Add aliased file resource"), - self.trUtf8("Alias for file <b>{0}</b>:").format(relFile), + self.tr("Add aliased file resource"), + self.tr("Alias for file <b>{0}</b>:").format(relFile), QLineEdit.Normal, relFile) if ok and alias: @@ -6414,8 +6414,8 @@ self.fileName or os.path.dirname(self.fileName) res = E5MessageBox.yesNo( self, - self.trUtf8("Package Diagram"), - self.trUtf8("""Include class attributes?"""), + self.tr("Package Diagram"), + self.tr("""Include class attributes?"""), yesDefault=True) self.packageDiagram = UMLDialog( UMLDialog.PackageDiagram, self.project, package, @@ -6434,8 +6434,8 @@ or os.path.dirname(self.fileName) res = E5MessageBox.yesNo( self, - self.trUtf8("Imports Diagram"), - self.trUtf8("""Include imports from external modules?""")) + self.tr("Imports Diagram"), + self.tr("""Include imports from external modules?""")) self.importsDiagram = UMLDialog( UMLDialog.ImportsDiagram, self.project, package, self, showExternalImports=res) @@ -6448,8 +6448,8 @@ from Graphics.UMLDialog import UMLDialog res = E5MessageBox.yesNo( self, - self.trUtf8("Application Diagram"), - self.trUtf8("""Include module names?"""), + self.tr("Application Diagram"), + self.tr("""Include module names?"""), yesDefault=True) self.applicationDiagram = UMLDialog( UMLDialog.ApplicationDiagram, self.project, @@ -6736,11 +6736,11 @@ self.spellingMenu.addSeparator() self.spellingMenu.addAction( UI.PixmapCache.getIcon("spellchecking.png"), - self.trUtf8("Check spelling..."), self.__checkSpellingWord) + self.tr("Check spelling..."), self.__checkSpellingWord) self.spellingMenu.addAction( - self.trUtf8("Add to dictionary"), self.__addToSpellingDictionary) + self.tr("Add to dictionary"), self.__addToSpellingDictionary) self.spellingMenu.addAction( - self.trUtf8("Ignore All"), self.__ignoreSpellingAlways) + self.tr("Ignore All"), self.__ignoreSpellingAlways) self.showMenu.emit("Spelling", self.spellingMenu, self) @@ -7149,8 +7149,8 @@ except ValueError: E5MessageBox.critical( self, - self.trUtf8("Sort Lines"), - self.trUtf8( + self.tr("Sort Lines"), + self.tr( """The selection contains illegal data for a""" """ numerical sort.""")) return
--- a/QScintilla/Exporters/ExporterBase.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterBase.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,7 +42,7 @@ filter_ += QApplication.translate('Exporter', "All Files (*)") fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self.editor, - self.trUtf8("Export source"), + self.tr("Export source"), "", filter_, "", @@ -57,9 +57,9 @@ if QFileInfo(fn).exists(): res = E5MessageBox.yesNo( self.editor, - self.trUtf8("Export source"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fn), + self.tr("Export source"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fn), icon=E5MessageBox.Warning) if not res: return ""
--- a/QScintilla/Exporters/ExporterHTML.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterHTML.py Sat Jan 11 11:55:33 2014 +0100 @@ -367,7 +367,7 @@ """ Public method performing the export. """ - filename = self._getFileName(self.trUtf8("HTML Files (*.html)")) + filename = self._getFileName(self.tr("HTML Files (*.html)")) if not filename: return @@ -404,8 +404,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.editor, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>The source could not be exported to""" """ <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(filename, str(err)))
--- a/QScintilla/Exporters/ExporterODT.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterODT.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,7 +36,7 @@ """ Public method performing the export. """ - filename = self._getFileName(self.trUtf8("ODT Files (*.odt)")) + filename = self._getFileName(self.tr("ODT Files (*.odt)")) if not filename: return @@ -70,7 +70,7 @@ if not ok: E5MessageBox.critical( self.editor, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>The source could not be exported to""" """ <b>{0}</b>.</p>""").format(filename))
--- a/QScintilla/Exporters/ExporterPDF.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterPDF.py Sat Jan 11 11:55:33 2014 +0100 @@ -413,7 +413,7 @@ """ self.pr = PDFRender() - filename = self._getFileName(self.trUtf8("PDF Files (*.pdf)")) + filename = self._getFileName(self.tr("PDF Files (*.pdf)")) if not filename: return @@ -596,8 +596,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.editor, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>The source could not be exported to""" """ <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(filename, str(err)))
--- a/QScintilla/Exporters/ExporterRTF.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterRTF.py Sat Jan 11 11:55:33 2014 +0100 @@ -114,7 +114,7 @@ """ Public method performing the export. """ - filename = self._getFileName(self.trUtf8("RTF Files (*.rtf)")) + filename = self._getFileName(self.tr("RTF Files (*.rtf)")) if not filename: return @@ -348,8 +348,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.editor, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>The source could not be exported to""" """ <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(filename, str(err)))
--- a/QScintilla/Exporters/ExporterTEX.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Exporters/ExporterTEX.py Sat Jan 11 11:55:33 2014 +0100 @@ -109,7 +109,7 @@ """ Public method performing the export. """ - filename = self._getFileName(self.trUtf8("TeX Files (*.tex)")) + filename = self._getFileName(self.tr("TeX Files (*.tex)")) if not filename: return @@ -269,8 +269,8 @@ QApplication.restoreOverrideCursor() E5MessageBox.critical( self.editor, - self.trUtf8("Export source"), - self.trUtf8( + self.tr("Export source"), + self.tr( """<p>The source could not be exported to""" """ <b>{0}</b>.</p><p>Reason: {1}</p>""") .format(filename, str(err)))
--- a/QScintilla/Lexers/LexerPygments.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Lexers/LexerPygments.py Sat Jan 11 11:55:33 2014 +0100 @@ -152,50 +152,50 @@ self.__pygmentsName = name self.descriptions = { - PYGMENTS_DEFAULT: self.trUtf8("Default"), - PYGMENTS_COMMENT: self.trUtf8("Comment"), - PYGMENTS_PREPROCESSOR: self.trUtf8("Preprocessor"), - PYGMENTS_KEYWORD: self.trUtf8("Keyword"), - PYGMENTS_PSEUDOKEYWORD: self.trUtf8("Pseudo Keyword"), - PYGMENTS_TYPEKEYWORD: self.trUtf8("Type Keyword"), - PYGMENTS_OPERATOR: self.trUtf8("Operator"), - PYGMENTS_WORD: self.trUtf8("Word"), - PYGMENTS_BUILTIN: self.trUtf8("Builtin"), - PYGMENTS_FUNCTION: self.trUtf8("Function or method name"), - PYGMENTS_CLASS: self.trUtf8("Class name"), - PYGMENTS_NAMESPACE: self.trUtf8("Namespace"), - PYGMENTS_EXCEPTION: self.trUtf8("Exception"), - PYGMENTS_VARIABLE: self.trUtf8("Identifier"), - PYGMENTS_CONSTANT: self.trUtf8("Constant"), - PYGMENTS_LABEL: self.trUtf8("Label"), - PYGMENTS_ENTITY: self.trUtf8("Entity"), - PYGMENTS_ATTRIBUTE: self.trUtf8("Attribute"), - PYGMENTS_TAG: self.trUtf8("Tag"), - PYGMENTS_DECORATOR: self.trUtf8("Decorator"), - PYGMENTS_STRING: self.trUtf8("String"), - PYGMENTS_DOCSTRING: self.trUtf8("Documentation string"), - PYGMENTS_SCALAR: self.trUtf8("Scalar"), - PYGMENTS_ESCAPE: self.trUtf8("Escape"), - PYGMENTS_REGEX: self.trUtf8("Regular expression"), - PYGMENTS_SYMBOL: self.trUtf8("Symbol"), - PYGMENTS_OTHER: self.trUtf8("Other string"), - PYGMENTS_NUMBER: self.trUtf8("Number"), - PYGMENTS_HEADING: self.trUtf8("Heading"), - PYGMENTS_SUBHEADING: self.trUtf8("Subheading"), - PYGMENTS_DELETED: self.trUtf8("Deleted"), - PYGMENTS_INSERTED: self.trUtf8("Inserted"), - PYGMENTS_GENERIC_ERROR: self.trUtf8("Generic error"), - PYGMENTS_EMPHASIZE: self.trUtf8("Emphasized text"), - PYGMENTS_STRONG: self.trUtf8("Strong text"), - PYGMENTS_PROMPT: self.trUtf8("Prompt"), - PYGMENTS_OUTPUT: self.trUtf8("Output"), - PYGMENTS_TRACEBACK: self.trUtf8("Traceback"), - PYGMENTS_ERROR: self.trUtf8("Error"), - PYGMENTS_MULTILINECOMMENT: self.trUtf8("Comment block"), - PYGMENTS_PROPERTY: self.trUtf8("Property"), - PYGMENTS_CHAR: self.trUtf8("Character"), - PYGMENTS_HEREDOC: self.trUtf8("Here document"), - PYGMENTS_PUNCTUATION: self.trUtf8("Punctuation"), + PYGMENTS_DEFAULT: self.tr("Default"), + PYGMENTS_COMMENT: self.tr("Comment"), + PYGMENTS_PREPROCESSOR: self.tr("Preprocessor"), + PYGMENTS_KEYWORD: self.tr("Keyword"), + PYGMENTS_PSEUDOKEYWORD: self.tr("Pseudo Keyword"), + PYGMENTS_TYPEKEYWORD: self.tr("Type Keyword"), + PYGMENTS_OPERATOR: self.tr("Operator"), + PYGMENTS_WORD: self.tr("Word"), + PYGMENTS_BUILTIN: self.tr("Builtin"), + PYGMENTS_FUNCTION: self.tr("Function or method name"), + PYGMENTS_CLASS: self.tr("Class name"), + PYGMENTS_NAMESPACE: self.tr("Namespace"), + PYGMENTS_EXCEPTION: self.tr("Exception"), + PYGMENTS_VARIABLE: self.tr("Identifier"), + PYGMENTS_CONSTANT: self.tr("Constant"), + PYGMENTS_LABEL: self.tr("Label"), + PYGMENTS_ENTITY: self.tr("Entity"), + PYGMENTS_ATTRIBUTE: self.tr("Attribute"), + PYGMENTS_TAG: self.tr("Tag"), + PYGMENTS_DECORATOR: self.tr("Decorator"), + PYGMENTS_STRING: self.tr("String"), + PYGMENTS_DOCSTRING: self.tr("Documentation string"), + PYGMENTS_SCALAR: self.tr("Scalar"), + PYGMENTS_ESCAPE: self.tr("Escape"), + PYGMENTS_REGEX: self.tr("Regular expression"), + PYGMENTS_SYMBOL: self.tr("Symbol"), + PYGMENTS_OTHER: self.tr("Other string"), + PYGMENTS_NUMBER: self.tr("Number"), + PYGMENTS_HEADING: self.tr("Heading"), + PYGMENTS_SUBHEADING: self.tr("Subheading"), + PYGMENTS_DELETED: self.tr("Deleted"), + PYGMENTS_INSERTED: self.tr("Inserted"), + PYGMENTS_GENERIC_ERROR: self.tr("Generic error"), + PYGMENTS_EMPHASIZE: self.tr("Emphasized text"), + PYGMENTS_STRONG: self.tr("Strong text"), + PYGMENTS_PROMPT: self.tr("Prompt"), + PYGMENTS_OUTPUT: self.tr("Output"), + PYGMENTS_TRACEBACK: self.tr("Traceback"), + PYGMENTS_ERROR: self.tr("Error"), + PYGMENTS_MULTILINECOMMENT: self.tr("Comment block"), + PYGMENTS_PROPERTY: self.tr("Property"), + PYGMENTS_CHAR: self.tr("Character"), + PYGMENTS_HEREDOC: self.tr("Here document"), + PYGMENTS_PUNCTUATION: self.tr("Punctuation"), } self.defaultColors = {
--- a/QScintilla/MiniEditor.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/MiniEditor.py Sat Jan 11 11:55:33 2014 +0100 @@ -249,8 +249,8 @@ """ E5MessageBox.about( self, - self.trUtf8("About eric5 Mini Editor"), - self.trUtf8( + self.tr("About eric5 Mini Editor"), + self.tr( "The eric5 Mini Editor is an editor component" " based on QScintilla. It may be used for simple" " editing tasks, that don't need the power of" @@ -310,11 +310,11 @@ if line is None: line = '' - self.sbLine.setText(self.trUtf8('Line: {0:5}').format(line)) + self.sbLine.setText(self.tr('Line: {0:5}').format(line)) if pos is None: pos = '' - self.sbPos.setText(self.trUtf8('Pos: {0:5}').format(pos)) + self.sbPos.setText(self.tr('Pos: {0:5}').format(pos)) def __readShortcut(self, act, category): """ @@ -364,13 +364,13 @@ Private method to create the File actions. """ self.newAct = E5Action( - self.trUtf8('New'), + self.tr('New'), UI.PixmapCache.getIcon("new.png"), - self.trUtf8('&New'), - QKeySequence(self.trUtf8("Ctrl+N", "File|New")), + self.tr('&New'), + QKeySequence(self.tr("Ctrl+N", "File|New")), 0, self, 'vm_file_new') - self.newAct.setStatusTip(self.trUtf8('Open an empty editor window')) - self.newAct.setWhatsThis(self.trUtf8( + self.newAct.setStatusTip(self.tr('Open an empty editor window')) + self.newAct.setWhatsThis(self.tr( """<b>New</b>""" """<p>An empty editor window will be created.</p>""" )) @@ -378,13 +378,13 @@ self.fileActions.append(self.newAct) self.openAct = E5Action( - self.trUtf8('Open'), + self.tr('Open'), UI.PixmapCache.getIcon("open.png"), - self.trUtf8('&Open...'), - QKeySequence(self.trUtf8("Ctrl+O", "File|Open")), + self.tr('&Open...'), + QKeySequence(self.tr("Ctrl+O", "File|Open")), 0, self, 'vm_file_open') - self.openAct.setStatusTip(self.trUtf8('Open a file')) - self.openAct.setWhatsThis(self.trUtf8( + self.openAct.setStatusTip(self.tr('Open a file')) + self.openAct.setWhatsThis(self.tr( """<b>Open a file</b>""" """<p>You will be asked for the name of a file to be opened.</p>""" )) @@ -392,13 +392,13 @@ self.fileActions.append(self.openAct) self.saveAct = E5Action( - self.trUtf8('Save'), + self.tr('Save'), UI.PixmapCache.getIcon("fileSave.png"), - self.trUtf8('&Save'), - QKeySequence(self.trUtf8("Ctrl+S", "File|Save")), + self.tr('&Save'), + QKeySequence(self.tr("Ctrl+S", "File|Save")), 0, self, 'vm_file_save') - self.saveAct.setStatusTip(self.trUtf8('Save the current file')) - self.saveAct.setWhatsThis(self.trUtf8( + self.saveAct.setStatusTip(self.tr('Save the current file')) + self.saveAct.setWhatsThis(self.tr( """<b>Save File</b>""" """<p>Save the contents of current editor window.</p>""" )) @@ -406,14 +406,14 @@ self.fileActions.append(self.saveAct) 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, 'vm_file_save_as') - self.saveAsAct.setStatusTip(self.trUtf8( + self.saveAsAct.setStatusTip(self.tr( 'Save the current file to a new one')) - self.saveAsAct.setWhatsThis(self.trUtf8( + self.saveAsAct.setWhatsThis(self.tr( """<b>Save File as</b>""" """<p>Save the contents of current editor window to a new file.""" """ The file can be entered in a file selection dialog.</p>""" @@ -422,13 +422,13 @@ self.fileActions.append(self.saveAsAct) 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, 'vm_file_close') - self.closeAct.setStatusTip(self.trUtf8('Close the editor window')) - self.closeAct.setWhatsThis(self.trUtf8( + self.closeAct.setStatusTip(self.tr('Close the editor window')) + self.closeAct.setWhatsThis(self.tr( """<b>Close Window</b>""" """<p>Close the current window.</p>""" )) @@ -436,13 +436,13 @@ self.fileActions.append(self.closeAct) 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, 'vm_file_print') - self.printAct.setStatusTip(self.trUtf8('Print the current file')) - self.printAct.setWhatsThis(self.trUtf8( + self.printAct.setStatusTip(self.tr('Print the current file')) + self.printAct.setWhatsThis(self.tr( """<b>Print File</b>""" """<p>Print the contents of the current file.</p>""" )) @@ -450,13 +450,13 @@ self.fileActions.append(self.printAct) self.printPreviewAct = E5Action( - self.trUtf8('Print Preview'), + self.tr('Print Preview'), UI.PixmapCache.getIcon("printPreview.png"), QApplication.translate('ViewManager', 'Print Preview'), 0, 0, self, 'vm_file_print_preview') - self.printPreviewAct.setStatusTip(self.trUtf8( + self.printPreviewAct.setStatusTip(self.tr( 'Print preview of the current file')) - self.printPreviewAct.setWhatsThis(self.trUtf8( + self.printPreviewAct.setWhatsThis(self.tr( """<b>Print Preview</b>""" """<p>Print preview of the current file.</p>""" )) @@ -468,14 +468,14 @@ Private method to create the Edit actions. """ self.undoAct = E5Action( - self.trUtf8('Undo'), + self.tr('Undo'), UI.PixmapCache.getIcon("editUndo.png"), - self.trUtf8('&Undo'), - QKeySequence(self.trUtf8("Ctrl+Z", "Edit|Undo")), - QKeySequence(self.trUtf8("Alt+Backspace", "Edit|Undo")), + self.tr('&Undo'), + QKeySequence(self.tr("Ctrl+Z", "Edit|Undo")), + QKeySequence(self.tr("Alt+Backspace", "Edit|Undo")), self, 'vm_edit_undo') - self.undoAct.setStatusTip(self.trUtf8('Undo the last change')) - self.undoAct.setWhatsThis(self.trUtf8( + self.undoAct.setStatusTip(self.tr('Undo the last change')) + self.undoAct.setWhatsThis(self.tr( """<b>Undo</b>""" """<p>Undo the last change done in the current editor.</p>""" )) @@ -483,13 +483,13 @@ self.editActions.append(self.undoAct) self.redoAct = E5Action( - self.trUtf8('Redo'), + self.tr('Redo'), UI.PixmapCache.getIcon("editRedo.png"), - self.trUtf8('&Redo'), - QKeySequence(self.trUtf8("Ctrl+Shift+Z", "Edit|Redo")), + self.tr('&Redo'), + QKeySequence(self.tr("Ctrl+Shift+Z", "Edit|Redo")), 0, self, 'vm_edit_redo') - self.redoAct.setStatusTip(self.trUtf8('Redo the last change')) - self.redoAct.setWhatsThis(self.trUtf8( + self.redoAct.setStatusTip(self.tr('Redo the last change')) + self.redoAct.setWhatsThis(self.tr( """<b>Redo</b>""" """<p>Redo the last change done in the current editor.</p>""" )) @@ -497,14 +497,14 @@ self.editActions.append(self.redoAct) self.cutAct = E5Action( - self.trUtf8('Cut'), + self.tr('Cut'), UI.PixmapCache.getIcon("editCut.png"), - self.trUtf8('Cu&t'), - QKeySequence(self.trUtf8("Ctrl+X", "Edit|Cut")), - QKeySequence(self.trUtf8("Shift+Del", "Edit|Cut")), + self.tr('Cu&t'), + QKeySequence(self.tr("Ctrl+X", "Edit|Cut")), + QKeySequence(self.tr("Shift+Del", "Edit|Cut")), self, 'vm_edit_cut') - self.cutAct.setStatusTip(self.trUtf8('Cut the selection')) - self.cutAct.setWhatsThis(self.trUtf8( + self.cutAct.setStatusTip(self.tr('Cut the selection')) + self.cutAct.setWhatsThis(self.tr( """<b>Cut</b>""" """<p>Cut the selected text of the current editor to the""" """ clipboard.</p>""" @@ -513,14 +513,14 @@ self.editActions.append(self.cutAct) self.copyAct = E5Action( - self.trUtf8('Copy'), + self.tr('Copy'), UI.PixmapCache.getIcon("editCopy.png"), - self.trUtf8('&Copy'), - QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy")), - QKeySequence(self.trUtf8("Ctrl+Ins", "Edit|Copy")), + self.tr('&Copy'), + QKeySequence(self.tr("Ctrl+C", "Edit|Copy")), + QKeySequence(self.tr("Ctrl+Ins", "Edit|Copy")), self, 'vm_edit_copy') - self.copyAct.setStatusTip(self.trUtf8('Copy the selection')) - self.copyAct.setWhatsThis(self.trUtf8( + self.copyAct.setStatusTip(self.tr('Copy the selection')) + self.copyAct.setWhatsThis(self.tr( """<b>Copy</b>""" """<p>Copy the selected text of the current editor to the""" """ clipboard.</p>""" @@ -529,15 +529,15 @@ self.editActions.append(self.copyAct) self.pasteAct = E5Action( - self.trUtf8('Paste'), + self.tr('Paste'), UI.PixmapCache.getIcon("editPaste.png"), - self.trUtf8('&Paste'), - QKeySequence(self.trUtf8("Ctrl+V", "Edit|Paste")), - QKeySequence(self.trUtf8("Shift+Ins", "Edit|Paste")), + self.tr('&Paste'), + QKeySequence(self.tr("Ctrl+V", "Edit|Paste")), + QKeySequence(self.tr("Shift+Ins", "Edit|Paste")), self, 'vm_edit_paste') - self.pasteAct.setStatusTip(self.trUtf8( + self.pasteAct.setStatusTip(self.tr( 'Paste the last cut/copied text')) - self.pasteAct.setWhatsThis(self.trUtf8( + self.pasteAct.setWhatsThis(self.tr( """<b>Paste</b>""" """<p>Paste the last cut/copied text from the clipboard to""" """ the current editor.</p>""" @@ -546,14 +546,14 @@ self.editActions.append(self.pasteAct) self.deleteAct = E5Action( - self.trUtf8('Clear'), + self.tr('Clear'), UI.PixmapCache.getIcon("editDelete.png"), - self.trUtf8('Cl&ear'), - QKeySequence(self.trUtf8("Alt+Shift+C", "Edit|Clear")), + self.tr('Cl&ear'), + QKeySequence(self.tr("Alt+Shift+C", "Edit|Clear")), 0, self, 'vm_edit_clear') - self.deleteAct.setStatusTip(self.trUtf8('Clear all text')) - self.deleteAct.setWhatsThis(self.trUtf8( + self.deleteAct.setStatusTip(self.tr('Clear all text')) + self.deleteAct.setWhatsThis(self.tr( """<b>Clear</b>""" """<p>Delete all text of the current editor.</p>""" )) @@ -1957,24 +1957,24 @@ Private method to create the Help actions. """ self.aboutAct = E5Action( - self.trUtf8('About'), - self.trUtf8('&About'), + self.tr('About'), + self.tr('&About'), 0, 0, self, 'about_eric') - 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>""")) self.aboutAct.triggered[()].connect(self.__about) self.helpActions.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, '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>""" )) @@ -1982,13 +1982,13 @@ self.helpActions.append(self.aboutQtAct) 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""" @@ -2004,7 +2004,7 @@ """ Private method to create the menus of the menu bar. """ - self.fileMenu = self.menuBar().addMenu(self.trUtf8("&File")) + self.fileMenu = self.menuBar().addMenu(self.tr("&File")) self.fileMenu.addAction(self.newAct) self.fileMenu.addAction(self.openAct) self.fileMenu.addAction(self.saveAct) @@ -2015,7 +2015,7 @@ self.fileMenu.addSeparator() self.fileMenu.addAction(self.closeAct) - self.editMenu = self.menuBar().addMenu(self.trUtf8("&Edit")) + self.editMenu = self.menuBar().addMenu(self.tr("&Edit")) self.editMenu.addAction(self.undoAct) self.editMenu.addAction(self.redoAct) self.editMenu.addSeparator() @@ -2032,7 +2032,7 @@ self.menuBar().addSeparator() - self.helpMenu = self.menuBar().addMenu(self.trUtf8("&Help")) + self.helpMenu = self.menuBar().addMenu(self.tr("&Help")) self.helpMenu.addAction(self.aboutAct) self.helpMenu.addAction(self.aboutQtAct) self.helpMenu.addSeparator() @@ -2044,7 +2044,7 @@ """ Private method to create the various toolbars. """ - filetb = self.addToolBar(self.trUtf8("File")) + filetb = self.addToolBar(self.tr("File")) filetb.setIconSize(UI.Config.ToolBarIconSize) filetb.addAction(self.newAct) filetb.addAction(self.openAct) @@ -2056,7 +2056,7 @@ filetb.addSeparator() filetb.addAction(self.closeAct) - edittb = self.addToolBar(self.trUtf8("Edit")) + edittb = self.addToolBar(self.tr("Edit")) edittb.setIconSize(UI.Config.ToolBarIconSize) edittb.addAction(self.undoAct) edittb.addAction(self.redoAct) @@ -2066,14 +2066,14 @@ edittb.addAction(self.pasteAct) edittb.addAction(self.deleteAct) - findtb = self.addToolBar(self.trUtf8("Find")) + findtb = self.addToolBar(self.tr("Find")) findtb.setIconSize(UI.Config.ToolBarIconSize) findtb.addAction(self.searchAct) findtb.addAction(self.searchNextAct) findtb.addAction(self.searchPrevAct) findtb.addAction(self.searchClearMarkersAct) - helptb = self.addToolBar(self.trUtf8("Help")) + helptb = self.addToolBar(self.tr("Help")) helptb.setIconSize(UI.Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) @@ -2086,26 +2086,26 @@ self.sbWritable = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbWritable) - self.sbWritable.setWhatsThis(self.trUtf8( + self.sbWritable.setWhatsThis(self.tr( """<p>This part of the status bar displays an indication of the""" """ editors files writability.</p>""" )) self.sbLine = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbLine) - self.sbLine.setWhatsThis(self.trUtf8( + self.sbLine.setWhatsThis(self.tr( """<p>This part of the status bar displays the line number of""" """ the editor.</p>""" )) self.sbPos = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbPos) - self.sbPos.setWhatsThis(self.trUtf8( + self.sbPos.setWhatsThis(self.tr( """<p>This part of the status bar displays the cursor position""" """ of the editor.</p>""" )) - self.__statusBar.showMessage(self.trUtf8("Ready")) + self.__statusBar.showMessage(self.tr("Ready")) def __readSettings(self): """ @@ -2134,8 +2134,8 @@ if self.__textEdit.isModified(): ret = E5MessageBox.okToClearData( self, - self.trUtf8("eric5 Mini Editor"), - self.trUtf8("The document has unsaved changes."), + self.tr("eric5 Mini Editor"), + self.tr("The document has unsaved changes."), self.__save) return ret return True @@ -2154,9 +2154,9 @@ except (UnicodeDecodeError, IOError) as why: QApplication.restoreOverrideCursor() E5MessageBox.critical( - self, self.trUtf8('Open File'), - self.trUtf8('<p>The file <b>{0}</b> could not be opened.</p>' - '<p>Reason: {1}</p>') + self, self.tr('Open File'), + self.tr('<p>The file <b>{0}</b> could not be opened.</p>' + '<p>Reason: {1}</p>') .format(fileName, str(why))) QApplication.restoreOverrideCursor() return @@ -2173,7 +2173,7 @@ fileEol = self.__textEdit.detectEolString(txt) self.__textEdit.setEolModeByEolString(fileEol) - self.__statusBar.showMessage(self.trUtf8("File loaded"), 2000) + self.__statusBar.showMessage(self.tr("File loaded"), 2000) def __saveFile(self, fileName): """ @@ -2189,9 +2189,9 @@ fileName, txt, self.encoding) except (IOError, Utilities.CodingError, UnicodeError) as why: E5MessageBox.critical( - self, self.trUtf8('Save File'), - self.trUtf8('<p>The file <b>{0}</b> could not be saved.<br/>' - 'Reason: {1}</p>') + self, self.tr('Save File'), + self.tr('<p>The file <b>{0}</b> could not be saved.<br/>' + 'Reason: {1}</p>') .format(fileName, str(why))) QApplication.restoreOverrideCursor() @@ -2203,7 +2203,7 @@ self.editorSaved.emit() self.__setCurrentFile(fileName) - self.__statusBar.showMessage(self.trUtf8("File saved"), 2000) + self.__statusBar.showMessage(self.tr("File saved"), 2000) self.__checkActions() @@ -2218,12 +2218,12 @@ self.__curFile = fileName if not self.__curFile: - shownName = self.trUtf8("Untitled") + shownName = self.tr("Untitled") else: shownName = self.__strippedName(self.__curFile) - self.setWindowTitle(self.trUtf8("{0}[*] - {1}") - .format(shownName, self.trUtf8("Mini Editor"))) + self.setWindowTitle(self.tr("{0}[*] - {1}") + .format(shownName, self.tr("Mini Editor"))) self.__textEdit.setModified(False) self.setWindowModified(False) @@ -2483,12 +2483,12 @@ if self.__textEdit.hasSelectedText(): printDialog.addEnabledOption(QAbstractPrintDialog.PrintSelection) if printDialog.exec_() == QDialog.Accepted: - sb.showMessage(self.trUtf8('Printing...')) + sb.showMessage(self.tr('Printing...')) QApplication.processEvents() if self.__curFile: printer.setDocName(QFileInfo(self.__curFile).fileName()) else: - printer.setDocName(self.trUtf8("Untitled")) + printer.setDocName(self.tr("Untitled")) if printDialog.printRange() == QAbstractPrintDialog.Selection: # get the selection fromLine, fromIndex, toLine, toIndex = \ @@ -2500,12 +2500,12 @@ else: res = printer.printRange(self.__textEdit) if res: - sb.showMessage(self.trUtf8('Printing completed'), 2000) + sb.showMessage(self.tr('Printing completed'), 2000) else: - sb.showMessage(self.trUtf8('Error while printing'), 2000) + sb.showMessage(self.tr('Error while printing'), 2000) QApplication.processEvents() else: - sb.showMessage(self.trUtf8('Printing aborted'), 2000) + sb.showMessage(self.tr('Printing aborted'), 2000) QApplication.processEvents() def __printPreviewFile(self): @@ -2519,7 +2519,7 @@ if self.__curFile: printer.setDocName(QFileInfo(self.__curFile).fileName()) else: - printer.setDocName(self.trUtf8("Untitled")) + printer.setDocName(self.tr("Untitled")) preview = QPrintPreviewDialog(printer, self) preview.paintRequested.connect(self.__printPreview) preview.exec_() @@ -2560,9 +2560,9 @@ self.contextMenu.addAction(self.copyAct) self.contextMenu.addAction(self.pasteAct) self.contextMenu.addSeparator() - self.contextMenu.addAction(self.trUtf8('Select all'), self.__selectAll) + self.contextMenu.addAction(self.tr('Select all'), self.__selectAll) self.contextMenu.addAction( - self.trUtf8('Deselect all'), self.__deselectAll) + self.tr('Deselect all'), self.__deselectAll) self.contextMenu.addSeparator() self.languagesMenuAct = self.contextMenu.addMenu(self.languagesMenu) self.contextMenu.addSeparator() @@ -2575,10 +2575,10 @@ @return reference to the generated menu (QMenu) """ - menu = QMenu(self.trUtf8("Languages")) + menu = QMenu(self.tr("Languages")) self.languagesActGrp = QActionGroup(self) - self.noLanguageAct = menu.addAction(self.trUtf8("No Language")) + self.noLanguageAct = menu.addAction(self.tr("No Language")) self.noLanguageAct.setCheckable(True) self.noLanguageAct.setData("None") self.languagesActGrp.addAction(self.noLanguageAct) @@ -2601,11 +2601,11 @@ self.languagesActGrp.addAction(act) menu.addSeparator() - self.pygmentsAct = menu.addAction(self.trUtf8("Guessed")) + self.pygmentsAct = menu.addAction(self.tr("Guessed")) self.pygmentsAct.setCheckable(True) self.pygmentsAct.setData("Guessed") self.languagesActGrp.addAction(self.pygmentsAct) - self.pygmentsSelAct = menu.addAction(self.trUtf8("Alternatives")) + self.pygmentsSelAct = menu.addAction(self.tr("Alternatives")) self.pygmentsSelAct.setData("Alternatives") menu.triggered.connect(self.__languageMenuTriggered) @@ -2620,9 +2620,9 @@ """ if self.apiLanguage.startswith("Pygments|"): self.pygmentsSelAct.setText( - self.trUtf8("Alternatives ({0})").format(self.getLanguage())) + self.tr("Alternatives ({0})").format(self.getLanguage())) else: - self.pygmentsSelAct.setText(self.trUtf8("Alternatives")) + self.pygmentsSelAct.setText(self.tr("Alternatives")) def __selectPygmentsLexer(self): """ @@ -2638,8 +2638,8 @@ lexerSel = 0 lexerName, ok = QInputDialog.getItem( self, - self.trUtf8("Pygments Lexer"), - self.trUtf8("Select the Pygments lexer to apply."), + self.tr("Pygments Lexer"), + self.tr("Select the Pygments lexer to apply."), lexerList, lexerSel, False)
--- a/QScintilla/SearchReplaceWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/SearchReplaceWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,7 +52,7 @@ from .Ui_ReplaceWidget import Ui_ReplaceWidget self.replaceHistory = vm.getSRHistory('replace') self.ui = Ui_ReplaceWidget() - whatsThis = self.trUtf8( + whatsThis = self.tr( r"""<b>Find and Replace</b> <p>This dialog is used to find some text and replace it with another text. By checking the various checkboxes, the search can be made more specific. @@ -63,7 +63,7 @@ else: from .Ui_SearchWidget import Ui_SearchWidget self.ui = Ui_SearchWidget() - whatsThis = self.trUtf8( + whatsThis = self.tr( r"""<b>Find</b> <p>This dialog is used to find some text. By checking the various checkboxes, the search can be made more specific. The search string might be a regular @@ -74,7 +74,7 @@ if not replace: self.ui.wrapCheckBox.setChecked(True) - whatsThis += self.trUtf8( + whatsThis += self.tr( r"""<table border="0"> <tr><td><code>.</code></td><td>Matches any character</td></tr> <tr><td><code>\(</code></td><td>This marks the start of a region for tagging a @@ -140,16 +140,16 @@ self.on_replaceButton_clicked) self.findNextAct = E5Action( - self.trUtf8('Find Next'), - self.trUtf8('Find Next'), + self.tr('Find Next'), + self.tr('Find Next'), 0, 0, self, 'search_widget_find_next') self.findNextAct.triggered[()].connect(self.on_findNextButton_clicked) self.findNextAct.setEnabled(False) self.ui.findtextCombo.addAction(self.findNextAct) self.findPrevAct = E5Action( - self.trUtf8('Find Prev'), - self.trUtf8('Find Prev'), + self.tr('Find Prev'), + self.tr('Find Prev'), 0, 0, self, 'search_widget_find_prev') self.findPrevAct.triggered[()].connect(self.on_findPrevButton_clicked) self.findPrevAct.setEnabled(False) @@ -245,7 +245,7 @@ else: E5MessageBox.information( self, self.windowTitle(), - self.trUtf8("'{0}' was not found.").format(txt)) + self.tr("'{0}' was not found.").format(txt)) @pyqtSlot() def on_findPrevButton_clicked(self): @@ -282,7 +282,7 @@ else: E5MessageBox.information( self, self.windowTitle(), - self.trUtf8("'{0}' was not found.").format(txt)) + self.tr("'{0}' was not found.").format(txt)) def __findByReturnPressed(self): """ @@ -642,7 +642,7 @@ self.ui.replaceSearchButton.setEnabled(False) E5MessageBox.information( self, self.windowTitle(), - self.trUtf8("'{0}' was not found.").format(ftxt)) + self.tr("'{0}' was not found.").format(ftxt)) else: self.ui.replaceButton.setEnabled(False) self.ui.replaceSearchButton.setEnabled(False) @@ -764,12 +764,12 @@ if found: E5MessageBox.information( self, self.windowTitle(), - self.trUtf8("Replaced {0} occurrences.") + self.tr("Replaced {0} occurrences.") .format(replacements)) else: E5MessageBox.information( self, self.windowTitle(), - self.trUtf8("Nothing replaced because '{0}' was not found.") + self.tr("Nothing replaced because '{0}' was not found.") .format(ftxt)) aw.setCursorPosition(cline, cindex)
--- a/QScintilla/Shell.py Fri Jan 10 19:30:21 2014 +0100 +++ b/QScintilla/Shell.py Sat Jan 11 11:55:33 2014 +0100 @@ -109,11 +109,11 @@ self.passive = Preferences.getDebugger("PassiveDbgEnabled") if self.passive: - self.setWindowTitle(self.trUtf8('Shell - Passive')) + self.setWindowTitle(self.tr('Shell - Passive')) else: - self.setWindowTitle(self.trUtf8('Shell')) + self.setWindowTitle(self.tr('Shell')) - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<b>The Shell Window</b>""" """<p>This is simply an interpreter running in a window. The""" """ interpreter is the one that is used to run the program""" @@ -183,7 +183,7 @@ # Make sure we have prompts. if self.passive: - sys.ps1 = self.trUtf8("Passive >>> ") + sys.ps1 = self.tr("Passive >>> ") else: try: sys.ps1 @@ -198,7 +198,7 @@ self.__getBanner() # Create a little language context menu - self.lmenu = QMenu(self.trUtf8('Start')) + self.lmenu = QMenu(self.tr('Start')) self.clientLanguages = self.dbs.getSupportedLanguages(shellOnly=True) self.clientLanguages.sort() for language in self.clientLanguages: @@ -207,28 +207,28 @@ self.lmenu.triggered.connect(self.__startDebugClient) # Create the history context menu - self.hmenu = QMenu(self.trUtf8('History')) - self.hmenu.addAction(self.trUtf8('Select entry'), self.__selectHistory) - self.hmenu.addAction(self.trUtf8('Show'), self.__showHistory) - self.hmenu.addAction(self.trUtf8('Clear'), self.__clearHistory) + self.hmenu = QMenu(self.tr('History')) + self.hmenu.addAction(self.tr('Select entry'), self.__selectHistory) + self.hmenu.addAction(self.tr('Show'), self.__showHistory) + self.hmenu.addAction(self.tr('Clear'), self.__clearHistory) # Create a little context menu self.menu = QMenu(self) - self.menu.addAction(self.trUtf8('Cut'), self.cut) - self.menu.addAction(self.trUtf8('Copy'), self.copy) - self.menu.addAction(self.trUtf8('Paste'), self.paste) + self.menu.addAction(self.tr('Cut'), self.cut) + self.menu.addAction(self.tr('Copy'), self.copy) + self.menu.addAction(self.tr('Paste'), self.paste) self.menu.addMenu(self.hmenu) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Find'), self.__find) + self.menu.addAction(self.tr('Find'), self.__find) self.menu.addSeparator() - self.menu.addAction(self.trUtf8('Clear'), self.clear) - self.menu.addAction(self.trUtf8('Reset'), self.__reset) + self.menu.addAction(self.tr('Clear'), self.clear) + self.menu.addAction(self.tr('Reset'), self.__reset) self.menu.addAction( - self.trUtf8('Reset and Clear'), self.__resetAndClear) + self.tr('Reset and Clear'), self.__resetAndClear) self.menu.addSeparator() self.menu.addMenu(self.lmenu) self.menu.addSeparator() - self.menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.menu.addAction(self.tr("Configure..."), self.__configure) self.__bindLexer() self.__setTextDisplay() @@ -574,9 +574,9 @@ """ cmd, ok = QInputDialog.getItem( self, - self.trUtf8("Select History"), - self.trUtf8("Select the history entry to execute" - " (most recent shown last)."), + self.tr("Select History"), + self.tr("Select the history entry to execute" + " (most recent shown last)."), self.history, 0, False) if ok: @@ -623,12 +623,12 @@ """ super().clear() if self.passive and not self.dbs.isConnected(): - self.__write(self.trUtf8('Passive Debug Mode')) - self.__write(self.trUtf8('\nNot connected')) + self.__write(self.tr('Passive Debug Mode')) + self.__write(self.tr('\nNot connected')) else: - version = version.replace("#", self.trUtf8("No.")) + version = version.replace("#", self.tr("No.")) if platform != "" and dbgclient != "": - self.__write(self.trUtf8('{0} on {1}, {2}') + self.__write(self.tr('{0} on {1}, {2}') .format(version, platform, dbgclient)) else: self.__write(version) @@ -689,7 +689,7 @@ @param s text to be displayed (string) """ - self.__write(self.trUtf8("StdOut: {0}").format(s)) + self.__write(self.tr("StdOut: {0}").format(s)) def __writeStdErr(self, s): """ @@ -697,7 +697,7 @@ @param s text to be displayed (string) """ - self.__write(self.trUtf8("StdErr: {0}").format(s)) + self.__write(self.tr("StdErr: {0}").format(s)) def __raw_input(self, s, echo): """ @@ -1266,7 +1266,7 @@ else: # language not supported or typo self.__write( - self.trUtf8( + self.tr( 'Shell language "{0}" not supported.\n') .format(cmdList[1])) self.__clientStatement(False) @@ -1540,8 +1540,8 @@ else: E5MessageBox.information( self, - self.trUtf8("Drop Error"), - self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") + self.tr("Drop Error"), + self.tr("""<p><b>{0}</b> is not a file.</p>""") .format(fname)) event.acceptProposedAction() elif event.mimeData().hasText():
--- a/Snapshot/SnapWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Snapshot/SnapWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,16 +52,16 @@ self.copyPreviewButton.setIcon(UI.PixmapCache.getIcon("editCopy.png")) self.setWindowIcon(UI.PixmapCache.getIcon("ericSnap.png")) - self.modeCombo.addItem(self.trUtf8("Fullscreen"), + self.modeCombo.addItem(self.tr("Fullscreen"), SnapWidget.ModeFullscreen) - self.modeCombo.addItem(self.trUtf8("Rectangular Selection"), + self.modeCombo.addItem(self.tr("Rectangular Selection"), SnapWidget.ModeRectangle) - self.modeCombo.addItem(self.trUtf8("Ellipical Selection"), + self.modeCombo.addItem(self.tr("Ellipical Selection"), SnapWidget.ModeEllipse) - self.modeCombo.addItem(self.trUtf8("Freehand Selection"), + self.modeCombo.addItem(self.tr("Freehand Selection"), SnapWidget.ModeFreehand) if QApplication.desktop().numScreens() > 1: - self.modeCombo.addItem(self.trUtf8("Current Screen"), + self.modeCombo.addItem(self.tr("Current Screen"), SnapWidget.ModeScreen) self.__mode = int(Preferences.Prefs.settings.value("Snapshot/Mode", 0)) index = self.modeCombo.findData(self.__mode) @@ -78,7 +78,7 @@ os.path.join( QDesktopServices.storageLocation( QDesktopServices.PicturesLocation), - self.trUtf8("snapshot") + "1.png")) + self.tr("snapshot") + "1.png")) self.__grabber = None self.__snapshot = QPixmap() @@ -110,22 +110,22 @@ Private method to define the supported image file filters. """ filters = { - 'bmp': self.trUtf8("Windows Bitmap File (*.bmp)"), - 'gif': self.trUtf8("Graphic Interchange Format File (*.gif)"), - 'ico': self.trUtf8("Windows Icon File (*.ico)"), - 'jpg': self.trUtf8("JPEG File (*.jpg)"), - 'mng': self.trUtf8("Multiple-Image Network Graphics File (*.mng)"), - 'pbm': self.trUtf8("Portable Bitmap File (*.pbm)"), - 'pcx': self.trUtf8("Paintbrush Bitmap File (*.pcx)"), - 'pgm': self.trUtf8("Portable Graymap File (*.pgm)"), - 'png': self.trUtf8("Portable Network Graphics File (*.png)"), - 'ppm': self.trUtf8("Portable Pixmap File (*.ppm)"), - 'sgi': self.trUtf8("Silicon Graphics Image File (*.sgi)"), - 'svg': self.trUtf8("Scalable Vector Graphics File (*.svg)"), - 'tga': self.trUtf8("Targa Graphic File (*.tga)"), - 'tif': self.trUtf8("TIFF File (*.tif)"), - 'xbm': self.trUtf8("X11 Bitmap File (*.xbm)"), - 'xpm': self.trUtf8("X11 Pixmap File (*.xpm)"), + 'bmp': self.tr("Windows Bitmap File (*.bmp)"), + 'gif': self.tr("Graphic Interchange Format File (*.gif)"), + 'ico': self.tr("Windows Icon File (*.ico)"), + 'jpg': self.tr("JPEG File (*.jpg)"), + 'mng': self.tr("Multiple-Image Network Graphics File (*.mng)"), + 'pbm': self.tr("Portable Bitmap File (*.pbm)"), + 'pcx': self.tr("Paintbrush Bitmap File (*.pcx)"), + 'pgm': self.tr("Portable Graymap File (*.pgm)"), + 'png': self.tr("Portable Network Graphics File (*.png)"), + 'ppm': self.tr("Portable Pixmap File (*.ppm)"), + 'sgi': self.tr("Silicon Graphics Image File (*.sgi)"), + 'svg': self.tr("Scalable Vector Graphics File (*.svg)"), + 'tga': self.tr("Targa Graphic File (*.tga)"), + 'tif': self.tr("TIFF File (*.tif)"), + 'xbm': self.tr("X11 Bitmap File (*.xbm)"), + 'xpm': self.tr("X11 Pixmap File (*.xpm)"), } outputFormats = [] @@ -191,7 +191,7 @@ fileName, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Snapshot"), + self.tr("Save Snapshot"), self.__filename, self.__outputFilter, self.__defaultFilter, @@ -221,9 +221,9 @@ if QFileInfo(fileName).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Snapshot"), - self.trUtf8("<p>The file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fileName), + self.tr("Save Snapshot"), + self.tr("<p>The file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fileName), icon=E5MessageBox.Warning) if not res: return False @@ -231,8 +231,8 @@ file = QFile(fileName) if not file.open(QFile.WriteOnly): E5MessageBox.warning( - self, self.trUtf8("Save Snapshot"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self, self.tr("Save Snapshot"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) return False @@ -241,8 +241,8 @@ if not ok: E5MessageBox.warning( - self, self.trUtf8("Save Snapshot"), - self.trUtf8("Cannot write file '{0}:\n{1}.") + self, self.tr("Save Snapshot"), + self.tr("Cannot write file '{0}:\n{1}.") .format(fileName, file.errorString())) return ok @@ -440,7 +440,7 @@ """ Private slot to update the preview picture. """ - self.preview.setToolTip(self.trUtf8( + self.preview.setToolTip(self.tr( "Preview of the snapshot image ({0:n} x {1:n})").format( self.__snapshot.width(), self.__snapshot.height())) self.preview.setPreview(self.__snapshot) @@ -491,8 +491,8 @@ if self.__modified: res = E5MessageBox.question( self, - self.trUtf8("eric5 Snapshot"), - self.trUtf8( + self.tr("eric5 Snapshot"), + self.tr( """The application contains an unsaved snapshot."""), E5MessageBox.StandardButtons( E5MessageBox.Abort | @@ -519,6 +519,6 @@ """ self.setWindowTitle("{0}[*] - {1}".format( os.path.basename(self.__filename), - self.trUtf8("eric5 Snapshot"))) + self.tr("eric5 Snapshot"))) self.setWindowModified(self.__modified) self.pathNameEdit.setText(os.path.dirname(self.__filename))
--- a/Snapshot/SnapshotFreehandGrabber.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Snapshot/SnapshotFreehandGrabber.py Sat Jan 11 11:55:33 2014 +0100 @@ -63,7 +63,7 @@ self.__selectionBeforeDrag = QPolygon() self.__helpTextRect = QRect() - self.__helpText = self.trUtf8( + self.__helpText = self.tr( "Select a region using the mouse. To take the snapshot," " press the Enter key or double click. Press Esc to quit.")
--- a/Snapshot/SnapshotRegionGrabber.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Snapshot/SnapshotRegionGrabber.py Sat Jan 11 11:55:33 2014 +0100 @@ -92,7 +92,7 @@ self.__BRHandle, self.__LHandle, self.__THandle, self.__RHandle, self.__BHandle] self.__helpTextRect = QRect() - self.__helpText = self.trUtf8( + self.__helpText = self.tr( "Select a region using the mouse. To take the snapshot, press" " the Enter key or double click. Press Esc to quit.")
--- a/Snapshot/SnapshotTimer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Snapshot/SnapshotTimer.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,7 +36,7 @@ # text is taken from paintEvent with maximum number plus some margin self.resize( - self.fontMetrics().width(self.trUtf8( + self.fontMetrics().width(self.tr( "Snapshot will be taken in %n seconds", "", 99)) + 6, self.fontMetrics().height() + 4) @@ -97,8 +97,8 @@ textColor = pal.color(QPalette.Active, QPalette.Base) painter.setPen(textColor) painter.setBrush(textBackgroundColor) - helpText = self.trUtf8("Snapshot will be taken in %n seconds", "", - self.__length - self.__time) + helpText = self.tr("Snapshot will be taken in %n seconds", "", + self.__length - self.__time) textRect = painter.boundingRect( self.rect().adjusted(2, 2, -2, -2), Qt.AlignHCenter | Qt.TextSingleLine, helpText)
--- a/SqlBrowser/SqlBrowser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/SqlBrowser/SqlBrowser.py Sat Jan 11 11:55:33 2014 +0100 @@ -36,7 +36,7 @@ super().__init__(parent) self.setObjectName("SqlBrowser") - self.setWindowTitle(self.trUtf8("SQL Browser")) + self.setWindowTitle(self.tr("SQL Browser")) self.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) self.setStyle(Preferences.getUI("Style"), @@ -60,7 +60,7 @@ url = QUrl(connection, QUrl.TolerantMode) if not url.isValid(): self.__warnings.append( - self.trUtf8("Invalid URL: {0}").format(connection)) + self.tr("Invalid URL: {0}").format(connection)) continue err = self.__browser.addConnection(url.scheme(), url.path(), @@ -68,7 +68,7 @@ url.host(), url.port(-1)) if err.type() != QSqlError.NoError: self.__warnings.append( - self.trUtf8("Unable to open connection: {0}".format( + self.tr("Unable to open connection: {0}".format( err.text()))) QTimer.singleShot(0, self.__uiStartUp) @@ -81,7 +81,7 @@ for warning in self.__warnings: E5MessageBox.warning( self, - self.trUtf8("SQL Browser startup problem"), + self.tr("SQL Browser startup problem"), warning) if len(QSqlDatabase.connectionNames()) == 0: @@ -95,13 +95,13 @@ self.__actions = [] self.addConnectionAct = E5Action( - self.trUtf8('Add Connection'), + self.tr('Add Connection'), UI.PixmapCache.getIcon("databaseConnection.png"), - self.trUtf8('Add &Connection...'), + self.tr('Add &Connection...'), 0, 0, self, 'sql_file_add_connection') - self.addConnectionAct.setStatusTip(self.trUtf8( + self.addConnectionAct.setStatusTip(self.tr( 'Open a dialog to add a new database connection')) - self.addConnectionAct.setWhatsThis(self.trUtf8( + self.addConnectionAct.setWhatsThis(self.tr( """<b>Add Connection</b>""" """<p>This opens a dialog to add a new database""" """ connection.</p>""" @@ -111,25 +111,25 @@ self.__actions.append(self.addConnectionAct) 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, 'sql_file_quit') - self.exitAct.setStatusTip(self.trUtf8('Quit the SQL browser')) - self.exitAct.setWhatsThis(self.trUtf8( + self.exitAct.setStatusTip(self.tr('Quit the SQL browser')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit</b>""" """<p>Quit the SQL browser.</p>""" )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) self.aboutAct = E5Action( - self.trUtf8('About'), - self.trUtf8('&About'), + self.tr('About'), + self.tr('&About'), 0, 0, self, 'sql_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>""" )) @@ -137,12 +137,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, 'sql_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>""" )) @@ -155,7 +155,7 @@ """ mb = self.menuBar() - menu = mb.addMenu(self.trUtf8('&File')) + menu = mb.addMenu(self.tr('&File')) menu.setTearOffEnabled(True) menu.addAction(self.addConnectionAct) menu.addSeparator() @@ -163,7 +163,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) @@ -172,7 +172,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.addConnectionAct) @@ -185,8 +185,8 @@ """ E5MessageBox.about( self, - self.trUtf8("SQL Browser"), - self.trUtf8( + self.tr("SQL Browser"), + self.tr( """<h3>About SQL Browser</h3>""" """<p>The SQL browser window is a little tool to examine """ """the data and the schema of a database and to execute """ @@ -198,4 +198,4 @@ """ Private slot to show info about Qt. """ - E5MessageBox.aboutQt(self, self.trUtf8("SQL Browser")) + E5MessageBox.aboutQt(self, self.tr("SQL Browser"))
--- a/SqlBrowser/SqlBrowserWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/SqlBrowser/SqlBrowserWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,8 +42,8 @@ if len(QSqlDatabase.drivers()) == 0: E5MessageBox.information( self, - self.trUtf8("No database drivers found"), - self.trUtf8( + self.tr("No database drivers found"), + self.tr( """This tool requires at least one Qt database driver. """ """Please check the Qt documentation how to build the """ """Qt SQL plugins.""")) @@ -54,7 +54,7 @@ self.on_connections_schemaRequested) self.connections.cleared.connect(self.on_connections_cleared) - self.statusMessage.emit(self.trUtf8("Ready")) + self.statusMessage.emit(self.tr("Ready")) @pyqtSlot() def on_clearButton_clicked(self): @@ -159,8 +159,8 @@ if err.type() != QSqlError.NoError: E5MessageBox.warning( self, - self.trUtf8("Unable to open database"), - self.trUtf8( + self.tr("Unable to open database"), + self.tr( """An error occurred while opening the connection.""")) def showTable(self, table): @@ -299,10 +299,10 @@ if model.lastError().type() != QSqlError.NoError: self.statusMessage.emit(model.lastError().text()) elif model.query().isSelect(): - self.statusMessage.emit(self.trUtf8("Query OK.")) + self.statusMessage.emit(self.tr("Query OK.")) else: self.statusMessage.emit( - self.trUtf8("Query OK, number of affected rows: {0}") + self.tr("Query OK, number of affected rows: {0}") .format(model.query().numRowsAffected())) self.table.resizeColumnsToContents()
--- a/SqlBrowser/SqlConnectionDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/SqlBrowser/SqlConnectionDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -100,9 +100,9 @@ startdir = self.databaseEdit.text() dbFile = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select Database File"), + self.tr("Select Database File"), startdir, - self.trUtf8("All Files (*)")) + self.tr("All Files (*)")) if dbFile: self.databaseEdit.setText(Utilities.toNativeSeparators(dbFile))
--- a/SqlBrowser/SqlConnectionWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/SqlBrowser/SqlConnectionWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -39,15 +39,15 @@ self.__connectionTree = QTreeWidget(self) self.__connectionTree.setObjectName("connectionTree") - self.__connectionTree.setHeaderLabels([self.trUtf8("Database")]) + self.__connectionTree.setHeaderLabels([self.tr("Database")]) if qVersion() >= "5.0.0": self.__connectionTree.header().setSectionResizeMode( QHeaderView.Stretch) else: self.__connectionTree.header().setResizeMode(QHeaderView.Stretch) - refreshAction = QAction(self.trUtf8("Refresh"), self.__connectionTree) + refreshAction = QAction(self.tr("Refresh"), self.__connectionTree) self.__schemaAction = QAction( - self.trUtf8("Show Schema"), self.__connectionTree) + self.tr("Show Schema"), self.__connectionTree) refreshAction.triggered[()].connect(self.refresh) self.__schemaAction.triggered[()].connect(self.showSchema)
--- a/Tasks/TaskFilterConfigDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Tasks/TaskFilterConfigDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -29,10 +29,10 @@ self.setupUi(self) self.typeCombo.addItem("", Task.TypeNone) - self.typeCombo.addItem(self.trUtf8("Bugfix"), Task.TypeFixme) - self.typeCombo.addItem(self.trUtf8("Warning"), Task.TypeWarning) - self.typeCombo.addItem(self.trUtf8("ToDo"), Task.TypeTodo) - self.typeCombo.addItem(self.trUtf8("Note"), Task.TypeNote) + self.typeCombo.addItem(self.tr("Bugfix"), Task.TypeFixme) + self.typeCombo.addItem(self.tr("Warning"), Task.TypeWarning) + self.typeCombo.addItem(self.tr("ToDo"), Task.TypeTodo) + self.typeCombo.addItem(self.tr("Note"), Task.TypeNote) if taskFilter.summaryFilter is None or \ not taskFilter.summaryFilter.pattern():
--- a/Tasks/TaskViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Tasks/TaskViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -54,8 +54,8 @@ self.setSortingEnabled(True) self.__headerItem = QTreeWidgetItem( - ["", "", self.trUtf8("Summary"), self.trUtf8("Filename"), - self.trUtf8("Line"), ""]) + ["", "", self.tr("Summary"), self.tr("Filename"), + self.tr("Line"), ""]) self.__headerItem.setIcon( 0, UI.PixmapCache.getIcon("taskCompleted.png")) self.__headerItem.setIcon( @@ -78,78 +78,78 @@ self.__projectTasksSaveTimer = AutoSaver(self, self.saveProjectTasks) self.__projectTasksMenu = QMenu( - self.trUtf8("P&roject Tasks"), self) + self.tr("P&roject Tasks"), self) self.__projectTasksMenu.addAction( - self.trUtf8("&Regenerate project tasks"), + self.tr("&Regenerate project tasks"), self.__regenerateProjectTasks) self.__projectTasksMenu.addSeparator() self.__projectTasksMenu.addAction( - self.trUtf8("&Configure scan options"), + self.tr("&Configure scan options"), self.__configureProjectTasksScanOptions) self.__menu = QMenu(self) - self.__menu.addAction(self.trUtf8("&New Task..."), self.__newTask) + self.__menu.addAction(self.tr("&New Task..."), self.__newTask) self.__menu.addSeparator() self.projectTasksMenuItem = self.__menu.addMenu( self.__projectTasksMenu) self.__menu.addSeparator() self.gotoItem = self.__menu.addAction( - self.trUtf8("&Go To"), self.__goToTask) + self.tr("&Go To"), self.__goToTask) self.__menu.addSeparator() self.copyItem = self.__menu.addAction( - self.trUtf8("&Copy"), self.__copyTask) + self.tr("&Copy"), self.__copyTask) self.pasteItem = self.__menu.addAction( - self.trUtf8("&Paste"), self.__pasteTask) + self.tr("&Paste"), self.__pasteTask) self.deleteItem = self.__menu.addAction( - self.trUtf8("&Delete"), self.__deleteTask) + self.tr("&Delete"), self.__deleteTask) self.__menu.addSeparator() self.markCompletedItem = self.__menu.addAction( - self.trUtf8("&Mark Completed"), self.__markCompleted) + self.tr("&Mark Completed"), self.__markCompleted) self.__menu.addAction( - self.trUtf8("Delete Completed &Tasks"), self.__deleteCompleted) + self.tr("Delete Completed &Tasks"), self.__deleteCompleted) self.__menu.addSeparator() self.__menu.addAction( - self.trUtf8("P&roperties..."), self.__editTaskProperties) + self.tr("P&roperties..."), self.__editTaskProperties) self.__menu.addSeparator() self.__menuFilteredAct = self.__menu.addAction( - self.trUtf8("&Filtered display")) + self.tr("&Filtered display")) self.__menuFilteredAct.setCheckable(True) self.__menuFilteredAct.setChecked(False) self.__menuFilteredAct.triggered[bool].connect(self.__activateFilter) self.__menu.addAction( - self.trUtf8("Filter c&onfiguration..."), self.__configureFilter) + self.tr("Filter c&onfiguration..."), self.__configureFilter) self.__menu.addSeparator() self.__menu.addAction( - self.trUtf8("Resi&ze columns"), self.__resizeColumns) + self.tr("Resi&ze columns"), self.__resizeColumns) 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("&New Task..."), self.__newTask) + self.__backMenu.addAction(self.tr("&New Task..."), self.__newTask) self.__backMenu.addSeparator() self.backProjectTasksMenuItem = self.__backMenu.addMenu( self.__projectTasksMenu) self.__backMenu.addSeparator() self.backPasteItem = self.__backMenu.addAction( - self.trUtf8("&Paste"), self.__pasteTask) + self.tr("&Paste"), self.__pasteTask) self.__backMenu.addSeparator() self.__backMenu.addAction( - self.trUtf8("Delete Completed &Tasks"), self.__deleteCompleted) + self.tr("Delete Completed &Tasks"), self.__deleteCompleted) self.__backMenu.addSeparator() self.__backMenuFilteredAct = self.__backMenu.addAction( - self.trUtf8("&Filtered display")) + self.tr("&Filtered display")) self.__backMenuFilteredAct.setCheckable(True) self.__backMenuFilteredAct.setChecked(False) self.__backMenuFilteredAct.triggered[bool].connect( self.__activateFilter) self.__backMenu.addAction( - self.trUtf8("Filter c&onfiguration..."), self.__configureFilter) + self.tr("Filter c&onfiguration..."), self.__configureFilter) self.__backMenu.addSeparator() self.__backMenu.addAction( - self.trUtf8("Resi&ze columns"), self.__resizeColumns) + self.tr("Resi&ze columns"), self.__resizeColumns) self.__backMenu.addSeparator() self.__backMenu.addAction( - self.trUtf8("Configure..."), self.__configure) + self.tr("Configure..."), self.__configure) self.__activating = False @@ -477,8 +477,8 @@ if on and not self.taskFilter.hasActiveFilter(): res = E5MessageBox.yesNo( self, - self.trUtf8("Activate task filter"), - self.trUtf8( + self.tr("Activate task filter"), + self.tr( """The task filter doesn't have any active filters.""" """ Do you want to configure the filter settings?"""), yesDefault=True) @@ -509,9 +509,9 @@ """ filter, ok = QInputDialog.getText( self, - self.trUtf8("Scan Filter Patterns"), - self.trUtf8("Enter filename patterns of files" - " to be excluded separated by a comma:"), + self.tr("Scan Filter Patterns"), + self.tr("Enter filename patterns of files" + " to be excluded separated by a comma:"), QLineEdit.Normal, self.projectTasksScanFilter) if ok: @@ -543,14 +543,14 @@ # now process them progress = E5ProgressDialog( - self.trUtf8("Extracting project tasks..."), - self.trUtf8("Abort"), 0, len(files), self.trUtf8("%v/%m Files")) + self.tr("Extracting project tasks..."), + self.tr("Abort"), 0, len(files), self.tr("%v/%m Files")) progress.setMinimumDuration(0) count = 0 for file in files: progress.setLabelText( - self.trUtf8("Extracting project tasks...\n{0}").format(file)) + self.tr("Extracting project tasks...\n{0}").format(file)) progress.setValue(count) QApplication.processEvents() if progress.wasCanceled():
--- a/Templates/TemplateMultipleVariablesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Templates/TemplateMultipleVariablesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -101,9 +101,9 @@ self.TemplateMultipleVariablesDialogLayout.addLayout(layout1) # set the texts of the standard widgets - self.setWindowTitle(self.trUtf8("Enter Template Variables")) - self.okButton.setText(self.trUtf8("&OK")) - self.cancelButton.setText(self.trUtf8("&Cancel")) + self.setWindowTitle(self.tr("Enter Template Variables")) + self.okButton.setText(self.tr("&OK")) + self.cancelButton.setText(self.tr("&Cancel")) # polish up the dialog self.resize(QSize(400, 480).expandedTo(self.minimumSizeHint()))
--- a/Templates/TemplatePropertiesDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Templates/TemplatePropertiesDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -32,7 +32,7 @@ self.setupUi(self) if not groupMode: - self.nameEdit.setWhatsThis(self.trUtf8( + self.nameEdit.setWhatsThis(self.tr( """<b>Template name<b><p>Enter the name of the template.""" """ Templates may be autocompleted upon this name.""" """ In order to support autocompletion. the template name""" @@ -44,7 +44,7 @@ self.nameEdit.setValidator(self.__nameValidator) import QScintilla.Lexers - self.languages = [("All", self.trUtf8("All"))] + self.languages = [("All", self.tr("All"))] supportedLanguages = QScintilla.Lexers.getSupportedLanguages() languages = sorted(supportedLanguages.keys()) for language in languages: @@ -56,11 +56,11 @@ for lang, langDisp in self.languages: langList.append(langDisp) - self.groupLabel.setText(self.trUtf8("Language:")) + self.groupLabel.setText(self.tr("Language:")) self.groupCombo.addItems(langList) self.templateLabel.setEnabled(False) self.templateEdit.setEnabled(False) - self.templateEdit.setPlainText(self.trUtf8("GROUP")) + self.templateEdit.setPlainText(self.tr("GROUP")) self.helpButton.setEnabled(False) self.descriptionLabel.hide() self.descriptionEdit.hide() @@ -94,8 +94,8 @@ if ev.key() == Qt.Key_Escape: res = E5MessageBox.yesNo( self, - self.trUtf8("Close dialog"), - self.trUtf8("""Do you really want to close the dialog?""")) + self.tr("Close dialog"), + self.tr("""Do you really want to close the dialog?""")) if not res: self.reject() @@ -106,8 +106,8 @@ """ E5MessageBox.information( self, - self.trUtf8("Template Help"), - self.trUtf8( + self.tr("Template Help"), + self.tr( """<p>To use variables in a template, you just have to""" """ enclose the variablename with $-characters. When you""" """ use the template, you will then be asked for a value"""
--- a/Templates/TemplateViewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Templates/TemplateViewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -391,36 +391,36 @@ self.__menu = QMenu(self) self.applyAct = self.__menu.addAction( - self.trUtf8("Apply"), self.__templateItemActivated) + self.tr("Apply"), self.__templateItemActivated) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8("Add entry..."), self.__addEntry) - self.__menu.addAction(self.trUtf8("Add group..."), self.__addGroup) - self.__menu.addAction(self.trUtf8("Edit..."), self.__edit) - self.__menu.addAction(self.trUtf8("Remove"), self.__remove) + self.__menu.addAction(self.tr("Add entry..."), self.__addEntry) + self.__menu.addAction(self.tr("Add group..."), self.__addGroup) + self.__menu.addAction(self.tr("Edit..."), self.__edit) + self.__menu.addAction(self.tr("Remove"), self.__remove) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8("Save"), self.save) - self.__menu.addAction(self.trUtf8("Import..."), self.__import) - self.__menu.addAction(self.trUtf8("Export..."), self.__export) - self.__menu.addAction(self.trUtf8("Reload"), self.__reload) + self.__menu.addAction(self.tr("Save"), self.save) + self.__menu.addAction(self.tr("Import..."), self.__import) + self.__menu.addAction(self.tr("Export..."), self.__export) + self.__menu.addAction(self.tr("Reload"), self.__reload) self.__menu.addSeparator() self.__menu.addAction( - self.trUtf8("Help about Templates..."), self.__showHelp) + self.tr("Help about Templates..."), self.__showHelp) 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("Add group..."), self.__addGroup) + self.__backMenu.addAction(self.tr("Add group..."), self.__addGroup) self.__backMenu.addSeparator() - self.__backMenu.addAction(self.trUtf8("Save"), self.save) - self.__backMenu.addAction(self.trUtf8("Import..."), self.__import) - self.__backMenu.addAction(self.trUtf8("Export..."), self.__export) - self.__backMenu.addAction(self.trUtf8("Reload"), self.__reload) + self.__backMenu.addAction(self.tr("Save"), self.save) + self.__backMenu.addAction(self.tr("Import..."), self.__import) + self.__backMenu.addAction(self.tr("Export..."), self.__export) + self.__backMenu.addAction(self.tr("Reload"), self.__reload) self.__backMenu.addSeparator() self.__backMenu.addAction( - self.trUtf8("Help about Templates..."), self.__showHelp) + self.tr("Help about Templates..."), self.__showHelp) self.__backMenu.addSeparator() self.__backMenu.addAction( - self.trUtf8("Configure..."), self.__configure) + self.tr("Configure..."), self.__configure) self.__activating = False self.__dirty = False @@ -523,8 +523,8 @@ itm = self.currentItem() res = E5MessageBox.yesNo( self, - self.trUtf8("Remove Template"), - self.trUtf8("""<p>Do you really want to remove <b>{0}</b>?</p>""") + self.tr("Remove Template"), + self.tr("""<p>Do you really want to remove <b>{0}</b>?</p>""") .format(itm.getName())) if not res: return @@ -550,9 +550,9 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Import Templates"), + self.tr("Import Templates"), "", - self.trUtf8("Templates Files (*.e4c);; All Files (*)")) + self.tr("Templates Files (*.e4c);; All Files (*)")) if fn: self.readTemplates(fn) @@ -564,9 +564,9 @@ """ fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Export Templates"), + self.tr("Export Templates"), "", - self.trUtf8("Templates Files (*.e4c);; All Files (*)"), + self.tr("Templates Files (*.e4c);; All Files (*)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -585,8 +585,8 @@ if self.__dirty: res = E5MessageBox.yesNo( self, - self.trUtf8("Reload Templates"), - self.trUtf8( + self.tr("Reload Templates"), + self.tr( """The templates contain unsaved changes. Shall these""" """ changes be discarded?"""), icon=E5MessageBox.Warning) @@ -604,8 +604,8 @@ """ E5MessageBox.information( self, - self.trUtf8("Template Help"), - self.trUtf8( + self.tr("Template Help"), + self.tr( """<p><b>Template groups</b> are a means of grouping""" """ individual templates. Groups have an attribute that""" """ specifies, which programming language they apply for.""" @@ -848,9 +848,9 @@ if newname in self.groups: E5MessageBox.warning( self, - self.trUtf8("Edit Template Group"), - self.trUtf8("""<p>A template group with the name""" - """ <b>{0}</b> already exists.</p>""") + self.tr("Edit Template Group"), + self.tr("""<p>A template group with the name""" + """ <b>{0}</b> already exists.</p>""") .format(newname)) return @@ -942,8 +942,8 @@ if not ok: E5MessageBox.critical( self, - self.trUtf8("Save templates"), - self.trUtf8( + self.tr("Save templates"), + self.tr( "<p>The templates file <b>{0}</b> could not be" " written.</p>") .format(filename)) @@ -976,8 +976,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Read templates"), - self.trUtf8( + self.tr("Read templates"), + self.tr( "<p>The templates file <b>{0}</b> could not be read.</p>") .format(filename))
--- a/Toolbox/Startup.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Toolbox/Startup.py Sat Jan 11 11:55:33 2014 +0100 @@ -10,7 +10,7 @@ import os import sys -from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo, QDir +from PyQt4.QtCore import QTranslator, QLocale, QLibraryInfo, QDir, QTextCodec from PyQt4.QtGui import QApplication from E5Gui.E5Application import E5Application @@ -161,6 +161,9 @@ global loaded_translators + # set the default encoding for tr() + QTextCodec.setCodecForTr(QTextCodec.codecForName("utf-8")) + translations = ("qt", "eric5") + translationFiles loc = Preferences.getUILanguage() if loc is None:
--- a/Tools/TRPreviewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Tools/TRPreviewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -57,7 +57,7 @@ self.statusBar() self.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) - self.setWindowTitle(self.trUtf8("Translations Previewer")) + self.setWindowTitle(self.tr("Translations Previewer")) self.cw = QWidget(self) self.cw.setObjectName("qt_central_widget") @@ -73,14 +73,14 @@ self.languageLayout.setObjectName("languageLayout") self.languageLabel = QLabel( - self.trUtf8("Select language file"), self.cw) + self.tr("Select language file"), self.cw) self.languageLabel.setObjectName("languageLabel") self.languageLayout.addWidget(self.languageLabel) self.languageCombo = QComboBox(self.cw) self.languageCombo.setObjectName("languageCombo") self.languageCombo.setEditable(False) - self.languageCombo.setToolTip(self.trUtf8("Select language file")) + self.languageCombo.setToolTip(self.tr("Select language file")) self.languageCombo.setSizePolicy( QSizePolicy.Expanding, QSizePolicy.Preferred) self.languageLayout.addWidget(self.languageCombo) @@ -157,9 +157,9 @@ """ self.openUIAct = QAction( UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open UI Files...'), self) - self.openUIAct.setStatusTip(self.trUtf8('Open UI files for display')) - self.openUIAct.setWhatsThis(self.trUtf8( + self.tr('&Open UI Files...'), self) + self.openUIAct.setStatusTip(self.tr('Open UI files for display')) + self.openUIAct.setWhatsThis(self.tr( """<b>Open UI Files</b>""" """<p>This opens some UI files for display.</p>""" )) @@ -167,10 +167,10 @@ self.openQMAct = QAction( UI.PixmapCache.getIcon("openQM.png"), - self.trUtf8('Open &Translation Files...'), self) - self.openQMAct.setStatusTip(self.trUtf8( + self.tr('Open &Translation Files...'), self) + self.openQMAct.setStatusTip(self.tr( 'Open Translation files for display')) - self.openQMAct.setWhatsThis(self.trUtf8( + self.openQMAct.setWhatsThis(self.tr( """<b>Open Translation Files</b>""" """<p>This opens some translation files for display.</p>""" )) @@ -178,10 +178,10 @@ self.reloadAct = QAction( UI.PixmapCache.getIcon("reload.png"), - self.trUtf8('&Reload Translations'), self) - self.reloadAct.setStatusTip(self.trUtf8( + self.tr('&Reload Translations'), self) + self.reloadAct.setStatusTip(self.tr( 'Reload the loaded translations')) - self.reloadAct.setWhatsThis(self.trUtf8( + self.reloadAct.setWhatsThis(self.tr( """<b>Reload Translations</b>""" """<p>This reloads the translations for the loaded""" """ languages.</p>""" @@ -189,11 +189,11 @@ self.reloadAct.triggered[()].connect(self.translations.reload) self.exitAct = QAction( - UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) + UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self) self.exitAct.setShortcut(QKeySequence( - self.trUtf8("Ctrl+Q", "File|Quit"))) - self.exitAct.setStatusTip(self.trUtf8('Quit the application')) - self.exitAct.setWhatsThis(self.trUtf8( + self.tr("Ctrl+Q", "File|Quit"))) + self.exitAct.setStatusTip(self.tr('Quit the application')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit</b>""" """<p>Quit the application.</p>""" )) @@ -201,10 +201,10 @@ self.whatsThisAct = QAction( UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) - self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) - self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) - self.whatsThisAct.setWhatsThis(self.trUtf8( + self.tr('&What\'s This?'), self) + self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) + 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""" @@ -214,36 +214,36 @@ )) self.whatsThisAct.triggered[()].connect(self.__whatsThis) - self.aboutAct = QAction(self.trUtf8('&About'), self) - self.aboutAct.setStatusTip(self.trUtf8( + self.aboutAct = QAction(self.tr('&About'), self) + 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>""" )) self.aboutAct.triggered[()].connect(self.__about) - self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) + self.aboutQtAct = QAction(self.tr('About &Qt'), self) 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>""" )) self.aboutQtAct.triggered[()].connect(self.__aboutQt) - self.tileAct = QAction(self.trUtf8('&Tile'), self) - self.tileAct.setStatusTip(self.trUtf8('Tile the windows')) - self.tileAct.setWhatsThis(self.trUtf8( + self.tileAct = QAction(self.tr('&Tile'), self) + self.tileAct.setStatusTip(self.tr('Tile the windows')) + self.tileAct.setWhatsThis(self.tr( """<b>Tile the windows</b>""" """<p>Rearrange and resize the windows so that they are""" """ tiled.</p>""" )) self.tileAct.triggered[()].connect(self.preview.tileSubWindows) - self.cascadeAct = QAction(self.trUtf8('&Cascade'), self) - self.cascadeAct.setStatusTip(self.trUtf8('Cascade the windows')) - self.cascadeAct.setWhatsThis(self.trUtf8( + self.cascadeAct = QAction(self.tr('&Cascade'), self) + self.cascadeAct.setStatusTip(self.tr('Cascade the windows')) + self.cascadeAct.setWhatsThis(self.tr( """<b>Cascade the windows</b>""" """<p>Rearrange and resize the windows so that they are""" """ cascaded.</p>""" @@ -251,19 +251,19 @@ self.cascadeAct.triggered[()].connect(self.preview.cascadeSubWindows) self.closeAct = QAction( - UI.PixmapCache.getIcon("close.png"), self.trUtf8('&Close'), self) - self.closeAct.setShortcut(QKeySequence(self.trUtf8( + UI.PixmapCache.getIcon("close.png"), self.tr('&Close'), self) + self.closeAct.setShortcut(QKeySequence(self.tr( "Ctrl+W", "File|Close"))) - self.closeAct.setStatusTip(self.trUtf8('Close the current window')) - self.closeAct.setWhatsThis(self.trUtf8( + self.closeAct.setStatusTip(self.tr('Close the current window')) + self.closeAct.setWhatsThis(self.tr( """<b>Close Window</b>""" """<p>Close the current window.</p>""" )) self.closeAct.triggered[()].connect(self.preview.closeWidget) - self.closeAllAct = QAction(self.trUtf8('Clos&e All'), self) - self.closeAllAct.setStatusTip(self.trUtf8('Close all windows')) - self.closeAllAct.setWhatsThis(self.trUtf8( + self.closeAllAct = QAction(self.tr('Clos&e All'), self) + self.closeAllAct.setStatusTip(self.tr('Close all windows')) + self.closeAllAct.setWhatsThis(self.tr( """<b>Close All Windows</b>""" """<p>Close all windows.</p>""" )) @@ -275,7 +275,7 @@ """ mb = self.menuBar() - menu = mb.addMenu(self.trUtf8('&File')) + menu = mb.addMenu(self.tr('&File')) menu.setTearOffEnabled(True) menu.addAction(self.openUIAct) menu.addAction(self.openQMAct) @@ -286,14 +286,14 @@ menu.addSeparator() menu.addAction(self.exitAct) - self.windowMenu = mb.addMenu(self.trUtf8('&Window')) + self.windowMenu = mb.addMenu(self.tr('&Window')) self.windowMenu.setTearOffEnabled(True) self.windowMenu.aboutToShow.connect(self.__showWindowMenu) self.windowMenu.triggered.connect(self.preview.toggleSelectedWidget) 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) @@ -304,7 +304,7 @@ """ Private method to create the toolbars. """ - filetb = self.addToolBar(self.trUtf8("File")) + filetb = self.addToolBar(self.tr("File")) filetb.setIconSize(UI.Config.ToolBarIconSize) filetb.addAction(self.openUIAct) filetb.addAction(self.openQMAct) @@ -314,7 +314,7 @@ filetb.addSeparator() filetb.addAction(self.exitAct) - helptb = self.addToolBar(self.trUtf8("Help")) + helptb = self.addToolBar(self.tr("Help")) helptb.setIconSize(UI.Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) @@ -350,8 +350,8 @@ """ E5MessageBox.about( self, - self.trUtf8("TR Previewer"), - self.trUtf8( + self.tr("TR Previewer"), + self.tr( """<h3> About TR Previewer </h3>""" """<p>The TR Previewer loads and displays Qt User-Interface""" """ files and translation files and shows dialogs for a""" @@ -363,7 +363,7 @@ """ Private slot to show info about Qt. """ - E5MessageBox.aboutQt(self, self.trUtf8("TR Previewer")) + E5MessageBox.aboutQt(self, self.tr("TR Previewer")) def __openWidget(self): """ @@ -371,9 +371,9 @@ """ fileNameList = E5FileDialog.getOpenFileNames( None, - self.trUtf8("Select UI files"), + self.tr("Select UI files"), "", - self.trUtf8("Qt User-Interface Files (*.ui)")) + self.tr("Qt User-Interface Files (*.ui)")) for fileName in fileNameList: self.preview.loadWidget(fileName) @@ -386,9 +386,9 @@ """ fileNameList = E5FileDialog.getOpenFileNames( None, - self.trUtf8("Select translation files"), + self.tr("Select translation files"), "", - self.trUtf8("Qt Translation Files (*.qm)")) + self.tr("Qt Translation Files (*.qm)")) first = True for fileName in fileNameList: @@ -477,8 +477,8 @@ if ntr.name is None: E5MessageBox.warning( self.parent(), - self.trUtf8("Set Translator"), - self.trUtf8( + self.tr("Set Translator"), + self.tr( """<p>The translation filename <b>{0}</b>""" """ is invalid.</p>""").format(fileName)) return @@ -507,8 +507,8 @@ if trans is None: E5MessageBox.warning( self.parent(), - self.trUtf8("Set Translator"), - self.trUtf8( + self.tr("Set Translator"), + self.tr( """<p>The translator <b>{0}</b> is not known.</p>""") .format(name)) return @@ -650,9 +650,9 @@ E5MessageBox.warning( self.parent(), - self.trUtf8("Load Translator"), - self.trUtf8("""<p>The translation file <b>{0}</b> could""" - """ not be loaded.</p>""").format(transFileName)) + self.tr("Load Translator"), + self.tr("""<p>The translation file <b>{0}</b> could""" + """ not be loaded.</p>""").format(transFileName)) return None def hasTranslations(self): @@ -724,8 +724,8 @@ if not self.__widget: E5MessageBox.warning( self, - self.trUtf8("Load UI File"), - self.trUtf8( + self.tr("Load UI File"), + self.tr( """<p>The file <b>{0}</b> could not be loaded.</p>""") .format(self.__uiFileName)) self.__valid = False @@ -780,8 +780,8 @@ if not name: E5MessageBox.warning( self, - self.trUtf8("Load UI File"), - self.trUtf8( + self.tr("Load UI File"), + self.tr( """<p>The file <b>{0}</b> could not be loaded.</p>""") .format(uiFileName)) return
--- a/Tools/TrayStarter.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Tools/TrayStarter.py Sat Jan 11 11:55:33 2014 +0100 @@ -54,97 +54,97 @@ self.activated.connect(self.__activated) - self.__menu = QMenu(self.trUtf8("Eric5 tray starter")) + self.__menu = QMenu(self.tr("Eric5 tray starter")) self.recentProjectsMenu = QMenu( - self.trUtf8('Recent Projects'), self.__menu) + self.tr('Recent Projects'), self.__menu) self.recentProjectsMenu.aboutToShow.connect( self.__showRecentProjectsMenu) self.recentProjectsMenu.triggered.connect(self.__openRecent) self.recentMultiProjectsMenu = \ - QMenu(self.trUtf8('Recent Multiprojects'), self.__menu) + QMenu(self.tr('Recent Multiprojects'), self.__menu) self.recentMultiProjectsMenu.aboutToShow.connect( self.__showRecentMultiProjectsMenu) self.recentMultiProjectsMenu.triggered.connect(self.__openRecent) - self.recentFilesMenu = QMenu(self.trUtf8('Recent Files'), self.__menu) + self.recentFilesMenu = QMenu(self.tr('Recent Files'), self.__menu) self.recentFilesMenu.aboutToShow.connect(self.__showRecentFilesMenu) self.recentFilesMenu.triggered.connect(self.__openRecent) act = self.__menu.addAction( - self.trUtf8("Eric5 tray starter"), self.__about) + self.tr("Eric5 tray starter"), self.__about) font = act.font() font.setBold(True) act.setFont(font) self.__menu.addSeparator() self.__menu.addAction( - self.trUtf8("QRegExp editor"), self.__startQRegExp) + self.tr("QRegExp editor"), self.__startQRegExp) self.__menu.addAction( - self.trUtf8("Python re editor"), self.__startPyRe) + self.tr("Python re editor"), self.__startPyRe) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("uiPreviewer.png"), - self.trUtf8("UI Previewer"), self.__startUIPreviewer) + self.tr("UI Previewer"), self.__startUIPreviewer) self.__menu.addAction( UI.PixmapCache.getIcon("trPreviewer.png"), - self.trUtf8("Translations Previewer"), self.__startTRPreviewer) + self.tr("Translations Previewer"), self.__startTRPreviewer) self.__menu.addAction( UI.PixmapCache.getIcon("unittest.png"), - self.trUtf8("Unittest"), self.__startUnittest) + self.tr("Unittest"), self.__startUnittest) self.__menu.addAction( UI.PixmapCache.getIcon("ericWeb.png"), - self.trUtf8("eric5 Web Browser"), self.__startHelpViewer) + self.tr("eric5 Web Browser"), self.__startHelpViewer) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("diffFiles.png"), - self.trUtf8("Compare Files"), self.__startDiff) + self.tr("Compare Files"), self.__startDiff) self.__menu.addAction( UI.PixmapCache.getIcon("compareFiles.png"), - self.trUtf8("Compare Files side by side"), self.__startCompare) + self.tr("Compare Files side by side"), self.__startCompare) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("sqlBrowser.png"), - self.trUtf8("SQL Browser"), self.__startSqlBrowser) + self.tr("SQL Browser"), self.__startSqlBrowser) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("ericSnap.png"), - self.trUtf8("Snapshot"), self.__startSnapshot) + self.tr("Snapshot"), self.__startSnapshot) self.__menu.addAction( UI.PixmapCache.getIcon("iconEditor.png"), - self.trUtf8("Icon Editor"), self.__startIconEditor) + self.tr("Icon Editor"), self.__startIconEditor) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("pluginInstall.png"), - self.trUtf8("Install Plugin"), self.__startPluginInstall) + self.tr("Install Plugin"), self.__startPluginInstall) self.__menu.addAction( UI.PixmapCache.getIcon("pluginUninstall.png"), - self.trUtf8("Uninstall Plugin"), self.__startPluginUninstall) + self.tr("Uninstall Plugin"), self.__startPluginUninstall) self.__menu.addAction( UI.PixmapCache.getIcon("pluginRepository.png"), - self.trUtf8("Plugin Repository"), self.__startPluginRepository) + self.tr("Plugin Repository"), self.__startPluginRepository) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("configure.png"), - self.trUtf8('Preferences'), self.__startPreferences) + self.tr('Preferences'), self.__startPreferences) self.__menu.addAction( UI.PixmapCache.getIcon("erict.png"), - self.trUtf8("eric5 IDE"), self.__startEric) + self.tr("eric5 IDE"), self.__startEric) self.__menu.addAction( UI.PixmapCache.getIcon("editor.png"), - self.trUtf8("eric5 Mini Editor"), self.__startMiniEditor) + self.tr("eric5 Mini Editor"), self.__startMiniEditor) self.__menu.addSeparator() self.__menu.addAction( UI.PixmapCache.getIcon("configure.png"), - self.trUtf8('Configure Tray Starter'), self.__showPreferences) + self.tr('Configure Tray Starter'), self.__showPreferences) self.__menu.addSeparator() # recent files @@ -159,7 +159,7 @@ self.__menu.addAction( UI.PixmapCache.getIcon("exit.png"), - self.trUtf8('Quit'), qApp.quit) + self.tr('Quit'), qApp.quit) def __loadRecentProjects(self): """ @@ -239,12 +239,12 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start the process.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(applPath), - self.trUtf8('OK')) + self.tr('OK')) def __startMiniEditor(self): """
--- a/Tools/UIPreviewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/Tools/UIPreviewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -52,7 +52,7 @@ self.statusBar() self.setWindowIcon(UI.PixmapCache.getIcon("eric.png")) - self.setWindowTitle(self.trUtf8("UI Previewer")) + self.setWindowTitle(self.tr("UI Previewer")) self.cw = QWidget(self) self.cw.setObjectName("centralWidget") @@ -67,14 +67,14 @@ self.styleLayout.setSpacing(6) self.styleLayout.setObjectName("styleLayout") - self.styleLabel = QLabel(self.trUtf8("Select GUI Theme"), self.cw) + self.styleLabel = QLabel(self.tr("Select GUI Theme"), self.cw) self.styleLabel.setObjectName("styleLabel") self.styleLayout.addWidget(self.styleLabel) self.styleCombo = QComboBox(self.cw) self.styleCombo.setObjectName("styleCombo") self.styleCombo.setEditable(False) - self.styleCombo.setToolTip(self.trUtf8("Select the GUI Theme")) + self.styleCombo.setToolTip(self.tr("Select the GUI Theme")) self.styleLayout.addWidget(self.styleCombo) self.styleCombo.addItems(list(QStyleFactory().keys())) currentStyle = Preferences.Prefs.settings.value('UIPreviewer/style') @@ -126,11 +126,11 @@ """ self.openAct = QAction( UI.PixmapCache.getIcon("openUI.png"), - self.trUtf8('&Open File'), self) + self.tr('&Open File'), self) self.openAct.setShortcut( - QKeySequence(self.trUtf8("Ctrl+O", "File|Open"))) - self.openAct.setStatusTip(self.trUtf8('Open a UI file for display')) - self.openAct.setWhatsThis(self.trUtf8( + QKeySequence(self.tr("Ctrl+O", "File|Open"))) + self.openAct.setStatusTip(self.tr('Open a UI file for display')) + self.openAct.setWhatsThis(self.tr( """<b>Open File</b>""" """<p>This opens a new UI file for display.</p>""" )) @@ -138,11 +138,11 @@ self.printAct = QAction( UI.PixmapCache.getIcon("print.png"), - self.trUtf8('&Print'), self) + self.tr('&Print'), self) self.printAct.setShortcut( - QKeySequence(self.trUtf8("Ctrl+P", "File|Print"))) - self.printAct.setStatusTip(self.trUtf8('Print a screen capture')) - self.printAct.setWhatsThis(self.trUtf8( + QKeySequence(self.tr("Ctrl+P", "File|Print"))) + self.printAct.setStatusTip(self.tr('Print a screen capture')) + self.printAct.setWhatsThis(self.tr( """<b>Print</b>""" """<p>Print a screen capture.</p>""" )) @@ -150,10 +150,10 @@ self.printPreviewAct = QAction( UI.PixmapCache.getIcon("printPreview.png"), - self.trUtf8('Print Preview'), self) - self.printPreviewAct.setStatusTip(self.trUtf8( + self.tr('Print Preview'), self) + self.printPreviewAct.setStatusTip(self.tr( 'Print preview a screen capture')) - self.printPreviewAct.setWhatsThis(self.trUtf8( + self.printPreviewAct.setWhatsThis(self.tr( """<b>Print Preview</b>""" """<p>Print preview a screen capture.</p>""" )) @@ -161,35 +161,35 @@ self.imageAct = QAction( UI.PixmapCache.getIcon("screenCapture.png"), - self.trUtf8('&Screen Capture'), self) + self.tr('&Screen Capture'), self) self.imageAct.setShortcut( - QKeySequence(self.trUtf8("Ctrl+S", "File|Screen Capture"))) - self.imageAct.setStatusTip(self.trUtf8( + QKeySequence(self.tr("Ctrl+S", "File|Screen Capture"))) + self.imageAct.setStatusTip(self.tr( 'Save a screen capture to an image file')) - self.imageAct.setWhatsThis(self.trUtf8( + self.imageAct.setWhatsThis(self.tr( """<b>Screen Capture</b>""" """<p>Save a screen capture to an image file.</p>""" )) self.imageAct.triggered[()].connect(self.__saveImage) self.exitAct = QAction( - UI.PixmapCache.getIcon("exit.png"), self.trUtf8('&Quit'), self) + UI.PixmapCache.getIcon("exit.png"), self.tr('&Quit'), self) self.exitAct.setShortcut( - QKeySequence(self.trUtf8("Ctrl+Q", "File|Quit"))) - self.exitAct.setStatusTip(self.trUtf8('Quit the application')) - self.exitAct.setWhatsThis(self.trUtf8( + QKeySequence(self.tr("Ctrl+Q", "File|Quit"))) + self.exitAct.setStatusTip(self.tr('Quit the application')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit</b>""" """<p>Quit the application.</p>""" )) self.exitAct.triggered[()].connect(qApp.closeAllWindows) self.copyAct = QAction( - UI.PixmapCache.getIcon("editCopy.png"), self.trUtf8('&Copy'), self) + UI.PixmapCache.getIcon("editCopy.png"), self.tr('&Copy'), self) self.copyAct.setShortcut( - QKeySequence(self.trUtf8("Ctrl+C", "Edit|Copy"))) + QKeySequence(self.tr("Ctrl+C", "Edit|Copy"))) self.copyAct.setStatusTip( - self.trUtf8('Copy screen capture to clipboard')) - self.copyAct.setWhatsThis(self.trUtf8( + self.tr('Copy screen capture to clipboard')) + self.copyAct.setWhatsThis(self.tr( """<b>Copy</b>""" """<p>Copy screen capture to clipboard.</p>""" )) @@ -197,10 +197,10 @@ self.whatsThisAct = QAction( UI.PixmapCache.getIcon("whatsThis.png"), - self.trUtf8('&What\'s This?'), self) - self.whatsThisAct.setShortcut(QKeySequence(self.trUtf8("Shift+F1"))) - self.whatsThisAct.setStatusTip(self.trUtf8('Context sensitive help')) - self.whatsThisAct.setWhatsThis(self.trUtf8( + self.tr('&What\'s This?'), self) + self.whatsThisAct.setShortcut(QKeySequence(self.tr("Shift+F1"))) + 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""" @@ -210,19 +210,19 @@ )) self.whatsThisAct.triggered[()].connect(self.__whatsThis) - self.aboutAct = QAction(self.trUtf8('&About'), self) - self.aboutAct.setStatusTip(self.trUtf8( + self.aboutAct = QAction(self.tr('&About'), self) + 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>""" )) self.aboutAct.triggered[()].connect(self.__about) - self.aboutQtAct = QAction(self.trUtf8('About &Qt'), self) + self.aboutQtAct = QAction(self.tr('About &Qt'), self) 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>""" )) @@ -234,7 +234,7 @@ """ mb = self.menuBar() - menu = mb.addMenu(self.trUtf8('&File')) + menu = mb.addMenu(self.tr('&File')) menu.setTearOffEnabled(True) menu.addAction(self.openAct) menu.addAction(self.imageAct) @@ -244,13 +244,13 @@ 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) 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) @@ -261,7 +261,7 @@ """ Private method to create the toolbars. """ - filetb = self.addToolBar(self.trUtf8("File")) + filetb = self.addToolBar(self.tr("File")) filetb.setIconSize(UI.Config.ToolBarIconSize) filetb.addAction(self.openAct) filetb.addAction(self.imageAct) @@ -271,11 +271,11 @@ filetb.addSeparator() filetb.addAction(self.exitAct) - edittb = self.addToolBar(self.trUtf8("Edit")) + edittb = self.addToolBar(self.tr("Edit")) edittb.setIconSize(UI.Config.ToolBarIconSize) edittb.addAction(self.copyAct) - helptb = self.addToolBar(self.trUtf8("Help")) + helptb = self.addToolBar(self.tr("Help")) helptb.setIconSize(UI.Config.ToolBarIconSize) helptb.addAction(self.whatsThisAct) @@ -300,8 +300,8 @@ """ E5MessageBox.about( self, - self.trUtf8("UI Previewer"), - self.trUtf8( + self.tr("UI Previewer"), + self.tr( """<h3> About UI Previewer </h3>""" """<p>The UI Previewer loads and displays Qt User-Interface""" """ files with various styles, which are selectable via a""" @@ -313,7 +313,7 @@ """ Private slot to show info about Qt. """ - E5MessageBox.aboutQt(self, self.trUtf8("UI Previewer")) + E5MessageBox.aboutQt(self, self.tr("UI Previewer")) def __openFile(self): """ @@ -321,9 +321,9 @@ """ fn = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select UI file"), + self.tr("Select UI file"), self.currentFile, - self.trUtf8("Qt User-Interface Files (*.ui)")) + self.tr("Qt User-Interface Files (*.ui)")) if fn: self.__loadFile(fn) @@ -358,8 +358,8 @@ else: E5MessageBox.warning( self, - self.trUtf8("Load UI File"), - self.trUtf8( + self.tr("Load UI File"), + self.tr( """<p>The file <b>{0}</b> could not be loaded.</p>""") .format(fn)) self.__updateActions() @@ -447,8 +447,8 @@ if self.mainWidget is None: E5MessageBox.critical( self, - self.trUtf8("Save Image"), - self.trUtf8("""There is no UI file loaded.""")) + self.tr("Save Image"), + self.tr("""There is no UI file loaded.""")) return defaultExt = "PNG" @@ -457,11 +457,11 @@ for format in formats: filters = "{0}*.{1} ".format( filters, bytes(format).decode().lower()) - filter = self.trUtf8("Images ({0})").format(filters[:-1]) + filter = self.tr("Images ({0})").format(filters[:-1]) fname = E5FileDialog.getSaveFileName( self, - self.trUtf8("Save Image"), + self.tr("Save Image"), "", filter) if not fname: @@ -480,8 +480,8 @@ if not pix.save(fname, str(ext)): E5MessageBox.critical( self, - self.trUtf8("Save Image"), - self.trUtf8( + self.tr("Save Image"), + self.tr( """<p>The file <b>{0}</b> could not be saved.</p>""") .format(fname)) @@ -492,8 +492,8 @@ if self.mainWidget is None: E5MessageBox.critical( self, - self.trUtf8("Save Image"), - self.trUtf8("""There is no UI file loaded.""")) + self.tr("Save Image"), + self.tr("""There is no UI file loaded.""")) return cb = QApplication.clipboard() @@ -510,8 +510,8 @@ if self.mainWidget is None: E5MessageBox.critical( self, - self.trUtf8("Print Image"), - self.trUtf8("""There is no UI file loaded.""")) + self.tr("Print Image"), + self.tr("""There is no UI file loaded.""")) return settings = Preferences.Prefs.settings @@ -532,7 +532,7 @@ printDialog = QPrintDialog(printer, self) if printDialog.exec_() == QDialog.Accepted: - self.statusBar().showMessage(self.trUtf8("Printing the image...")) + self.statusBar().showMessage(self.tr("Printing the image...")) self.__print(printer) settings.setValue("UIPreviewer/printername", printer.printerName()) @@ -542,7 +542,7 @@ settings.setValue("UIPreviewer/colormode", printer.colorMode()) self.statusBar().showMessage( - self.trUtf8("Image sent to printer..."), 2000) + self.tr("Image sent to printer..."), 2000) def __printPreviewImage(self): """ @@ -553,8 +553,8 @@ if self.mainWidget is None: E5MessageBox.critical( self, - self.trUtf8("Print Preview"), - self.trUtf8("""There is no UI file loaded.""")) + self.tr("Print Preview"), + self.tr("""There is no UI file loaded.""")) return settings = Preferences.Prefs.settings
--- a/UI/Browser.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/Browser.py Sat Jan 11 11:55:33 2014 +0100 @@ -255,7 +255,7 @@ self.__configure) # create the attribute menu - self.gotoMenu = QMenu(self.trUtf8("Goto"), self) + self.gotoMenu = QMenu(self.tr("Goto"), self) self.gotoMenu.aboutToShow.connect(self._showGotoMenu) self.gotoMenu.triggered.connect(self._gotoAttribute) @@ -360,7 +360,7 @@ for lineno in sorted(linenos): act = self.gotoMenu.addAction( - self.trUtf8("Line {0}".format(lineno))) + self.tr("Line {0}".format(lineno))) act.setData([fileName, lineno]) def _gotoAttribute(self, act):
--- a/UI/CompareDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/CompareDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -103,9 +103,9 @@ self.file2Completer = E5FileCompleter(self.file2Edit) self.diffButton = self.buttonBox.addButton( - self.trUtf8("Compare"), QDialogButtonBox.ActionRole) + self.tr("Compare"), QDialogButtonBox.ActionRole) self.diffButton.setToolTip( - self.trUtf8("Press to perform the comparison of the two files")) + self.tr("Press to perform the comparison of the two files")) self.diffButton.setEnabled(False) self.diffButton.setDefault(True) @@ -114,10 +114,10 @@ self.downButton.setIcon(UI.PixmapCache.getIcon("1downarrow.png")) self.lastButton.setIcon(UI.PixmapCache.getIcon("2downarrow.png")) - self.totalLabel.setText(self.trUtf8('Total: {0}').format(0)) - self.changedLabel.setText(self.trUtf8('Changed: {0}').format(0)) - self.addedLabel.setText(self.trUtf8('Added: {0}').format(0)) - self.deletedLabel.setText(self.trUtf8('Deleted: {0}').format(0)) + self.totalLabel.setText(self.tr('Total: {0}').format(0)) + self.changedLabel.setText(self.tr('Changed: {0}').format(0)) + self.addedLabel.setText(self.tr('Added: {0}').format(0)) + self.deletedLabel.setText(self.tr('Deleted: {0}').format(0)) self.updateInterval = 20 # update every 20 lines @@ -234,8 +234,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Compare Files"), - self.trUtf8( + self.tr("Compare Files"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(filename1)) return @@ -248,8 +248,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Compare Files"), - self.trUtf8( + self.tr("Compare Files"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(filename2)) return @@ -351,11 +351,11 @@ len(self.diffParas) > 0 and (self.vsb1.isVisible() or self.vsb2.isVisible())) - self.totalLabel.setText(self.trUtf8('Total: {0}') + self.totalLabel.setText(self.tr('Total: {0}') .format(added + deleted + changed)) - self.changedLabel.setText(self.trUtf8('Changed: {0}').format(changed)) - self.addedLabel.setText(self.trUtf8('Added: {0}').format(added)) - self.deletedLabel.setText(self.trUtf8('Deleted: {0}').format(deleted)) + self.changedLabel.setText(self.tr('Changed: {0}').format(changed)) + self.addedLabel.setText(self.tr('Added: {0}').format(added)) + self.deletedLabel.setText(self.tr('Deleted: {0}').format(deleted)) def __moveTextToCurrentDiffPos(self): """ @@ -441,7 +441,7 @@ """ filename = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select file to compare"), + self.tr("Select file to compare"), lineEdit.text(), "")
--- a/UI/DiffDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/DiffDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -218,13 +218,13 @@ self.file2Completer = E5FileCompleter(self.file2Edit) self.diffButton = self.buttonBox.addButton( - self.trUtf8("Compare"), QDialogButtonBox.ActionRole) + self.tr("Compare"), QDialogButtonBox.ActionRole) self.diffButton.setToolTip( - self.trUtf8("Press to perform the comparison of the two files")) + self.tr("Press to perform the comparison of the two files")) self.saveButton = self.buttonBox.addButton( - self.trUtf8("Save"), QDialogButtonBox.ActionRole) + self.tr("Save"), QDialogButtonBox.ActionRole) self.saveButton.setToolTip( - self.trUtf8("Save the output to a patch file")) + self.tr("Save the output to a patch file")) self.diffButton.setEnabled(False) self.saveButton.setEnabled(False) self.diffButton.setDefault(True) @@ -289,9 +289,9 @@ fname, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( self, - self.trUtf8("Save Diff"), + self.tr("Save Diff"), fname, - self.trUtf8("Patch Files (*.diff)"), + self.tr("Patch Files (*.diff)"), None, E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -306,9 +306,9 @@ if QFileInfo(fname).exists(): res = E5MessageBox.yesNo( self, - self.trUtf8("Save Diff"), - self.trUtf8("<p>The patch file <b>{0}</b> already exists." - " Overwrite it?</p>").format(fname), + self.tr("Save Diff"), + self.tr("<p>The patch file <b>{0}</b> already exists." + " Overwrite it?</p>").format(fname), icon=E5MessageBox.Warning) if not res: return @@ -324,8 +324,8 @@ f.close() except IOError as why: E5MessageBox.critical( - self, self.trUtf8('Save Diff'), - self.trUtf8( + self, self.tr('Save Diff'), + self.tr( '<p>The patch file <b>{0}</b> could not be saved.<br />' 'Reason: {1}</p>').format(fname, str(why))) @@ -346,8 +346,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Compare Files"), - self.trUtf8( + self.tr("Compare Files"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(self.filename1)) return @@ -364,8 +364,8 @@ except IOError: E5MessageBox.critical( self, - self.trUtf8("Compare Files"), - self.trUtf8( + self.tr("Compare Files"), + self.tr( """<p>The file <b>{0}</b> could not be read.</p>""") .format(self.filename2)) return @@ -432,7 +432,7 @@ if paras == 0: self.__appendText( - self.trUtf8('There is no difference.'), self.cNormalFormat) + self.tr('There is no difference.'), self.cNormalFormat) def __generateContextDiff(self, a, b, fromfile, tofile, fromfiledate, tofiledate): @@ -467,7 +467,7 @@ if paras == 0: self.__appendText( - self.trUtf8('There is no difference.'), self.cNormalFormat) + self.tr('There is no difference.'), self.cNormalFormat) def __fileChanged(self): """ @@ -488,7 +488,7 @@ """ filename = E5FileDialog.getOpenFileName( self, - self.trUtf8("Select file to compare"), + self.tr("Select file to compare"), lineEdit.text(), "")
--- a/UI/EmailDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/EmailDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -73,20 +73,20 @@ self.__mode = mode if self.__mode == "feature": - self.setWindowTitle(self.trUtf8("Send feature request")) - self.msgLabel.setText(self.trUtf8( + self.setWindowTitle(self.tr("Send feature request")) + self.msgLabel.setText(self.tr( "Enter your &feature request below." " Version information is added automatically.")) self.__toAddress = FeatureAddress else: # default is bug - self.msgLabel.setText(self.trUtf8( + self.msgLabel.setText(self.tr( "Enter your &bug description below." " Version information is added automatically.")) self.__toAddress = BugAddress self.sendButton = self.buttonBox.addButton( - self.trUtf8("Send"), QDialogButtonBox.ActionRole) + self.tr("Send"), QDialogButtonBox.ActionRole) self.sendButton.setEnabled(False) self.sendButton.setDefault(True) @@ -120,8 +120,8 @@ if ev.key() == Qt.Key_Escape: res = E5MessageBox.yesNo( self, - self.trUtf8("Close dialog"), - self.trUtf8("""Do you really want to close the dialog?""")) + self.tr("Close dialog"), + self.tr("""Do you really want to close the dialog?""")) if res: self.reject() @@ -140,8 +140,8 @@ """ res = E5MessageBox.yesNo( self, - self.trUtf8("Close dialog"), - self.trUtf8("""Do you really want to close the dialog?""")) + self.tr("Close dialog"), + self.tr("""Do you really want to close the dialog?""")) if res: self.reject() @@ -287,8 +287,8 @@ if not password: password, ok = QInputDialog.getText( self, - self.trUtf8("Mail Server Password"), - self.trUtf8("Enter your mail server password"), + self.tr("Mail Server Password"), + self.tr("Enter your mail server password"), QLineEdit.Password) if not ok: # abort @@ -305,8 +305,8 @@ errorStr = str(e) res = E5MessageBox.retryAbort( self, - self.trUtf8("Send bug report"), - self.trUtf8( + self.tr("Send bug report"), + self.tr( """<p>Authentication failed.<br>Reason: {0}</p>""") .format(errorStr), E5MessageBox.Critical) @@ -331,8 +331,8 @@ errorStr = str(e) res = E5MessageBox.retryAbort( self, - self.trUtf8("Send bug report"), - self.trUtf8( + self.tr("Send bug report"), + self.tr( """<p>Message could not be sent.<br>Reason: {0}</p>""") .format(errorStr), E5MessageBox.Critical) @@ -349,7 +349,7 @@ """ fname = E5FileDialog.getOpenFileName( self, - self.trUtf8("Attach file")) + self.tr("Attach file")) if fname: self.attachFile(fname, False)
--- a/UI/ErrorLogDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/ErrorLogDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -38,9 +38,9 @@ if showMode: self.icon.hide() self.label.hide() - self.deleteButton.setText(self.trUtf8("Delete")) - self.keepButton.setText(self.trUtf8("Close")) - self.setWindowTitle(self.trUtf8("Error Log")) + self.deleteButton.setText(self.tr("Delete")) + self.keepButton.setText(self.tr("Close")) + self.setWindowTitle(self.tr("Error Log")) self.__ui = parent self.__logFile = logFile
--- a/UI/FindFileDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/FindFileDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -23,6 +23,7 @@ import Preferences import UI.PixmapCache + class FindFileDialog(QDialog, Ui_FindFileDialog): """ Class implementing a dialog to search for text in files. @@ -61,19 +62,19 @@ self.__replaceMode = replaceMode self.stopButton = \ - self.buttonBox.addButton(self.trUtf8("Stop"), + self.buttonBox.addButton(self.tr("Stop"), QDialogButtonBox.ActionRole) self.stopButton.setEnabled(False) self.findButton = \ - self.buttonBox.addButton(self.trUtf8("Find"), + self.buttonBox.addButton(self.tr("Find"), QDialogButtonBox.ActionRole) self.findButton.setEnabled(False) self.findButton.setDefault(True) if self.__replaceMode: self.replaceButton.setEnabled(False) - self.setWindowTitle(self.trUtf8("Replace in Files")) + self.setWindowTitle(self.tr("Replace in Files")) else: self.replaceLabel.hide() self.replacetextCombo.hide() @@ -372,9 +373,9 @@ except re.error as why: E5MessageBox.critical( self, - self.trUtf8("Invalid search expression"), - self.trUtf8("""<p>The search expression is not valid.</p>""" - """<p>Error: {0}</p>""").format(str(why))) + self.tr("Invalid search expression"), + self.tr("""<p>The search expression is not valid.</p>""" + """<p>Error: {0}</p>""").format(str(why))) self.stopButton.setEnabled(False) self.findButton.setEnabled(True) self.findButton.setDefault(True) @@ -538,7 +539,7 @@ """ directory = E5FileDialog.getExistingDirectory( self, - self.trUtf8("Select directory"), + self.tr("Select directory"), self.dirCombo.currentText(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) @@ -608,8 +609,8 @@ except (UnicodeError, IOError) as err: E5MessageBox.critical( self, - self.trUtf8("Replace in Files"), - self.trUtf8( + self.tr("Replace in Files"), + self.tr( """<p>Could not read the file <b>{0}</b>.""" """ Skipping it.</p><p>Reason: {1}</p>""") .format(fn, str(err)) @@ -623,8 +624,8 @@ if origHash != hash: E5MessageBox.critical( self, - self.trUtf8("Replace in Files"), - self.trUtf8( + self.tr("Replace in Files"), + self.tr( """<p>The current and the original hash of the""" """ file <b>{0}</b> are different. Skipping it.""" """</p><p>Hash 1: {1}</p><p>Hash 2: {2}</p>""") @@ -649,8 +650,8 @@ except (IOError, Utilities.CodingError, UnicodeError) as err: E5MessageBox.critical( self, - self.trUtf8("Replace in Files"), - self.trUtf8( + self.tr("Replace in Files"), + self.tr( """<p>Could not save the file <b>{0}</b>.""" """ Skipping it.</p><p>Reason: {1}</p>""") .format(fn, str(err)) @@ -674,8 +675,8 @@ """ menu = QMenu(self) - menu.addAction(self.trUtf8("Open"), self.__openFile) - menu.addAction(self.trUtf8("Copy Path to Clipboard"), + menu.addAction(self.tr("Open"), self.__openFile) + menu.addAction(self.tr("Copy Path to Clipboard"), self.__copyToClipboard) menu.exec_(QCursor.pos())
--- a/UI/FindFileNameDialog.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/FindFileNameDialog.py Sat Jan 11 11:55:33 2014 +0100 @@ -23,6 +23,7 @@ import Utilities import UI.PixmapCache + class FindFileNameDialog(QWidget, Ui_FindFileNameDialog): """ Class implementing a dialog to search for files. @@ -54,11 +55,11 @@ self.fileList.headerItem().setText(self.fileList.columnCount(), "") self.stopButton = self.buttonBox.addButton( - self.trUtf8("Stop"), QDialogButtonBox.ActionRole) - self.stopButton.setToolTip(self.trUtf8("Press to stop the search")) + self.tr("Stop"), QDialogButtonBox.ActionRole) + self.stopButton.setToolTip(self.tr("Press to stop the search")) self.stopButton.setEnabled(False) self.buttonBox.button(QDialogButtonBox.Open).setToolTip( - self.trUtf8("Opens the selected file")) + self.tr("Opens the selected file")) self.buttonBox.button(QDialogButtonBox.Open).setEnabled(False) self.project = project @@ -201,7 +202,7 @@ """ searchDir = E5FileDialog.getExistingDirectory( None, - self.trUtf8("Select search directory"), + self.tr("Select search directory"), self.searchDirEdit.text(), E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
--- a/UI/LogView.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/LogView.py Sat Jan 11 11:55:33 2014 +0100 @@ -102,14 +102,14 @@ # create the context menu self.__menu = QMenu(self) - self.__menu.addAction(self.trUtf8('Clear'), self.clear) - self.__menu.addAction(self.trUtf8('Copy'), self.copy) + self.__menu.addAction(self.tr('Clear'), self.clear) + self.__menu.addAction(self.tr('Copy'), self.copy) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8('Find'), self.__find) + self.__menu.addAction(self.tr('Find'), self.__find) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8('Select All'), self.selectAll) + self.__menu.addAction(self.tr('Select All'), self.selectAll) self.__menu.addSeparator() - self.__menu.addAction(self.trUtf8("Configure..."), self.__configure) + self.__menu.addAction(self.tr("Configure..."), self.__configure) self.setContextMenuPolicy(Qt.CustomContextMenu) self.customContextMenuRequested.connect(self.__handleShowContextMenu)
--- a/UI/NumbersWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/NumbersWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -179,11 +179,11 @@ self.hexInButton.setIcon(UI.PixmapCache.getIcon("2downarrow.png")) self.hexOutButton.setIcon(UI.PixmapCache.getIcon("2uparrow.png")) - self.formatBox.addItem(self.trUtf8("Auto"), 0) - self.formatBox.addItem(self.trUtf8("Dec"), 10) - self.formatBox.addItem(self.trUtf8("Hex"), 16) - self.formatBox.addItem(self.trUtf8("Oct"), 8) - self.formatBox.addItem(self.trUtf8("Bin"), 2) + self.formatBox.addItem(self.tr("Auto"), 0) + self.formatBox.addItem(self.tr("Dec"), 10) + self.formatBox.addItem(self.tr("Hex"), 16) + self.formatBox.addItem(self.tr("Oct"), 8) + self.formatBox.addItem(self.tr("Bin"), 2) self.sizeBox.addItem("8", 8) self.sizeBox.addItem("16", 16)
--- a/UI/Previewer.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/Previewer.py Sat Jan 11 11:55:33 2014 +0100 @@ -233,7 +233,7 @@ Preferences.getEditor("PreviewRestFileNameExtensions"): language = "ReST" else: - self.__setHtml(fn, self.trUtf8( + self.__setHtml(fn, self.tr( "<p>No preview available for this type of file.</p>")) return @@ -273,9 +273,9 @@ @param title new title (string) """ if title: - self.titleLabel.setText(self.trUtf8("Preview - {0}").format(title)) + self.titleLabel.setText(self.tr("Preview - {0}").format(title)) else: - self.titleLabel.setText(self.trUtf8("Preview")) + self.titleLabel.setText(self.tr("Preview")) def __saveScrollBarPositions(self): """ @@ -415,7 +415,7 @@ elif language == "ReST": return self.__convertReST(text) else: - return self.trUtf8( + return self.tr( "<p>No preview available for this type of file.</p>") def __processSSI(self, txt, filename, root): @@ -475,7 +475,7 @@ try: import docutils.core # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ except ImportError: - return self.trUtf8( + return self.tr( """<p>ReStructuredText preview requires the""" """ <b>python-docutils</b> package.<br/>Install it with""" """ your package manager or see""" @@ -495,7 +495,7 @@ try: import markdown # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ except ImportError: - return self.trUtf8( + return self.tr( """<p>Markdown preview requires the <b>python-markdown</b> """ """package.<br/>Install it with your package manager or see """ """<a href="http://pythonhosted.org/Markdown/install.html">"""
--- a/UI/SearchWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/SearchWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -175,4 +175,4 @@ else: txt = self.findtextCombo.currentText() self.statusLabel.setText( - self.trUtf8("'{0}' was not found.").format(txt)) + self.tr("'{0}' was not found.").format(txt))
--- a/UI/SymbolsWidget.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/SymbolsWidget.py Sat Jan 11 11:55:33 2014 +0100 @@ -35,258 +35,258 @@ super().__init__(parent) self.__headerData = [ - self.trUtf8("Code"), - self.trUtf8("Char"), - self.trUtf8("Hex"), - self.trUtf8("HTML"), - self.trUtf8("Name"), + self.tr("Code"), + self.tr("Char"), + self.tr("Hex"), + self.tr("HTML"), + self.tr("Name"), ] self.__tables = [ # first last display name - (0x0, 0x1f, self.trUtf8("Control Characters")), - (0x20, 0x7f, self.trUtf8("Basic Latin")), - (0x80, 0xff, self.trUtf8("Latin-1 Supplement")), - (0x100, 0x17f, self.trUtf8("Latin Extended-A")), - (0x180, 0x24f, self.trUtf8("Latin Extended-B")), - (0x250, 0x2af, self.trUtf8("IPA Extensions")), - (0x2b0, 0x2ff, self.trUtf8("Spacing Modifier Letters")), - (0x300, 0x36f, self.trUtf8("Combining Diacritical Marks")), - (0x370, 0x3ff, self.trUtf8("Greek and Coptic")), - (0x400, 0x4ff, self.trUtf8("Cyrillic")), - (0x500, 0x52f, self.trUtf8("Cyrillic Supplement")), - (0x530, 0x58f, self.trUtf8("Armenian")), - (0x590, 0x5ff, self.trUtf8("Hebrew")), - (0x600, 0x6ff, self.trUtf8("Arabic")), - (0x700, 0x74f, self.trUtf8("Syriac")), - (0x780, 0x7bf, self.trUtf8("Thaana")), - (0x7c0, 0x7ff, self.trUtf8("N'Ko")), - (0x800, 0x83f, self.trUtf8("Samaritan")), - (0x840, 0x85f, self.trUtf8("Mandaic")), - (0x8a0, 0x8ff, self.trUtf8("Arabic Extended-A")), - (0x900, 0x97f, self.trUtf8("Devanagari")), - (0x980, 0x9ff, self.trUtf8("Bengali")), - (0xa00, 0xa7f, self.trUtf8("Gurmukhi")), - (0xa80, 0xaff, self.trUtf8("Gujarati")), - (0xb00, 0xb7f, self.trUtf8("Oriya")), - (0xb80, 0xbff, self.trUtf8("Tamil")), - (0xc00, 0xc7f, self.trUtf8("Telugu")), - (0xc80, 0xcff, self.trUtf8("Kannada")), - (0xd00, 0xd7f, self.trUtf8("Malayalam")), - (0xd80, 0xdff, self.trUtf8("Sinhala")), - (0xe00, 0xe7f, self.trUtf8("Thai")), - (0xe80, 0xeff, self.trUtf8("Lao")), - (0xf00, 0xfff, self.trUtf8("Tibetan")), - (0x1000, 0x109f, self.trUtf8("Myanmar")), - (0x10a0, 0x10ff, self.trUtf8("Georgian")), - (0x1100, 0x11ff, self.trUtf8("Hangul Jamo")), - (0x1200, 0x137f, self.trUtf8("Ethiopic")), - (0x1380, 0x139f, self.trUtf8("Ethiopic Supplement")), - (0x13a0, 0x13ff, self.trUtf8("Cherokee")), + (0x0, 0x1f, self.tr("Control Characters")), + (0x20, 0x7f, self.tr("Basic Latin")), + (0x80, 0xff, self.tr("Latin-1 Supplement")), + (0x100, 0x17f, self.tr("Latin Extended-A")), + (0x180, 0x24f, self.tr("Latin Extended-B")), + (0x250, 0x2af, self.tr("IPA Extensions")), + (0x2b0, 0x2ff, self.tr("Spacing Modifier Letters")), + (0x300, 0x36f, self.tr("Combining Diacritical Marks")), + (0x370, 0x3ff, self.tr("Greek and Coptic")), + (0x400, 0x4ff, self.tr("Cyrillic")), + (0x500, 0x52f, self.tr("Cyrillic Supplement")), + (0x530, 0x58f, self.tr("Armenian")), + (0x590, 0x5ff, self.tr("Hebrew")), + (0x600, 0x6ff, self.tr("Arabic")), + (0x700, 0x74f, self.tr("Syriac")), + (0x780, 0x7bf, self.tr("Thaana")), + (0x7c0, 0x7ff, self.tr("N'Ko")), + (0x800, 0x83f, self.tr("Samaritan")), + (0x840, 0x85f, self.tr("Mandaic")), + (0x8a0, 0x8ff, self.tr("Arabic Extended-A")), + (0x900, 0x97f, self.tr("Devanagari")), + (0x980, 0x9ff, self.tr("Bengali")), + (0xa00, 0xa7f, self.tr("Gurmukhi")), + (0xa80, 0xaff, self.tr("Gujarati")), + (0xb00, 0xb7f, self.tr("Oriya")), + (0xb80, 0xbff, self.tr("Tamil")), + (0xc00, 0xc7f, self.tr("Telugu")), + (0xc80, 0xcff, self.tr("Kannada")), + (0xd00, 0xd7f, self.tr("Malayalam")), + (0xd80, 0xdff, self.tr("Sinhala")), + (0xe00, 0xe7f, self.tr("Thai")), + (0xe80, 0xeff, self.tr("Lao")), + (0xf00, 0xfff, self.tr("Tibetan")), + (0x1000, 0x109f, self.tr("Myanmar")), + (0x10a0, 0x10ff, self.tr("Georgian")), + (0x1100, 0x11ff, self.tr("Hangul Jamo")), + (0x1200, 0x137f, self.tr("Ethiopic")), + (0x1380, 0x139f, self.tr("Ethiopic Supplement")), + (0x13a0, 0x13ff, self.tr("Cherokee")), (0x1400, 0x167f, - self.trUtf8("Unified Canadian Aboriginal Syllabics")), - (0x1680, 0x169f, self.trUtf8("Ogham")), - (0x16a0, 0x16ff, self.trUtf8("Runic")), - (0x1700, 0x171f, self.trUtf8("Tagalog")), - (0x1720, 0x173f, self.trUtf8("Hanunoo")), - (0x1740, 0x175f, self.trUtf8("Buhid")), - (0x1760, 0x177f, self.trUtf8("Tagbanwa")), - (0x1780, 0x17ff, self.trUtf8("Khmer")), - (0x1800, 0x18af, self.trUtf8("Mongolian")), + self.tr("Unified Canadian Aboriginal Syllabics")), + (0x1680, 0x169f, self.tr("Ogham")), + (0x16a0, 0x16ff, self.tr("Runic")), + (0x1700, 0x171f, self.tr("Tagalog")), + (0x1720, 0x173f, self.tr("Hanunoo")), + (0x1740, 0x175f, self.tr("Buhid")), + (0x1760, 0x177f, self.tr("Tagbanwa")), + (0x1780, 0x17ff, self.tr("Khmer")), + (0x1800, 0x18af, self.tr("Mongolian")), (0x18b0, 0x18ff, - self.trUtf8("Unified Canadian Aboriginal Syllabics Extended")), - (0x1900, 0x194f, self.trUtf8("Limbu")), - (0x1950, 0x197f, self.trUtf8("Tai Le")), - (0x19e0, 0x19ff, self.trUtf8("Khmer Symbols")), - (0x1a00, 0x1a1f, self.trUtf8("Buginese")), - (0x1a20, 0x1aaf, self.trUtf8("Tai Tham")), - (0x1b00, 0x1b7f, self.trUtf8("Balinese")), - (0x1b80, 0x1bbf, self.trUtf8("Sundanese")), - (0x1bc0, 0x1bff, self.trUtf8("Batak")), - (0x1c00, 0x1c4f, self.trUtf8("Lepcha")), - (0x1c50, 0x1c7f, self.trUtf8("Ol Chiki")), - (0x1cc0, 0x1ccf, self.trUtf8("Sundanese Supplement")), - (0x1cd0, 0x1cff, self.trUtf8("Vedic Extensions")), - (0x1d00, 0x1d7f, self.trUtf8("Phonetic Extensions")), - (0x1d80, 0x1dbf, self.trUtf8("Phonetic Extensions Supplement")), + self.tr("Unified Canadian Aboriginal Syllabics Extended")), + (0x1900, 0x194f, self.tr("Limbu")), + (0x1950, 0x197f, self.tr("Tai Le")), + (0x19e0, 0x19ff, self.tr("Khmer Symbols")), + (0x1a00, 0x1a1f, self.tr("Buginese")), + (0x1a20, 0x1aaf, self.tr("Tai Tham")), + (0x1b00, 0x1b7f, self.tr("Balinese")), + (0x1b80, 0x1bbf, self.tr("Sundanese")), + (0x1bc0, 0x1bff, self.tr("Batak")), + (0x1c00, 0x1c4f, self.tr("Lepcha")), + (0x1c50, 0x1c7f, self.tr("Ol Chiki")), + (0x1cc0, 0x1ccf, self.tr("Sundanese Supplement")), + (0x1cd0, 0x1cff, self.tr("Vedic Extensions")), + (0x1d00, 0x1d7f, self.tr("Phonetic Extensions")), + (0x1d80, 0x1dbf, self.tr("Phonetic Extensions Supplement")), (0x1dc0, 0x1dff, - self.trUtf8("Combining Diacritical Marks Supplement")), - (0x1e00, 0x1eff, self.trUtf8("Latin Extended Additional")), - (0x1f00, 0x1fff, self.trUtf8("Greek Extended")), - (0x2000, 0x206f, self.trUtf8("General Punctuation")), - (0x2070, 0x209f, self.trUtf8("Superscripts and Subscripts")), - (0x20a0, 0x20cf, self.trUtf8("Currency Symbols")), - (0x20d0, 0x20ff, self.trUtf8("Combining Diacritical Marks")), - (0x2100, 0x214f, self.trUtf8("Letterlike Symbols")), - (0x2150, 0x218f, self.trUtf8("Number Forms")), - (0x2190, 0x21ff, self.trUtf8("Arcolumns")), - (0x2200, 0x22ff, self.trUtf8("Mathematical Operators")), - (0x2300, 0x23ff, self.trUtf8("Miscellaneous Technical")), - (0x2400, 0x243f, self.trUtf8("Control Pictures")), - (0x2440, 0x245f, self.trUtf8("Optical Character Recognition")), - (0x2460, 0x24ff, self.trUtf8("Enclosed Alphanumerics")), - (0x2500, 0x257f, self.trUtf8("Box Drawing")), - (0x2580, 0x259f, self.trUtf8("Block Elements")), - (0x25A0, 0x25ff, self.trUtf8("Geometric Shapes")), - (0x2600, 0x26ff, self.trUtf8("Miscellaneous Symbols")), - (0x2700, 0x27bf, self.trUtf8("Dingbats")), + self.tr("Combining Diacritical Marks Supplement")), + (0x1e00, 0x1eff, self.tr("Latin Extended Additional")), + (0x1f00, 0x1fff, self.tr("Greek Extended")), + (0x2000, 0x206f, self.tr("General Punctuation")), + (0x2070, 0x209f, self.tr("Superscripts and Subscripts")), + (0x20a0, 0x20cf, self.tr("Currency Symbols")), + (0x20d0, 0x20ff, self.tr("Combining Diacritical Marks")), + (0x2100, 0x214f, self.tr("Letterlike Symbols")), + (0x2150, 0x218f, self.tr("Number Forms")), + (0x2190, 0x21ff, self.tr("Arcolumns")), + (0x2200, 0x22ff, self.tr("Mathematical Operators")), + (0x2300, 0x23ff, self.tr("Miscellaneous Technical")), + (0x2400, 0x243f, self.tr("Control Pictures")), + (0x2440, 0x245f, self.tr("Optical Character Recognition")), + (0x2460, 0x24ff, self.tr("Enclosed Alphanumerics")), + (0x2500, 0x257f, self.tr("Box Drawing")), + (0x2580, 0x259f, self.tr("Block Elements")), + (0x25A0, 0x25ff, self.tr("Geometric Shapes")), + (0x2600, 0x26ff, self.tr("Miscellaneous Symbols")), + (0x2700, 0x27bf, self.tr("Dingbats")), (0x27c0, 0x27ef, - self.trUtf8("Miscellaneous Mathematical Symbols-A")), - (0x27f0, 0x27ff, self.trUtf8("Supplement Arcolumns-A")), - (0x2800, 0x28ff, self.trUtf8("Braille Patterns")), - (0x2900, 0x297f, self.trUtf8("Supplement Arcolumns-B")), + self.tr("Miscellaneous Mathematical Symbols-A")), + (0x27f0, 0x27ff, self.tr("Supplement Arcolumns-A")), + (0x2800, 0x28ff, self.tr("Braille Patterns")), + (0x2900, 0x297f, self.tr("Supplement Arcolumns-B")), (0x2980, 0x29ff, - self.trUtf8("Miscellaneous Mathematical Symbols-B")), + self.tr("Miscellaneous Mathematical Symbols-B")), (0x2a00, 0x2aff, - self.trUtf8("Supplemental Mathematical Operators")), + self.tr("Supplemental Mathematical Operators")), (0x2b00, 0x2bff, - self.trUtf8("Miscellaneous Symbols and Arcolumns")), - (0x2c00, 0x2c5f, self.trUtf8("Glagolitic")), - (0x2c60, 0x2c7f, self.trUtf8("Latin Extended-C")), - (0x2c80, 0x2cff, self.trUtf8("Coptic")), - (0x2d00, 0x2d2f, self.trUtf8("Georgian Supplement")), - (0x2d30, 0x2d7f, self.trUtf8("Tifinagh")), - (0x2d80, 0x2ddf, self.trUtf8("Ethiopic Extended")), - (0x2de0, 0x2dff, self.trUtf8("Cyrillic Extended-A")), - (0x2e00, 0x2e7f, self.trUtf8("Supplemental Punctuation")), - (0x2e80, 0x2eff, self.trUtf8("CJK Radicals Supplement")), - (0x2f00, 0x2fdf, self.trUtf8("KangXi Radicals")), - (0x2ff0, 0x2fff, self.trUtf8("Ideographic Description Chars")), - (0x3000, 0x303f, self.trUtf8("CJK Symbols and Punctuation")), - (0x3040, 0x309f, self.trUtf8("Hiragana")), - (0x30a0, 0x30ff, self.trUtf8("Katakana")), - (0x3100, 0x312f, self.trUtf8("Bopomofo")), - (0x3130, 0x318f, self.trUtf8("Hangul Compatibility Jamo")), - (0x3190, 0x319f, self.trUtf8("Kanbun")), - (0x31a0, 0x31bf, self.trUtf8("Bopomofo Extended")), - (0x31c0, 0x31ef, self.trUtf8("CJK Strokes")), - (0x31f0, 0x31ff, self.trUtf8("Katakana Phonetic Extensions")), - (0x3200, 0x32ff, self.trUtf8("Enclosed CJK Letters and Months")), - (0x3300, 0x33ff, self.trUtf8("CJK Compatibility")), - (0x3400, 0x4dbf, self.trUtf8("CJK Unified Ideogr. Ext. A")), - (0x4dc0, 0x4dff, self.trUtf8("Yijing Hexagram Symbols")), - (0x4e00, 0x9fff, self.trUtf8("CJK Unified Ideographs")), - (0xa000, 0xa48f, self.trUtf8("Yi Syllables")), - (0xa490, 0xa4cf, self.trUtf8("Yi Radicals")), - (0xa4d0, 0xa4ff, self.trUtf8("Lisu")), - (0xa500, 0xa63f, self.trUtf8("Vai")), - (0xa640, 0xa69f, self.trUtf8("Cyrillic Extended-B")), - (0xa6a0, 0xa6ff, self.trUtf8("Bamum")), - (0xa700, 0xa71f, self.trUtf8("Modifier Tone Letters")), - (0xa720, 0xa7ff, self.trUtf8("Latin Extended-D")), - (0xa800, 0xa82f, self.trUtf8("Syloti Nagri")), - (0xa830, 0xa83f, self.trUtf8("Common Indic Number Forms")), - (0xa840, 0xa87f, self.trUtf8("Phags-pa")), - (0xa880, 0xa8df, self.trUtf8("Saurashtra")), - (0xa8e0, 0xa8ff, self.trUtf8("Devanagari Extended")), - (0xa900, 0xa92f, self.trUtf8("Kayah Li")), - (0xa930, 0xa95f, self.trUtf8("Rejang")), - (0xa960, 0xa97f, self.trUtf8("Hangul Jamo Extended-A")), - (0xa980, 0xa9df, self.trUtf8("Javanese")), - (0xaa00, 0xaa5f, self.trUtf8("Cham")), - (0xaa60, 0xaa7f, self.trUtf8("Myanmar Extended-A")), - (0xaa80, 0xaadf, self.trUtf8("Tai Viet")), - (0xaae0, 0xaaff, self.trUtf8("Meetei Mayek Extensions")), - (0xab00, 0xab2f, self.trUtf8("Ethiopic Extended-A")), - (0xabc0, 0xabff, self.trUtf8("Meetei Mayek")), - (0xac00, 0xd7af, self.trUtf8("Hangul Syllables")), - (0xd7b0, 0xd7ff, self.trUtf8("Hangul Jamo Extended-B")), - (0xd800, 0xdb7f, self.trUtf8("High Surrogates")), - (0xdb80, 0xdbff, self.trUtf8("High Private Use Surrogates")), - (0xdc00, 0xdfff, self.trUtf8("Low Surrogates")), - (0xe000, 0xf8ff, self.trUtf8("Private Use")), - (0xf900, 0xfaff, self.trUtf8("CJK Compatibility Ideographs")), - (0xfb00, 0xfb4f, self.trUtf8("Alphabetic Presentation Forms")), - (0xfb50, 0xfdff, self.trUtf8("Arabic Presentation Forms-A")), - (0xfe00, 0xfe0f, self.trUtf8("Variation Selectors")), - (0xfe10, 0xfe1f, self.trUtf8("Vertical Forms")), - (0xfe20, 0xfe2f, self.trUtf8("Combining Half Marks")), - (0xfe30, 0xfe4f, self.trUtf8("CJK Compatibility Forms")), - (0xfe50, 0xfe6f, self.trUtf8("Small Form Variants")), - (0xfe70, 0xfeff, self.trUtf8("Arabic Presentation Forms-B")), - (0xff00, 0xffef, self.trUtf8("Half- and Fullwidth Forms")), - (0xfff0, 0xffff, self.trUtf8("Specials")), + self.tr("Miscellaneous Symbols and Arcolumns")), + (0x2c00, 0x2c5f, self.tr("Glagolitic")), + (0x2c60, 0x2c7f, self.tr("Latin Extended-C")), + (0x2c80, 0x2cff, self.tr("Coptic")), + (0x2d00, 0x2d2f, self.tr("Georgian Supplement")), + (0x2d30, 0x2d7f, self.tr("Tifinagh")), + (0x2d80, 0x2ddf, self.tr("Ethiopic Extended")), + (0x2de0, 0x2dff, self.tr("Cyrillic Extended-A")), + (0x2e00, 0x2e7f, self.tr("Supplemental Punctuation")), + (0x2e80, 0x2eff, self.tr("CJK Radicals Supplement")), + (0x2f00, 0x2fdf, self.tr("KangXi Radicals")), + (0x2ff0, 0x2fff, self.tr("Ideographic Description Chars")), + (0x3000, 0x303f, self.tr("CJK Symbols and Punctuation")), + (0x3040, 0x309f, self.tr("Hiragana")), + (0x30a0, 0x30ff, self.tr("Katakana")), + (0x3100, 0x312f, self.tr("Bopomofo")), + (0x3130, 0x318f, self.tr("Hangul Compatibility Jamo")), + (0x3190, 0x319f, self.tr("Kanbun")), + (0x31a0, 0x31bf, self.tr("Bopomofo Extended")), + (0x31c0, 0x31ef, self.tr("CJK Strokes")), + (0x31f0, 0x31ff, self.tr("Katakana Phonetic Extensions")), + (0x3200, 0x32ff, self.tr("Enclosed CJK Letters and Months")), + (0x3300, 0x33ff, self.tr("CJK Compatibility")), + (0x3400, 0x4dbf, self.tr("CJK Unified Ideogr. Ext. A")), + (0x4dc0, 0x4dff, self.tr("Yijing Hexagram Symbols")), + (0x4e00, 0x9fff, self.tr("CJK Unified Ideographs")), + (0xa000, 0xa48f, self.tr("Yi Syllables")), + (0xa490, 0xa4cf, self.tr("Yi Radicals")), + (0xa4d0, 0xa4ff, self.tr("Lisu")), + (0xa500, 0xa63f, self.tr("Vai")), + (0xa640, 0xa69f, self.tr("Cyrillic Extended-B")), + (0xa6a0, 0xa6ff, self.tr("Bamum")), + (0xa700, 0xa71f, self.tr("Modifier Tone Letters")), + (0xa720, 0xa7ff, self.tr("Latin Extended-D")), + (0xa800, 0xa82f, self.tr("Syloti Nagri")), + (0xa830, 0xa83f, self.tr("Common Indic Number Forms")), + (0xa840, 0xa87f, self.tr("Phags-pa")), + (0xa880, 0xa8df, self.tr("Saurashtra")), + (0xa8e0, 0xa8ff, self.tr("Devanagari Extended")), + (0xa900, 0xa92f, self.tr("Kayah Li")), + (0xa930, 0xa95f, self.tr("Rejang")), + (0xa960, 0xa97f, self.tr("Hangul Jamo Extended-A")), + (0xa980, 0xa9df, self.tr("Javanese")), + (0xaa00, 0xaa5f, self.tr("Cham")), + (0xaa60, 0xaa7f, self.tr("Myanmar Extended-A")), + (0xaa80, 0xaadf, self.tr("Tai Viet")), + (0xaae0, 0xaaff, self.tr("Meetei Mayek Extensions")), + (0xab00, 0xab2f, self.tr("Ethiopic Extended-A")), + (0xabc0, 0xabff, self.tr("Meetei Mayek")), + (0xac00, 0xd7af, self.tr("Hangul Syllables")), + (0xd7b0, 0xd7ff, self.tr("Hangul Jamo Extended-B")), + (0xd800, 0xdb7f, self.tr("High Surrogates")), + (0xdb80, 0xdbff, self.tr("High Private Use Surrogates")), + (0xdc00, 0xdfff, self.tr("Low Surrogates")), + (0xe000, 0xf8ff, self.tr("Private Use")), + (0xf900, 0xfaff, self.tr("CJK Compatibility Ideographs")), + (0xfb00, 0xfb4f, self.tr("Alphabetic Presentation Forms")), + (0xfb50, 0xfdff, self.tr("Arabic Presentation Forms-A")), + (0xfe00, 0xfe0f, self.tr("Variation Selectors")), + (0xfe10, 0xfe1f, self.tr("Vertical Forms")), + (0xfe20, 0xfe2f, self.tr("Combining Half Marks")), + (0xfe30, 0xfe4f, self.tr("CJK Compatibility Forms")), + (0xfe50, 0xfe6f, self.tr("Small Form Variants")), + (0xfe70, 0xfeff, self.tr("Arabic Presentation Forms-B")), + (0xff00, 0xffef, self.tr("Half- and Fullwidth Forms")), + (0xfff0, 0xffff, self.tr("Specials")), ] if sys.maxunicode > 0xffff: self.__tables.extend([ - (0x10000, 0x1007f, self.trUtf8("Linear B Syllabary")), - (0x10080, 0x100ff, self.trUtf8("Linear B Ideograms")), - (0x10100, 0x1013f, self.trUtf8("Aegean Numbers")), - (0x10140, 0x1018f, self.trUtf8("Ancient Greek Numbers")), - (0x10190, 0x101cf, self.trUtf8("Ancient Symbols")), - (0x101d0, 0x101ff, self.trUtf8("Phaistos Disc")), - (0x10280, 0x1029f, self.trUtf8("Lycian")), - (0x102a0, 0x102df, self.trUtf8("Carian")), - (0x10300, 0x1032f, self.trUtf8("Old Italic")), - (0x10330, 0x1034f, self.trUtf8("Gothic")), - (0x10380, 0x1039f, self.trUtf8("Ugaritic")), - (0x103a0, 0x103df, self.trUtf8("Old Persian")), - (0x10400, 0x1044f, self.trUtf8("Deseret")), - (0x10450, 0x1047f, self.trUtf8("Shavian")), - (0x10480, 0x104af, self.trUtf8("Osmanya")), - (0x10800, 0x1083f, self.trUtf8("Cypriot Syllabary")), - (0x10840, 0x1085f, self.trUtf8("Imperial Aramaic")), - (0x10900, 0x1091f, self.trUtf8("Phoenician")), - (0x10920, 0x1093f, self.trUtf8("Lydian")), - (0x10980, 0x1099f, self.trUtf8("Meroitic Hieroglyphs")), - (0x109a0, 0x109ff, self.trUtf8("Meroitic Cursive")), - (0x10a00, 0x10a5f, self.trUtf8("Kharoshthi")), - (0x10a60, 0x10a7f, self.trUtf8("Old South Arabian")), - (0x10b00, 0x10b3f, self.trUtf8("Avestan")), - (0x10b40, 0x10b5f, self.trUtf8("Inscriptional Parthian")), - (0x10b60, 0x10b7f, self.trUtf8("Inscriptional Pahlavi")), - (0x10c00, 0x10c4f, self.trUtf8("Old Turkic")), - (0x10e60, 0x10e7f, self.trUtf8("Rumi Numeral Symbols")), - (0x11000, 0x1107f, self.trUtf8("Brahmi")), - (0x11080, 0x110cf, self.trUtf8("Kaithi")), - (0x110d0, 0x110ff, self.trUtf8("Sora Sompeng")), - (0x11100, 0x1114f, self.trUtf8("Chakma")), - (0x11180, 0x111df, self.trUtf8("Sharada")), - (0x11680, 0x116cf, self.trUtf8("Takri")), - (0x12000, 0x123ff, self.trUtf8("Cuneiform")), + (0x10000, 0x1007f, self.tr("Linear B Syllabary")), + (0x10080, 0x100ff, self.tr("Linear B Ideograms")), + (0x10100, 0x1013f, self.tr("Aegean Numbers")), + (0x10140, 0x1018f, self.tr("Ancient Greek Numbers")), + (0x10190, 0x101cf, self.tr("Ancient Symbols")), + (0x101d0, 0x101ff, self.tr("Phaistos Disc")), + (0x10280, 0x1029f, self.tr("Lycian")), + (0x102a0, 0x102df, self.tr("Carian")), + (0x10300, 0x1032f, self.tr("Old Italic")), + (0x10330, 0x1034f, self.tr("Gothic")), + (0x10380, 0x1039f, self.tr("Ugaritic")), + (0x103a0, 0x103df, self.tr("Old Persian")), + (0x10400, 0x1044f, self.tr("Deseret")), + (0x10450, 0x1047f, self.tr("Shavian")), + (0x10480, 0x104af, self.tr("Osmanya")), + (0x10800, 0x1083f, self.tr("Cypriot Syllabary")), + (0x10840, 0x1085f, self.tr("Imperial Aramaic")), + (0x10900, 0x1091f, self.tr("Phoenician")), + (0x10920, 0x1093f, self.tr("Lydian")), + (0x10980, 0x1099f, self.tr("Meroitic Hieroglyphs")), + (0x109a0, 0x109ff, self.tr("Meroitic Cursive")), + (0x10a00, 0x10a5f, self.tr("Kharoshthi")), + (0x10a60, 0x10a7f, self.tr("Old South Arabian")), + (0x10b00, 0x10b3f, self.tr("Avestan")), + (0x10b40, 0x10b5f, self.tr("Inscriptional Parthian")), + (0x10b60, 0x10b7f, self.tr("Inscriptional Pahlavi")), + (0x10c00, 0x10c4f, self.tr("Old Turkic")), + (0x10e60, 0x10e7f, self.tr("Rumi Numeral Symbols")), + (0x11000, 0x1107f, self.tr("Brahmi")), + (0x11080, 0x110cf, self.tr("Kaithi")), + (0x110d0, 0x110ff, self.tr("Sora Sompeng")), + (0x11100, 0x1114f, self.tr("Chakma")), + (0x11180, 0x111df, self.tr("Sharada")), + (0x11680, 0x116cf, self.tr("Takri")), + (0x12000, 0x123ff, self.tr("Cuneiform")), (0x12400, 0x1247f, - self.trUtf8("Cuneiform Numbers and Punctuation")), - (0x13000, 0x1342f, self.trUtf8("Egyptian Hieroglyphs")), - (0x16800, 0x16a3f, self.trUtf8("Bamum Supplement")), - (0x16f00, 0x16f9f, self.trUtf8("Miao")), - (0x1b000, 0x1b0ff, self.trUtf8("Kana Supplement")), - (0x1d000, 0x1d0ff, self.trUtf8("Byzantine Musical Symbols")), - (0x1d100, 0x1d1ff, self.trUtf8("Musical Symbols")), + self.tr("Cuneiform Numbers and Punctuation")), + (0x13000, 0x1342f, self.tr("Egyptian Hieroglyphs")), + (0x16800, 0x16a3f, self.tr("Bamum Supplement")), + (0x16f00, 0x16f9f, self.tr("Miao")), + (0x1b000, 0x1b0ff, self.tr("Kana Supplement")), + (0x1d000, 0x1d0ff, self.tr("Byzantine Musical Symbols")), + (0x1d100, 0x1d1ff, self.tr("Musical Symbols")), (0x1d200, 0x1d24f, - self.trUtf8("Ancient Greek Musical Notation")), - (0x1d300, 0x1d35f, self.trUtf8("Tai Xuan Jing Symbols")), + self.tr("Ancient Greek Musical Notation")), + (0x1d300, 0x1d35f, self.tr("Tai Xuan Jing Symbols")), (0x1d360, 0x1d37f, - self.trUtf8("Counting Rod Numerals")), + self.tr("Counting Rod Numerals")), (0x1d400, 0x1d7ff, - self.trUtf8("Mathematical Alphanumeric Symbols")), + self.tr("Mathematical Alphanumeric Symbols")), (0x1ee00, 0x1eeff, - self.trUtf8("Arabic Mathematical Alphabetic Symbols")), - (0x1f000, 0x1f02f, self.trUtf8("Mahjong Tiles")), - (0x1f030, 0x1f09f, self.trUtf8("Domino Tiles")), - (0x1f0a0, 0x1f0ff, self.trUtf8("Playing Cards")), + self.tr("Arabic Mathematical Alphabetic Symbols")), + (0x1f000, 0x1f02f, self.tr("Mahjong Tiles")), + (0x1f030, 0x1f09f, self.tr("Domino Tiles")), + (0x1f0a0, 0x1f0ff, self.tr("Playing Cards")), (0x1f100, 0x1f1ff, - self.trUtf8("Enclosed Alphanumeric Supplement")), + self.tr("Enclosed Alphanumeric Supplement")), (0x1f200, 0x1f2ff, - self.trUtf8("Enclosed Ideographic Supplement")), + self.tr("Enclosed Ideographic Supplement")), (0x1f300, 0x1f5ff, - self.trUtf8("Miscellaneous Symbols And Pictographs")), - (0x1f600, 0x1f64f, self.trUtf8("Emoticons")), - (0x1f680, 0x1f6ff, self.trUtf8("Transport And Map Symbols")), - (0x1f700, 0x1f77f, self.trUtf8("Alchemical Symbols")), - (0x20000, 0x2a6df, self.trUtf8("CJK Unified Ideogr. Ext. B")), + self.tr("Miscellaneous Symbols And Pictographs")), + (0x1f600, 0x1f64f, self.tr("Emoticons")), + (0x1f680, 0x1f6ff, self.tr("Transport And Map Symbols")), + (0x1f700, 0x1f77f, self.tr("Alchemical Symbols")), + (0x20000, 0x2a6df, self.tr("CJK Unified Ideogr. Ext. B")), (0x2a700, 0x2b73f, - self.trUtf8("CJK Unified Ideographs Extension C")), + self.tr("CJK Unified Ideographs Extension C")), (0x2b740, 0x2b81f, - self.trUtf8("CJK Unified Ideographs Extension D")), + self.tr("CJK Unified Ideographs Extension D")), (0x2f800, 0x2fa1f, - self.trUtf8("CJK Compatapility Ideogr. Suppl.")), - (0xe0000, 0xe007f, self.trUtf8("Tags")), + self.tr("CJK Compatapility Ideogr. Suppl.")), + (0xe0000, 0xe007f, self.tr("Tags")), (0xe0100, 0xe01ef, - self.trUtf8("Variation Selectors Supplement")), + self.tr("Variation Selectors Supplement")), (0xf0000, 0xfffff, - self.trUtf8("Supplementary Private Use Area-A")), + self.tr("Supplementary Private Use Area-A")), (0x100000, 0x10ffff, - self.trUtf8("Supplementary Private Use Area-B")), + self.tr("Supplementary Private Use Area-B")), ]) self.__currentTableIndex = 0
--- a/UI/UserInterface.py Fri Jan 10 19:30:21 2014 +0100 +++ b/UI/UserInterface.py Sat Jan 11 11:55:33 2014 +0100 @@ -203,13 +203,13 @@ from MultiProject.MultiProject import MultiProject self.multiProject = MultiProject(self.project, self) - splash.showMessage(self.trUtf8("Initializing Plugin Manager...")) + splash.showMessage(self.tr("Initializing Plugin Manager...")) # Initialize the Plugin Manager (Plugins are initialized later from PluginManager.PluginManager import PluginManager self.pluginManager = PluginManager(self, develPlugin=plugin) - splash.showMessage(self.trUtf8("Generating Main User Interface...")) + splash.showMessage(self.tr("Generating Main User Interface...")) # Create the main window now so that we can connect QActions to it. logging.debug("Creating Layout...") @@ -241,7 +241,7 @@ self.__notification = None # now setup the connections - splash.showMessage(self.trUtf8("Setting up connections...")) + splash.showMessage(self.tr("Setting up connections...")) self.browser.sourceFile[str].connect( self.viewmanager.openSourceFile) self.browser.sourceFile[str, int].connect( @@ -429,7 +429,7 @@ self.toolbarManager.setMainWindow(self) # Initialize the tool groups and list of started tools - splash.showMessage(self.trUtf8("Initializing Tools...")) + splash.showMessage(self.tr("Initializing Tools...")) self.toolGroups, self.currentToolGroup = Preferences.readToolGroups() self.toolProcs = [] self.__initExternalToolsActions() @@ -440,7 +440,7 @@ HelpWindow(None, '.', None, 'help viewer', True, True) # register all relevant objects - splash.showMessage(self.trUtf8("Registering Objects...")) + splash.showMessage(self.tr("Registering Objects...")) e5App().registerObject("UserInterface", self) e5App().registerObject("DebugUI", self.debuggerUI) e5App().registerObject("DebugServer", debugServer) @@ -460,13 +460,13 @@ e5App().registerObject("Numbers", self.numbersViewer) # Initialize the actions, menus, toolbars and statusbar - splash.showMessage(self.trUtf8("Initializing Actions...")) + splash.showMessage(self.tr("Initializing Actions...")) self.__initActions() - splash.showMessage(self.trUtf8("Initializing Menus...")) + splash.showMessage(self.tr("Initializing Menus...")) self.__initMenus() - splash.showMessage(self.trUtf8("Initializing Toolbars...")) + splash.showMessage(self.tr("Initializing Toolbars...")) self.__initToolbars() - splash.showMessage(self.trUtf8("Initializing Statusbar...")) + splash.showMessage(self.tr("Initializing Statusbar...")) self.__initStatusbar() # connect the appFocusChanged signal after all actions are ready @@ -494,7 +494,7 @@ # now fire up the single application server if Preferences.getUI("SingleApplicationMode"): splash.showMessage( - self.trUtf8("Initializing Single Application Server...")) + self.tr("Initializing Single Application Server...")) self.SAServer = E5SingleApplicationServer() else: self.SAServer = None @@ -502,7 +502,7 @@ # now finalize the plugin manager setup self.pluginManager.finalizeSetup() # now activate plugins having autoload set to True - splash.showMessage(self.trUtf8("Activating Plugins...")) + splash.showMessage(self.tr("Activating Plugins...")) self.pluginManager.activatePlugins() # now read the keyboard shortcuts for all the actions @@ -510,24 +510,24 @@ Shortcuts.readShortcuts() # restore toolbar manager state - splash.showMessage(self.trUtf8("Restoring Toolbarmanager...")) + splash.showMessage(self.tr("Restoring Toolbarmanager...")) self.toolbarManager.restoreState( Preferences.getUI("ToolbarManagerState")) # now activate the initial view profile - splash.showMessage(self.trUtf8("Setting View Profile...")) + splash.showMessage(self.tr("Setting View Profile...")) self.__setEditProfile() # now read the saved tasks - splash.showMessage(self.trUtf8("Reading Tasks...")) + splash.showMessage(self.tr("Reading Tasks...")) self.__readTasks() # now read the saved templates - splash.showMessage(self.trUtf8("Reading Templates...")) + splash.showMessage(self.tr("Reading Templates...")) self.templateViewer.readTemplates() # now start the debug client - splash.showMessage(self.trUtf8("Starting Debugger...")) + splash.showMessage(self.tr("Starting Debugger...")) debugServer.startClient(False) # attributes for the network objects @@ -617,20 +617,20 @@ self.lToolboxDock = self.__createDockWindow("lToolboxDock") self.lToolbox = E5VerticalToolBox(self.lToolboxDock) self.__setupDockWindow(self.lToolboxDock, Qt.LeftDockWidgetArea, - self.lToolbox, self.trUtf8("Left Toolbox")) + self.lToolbox, self.tr("Left Toolbox")) # Create the horizontal toolbox self.hToolboxDock = self.__createDockWindow("hToolboxDock") self.hToolbox = E5HorizontalToolBox(self.hToolboxDock) self.__setupDockWindow(self.hToolboxDock, Qt.BottomDockWidgetArea, self.hToolbox, - self.trUtf8("Horizontal Toolbox")) + self.tr("Horizontal Toolbox")) # Create the right toolbox self.rToolboxDock = self.__createDockWindow("rToolboxDock") self.rToolbox = E5VerticalToolBox(self.rToolboxDock) self.__setupDockWindow(self.rToolboxDock, Qt.RightDockWidgetArea, - self.rToolbox, self.trUtf8("Right Toolbox")) + self.rToolbox, self.tr("Right Toolbox")) # Create the project browser from Project.ProjectBrowser import ProjectBrowser @@ -639,14 +639,14 @@ embeddedBrowser=(self.embeddedFileBrowser == 2)) self.lToolbox.addItem(self.projectBrowser, UI.PixmapCache.getIcon("projectViewer.png"), - self.trUtf8("Project-Viewer")) + self.tr("Project-Viewer")) # Create the multi project browser from MultiProject.MultiProjectBrowser import MultiProjectBrowser self.multiProjectBrowser = MultiProjectBrowser(self.multiProject) self.lToolbox.addItem(self.multiProjectBrowser, UI.PixmapCache.getIcon("multiProjectViewer.png"), - self.trUtf8("Multiproject-Viewer")) + self.tr("Multiproject-Viewer")) # Create the template viewer part of the user interface from Templates.TemplateViewer import TemplateViewer @@ -654,7 +654,7 @@ self.viewmanager) self.lToolbox.addItem(self.templateViewer, UI.PixmapCache.getIcon("templateViewer.png"), - self.trUtf8("Template-Viewer")) + self.tr("Template-Viewer")) # Create the debug viewer maybe without the embedded shell from Debugger.DebugViewer import DebugViewer @@ -664,35 +664,35 @@ embeddedBrowser=(self.embeddedFileBrowser == 1)) self.rToolbox.addItem(self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), - self.trUtf8("Debug-Viewer")) + self.tr("Debug-Viewer")) # Create the chat part of the user interface from Cooperation.ChatWidget import ChatWidget self.cooperation = ChatWidget(self) self.rToolbox.addItem(self.cooperation, UI.PixmapCache.getIcon("cooperation.png"), - self.trUtf8("Cooperation")) + self.tr("Cooperation")) # Create the IRC part of the user interface from Network.IRC.IrcWidget import IrcWidget self.irc = IrcWidget(self) self.rToolbox.addItem(self.irc, UI.PixmapCache.getIcon("irc.png"), - self.trUtf8("IRC")) + self.tr("IRC")) # Create the task viewer part of the user interface from Tasks.TaskViewer import TaskViewer self.taskViewer = TaskViewer(None, self.project) self.hToolbox.addItem(self.taskViewer, UI.PixmapCache.getIcon("task.png"), - self.trUtf8("Task-Viewer")) + self.tr("Task-Viewer")) # Create the log viewer part of the user interface from .LogView import LogViewer self.logViewer = LogViewer() self.hToolbox.addItem(self.logViewer, UI.PixmapCache.getIcon("logViewer.png"), - self.trUtf8("Log-Viewer")) + self.tr("Log-Viewer")) if self.embeddedShell: self.shell = self.debugViewer.shell @@ -704,7 +704,7 @@ self.shell = self.shellAssembly.shell() self.hToolbox.insertItem(0, self.shellAssembly, UI.PixmapCache.getIcon("shell.png"), - self.trUtf8("Shell")) + self.tr("Shell")) if self.embeddedFileBrowser == 0: # separate window # Create the file browser @@ -712,7 +712,7 @@ self.browser = Browser() self.lToolbox.addItem(self.browser, UI.PixmapCache.getIcon("browser.png"), - self.trUtf8("File-Browser")) + self.tr("File-Browser")) elif self.embeddedFileBrowser == 1: # embedded in debug browser self.browser = self.debugViewer.browser else: # embedded in project browser @@ -723,14 +723,14 @@ self.symbolsViewer = SymbolsWidget() self.lToolbox.addItem(self.symbolsViewer, UI.PixmapCache.getIcon("symbols.png"), - self.trUtf8("Symbols")) + self.tr("Symbols")) # Create the numbers viewer from .NumbersWidget import NumbersWidget self.numbersViewer = NumbersWidget() self.hToolbox.addItem(self.numbersViewer, UI.PixmapCache.getIcon("numbers.png"), - self.trUtf8("Numbers")) + self.tr("Numbers")) self.hToolbox.setCurrentIndex(0) @@ -761,7 +761,7 @@ self.leftSidebar.addTab( self.projectBrowser, UI.PixmapCache.getIcon("projectViewer.png"), - self.trUtf8("Project-Viewer")) + self.tr("Project-Viewer")) # Create the multi project browser logging.debug("Creating Multiproject Browser...") @@ -770,7 +770,7 @@ self.leftSidebar.addTab( self.multiProjectBrowser, UI.PixmapCache.getIcon("multiProjectViewer.png"), - self.trUtf8("Multiproject-Viewer")) + self.tr("Multiproject-Viewer")) # Create the template viewer part of the user interface logging.debug("Creating Template Viewer...") @@ -780,7 +780,7 @@ self.leftSidebar.addTab( self.templateViewer, UI.PixmapCache.getIcon("templateViewer.png"), - self.trUtf8("Template-Viewer")) + self.tr("Template-Viewer")) # Create the debug viewer maybe without the embedded shell logging.debug("Creating Debug Viewer...") @@ -791,7 +791,7 @@ embeddedBrowser=(self.embeddedFileBrowser == 1)) self.rightSidebar.addTab( self.debugViewer, UI.PixmapCache.getIcon("debugViewer.png"), - self.trUtf8("Debug-Viewer")) + self.tr("Debug-Viewer")) # Create the chat part of the user interface logging.debug("Creating Chat Widget...") @@ -799,14 +799,14 @@ self.cooperation = ChatWidget(self) self.rightSidebar.addTab( self.cooperation, UI.PixmapCache.getIcon("cooperation.png"), - self.trUtf8("Cooperation")) + self.tr("Cooperation")) # Create the IRC part of the user interface logging.debug("Creating IRC Widget...") from Network.IRC.IrcWidget import IrcWidget self.irc = IrcWidget(self) self.rightSidebar.addTab( - self.irc, UI.PixmapCache.getIcon("irc.png"), self.trUtf8("IRC")) + self.irc, UI.PixmapCache.getIcon("irc.png"), self.tr("IRC")) # Create the task viewer part of the user interface logging.debug("Creating Task Viewer...") @@ -814,7 +814,7 @@ self.taskViewer = TaskViewer(None, self.project) self.bottomSidebar.addTab(self.taskViewer, UI.PixmapCache.getIcon("task.png"), - self.trUtf8("Task-Viewer")) + self.tr("Task-Viewer")) # Create the log viewer part of the user interface logging.debug("Creating Log Viewer...") @@ -822,7 +822,7 @@ self.logViewer = LogViewer() self.bottomSidebar.addTab(self.logViewer, UI.PixmapCache.getIcon("logViewer.png"), - self.trUtf8("Log-Viewer")) + self.tr("Log-Viewer")) if self.embeddedShell: self.shell = self.debugViewer.shell @@ -835,7 +835,7 @@ self.shell = self.shellAssembly.shell() self.bottomSidebar.insertTab(0, self.shellAssembly, UI.PixmapCache.getIcon("shell.png"), - self.trUtf8("Shell")) + self.tr("Shell")) if self.embeddedFileBrowser == 0: # separate window # Create the file browser @@ -844,7 +844,7 @@ self.browser = Browser() self.leftSidebar.addTab(self.browser, UI.PixmapCache.getIcon("browser.png"), - self.trUtf8("File-Browser")) + self.tr("File-Browser")) elif self.embeddedFileBrowser == 1: # embedded in debug browser self.browser = self.debugViewer.browser else: # embedded in project browser @@ -856,7 +856,7 @@ self.symbolsViewer = SymbolsWidget() self.leftSidebar.addTab(self.symbolsViewer, UI.PixmapCache.getIcon("symbols.png"), - self.trUtf8("Symbols")) + self.tr("Symbols")) # Create the numbers viewer logging.debug("Creating Numbers Viewer...") @@ -864,7 +864,7 @@ self.numbersViewer = NumbersWidget() self.bottomSidebar.addTab(self.numbersViewer, UI.PixmapCache.getIcon("numbers.png"), - self.trUtf8("Numbers")) + self.tr("Numbers")) self.bottomSidebar.setCurrentIndex(0) @@ -1146,16 +1146,16 @@ if self.passiveMode: if not self.capProject and not self.capEditor: self.setWindowTitle( - self.trUtf8("{0} - Passive Mode").format(Program)) + self.tr("{0} - Passive Mode").format(Program)) elif self.capProject and not self.capEditor: - self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") + self.setWindowTitle(self.tr("{0} - {1} - Passive Mode") .format(self.capProject, Program)) elif not self.capProject and self.capEditor: - self.setWindowTitle(self.trUtf8("{0} - {1} - Passive Mode") + self.setWindowTitle(self.tr("{0} - {1} - Passive Mode") .format(self.capEditor, Program)) else: self.setWindowTitle( - self.trUtf8("{0} - {1} - {2} - Passive Mode") + self.tr("{0} - {1} - {2} - Passive Mode") .format(self.capProject, self.capEditor, Program)) else: if not self.capProject and not self.capEditor: @@ -1178,13 +1178,13 @@ self.wizardsActions = [] 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, 'quit') - self.exitAct.setStatusTip(self.trUtf8('Quit the IDE')) - self.exitAct.setWhatsThis(self.trUtf8( + self.exitAct.setStatusTip(self.tr('Quit the IDE')) + self.exitAct.setWhatsThis(self.tr( """<b>Quit the IDE</b>""" """<p>This quits the IDE. Any unsaved changes may be saved""" """ first. Any Python program being debugged will be stopped""" @@ -1195,14 +1195,14 @@ self.actions.append(self.exitAct) self.newWindowAct = E5Action( - self.trUtf8('New Window'), + self.tr('New Window'), UI.PixmapCache.getIcon("newWindow.png"), - self.trUtf8('New &Window'), - QKeySequence(self.trUtf8("Ctrl+Shift+N", "File|New Window")), + self.tr('New &Window'), + QKeySequence(self.tr("Ctrl+Shift+N", "File|New Window")), 0, self, 'new_window') - self.newWindowAct.setStatusTip(self.trUtf8( + self.newWindowAct.setStatusTip(self.tr( 'Open a new eric5 instance')) - self.newWindowAct.setWhatsThis(self.trUtf8( + self.newWindowAct.setWhatsThis(self.tr( """<b>New Window</b>""" """<p>This opens a new instance of the eric5 IDE.</p>""" )) @@ -1214,14 +1214,14 @@ self.viewProfileActGrp = createActionGroup(self, "viewprofiles", True) self.setEditProfileAct = E5Action( - self.trUtf8('Edit Profile'), + self.tr('Edit Profile'), UI.PixmapCache.getIcon("viewProfileEdit.png"), - self.trUtf8('Edit Profile'), + self.tr('Edit Profile'), 0, 0, self.viewProfileActGrp, 'edit_profile', True) - self.setEditProfileAct.setStatusTip(self.trUtf8( + self.setEditProfileAct.setStatusTip(self.tr( 'Activate the edit view profile')) - self.setEditProfileAct.setWhatsThis(self.trUtf8( + self.setEditProfileAct.setWhatsThis(self.tr( """<b>Edit Profile</b>""" """<p>Activate the "Edit View Profile". Windows being shown,""" """ if this profile is active, may be configured with the""" @@ -1231,14 +1231,14 @@ self.actions.append(self.setEditProfileAct) self.setDebugProfileAct = E5Action( - self.trUtf8('Debug Profile'), + self.tr('Debug Profile'), UI.PixmapCache.getIcon("viewProfileDebug.png"), - self.trUtf8('Debug Profile'), + self.tr('Debug Profile'), 0, 0, self.viewProfileActGrp, 'debug_profile', True) self.setDebugProfileAct.setStatusTip( - self.trUtf8('Activate the debug view profile')) - self.setDebugProfileAct.setWhatsThis(self.trUtf8( + self.tr('Activate the debug view profile')) + self.setDebugProfileAct.setWhatsThis(self.tr( """<b>Debug Profile</b>""" """<p>Activate the "Debug View Profile". Windows being shown,""" """ if this profile is active, may be configured with the""" @@ -1248,14 +1248,14 @@ self.actions.append(self.setDebugProfileAct) self.pbActivateAct = E5Action( - self.trUtf8('Project-Viewer'), - self.trUtf8('&Project-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+P")), + self.tr('Project-Viewer'), + self.tr('&Project-Viewer'), + QKeySequence(self.tr("Alt+Shift+P")), 0, self, 'project_viewer_activate') - self.pbActivateAct.setStatusTip(self.trUtf8( + self.pbActivateAct.setStatusTip(self.tr( "Switch the input focus to the Project-Viewer window.")) - self.pbActivateAct.setWhatsThis(self.trUtf8( + self.pbActivateAct.setWhatsThis(self.tr( """<b>Activate Project-Viewer</b>""" """<p>This switches the input focus to the Project-Viewer""" """ window.</p>""" @@ -1265,14 +1265,14 @@ self.addAction(self.pbActivateAct) self.mpbActivateAct = E5Action( - self.trUtf8('Multiproject-Viewer'), - self.trUtf8('&Multiproject-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+M")), + self.tr('Multiproject-Viewer'), + self.tr('&Multiproject-Viewer'), + QKeySequence(self.tr("Alt+Shift+M")), 0, self, 'multi_project_viewer_activate') - self.mpbActivateAct.setStatusTip(self.trUtf8( + self.mpbActivateAct.setStatusTip(self.tr( "Switch the input focus to the Multiproject-Viewer window.")) - self.mpbActivateAct.setWhatsThis(self.trUtf8( + self.mpbActivateAct.setWhatsThis(self.tr( """<b>Activate Multiproject-Viewer</b>""" """<p>This switches the input focus to the Multiproject-Viewer""" """ window.</p>""" @@ -1283,14 +1283,14 @@ self.addAction(self.mpbActivateAct) self.debugViewerActivateAct = E5Action( - self.trUtf8('Debug-Viewer'), - self.trUtf8('&Debug-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+D")), + self.tr('Debug-Viewer'), + self.tr('&Debug-Viewer'), + QKeySequence(self.tr("Alt+Shift+D")), 0, self, 'debug_viewer_activate') - self.debugViewerActivateAct.setStatusTip(self.trUtf8( + self.debugViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Debug-Viewer window.")) - self.debugViewerActivateAct.setWhatsThis(self.trUtf8( + self.debugViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Debug-Viewer</b>""" """<p>This switches the input focus to the Debug-Viewer""" """ window.</p>""" @@ -1301,14 +1301,14 @@ self.addAction(self.debugViewerActivateAct) self.shellActivateAct = E5Action( - self.trUtf8('Shell'), - self.trUtf8('&Shell'), - QKeySequence(self.trUtf8("Alt+Shift+S")), + self.tr('Shell'), + self.tr('&Shell'), + QKeySequence(self.tr("Alt+Shift+S")), 0, self, 'interprter_shell_activate') - self.shellActivateAct.setStatusTip(self.trUtf8( + self.shellActivateAct.setStatusTip(self.tr( "Switch the input focus to the Shell window.")) - self.shellActivateAct.setWhatsThis(self.trUtf8( + self.shellActivateAct.setWhatsThis(self.tr( """<b>Activate Shell</b>""" """<p>This switches the input focus to the Shell window.</p>""" )) @@ -1317,14 +1317,14 @@ self.addAction(self.shellActivateAct) self.browserActivateAct = E5Action( - self.trUtf8('File-Browser'), - self.trUtf8('&File-Browser'), - QKeySequence(self.trUtf8("Alt+Shift+F")), + self.tr('File-Browser'), + self.tr('&File-Browser'), + QKeySequence(self.tr("Alt+Shift+F")), 0, self, 'file_browser_activate') - self.browserActivateAct.setStatusTip(self.trUtf8( + self.browserActivateAct.setStatusTip(self.tr( "Switch the input focus to the File-Browser window.")) - self.browserActivateAct.setWhatsThis(self.trUtf8( + self.browserActivateAct.setWhatsThis(self.tr( """<b>Activate File-Browser</b>""" """<p>This switches the input focus to the File-Browser""" """ window.</p>""" @@ -1334,14 +1334,14 @@ self.addAction(self.browserActivateAct) self.logViewerActivateAct = E5Action( - self.trUtf8('Log-Viewer'), - self.trUtf8('Lo&g-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+G")), + self.tr('Log-Viewer'), + self.tr('Lo&g-Viewer'), + QKeySequence(self.tr("Alt+Shift+G")), 0, self, 'log_viewer_activate') - self.logViewerActivateAct.setStatusTip(self.trUtf8( + self.logViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Log-Viewer window.")) - self.logViewerActivateAct.setWhatsThis(self.trUtf8( + self.logViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Log-Viewer</b>""" """<p>This switches the input focus to the Log-Viewer""" """ window.</p>""" @@ -1352,14 +1352,14 @@ self.addAction(self.logViewerActivateAct) self.taskViewerActivateAct = E5Action( - self.trUtf8('Task-Viewer'), - self.trUtf8('&Task-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+T")), + self.tr('Task-Viewer'), + self.tr('&Task-Viewer'), + QKeySequence(self.tr("Alt+Shift+T")), 0, self, 'task_viewer_activate') - self.taskViewerActivateAct.setStatusTip(self.trUtf8( + self.taskViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Task-Viewer window.")) - self.taskViewerActivateAct.setWhatsThis(self.trUtf8( + self.taskViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Task-Viewer</b>""" """<p>This switches the input focus to the Task-Viewer""" """ window.</p>""" @@ -1370,14 +1370,14 @@ self.addAction(self.taskViewerActivateAct) self.templateViewerActivateAct = E5Action( - self.trUtf8('Template-Viewer'), - self.trUtf8('Templ&ate-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+A")), + self.tr('Template-Viewer'), + self.tr('Templ&ate-Viewer'), + QKeySequence(self.tr("Alt+Shift+A")), 0, self, 'template_viewer_activate') - self.templateViewerActivateAct.setStatusTip(self.trUtf8( + self.templateViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Template-Viewer window.")) - self.templateViewerActivateAct.setWhatsThis(self.trUtf8( + self.templateViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Template-Viewer</b>""" """<p>This switches the input focus to the Template-Viewer""" """ window.</p>""" @@ -1388,10 +1388,10 @@ self.addAction(self.templateViewerActivateAct) self.ltAct = E5Action( - self.trUtf8('Left Toolbox'), - self.trUtf8('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) - self.ltAct.setStatusTip(self.trUtf8('Toggle the Left Toolbox window')) - self.ltAct.setWhatsThis(self.trUtf8( + self.tr('Left Toolbox'), + self.tr('&Left Toolbox'), 0, 0, self, 'vertical_toolbox', True) + self.ltAct.setStatusTip(self.tr('Toggle the Left Toolbox window')) + self.ltAct.setWhatsThis(self.tr( """<b>Toggle the Left Toolbox window</b>""" """<p>If the Left Toolbox window is hidden then display it.""" """ If it is displayed then close it.</p>""" @@ -1400,11 +1400,11 @@ self.actions.append(self.ltAct) self.rtAct = E5Action( - self.trUtf8('Right Toolbox'), - self.trUtf8('&Right Toolbox'), + self.tr('Right Toolbox'), + self.tr('&Right Toolbox'), 0, 0, self, 'vertical_toolbox', True) - self.rtAct.setStatusTip(self.trUtf8('Toggle the Right Toolbox window')) - self.rtAct.setWhatsThis(self.trUtf8( + self.rtAct.setStatusTip(self.tr('Toggle the Right Toolbox window')) + self.rtAct.setWhatsThis(self.tr( """<b>Toggle the Right Toolbox window</b>""" """<p>If the Right Toolbox window is hidden then display it.""" """ If it is displayed then close it.</p>""" @@ -1413,12 +1413,12 @@ self.actions.append(self.rtAct) self.htAct = E5Action( - self.trUtf8('Horizontal Toolbox'), - self.trUtf8('&Horizontal Toolbox'), 0, 0, self, + self.tr('Horizontal Toolbox'), + self.tr('&Horizontal Toolbox'), 0, 0, self, 'horizontal_toolbox', True) - self.htAct.setStatusTip(self.trUtf8( + self.htAct.setStatusTip(self.tr( 'Toggle the Horizontal Toolbox window')) - self.htAct.setWhatsThis(self.trUtf8( + self.htAct.setWhatsThis(self.tr( """<b>Toggle the Horizontal Toolbox window</b>""" """<p>If the Horizontal Toolbox window is hidden then display""" """ it. If it is displayed then close it.</p>""" @@ -1427,11 +1427,11 @@ self.actions.append(self.htAct) self.lsbAct = E5Action( - self.trUtf8('Left Sidebar'), - self.trUtf8('&Left Sidebar'), + self.tr('Left Sidebar'), + self.tr('&Left Sidebar'), 0, 0, self, 'left_sidebar', True) - self.lsbAct.setStatusTip(self.trUtf8('Toggle the left sidebar window')) - self.lsbAct.setWhatsThis(self.trUtf8( + self.lsbAct.setStatusTip(self.tr('Toggle the left sidebar window')) + self.lsbAct.setWhatsThis(self.tr( """<b>Toggle the left sidebar window</b>""" """<p>If the left sidebar window is hidden then display it.""" """ If it is displayed then close it.</p>""" @@ -1440,12 +1440,12 @@ self.actions.append(self.lsbAct) self.rsbAct = E5Action( - self.trUtf8('Right Sidebar'), - self.trUtf8('&Right Sidebar'), + self.tr('Right Sidebar'), + self.tr('&Right Sidebar'), 0, 0, self, 'right_sidebar', True) - self.rsbAct.setStatusTip(self.trUtf8( + self.rsbAct.setStatusTip(self.tr( 'Toggle the right sidebar window')) - self.rsbAct.setWhatsThis(self.trUtf8( + self.rsbAct.setWhatsThis(self.tr( """<b>Toggle the right sidebar window</b>""" """<p>If the right sidebar window is hidden then display it.""" """ If it is displayed then close it.</p>""" @@ -1454,12 +1454,12 @@ self.actions.append(self.rsbAct) self.bsbAct = E5Action( - self.trUtf8('Bottom Sidebar'), - self.trUtf8('&Bottom Sidebar'), 0, 0, self, + self.tr('Bottom Sidebar'), + self.tr('&Bottom Sidebar'), 0, 0, self, 'bottom_sidebar', True) - self.bsbAct.setStatusTip(self.trUtf8( + self.bsbAct.setStatusTip(self.tr( 'Toggle the bottom sidebar window')) - self.bsbAct.setWhatsThis(self.trUtf8( + self.bsbAct.setWhatsThis(self.tr( """<b>Toggle the bottom sidebar window</b>""" """<p>If the bottom sidebar window is hidden then display it.""" """ If it is displayed then close it.</p>""" @@ -1468,14 +1468,14 @@ self.actions.append(self.bsbAct) self.cooperationViewerActivateAct = E5Action( - self.trUtf8('Cooperation-Viewer'), - self.trUtf8('Co&operation-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+O")), + self.tr('Cooperation-Viewer'), + self.tr('Co&operation-Viewer'), + QKeySequence(self.tr("Alt+Shift+O")), 0, self, 'cooperation_viewer_activate') - self.cooperationViewerActivateAct.setStatusTip(self.trUtf8( + self.cooperationViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Cooperation-Viewer window.")) - self.cooperationViewerActivateAct.setWhatsThis(self.trUtf8( + self.cooperationViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Cooperation-Viewer</b>""" """<p>This switches the input focus to the Cooperation-Viewer""" """ window.</p>""" @@ -1486,14 +1486,14 @@ self.addAction(self.cooperationViewerActivateAct) self.ircActivateAct = E5Action( - self.trUtf8('IRC'), - self.trUtf8('&IRC'), - QKeySequence(self.trUtf8("Meta+Shift+I")), + self.tr('IRC'), + self.tr('&IRC'), + QKeySequence(self.tr("Meta+Shift+I")), 0, self, 'irc_widget_activate') - self.ircActivateAct.setStatusTip(self.trUtf8( + self.ircActivateAct.setStatusTip(self.tr( "Switch the input focus to the IRC window.")) - self.ircActivateAct.setWhatsThis(self.trUtf8( + self.ircActivateAct.setWhatsThis(self.tr( """<b>Activate IRC</b>""" """<p>This switches the input focus to the IRC window.</p>""" )) @@ -1503,14 +1503,14 @@ self.addAction(self.ircActivateAct) self.symbolsViewerActivateAct = E5Action( - self.trUtf8('Symbols-Viewer'), - self.trUtf8('S&ymbols-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+Y")), + self.tr('Symbols-Viewer'), + self.tr('S&ymbols-Viewer'), + QKeySequence(self.tr("Alt+Shift+Y")), 0, self, 'symbols_viewer_activate') - self.symbolsViewerActivateAct.setStatusTip(self.trUtf8( + self.symbolsViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Symbols-Viewer window.")) - self.symbolsViewerActivateAct.setWhatsThis(self.trUtf8( + self.symbolsViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Symbols-Viewer</b>""" """<p>This switches the input focus to the Symbols-Viewer""" """ window.</p>""" @@ -1521,14 +1521,14 @@ self.addAction(self.symbolsViewerActivateAct) self.numbersViewerActivateAct = E5Action( - self.trUtf8('Numbers-Viewer'), - self.trUtf8('Num&bers-Viewer'), - QKeySequence(self.trUtf8("Alt+Shift+B")), + self.tr('Numbers-Viewer'), + self.tr('Num&bers-Viewer'), + QKeySequence(self.tr("Alt+Shift+B")), 0, self, 'numbers_viewer_activate') - self.numbersViewerActivateAct.setStatusTip(self.trUtf8( + self.numbersViewerActivateAct.setStatusTip(self.tr( "Switch the input focus to the Numbers-Viewer window.")) - self.numbersViewerActivateAct.setWhatsThis(self.trUtf8( + self.numbersViewerActivateAct.setWhatsThis(self.tr( """<b>Activate Numbers-Viewer</b>""" """<p>This switches the input focus to the Numbers-Viewer""" """ window.</p>""" @@ -1539,13 +1539,13 @@ self.addAction(self.numbersViewerActivateAct) 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")), + self.tr('&What\'s This?'), + QKeySequence(self.tr("Shift+F1")), 0, self, 'whatsThis') - 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 elements""" @@ -1557,14 +1557,14 @@ self.actions.append(self.whatsThisAct) self.helpviewerAct = E5Action( - self.trUtf8('Helpviewer'), + self.tr('Helpviewer'), UI.PixmapCache.getIcon("help.png"), - self.trUtf8('&Helpviewer...'), - QKeySequence(self.trUtf8("F1")), + self.tr('&Helpviewer...'), + QKeySequence(self.tr("F1")), 0, self, 'helpviewer') - self.helpviewerAct.setStatusTip(self.trUtf8( + self.helpviewerAct.setStatusTip(self.tr( 'Open the helpviewer window')) - self.helpviewerAct.setWhatsThis(self.trUtf8( + self.helpviewerAct.setWhatsThis(self.tr( """<b>Helpviewer</b>""" """<p>Display the eric5 web browser. This window will show""" """ HTML help files and help from Qt help collections. It has""" @@ -1582,12 +1582,12 @@ self.__initPySideDocAction() self.versionAct = E5Action( - self.trUtf8('Show Versions'), - self.trUtf8('Show &Versions'), + self.tr('Show Versions'), + self.tr('Show &Versions'), 0, 0, self, 'show_versions') - self.versionAct.setStatusTip(self.trUtf8( + self.versionAct.setStatusTip(self.tr( 'Display version information')) - self.versionAct.setWhatsThis(self.trUtf8( + self.versionAct.setWhatsThis(self.tr( """<b>Show Versions</b>""" """<p>Display version information.</p>""" )) @@ -1595,10 +1595,10 @@ self.actions.append(self.versionAct) self.checkUpdateAct = E5Action( - self.trUtf8('Check for Updates'), - self.trUtf8('Check for &Updates...'), 0, 0, self, 'check_updates') - self.checkUpdateAct.setStatusTip(self.trUtf8('Check for Updates')) - self.checkUpdateAct.setWhatsThis(self.trUtf8( + self.tr('Check for Updates'), + self.tr('Check for &Updates...'), 0, 0, self, 'check_updates') + self.checkUpdateAct.setStatusTip(self.tr('Check for Updates')) + self.checkUpdateAct.setWhatsThis(self.tr( """<b>Check for Updates...</b>""" """<p>Checks the internet for updates of eric5.</p>""" )) @@ -1606,12 +1606,12 @@ self.actions.append(self.checkUpdateAct) self.showVersionsAct = E5Action( - self.trUtf8('Show downloadable versions'), - self.trUtf8('Show &downloadable versions...'), + self.tr('Show downloadable versions'), + self.tr('Show &downloadable versions...'), 0, 0, self, 'show_downloadable_versions') self.showVersionsAct.setStatusTip( - self.trUtf8('Show the versions available for download')) - self.showVersionsAct.setWhatsThis(self.trUtf8( + self.tr('Show the versions available for download')) + self.showVersionsAct.setWhatsThis(self.tr( """<b>Show downloadable versions...</b>""" """<p>Shows the eric5 versions available for download """ """from the internet.</p>""" @@ -1621,11 +1621,11 @@ self.actions.append(self.showVersionsAct) self.showErrorLogAct = E5Action( - self.trUtf8('Show Error Log'), - self.trUtf8('Show Error &Log...'), + self.tr('Show Error Log'), + self.tr('Show Error &Log...'), 0, 0, self, 'show_error_log') - self.showErrorLogAct.setStatusTip(self.trUtf8('Show Error Log')) - self.showErrorLogAct.setWhatsThis(self.trUtf8( + self.showErrorLogAct.setStatusTip(self.tr('Show Error Log')) + self.showErrorLogAct.setWhatsThis(self.tr( """<b>Show Error Log...</b>""" """<p>Opens a dialog showing the most recent error log.</p>""" )) @@ -1633,11 +1633,11 @@ self.actions.append(self.showErrorLogAct) self.reportBugAct = E5Action( - self.trUtf8('Report Bug'), - self.trUtf8('Report &Bug...'), + self.tr('Report Bug'), + self.tr('Report &Bug...'), 0, 0, self, 'report_bug') - self.reportBugAct.setStatusTip(self.trUtf8('Report a bug')) - self.reportBugAct.setWhatsThis(self.trUtf8( + self.reportBugAct.setStatusTip(self.tr('Report a bug')) + self.reportBugAct.setWhatsThis(self.tr( """<b>Report Bug...</b>""" """<p>Opens a dialog to report a bug.</p>""" )) @@ -1645,12 +1645,12 @@ self.actions.append(self.reportBugAct) self.requestFeatureAct = E5Action( - self.trUtf8('Request Feature'), - self.trUtf8('Request &Feature...'), + self.tr('Request Feature'), + self.tr('Request &Feature...'), 0, 0, self, 'request_feature') - self.requestFeatureAct.setStatusTip(self.trUtf8( + self.requestFeatureAct.setStatusTip(self.tr( 'Send a feature request')) - self.requestFeatureAct.setWhatsThis(self.trUtf8( + self.requestFeatureAct.setWhatsThis(self.tr( """<b>Request Feature...</b>""" """<p>Opens a dialog to send a feature request.</p>""" )) @@ -1660,12 +1660,12 @@ self.utActGrp = createActionGroup(self) self.utDialogAct = E5Action( - self.trUtf8('Unittest'), + self.tr('Unittest'), UI.PixmapCache.getIcon("unittest.png"), - self.trUtf8('&Unittest...'), + self.tr('&Unittest...'), 0, 0, self.utActGrp, 'unittest') - self.utDialogAct.setStatusTip(self.trUtf8('Start unittest dialog')) - self.utDialogAct.setWhatsThis(self.trUtf8( + self.utDialogAct.setStatusTip(self.tr('Start unittest dialog')) + self.utDialogAct.setWhatsThis(self.tr( """<b>Unittest</b>""" """<p>Perform unit tests. The dialog gives you the""" """ ability to select and run a unittest suite.</p>""" @@ -1674,12 +1674,12 @@ self.actions.append(self.utDialogAct) self.utRestartAct = E5Action( - self.trUtf8('Unittest Restart'), + self.tr('Unittest Restart'), UI.PixmapCache.getIcon("unittestRestart.png"), - self.trUtf8('&Restart Unittest...'), + self.tr('&Restart Unittest...'), 0, 0, self.utActGrp, 'unittest_restart') - self.utRestartAct.setStatusTip(self.trUtf8('Restart last unittest')) - self.utRestartAct.setWhatsThis(self.trUtf8( + self.utRestartAct.setStatusTip(self.tr('Restart last unittest')) + self.utRestartAct.setWhatsThis(self.tr( """<b>Restart Unittest</b>""" """<p>Restart the unittest performed last.</p>""" )) @@ -1688,13 +1688,13 @@ self.actions.append(self.utRestartAct) self.utRerunFailedAct = E5Action( - self.trUtf8('Unittest Rerun Failed'), + self.tr('Unittest Rerun Failed'), UI.PixmapCache.getIcon("unittestRerunFailed.png"), - self.trUtf8('Rerun Failed Tests...'), + self.tr('Rerun Failed Tests...'), 0, 0, self.utActGrp, 'unittest_rerun_failed') - self.utRerunFailedAct.setStatusTip(self.trUtf8( + self.utRerunFailedAct.setStatusTip(self.tr( 'Rerun failed tests of the last run')) - self.utRerunFailedAct.setWhatsThis(self.trUtf8( + self.utRerunFailedAct.setWhatsThis(self.tr( """<b>Rerun Failed Tests</b>""" """<p>Rerun all tests that failed during the last unittest""" """ run.</p>""" @@ -1704,13 +1704,13 @@ self.actions.append(self.utRerunFailedAct) self.utScriptAct = E5Action( - self.trUtf8('Unittest Script'), + self.tr('Unittest Script'), UI.PixmapCache.getIcon("unittestScript.png"), - self.trUtf8('Unittest &Script...'), + self.tr('Unittest &Script...'), 0, 0, self.utActGrp, 'unittest_script') - self.utScriptAct.setStatusTip(self.trUtf8( + self.utScriptAct.setStatusTip(self.tr( 'Run unittest with current script')) - self.utScriptAct.setWhatsThis(self.trUtf8( + self.utScriptAct.setWhatsThis(self.tr( """<b>Unittest Script</b>""" """<p>Run unittest with current script.</p>""" )) @@ -1719,13 +1719,13 @@ self.actions.append(self.utScriptAct) self.utProjectAct = E5Action( - self.trUtf8('Unittest Project'), + self.tr('Unittest Project'), UI.PixmapCache.getIcon("unittestProject.png"), - self.trUtf8('Unittest &Project...'), + self.tr('Unittest &Project...'), 0, 0, self.utActGrp, 'unittest_project') - self.utProjectAct.setStatusTip(self.trUtf8( + self.utProjectAct.setStatusTip(self.tr( 'Run unittest with current project')) - self.utProjectAct.setWhatsThis(self.trUtf8( + self.utProjectAct.setWhatsThis(self.tr( """<b>Unittest Project</b>""" """<p>Run unittest with current project.</p>""" )) @@ -1746,12 +1746,12 @@ Utilities.generateQtToolName("designer")) if os.path.exists(designerExe): self.designer4Act = E5Action( - self.trUtf8('Qt-Designer'), + self.tr('Qt-Designer'), UI.PixmapCache.getIcon("designer4.png"), - self.trUtf8('Qt-&Designer...'), + self.tr('Qt-&Designer...'), 0, 0, self, 'qt_designer4') - self.designer4Act.setStatusTip(self.trUtf8('Start Qt-Designer')) - self.designer4Act.setWhatsThis(self.trUtf8( + self.designer4Act.setStatusTip(self.tr('Start Qt-Designer')) + self.designer4Act.setWhatsThis(self.tr( """<b>Qt-Designer</b>""" """<p>Start Qt-Designer.</p>""" )) @@ -1772,12 +1772,12 @@ Utilities.generateQtToolName("linguist")) if os.path.exists(linguistExe): self.linguist4Act = E5Action( - self.trUtf8('Qt-Linguist'), + self.tr('Qt-Linguist'), UI.PixmapCache.getIcon("linguist4.png"), - self.trUtf8('Qt-&Linguist...'), + self.tr('Qt-&Linguist...'), 0, 0, self, 'qt_linguist4') - self.linguist4Act.setStatusTip(self.trUtf8('Start Qt-Linguist')) - self.linguist4Act.setWhatsThis(self.trUtf8( + self.linguist4Act.setStatusTip(self.tr('Start Qt-Linguist')) + self.linguist4Act.setWhatsThis(self.tr( """<b>Qt-Linguist</b>""" """<p>Start Qt-Linguist.</p>""" )) @@ -1787,12 +1787,12 @@ self.linguist4Act = None self.uipreviewerAct = E5Action( - self.trUtf8('UI Previewer'), + self.tr('UI Previewer'), UI.PixmapCache.getIcon("uiPreviewer.png"), - self.trUtf8('&UI Previewer...'), + self.tr('&UI Previewer...'), 0, 0, self, 'ui_previewer') - self.uipreviewerAct.setStatusTip(self.trUtf8('Start the UI Previewer')) - self.uipreviewerAct.setWhatsThis(self.trUtf8( + self.uipreviewerAct.setStatusTip(self.tr('Start the UI Previewer')) + self.uipreviewerAct.setWhatsThis(self.tr( """<b>UI Previewer</b>""" """<p>Start the UI Previewer.</p>""" )) @@ -1800,13 +1800,13 @@ self.actions.append(self.uipreviewerAct) self.trpreviewerAct = E5Action( - self.trUtf8('Translations Previewer'), + self.tr('Translations Previewer'), UI.PixmapCache.getIcon("trPreviewer.png"), - self.trUtf8('&Translations Previewer...'), + self.tr('&Translations Previewer...'), 0, 0, self, 'tr_previewer') - self.trpreviewerAct.setStatusTip(self.trUtf8( + self.trpreviewerAct.setStatusTip(self.tr( 'Start the Translations Previewer')) - self.trpreviewerAct.setWhatsThis(self.trUtf8( + self.trpreviewerAct.setWhatsThis(self.tr( """<b>Translations Previewer</b>""" """<p>Start the Translations Previewer.</p>""" )) @@ -1814,12 +1814,12 @@ self.actions.append(self.trpreviewerAct) self.diffAct = E5Action( - self.trUtf8('Compare Files'), + self.tr('Compare Files'), UI.PixmapCache.getIcon("diffFiles.png"), - self.trUtf8('&Compare Files...'), + self.tr('&Compare Files...'), 0, 0, self, 'diff_files') - self.diffAct.setStatusTip(self.trUtf8('Compare two files')) - self.diffAct.setWhatsThis(self.trUtf8( + self.diffAct.setStatusTip(self.tr('Compare two files')) + self.diffAct.setWhatsThis(self.tr( """<b>Compare Files</b>""" """<p>Open a dialog to compare two files.</p>""" )) @@ -1827,12 +1827,12 @@ self.actions.append(self.diffAct) self.compareAct = E5Action( - self.trUtf8('Compare Files side by side'), + self.tr('Compare Files side by side'), UI.PixmapCache.getIcon("compareFiles.png"), - self.trUtf8('Compare &Files side by side...'), + self.tr('Compare &Files side by side...'), 0, 0, self, 'compare_files') - self.compareAct.setStatusTip(self.trUtf8('Compare two files')) - self.compareAct.setWhatsThis(self.trUtf8( + self.compareAct.setStatusTip(self.tr('Compare two files')) + self.compareAct.setWhatsThis(self.tr( """<b>Compare Files side by side</b>""" """<p>Open a dialog to compare two files and show the result""" """ side by side.</p>""" @@ -1841,12 +1841,12 @@ self.actions.append(self.compareAct) self.sqlBrowserAct = E5Action( - self.trUtf8('SQL Browser'), + self.tr('SQL Browser'), UI.PixmapCache.getIcon("sqlBrowser.png"), - self.trUtf8('SQL &Browser...'), + self.tr('SQL &Browser...'), 0, 0, self, 'sql_browser') - self.sqlBrowserAct.setStatusTip(self.trUtf8('Browse a SQL database')) - self.sqlBrowserAct.setWhatsThis(self.trUtf8( + self.sqlBrowserAct.setStatusTip(self.tr('Browse a SQL database')) + self.sqlBrowserAct.setWhatsThis(self.tr( """<b>SQL Browser</b>""" """<p>Browse a SQL database.</p>""" )) @@ -1854,12 +1854,12 @@ self.actions.append(self.sqlBrowserAct) self.miniEditorAct = E5Action( - self.trUtf8('Mini Editor'), + self.tr('Mini Editor'), UI.PixmapCache.getIcon("editor.png"), - self.trUtf8('Mini &Editor...'), + self.tr('Mini &Editor...'), 0, 0, self, 'mini_editor') - self.miniEditorAct.setStatusTip(self.trUtf8('Mini Editor')) - self.miniEditorAct.setWhatsThis(self.trUtf8( + self.miniEditorAct.setStatusTip(self.tr('Mini Editor')) + self.miniEditorAct.setWhatsThis(self.tr( """<b>Mini Editor</b>""" """<p>Open a dialog with a simplified editor.</p>""" )) @@ -1867,13 +1867,13 @@ self.actions.append(self.miniEditorAct) self.webBrowserAct = E5Action( - self.trUtf8('eric5 Web Browser'), + self.tr('eric5 Web Browser'), UI.PixmapCache.getIcon("ericWeb.png"), - self.trUtf8('eric5 &Web Browser...'), + self.tr('eric5 &Web Browser...'), 0, 0, self, 'web_browser') - self.webBrowserAct.setStatusTip(self.trUtf8( + self.webBrowserAct.setStatusTip(self.tr( 'Start the eric5 Web Browser')) - self.webBrowserAct.setWhatsThis(self.trUtf8( + self.webBrowserAct.setWhatsThis(self.tr( """<b>eric5 Web Browser</b>""" """<p>Browse the Internet with the eric5 Web Browser.</p>""" )) @@ -1881,13 +1881,13 @@ self.actions.append(self.webBrowserAct) self.iconEditorAct = E5Action( - self.trUtf8('Icon Editor'), + self.tr('Icon Editor'), UI.PixmapCache.getIcon("iconEditor.png"), - self.trUtf8('&Icon Editor...'), + self.tr('&Icon Editor...'), 0, 0, self, 'icon_editor') - self.iconEditorAct.setStatusTip(self.trUtf8( + self.iconEditorAct.setStatusTip(self.tr( 'Start the eric5 Icon Editor')) - self.iconEditorAct.setWhatsThis(self.trUtf8( + self.iconEditorAct.setWhatsThis(self.tr( """<b>Icon Editor</b>""" """<p>Starts the eric5 Icon Editor for editing simple icons.</p>""" )) @@ -1895,13 +1895,13 @@ self.actions.append(self.iconEditorAct) self.snapshotAct = E5Action( - self.trUtf8('Snapshot'), + self.tr('Snapshot'), UI.PixmapCache.getIcon("ericSnap.png"), - self.trUtf8('&Snapshot...'), + self.tr('&Snapshot...'), 0, 0, self, 'snapshot') - self.snapshotAct.setStatusTip(self.trUtf8( + self.snapshotAct.setStatusTip(self.tr( 'Take snapshots of a screen region')) - self.snapshotAct.setWhatsThis(self.trUtf8( + self.snapshotAct.setWhatsThis(self.tr( """<b>Snapshot</b>""" """<p>This opens a dialog to take snapshots of a screen""" """ region.</p>""" @@ -1910,13 +1910,13 @@ self.actions.append(self.snapshotAct) self.prefAct = E5Action( - self.trUtf8('Preferences'), + self.tr('Preferences'), UI.PixmapCache.getIcon("configure.png"), - self.trUtf8('&Preferences...'), + self.tr('&Preferences...'), 0, 0, self, 'preferences') - self.prefAct.setStatusTip(self.trUtf8( + 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>""" @@ -1926,13 +1926,13 @@ self.actions.append(self.prefAct) self.prefExportAct = E5Action( - self.trUtf8('Export Preferences'), + self.tr('Export Preferences'), UI.PixmapCache.getIcon("configureExport.png"), - self.trUtf8('E&xport Preferences...'), + self.tr('E&xport Preferences...'), 0, 0, self, 'export_preferences') - self.prefExportAct.setStatusTip(self.trUtf8( + self.prefExportAct.setStatusTip(self.tr( 'Export the current configuration')) - self.prefExportAct.setWhatsThis(self.trUtf8( + self.prefExportAct.setWhatsThis(self.tr( """<b>Export Preferences</b>""" """<p>Export the current configuration to a file.</p>""" )) @@ -1940,13 +1940,13 @@ self.actions.append(self.prefExportAct) self.prefImportAct = E5Action( - self.trUtf8('Import Preferences'), + self.tr('Import Preferences'), UI.PixmapCache.getIcon("configureImport.png"), - self.trUtf8('I&mport Preferences...'), + self.tr('I&mport Preferences...'), 0, 0, self, 'import_preferences') - self.prefImportAct.setStatusTip(self.trUtf8( + self.prefImportAct.setStatusTip(self.tr( 'Import a previously exported configuration')) - self.prefImportAct.setWhatsThis(self.trUtf8( + self.prefImportAct.setWhatsThis(self.tr( """<b>Import Preferences</b>""" """<p>Import a previously exported configuration.</p>""" )) @@ -1954,12 +1954,12 @@ self.actions.append(self.prefImportAct) self.reloadAPIsAct = E5Action( - self.trUtf8('Reload APIs'), - self.trUtf8('Reload &APIs'), + self.tr('Reload APIs'), + self.tr('Reload &APIs'), 0, 0, self, 'reload_apis') - self.reloadAPIsAct.setStatusTip(self.trUtf8( + self.reloadAPIsAct.setStatusTip(self.tr( 'Reload the API information')) - self.reloadAPIsAct.setWhatsThis(self.trUtf8( + self.reloadAPIsAct.setWhatsThis(self.tr( """<b>Reload APIs</b>""" """<p>Reload the API information.</p>""" )) @@ -1967,13 +1967,13 @@ self.actions.append(self.reloadAPIsAct) self.showExternalToolsAct = E5Action( - self.trUtf8('Show external tools'), + self.tr('Show external tools'), UI.PixmapCache.getIcon("showPrograms.png"), - self.trUtf8('Show external &tools'), + self.tr('Show external &tools'), 0, 0, self, 'show_external_tools') - self.showExternalToolsAct.setStatusTip(self.trUtf8( + self.showExternalToolsAct.setStatusTip(self.tr( 'Show external tools')) - self.showExternalToolsAct.setWhatsThis(self.trUtf8( + self.showExternalToolsAct.setWhatsThis(self.tr( """<b>Show external tools</b>""" """<p>Opens a dialog to show the path and versions of all""" """ extenal tools used by eric5.</p>""" @@ -1983,13 +1983,13 @@ self.actions.append(self.showExternalToolsAct) self.configViewProfilesAct = E5Action( - self.trUtf8('View Profiles'), + self.tr('View Profiles'), UI.PixmapCache.getIcon("configureViewProfiles.png"), - self.trUtf8('&View Profiles...'), + self.tr('&View Profiles...'), 0, 0, self, 'view_profiles') - self.configViewProfilesAct.setStatusTip(self.trUtf8( + self.configViewProfilesAct.setStatusTip(self.tr( 'Configure view profiles')) - self.configViewProfilesAct.setWhatsThis(self.trUtf8( + self.configViewProfilesAct.setWhatsThis(self.tr( """<b>View Profiles</b>""" """<p>Configure the view profiles. With this dialog you may""" """ set the visibility of the various windows for the""" @@ -2000,12 +2000,12 @@ self.actions.append(self.configViewProfilesAct) self.configToolBarsAct = E5Action( - self.trUtf8('Toolbars'), + self.tr('Toolbars'), UI.PixmapCache.getIcon("toolbarsConfigure.png"), - self.trUtf8('Tool&bars...'), + self.tr('Tool&bars...'), 0, 0, self, 'configure_toolbars') - self.configToolBarsAct.setStatusTip(self.trUtf8('Configure toolbars')) - self.configToolBarsAct.setWhatsThis(self.trUtf8( + self.configToolBarsAct.setStatusTip(self.tr('Configure toolbars')) + self.configToolBarsAct.setWhatsThis(self.tr( """<b>Toolbars</b>""" """<p>Configure the toolbars. With this dialog you may""" """ change the actions shown on the various toolbars and""" @@ -2015,13 +2015,13 @@ self.actions.append(self.configToolBarsAct) self.shortcutsAct = E5Action( - self.trUtf8('Keyboard Shortcuts'), + self.tr('Keyboard Shortcuts'), UI.PixmapCache.getIcon("configureShortcuts.png"), - self.trUtf8('Keyboard &Shortcuts...'), + self.tr('Keyboard &Shortcuts...'), 0, 0, self, 'keyboard_shortcuts') - self.shortcutsAct.setStatusTip(self.trUtf8( + self.shortcutsAct.setStatusTip(self.tr( 'Set the keyboard shortcuts')) - self.shortcutsAct.setWhatsThis(self.trUtf8( + self.shortcutsAct.setWhatsThis(self.tr( """<b>Keyboard Shortcuts</b>""" """<p>Set the keyboard shortcuts of the application""" """ with your prefered values.</p>""" @@ -2030,13 +2030,13 @@ self.actions.append(self.shortcutsAct) self.exportShortcutsAct = E5Action( - self.trUtf8('Export Keyboard Shortcuts'), + self.tr('Export Keyboard Shortcuts'), UI.PixmapCache.getIcon("exportShortcuts.png"), - self.trUtf8('&Export Keyboard Shortcuts...'), + self.tr('&Export Keyboard Shortcuts...'), 0, 0, self, 'export_keyboard_shortcuts') - self.exportShortcutsAct.setStatusTip(self.trUtf8( + self.exportShortcutsAct.setStatusTip(self.tr( 'Export the keyboard shortcuts')) - self.exportShortcutsAct.setWhatsThis(self.trUtf8( + self.exportShortcutsAct.setWhatsThis(self.tr( """<b>Export Keyboard Shortcuts</b>""" """<p>Export the keyboard shortcuts of the application.</p>""" )) @@ -2044,13 +2044,13 @@ self.actions.append(self.exportShortcutsAct) self.importShortcutsAct = E5Action( - self.trUtf8('Import Keyboard Shortcuts'), + self.tr('Import Keyboard Shortcuts'), UI.PixmapCache.getIcon("importShortcuts.png"), - self.trUtf8('&Import Keyboard Shortcuts...'), + self.tr('&Import Keyboard Shortcuts...'), 0, 0, self, 'import_keyboard_shortcuts') - self.importShortcutsAct.setStatusTip(self.trUtf8( + self.importShortcutsAct.setStatusTip(self.tr( 'Import the keyboard shortcuts')) - self.importShortcutsAct.setWhatsThis(self.trUtf8( + self.importShortcutsAct.setWhatsThis(self.tr( """<b>Import Keyboard Shortcuts</b>""" """<p>Import the keyboard shortcuts of the application.</p>""" )) @@ -2059,13 +2059,13 @@ 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, 'manage_ssl_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>""" @@ -2075,13 +2075,13 @@ self.actions.append(self.certificatesAct) self.editMessageFilterAct = E5Action( - self.trUtf8('Edit Message Filters'), + self.tr('Edit Message Filters'), UI.PixmapCache.getIcon("warning.png"), - self.trUtf8('Edit Message Filters...'), + self.tr('Edit Message Filters...'), 0, 0, self, '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""" @@ -2092,9 +2092,9 @@ self.actions.append(self.editMessageFilterAct) self.viewmanagerActivateAct = E5Action( - self.trUtf8('Activate current editor'), - self.trUtf8('Activate current editor'), - QKeySequence(self.trUtf8("Alt+Shift+E")), + self.tr('Activate current editor'), + self.tr('Activate current editor'), + QKeySequence(self.tr("Alt+Shift+E")), 0, self, 'viewmanager_activate', 1) self.viewmanagerActivateAct.triggered[()].connect( self.__activateViewmanager) @@ -2102,38 +2102,38 @@ self.addAction(self.viewmanagerActivateAct) self.nextTabAct = E5Action( - self.trUtf8('Show next'), - self.trUtf8('Show next'), - QKeySequence(self.trUtf8('Ctrl+Alt+Tab')), 0, + self.tr('Show next'), + self.tr('Show next'), + QKeySequence(self.tr('Ctrl+Alt+Tab')), 0, self, 'view_next_tab') self.nextTabAct.triggered[()].connect(self.__showNext) self.actions.append(self.nextTabAct) self.addAction(self.nextTabAct) self.prevTabAct = E5Action( - self.trUtf8('Show previous'), - self.trUtf8('Show previous'), - QKeySequence(self.trUtf8('Shift+Ctrl+Alt+Tab')), 0, + self.tr('Show previous'), + self.tr('Show previous'), + QKeySequence(self.tr('Shift+Ctrl+Alt+Tab')), 0, self, 'view_previous_tab') self.prevTabAct.triggered[()].connect(self.__showPrevious) self.actions.append(self.prevTabAct) 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, 'switch_tabs') self.switchTabAct.triggered[()].connect(self.__switchTab) self.actions.append(self.switchTabAct) self.addAction(self.switchTabAct) self.pluginInfoAct = E5Action( - self.trUtf8('Plugin Infos'), + self.tr('Plugin Infos'), UI.PixmapCache.getIcon("plugin.png"), - self.trUtf8('&Plugin Infos...'), 0, 0, self, 'plugin_infos') - self.pluginInfoAct.setStatusTip(self.trUtf8('Show Plugin Infos')) - self.pluginInfoAct.setWhatsThis(self.trUtf8( + self.tr('&Plugin Infos...'), 0, 0, self, 'plugin_infos') + self.pluginInfoAct.setStatusTip(self.tr('Show Plugin Infos')) + self.pluginInfoAct.setWhatsThis(self.tr( """<b>Plugin Infos...</b>""" """<p>This opens a dialog, that show some information about""" """ loaded plugins.</p>""" @@ -2142,12 +2142,12 @@ self.actions.append(self.pluginInfoAct) self.pluginInstallAct = E5Action( - self.trUtf8('Install Plugins'), + self.tr('Install Plugins'), UI.PixmapCache.getIcon("pluginInstall.png"), - self.trUtf8('&Install Plugins...'), + self.tr('&Install Plugins...'), 0, 0, self, 'plugin_install') - self.pluginInstallAct.setStatusTip(self.trUtf8('Install Plugins')) - self.pluginInstallAct.setWhatsThis(self.trUtf8( + self.pluginInstallAct.setStatusTip(self.tr('Install Plugins')) + self.pluginInstallAct.setWhatsThis(self.tr( """<b>Install Plugins...</b>""" """<p>This opens a dialog to install or update plugins.</p>""" )) @@ -2155,12 +2155,12 @@ self.actions.append(self.pluginInstallAct) self.pluginDeinstallAct = E5Action( - self.trUtf8('Uninstall Plugin'), + self.tr('Uninstall Plugin'), UI.PixmapCache.getIcon("pluginUninstall.png"), - self.trUtf8('&Uninstall Plugin...'), + self.tr('&Uninstall Plugin...'), 0, 0, self, 'plugin_deinstall') - self.pluginDeinstallAct.setStatusTip(self.trUtf8('Uninstall Plugin')) - self.pluginDeinstallAct.setWhatsThis(self.trUtf8( + self.pluginDeinstallAct.setStatusTip(self.tr('Uninstall Plugin')) + self.pluginDeinstallAct.setWhatsThis(self.tr( """<b>Uninstall Plugin...</b>""" """<p>This opens a dialog to uninstall a plugin.</p>""" )) @@ -2168,13 +2168,13 @@ self.actions.append(self.pluginDeinstallAct) self.pluginRepoAct = E5Action( - self.trUtf8('Plugin Repository'), + self.tr('Plugin Repository'), UI.PixmapCache.getIcon("pluginRepository.png"), - self.trUtf8('Plugin &Repository...'), + self.tr('Plugin &Repository...'), 0, 0, self, 'plugin_repository') - self.pluginRepoAct.setStatusTip(self.trUtf8( + self.pluginRepoAct.setStatusTip(self.tr( 'Show Plugins available for download')) - self.pluginRepoAct.setWhatsThis(self.trUtf8( + self.pluginRepoAct.setWhatsThis(self.tr( """<b>Plugin Repository...</b>""" """<p>This opens a dialog, that shows a list of plugins """ """available on the Internet.</p>""" @@ -2199,11 +2199,11 @@ Private slot to initialize the action to show the Qt documentation. """ self.qt4DocAct = E5Action( - self.trUtf8('Qt4 Documentation'), - self.trUtf8('Qt&4 Documentation'), + self.tr('Qt4 Documentation'), + self.tr('Qt&4 Documentation'), 0, 0, self, 'qt4_documentation') - self.qt4DocAct.setStatusTip(self.trUtf8('Open Qt4 Documentation')) - self.qt4DocAct.setWhatsThis(self.trUtf8( + self.qt4DocAct.setStatusTip(self.tr('Open Qt4 Documentation')) + self.qt4DocAct.setWhatsThis(self.tr( """<b>Qt4 Documentation</b>""" """<p>Display the Qt4 Documentation. Dependent upon your""" """ settings, this will either show the help in Eric's internal""" @@ -2213,11 +2213,11 @@ self.actions.append(self.qt4DocAct) self.qt5DocAct = E5Action( - self.trUtf8('Qt5 Documentation'), - self.trUtf8('Qt&5 Documentation'), + self.tr('Qt5 Documentation'), + self.tr('Qt&5 Documentation'), 0, 0, self, 'qt5_documentation') - self.qt5DocAct.setStatusTip(self.trUtf8('Open Qt5 Documentation')) - self.qt5DocAct.setWhatsThis(self.trUtf8( + self.qt5DocAct.setStatusTip(self.tr('Open Qt5 Documentation')) + self.qt5DocAct.setWhatsThis(self.tr( """<b>Qt5 Documentation</b>""" """<p>Display the Qt5 Documentation. Dependent upon your""" """ settings, this will either show the help in Eric's internal""" @@ -2227,11 +2227,11 @@ self.actions.append(self.qt5DocAct) self.pyqt4DocAct = E5Action( - self.trUtf8('PyQt4 Documentation'), - self.trUtf8('PyQt&4 Documentation'), + self.tr('PyQt4 Documentation'), + self.tr('PyQt&4 Documentation'), 0, 0, self, 'pyqt4_documentation') - self.pyqt4DocAct.setStatusTip(self.trUtf8('Open PyQt4 Documentation')) - self.pyqt4DocAct.setWhatsThis(self.trUtf8( + self.pyqt4DocAct.setStatusTip(self.tr('Open PyQt4 Documentation')) + self.pyqt4DocAct.setWhatsThis(self.tr( """<b>PyQt4 Documentation</b>""" """<p>Display the PyQt4 Documentation. Dependent upon your""" """ settings, this will either show the help in Eric's internal""" @@ -2243,12 +2243,12 @@ try: import PyQt5 # __IGNORE_WARNING__ self.pyqt5DocAct = E5Action( - self.trUtf8('PyQt5 Documentation'), - self.trUtf8('PyQt&5 Documentation'), + self.tr('PyQt5 Documentation'), + self.tr('PyQt&5 Documentation'), 0, 0, self, 'pyqt5_documentation') - self.pyqt5DocAct.setStatusTip(self.trUtf8( + self.pyqt5DocAct.setStatusTip(self.tr( 'Open PyQt5 Documentation')) - self.pyqt5DocAct.setWhatsThis(self.trUtf8( + self.pyqt5DocAct.setWhatsThis(self.tr( """<b>PyQt5 Documentation</b>""" """<p>Display the PyQt5 Documentation. Dependent upon your""" """ settings, this will either show the help in Eric's""" @@ -2266,12 +2266,12 @@ documentation. """ self.pythonDocAct = E5Action( - self.trUtf8('Python 3 Documentation'), - self.trUtf8('Python &3 Documentation'), + self.tr('Python 3 Documentation'), + self.tr('Python &3 Documentation'), 0, 0, self, 'python3_documentation') - self.pythonDocAct.setStatusTip(self.trUtf8( + self.pythonDocAct.setStatusTip(self.tr( 'Open Python 3 Documentation')) - self.pythonDocAct.setWhatsThis(self.trUtf8( + self.pythonDocAct.setWhatsThis(self.tr( """<b>Python 3 Documentation</b>""" """<p>Display the Python 3 documentation. If no documentation""" """ directory is configured, the location of the Python 3""" @@ -2284,12 +2284,12 @@ self.actions.append(self.pythonDocAct) self.python2DocAct = E5Action( - self.trUtf8('Python 2 Documentation'), - self.trUtf8('Python &2 Documentation'), + self.tr('Python 2 Documentation'), + self.tr('Python &2 Documentation'), 0, 0, self, 'python2_documentation') - self.python2DocAct.setStatusTip(self.trUtf8( + self.python2DocAct.setStatusTip(self.tr( 'Open Python 2 Documentation')) - self.python2DocAct.setWhatsThis(self.trUtf8( + self.python2DocAct.setWhatsThis(self.tr( """<b>Python 2 Documentation</b>""" """<p>Display the Python 2 documentation. If no documentation""" """ directory is configured, the location of the Python 2""" @@ -2308,12 +2308,12 @@ Private slot to initialize the action to show the eric5 documentation. """ self.ericDocAct = E5Action( - self.trUtf8("Eric API Documentation"), - self.trUtf8('&Eric API Documentation'), + self.tr("Eric API Documentation"), + self.tr('&Eric API Documentation'), 0, 0, self, 'eric_documentation') - self.ericDocAct.setStatusTip(self.trUtf8( + self.ericDocAct.setStatusTip(self.tr( "Open Eric API Documentation")) - self.ericDocAct.setWhatsThis(self.trUtf8( + self.ericDocAct.setWhatsThis(self.tr( """<b>Eric API Documentation</b>""" """<p>Display the Eric API documentation. The location for the""" """ documentation is the Documentation/Source subdirectory of""" @@ -2329,12 +2329,12 @@ pyside2, pyside3 = Utilities.checkPyside() if pyside2 or pyside3: self.pysideDocAct = E5Action( - self.trUtf8('PySide Documentation'), - self.trUtf8('Py&Side Documentation'), + self.tr('PySide Documentation'), + self.tr('Py&Side Documentation'), 0, 0, self, 'pyside_documentation') - self.pysideDocAct.setStatusTip(self.trUtf8( + self.pysideDocAct.setStatusTip(self.tr( 'Open PySide Documentation')) - self.pysideDocAct.setWhatsThis(self.trUtf8( + self.pysideDocAct.setWhatsThis(self.tr( """<b>PySide Documentation</b>""" """<p>Display the PySide Documentation. Dependent upon your""" """ settings, this will either show the help in Eric's""" @@ -2373,7 +2373,7 @@ mb.addMenu(self.__menus["start"]) mb.addMenu(self.__menus["debug"]) - self.__menus["unittest"] = QMenu(self.trUtf8('&Unittest'), self) + self.__menus["unittest"] = QMenu(self.tr('&Unittest'), self) self.__menus["unittest"].setTearOffEnabled(True) mb.addMenu(self.__menus["unittest"]) self.__menus["unittest"].addAction(self.utDialogAct) @@ -2390,12 +2390,12 @@ self.__menus["project"] = self.project.initMenu() mb.addMenu(self.__menus["project"]) - self.__menus["extras"] = QMenu(self.trUtf8('E&xtras'), self) + self.__menus["extras"] = QMenu(self.tr('E&xtras'), self) self.__menus["extras"].setTearOffEnabled(True) self.__menus["extras"].aboutToShow.connect(self.__showExtrasMenu) mb.addMenu(self.__menus["extras"]) self.viewmanager.addToExtrasMenu(self.__menus["extras"]) - self.__menus["wizards"] = QMenu(self.trUtf8('Wi&zards'), self) + self.__menus["wizards"] = QMenu(self.tr('Wi&zards'), self) self.__menus["wizards"].setTearOffEnabled(True) self.__menus["wizards"].aboutToShow.connect(self.__showWizardsMenu) self.wizardsMenuAct = self.__menus["extras"].addMenu( @@ -2403,16 +2403,16 @@ self.wizardsMenuAct.setEnabled(False) self.__menus["macros"] = self.viewmanager.initMacroMenu() self.__menus["extras"].addMenu(self.__menus["macros"]) - self.__menus["tools"] = QMenu(self.trUtf8('&Tools'), self) + self.__menus["tools"] = QMenu(self.tr('&Tools'), self) self.__menus["tools"].aboutToShow.connect(self.__showToolsMenu) self.__menus["tools"].triggered.connect(self.__toolExecute) - self.toolGroupsMenu = QMenu(self.trUtf8("Select Tool Group"), self) + self.toolGroupsMenu = QMenu(self.tr("Select Tool Group"), self) self.toolGroupsMenu.aboutToShow.connect(self.__showToolGroupsMenu) self.toolGroupsMenu.triggered.connect(self.__toolGroupSelected) self.toolGroupsMenuTriggered = False self.__menus["extras"].addMenu(self.__menus["tools"]) - self.__menus["settings"] = QMenu(self.trUtf8('Se&ttings'), self) + self.__menus["settings"] = QMenu(self.tr('Se&ttings'), self) mb.addMenu(self.__menus["settings"]) self.__menus["settings"].setTearOffEnabled(True) self.__menus["settings"].addAction(self.prefAct) @@ -2435,12 +2435,12 @@ self.__menus["settings"].addSeparator() self.__menus["settings"].addAction(self.editMessageFilterAct) - self.__menus["window"] = QMenu(self.trUtf8('&Window'), self) + self.__menus["window"] = QMenu(self.tr('&Window'), self) mb.addMenu(self.__menus["window"]) self.__menus["window"].setTearOffEnabled(True) self.__menus["window"].aboutToShow.connect(self.__showWindowMenu) - self.__menus["subwindow"] = QMenu(self.trUtf8("&Windows"), + self.__menus["subwindow"] = QMenu(self.tr("&Windows"), self.__menus["window"]) self.__menus["subwindow"].setTearOffEnabled(True) # left side @@ -2460,7 +2460,7 @@ self.__menus["subwindow"].addAction(self.ircActivateAct) self.__menus["toolbars"] = \ - QMenu(self.trUtf8("&Toolbars"), self.__menus["window"]) + QMenu(self.tr("&Toolbars"), self.__menus["window"]) self.__menus["toolbars"].setTearOffEnabled(True) self.__menus["toolbars"].aboutToShow.connect(self.__showToolbarsMenu) self.__menus["toolbars"].triggered.connect(self.__TBMenuTriggered) @@ -2471,7 +2471,7 @@ mb.addMenu(self.__menus["bookmarks"]) self.__menus["bookmarks"].setTearOffEnabled(True) - self.__menus["plugins"] = QMenu(self.trUtf8('P&lugins'), self) + self.__menus["plugins"] = QMenu(self.tr('P&lugins'), self) mb.addMenu(self.__menus["plugins"]) self.__menus["plugins"].setTearOffEnabled(True) self.__menus["plugins"].addAction(self.pluginInfoAct) @@ -2481,11 +2481,11 @@ self.__menus["plugins"].addAction(self.pluginRepoAct) self.__menus["plugins"].addSeparator() self.__menus["plugins"].addAction( - self.trUtf8("Configure..."), self.__pluginsConfigure) + self.tr("Configure..."), self.__pluginsConfigure) mb.addSeparator() - self.__menus["help"] = QMenu(self.trUtf8('&Help'), self) + self.__menus["help"] = QMenu(self.tr('&Help'), self) mb.addMenu(self.__menus["help"]) self.__menus["help"].setTearOffEnabled(True) self.__menus["help"].addAction(self.helpviewerAct) @@ -2533,14 +2533,14 @@ starttb, debugtb = self.debuggerUI.initToolbars(self.toolbarManager) multiprojecttb = self.multiProject.initToolbar(self.toolbarManager) projecttb = self.project.initToolbar(self.toolbarManager) - toolstb = QToolBar(self.trUtf8("Tools"), self) - unittesttb = QToolBar(self.trUtf8("Unittest"), self) + toolstb = QToolBar(self.tr("Tools"), self) + unittesttb = QToolBar(self.tr("Unittest"), self) bookmarktb = self.viewmanager.initBookmarkToolbar(self.toolbarManager) spellingtb = self.viewmanager.initSpellingToolbar(self.toolbarManager) - settingstb = QToolBar(self.trUtf8("Settings"), self) - helptb = QToolBar(self.trUtf8("Help"), self) - profilestb = QToolBar(self.trUtf8("Profiles"), self) - pluginstb = QToolBar(self.trUtf8("Plugins"), self) + settingstb = QToolBar(self.tr("Settings"), self) + helptb = QToolBar(self.tr("Help"), self) + profilestb = QToolBar(self.tr("Profiles"), self) + pluginstb = QToolBar(self.tr("Plugins"), self) toolstb.setIconSize(Config.ToolBarIconSize) unittesttb.setIconSize(Config.ToolBarIconSize) @@ -2556,12 +2556,12 @@ profilestb.setObjectName("ProfilesToolbar") pluginstb.setObjectName("PluginsToolbar") - toolstb.setToolTip(self.trUtf8("Tools")) - unittesttb.setToolTip(self.trUtf8("Unittest")) - settingstb.setToolTip(self.trUtf8("Settings")) - helptb.setToolTip(self.trUtf8("Help")) - profilestb.setToolTip(self.trUtf8("Profiles")) - pluginstb.setToolTip(self.trUtf8("Plugins")) + toolstb.setToolTip(self.tr("Tools")) + unittesttb.setToolTip(self.tr("Unittest")) + settingstb.setToolTip(self.tr("Settings")) + helptb.setToolTip(self.tr("Help")) + profilestb.setToolTip(self.tr("Profiles")) + pluginstb.setToolTip(self.tr("Plugins")) filetb.addSeparator() filetb.addAction(self.exitAct) @@ -2708,42 +2708,42 @@ self.sbLanguage = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbLanguage) - self.sbLanguage.setWhatsThis(self.trUtf8( + self.sbLanguage.setWhatsThis(self.tr( """<p>This part of the status bar displays the""" """ current editors language.</p>""" )) self.sbEncoding = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbEncoding) - self.sbEncoding.setWhatsThis(self.trUtf8( + self.sbEncoding.setWhatsThis(self.tr( """<p>This part of the status bar displays the""" """ current editors encoding.</p>""" )) self.sbEol = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbEol) - self.sbEol.setWhatsThis(self.trUtf8( + self.sbEol.setWhatsThis(self.tr( """<p>This part of the status bar displays the""" """ current editors eol setting.</p>""" )) self.sbWritable = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbWritable) - self.sbWritable.setWhatsThis(self.trUtf8( + self.sbWritable.setWhatsThis(self.tr( """<p>This part of the status bar displays an indication of the""" """ current editors files writability.</p>""" )) self.sbLine = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbLine) - self.sbLine.setWhatsThis(self.trUtf8( + self.sbLine.setWhatsThis(self.tr( """<p>This part of the status bar displays the line number of""" """ the current editor.</p>""" )) self.sbPos = QLabel(self.__statusBar) self.__statusBar.addPermanentWidget(self.sbPos) - self.sbPos.setWhatsThis(self.trUtf8( + self.sbPos.setWhatsThis(self.tr( """<p>This part of the status bar displays the cursor position""" """ of the current editor.</p>""" )) @@ -2754,7 +2754,7 @@ UI.PixmapCache.getPixmap("zoomReset.png"), self.__statusBar) self.__statusBar.addPermanentWidget(self.sbZoom) - self.sbZoom.setWhatsThis(self.trUtf8( + self.sbZoom.setWhatsThis(self.tr( """<p>This part of the status bar allows zooming the current""" """ editor, shell or terminal.</p>""" )) @@ -2773,7 +2773,7 @@ """ self.toolGroupActions = {} for toolGroup in self.toolGroups: - category = self.trUtf8("External Tools/{0}").format(toolGroup[0]) + category = self.tr("External Tools/{0}").format(toolGroup[0]) for tool in toolGroup[1]: if tool['menutext'] != '--': act = QAction(UI.PixmapCache.getIcon(tool['icon']), @@ -2813,7 +2813,7 @@ del self.toolGroupActions[key] # step 4: add all newly configured tools - category = self.trUtf8("External Tools/{0}").format(toolGroup[0]) + category = self.tr("External Tools/{0}").format(toolGroup[0]) for tool in toolGroup[1]: if tool['menutext'] != '--': key = "{0}@@{1}".format(toolGroup[0], tool['menutext']) @@ -2910,7 +2910,7 @@ except ImportError: sip_version_str = "sip version not available" - versionText = self.trUtf8( + versionText = self.tr( """<h3>Version Numbers</h3>""" """<table>""") versionText += """<tr><td><b>Python</b></td><td>{0}</td></tr>"""\ @@ -2931,7 +2931,7 @@ pass versionText += """<tr><td><b>{0}</b></td><td>{1}</td></tr>"""\ .format(Program, Version) - versionText += self.trUtf8("""</table>""") + versionText += self.tr("""</table>""") E5MessageBox.about(self, Program, versionText) @@ -2963,8 +2963,8 @@ Preferences.getUser("MailServer") == "": E5MessageBox.critical( self, - self.trUtf8("Report Bug"), - self.trUtf8( + self.tr("Report Bug"), + self.tr( """Email address or mail server address is empty.""" """ Please configure your Email settings in the""" """ Preferences Dialog.""")) @@ -3236,8 +3236,8 @@ """ res = E5MessageBox.yesNo( self, - self.trUtf8("Restart application"), - self.trUtf8( + self.tr("Restart application"), + self.tr( """The application needs to be restarted. Do it now?"""), yesDefault=True) @@ -3269,11 +3269,11 @@ self.__menus["tools"].addMenu(self.toolGroupsMenu) act = self.__menus["tools"].addAction( - self.trUtf8("Configure Tool Groups ..."), + self.tr("Configure Tool Groups ..."), self.__toolGroupsConfiguration) act.setData(-1) act = self.__menus["tools"].addAction( - self.trUtf8("Configure current Tool Group ..."), + self.tr("Configure current Tool Group ..."), self.__toolsConfiguration) act.setData(-2) self.__menus["tools"].addSeparator() @@ -3322,7 +3322,7 @@ self.toolGroupsMenu.clear() # add the default entry - act = self.toolGroupsMenu.addAction(self.trUtf8("&Builtin Tools")) + act = self.toolGroupsMenu.addAction(self.tr("&Builtin Tools")) act.setData(-1) if self.currentToolGroup == -1: font = act.font() @@ -3330,7 +3330,7 @@ act.setFont(font) # add the plugins entry - act = self.toolGroupsMenu.addAction(self.trUtf8("&Plugin Tools")) + act = self.toolGroupsMenu.addAction(self.tr("&Plugin Tools")) act.setData(-2) if self.currentToolGroup == -2: font = act.font() @@ -3420,9 +3420,9 @@ act.setChecked(not tb.isHidden()) self.__menus["toolbars"].addSeparator() self.__toolbarsShowAllAct = \ - self.__menus["toolbars"].addAction(self.trUtf8("&Show all")) + self.__menus["toolbars"].addAction(self.tr("&Show all")) self.__toolbarsHideAllAct = \ - self.__menus["toolbars"].addAction(self.trUtf8("&Hide all")) + self.__menus["toolbars"].addAction(self.tr("&Hide all")) def __TBMenuTriggered(self, act): """ @@ -4004,8 +4004,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Unittest Project"), - self.trUtf8( + self.tr("Unittest Project"), + self.tr( "There is no main script defined for the" " current project. Aborting")) return @@ -4067,8 +4067,8 @@ if version == 3: E5MessageBox.information( self, - self.trUtf8("Qt 3 support"), - self.trUtf8("""Qt v.3 is not supported by eric5.""")) + self.tr("Qt 3 support"), + self.tr("""Qt v.3 is not supported by eric5.""")) return args = [] @@ -4079,8 +4079,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4088,8 +4088,8 @@ except EnvironmentError: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4110,8 +4110,8 @@ if not proc.startDetached(designer, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start Qt-Designer.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(designer)) @@ -4132,8 +4132,8 @@ if version < 4: E5MessageBox.information( self, - self.trUtf8("Qt 3 support"), - self.trUtf8("""Qt v.3 is not supported by eric5.""")) + self.tr("Qt 3 support"), + self.tr("""Qt v.3 is not supported by eric5.""")) return args = [] @@ -4146,8 +4146,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4155,8 +4155,8 @@ except EnvironmentError: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4177,8 +4177,8 @@ if not proc.startDetached(linguist, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start Qt-Linguist.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(linguist)) @@ -4201,8 +4201,8 @@ if version < 4: E5MessageBox.information( self, - self.trUtf8("Qt 3 support"), - self.trUtf8("""Qt v.3 is not supported by eric5.""")) + self.tr("Qt 3 support"), + self.tr("""Qt v.3 is not supported by eric5.""")) return args = [] @@ -4226,8 +4226,8 @@ if not proc.startDetached(assistant, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start Qt-Assistant.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(assistant)) @@ -4254,8 +4254,8 @@ if not customViewer: E5MessageBox.information( self, - self.trUtf8("Help"), - self.trUtf8( + self.tr("Help"), + self.tr( """Currently no custom viewer is selected.""" """ Please use the preferences dialog to specify one.""")) return @@ -4268,8 +4268,8 @@ if not proc.startDetached(customViewer, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start custom viewer.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(customViewer)) @@ -4288,8 +4288,8 @@ if not proc.startDetached("hh", args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start the help viewer.<br>' 'Ensure that it is available as <b>hh</b>.</p>' )) @@ -4314,8 +4314,8 @@ else: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4323,8 +4323,8 @@ except EnvironmentError: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4334,8 +4334,8 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start UI Previewer.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(viewer)) @@ -4365,8 +4365,8 @@ if not ignore: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4375,8 +4375,8 @@ if not ignore: E5MessageBox.critical( self, - self.trUtf8('Problem'), - self.trUtf8( + self.tr('Problem'), + self.tr( '<p>The file <b>{0}</b> does not exist or' ' is zero length.</p>') .format(fn)) @@ -4386,8 +4386,8 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start Translation Previewer.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(viewer)) @@ -4407,8 +4407,8 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start SQL Browser.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(browser)) @@ -4459,8 +4459,8 @@ not proc.startDetached(sys.executable, args): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start Snapshot tool.<br>' 'Ensure that it is available as <b>{0}</b>.</p>' ).format(snap)) @@ -4480,8 +4480,8 @@ E5MessageBox.information( self, - self.trUtf8("External Tools"), - self.trUtf8( + self.tr("External Tools"), + self.tr( """No tool entry found for external tool '{0}' """ """in tool group '{1}'.""") .format(toolMenuText, toolGroupName)) @@ -4489,8 +4489,8 @@ E5MessageBox.information( self, - self.trUtf8("External Tools"), - self.trUtf8("""No toolgroup entry '{0}' found.""") + self.tr("External Tools"), + self.tr("""No toolgroup entry '{0}' found.""") .format(toolGroupName) ) @@ -4526,7 +4526,7 @@ args = [] argv = Utilities.parseOptionString(tool['arguments']) args.extend(argv) - t = self.trUtf8("Starting process '{0} {1}'.\n")\ + t = self.tr("Starting process '{0} {1}'.\n")\ .format(program, tool['arguments']) self.appendToStdout(t) @@ -4544,8 +4544,8 @@ if not proc.waitForStarted(): E5MessageBox.critical( self, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( '<p>Could not start the tool entry <b>{0}</b>.<br>' 'Ensure that it is available as <b>{1}</b>.</p>') .format(tool['menutext'], tool['executable'])) @@ -4618,7 +4618,7 @@ # now delete the exited procs from the list of running processes for proc in exitedProcs: self.toolProcs.remove(proc) - t = self.trUtf8("Process '{0}' has exited.\n").format(proc[0]) + t = self.tr("Process '{0}' has exited.\n").format(proc[0]) self.appendToStdout(t) def __showPythonDoc(self): @@ -4654,9 +4654,9 @@ if not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4711,9 +4711,9 @@ if not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4780,9 +4780,9 @@ if not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4812,9 +4812,9 @@ if not pyqt4DocDir: E5MessageBox.warning( self, - self.trUtf8("Documentation"), - self.trUtf8("""<p>The PyQt4 documentation starting point""" - """ has not been configured.</p>""")) + self.tr("Documentation"), + self.tr("""<p>The PyQt4 documentation starting point""" + """ has not been configured.</p>""")) return if not pyqt4DocDir.startswith("http://") and \ @@ -4838,9 +4838,9 @@ if not home or not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4872,9 +4872,9 @@ if not pyqt5DocDir: E5MessageBox.warning( self, - self.trUtf8("Documentation"), - self.trUtf8("""<p>The PyQt5 documentation starting point""" - """ has not been configured.</p>""")) + self.tr("Documentation"), + self.tr("""<p>The PyQt5 documentation starting point""" + """ has not been configured.</p>""")) return if not pyqt5DocDir.startswith("http://") and \ @@ -4900,9 +4900,9 @@ if not home or not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4936,9 +4936,9 @@ if not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -4968,9 +4968,9 @@ if not pysideDocDir: E5MessageBox.warning( self, - self.trUtf8("Documentation"), - self.trUtf8("""<p>The PySide documentation starting point""" - """ has not been configured.</p>""")) + self.tr("Documentation"), + self.tr("""<p>The PySide documentation starting point""" + """ has not been configured.</p>""")) return if not pysideDocDir.startswith("http://") and \ @@ -4984,9 +4984,9 @@ if not os.path.exists(home): E5MessageBox.warning( self, - self.trUtf8("Documentation Missing"), - self.trUtf8("""<p>The documentation starting point""" - """ "<b>{0}</b>" could not be found.</p>""") + self.tr("Documentation Missing"), + self.tr("""<p>The documentation starting point""" + """ "<b>{0}</b>" could not be found.</p>""") .format(home)) return @@ -5077,8 +5077,8 @@ if not started: E5MessageBox.critical( self, - self.trUtf8('Open Browser'), - self.trUtf8('Could not start a web browser')) + self.tr('Open Browser'), + self.tr('Could not start a web browser')) def getHelpViewer(self, preview=False): """ @@ -5251,9 +5251,9 @@ """ fn, selectedFilter = E5FileDialog.getSaveFileNameAndFilter( None, - self.trUtf8("Export Keyboard Shortcuts"), + self.tr("Export Keyboard Shortcuts"), "", - self.trUtf8("Keyboard shortcut file (*.e4k)"), + self.tr("Keyboard shortcut file (*.e4k)"), "", E5FileDialog.Options(E5FileDialog.DontConfirmOverwrite)) @@ -5275,9 +5275,9 @@ """ fn = E5FileDialog.getOpenFileName( None, - self.trUtf8("Import Keyboard Shortcuts"), + self.tr("Import Keyboard Shortcuts"), "", - self.trUtf8("Keyboard shortcut file (*.e4k)")) + self.tr("Keyboard shortcut file (*.e4k)")) if fn: from Preferences import Shortcuts @@ -5410,8 +5410,8 @@ if not ok: E5MessageBox.critical( self, - self.trUtf8("Save tasks"), - self.trUtf8( + self.tr("Save tasks"), + self.tr( "<p>The tasks file <b>{0}</b> could not be written.</p>") .format(fn)) return @@ -5436,8 +5436,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Read tasks"), - self.trUtf8( + self.tr("Read tasks"), + self.tr( "<p>The tasks file <b>{0}</b> could not be read.</p>") .format(fn)) @@ -5454,8 +5454,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Save session"), - self.trUtf8( + self.tr("Save session"), + self.tr( "<p>The session file <b>{0}</b> could not be written.</p>") .format(fn)) @@ -5467,8 +5467,8 @@ if not os.path.exists(fn): E5MessageBox.critical( self, - self.trUtf8("Read session"), - self.trUtf8( + self.tr("Read session"), + self.tr( "<p>The session file <b>{0}</b> could not be read.</p>") .format(fn)) return @@ -5482,8 +5482,8 @@ else: E5MessageBox.critical( self, - self.trUtf8("Read session"), - self.trUtf8( + self.tr("Read session"), + self.tr( "<p>The session file <b>{0}</b> could not be read.</p>") .format(fn)) @@ -5671,8 +5671,8 @@ else: E5MessageBox.information( self, - self.trUtf8("Drop Error"), - self.trUtf8("""<p><b>{0}</b> is not a file.</p>""") + self.tr("Drop Error"), + self.tr("""<p><b>{0}</b> is not a file.</p>""") .format(fname)) self.inDragDrop = False @@ -5812,14 +5812,14 @@ if manual: if self.__versionCheckProgress is None: self.__versionCheckProgress = E5ProgressDialog( - "", self.trUtf8("&Cancel"), + "", self.tr("&Cancel"), 0, len(self.__httpAlternatives), - self.trUtf8("%v/%m"), self) + self.tr("%v/%m"), self) self.__versionCheckProgress.setMinimumDuration(0) self.__versionCheckProgress.canceled.connect( self.__versionsDownloadCanceled) self.__versionCheckProgress.setLabelText( - self.trUtf8("Trying host {0}").format(url.host())) + self.tr("Trying host {0}").format(url.host())) self.__versionCheckProgress.setValue(alternative) request = QNetworkRequest(url) request.setAttribute(QNetworkRequest.CacheLoadControlAttribute, @@ -5864,17 +5864,17 @@ if self.manualUpdatesCheck: E5MessageBox.warning( self, - self.trUtf8("Error getting versions information"), - self.trUtf8("""The versions information could not be""" - """ downloaded.""" - """ Please go online and try again.""")) + self.tr("Error getting versions information"), + self.tr("""The versions information could not be""" + """ downloaded.""" + """ Please go online and try again.""")) elif failedDuration > 7: E5MessageBox.warning( self, - self.trUtf8("Error getting versions information"), - self.trUtf8("""The versions information could not be""" - """ downloaded for the last 7 days.""" - """ Please go online and try again.""")) + self.tr("Error getting versions information"), + self.tr("""The versions information could not be""" + """ downloaded for the last 7 days.""" + """ Please go online and try again.""")) return else: self.performVersionCheck(self.manualUpdatesCheck, @@ -5926,8 +5926,8 @@ if versions[2][0] == "5" and versions[2] > Version: res = E5MessageBox.yesNo( self, - self.trUtf8("Update available"), - self.trUtf8( + self.tr("Update available"), + self.tr( """The update to <b>{0}</b> of eric5 is""" """ available at <b>{1}</b>. Would you like to""" """ get it?""") @@ -5937,8 +5937,8 @@ elif versions[0] > Version: res = E5MessageBox.yesNo( self, - self.trUtf8("Update available"), - self.trUtf8( + self.tr("Update available"), + self.tr( """The update to <b>{0}</b> of eric5 is""" """ available at <b>{1}</b>. Would you like to""" """ get it?""") @@ -5949,8 +5949,8 @@ if self.manualUpdatesCheck: E5MessageBox.information( self, - self.trUtf8("Eric5 is up to date"), - self.trUtf8( + self.tr("Eric5 is up to date"), + self.tr( """You are using the latest version of""" """ eric5""")) else: @@ -5958,8 +5958,8 @@ if versions[0] > Version: res = E5MessageBox.yesNo( self, - self.trUtf8("Update available"), - self.trUtf8( + self.tr("Update available"), + self.tr( """The update to <b>{0}</b> of eric5 is""" """ available at <b>{1}</b>. Would you like""" """ to get it?""") @@ -5970,15 +5970,15 @@ if self.manualUpdatesCheck: E5MessageBox.information( self, - self.trUtf8("Eric5 is up to date"), - self.trUtf8( + self.tr("Eric5 is up to date"), + self.tr( """You are using the latest version of""" """ eric5""")) except IndexError: E5MessageBox.warning( self, - self.trUtf8("Error during updates check"), - self.trUtf8("""Could not perform updates check.""")) + self.tr("Error during updates check"), + self.tr("""Could not perform updates check.""")) if url: QDesktopServices.openUrl(QUrl(url)) @@ -5998,7 +5998,7 @@ @param versions contents of the downloaded versions file (list of strings) """ - versionText = self.trUtf8( + versionText = self.tr( """<h3>Available versions</h3>""" """<table>""") line = 0 @@ -6012,7 +6012,7 @@ 'sourceforge' in versions[line + 1] and "SourceForge" or versions[line + 1]) line += 2 - versionText += self.trUtf8("""</table>""") + versionText += self.tr("""</table>""") E5MessageBox.about(self, Program, versionText) @@ -6041,9 +6041,9 @@ E5MessageBox.information( self, - self.trUtf8("First time usage"), - self.trUtf8("""eric5 has not been configured yet. """ - """The configuration dialog will be started.""")) + self.tr("First time usage"), + self.tr("""eric5 has not been configured yet. """ + """The configuration dialog will be started.""")) self.showPreferences() def checkProjectsWorkspace(self): @@ -6060,7 +6060,7 @@ default = Utilities.getHomeDir() workspace = E5FileDialog.getExistingDirectory( None, - self.trUtf8("Select Workspace Directory"), + self.tr("Select Workspace Directory"), default, E5FileDialog.Options(E5FileDialog.Option(0))) Preferences.setMultiProject("Workspace", workspace)
--- a/VCS/ProjectBrowserHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/VCS/ProjectBrowserHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -268,8 +268,8 @@ dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Remove from repository (and disk)"), - self.trUtf8( + self.tr("Remove from repository (and disk)"), + self.tr( "Do you really want to remove these translation files from" " the repository (and disk)?"), names) @@ -288,8 +288,8 @@ dlg = DeleteFilesConfirmationDialog( self.parent(), - self.trUtf8("Remove from repository (and disk)"), - self.trUtf8( + self.tr("Remove from repository (and disk)"), + self.tr( "Do you really want to remove these files/directories" " from the repository (and disk)?"), files)
--- a/VCS/ProjectHelper.py Fri Jan 10 19:30:21 2014 +0100 +++ b/VCS/ProjectHelper.py Sat Jan 11 11:55:33 2014 +0100 @@ -62,13 +62,13 @@ Public method to generate the action objects. """ self.vcsNewAct = E5Action( - self.trUtf8('New from repository'), - self.trUtf8('&New from repository...'), + self.tr('New from repository'), + self.tr('&New from repository...'), 0, 0, self, 'vcs_new') - self.vcsNewAct.setStatusTip(self.trUtf8( + self.vcsNewAct.setStatusTip(self.tr( 'Create a new project from the VCS repository' )) - self.vcsNewAct.setWhatsThis(self.trUtf8( + self.vcsNewAct.setWhatsThis(self.tr( """<b>New from repository</b>""" """<p>This creates a new local project from the VCS""" """ repository.</p>""" @@ -77,13 +77,13 @@ self.actions.append(self.vcsNewAct) self.vcsExportAct = E5Action( - self.trUtf8('Export from repository'), - self.trUtf8('&Export from repository...'), + self.tr('Export from repository'), + self.tr('&Export from repository...'), 0, 0, self, 'vcs_export') - self.vcsExportAct.setStatusTip(self.trUtf8( + self.vcsExportAct.setStatusTip(self.tr( 'Export a project from the repository' )) - self.vcsExportAct.setWhatsThis(self.trUtf8( + self.vcsExportAct.setWhatsThis(self.tr( """<b>Export from repository</b>""" """<p>This exports a project from the repository.</p>""" )) @@ -91,13 +91,13 @@ self.actions.append(self.vcsExportAct) self.vcsAddAct = E5Action( - self.trUtf8('Add to repository'), - self.trUtf8('&Add to repository...'), + self.tr('Add to repository'), + self.tr('&Add to repository...'), 0, 0, self, 'vcs_add') - self.vcsAddAct.setStatusTip(self.trUtf8( + self.vcsAddAct.setStatusTip(self.tr( 'Add the local project to the VCS repository' )) - self.vcsAddAct.setWhatsThis(self.trUtf8( + self.vcsAddAct.setWhatsThis(self.tr( """<b>Add to repository</b>""" """<p>This adds (imports) the local project to the VCS""" """ repository.</p>""" @@ -148,8 +148,8 @@ vcsSystemsDisplay.append(vcsSystemsDict[key]) vcsSelected, ok = QInputDialog.getItem( None, - self.trUtf8("New Project"), - self.trUtf8("Select version control system for the project"), + self.tr("New Project"), + self.tr("Select version control system for the project"), vcsSystemsDisplay, 0, False) if not ok: @@ -172,8 +172,8 @@ # edit VCS command options vcores = E5MessageBox.yesNo( self.parent(), - self.trUtf8("New Project"), - self.trUtf8( + self.tr("New Project"), + self.tr( """Would you like to edit the VCS command options?""")) if vcores: from .CommandOptionsDialog import VcsCommandOptionsDialog @@ -188,8 +188,8 @@ except EnvironmentError: E5MessageBox.critical( self.parent(), - self.trUtf8("Create project directory"), - self.trUtf8( + self.tr("Create project directory"), + self.tr( "<p>The project directory <b>{0}</b> could not" " be created.</p>").format(projectdir)) self.project.pdata["VCS"] = ['None'] @@ -217,8 +217,8 @@ pfilenamelist = d.entryList(filters) pfilename, ok = QInputDialog.getItem( None, - self.trUtf8("New project from repository"), - self.trUtf8("Select a project file to open."), + self.tr("New project from repository"), + self.tr("Select a project file to open."), pfilenamelist, 0, False) if ok: self.project.openProject( @@ -232,8 +232,8 @@ else: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("New project from repository"), - self.trUtf8( + self.tr("New project from repository"), + self.tr( "The project retrieved from the repository" " does not contain an eric project file" " (*.e4p). Create it?"), @@ -264,9 +264,9 @@ if not export: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8( + self.tr( "New project from repository"), - self.trUtf8( + self.tr( "Shall the project file be added" " to the repository?"), yesDefault=True) @@ -276,8 +276,8 @@ else: E5MessageBox.critical( self.parent(), - self.trUtf8("New project from repository"), - self.trUtf8( + self.tr("New project from repository"), + self.tr( """The project could not be retrieved from""" """ the repository.""")) self.project.pdata["VCS"] = ['None'] @@ -332,8 +332,8 @@ vcsSystemsDisplay.append(vcsSystemsDict[key]) vcsSelected, ok = QInputDialog.getItem( None, - self.trUtf8("Import Project"), - self.trUtf8("Select version control system for the project"), + self.tr("Import Project"), + self.tr("Select version control system for the project"), vcsSystemsDisplay, 0, False) if not ok: @@ -352,8 +352,8 @@ # edit VCS command options vcores = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Import Project"), - self.trUtf8( + self.tr("Import Project"), + self.tr( """Would you like to edit the VCS command options?""")) if vcores: from .CommandOptionsDialog import VcsCommandOptionsDialog @@ -384,8 +384,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Update"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Update"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject() @@ -410,8 +410,8 @@ """ res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Remove project from repository"), - self.trUtf8( + self.tr("Remove project from repository"), + self.tr( "Dou you really want to remove this project from" " the repository (and disk)?")) if res: @@ -472,8 +472,8 @@ if shouldReopen: res = E5MessageBox.yesNo( self.parent(), - self.trUtf8("Switch"), - self.trUtf8("""The project should be reread. Do this now?"""), + self.tr("Switch"), + self.tr("""The project should be reread. Do this now?"""), yesDefault=True) if res: self.project.reopenProject()
--- a/VCS/StatusMonitorLed.py Fri Jan 10 19:30:21 2014 +0100 +++ b/VCS/StatusMonitorLed.py Sat Jan 11 11:55:33 2014 +0100 @@ -42,7 +42,7 @@ } self.__on = False - self.setWhatsThis(self.trUtf8( + self.setWhatsThis(self.tr( """<p>This LED indicates the operating""" """ status of the VCS monitor thread (off = monitoring off,""" """ green = monitoring on and ok, red = monitoring on, but""" @@ -50,21 +50,21 @@ """ is given in the tooltip.</p>""" )) self.setToolTip( - self.trUtf8("Repository status checking is switched off") + self.tr("Repository status checking is switched off") ) self.setColor(self.vcsMonitorLedColors["off"]) # define a context menu self.__menu = QMenu(self) self.__checkAct = self.__menu.addAction( - self.trUtf8("Check status"), self.__checkStatus) + self.tr("Check status"), self.__checkStatus) self.__intervalAct = self.__menu.addAction( - self.trUtf8("Set interval..."), self.__setInterval) + self.tr("Set interval..."), self.__setInterval) self.__menu.addSeparator() self.__onAct = self.__menu.addAction( - self.trUtf8("Switch on"), self.__switchOn) + self.tr("Switch on"), self.__switchOn) self.__offAct = self.__menu.addAction( - self.trUtf8("Switch off"), self.__switchOff) + self.tr("Switch off"), self.__switchOff) self.__checkActions() # connect signals to our slots @@ -125,8 +125,8 @@ """ interval, ok = QInputDialog.getInt( None, - self.trUtf8("VCS Status Monitor"), - self.trUtf8("Enter monitor interval [s]"), + self.tr("VCS Status Monitor"), + self.tr("Enter monitor interval [s]"), self.project.getStatusMonitorInterval(), 0, 3600, 1) if ok:
--- a/VCS/StatusMonitorThread.py Fri Jan 10 19:30:21 2014 +0100 +++ b/VCS/StatusMonitorThread.py Sat Jan 11 11:55:33 2014 +0100 @@ -58,7 +58,7 @@ # perform the checking task self.statusList = [] self.vcsStatusMonitorStatus.emit( - "wait", self.trUtf8("Waiting for lock")) + "wait", self.tr("Waiting for lock")) try: locked = self.vcs.vcsExecutionMutex.tryLock(5000) except TypeError: @@ -66,7 +66,7 @@ if locked: try: self.vcsStatusMonitorStatus.emit( - "op", self.trUtf8("Checking repository status")) + "op", self.tr("Checking repository status")) res, statusMsg = self._performMonitor() finally: self.vcs.vcsExecutionMutex.unlock() @@ -75,12 +75,12 @@ else: status = "nok" self.vcsStatusMonitorStatus.emit( - "send", self.trUtf8("Sending data")) + "send", self.tr("Sending data")) self.vcsStatusMonitorData.emit(self.statusList) self.vcsStatusMonitorStatus.emit(status, statusMsg) else: self.vcsStatusMonitorStatus.emit( - "timeout", self.trUtf8("Timed out waiting for lock")) + "timeout", self.tr("Timed out waiting for lock")) if self.autoUpdate and self.shouldUpdate: self.vcs.vcsUpdate(self.projectDir, True)
--- a/VCS/VersionControl.py Fri Jan 10 19:30:21 2014 +0100 +++ b/VCS/VersionControl.py Sat Jan 11 11:55:33 2014 +0100 @@ -567,8 +567,8 @@ if not procStarted: E5MessageBox.critical( None, - self.trUtf8('Process Generation Error'), - self.trUtf8( + self.tr('Process Generation Error'), + self.tr( 'The process {0} could not be started. ' 'Ensure, that it is in the search path.' ).format(program)) @@ -698,7 +698,7 @@ self.statusMonitorThread = None self.__statusMonitorStatus( "off", - self.trUtf8("Repository status checking is switched off")) + self.tr("Repository status checking is switched off")) def setStatusMonitorInterval(self, interval, project): """
--- a/ViewManager/ViewManager.py Fri Jan 10 19:30:21 2014 +0100 +++ b/ViewManager/ViewManager.py Sat Jan 11 11:55:33 2014 +0100 @@ -3139,7 +3139,7 @@ self.quickFindtextAction = QWidgetAction(self) self.quickFindtextAction.setDefaultWidget(self.quickFindtextCombo) self.quickFindtextAction.setObjectName("vm_quickfindtext_action") - self.quickFindtextAction.setText(self.trUtf8("Quicksearch Textedit")) + self.quickFindtextAction.setText(self.tr("Quicksearch Textedit")) qtb.addAction(self.quickFindtextAction) qtb.addAction(self.quickSearchAct) qtb.addAction(self.quickSearchBackAct)