Add a credits page to the About dialog
This commit is contained in:
+258
-310
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<body>
|
||||
|
||||
<h2>Credits</h2>
|
||||
|
||||
<h3>Main Developer</h3>
|
||||
<p>Veronica Berglyd Olsen (<a href="https://github.com/vkbo">@vkbo</a>)</p>
|
||||
|
||||
<h3>Contributors</h3>
|
||||
|
||||
<p>
|
||||
<b>Concept:</b> Marian Lückhof (<a href="https://github.com/Number042">@Number042</a>)<br>
|
||||
<b>Internationalisation:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
|
||||
<b>Setup and Packaging:</b> Rachel Powers (<a href="https://github.com/Ryex">@Ryex</a>)
|
||||
</p>
|
||||
<p>For other contributions, see the project's
|
||||
<a href="https://github.com/vkbo/novelWriter/graphs/contributors">Contributors</a> page.</p>
|
||||
|
||||
<h3>Translations</h3>
|
||||
|
||||
<p>The default language is English (UK) with English (US) as an option. These are the original
|
||||
translators for the languages currently available:</p>
|
||||
<p>
|
||||
<b>Dutch:</b> Martijn van der Kleijn (<a href="https://github.com/mvdkleijn">@mvdkleijn</a>)<br>
|
||||
<b>French:</b> Jan Lüdke (<a href="https://github.com/jyhelle">@jyhelle</a>)<br>
|
||||
<b>German:</b> Myian (<a href="https://github.com/heymyian">@heymyian</a>)<br>
|
||||
<b>Latin American Spanish:</b> Tommy Marplatt (<a href="https://github.com/tmarplatt">@tmarplatt</a>)<br>
|
||||
<b>Norwegian:</b> Veronica Berglyd Olsen (<a href="https://github.com/vkbo">@vkbo</a>)<br>
|
||||
<b>Portuguese:</b> Bruno Meneguello (<a href="https://github.com/bkmeneguello">@bkmeneguello</a>)<br>
|
||||
<b>Simplified Chinese:</b> Qianzhi Long (<a href="https://github.com/longqzh">@longqzh</a>)
|
||||
</p>
|
||||
|
||||
<p>Additional larger translation contributions:</p>
|
||||
<p>
|
||||
<b>French:</b> Albert Aribaud (<a href="https://github.com/aaribaud">@aaribaud</a>)
|
||||
</p>
|
||||
|
||||
<p>Translations are managed on <a href="https://crowdin.com/project/novelwriter">Crowdin</a>, and
|
||||
more contributions are listed on the project's <a href="https://crowdin.com/project/novelwriter/members">Members</a> page.</p>
|
||||
|
||||
<h3>Libraries</h3>
|
||||
|
||||
<p>The following libraries are dependencies of novelWriter:</p>
|
||||
<p>
|
||||
Qt5 by <a href="https://www.qt.io/">Qt Company</a><br>
|
||||
PyQt5 by <a href="https://www.riverbankcomputing.com/software/pyqt/">Riverbank Computing</a><br>
|
||||
lxml by <a href="https://lxml.de/">Martijn Faassen</a><br>
|
||||
Enchant by <a href="https://abiword.github.io/enchant/">Dom Lachowicz</a><br>
|
||||
PyEnchant by <a href="https://pyenchant.github.io/pyenchant/">Dimitri Merejkowsky</a>
|
||||
</p>
|
||||
|
||||
<h3>Assets</h3>
|
||||
|
||||
<p>Some of the assets bundled with novelWriter were adapted from the following sources:</p>
|
||||
<p>
|
||||
Typicons icons by <a href="https://github.com/stephenhutchings/typicons.font">Stephen Hutchings</a> (CC BY-SA 4.0)<br>
|
||||
Tomorrow syntax themes by <a href="https://github.com/chriskempson/base16">Chris Kempson</a> (MIT License)<br>
|
||||
Owl syntax themes by <a href="https://github.com/sdras/night-owl-vscode-theme">Sarah Drasner</a> (MIT License)<br>
|
||||
Solarized themes by <a href="https://github.com/altercation/solarized">Ethan Schoonover</a> (MIT License)
|
||||
</p>
|
||||
|
||||
<h3>Special Mentions</h3>
|
||||
|
||||
<p>Additional thanks to <a href="https://github.com/johnblommers">@johnblommers</a> who was an early user and who has provided a lot
|
||||
of very useful feedback over the years.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -85,6 +85,10 @@ class GuiAbout(QDialog):
|
||||
self.pageNotes.setOpenExternalLinks(True)
|
||||
self.pageNotes.document().setDocumentMargin(self.mainConf.pxInt(16))
|
||||
|
||||
self.pageCredits = QTextBrowser()
|
||||
self.pageCredits.setOpenExternalLinks(True)
|
||||
self.pageCredits.document().setDocumentMargin(self.mainConf.pxInt(16))
|
||||
|
||||
self.pageLicense = QTextBrowser()
|
||||
self.pageLicense.setOpenExternalLinks(True)
|
||||
self.pageLicense.document().setDocumentMargin(self.mainConf.pxInt(16))
|
||||
@@ -93,6 +97,7 @@ class GuiAbout(QDialog):
|
||||
self.tabBox = QTabWidget()
|
||||
self.tabBox.addTab(self.pageAbout, self.tr("About"))
|
||||
self.tabBox.addTab(self.pageNotes, self.tr("Release"))
|
||||
self.tabBox.addTab(self.pageCredits, self.tr("Credits"))
|
||||
self.tabBox.addTab(self.pageLicense, self.tr("Licence"))
|
||||
self.innerBox.addWidget(self.tabBox)
|
||||
|
||||
@@ -115,6 +120,7 @@ class GuiAbout(QDialog):
|
||||
self._setStyleSheet()
|
||||
self._fillAboutPage()
|
||||
self._fillNotesPage()
|
||||
self._fillCreditsPage()
|
||||
self._fillLicensePage()
|
||||
qApp.restoreOverrideCursor()
|
||||
return
|
||||
@@ -140,20 +146,12 @@ class GuiAbout(QDialog):
|
||||
"<p>{license1}</p>"
|
||||
"<p>{license2}</p>"
|
||||
"<p>{license3}</p>"
|
||||
"<h3>{title2}</h3>"
|
||||
"<p>{credits}</p>"
|
||||
).format(
|
||||
title1=self.tr("About novelWriter"),
|
||||
copy=novelwriter.__copyright__,
|
||||
link=self.tr("Website: {0}").format(
|
||||
f"<a href='{novelwriter.__url__}'>{novelwriter.__domain__}</a>"
|
||||
),
|
||||
title2=self.tr("Credits"),
|
||||
credits=self._wrapTable([
|
||||
(self.tr("Developer"), "Veronica Berglyd Olsen"),
|
||||
(self.tr("Concept"), "Veronica Berglyd Olsen, Marian Lückhof"),
|
||||
(self.tr("i18n"), "Bruno Meneguello"),
|
||||
]),
|
||||
intro=self.tr(
|
||||
"novelWriter is a markdown-like text editor designed for organising and "
|
||||
"writing novels. It is written in Python 3 with a Qt5 GUI, using PyQt5."
|
||||
@@ -177,55 +175,6 @@ class GuiAbout(QDialog):
|
||||
),
|
||||
)
|
||||
|
||||
aboutMsg += "<h4>{0}</h4><p>{1}</p>".format(
|
||||
self.tr("Translations"),
|
||||
self._wrapTable([
|
||||
("Deutsch", "Myian"),
|
||||
("English", "Veronica Berglyd Olsen"),
|
||||
("Español Latinoamericano", "Tommy Marplatt"),
|
||||
("Français", "Jan Lüdke (jyhelle)"),
|
||||
("Nederlands", "Martijn van der Kleijn"),
|
||||
("Norsk Bokmål", "Veronica Berglyd Olsen"),
|
||||
("Português", "Bruno Meneguello"),
|
||||
("简体中文", "Qianzhi Long"),
|
||||
])
|
||||
)
|
||||
|
||||
mainTheme = self.mainGui.mainTheme
|
||||
iconCache = self.mainGui.mainTheme.iconCache
|
||||
if mainTheme.themeName and mainTheme.themeAuthor != "N/A":
|
||||
licURL = f"<a href='{mainTheme.themeLicenseUrl}'>{mainTheme.themeLicense}</a>"
|
||||
aboutMsg += "<h4>{0}</h4><p>{1}</p>".format(
|
||||
self.tr("Theme: {0}").format(mainTheme.themeName),
|
||||
self._wrapTable([
|
||||
(self.tr("Author"), mainTheme.themeAuthor),
|
||||
(self.tr("Credit"), mainTheme.themeCredit),
|
||||
(self.tr("Licence"), licURL),
|
||||
])
|
||||
)
|
||||
|
||||
if iconCache.themeName:
|
||||
licURL = f"<a href='{iconCache.themeLicenseUrl}'>{iconCache.themeLicense}</a>"
|
||||
aboutMsg += "<h4>{0}</h4><p>{1}</p>".format(
|
||||
self.tr("Icons: {0}").format(iconCache.themeName),
|
||||
self._wrapTable([
|
||||
(self.tr("Author"), iconCache.themeAuthor),
|
||||
(self.tr("Credit"), iconCache.themeCredit),
|
||||
(self.tr("Licence"), licURL),
|
||||
])
|
||||
)
|
||||
|
||||
if mainTheme.syntaxName:
|
||||
licURL = f"<a href='{mainTheme.syntaxLicenseUrl}'>{mainTheme.syntaxLicense}</a>"
|
||||
aboutMsg += "<h4>{0}</h4><p>{1}</p>".format(
|
||||
self.tr("Syntax: {0}").format(mainTheme.syntaxName),
|
||||
self._wrapTable([
|
||||
(self.tr("Author"), mainTheme.syntaxAuthor),
|
||||
(self.tr("Credit"), mainTheme.syntaxCredit),
|
||||
(self.tr("Licence"), licURL),
|
||||
])
|
||||
)
|
||||
|
||||
self.pageAbout.setHtml(aboutMsg)
|
||||
|
||||
return
|
||||
@@ -241,6 +190,17 @@ class GuiAbout(QDialog):
|
||||
self.pageNotes.setHtml("Error loading release notes text ...")
|
||||
return
|
||||
|
||||
def _fillCreditsPage(self):
|
||||
"""Load the content for the Credits page.
|
||||
"""
|
||||
docPath = self.mainConf.assetPath("text") / "credits_en.htm"
|
||||
docText = readTextFile(docPath)
|
||||
if docText:
|
||||
self.pageCredits.setHtml(docText)
|
||||
else:
|
||||
self.pageCredits.setHtml("Error loading credits text ...")
|
||||
return
|
||||
|
||||
def _fillLicensePage(self):
|
||||
"""Load the content for the Licence page.
|
||||
"""
|
||||
@@ -252,16 +212,6 @@ class GuiAbout(QDialog):
|
||||
self.pageLicense.setHtml("Error loading licence text ...")
|
||||
return
|
||||
|
||||
def _wrapTable(self, theData):
|
||||
"""Wrap a list of label/value tuples in an html table.
|
||||
"""
|
||||
theTable = []
|
||||
for aLabel, aValue in theData:
|
||||
theTable.append(
|
||||
f"<tr><td><b>{aLabel}:</b></td><td>{aValue}</td></tr>"
|
||||
)
|
||||
return "<table>{0}</table>".format("".join(theTable))
|
||||
|
||||
def _setStyleSheet(self):
|
||||
"""Set stylesheet for all browser tabs
|
||||
"""
|
||||
@@ -275,8 +225,8 @@ class GuiAbout(QDialog):
|
||||
".alt {{"
|
||||
" color: rgb({kColR},{kColG},{kColB});"
|
||||
"}}\n"
|
||||
"td {{"
|
||||
" padding-right: 0.8em;"
|
||||
"ul, li {{"
|
||||
" margin-left: 0; padding-left: 0;"
|
||||
"}}\n"
|
||||
).format(
|
||||
hColR=self.mainGui.mainTheme.colHead[0],
|
||||
@@ -288,6 +238,7 @@ class GuiAbout(QDialog):
|
||||
)
|
||||
self.pageAbout.document().setDefaultStyleSheet(styleSheet)
|
||||
self.pageNotes.document().setDefaultStyleSheet(styleSheet)
|
||||
self.pageCredits.document().setDefaultStyleSheet(styleSheet)
|
||||
self.pageLicense.document().setDefaultStyleSheet(styleSheet)
|
||||
|
||||
return
|
||||
|
||||
@@ -51,6 +51,8 @@ def testDlgAbout_NWDialog(qtbot, monkeypatch, nwGUI):
|
||||
mp.setattr("novelwriter.config.Config.assetPath", lambda *a: Path("whatever"))
|
||||
msgAbout._fillNotesPage()
|
||||
assert msgAbout.pageNotes.toPlainText() == "Error loading release notes text ..."
|
||||
msgAbout._fillCreditsPage()
|
||||
assert msgAbout.pageCredits.toPlainText() == "Error loading credits text ..."
|
||||
msgAbout._fillLicensePage()
|
||||
assert msgAbout.pageLicense.toPlainText() == "Error loading licence text ..."
|
||||
|
||||
|
||||
Reference in New Issue
Block a user