Merge pull request #765 from vkbo/minimal_setup

Minimal Setup and i18n
This commit is contained in:
Veronica Berglyd Olsen
2021-05-02 16:08:09 +02:00
committed by GitHub
7 changed files with 43 additions and 16 deletions
+1 -2
View File
@@ -5,8 +5,7 @@
[![macOS](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml/badge.svg?branch=main)](https://github.com/vkbo/novelWriter/actions/workflows/test_mac.yml)
[![flake8](https://github.com/vkbo/novelWriter/workflows/flake8/badge.svg)](https://github.com/vkbo/novelWriter/actions)
[![codecov](https://codecov.io/gh/vkbo/novelWriter/branch/main/graph/badge.svg)](https://codecov.io/gh/vkbo/novelWriter)
[![docs](https://readthedocs.org/projects/novelwriter/badge/?version=latest)](https://novelwriter.readthedocs.io/en/latest/?badge=latest)
[![docs](https://readthedocs.org/projects/novelwriter/badge/?version=latest)](https://novelwriter.readthedocs.io/en/latest/?badge=latest)
[![release](https://img.shields.io/github/v/release/vkbo/novelwriter)](https://github.com/vkbo/novelWriter/releases)
[![pypi](https://img.shields.io/pypi/v/novelwriter)](https://pypi.org/project/novelWriter)
[![python](https://img.shields.io/pypi/pyversions/novelwriter)](https://pypi.org/project/novelWriter)
+16
View File
@@ -39,6 +39,22 @@ are needed.
**Note:** This requires that you have the tools Qt 5 Linguist and the PyQt5 tool `pylupdate5`
installed on your system.
### Missing QtBase Translations
The default Qt dialogs also have translations, for instance for standard buttons for "Yes", "No",
"Ok", "Cancel", etc. Generally, these translations files are installed with the Qt libraries on
your system, and novelWriter will collect those translations from there. However, these
translations are missing for many languages.
As a starting point, there is no need to translate any entries in the `.ts` files that are under
elements starting with the letter "Q", like "QPlatformTheme", "QWizard", etc. If these turn up in
English in novelWriter after activating a translation, it means they are probably missing in the Qt
library, and you may also need to translate these.
These additional translation entries are generated from a file named `i18n/qtbase.py`, which is not
a file that novelWriter uses. It is there only to generate these additional entries for the `.ts`
files.
## Project Localisation
Projects can have a different language setting than the GUI itself. The files with format
+2 -2
View File
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""
Dummy Qt Translation File
=========================
Qt Base Translation File
========================
This file causes Qt Linguist to generate translation entries for the Qt
elements that need translation in novelWriter for those languages who do
+1 -1
View File
@@ -1,5 +1,5 @@
SOURCES += \
i18n/dummy_qtbase.py \
i18n/qtbase.py \
nw/core/document.py \
nw/core/project.py \
nw/core/tokenizer.py \
+1 -1
View File
@@ -5,7 +5,7 @@ author = Veronica Berglyd Olsen
author_email = code@vkbo.net
description = A markdown-like document editor for writing novels
url = https://novelwriter.io
long_description = file: README.md
long_description = file: setup/long_description.md
long_description_content_type = text/markdown
license_file = LICENSE.md
license = GNU General Public License v3
+1 -10
View File
@@ -371,6 +371,7 @@ def makeMinimalPackage(targetOS):
with ZipFile(outFile, "w", compression=ZIP_DEFLATED, compresslevel=9) as zipObj:
if targetOS != OS_WIN:
# Not needed for Windows as the icons are in nw/assets/icons
for nRoot, _, nFiles in os.walk("setup"):
print("Adding Folder: %s [%d files]" % (nRoot, len(nFiles)))
for aFile in nFiles:
@@ -388,15 +389,6 @@ 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")
@@ -409,7 +401,6 @@ def makeMinimalPackage(targetOS):
print("Adding File: novelWriter.py")
for aFile in rootFiles:
assert os.path.isfile(aFile)
print("Adding File: %s" % aFile)
zipObj.write(aFile)
+21
View File
@@ -0,0 +1,21 @@
<img src="https://raw.githubusercontent.com/vkbo/novelWriter/main/setup/novelwriter.png">
novelWriter is a plain text editor designed for writing novels assembled from many smaller text
documents. It uses a minimal formatting syntax inspired by Markdown, and adds a meta data syntax
for comments, synopsis, and cross-referencing. It's designed to be a simple text editor that allows
for easy organisation of text and notes, using human readable text files as storage for robustness.
The project storage is suitable for version control software, and also well suited for file
synchronisation tools. All text is saved as plain text files with a meta data header, the core
project structure is stored in a single project XML file, and other meta data is primarily saved as
JSON files.
The application is written in Python 3 (3.6+) using Qt5 and PyQt5 (5.3+). It is developed on Linux,
but should in principle work fine on other operating systems as well as long as dependencies are
met. It is regularly tested on Debian and Ubuntu Linux, Windows, and macOS.
novelWriter is developed and maintained by [Veronica Berglyd Olsen](https://github.com/vkbo).
**Website:** https://novelwriter.io
**Documentation:** https://novelwriter.readthedocs.io
**Source Code:** https://github.com/vkbo/novelWriter