Commit 22ed783e authored by Boudewijn Rempt's avatar Boudewijn Rempt

Try to make all scripter's strings translatable

This is a bit tricky, because the strings are also used to root
through the object hierarchy to find widgets.

BUG:406945
parent 17bcbf63
......@@ -72,7 +72,7 @@ class DebugController (object):
return 0
def updateUIDebugger(self):
widget = self.scripter.uicontroller.findTabWidget('Debugger')
widget = self.scripter.uicontroller.findTabWidget(i18n('Debugger'))
exception = self._debuggerException()
if exception:
......
......@@ -41,7 +41,7 @@ class DebugAction(QAction):
def debug(self):
if self.scripter.uicontroller.invokeAction('save'):
self.scripter.uicontroller.setActiveWidget('Debugger')
self.scripter.uicontroller.setActiveWidget(i18n('Debugger'))
self.scripter.debugcontroller.start(self.scripter.documentcontroller.activeDocument)
widget = self.scripter.uicontroller.findTabWidget('Debugger')
widget = self.scripter.uicontroller.findTabWidget(i81n('Debugger'))
widget.startDebugger()
......@@ -43,12 +43,12 @@ class RunAction(QAction):
self.scripter = scripter
self.editor = self.scripter.uicontroller.editor
self.output = self.scripter.uicontroller.findTabWidget('OutPut', 'OutPutTextEdit')
self.output = self.scripter.uicontroller.findTabWidget(i18n('Output'), 'OutPutTextEdit')
self.triggered.connect(self.run)
self.setText(i18n("Run"))
self.setToolTip('Run Ctrl+R')
self.setToolTip(i18n('Run Ctrl+R'))
self.setIcon(QIcon(':/icons/run.svg'))
self.setShortcut(QKeySequence(Qt.CTRL + Qt.Key_R))
......@@ -65,7 +65,7 @@ class RunAction(QAction):
this script to bytecode and we execute this in an empty scope. That's
faster than use exec directly and cleaner, because we are using an empty scope. """
self.scripter.uicontroller.setActiveWidget('OutPut')
self.scripter.uicontroller.setActiveWidget(i18n('Output'))
stdout = sys.stdout
stderr = sys.stderr
output = docwrapper.DocWrapper(self.output.document())
......
......@@ -25,7 +25,7 @@ class DebuggerTable(QTableWidget):
self.setColumnCount(4)
tableHeader = ['Scope', 'Name', 'Value', 'Type']
tableHeader = [i18n('Scope'), i18n('Name'), i18n('Value'), i18n('Type')]
self.setHorizontalHeaderLabels(tableHeader)
self.setEditTriggers(self.NoEditTriggers)
......
......@@ -25,7 +25,7 @@ class DebuggerWidget(QWidget):
super(DebuggerWidget, self).__init__(parent)
self.scripter = scripter
self.setObjectName('Debugger')
self.setObjectName(i18n('Debugger'))
self.layout = QVBoxLayout()
self.stopAction = stopaction.StopAction(self.scripter, self)
......
......@@ -25,7 +25,7 @@ class OutPutWidget(QWidget):
super(OutPutWidget, self).__init__(parent)
self.scripter = scripter
self.setObjectName('OutPut')
self.setObjectName(i18n('Output'))
self.layout = QVBoxLayout()
self.toolbar = QToolBar()
......
......@@ -102,7 +102,7 @@ class UIController(object):
self.editor.undoAvailable.connect(self.setStatusModified)
def loadMenus(self):
self.addMenu('File', 'File')
self.addMenu(i18n('File'), i18n('File'))
def addMenu(self, menuName, parentName):
parent = self.menu_bar.findChild(QObject, parentName)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment