Fix a bug in Build and Constants, and clean up some more nested translates
This commit is contained in:
+2
-6
@@ -130,9 +130,7 @@ class NWDoc():
|
||||
|
||||
if showStatus and not isOrphan:
|
||||
self.theParent.setStatus(
|
||||
self.tr("{0}: {1}").format(
|
||||
self.tr("Opened Document"), self._theItem.itemName
|
||||
)
|
||||
self.tr("Opened Document: {0}").format(self._theItem.itemName)
|
||||
)
|
||||
|
||||
return theText
|
||||
@@ -178,9 +176,7 @@ class NWDoc():
|
||||
|
||||
if self._theItem is not None:
|
||||
self.theParent.setStatus(
|
||||
self.tr("{0}: {1}").format(
|
||||
self.tr("Saved Document"), self._theItem.itemName
|
||||
)
|
||||
self.tr("Saved Document: {0}").format(self._theItem.itemName)
|
||||
)
|
||||
|
||||
return True
|
||||
|
||||
+2
-2
@@ -1156,8 +1156,8 @@ class NWProject():
|
||||
if nAuth == 1:
|
||||
authString = self.bookAuthors[0]
|
||||
elif nAuth > 1:
|
||||
authString = "%s and %s" % (
|
||||
", ".join(self.bookAuthors[0:-1]), self.bookAuthors[-1]
|
||||
authString = "%s %s %s" % (
|
||||
", ".join(self.bookAuthors[0:-1]), self.tr("and"), self.bookAuthors[-1]
|
||||
)
|
||||
|
||||
return authString
|
||||
|
||||
@@ -292,8 +292,8 @@ class Tokenizer():
|
||||
|
||||
docSize = len(self.theText)
|
||||
if docSize > nwConst.MAX_DOCSIZE:
|
||||
errVal = self.tr("Document '{0}' is too big ({1}). Skipping.").format(
|
||||
self.theItem.itemName, f"{docSize/1.0e6:.2f} MB"
|
||||
errVal = self.tr("Document '{0}' is too big ({1} MB). Skipping.").format(
|
||||
self.theItem.itemName, f"{docSize/1.0e6:.2f}"
|
||||
)
|
||||
self.theText = "# %s\n\n%s\n\n" % (self.tr("ERROR"), errVal)
|
||||
self.errData.append(errVal)
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ import nw
|
||||
import logging
|
||||
import os
|
||||
|
||||
from time import time
|
||||
from lxml import etree
|
||||
from hashlib import sha256
|
||||
from time import time
|
||||
|
||||
from nw.core.item import NWItem
|
||||
from nw.common import checkHandle
|
||||
@@ -199,7 +199,7 @@ class NWTree():
|
||||
outFile.write("=================\n")
|
||||
outFile.write("\n")
|
||||
outFile.write("%-25s %-9s %-10s %s\n" % (
|
||||
"File Name", "Class", "Layout", "Document Label",
|
||||
"File Name", "Class", "Layout", "Document Label"
|
||||
))
|
||||
outFile.write("-"*tocLen + "\n")
|
||||
outFile.write("\n".join(tocList))
|
||||
|
||||
Reference in New Issue
Block a user