Fix missing translation (#921)
* Fix missing translation of label * Make some minor fixes to comments and logging
This commit is contained in:
committed by
GitHub
parent
f562937e81
commit
c17cec0574
@@ -251,7 +251,7 @@ class GuiAbout(QDialog):
|
|||||||
return
|
return
|
||||||
|
|
||||||
def _wrapTable(self, theData):
|
def _wrapTable(self, theData):
|
||||||
"""Wrap a list of label/value tuples in a html table.
|
"""Wrap a list of label/value tuples in an html table.
|
||||||
"""
|
"""
|
||||||
theTable = []
|
theTable = []
|
||||||
for aLabel, aValue in theData:
|
for aLabel, aValue in theData:
|
||||||
|
|||||||
@@ -142,9 +142,7 @@ class GuiDocSplit(QDialog):
|
|||||||
theText = ""
|
theText = ""
|
||||||
|
|
||||||
nLines = len(self.sourceText)
|
nLines = len(self.sourceText)
|
||||||
logger.debug(
|
logger.debug("Splitting document %s with %d lines", self.sourceItem, nLines)
|
||||||
"Splitting document %s with %d lines" % (self.sourceItem, nLines)
|
|
||||||
)
|
|
||||||
|
|
||||||
finalOrder = []
|
finalOrder = []
|
||||||
for i in range(self.listBox.count()):
|
for i in range(self.listBox.count()):
|
||||||
@@ -177,7 +175,8 @@ class GuiDocSplit(QDialog):
|
|||||||
"{0}<br><br>{1}".format(
|
"{0}<br><br>{1}".format(
|
||||||
self.tr(
|
self.tr(
|
||||||
"The document will be split into {0} file(s) in a new folder. "
|
"The document will be split into {0} file(s) in a new folder. "
|
||||||
"The original document will remain intact.").format(nFiles),
|
"The original document will remain intact."
|
||||||
|
).format(nFiles),
|
||||||
self.tr(
|
self.tr(
|
||||||
"Continue with the splitting process?"
|
"Continue with the splitting process?"
|
||||||
)
|
)
|
||||||
@@ -199,9 +198,7 @@ class GuiDocSplit(QDialog):
|
|||||||
isNovel = srcItem.itemClass == nwItemClass.NOVEL
|
isNovel = srcItem.itemClass == nwItemClass.NOVEL
|
||||||
itemLayout = nwItemLayout.DOCUMENT if isNovel else nwItemLayout.NOTE
|
itemLayout = nwItemLayout.DOCUMENT if isNovel else nwItemLayout.NOTE
|
||||||
|
|
||||||
wTitle = wTitle.lstrip("#")
|
wTitle = wTitle.lstrip("#").strip()
|
||||||
wTitle = wTitle.strip()
|
|
||||||
|
|
||||||
nHandle = self.theProject.newFile(wTitle, srcItem.itemClass, fHandle)
|
nHandle = self.theProject.newFile(wTitle, srcItem.itemClass, fHandle)
|
||||||
newItem = self.theProject.projTree[nHandle]
|
newItem = self.theProject.projTree[nHandle]
|
||||||
newItem.setLayout(itemLayout)
|
newItem.setLayout(itemLayout)
|
||||||
|
|||||||
@@ -279,8 +279,7 @@ class GuiProjectEditStatus(QWidget):
|
|||||||
|
|
||||||
self.listBox = QTreeWidget()
|
self.listBox = QTreeWidget()
|
||||||
self.listBox.setHeaderLabels([
|
self.listBox.setHeaderLabels([
|
||||||
self.tr("Label"),
|
self.tr("Label"), self.tr("Usage"),
|
||||||
self.tr("Usage"),
|
|
||||||
])
|
])
|
||||||
self.listBox.itemSelectionChanged.connect(self._selectedItem)
|
self.listBox.itemSelectionChanged.connect(self._selectedItem)
|
||||||
self.listBox.setColumnWidth(self.COL_LABEL, wCol0)
|
self.listBox.setColumnWidth(self.COL_LABEL, wCol0)
|
||||||
@@ -551,7 +550,7 @@ class GuiProjectEditReplace(QWidget):
|
|||||||
self.editValue.setEnabled(False)
|
self.editValue.setEnabled(False)
|
||||||
self.editValue.setMaxLength(80)
|
self.editValue.setMaxLength(80)
|
||||||
|
|
||||||
self.saveButton = QPushButton("Save")
|
self.saveButton = QPushButton(self.tr("Save"))
|
||||||
self.saveButton.setToolTip(self.tr("Save entry"))
|
self.saveButton.setToolTip(self.tr("Save entry"))
|
||||||
self.saveButton.clicked.connect(self._saveEntry)
|
self.saveButton.clicked.connect(self._saveEntry)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user