Skip to content

Commit

Permalink
Merge branch 'patch' into macos-appbundle
Browse files Browse the repository at this point in the history
  • Loading branch information
vkbo authored Feb 4, 2023
2 parents af12339 + c9d768e commit a6d9ed0
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 54 deletions.
88 changes: 44 additions & 44 deletions i18n/nw_base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@
<context>
<name>Common</name>
<message>
<location filename="../novelwriter/common.py" line="333" />
<location filename="../novelwriter/common.py" line="306" />
<source>in the future</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="337" />
<location filename="../novelwriter/common.py" line="310" />
<source>just now</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="341" />
<location filename="../novelwriter/common.py" line="314" />
<source>a minute ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="345" />
<location filename="../novelwriter/common.py" line="318" />
<source>{0} minutes ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="349" />
<location filename="../novelwriter/common.py" line="322" />
<source>an hour ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="353" />
<location filename="../novelwriter/common.py" line="326" />
<source>{0} hours ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="357" />
<location filename="../novelwriter/common.py" line="330" />
<source>a day ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="361" />
<location filename="../novelwriter/common.py" line="334" />
<source>{0} days ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="365" />
<location filename="../novelwriter/common.py" line="338" />
<source>a week ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="369" />
<location filename="../novelwriter/common.py" line="342" />
<source>{0} weeks ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="373" />
<location filename="../novelwriter/common.py" line="346" />
<source>a month ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="377" />
<location filename="../novelwriter/common.py" line="350" />
<source>{0} months ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="381" />
<location filename="../novelwriter/common.py" line="354" />
<source>a year ago</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/common.py" line="385" />
<location filename="../novelwriter/common.py" line="358" />
<source>{0} years ago</source>
<translation type="unfinished" />
</message>
Expand Down Expand Up @@ -2884,118 +2884,118 @@
<context>
<name>GuiProjectDetailsContents</name>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="295" />
<location filename="../novelwriter/dialogs/projdetails.py" line="297" />
<source>Table of Contents</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="314" />
<location filename="../novelwriter/dialogs/projdetails.py" line="316" />
<source>Title</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="315" />
<location filename="../novelwriter/dialogs/projdetails.py" line="317" />
<source>Words</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="316" />
<location filename="../novelwriter/dialogs/projdetails.py" line="318" />
<source>Pages</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="317" />
<location filename="../novelwriter/dialogs/projdetails.py" line="319" />
<source>Page</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="318" />
<location filename="../novelwriter/dialogs/projdetails.py" line="320" />
<source>Progress</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="353" />
<location filename="../novelwriter/dialogs/projdetails.py" line="355" />
<source>Typical word count for a 5 by 8 inch book page with 11 pt font is 350.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="356" />
<location filename="../novelwriter/dialogs/projdetails.py" line="358" />
<source>Start counting page numbers from this page.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="359" />
<location filename="../novelwriter/dialogs/projdetails.py" line="361" />
<source>Assume a new chapter or partition always start on an odd numbered page.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="362" />
<location filename="../novelwriter/dialogs/projdetails.py" line="364" />
<source>Words per page</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="373" />
<location filename="../novelwriter/dialogs/projdetails.py" line="375" />
<source>Count pages from</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="384" />
<location filename="../novelwriter/dialogs/projdetails.py" line="386" />
<source>Clear double pages</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="447" />
<location filename="../novelwriter/dialogs/projdetails.py" line="449" />
<source>END</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="501" />
<location filename="../novelwriter/dialogs/projdetails.py" line="503" />
<source>Untitled</source>
<translation type="unfinished" />
</message>
</context>
<context>
<name>GuiProjectDetailsMain</name>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="168" />
<source>Working Title: {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="177" />
<source>By {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="187" />
<location filename="../novelwriter/dialogs/projdetails.py" line="185" />
<source>Words</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="190" />
<location filename="../novelwriter/dialogs/projdetails.py" line="188" />
<source>Chapters</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="193" />
<location filename="../novelwriter/dialogs/projdetails.py" line="191" />
<source>Scenes</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="196" />
<location filename="../novelwriter/dialogs/projdetails.py" line="194" />
<source>Revisions</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="199" />
<location filename="../novelwriter/dialogs/projdetails.py" line="197" />
<source>Editing Time</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="219" />
<location filename="../novelwriter/dialogs/projdetails.py" line="217" />
<source>Path</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="253" />
<source>Project: {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projdetails.py" line="254" />
<source>By {0}</source>
<translation type="unfinished" />
</message>
</context>
<context>
<name>GuiProjectEditMain</name>
Expand Down
6 changes: 3 additions & 3 deletions novelwriter/core/projectdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,23 +207,23 @@ def setName(self, value):
"""Set a new project name.
"""
if value != self._name:
self._name = simplified(str(value))
self._name = simplified(str(value or ""))
self.theProject.setProjectChanged(True)
return

def setTitle(self, value):
"""Set a new novel title.
"""
if value != self._title:
self._title = simplified(str(value))
self._title = simplified(str(value or ""))
self.theProject.setProjectChanged(True)
return

def setAuthor(self, value):
"""Set the author value.
"""
if value != self._title:
self._author = simplified(str(value))
self._author = simplified(str(value or ""))
self.theProject.setProjectChanged(True)
return

Expand Down
16 changes: 9 additions & 7 deletions novelwriter/dialogs/projdetails.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
QLineEdit, QSpinBox, QTreeWidget, QTreeWidgetItem, QVBoxLayout, QWidget
)

from novelwriter.common import numberToRoman
from novelwriter.common import formatTime, numberToRoman
from novelwriter.custom import PagedDialog, QSwitch
from novelwriter.constants import nwUnicode
from novelwriter.gui.components import NovelSelector
Expand Down Expand Up @@ -156,25 +156,23 @@ def __init__(self, mainGui, theProject):
# Header
# ======

self.bookTitle = QLabel(self.theProject.data.title)
self.bookTitle = QLabel("")
bookFont = self.bookTitle.font()
bookFont.setPointSizeF(2.2*fPt)
bookFont.setWeight(QFont.Bold)
self.bookTitle.setFont(bookFont)
self.bookTitle.setAlignment(Qt.AlignHCenter)
self.bookTitle.setWordWrap(True)

self.projName = QLabel(
self.tr("Working Title: {0}").format(self.theProject.data.name)
)
self.projName = QLabel("")
workFont = self.projName.font()
workFont.setPointSizeF(0.8*fPt)
workFont.setItalic(True)
self.projName.setFont(workFont)
self.projName.setAlignment(Qt.AlignHCenter)
self.projName.setWordWrap(True)

self.bookAuthors = QLabel(self.tr("By {0}").format(self.theProject.data.author))
self.bookAuthors = QLabel("")
authFont = self.bookAuthors.font()
authFont.setPointSizeF(1.2*fPt)
self.bookAuthors.setFont(authFont)
Expand Down Expand Up @@ -251,11 +249,15 @@ def updateValues(self):
nwCount = pIndex.getNovelWordCount()
edTime = self.theProject.getCurrentEditTime()

self.bookTitle.setText(self.theProject.data.title or self.theProject.data.name)
self.projName.setText(self.tr("Project: {0}").format(self.theProject.data.name))
self.bookAuthors.setText(self.tr("By {0}").format(self.theProject.data.author))

self.wordCountVal.setText(f"{nwCount:n}")
self.chapCountVal.setText(f"{hCounts[2]:n}")
self.sceneCountVal.setText(f"{hCounts[3]:n}")
self.revCountVal.setText(f"{self.theProject.data.saveCount:n}")
self.editTimeVal.setText(f"{edTime//3600:02d}:{edTime%3600//60:02d}")
self.editTimeVal.setText(formatTime(edTime))

self.projPathVal.setText(str(self.theProject.storage.storagePath))

Expand Down

0 comments on commit a6d9ed0

Please sign in to comment.