Debug, Doc: Add windows title translate.

setup.py
Pierre-Antoine Rouby 2024-02-12 14:16:12 +01:00
parent 8895d0d565
commit 87fcf1c610
2 changed files with 10 additions and 4 deletions

View File

@ -54,8 +54,10 @@ class ReplWindow(PamhyrWindow):
def __init__(self, study=None, config=None,
solver=None, parent=None):
title = _translate("Debug", "Debug REPL")
super(ReplWindow, self).__init__(
title=self._pamhyr_name,
title=title,
study=study,
config=config,
options=[],

View File

@ -21,7 +21,7 @@ import sys
import logging
import subprocess
from PyQt5.QtCore import QUrl
from PyQt5.QtCore import QUrl, QCoreApplication
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QAction
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
@ -30,10 +30,11 @@ from View.Tools.PamhyrWindow import PamhyrWindow
logger = logging.getLogger()
_translate = QCoreApplication.translate
class DocWindow(PamhyrWindow):
_pamhyr_ui = "WebView"
_pamhyr_name = "Doc"
_pamhyr_name = "Documentation"
@classmethod
def _path_file(cls, filename):
@ -55,8 +56,11 @@ class DocWindow(PamhyrWindow):
def __init__(self, filename=None,
study=None, config=None,
parent=None):
title = _translate("Documentation", "Documentation")
title += f" - {filename}"
super(DocWindow, self).__init__(
title=self._pamhyr_name,
title=title,
study=study,
config=config,
options=[],