Merge branch 'testing' into dev

This commit is contained in:
Veronica K. B. Olsen
2021-03-28 18:15:40 +02:00
59 changed files with 452 additions and 400 deletions
+51
View File
@@ -1,5 +1,56 @@
# novelWriter Changelog
## Version 1.3 Beta 1 [2021-03-28]
### Release Notes
This is a pre-release of 1.3. The primary feature of release 1.3 is the addition of
internationalisation (i18n) of novelWriter. The release introduces support for Portuguese, French,
and Norwegian in addition to the default English.
This is a beta release. Use with caution on live project.
### Detailed Changelog
**Internationalisation**
* Added support to the source code for internationalisation of the GUI. Thanks to Bruno Meneguello
(@bkmeneguello) for doing most of the work. Issue #93. PRs #673, #680 and #684.
* Build Novel Project localisation has been added as well. This is separate from the GUI
localisation as the project may not be written in the same language as the GUI is set to. PRs
#676 and #682.
* The text editor's auto-replace features now support inserting spaces automatically when replacing
quotes, as well as in front of major punctuation. These features are common for writing tools
supporting French and Spanish for instance. Issue #703. PR #704.
**User Interface**
* The Preferences dialog has been updated to be more responsive to varying text label lengths due
to different needs for different languages. PRs #687 and #711.
* The Project Settings dialog has been improved to be more consistent and user friendly across the
Status, Importance and Auto-Replace tabs. Issue #691. PR #695.
* The About dialog has been updated to contain more information on contributions. PR #698.
**Translations**
* Portuguese translation added by Bruno Meneguello (@bkmeneguello). PRs #673, #681, #686 and #697.
* Norwegian translation added by Veronica Olsen (@vkbo). PR #679.
* German translation added (Build tool only) by Marian Lückhof (@Number042). PR #683.
* French translation added by Jan Lüdke (@jyhelle). PRs #692, #711 and #713.
* American English added by Veronica Olsen (@vkbo). PR #693.
**Installation**
* Added i18n support to the setup script. PRs #673 and #729.
**Code Maintenance**
* The ISO lookup dictionary for language codes has been removed and replaced with the lookup
features available in Qt5 through QLocal. The remaining two source files in the constants folder
have been moved up a level as well. PRs #673 and #730.
----
## Version 1.2.2 [2021-03-28]
### Release Notes
+46 -63
View File
@@ -25,14 +25,13 @@ The plain text files are suitable for version control software, and also well su
synchronisation tools. The core project structure is stored in a single project XML file. Other
meta data is primarily saved in JSON files.
The full documentation is available at
[novelwriter.readthedocs.io](https://novelwriter.readthedocs.io).
The full documentation is available on [readthedocs.io](https://novelwriter.readthedocs.io).
## Implementation
The application is written in Python 3 using Qt5 via PyQt5. It is developed on Linux, but it should
in principle work fine on other operating systems as well, as long as dependencies are met. The
unit tests are run on the latest versions of Ubuntu Linux, Windows Server and macOS.
in principle work fine on other operating systems as well, as long as dependencies are met. It is
regularly tested on Ubuntu Linux, Windows, and macOS.
## Project Contributions
@@ -40,9 +39,9 @@ Contributions to this project are welcome. However, please read the
[Contributing Guide](https://github.com/vkbo/novelWriter/blob/main/CONTRIBUTING.md) before
submitting larger additions or changes to this project.
# Key Features
## Key Features
Some features of novelWriter are listed below. Consult the
Some key features of novelWriter are listed below. Consult the
[documentation](https://novelwriter.readthedocs.io) for more information.
### Markdown Flavour
@@ -113,99 +112,83 @@ These have their separate root folders. These are optional files.
### Visualisation of Story Elements
The different notes can be assigned tags, which other files can refer back to using the `@` meta
keywords. This information can be used to display an outline of the story, showing where each scene
connects to the plot, and which characters, etc. occur in them. In addition, the tags themselves
are clickable in the document view pane, and control-clickable in the editor. They make it possible
to quickly navigate between the documents while editing.
The different notes can be assigned tags, which other files can refer back to using `@`-prefixed
meta keywords. This information can be used to display an outline of the story, showing where each
scene connects to the plot, and which characters, etc. occur in them. In addition, the tags
themselves are clickable in the document view pane, and control-clickable in the editor. They make
it possible to quickly navigate between the documents while editing.
# Installing and Running
## Standard Installation
For install instructions, please check the
[Getting Started](https://novelwriter.readthedocs.io/en/latest/int_started.html) section in
the [documentation](https://novelwriter.readthedocs.io/).
For a regular installation, it is recommended that you download one of the minimal zip files from
the [Releases](https://github.com/vkbo/novelWriter/releases) page or the
[novelwriter.io](https://novelwriter.io/) website.
The [documentation](https://novelwriter.readthedocs.io/) has detailed install instructions for
[Linux](https://novelwriter.readthedocs.io/en/latest/setup_linux.html),
[Windows](https://novelwriter.readthedocs.io/en/latest/setup_windows.html), and
[macOS](https://novelwriter.readthedocs.io/en/latest/setup_mac.html).
They are pretty straightforward.
## TLDR Instructions
## Running from Source
If you want to run novelWriter directly from the source code, you must run the `novelWriter.py`
file from command line. For installations on Linux, macOS or Windows, see below.
file from command line.
**Note:** You may need to replace `python` with `python3` and `pip` with `pip3` in the instructions
below on some systems. You may also want to add the `--user` flag for `pip` to install in your user
space only.
### Install from PyPi
### Dependencies
novelWriter is available on [pypi.org](https://pypi.org/project/novelWriter/), and can be installed
with:
```bash
pip install novelwriter
```
Dependencies should be installed automatically, but can also be installed directly with:
Dependencies can be installed from PyPi with:
```bash
pip install pyqt5 lxml pyenchant
```
When installing via pip, novelWriter can be launched from command line with:
### Additional Steps for Linux
On Linux, you can most likely find the dependencies in your distribution's repository. On Ubuntu
and Debian, run:
```bash
novelWriter
sudo apt install python3-pyqt5 python3-lxml python3-enchant
```
Make sure the install location for pip is in your PATH variable. This is not always the case by
default.
### Setup on Linux
If you're installing from source, the following commands will set up novelWriter on Linux:
If you want to set up a launcher on Linux, you can run:
```bash
pip install -r requirements.txt
python setup.py install
python setup.py xdg-install
```
This should make novelWriter available as a regular application on your system, with a launceher
icon, and file association with novelWriter project files.
### Additional Steps for macOS
**Note:** If you don't want to install the dependencies from pip and instead use your distro's own
packages, you must manually install `python3-pyqt5`, `python3-lxml` and `python3-enchant`
(Debian/Ubuntu), or the corresponding packages for your distro.
### Setup on macOS
If you're installing from source, the following commands will set up novelWriter on macOS:
First, make sure you have properly set up Python3 with Homebrew. If not, check their
[documentation](https://docs.brew.sh/Homebrew-and-Python).
In addition, the following steps are necessary to install all dependencies:
```bash
brew install enchant
pip3 install --user -r requirements.txt
pip3 install --user pyobjc
python3 setup.py install
```
At present, novelWriter isn't further integrated into the OS, so you must launch it from command
line with:
```bash
novelWriter
```
### Additional Steps for Windows
If you want to help improve the setup process on macOS, it would be much appreciated.
Windows doesn't by default come with Python installed. If you haven't installed it already, get it
from [python.org/downloads](https://www.python.org/downloads/). Remember to select "Add Python to
PATH" during the installation.
### Setup on Windows
## Internationalisation
For Windows, first ensure that you have Python installed. If not, get it from
[python.org/downloads](https://www.python.org/downloads/). Remember to select "Add Python to PATH"
during the installation, otherwise novelWriter will not start.
Then, download the `novelWriter-x.y.z-minimal-win.zip` file, where `x.y.z` is the version number,
from the [releases](https://github.com/vkbo/novelWriter/releases) page. You can extract it to
wherever you want to keep novelWriter on your PC, and run the `setup_windows.bat` file in it
(double-clicking it should work). This will install the necessary dependencies from
[pypi.org](https://pypi.org/) and create desktop and start menu icons.
If you install from source, you must build the translation files yourself if you want to switch to
a different GUI language than British English. This requires that you have the Qt translation
framework installed. Check the specific instruction in the README in the `i18n` source folder for
how to build the translation files.
## Debugging
If you need to debug novelWriter, you must run it from command line. It takes a few parameters,
If you need to debug novelWriter, you must run it from the command line. It takes a few parameters,
which can be listed with the switch `--help`. The `--info`, `--debug` or `--verbose` flags are
particularly useful for increasing logging output for debugging.
# Licenses
## Licenses
This is Open Source software, and novelWriter is licensed under GPLv3. See the
[GNU General Public License website](https://www.gnu.org/licenses/gpl-3.0.en.html) for more
@@ -231,7 +214,7 @@ Bundled assets have the following licenses:
the main repo is available at
[sdras/night-owl-vscode-theme](https://github.com/sdras/night-owl-vscode-theme).
# Screenshot
## Screenshot
**novelWriter with default system theme:**
![Screenshot 1](https://raw.githubusercontent.com/vkbo/novelWriter/main/docs/source/images/screenshot_default.png)
+24
View File
@@ -99,6 +99,30 @@ Make sure the install location for pip is in your PATH variable. This is not alw
default.
.. _a_started_i18n:
Building the Translation Files
==============================
If you installed novelWriter from a package, the translation files should be pre-built and
included. If you're running novelWriter from the source code, you will need to generate the files
yourself. The files you need will be written to the ``i18n`` folder, and will have the ``.qm`` file
extension.
You can build the ``.qm`` files with:
.. code-block:: console
python3 setup.py qtlrelease
This requires that the Python package ``pylupdate5`` to be installed.
.. note::
If you want to improve novelWriter with translation files for another language, or update an
existing translation, instructions for how to contribute can be found in the README file in the
``i18n`` folder of the source code.
.. _a_started_docs:
Building the Documentation
+29 -29
View File
@@ -798,22 +798,22 @@
<context>
<name>GuiDocEditFooter</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2468"/>
<location filename="../nw/gui/doceditor.py" line="2466"/>
<source>Status</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2609"/>
<location filename="../nw/gui/doceditor.py" line="2607"/>
<source>Line: {0} ({1})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2625"/>
<location filename="../nw/gui/doceditor.py" line="2623"/>
<source>Words: {0} ({1})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2630"/>
<location filename="../nw/gui/doceditor.py" line="2628"/>
<source>Document size is {0} bytes</source>
<translation></translation>
</message>
@@ -821,22 +821,22 @@
<context>
<name>GuiDocEditHeader</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2259"/>
<location filename="../nw/gui/doceditor.py" line="2258"/>
<source>Edit document meta</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2270"/>
<location filename="../nw/gui/doceditor.py" line="2269"/>
<source>Search document</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2281"/>
<location filename="../nw/gui/doceditor.py" line="2280"/>
<source>Toggle Focus Mode</source>
<translation></translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2292"/>
<location filename="../nw/gui/doceditor.py" line="2291"/>
<source>Close the document</source>
<translation></translation>
</message>
@@ -1379,7 +1379,7 @@
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Changes are saved automatically.</source>
<translation></translation>
</message>
@@ -1419,102 +1419,102 @@
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="697"/>
<location filename="../nw/guimain.py" line="701"/>
<source>Text files ({0})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="698"/>
<location filename="../nw/guimain.py" line="702"/>
<source>Markdown files ({0})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="699"/>
<location filename="../nw/guimain.py" line="703"/>
<source>novelWriter files ({0})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="700"/>
<location filename="../nw/guimain.py" line="704"/>
<source>All files ({0})</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="702"/>
<location filename="../nw/guimain.py" line="706"/>
<source>Import File</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="717"/>
<location filename="../nw/guimain.py" line="721"/>
<source>Could not read file. The file must be an existing text file.</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="723"/>
<location filename="../nw/guimain.py" line="727"/>
<source>Please open a document to import the text file into.</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Import Document</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Indexing: &apos;{0}&apos;</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Unknown item</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="897"/>
<location filename="../nw/guimain.py" line="901"/>
<source>Indexing completed in {0} ms</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="904"/>
<location filename="../nw/guimain.py" line="908"/>
<source>The project index has been successfully rebuilt.</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1107"/>
<location filename="../nw/guimain.py" line="1111"/>
<source>Information</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1109"/>
<location filename="../nw/guimain.py" line="1113"/>
<source>Warning</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1111"/>
<location filename="../nw/guimain.py" line="1115"/>
<source>Error</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1113"/>
<location filename="../nw/guimain.py" line="1117"/>
<source>This is a bug!</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1114"/>
<location filename="../nw/guimain.py" line="1118"/>
<source>Internal Error</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Exit</source>
<translation></translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Do you want to exit novelWriter?</source>
<translation></translation>
</message>
+29 -29
View File
@@ -798,22 +798,22 @@
<context>
<name>GuiDocEditFooter</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2468"/>
<location filename="../nw/gui/doceditor.py" line="2466"/>
<source>Status</source>
<translation>État</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2609"/>
<location filename="../nw/gui/doceditor.py" line="2607"/>
<source>Line: {0} ({1})</source>
<translation>Ligne: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2625"/>
<location filename="../nw/gui/doceditor.py" line="2623"/>
<source>Words: {0} ({1})</source>
<translation>Mots: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2630"/>
<location filename="../nw/gui/doceditor.py" line="2628"/>
<source>Document size is {0} bytes</source>
<translation>La taille du document est de {0} octets</translation>
</message>
@@ -821,22 +821,22 @@
<context>
<name>GuiDocEditHeader</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2259"/>
<location filename="../nw/gui/doceditor.py" line="2258"/>
<source>Edit document meta</source>
<translation>Modifier les métadonnées du document</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2270"/>
<location filename="../nw/gui/doceditor.py" line="2269"/>
<source>Search document</source>
<translation>Chercher dans le document</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2281"/>
<location filename="../nw/gui/doceditor.py" line="2280"/>
<source>Toggle Focus Mode</source>
<translation>Basculer le mode focus</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2292"/>
<location filename="../nw/gui/doceditor.py" line="2291"/>
<source>Close the document</source>
<translation>Fermer le document</translation>
</message>
@@ -1379,7 +1379,7 @@
<translation>Fermer le projet en cours ?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Changes are saved automatically.</source>
<translation>Les changements sont enregistrés automatiquement.</translation>
</message>
@@ -1419,102 +1419,102 @@
<translation>L&apos;index du projet est périmé ou endommagé. Reconstruction de l&apos;index en cours.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="697"/>
<location filename="../nw/guimain.py" line="701"/>
<source>Text files ({0})</source>
<translation>Fichiers de texte ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="698"/>
<location filename="../nw/guimain.py" line="702"/>
<source>Markdown files ({0})</source>
<translation>Fichiers Markdown ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="699"/>
<location filename="../nw/guimain.py" line="703"/>
<source>novelWriter files ({0})</source>
<translation>fichiers novelWriter ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="700"/>
<location filename="../nw/guimain.py" line="704"/>
<source>All files ({0})</source>
<translation>Tous les filchiers ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="702"/>
<location filename="../nw/guimain.py" line="706"/>
<source>Import File</source>
<translation>Importer un fichier</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="717"/>
<location filename="../nw/guimain.py" line="721"/>
<source>Could not read file. The file must be an existing text file.</source>
<translation>Lecture du fichier impossible. Il faut un fichier texte existant.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="723"/>
<location filename="../nw/guimain.py" line="727"/>
<source>Please open a document to import the text file into.</source>
<translation>Veuillez ouvrir un document dans lequel sera importé le texte.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Import Document</source>
<translation>Importer un document</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>Le contenu du fichier importé va remplacer le contenu actuel du document. Faut-il continuer ?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Indexing: &apos;{0}&apos;</source>
<translation>Indexation d e: &apos;{0}&apos;</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Unknown item</source>
<translation>Item inconnu</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="897"/>
<location filename="../nw/guimain.py" line="901"/>
<source>Indexing completed in {0} ms</source>
<translation>Indexation effectuée en {0} ms</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="904"/>
<location filename="../nw/guimain.py" line="908"/>
<source>The project index has been successfully rebuilt.</source>
<translation>L&apos;index du projet a é correctement reconstruit.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1107"/>
<location filename="../nw/guimain.py" line="1111"/>
<source>Information</source>
<translation>Information</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1109"/>
<location filename="../nw/guimain.py" line="1113"/>
<source>Warning</source>
<translation>Avertissement</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1111"/>
<location filename="../nw/guimain.py" line="1115"/>
<source>Error</source>
<translation>Erreur</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1113"/>
<location filename="../nw/guimain.py" line="1117"/>
<source>This is a bug!</source>
<translation>Ceci est un bug !</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1114"/>
<location filename="../nw/guimain.py" line="1118"/>
<source>Internal Error</source>
<translation>Erreur interne</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Exit</source>
<translation>Sortir</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Do you want to exit novelWriter?</source>
<translation>Voulez-vous sortir de novelWriter ?</translation>
</message>
+34 -33
View File
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="2.0" language="nb_NO" sourcelanguage="en_GB">
<!DOCTYPE TS>
<TS version="2.1" language="nb_NO" sourcelanguage="en_GB">
<context>
<name>Common</name>
<message>
@@ -798,22 +799,22 @@
<context>
<name>GuiDocEditFooter</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2468"/>
<location filename="../nw/gui/doceditor.py" line="2466"/>
<source>Status</source>
<translation>Status</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2609"/>
<location filename="../nw/gui/doceditor.py" line="2607"/>
<source>Line: {0} ({1})</source>
<translation>Linje: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2625"/>
<location filename="../nw/gui/doceditor.py" line="2623"/>
<source>Words: {0} ({1})</source>
<translation>Ord: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2630"/>
<location filename="../nw/gui/doceditor.py" line="2628"/>
<source>Document size is {0} bytes</source>
<translation>Dokumentet er {0} byte</translation>
</message>
@@ -821,22 +822,22 @@
<context>
<name>GuiDocEditHeader</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2259"/>
<location filename="../nw/gui/doceditor.py" line="2258"/>
<source>Edit document meta</source>
<translation>Rediger dokumentinstillinger</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2270"/>
<location filename="../nw/gui/doceditor.py" line="2269"/>
<source>Search document</source>
<translation>Søk i dokumentet</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2281"/>
<location filename="../nw/gui/doceditor.py" line="2280"/>
<source>Toggle Focus Mode</source>
<translation>Slå av/ &quot;Fokus-modus&quot;</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2292"/>
<location filename="../nw/gui/doceditor.py" line="2291"/>
<source>Close the document</source>
<translation>Lukk dokumentet</translation>
</message>
@@ -1321,7 +1322,7 @@
<message>
<location filename="../nw/guimain.py" line="127"/>
<source>Novel</source>
<translation>Innhold</translation>
<translation>Roman</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="143"/>
@@ -1346,7 +1347,7 @@
<message>
<location filename="../nw/guimain.py" line="189"/>
<source>Outline</source>
<translation>Disposisjon</translation>
<translation>Oversikt</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="342"/>
@@ -1374,7 +1375,7 @@
<translation>Ønsker du å lukke dette prosjektet?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Changes are saved automatically.</source>
<translation>Endringer lagres automatisk.</translation>
</message>
@@ -1414,102 +1415,102 @@
<translation>Prosjektets indeks er utdatert eller skadet. Bygger indeksen nytt.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="697"/>
<location filename="../nw/guimain.py" line="701"/>
<source>Text files ({0})</source>
<translation>Tekstfiler ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="698"/>
<location filename="../nw/guimain.py" line="702"/>
<source>Markdown files ({0})</source>
<translation>Markdown-filer ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="699"/>
<location filename="../nw/guimain.py" line="703"/>
<source>novelWriter files ({0})</source>
<translation>novelWriter-filer ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="700"/>
<location filename="../nw/guimain.py" line="704"/>
<source>All files ({0})</source>
<translation>Alle filer ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="702"/>
<location filename="../nw/guimain.py" line="706"/>
<source>Import File</source>
<translation>Importer fil</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="717"/>
<location filename="../nw/guimain.py" line="721"/>
<source>Could not read file. The file must be an existing text file.</source>
<translation>Kunne ikke lese filen. Filen eksistere fra før av.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="723"/>
<location filename="../nw/guimain.py" line="727"/>
<source>Please open a document to import the text file into.</source>
<translation>Vennligst åpne et dokument hvor teksten i filen kan importeres.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Import Document</source>
<translation>Importer dokument</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>Å importere filen vil overskrive all eksisterende tekst i dokumentet. Ønsker du å fortsette?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Indexing: &apos;{0}&apos;</source>
<translation>Indekserer: &apos;{0}&apos;</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Unknown item</source>
<translation>Ukjent enhet</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="897"/>
<location filename="../nw/guimain.py" line="901"/>
<source>Indexing completed in {0} ms</source>
<translation>Indekseringen tok {0} ms</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="904"/>
<location filename="../nw/guimain.py" line="908"/>
<source>The project index has been successfully rebuilt.</source>
<translation>Prosjektets indeks har blitt bygget nytt.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1107"/>
<location filename="../nw/guimain.py" line="1111"/>
<source>Information</source>
<translation>Informasjon</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1109"/>
<location filename="../nw/guimain.py" line="1113"/>
<source>Warning</source>
<translation>Advarsel</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1111"/>
<location filename="../nw/guimain.py" line="1115"/>
<source>Error</source>
<translation>Feil</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1113"/>
<location filename="../nw/guimain.py" line="1117"/>
<source>This is a bug!</source>
<translation>Dette er en systemfeil!</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1114"/>
<location filename="../nw/guimain.py" line="1118"/>
<source>Internal Error</source>
<translation>Intern feil</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Exit</source>
<translation>Avslutt</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Do you want to exit novelWriter?</source>
<translation>Ønsker du å avslutte novelWriter?</translation>
</message>
@@ -1934,7 +1935,7 @@
<message>
<location filename="../nw/gui/mainmenu.py" line="492"/>
<source>Focus Outline</source>
<translation> til disposisjon</translation>
<translation> til oversikt</translation>
</message>
<message>
<location filename="../nw/gui/mainmenu.py" line="493"/>
+29 -29
View File
@@ -798,22 +798,22 @@
<context>
<name>GuiDocEditFooter</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2609"/>
<location filename="../nw/gui/doceditor.py" line="2607"/>
<source>Line: {0} ({1})</source>
<translation>Linha: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2625"/>
<location filename="../nw/gui/doceditor.py" line="2623"/>
<source>Words: {0} ({1})</source>
<translation>Palavras: {0} ({1})</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2468"/>
<location filename="../nw/gui/doceditor.py" line="2466"/>
<source>Status</source>
<translation>Estado</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2630"/>
<location filename="../nw/gui/doceditor.py" line="2628"/>
<source>Document size is {0} bytes</source>
<translation>O tamanho do documento é {0} bytes</translation>
</message>
@@ -821,22 +821,22 @@
<context>
<name>GuiDocEditHeader</name>
<message>
<location filename="../nw/gui/doceditor.py" line="2259"/>
<location filename="../nw/gui/doceditor.py" line="2258"/>
<source>Edit document meta</source>
<translation>Editar os meta-dados do documento</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2270"/>
<location filename="../nw/gui/doceditor.py" line="2269"/>
<source>Search document</source>
<translation>Procurar no documento</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2281"/>
<location filename="../nw/gui/doceditor.py" line="2280"/>
<source>Toggle Focus Mode</source>
<translation>Alternar o &quot;Modo Foco&quot;</translation>
</message>
<message>
<location filename="../nw/gui/doceditor.py" line="2292"/>
<location filename="../nw/gui/doceditor.py" line="2291"/>
<source>Close the document</source>
<translation>Fechar o documento</translation>
</message>
@@ -1329,32 +1329,32 @@
<translation>Nota: Se o programa ou o computador sofreu uma falha anteriormente, o bloqueio pode ser sobrescrito com segurança. Se, no entanto, outra instância do novelWriter esteja com o projeto aberto, sobrescrever o bloqueio pode corromper o projeto e não é recomendado.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Unknown item</source>
<translation>Item desconhecido</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1107"/>
<location filename="../nw/guimain.py" line="1111"/>
<source>Information</source>
<translation>Informação</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1109"/>
<location filename="../nw/guimain.py" line="1113"/>
<source>Warning</source>
<translation>Alerta</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1111"/>
<location filename="../nw/guimain.py" line="1115"/>
<source>Error</source>
<translation>Erro</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1113"/>
<location filename="../nw/guimain.py" line="1117"/>
<source>This is a bug!</source>
<translation>Isto é um bug!</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1114"/>
<location filename="../nw/guimain.py" line="1118"/>
<source>Internal Error</source>
<translation>Erro Interno</translation>
</message>
@@ -1389,7 +1389,7 @@
<translation>Fechar o projeto atual?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Changes are saved automatically.</source>
<translation>As alterações serão salvas automaticamente.</translation>
</message>
@@ -1409,47 +1409,47 @@
<translation>Projeto Bloqueado</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="702"/>
<location filename="../nw/guimain.py" line="706"/>
<source>Import File</source>
<translation>Importar Arquivo</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="717"/>
<location filename="../nw/guimain.py" line="721"/>
<source>Could not read file. The file must be an existing text file.</source>
<translation>Não foi possível ler o arquivo. O arquivo deve ser um arquivo de texto existente.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="723"/>
<location filename="../nw/guimain.py" line="727"/>
<source>Please open a document to import the text file into.</source>
<translation>Por favor, abra um documento para importar o text nele.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Import Document</source>
<translation>Importar Documento</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="730"/>
<location filename="../nw/guimain.py" line="734"/>
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>Importar o arquivo vai sobrescrever o conteúdo atual do documento. Você deseja continuar?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="904"/>
<location filename="../nw/guimain.py" line="908"/>
<source>The project index has been successfully rebuilt.</source>
<translation>O índice do projeto foi reconstruído com sucesso.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Exit</source>
<translation>Sair</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="1143"/>
<location filename="../nw/guimain.py" line="1147"/>
<source>Do you want to exit novelWriter?</source>
<translation>Você deseja realmente sair do novelWriter?</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="897"/>
<location filename="../nw/guimain.py" line="901"/>
<source>Indexing completed in {0} ms</source>
<translation>Indexação completa em {0} ms</translation>
</message>
@@ -1489,27 +1489,27 @@
<translation>O projeto foi bloqueado pelo computador &apos;{0}&apos; ({1} {2}), ativo pela última vez em {3}.</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="879"/>
<location filename="../nw/guimain.py" line="883"/>
<source>Indexing: &apos;{0}&apos;</source>
<translation>Indexando: &apos;{0}&apos;</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="697"/>
<location filename="../nw/guimain.py" line="701"/>
<source>Text files ({0})</source>
<translation>Arquivos de texto ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="698"/>
<location filename="../nw/guimain.py" line="702"/>
<source>Markdown files ({0})</source>
<translation>Arquivos Markdown ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="699"/>
<location filename="../nw/guimain.py" line="703"/>
<source>novelWriter files ({0})</source>
<translation>Arquivos do novelWriter ({0})</translation>
</message>
<message>
<location filename="../nw/guimain.py" line="700"/>
<location filename="../nw/guimain.py" line="704"/>
<source>All files ({0})</source>
<translation>Todos os arquivos ({0})</translation>
</message>
+5 -94
View File
@@ -2,103 +2,14 @@
<html>
<body>
<h2>Release Notes for 1.2.2</h2>
<h2>Release Notes for 1.3 Beta 1</h2>
<p><i>Released on 28 March 2021</i></p>
<p>This patch release is a bug fix release addressing some inconsistencies and issues with the
document header buttons when Focus Mode is active. The keyboard shortcuts for search and replace
should now also work in Focus Mode. In addition, the setup script for novelWriter has been improved
when installing on Windows.</p>
<p>This is a pre-release of 1.3. The primary feature of release 1.3 is the addition of
internationalisation (i18n) of novelWriter. The release introduces support for Portuguese, French,
and Norwegian in addition to the default English.</p>
<p>This is a beta release. Use with caution on live project.</p>
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
<hr/>
<h2>Release Notes for 1.2.1</h2>
<p><i>Released on 21 March 2021</i></p>
<p>This patch release is a bug fix release addressing issues with the document editor's search and
replace tool. Due to some recently added restrictions on when various tools are active, depending
on which part of the main window has the user's focus, the search tool keyboard shortcuts and
buttons were blocked when they shouldn't. This release resolves these issues.</p>
<hr/>
<h2>Release Notes for 1.2</h2>
<p><i>Released on 14 March 2021</i></p>
<p>This release is mainly focused on the Build Novel Project tool. Completely new export classes
have been written to support Open Document and Markdown exports. In addition, the way document
layouts are handled have been automated a little to assist the user in keeping header levels and
document layout flags in sync. The third new additoion is the ability to record and log idle time
during a writing session to improve the writing statistics information as requested by several
users. Finally, it is now possible to directly edit the project dictionary via a new, simple GUI
dialog.</p>
<h3>The Build Novel Project Tool</h3>
<p>The main changes for this release are to the Build Novel Project tool. The Open Document export,
as well as the Markdown export, is now handled entirely by code written for novelWriter.
Previously, these export features depended on the underlying Qt library's save routines connected
to the preview document shown in the build dialog. Using this method of export both meant that the
content of the document was dependent on the preview being generated first, and it also meant that
the exported document had limited support for novelWriter-specific features and custom formatting.
The new export class should generate a much better result, especially for the Open Document
formats. The Open Document standard is supported by Open Office, Libre Office, Google Docs,
Microsoft Word, and probably a number of other applications too. The Markdown export hasn't changed
a lot, but should be a slight improvement on the previous export feature.</p>
<p>These changes to the build tool also imply that the saving process is now independent of the
content of the preview window, meaning you don't have to rebuild the preview before saving, which
was previously the case. To make this more consistent, the PDF export option has been moved to the
print button as it is actually a print-to-file feature under the hood, not technically a proper PDF
export format. It is exactly the same as printing to file from the print preview dialog.</p>
<p>In addition to the changes to the export features, the Build Novel Project tool now also has
controls for line height, which applies to all rich text export formats, and the option to replace
unicode characters with appropriate html entities for html export.</p>
<h3>Document Layout Automation</h3>
<p>Among other changes in this release are a few improvements to the process of creating and
changing documents. When a new document is first created, the header is generated from the assigned
label and layout.</p>
<p>In addition, for some document layouts, when the user changes the header level of the first
header of the document, the document layout setting is updated accordingly. This should reduce the
need for the user to maintain two ways of assigning the role of a given document. This automation
only applies to combinations of header level and current document layouts where there is no
ambiguity. For instance, changing the header level in a "Scene" document from level 3 to 2 changes
the document layout automatically to "Chapter". But changing the first header of a "Book" layout
document from 1 to 2 does not change the document's layout as the "Book" layout is a generic
document layout and it's perfectly reasonable for its first header to be a chapter header.</p>
<p>Keep in mind that novelWriter treats documents with layout "Book", "Chapter" and "Scene" exactly
the same during exports. The distinction is only meant as a way to indicate the purpose of a
document in the project tree. This new automation is meant to assist in keeping this information up
to date. The other layouts do have an effect on formatting during export, and are generally left
alone.</p>
<h3>The Session Timer and Idle Time</h3>
<p>Another change that has been requested by a couple of users is to have the session timer in the
status bar stop counting when the user is inactive (idle). This feature is optional, and can be
controlled from Preferences. The definition of "idle" in this context is either that the user is
active in a different application than novelWriter (loss of focus) or that the user has not made
any changes to the current document for a given amount of time. The time threshold is by default
five minutes, but can be altered in Preferences.</p>
<p>In addition, the idle time is also recorded in the session log, and can be viewed in the Writing
Statistics dialog and exported with the rest of the information. The idle time is recorder in the
logs regardless of whether the status bar clock takes idle time into consideration or not. So even
if you turn off the idle time switch in Preferences, the other idle time setting still affects the
writing stats log entries.</p>
<h3>Other Changes</h3>
<p>The user dictionary of the project, where words added to the dictionary from the document editor
go, can now be viewed and edited with a new "Project Word List" tool in the "Tools" menu.</p>
<p>A small additional feature added is also the ability to undo the last move of an item in the
project tree. The keyboard shortcut for this is `Ctrl+Shift+Z`, or it can be accessed from the
menu. The feature can only undo the last move, but it includes both documents moved to trash, moves
by up/down keypress or menu entries, and drag and drop moves.</p>
<p>A new keyword has been added to mark characters in the story. The new keyword is intended to tag
a character as the focus character for a chapter or scene. This is useful for stories where the
point-of-view character and the focus character are different.</p>
<p>Lastly, two bugfixes have been made as well. The Empty Trash feature was no longer working due
to an earlier fix solving another issue. The feature has now been restored. In addition, the
indexer now checks that a keyword (tag or reference) is valid before saving it to the index.
Previously, an invalid keyword could be saved to the index and potentially crash the application.
</p>
</body>
</html>
+104
View File
@@ -0,0 +1,104 @@
<!DOCTYPE html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<body>
<h2>Release Notes for 1.2.2</h2>
<p><i>Released on 28 March 2021</i></p>
<p>This patch release is a bug fix release addressing some inconsistencies and issues with the
document header buttons when Focus Mode is active. The keyboard shortcuts for search and replace
should now also work in Focus Mode. In addition, the setup script for novelWriter has been improved
when installing on Windows.</p>
<p><i>See also the <a href="https://github.com/vkbo/novelWriter/releases">Releases</a> page.</i></p>
<hr/>
<h2>Release Notes for 1.2.1</h2>
<p><i>Released on 21 March 2021</i></p>
<p>This patch release is a bug fix release addressing issues with the document editor's search and
replace tool. Due to some recently added restrictions on when various tools are active, depending
on which part of the main window has the user's focus, the search tool keyboard shortcuts and
buttons were blocked when they shouldn't. This release resolves these issues.</p>
<hr/>
<h2>Release Notes for 1.2</h2>
<p><i>Released on 14 March 2021</i></p>
<p>This release is mainly focused on the Build Novel Project tool. Completely new export classes
have been written to support Open Document and Markdown exports. In addition, the way document
layouts are handled have been automated a little to assist the user in keeping header levels and
document layout flags in sync. The third new additoion is the ability to record and log idle time
during a writing session to improve the writing statistics information as requested by several
users. Finally, it is now possible to directly edit the project dictionary via a new, simple GUI
dialog.</p>
<h3>The Build Novel Project Tool</h3>
<p>The main changes for this release are to the Build Novel Project tool. The Open Document export,
as well as the Markdown export, is now handled entirely by code written for novelWriter.
Previously, these export features depended on the underlying Qt library's save routines connected
to the preview document shown in the build dialog. Using this method of export both meant that the
content of the document was dependent on the preview being generated first, and it also meant that
the exported document had limited support for novelWriter-specific features and custom formatting.
The new export class should generate a much better result, especially for the Open Document
formats. The Open Document standard is supported by Open Office, Libre Office, Google Docs,
Microsoft Word, and probably a number of other applications too. The Markdown export hasn't changed
a lot, but should be a slight improvement on the previous export feature.</p>
<p>These changes to the build tool also imply that the saving process is now independent of the
content of the preview window, meaning you don't have to rebuild the preview before saving, which
was previously the case. To make this more consistent, the PDF export option has been moved to the
print button as it is actually a print-to-file feature under the hood, not technically a proper PDF
export format. It is exactly the same as printing to file from the print preview dialog.</p>
<p>In addition to the changes to the export features, the Build Novel Project tool now also has
controls for line height, which applies to all rich text export formats, and the option to replace
unicode characters with appropriate html entities for html export.</p>
<h3>Document Layout Automation</h3>
<p>Among other changes in this release are a few improvements to the process of creating and
changing documents. When a new document is first created, the header is generated from the assigned
label and layout.</p>
<p>In addition, for some document layouts, when the user changes the header level of the first
header of the document, the document layout setting is updated accordingly. This should reduce the
need for the user to maintain two ways of assigning the role of a given document. This automation
only applies to combinations of header level and current document layouts where there is no
ambiguity. For instance, changing the header level in a "Scene" document from level 3 to 2 changes
the document layout automatically to "Chapter". But changing the first header of a "Book" layout
document from 1 to 2 does not change the document's layout as the "Book" layout is a generic
document layout and it's perfectly reasonable for its first header to be a chapter header.</p>
<p>Keep in mind that novelWriter treats documents with layout "Book", "Chapter" and "Scene" exactly
the same during exports. The distinction is only meant as a way to indicate the purpose of a
document in the project tree. This new automation is meant to assist in keeping this information up
to date. The other layouts do have an effect on formatting during export, and are generally left
alone.</p>
<h3>The Session Timer and Idle Time</h3>
<p>Another change that has been requested by a couple of users is to have the session timer in the
status bar stop counting when the user is inactive (idle). This feature is optional, and can be
controlled from Preferences. The definition of "idle" in this context is either that the user is
active in a different application than novelWriter (loss of focus) or that the user has not made
any changes to the current document for a given amount of time. The time threshold is by default
five minutes, but can be altered in Preferences.</p>
<p>In addition, the idle time is also recorded in the session log, and can be viewed in the Writing
Statistics dialog and exported with the rest of the information. The idle time is recorder in the
logs regardless of whether the status bar clock takes idle time into consideration or not. So even
if you turn off the idle time switch in Preferences, the other idle time setting still affects the
writing stats log entries.</p>
<h3>Other Changes</h3>
<p>The user dictionary of the project, where words added to the dictionary from the document editor
go, can now be viewed and edited with a new "Project Word List" tool in the "Tools" menu.</p>
<p>A small additional feature added is also the ability to undo the last move of an item in the
project tree. The keyboard shortcut for this is `Ctrl+Shift+Z`, or it can be accessed from the
menu. The feature can only undo the last move, but it includes both documents moved to trash, moves
by up/down keypress or menu entries, and drag and drop moves.</p>
<p>A new keyword has been added to mark characters in the story. The new keyword is intended to tag
a character as the focus character for a chapter or scene. This is useful for stories where the
point-of-view character and the focus character are different.</p>
<p>Lastly, two bugfixes have been made as well. The Empty Trash feature was no longer working due
to an earlier fix solving another issue. The feature has now been restored. In addition, the
indexer now checks that a keyword (tag or reference) is valid before saving it to the index.
Previously, an invalid keyword could be saved to the index and potentially crash the application.
</p>
</body>
</html>
+2 -3
View File
@@ -31,9 +31,8 @@ from datetime import datetime
from PyQt5.QtWidgets import qApp
from PyQt5.QtCore import QCoreApplication
from nw.constants import (
nwConst, nwUnicode, nwItemClass, nwItemType, nwItemLayout
)
from nw.enum import nwItemClass, nwItemType, nwItemLayout
from nw.constants import nwConst, nwUnicode
logger = logging.getLogger(__name__)
+2 -2
View File
@@ -39,9 +39,9 @@ from PyQt5.QtCore import (
QTranslator
)
from nw.constants import nwConst, nwFiles, nwUnicode
from nw.common import splitVersionNumber, formatTimeStamp
from nw.error import logException
from nw.common import splitVersionNumber, formatTimeStamp
from nw.constants import nwConst, nwFiles, nwUnicode
logger = logging.getLogger(__name__)
@@ -26,9 +26,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
from PyQt5.QtCore import QCoreApplication, QT_TRANSLATE_NOOP
from nw.constants.enum import (
nwItemClass, nwItemLayout, nwItemType, nwOutline
)
from nw.enum import nwItemClass, nwItemLayout, nwItemType, nwOutline
def trConst(tString):
"""Wrapper function for locally translating constants.
-30
View File
@@ -1,30 +0,0 @@
# -*- coding: utf-8 -*-
from nw.constants.constants import (
trConst, nwConst, nwLists, nwRegEx, nwFiles, nwKeyWords, nwLabels,
nwQuotes, nwUnicode, nwHtmlUnicode
)
from nw.constants.enum import (
nwAlert, nwDocAction, nwItemClass, nwItemLayout, nwItemType, nwOutline,
nwDocInsert, nwWidget
)
__all__ = [
"trConst",
"nwConst",
"nwLists",
"nwRegEx",
"nwFiles",
"nwKeyWords",
"nwLabels",
"nwQuotes",
"nwUnicode",
"nwHtmlUnicode",
"nwAlert",
"nwDocAction",
"nwItemClass",
"nwItemLayout",
"nwItemType",
"nwOutline",
"nwDocInsert",
"nwWidget",
]
+1 -2
View File
@@ -31,9 +31,8 @@ from functools import partial
from PyQt5.QtCore import QCoreApplication
from nw.constants import nwAlert
from nw.enum import nwAlert, nwItemLayout, nwItemClass
from nw.common import isHandle
from nw.constants import nwItemLayout, nwItemClass
logger = logging.getLogger(__name__)
+3 -5
View File
@@ -32,12 +32,10 @@ import os
from time import time
from nw.constants import (
nwFiles, nwKeyWords, nwItemType, nwItemClass, nwItemLayout, nwAlert,
nwUnicode
)
from nw.core.document import NWDoc
from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
from nw.common import isHandle, isTitleTag, isItemClass, isItemLayout
from nw.constants import nwFiles, nwKeyWords, nwUnicode
from nw.core.document import NWDoc
logger = logging.getLogger(__name__)
+2 -4
View File
@@ -28,10 +28,8 @@ import logging
from lxml import etree
from nw.constants import nwItemType, nwItemClass, nwItemLayout
from nw.common import (
checkInt, isHandle, isItemClass, isItemLayout, isItemType
)
from nw.enum import nwItemType, nwItemClass, nwItemLayout
from nw.common import checkInt, isHandle, isItemClass, isItemLayout, isItemType
logger = logging.getLogger(__name__)
+2 -3
View File
@@ -45,9 +45,8 @@ from nw.common import (
checkString, checkBool, checkInt, isHandle, formatTimeStamp,
makeFileNameSafe, hexToInt
)
from nw.constants import (
trConst, nwFiles, nwItemType, nwItemClass, nwItemLayout, nwLabels, nwAlert
)
from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
from nw.constants import trConst, nwFiles, nwLabels
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -27,7 +27,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import logging
from nw.core.tokenizer import Tokenizer
from nw.constants import nwLabels, nwKeyWords, nwHtmlUnicode
from nw.constants import nwKeyWords, nwLabels, nwHtmlUnicode
logger = logging.getLogger(__name__)
+3 -2
View File
@@ -32,9 +32,10 @@ from functools import partial
from PyQt5.QtCore import QCoreApplication, QRegularExpression
from nw.core.document import NWDoc
from nw.enum import nwItemLayout, nwItemType
from nw.common import numberToRoman
from nw.constants import nwConst, nwUnicode, nwItemLayout, nwItemType, nwRegEx
from nw.constants import nwConst, nwRegEx, nwUnicode
from nw.core.document import NWDoc
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -26,8 +26,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
import logging
from nw.core.tokenizer import Tokenizer
from nw.constants import nwLabels
from nw.core.tokenizer import Tokenizer
logger = logging.getLogger(__name__)
+2 -2
View File
@@ -29,11 +29,11 @@ import logging
from lxml import etree
from hashlib import sha256
from datetime import datetime
from zipfile import ZipFile
from datetime import datetime
from nw.constants import nwKeyWords, nwLabels
from nw.core.tokenizer import Tokenizer
from nw.constants import nwLabels, nwKeyWords
logger = logging.getLogger(__name__)
+4 -5
View File
@@ -29,14 +29,13 @@ import logging
import os
from lxml import etree
from hashlib import sha256
from time import time
from hashlib import sha256
from nw.core.item import NWItem
from nw.enum import nwItemType, nwItemClass, nwItemLayout
from nw.common import checkHandle
from nw.constants import (
nwFiles, nwItemType, nwItemClass, nwItemLayout, nwConst, nwLists
)
from nw.constants import nwConst, nwLists, nwFiles
from nw.core.item import NWItem
logger = logging.getLogger(__name__)
View File
+4 -5
View File
@@ -44,12 +44,11 @@ from PyQt5.QtWidgets import (
QSizePolicy, QDoubleSpinBox, QComboBox
)
from nw.common import fuzzyTime, makeFileNameSafe
from nw.gui.custom import QSwitch
from nw.core import ToHtml, ToOdt, ToMarkdown
from nw.constants import (
nwConst, nwAlert, nwFiles, nwItemType, nwItemLayout, nwItemClass
)
from nw.enum import nwAlert, nwItemType, nwItemLayout, nwItemClass
from nw.common import fuzzyTime, makeFileNameSafe
from nw.constants import nwConst, nwFiles
from nw.gui.custom import QSwitch
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -40,7 +40,7 @@ from PyQt5.QtWidgets import (
QLineEdit
)
from nw.constants import trConst, nwUnicode, nwQuotes
from nw.constants import trConst, nwQuotes, nwUnicode
logger = logging.getLogger(__name__)
+3 -5
View File
@@ -50,12 +50,10 @@ from PyQt5.QtWidgets import (
)
from nw.core import NWDoc, NWSpellSimple, countWords
from nw.gui.dochighlight import GuiDocHighlighter
from nw.enum import nwAlert, nwDocAction, nwDocInsert, nwItemClass
from nw.common import transferCase
from nw.constants import (
trConst, nwConst, nwAlert, nwUnicode, nwDocAction, nwDocInsert,
nwItemClass, nwKeyWords, nwLabels
)
from nw.constants import nwConst, trConst, nwKeyWords, nwLabels, nwUnicode
from nw.gui.dochighlight import GuiDocHighlighter
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -34,7 +34,7 @@ from PyQt5.QtGui import (
QColor, QTextCharFormat, QFont, QSyntaxHighlighter, QBrush
)
from nw.constants import nwUnicode, nwRegEx
from nw.constants import nwRegEx, nwUnicode
logger = logging.getLogger(__name__)
+2 -2
View File
@@ -33,9 +33,9 @@ from PyQt5.QtWidgets import (
QListWidgetItem, QDialogButtonBox
)
from nw.constants import nwAlert, nwItemType
from nw.gui.custom import QHelpLabel
from nw.core import NWDoc
from nw.enum import nwAlert, nwItemType
from nw.gui.custom import QHelpLabel
logger = logging.getLogger(__name__)
+2 -3
View File
@@ -34,10 +34,9 @@ from PyQt5.QtWidgets import (
)
from nw.core import NWDoc
from nw.enum import nwAlert, nwItemType, nwItemClass, nwItemLayout
from nw.constants import nwConst
from nw.gui.custom import QHelpLabel
from nw.constants import (
nwAlert, nwItemType, nwItemClass, nwItemLayout, nwConst
)
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -41,7 +41,8 @@ from PyQt5.QtWidgets import (
)
from nw.core import ToHtml
from nw.constants import nwAlert, nwItemType, nwDocAction, nwUnicode
from nw.enum import nwAlert, nwItemType, nwDocAction
from nw.constants import nwUnicode
logger = logging.getLogger(__name__)
+2 -3
View File
@@ -31,9 +31,8 @@ from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont, QPixmap
from PyQt5.QtWidgets import QWidget, QGridLayout, QLabel
from nw.constants import (
trConst, nwLabels, nwItemClass, nwItemType, nwItemLayout
)
from nw.enum import nwItemClass, nwItemType, nwItemLayout
from nw.constants import trConst, nwLabels
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -33,8 +33,9 @@ from PyQt5.QtWidgets import (
QDialogButtonBox
)
from nw.enum import nwItemLayout, nwItemType
from nw.constants import trConst, nwLists, nwLabels
from nw.gui.custom import QSwitch
from nw.constants import trConst, nwLabels, nwItemLayout, nwItemType, nwLists
logger = logging.getLogger(__name__)
+2 -4
View File
@@ -31,10 +31,8 @@ from PyQt5.QtCore import QUrl, QProcess
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QMenuBar, QAction
from nw.constants import (
trConst, nwItemType, nwItemClass, nwDocAction, nwDocInsert, nwKeyWords,
nwLabels, nwUnicode, nwWidget
)
from nw.enum import nwItemType, nwItemClass, nwDocAction, nwDocInsert, nwWidget
from nw.constants import trConst, nwKeyWords, nwLabels, nwUnicode
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -32,8 +32,8 @@ from time import time
from PyQt5.QtCore import Qt, QSize
from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QAbstractItemView
from nw.constants import nwKeyWords
from nw.common import checkInt
from nw.constants import nwKeyWords
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -34,7 +34,8 @@ from PyQt5.QtWidgets import (
QTreeWidget, QTreeWidgetItem, QMenu, QAction, QAbstractItemView
)
from nw.constants import trConst, nwKeyWords, nwLabels, nwOutline
from nw.enum import nwOutline
from nw.constants import trConst, nwKeyWords, nwLabels
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -32,8 +32,8 @@ from PyQt5.QtWidgets import (
QScrollArea, QWidget, QGridLayout, QHBoxLayout, QGroupBox, QLabel
)
from nw.constants import trConst, nwLabels, nwKeyWords
from nw.common import checkInt
from nw.constants import trConst, nwKeyWords, nwLabels
logger = logging.getLogger(__name__)
+3 -2
View File
@@ -35,9 +35,10 @@ from PyQt5.QtWidgets import (
QLineEdit, QFileDialog, QFontDialog, QDoubleSpinBox
)
from nw.gui.custom import QSwitch, QConfigLayout, PagedDialog, QuotesDialog
from nw.core import NWSpellSimple, NWSpellEnchant
from nw.constants import nwConst, nwAlert
from nw.enum import nwAlert
from nw.constants import nwConst
from nw.gui.custom import QSwitch, QConfigLayout, PagedDialog, QuotesDialog
logger = logging.getLogger(__name__)
+2 -2
View File
@@ -35,9 +35,9 @@ from PyQt5.QtWidgets import (
QLabel, QSpinBox, QGridLayout, QHBoxLayout, QLineEdit, QAbstractItemView
)
from nw.gui.custom import PagedDialog, QSwitch
from nw.constants import nwUnicode
from nw.common import numberToRoman
from nw.constants import nwUnicode
from nw.gui.custom import PagedDialog, QSwitch
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -35,7 +35,7 @@ from PyQt5.QtWidgets import (
QComboBox
)
from nw.constants import nwAlert
from nw.enum import nwAlert
from nw.gui.custom import QSwitch, PagedDialog, QConfigLayout
logger = logging.getLogger(__name__)
+2 -4
View File
@@ -37,10 +37,8 @@ from PyQt5.QtWidgets import (
)
from nw.core import NWDoc
from nw.constants import (
trConst, nwLabels, nwItemType, nwItemClass, nwItemLayout, nwAlert,
nwConst, nwLists
)
from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwAlert
from nw.constants import nwConst, trConst, nwLists, nwLabels
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -35,8 +35,9 @@ from PyQt5.QtWidgets import (
QGroupBox, QGridLayout, QSpinBox
)
from nw.enum import nwItemClass
from nw.common import makeFileNameSafe
from nw.constants import trConst, nwLabels, nwItemClass
from nw.constants import trConst, nwLabels
from nw.gui.custom import QSwitch
logger = logging.getLogger(__name__)
+1 -1
View File
@@ -39,7 +39,7 @@ from PyQt5.QtGui import (
QPalette, QColor, QIcon, QFont, QFontMetrics, QFontDatabase, QPixmap
)
from nw.constants import nwAlert
from nw.enum import nwAlert
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -34,7 +34,8 @@ from PyQt5.QtWidgets import (
QAbstractItemView, QPushButton, QLineEdit, QLabel
)
from nw.constants import nwFiles, nwAlert
from nw.enum import nwAlert
from nw.constants import nwFiles
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -38,8 +38,9 @@ from PyQt5.QtWidgets import (
QLabel, QGroupBox, QMenu, QAction, QFileDialog, QSpinBox, QHBoxLayout
)
from nw.enum import nwAlert
from nw.common import formatTime, checkInt
from nw.constants import nwConst, nwFiles, nwAlert
from nw.constants import nwConst, nwFiles
from nw.gui.custom import QSwitch
logger = logging.getLogger(__name__)
+2 -1
View File
@@ -46,8 +46,9 @@ from nw.gui import (
GuiProjectTree, GuiProjectWizard, GuiTheme, GuiWordList, GuiWritingStats
)
from nw.core import NWProject, NWDoc, NWIndex
from nw.constants import nwItemType, nwItemClass, nwAlert, nwLists, nwWidget
from nw.enum import nwItemType, nwItemClass, nwAlert, nwWidget
from nw.common import getGuiItem, hexToInt
from nw.constants import nwLists
logger = logging.getLogger(__name__)
+3 -3
View File
@@ -1,13 +1,13 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="1.3a0" hexVersion="0x010300a0" fileVersion="1.2" timeStamp="2021-02-18 20:34:04">
<novelWriterXML appVersion="1.3b1" hexVersion="0x010300b1" fileVersion="1.2" timeStamp="2021-03-28 17:53:43">
<project>
<name>Sample Project</name>
<title>Sample Project</title>
<author>Jane Smith</author>
<author>Jay Doh</author>
<saveCount>1054</saveCount>
<saveCount>1057</saveCount>
<autoCount>166</autoCount>
<editTime>49435</editTime>
<editTime>49506</editTime>
</project>
<settings>
<doBackup>False</doBackup>
+17
View File
@@ -274,6 +274,14 @@ def makeMinimalPackage(targetOS):
print(str(e))
sys.exit(1)
# Make translation files
try:
buildQtI18n()
except Exception as e:
print("Failed with error:")
print(str(e))
sys.exit(1)
print("")
print("Building Minimal ZIP File")
print("=========================")
@@ -318,6 +326,15 @@ def makeMinimalPackage(targetOS):
continue
zipObj.write(os.path.join(nRoot, aFile))
for aFile in os.listdir("i18n"):
i18File = os.path.join("i18n", aFile)
if not os.path.isfile(i18File):
continue
if i18File.endswith((".json", ".qm")):
zipObj.write(i18File)
print("Adding File: %s" % i18File)
if targetOS == OS_WIN:
zipObj.write("novelWriter.py", "novelWriter.pyw")
print("Adding File: novelWriter.pyw")
+1 -1
View File
@@ -27,7 +27,7 @@ from dummy import causeOSError
from nw.core import NWProject, NWDoc
from nw.core.item import NWItem
from nw.constants import nwItemClass, nwItemLayout
from nw.enum import nwItemClass, nwItemLayout
@pytest.mark.core
def testCoreDocument_LoadSave(monkeypatch, dummyGUI, nwMinimal):
+1 -1
View File
@@ -31,7 +31,7 @@ from tools import cmpFiles
from nw.core.project import NWProject
from nw.core.index import NWIndex, countWords
from nw.constants import nwItemClass, nwItemLayout
from nw.enum import nwItemClass, nwItemLayout
@pytest.mark.core
def testCoreIndex_LoadSave(monkeypatch, nwLipsum, dummyGUI, outDir, refDir):
+1 -1
View File
@@ -26,7 +26,7 @@ from lxml import etree
from nw.core import NWProject
from nw.core.item import NWItem
from nw.constants import nwItemClass, nwItemType, nwItemLayout
from nw.enum import nwItemClass, nwItemType, nwItemLayout
@pytest.mark.core
def testCoreItem_Setters(dummyGUI):
+2 -1
View File
@@ -31,8 +31,9 @@ from tools import cmpFiles, writeFile, readFile
from dummy import causeOSError
from nw.core.project import NWProject
from nw.constants import nwItemClass, nwItemType, nwItemLayout, nwFiles
from nw.enum import nwItemClass, nwItemType, nwItemLayout
from nw.common import formatTimeStamp
from nw.constants import nwFiles
@pytest.mark.core
def testCoreProject_NewMinimal(fncDir, outDir, refDir, tmpDir, dummyGUI):
+2 -1
View File
@@ -26,7 +26,8 @@ import pytest
from lxml import etree
from nw.core.project import NWProject, NWItem, NWTree
from nw.constants import nwItemClass, nwItemType, nwItemLayout, nwFiles
from nw.enum import nwItemClass, nwItemType, nwItemLayout
from nw.constants import nwFiles
@pytest.fixture(scope="function")
def dummyItems(dummyGUI):
+1 -1
View File
@@ -33,7 +33,7 @@ from PyQt5.QtWidgets import QAction, QMessageBox, QDialog
from nw.gui.itemeditor import GuiItemEditor
from nw.gui.doceditor import GuiDocEditor
from nw.gui.projtree import GuiProjectTree
from nw.constants import nwItemType, nwDocAction, nwWidget
from nw.enum import nwItemType, nwDocAction, nwWidget
keyDelay = 2
typeDelay = 1
+1 -1
View File
@@ -26,7 +26,7 @@ from PyQt5.QtCore import Qt, QUrl
from PyQt5.QtGui import QTextCursor
from PyQt5.QtWidgets import qApp, QAction, QMessageBox
from nw.constants import nwDocAction
from nw.enum import nwDocAction
keyDelay = 2
typeDelay = 1
+1 -1
View File
@@ -29,7 +29,7 @@ from tools import cmpFiles, getGuiItem
from PyQt5.QtWidgets import QAction, QMessageBox
from nw.gui import GuiItemEditor, GuiProjectTree
from nw.constants import nwItemLayout
from nw.enum import nwItemLayout
keyDelay = 2
typeDelay = 1
+2 -3
View File
@@ -28,9 +28,8 @@ from PyQt5.QtGui import QTextCursor, QTextBlock
from PyQt5.QtWidgets import QAction, QFileDialog, QMessageBox
from nw.gui.doceditor import GuiDocEditor
from nw.constants import (
nwUnicode, nwDocAction, nwDocInsert, nwKeyWords, nwWidget
)
from nw.enum import nwDocAction, nwDocInsert, nwWidget
from nw.constants import nwKeyWords, nwUnicode
keyDelay = 2
typeDelay = 1
+1 -1
View File
@@ -25,7 +25,7 @@ import pytest
from PyQt5.QtCore import Qt, QPoint
from PyQt5.QtWidgets import QAction, QTreeWidgetItem, QMessageBox
from nw.constants import nwOutline
from nw.enum import nwOutline
keyDelay = 2
typeDelay = 1
+1 -1
View File
@@ -30,7 +30,7 @@ from PyQt5.QtWidgets import QAction, QMessageBox
from nw.guimain import GuiMain
from nw.gui.projtree import GuiProjectTree
from nw.constants import nwItemType, nwItemClass
from nw.enum import nwItemType, nwItemClass
@pytest.mark.gui
def testGuiProjTree_TreeItems(qtbot, caplog, monkeypatch, nwGUI, nwMinimal):
+1 -1
View File
@@ -30,7 +30,7 @@ from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QFileDialog, QWizard, QMessageBox
from nw.gui import GuiProjectWizard
from nw.constants import nwItemClass
from nw.enum import nwItemClass
from nw.gui.projwizard import (
ProjWizardIntroPage, ProjWizardFolderPage, ProjWizardPopulatePage,
ProjWizardCustomPage, ProjWizardFinalPage