Merge branch 'patch' into update_i18n

This commit is contained in:
Veronica Berglyd Olsen
2023-04-03 22:13:36 +02:00
13 changed files with 112 additions and 54 deletions
+13 -2
View File
@@ -1,3 +1,14 @@
body article section {
margin-top: 1.8em;
span.guilabel {
font-weight: 400;
}
.nw-sidebar-title {
height: unset;
max-height: unset;
flex-direction: column;
justify-content: center;
gap: .25rem;
font-size: 1.25rem;
font-weight: normal;
text-align: center;
}
@@ -0,0 +1,3 @@
{% if docstitle %}
<p class="nw-sidebar-title">{{ docstitle }}</p>
{% endif %}
+22 -25
View File
@@ -1,7 +1,7 @@
#
# Configuration file for the Sphinx documentation builder.
# Documentation: http://www.sphinx-doc.org/en/master/config
#
"""
Configuration file for the Sphinx documentation builder.
Documentation: http://www.sphinx-doc.org/en/master/config
"""
# -- Imports -----------------------------------------------------------------
@@ -12,7 +12,7 @@ import datetime
# -- Project Information -----------------------------------------------------
project = "novelWriter"
copyright = f"{datetime.date.today().year}, Veronica Berglyd Olsen"
copyright = f"{datetime.date.today().year}"
author = "Veronica Berglyd Olsen"
initFile = os.path.join(
@@ -34,7 +34,7 @@ version = release.split("-")[0]
os.environ["TZ"] = "Europe/Oslo"
time.tzset()
needs_sphinx = "4.0"
needs_sphinx = "5.0"
extensions = []
templates_path = ["_templates"]
source_suffix = ".rst"
@@ -45,23 +45,27 @@ exclude_patterns = []
# -- Options for HTML Output -------------------------------------------------
html_theme = "furo"
html_theme = "sphinx_book_theme"
html_title = f"Version {release}"
html_static_path = ["_static"]
html_css_files = ["custom.css"]
html_theme_options = {
"light_logo": "novelwriter-light.png",
"dark_logo": "novelwriter-dark.png",
"logo": {
"image_light": "_static/novelwriter-light.png",
"image_dark": "_static/novelwriter-dark.png",
},
"show_toc_level": 2,
"show_navbar_depth": 1,
"repository_url": "https://github.com/vkbo/novelwriter",
"navigation_with_keys": True,
"dark_css_variables": {
"admonition-font-size": "92%",
},
"light_css_variables": {
"admonition-font-size": "92%",
},
"use_repository_button": True,
"use_issues_button": True,
"pygment_light_style": "tango",
"pygment_dark_style": "dracula",
}
html_sidebars = {
"**": ["navbar-logo", "sidebar-title", "sbt-sidebar-nav"],
}
html_title = f"<div style='text-align: center'>Documentation Version {release}</div>"
pygments_style = "tango"
pygments_dark_style = "native"
# -- Options for HTMLHelp Output ---------------------------------------------
@@ -111,12 +115,5 @@ texinfo_documents = [(
# Bibliographic Dublin Core info.
epub_title = project
# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
# epub_identifier = ""
# A unique identification for the text.
# epub_uid = ""
# A list of files that should not be packed into the epub file.
epub_exclude_files = ["search.html"]
+4 -2
View File
@@ -3,8 +3,9 @@ Documentation for novelWriter
#############################
.. image:: images/novelwriter_logo.png
:class: dark-light
:align: right
:width: 48
:width: 64
| **For Release:** |release|
| **Last Updated:** |today|
@@ -17,6 +18,7 @@ editor that allows for easy organisation of text and notes, using human readable
storage for robustness.
.. figure:: images/screenshot_multi.png
:class: dark-light
:align: center
:width: 500
@@ -31,7 +33,7 @@ as well. novelWriter can also be run directly from the Python source, or install
the pip tool. See :ref:`a_started` for more details.
.. note::
Version 1.3 introduced a few changes that will require you to make some minor modifications to
Release 1.5 introduced a few changes that will require you to make some minor modifications to
some of the headings in your project. It should be fairly quick and straightforward. Please see
the :ref:`a_prjfmt_1_3` section for more details.
+25 -13
View File
@@ -16,25 +16,37 @@ your own syntax themes, and install additional dictionaries.
Spell Check Dictionaries
========================
novelWriter uses Enchant_ as the spell checking tool. Depending on you operating system, it may or
novelWriter uses Enchant_ as the spell checking tool. Depending on your operating system, it may or
may not load installed spell check dictionaries.
Linux
On Linux, you generally only have to install hunspell or aspell dictionaries on your system like
you do for other applications. See your distro's documentation for how to do this. These
dictionaries should then show up as available spell check languages in novelWriter.
Linux and MacOS
---------------
On Linux and MacOS, you generally only have to install hunspell or aspell dictionaries on your
system like you do for other applications. See your distro or OS documentation for how to do this.
These dictionaries should then show up as available spell check languages in novelWriter.
Windows
For Windows, English is included with the installation. For other languages you have to download
and add dictionaries yourself. You can find the various dictionaries on the `Free Desktop`_
website. You should find a folder for your language, if it is available at all, and download the
files ending with ``.aff`` and ``.dic``. These files must then be copied to the following
location:
-------
``C:\Users\<USER>\AppData\Local\enchant\hunspell``
For Windows, English is included with the installation. For other languages you have to download
and add dictionaries yourself. You can find the various dictionaries on the `Free Desktop`_
website. You should find a folder for your language, if it is available at all, and download the
files ending with ``.aff`` and ``.dic``. These files must then be copied to the following location:
This assumes your user profile is stored at ``C:\Users\<USER>``. The last one or two folders may
not exist, so you may need to create them.
``C:\Users\<USER>\AppData\Local\enchant\hunspell``
This assumes your user profile is stored at ``C:\Users\<USER>``. The last one or two folders may
not exist, so you may need to create them.
.. note::
The Free Desktop link points to a repository, and what may look like file links inside the
dictionary folder are actually links to web pages. If you right-click and download those, you
get HTML files, not dictionaries!
In order to download the actual dictionary files, right-click the "plain" label at the end of
each line and download that.
.. _a_custom_theme:
+1 -1
View File
@@ -51,7 +51,7 @@ Merge Multiple Documents Into One
If you need to merge a set of documents in your project into a single document, you can achieve
this by first making a new folder for just that purpose, and drag all the files you want merged
into this folder. Then you can right click the folder, select :guilabel:`Transform` and
:guilabel:`Merge Documents in FOlder`.
:guilabel:`Merge Documents in Folder`.
In the dialog that pops up, the documents will be in the same order as in the folder, but you can
also rearrange them here of you wish.
+6 -6
View File
@@ -68,12 +68,12 @@ Below are some key features of novelWriter.
Screenshots
===========
**novelWriter with default theme:**
.. figure:: images/screenshot_default.png
:class: dark-light
.. image:: images/screenshot_default.png
:width: 800
novelWriter with default theme
**novelWriter with dark theme:**
.. figure:: images/screenshot_dark.png
:class: dark-light
.. image:: images/screenshot_dark.png
:width: 800
novelWriter with dark theme
+9
View File
@@ -89,6 +89,15 @@ Then run the update and install commands as for Ubuntu:
You may need to use the Ubuntu 20.04 (focal) packages for Debian 11 or earlier. The newer Ubuntu
packages use a different compression algorithm that may not be supported.
.. tip::
If you get an error message like ``gpg: failed to create temporary file`` when importing the key
from the Ubuntu keyserver, try creating the folder it fails on, and import the key again:
.. code-block:: bash
sudo mkdir /root/.gnupg/
AppImage Releases
-----------------
+3 -2
View File
@@ -1,4 +1,5 @@
furo
sphinx>=4.0
sphinx-book-theme
sphinx>=5.0
sphinx-favicon
pygments>=2.7
docutils>=0.17.1
+1 -1
View File
@@ -3405,7 +3405,7 @@
</message>
<message>
<location filename="../novelwriter/gui/projtree.py" line="1207" />
<source>Change Label</source>
<source>Rename</source>
<translation type="unfinished" />
</message>
<message>
+2
View File
@@ -246,6 +246,8 @@ def main(sysArgs=None):
nwApp.setApplicationName(CONFIG.appName)
nwApp.setApplicationVersion(__version__)
nwApp.setOrganizationDomain(__domain__)
nwApp.setOrganizationName(__domain__)
nwApp.setDesktopFileName(CONFIG.appName)
# Connect the exception handler before making the main GUI
sys.excepthook = exceptionHandler
+1 -1
View File
@@ -1359,7 +1359,7 @@ class GuiDocEditor(QTextEdit):
if self._docHandle is None or self._nwItem is None:
return
logger.debug("User selectee %d words", wCount)
logger.debug("User selected %d words", wCount)
self.docFooter.updateCounts(wCount=wCount, cCount=cCount)
self.wcTimerSel.stop()
+22 -1
View File
@@ -38,6 +38,7 @@ from PyQt5.QtWidgets import (
QMenu, QShortcut, QSizePolicy, QToolButton, QTreeWidget, QTreeWidgetItem,
QVBoxLayout, QWidget
)
from novelwriter.core.item import NWItem
from novelwriter.enum import nwDocMode, nwItemType, nwItemClass, nwItemLayout, nwAlert, nwWidget
from novelwriter.constants import nwHeaders, nwUnicode, trConst, nwLabels
@@ -108,6 +109,9 @@ class GuiProjectView(QWidget):
self.keyContext.setContext(Qt.WidgetShortcut)
self.keyContext.activated.connect(lambda: self.projTree.openContextOnSelected())
# Signals
self.selectedItemChanged.connect(self.projBar._treeSelectionChanged)
# Function Mappings
self.emptyTrash = self.projTree.emptyTrash
self.requestDeleteItem = self.projTree.requestDeleteItem
@@ -418,6 +422,23 @@ class GuiProjectToolBar(QWidget):
return
##
# Slots
##
@pyqtSlot(str)
def _treeSelectionChanged(self, tHandle):
"""Toggle the visibility of the new item enties for novel
documents. They should only be visible if novel documents can
actually be added.
"""
nwItem = self.theProject.tree[tHandle]
allowDoc = isinstance(nwItem, NWItem) and nwItem.documentAllowed()
self.aAddEmpty.setVisible(allowDoc)
self.aAddChap.setVisible(allowDoc)
self.aAddScene.setVisible(allowDoc)
return
# END Class GuiProjectToolBar
@@ -1204,7 +1225,7 @@ class GuiProjectTree(QTreeWidget):
# Edit Item Settings
# ==================
aLabel = ctxMenu.addAction(self.tr("Change Label"))
aLabel = ctxMenu.addAction(self.tr("Rename"))
aLabel.triggered.connect(lambda: self.renameTreeItem(tHandle))
if isFile: