diff --git a/novelWriter.pro b/novelWriter.pro index b2da5800..ccf57676 100644 --- a/novelWriter.pro +++ b/novelWriter.pro @@ -30,4 +30,5 @@ SOURCES += \ nw/guimain.py TRANSLATIONS += \ - i18n/nw_pt.ts + i18n/nw_pt.ts \ + i18n/nw_nb-NO.ts diff --git a/nw/config.py b/nw/config.py index 5cf71b85..ad7e13ca 100644 --- a/nw/config.py +++ b/nw/config.py @@ -1060,7 +1060,7 @@ class Config: try: import enchant # noqa: F401 self.hasEnchant = True - logger.debug("Checking package 'pyenchant': Ok") + logger.debug("Checking package 'pyenchant': OK") except Exception: self.hasEnchant = False logger.debug("Checking package 'pyenchant': Missing") @@ -1068,7 +1068,7 @@ class Config: assistPath = shutil.which("assistant") self.hasAssistant = assistPath is not None if self.hasAssistant: - logger.debug("Checking executable 'assistant': Ok") + logger.debug("Checking executable 'assistant': OK") else: logger.debug("Checking executable 'assistant': Missing") diff --git a/nw/core/project.py b/nw/core/project.py index 02fa3fd3..bf0271c6 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -203,7 +203,7 @@ class NWProject(): self.autoReplace = {} self.titleFormat = { "title" : r"%title%", - "chapter" : self.tr(r"Chapter %ch%: %title%"), + "chapter" : self.tr("Chapter")+r" %ch%: %title%", "unnumbered" : r"%title%", "scene" : r"* * *", "section" : r"", diff --git a/nw/gui/build.py b/nw/gui/build.py index 95bd2c40..1e818733 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -257,7 +257,7 @@ class GuiBuildNovel(QDialog): # Styling Options # =============== - self.styleGroup = QGroupBox("Styling Options", self) + self.styleGroup = QGroupBox(self.tr("Styling Options"), self) self.styleForm = QGridLayout(self) self.styleGroup.setLayout(self.styleForm) diff --git a/nw/gui/custom.py b/nw/gui/custom.py index 4b187f21..e1ae95e1 100644 --- a/nw/gui/custom.py +++ b/nw/gui/custom.py @@ -39,7 +39,7 @@ from PyQt5.QtWidgets import ( QStylePainter, QStyleOptionTab, QListWidget, QListWidgetItem, QFrame ) -from nw.constants import nwUnicode, nwQuotes +from nw.constants import trConst, nwUnicode, nwQuotes logger = logging.getLogger(__name__) @@ -487,7 +487,7 @@ class QuotesDialog(QDialog): minSize = 100 for sKey, sLabel in nwQuotes.SYMBOLS.items(): - theText = "[ %s ] %s" % (sKey, sLabel) + theText = "[ %s ] %s" % (sKey, trConst(sLabel)) minSize = max(minSize, qMetrics.boundingRect(theText).width()) qtItem = QListWidgetItem(theText) qtItem.setData(Qt.UserRole, sKey) @@ -500,7 +500,7 @@ class QuotesDialog(QDialog): # Buttons self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doAccept) self.buttonBox.rejected.connect(self._doReject) diff --git a/nw/gui/docmerge.py b/nw/gui/docmerge.py index 2d2c8887..dfe928d5 100644 --- a/nw/gui/docmerge.py +++ b/nw/gui/docmerge.py @@ -66,7 +66,7 @@ class GuiDocMerge(QDialog): self.listBox.setMinimumHeight(self.mainConf.pxInt(180)) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doMerge) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/docsplit.py b/nw/gui/docsplit.py index b72f9b3c..034a986c 100644 --- a/nw/gui/docsplit.py +++ b/nw/gui/docsplit.py @@ -82,7 +82,7 @@ class GuiDocSplit(QDialog): self.splitLevel.currentIndexChanged.connect(self._populateList) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSplit) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/itemeditor.py b/nw/gui/itemeditor.py index 107172f0..17393579 100644 --- a/nw/gui/itemeditor.py +++ b/nw/gui/itemeditor.py @@ -117,7 +117,7 @@ class GuiItemEditor(QDialog): # Buttons self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/preferences.py b/nw/gui/preferences.py index 8234ebf3..5952f9c5 100644 --- a/nw/gui/preferences.py +++ b/nw/gui/preferences.py @@ -70,7 +70,7 @@ class GuiPreferences(PagedDialog): self.addTab(self.tabAuto, self.tr("Automation")) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/projsettings.py b/nw/gui/projsettings.py index 39cfe930..b7e13bbb 100644 --- a/nw/gui/projsettings.py +++ b/nw/gui/projsettings.py @@ -77,7 +77,7 @@ class GuiProjectSettings(PagedDialog): self.addTab(self.tabReplace, self.tr("Auto-Replace")) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("Ok")) + self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/guimain.py b/nw/guimain.py index f059ef16..50a0f6fa 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -290,7 +290,7 @@ class GuiMain(QMainWindow): self.openProject(self.mainConf.cmdOpen) logger.debug("novelWriter is ready ...") - self.setStatus("novelWriter is ready ...") + self.setStatus(self.tr("novelWriter is ready ...")) return