Fix a bunch of missing translation tags and fix a few default strings
This commit is contained in:
+2
-1
@@ -30,4 +30,5 @@ SOURCES += \
|
||||
nw/guimain.py
|
||||
|
||||
TRANSLATIONS += \
|
||||
i18n/nw_pt.ts
|
||||
i18n/nw_pt.ts \
|
||||
i18n/nw_nb-NO.ts
|
||||
|
||||
+2
-2
@@ -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")
|
||||
|
||||
|
||||
+1
-1
@@ -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"",
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
|
||||
+3
-3
@@ -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)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
+1
-1
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user