From 03ee8edda1e70717941f7ae66a3f2c09098e33b6 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:47:49 +0200 Subject: [PATCH 01/13] Update translation sources, and completed French --- i18n/nw_base.ts | 58 ++++----- i18n/nw_en_US.ts | 58 ++++----- i18n/nw_es_419.ts | 58 ++++----- i18n/nw_fr_FR.ts | 300 +++++++++++++++++++++++----------------------- i18n/nw_it_IT.ts | 58 ++++----- i18n/nw_ja_JP.ts | 58 ++++----- i18n/nw_nb_NO.ts | 58 ++++----- 7 files changed, 324 insertions(+), 324 deletions(-) diff --git a/i18n/nw_base.ts b/i18n/nw_base.ts index 60b73d72..87c473e3 100644 --- a/i18n/nw_base.ts +++ b/i18n/nw_base.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting - + Value - + Name - + Selection - + Title - + Hidden @@ -4329,17 +4329,17 @@ - + Fresh Project - + Example Project - + Template: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... - + Processing ... - + Done - + Unknown - + Built @@ -4522,13 +4522,13 @@ - + Only used when building the manuscript. - + Project language @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words - - + + Characters - + Words in Headings - + Words in Text - + Headings - + Paragraphs - + Characters in Headings - + Characters in Text - + Characters, No Spaces - + Characters in Headings, No Spaces - + Characters in Text, No Spaces diff --git a/i18n/nw_en_US.ts b/i18n/nw_en_US.ts index b1adeacf..dfbf2382 100644 --- a/i18n/nw_en_US.ts +++ b/i18n/nw_en_US.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Setting - + Value Value - + Name Name - + Selection Selection - + Title Title - + Hidden Hidden @@ -4329,17 +4329,17 @@ Select Project Folder - + Fresh Project Fresh Project - + Example Project Example Project - + Template: {0} Template: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Press the "Preview" button to generate ... - + Processing ... Processing ... - + Done Done - + Unknown Unknown - + Built Built @@ -4522,13 +4522,13 @@ Author(s) - + Only used when building the manuscript. Only used when building the manuscript. - + Project language Project language @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Words - - + + Characters Characters - + Words in Headings Words in Headings - + Words in Text Words in Text - + Headings Headings - + Paragraphs Paragraphs - + Characters in Headings Characters in Headings - + Characters in Text Characters in Text - + Characters, No Spaces Characters, No Spaces - + Characters in Headings, No Spaces Characters in Headings, No Spaces - + Characters in Text, No Spaces Characters in Text, No Spaces diff --git a/i18n/nw_es_419.ts b/i18n/nw_es_419.ts index 58299e4e..beec83ac 100644 --- a/i18n/nw_es_419.ts +++ b/i18n/nw_es_419.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Opciones - + Value Valores Definidos - + Name Nombre - + Selection Selecciones - + Title Título - + Hidden Oculto @@ -4329,17 +4329,17 @@ Escoger la Carpeta del Proyecto - + Fresh Project Proyecto vacío - + Example Project Ejemplo de Proyecto - + Template: {0} Plantilla: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Pulse el botón "Vista Previa" para así generarla... - + Processing ... Procesando... - + Done Hecho - + Unknown Desconocido - + Built Compilado @@ -4522,13 +4522,13 @@ Autores - + Only used when building the manuscript. Se utiliza solo al compilar el manuscrito. - + Project language Idioma del proyecto @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Palabras - - + + Characters Caracteres - + Words in Headings Palabras en Titulos - + Words in Text Palabras en el Texto - + Headings Títulos - + Paragraphs Párrafos - + Characters in Headings Caracteres en los Títulos - + Characters in Text Caracteres en el Texto - + Characters, No Spaces Caracteres, Sin Espacios - + Characters in Headings, No Spaces Caracteres en los Títulos, Sin Espacios - + Characters in Text, No Spaces Caracteres en el Texto, Sin Espacios diff --git a/i18n/nw_fr_FR.ts b/i18n/nw_fr_FR.ts index aea3fb7c..d947e49a 100644 --- a/i18n/nw_fr_FR.ts +++ b/i18n/nw_fr_FR.ts @@ -31,32 +31,32 @@ Partition Format - + Format de partie Chapter Format - + Format de chapitre Unnumbered Format - + Format non numéroté Scene Format - + Format de scène - Hard Scene Format - + Alt. Scene Format + Format de scène alternative Section Format - + Format de section @@ -86,7 +86,7 @@ Ignore These Keywords - + Ignorer ces mots clés @@ -206,17 +206,17 @@ First Line Indent - + Retrait de la première ligne Markdown (.md) - + Markdown (.md) Preserve Hard Line Breaks - + Préserver les retours à la ligne @@ -231,7 +231,7 @@ Preserve Tab Characters - + Préserver les tabulations @@ -791,22 +791,22 @@ GuiDocEditFooter - + Line: {0} ({1}) Ligne : {0} ({1}) - + Words: {0} ({1}) Mots : {0} ({1}) - + Words: {0} selected Mots sélectionnés : {0} - + Status État @@ -814,27 +814,27 @@ GuiDocEditHeader - + Toggle Tool Bar Afficher/Masquer la barre d'outils - + Outline - + Plan - + Search Chercher - + Toggle Focus Mode Basculer le mode focus - + Close Fermer @@ -842,62 +842,62 @@ GuiDocEditSearch - + Search for - + Rechercher - + Replace with - + Remplacer par - + Search Chercher - + Case Sensitive Sensible à la casse - + Whole Words Only Mots entiers uniquement - + RegEx Mode Expressions régulières - + Loop Search Recherche en boucle - + Search Next File Chercher dans le fichier suivant - + Preserve Case Conserver la casse - + Close Search Terminer la recherche - + Find in current document Chercher dans le document actuel - + Find and replace in current document Chercher et remplacer dans le document actuel @@ -920,107 +920,107 @@ Impossible d'enregistrer le document. - + Saved Document: {0} Document enregistré : {0} - + Spell checking requires the package PyEnchant. It does not appear to be installed. La vérification orthographique nécessite PyEnchant qui ne semble pas installé ici. - + Spell check complete La vérification orthographique est terminée - + Document Details Détails du document - + Created: {0} Créé : {0} - + Updated: {0} Mis à jour : {0} - + File Location: {0} Emplacement du fichier : {0} - + Set as Document Name Définir comme nom du document - + Follow Tag Suivre cette étiquette - + Create Note for Tag Créer une note pour l'étiquette - + Cut Couper - + Copy Copier - + Paste Coller - + Select All Sélectionner tout - + Select Word Sélectionner le mot - + Select Paragraph Sélectionner le paragraphe - + Spelling Suggestion(s) Orthographe suggérée - + No Suggestions Pas de suggestion - + Add Word to Dictionary Ajouter ce mot au dictionnaire - + Please select some text before calling replace quotes. Veuillez sélectionner du texte avant de demander le remplacement des guillemets. - + Do you want to create a new project note for the tag '{0}'? Voulez-vous créer une nouvelle note de projet pour l'étiquette '{0}' ? @@ -1058,7 +1058,7 @@ Document Headings - + Titres du documents @@ -1068,22 +1068,22 @@ Split on Heading Level 1 (Partition) - + Couper sur titre de niveau 1 (partie) Split up to Heading Level 2 (Chapter) - + Couper jusqu'aux titres de niveau 2 (chapitre) Split up to Heading Level 3 (Scene) - + Couper jusqu'aux titres de niveau 3 (scène) Split up to Heading Level 4 (Section) - + Couper jusqu'aux titres de niveau 4 (section) @@ -1104,52 +1104,52 @@ GuiDocToolBar - + Markdown Bold Markdown gras - + Markdown Italic Markdown italique - + Markdown Strikethrough Markdown barré - + Shortcode Bold Code court gras - + Shortcode Italic Code court italique - + Shortcode Strikethrough Code court barré - + Shortcode Underline Code court souligné - + Shortcode Highlight - + Surligner les codes courts - + Shortcode Superscript Code court exposant - + Shortcode Subscript Code court indice @@ -1187,7 +1187,7 @@ Outline - + Plan @@ -1289,7 +1289,7 @@ Characters - Caractères + Signes @@ -1534,12 +1534,12 @@ Undo - Défaire + Annuler Redo - Refaire + Rétablir @@ -1574,17 +1574,17 @@ Go to Project Tree - Focus sur l'arborescence + Aller à l'arborescence Go to Document Editor - Focus sur l'éditeur + Aller à l'éditeur Go to Outline - Focus sur la vue d'ensemble + Aller à la vue d'ensemble @@ -1814,7 +1814,7 @@ Strikethrough - Biffure + Barré @@ -1854,7 +1854,7 @@ Highlight - + Surligner @@ -1869,22 +1869,22 @@ Heading 1 (Partition) - + Titre 1 (Partie) Heading 2 (Chapter) - + Titre 2 (Chapitre) Heading 3 (Scene) - + Titre 3 (Scène) Heading 4 (Section) - + Titre 4 (Section) @@ -1898,8 +1898,8 @@ - Hard Scene - + Alternative Scene + Scène alternative @@ -1944,17 +1944,17 @@ Replace Straight Single Quotes - + Remplacer les guillemets simples droits Replace Straight Double Quotes - + Remplacer les guillemets doubles droits Remove In-Paragraph Breaks - Enlever les ruptures dans les paragraphes + Retirer les coupures dans le paragraphe @@ -1989,7 +1989,7 @@ Find in Project - + Rechercher dans le projet @@ -2009,7 +2009,7 @@ Default - Valeurs par défauts + Valeur par défaut @@ -2161,12 +2161,12 @@ Details - + Détails Outline - + Plan @@ -2376,7 +2376,7 @@ Characters - Caractères + Signes @@ -2997,27 +2997,27 @@ Project Search - + Recherche dans le projet Case Sensitive - Sensible à la casse + Sensible à la casse Whole Words Only - Mots entiers uniquement + Mots entiers uniquement RegEx Mode - Expressions régulières + Mode expressions rationnelles Search for - + Rechercher @@ -3231,7 +3231,7 @@ Project Search - + Recherche dans le projet @@ -4041,34 +4041,34 @@ _DetailsWidget - + Setting Paramètre - + Value Valeur - + Name Nom - + Selection Sélection - + Title Titre - + Hidden - Caché + Caché @@ -4209,21 +4209,21 @@ Additional Styling - + Styles supplémentaires Centre - + Centrer Page Break - Saut de page + Saut de page @@ -4329,17 +4329,17 @@ Sélectionner le dossier du projet - + Fresh Project Nouveau projet - + Example Project Projet d'exemple - + Template: {0} Modèle : {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Appuyez sur le bouton "Aperçu" pour générer... - + Processing ... Traitement en cours... - + Done Terminé - + Unknown Inconnu - + Built Compilé @@ -4481,7 +4481,7 @@ Text Auto-Replace for Preview and Build - Remplacements automatiques de texte pour la prévisualisation et la compilation + Remplacements automatiques de texte pour l'aperçu et la compilation @@ -4522,20 +4522,20 @@ Auteur(s) - + Only used when building the manuscript. Utilisé uniquement lors de la compilation du manuscrit. - + Project language Langue du projet Default - Défauts + Langue par défaut @@ -4557,61 +4557,61 @@ _StatsWidget - - + + Words - Mots + Mots - - + + Characters - Caractères + Signes, espaces compris - + Words in Headings - + Mots dans les titres - + Words in Text - + Mots dans le texte - + Headings - En-têtes + Titres - + Paragraphs - Paragraphes + Paragraphes - + Characters in Headings - + Signes dans les titres - + Characters in Text - + Signes dans le texte - + Characters, No Spaces - + Signes, espaces exclus - + Characters in Headings, No Spaces - + Signes dans les titres, espaces exclus - + Characters in Text, No Spaces - + Signes dans le texte, espaces exclus @@ -4771,7 +4771,7 @@ Split Document by Headings - + Découper le document selon les titres @@ -4786,7 +4786,7 @@ Duplicate - + Dupliquer diff --git a/i18n/nw_it_IT.ts b/i18n/nw_it_IT.ts index 15e7c409..dd94092b 100644 --- a/i18n/nw_it_IT.ts +++ b/i18n/nw_it_IT.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Impostazioni - + Value Valore - + Name Nome - + Selection Selezione - + Title Titolo - + Hidden Nascosto @@ -4329,17 +4329,17 @@ Seleziona la cartella del progetto - + Fresh Project Nuovo progetto - + Example Project Progetto di esempio - + Template: {0} Modello: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Premi il tasto "Anteprima" per compilarla ... - + Processing ... In elaborazione ... - + Done Fatto - + Unknown Sconosciuto - + Built Realizzata @@ -4522,13 +4522,13 @@ Autore(i) - + Only used when building the manuscript. Usato solo durante la costruzione del manoscritto. - + Project language Lingua del progetto @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Parole - - + + Characters Caratteri - + Words in Headings Parole nelle intestazioni - + Words in Text Parole nel testo - + Headings Intestazioni - + Paragraphs Paragrafi - + Characters in Headings Caratteri nelle intestazioni - + Characters in Text Caratteri nel testo - + Characters, No Spaces Caratteri, esclusi gli spazi - + Characters in Headings, No Spaces Caratteri nelle intestazioni, esclusi gli spazi - + Characters in Text, No Spaces Caratteri nel testo, esclusi gli spazi diff --git a/i18n/nw_ja_JP.ts b/i18n/nw_ja_JP.ts index 0abdc800..e15b2098 100644 --- a/i18n/nw_ja_JP.ts +++ b/i18n/nw_ja_JP.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting 設定 - + Value - + Name 名前 - + Selection 選択 - + Title タイトル - + Hidden 非表示 @@ -4329,17 +4329,17 @@ プロジェクトフォルダーを選択 - + Fresh Project 新鮮なプロジェクト - + Example Project サンプルプロジェクト - + Template: {0} テンプレート: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... "プレビュー" ボタンを押して生成します ... - + Processing ... 処理中… - + Done 完了 - + Unknown 不明 - + Built ビルドされた @@ -4522,13 +4522,13 @@ 著者 - + Only used when building the manuscript. 原稿の作成時にのみ使用されます。 - + Project language プロジェクトの言語 @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words 単語数 - - + + Characters 文字数 - + Words in Headings 見出し内の単語数 - + Words in Text テキスト内の単語数 - + Headings 見出し - + Paragraphs 段落 - + Characters in Headings 見出し内の文字数 - + Characters in Text テキスト内の文字数 - + Characters, No Spaces スペースなし文字数 - + Characters in Headings, No Spaces 見出し内のスペースなし文字数 - + Characters in Text, No Spaces テキスト内のスペースなし文字数 diff --git a/i18n/nw_nb_NO.ts b/i18n/nw_nb_NO.ts index aaab9314..ecefeaae 100644 --- a/i18n/nw_nb_NO.ts +++ b/i18n/nw_nb_NO.ts @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Innstilling - + Value Verdi - + Name Navn - + Selection Utvalg - + Title Tittel - + Hidden Skjult @@ -4329,17 +4329,17 @@ Velg prosjektmappe - + Fresh Project Nytt prosjekt - + Example Project Eksempelprosjekt - + Template: {0} Mal: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Trykk på "Forhåndsvisning"-knappen for å generere ... - + Processing ... Behandler ... - + Done Ferdig - + Unknown Ukjent - + Built Bygget @@ -4522,13 +4522,13 @@ Forfatter(e) - + Only used when building the manuscript. Brukes kun ved bygging av manuskript. - + Project language Prosjektets språk @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Ord - - + + Characters Tegn - + Words in Headings Ord i overskrifter - + Words in Text Ord i tekst - + Headings Overskrifter - + Paragraphs Avsnitt - + Characters in Headings Tegn i overskrifter - + Characters in Text Tegn i tekst - + Characters, No Spaces Tegn, utenom mellomrom - + Characters in Headings, No Spaces Tegn i overskrifter, utenom mellomrom - + Characters in Text, No Spaces Tegn i tekst, utenom mellomrom From 52ffa0b675f7ff4059a13d3e380884e1efaecc12 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:54:50 +0200 Subject: [PATCH 02/13] Add a job to build i18n file --- .github/workflows/i18n.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/i18n.yml diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml new file mode 100644 index 00000000..9f511c94 --- /dev/null +++ b/.github/workflows/i18n.yml @@ -0,0 +1,32 @@ +name: Build + +on: + pull_request: + branches: + - i18n/* + +jobs: + buildI18n: + runs-on: ubuntu-latest + steps: + - name: Python Setup + uses: actions/setup-python@v5 + with: + python-version: "3.11" + architecture: x64 + - name: Install Packages (apt) + run: | + sudo apt update + sudo apt install qttools5-dev-tools + - name: Checkout Source + uses: actions/checkout@v4 + - name: Build Assets + run: python pkgutils.py qtlrelease + - name: Upload Artifacts + uses: actions/upload-artifact@v4 + with: + name: nw-i18n + path: | + novelwriter/assets/i18n/*.qm + if-no-files-found: error + retention-days: 7 From 6f3a11ade363076f5ff03982be7922bd405e229f Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:57:51 +0200 Subject: [PATCH 03/13] Change job condition --- .github/workflows/i18n.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 9f511c94..7f209958 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -1,7 +1,7 @@ name: Build on: - pull_request: + push: branches: - i18n/* From d304c0919fb5cba3a40106ec911e3343c06864cc Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 13 Apr 2024 19:59:28 +0200 Subject: [PATCH 04/13] Change job name --- .github/workflows/i18n.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/i18n.yml b/.github/workflows/i18n.yml index 7f209958..71bff9a3 100644 --- a/.github/workflows/i18n.yml +++ b/.github/workflows/i18n.yml @@ -1,4 +1,4 @@ -name: Build +name: i18n on: push: From 99ec268dd9db8e8c1c18dce498999ac6452f3aa8 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 16:36:21 +0200 Subject: [PATCH 05/13] Increase the icon size of outline toolbar --- novelwriter/gui/outline.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/novelwriter/gui/outline.py b/novelwriter/gui/outline.py index 4ed2679f..a4f92107 100644 --- a/novelwriter/gui/outline.py +++ b/novelwriter/gui/outline.py @@ -209,11 +209,8 @@ class GuiOutlineToolBar(QToolBar): logger.debug("Create: GuiOutlineToolBar") - iSz = SHARED.theme.baseIconSize - mPx = CONFIG.pxInt(12) - self.setMovable(False) - self.setIconSize(iSz) + self.setIconSize(1.4*SHARED.theme.baseIconSize) self.setContentsMargins(0, 0, 0, 0) stretch = QWidget(self) @@ -221,7 +218,7 @@ class GuiOutlineToolBar(QToolBar): # Novel Selector self.novelLabel = QLabel(self.tr("Outline of"), self) - self.novelLabel.setContentsMargins(0, 0, mPx, 0) + self.novelLabel.setContentsMargins(0, 0, CONFIG.pxInt(12), 0) self.novelValue = NovelSelector(self) self.novelValue.setIncludeAll(True) From 52b27b6e56eb11485b48579fe469ecb6a70455b4 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 16:42:46 +0200 Subject: [PATCH 06/13] Increase toolbar label font size in outline --- novelwriter/gui/outline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/novelwriter/gui/outline.py b/novelwriter/gui/outline.py index a4f92107..0696472f 100644 --- a/novelwriter/gui/outline.py +++ b/novelwriter/gui/outline.py @@ -47,6 +47,7 @@ from novelwriter.enum import ( from novelwriter.error import logException from novelwriter.common import checkInt, formatFileFilter, makeFileNameSafe from novelwriter.constants import nwHeaders, trConst, nwKeyWords, nwLabels +from novelwriter.extensions.configlayout import NColourLabel from novelwriter.extensions.novelselector import NovelSelector from novelwriter.types import ( QtAlignLeftTop, QtAlignRight, QtAlignRightTop, QtDecoration, QtUserRole @@ -217,7 +218,9 @@ class GuiOutlineToolBar(QToolBar): stretch.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) # Novel Selector - self.novelLabel = QLabel(self.tr("Outline of"), self) + self.novelLabel = NColourLabel( + self.tr("Outline of"), parent=self, scale=NColourLabel.HEADER_SCALE, bold=True + ) self.novelLabel.setContentsMargins(0, 0, CONFIG.pxInt(12), 0) self.novelValue = NovelSelector(self) From f23164a17b21278589bb01df3c88b84445240277 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:39:52 +0200 Subject: [PATCH 07/13] Disable spell checking for shortcodes --- novelwriter/gui/dochighlight.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/novelwriter/gui/dochighlight.py b/novelwriter/gui/dochighlight.py index c81291cf..3e184d72 100644 --- a/novelwriter/gui/dochighlight.py +++ b/novelwriter/gui/dochighlight.py @@ -44,6 +44,10 @@ logger = logging.getLogger(__name__) SPELLRX = QRegularExpression(r"\b[^\s\-\+\/–—\[\]:]+\b") SPELLRX.setPatternOptions(QRegularExpression.UseUnicodePropertiesOption) +SPELLSC = QRegularExpression(nwRegEx.FMT_SC) +SPELLSC.setPatternOptions(QRegularExpression.UseUnicodePropertiesOption) +SPELLSV = QRegularExpression(nwRegEx.FMT_SV) +SPELLSV.setPatternOptions(QRegularExpression.UseUnicodePropertiesOption) BLOCK_NONE = 0 BLOCK_TEXT = 1 @@ -439,6 +443,17 @@ class TextBlockData(QTextBlockUserData): """Run the spell checker and cache the result, and return the list of spell check errors. """ + if "[" in text: + # Strip shortcodes + for rX in [SPELLSC, SPELLSV]: + rxItt = rX.globalMatch(text, 0) + while rxItt.hasNext(): + rxMatch = rxItt.next() + xPos = rxMatch.capturedStart(0) + xLen = rxMatch.capturedLength(0) + xEnd = rxMatch.capturedEnd(0) + text = text[:xPos] + " "*xLen + text[xEnd:] + self._spellErrors = [] rxSpell = SPELLRX.globalMatch(text.replace("_", " "), 0) while rxSpell.hasNext(): From 35563373a62b05f66c1872d90da58aab570764ab Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:40:19 +0200 Subject: [PATCH 08/13] Annotated regex rules in highlighting and add to slots --- novelwriter/gui/dochighlight.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/novelwriter/gui/dochighlight.py b/novelwriter/gui/dochighlight.py index 3e184d72..d9919bb9 100644 --- a/novelwriter/gui/dochighlight.py +++ b/novelwriter/gui/dochighlight.py @@ -57,7 +57,8 @@ BLOCK_TITLE = 4 class GuiDocHighlighter(QSyntaxHighlighter): - __slots__ = ("_tItem", "_tHandle", "_spellCheck", "_spellErr", "_hRules", "_hStyles") + __slots__ = ("_tHandle", "_isInactive", "_spellCheck", "_spellErr", + "_hRules", "_hStyles", "_rxRules") def __init__(self, document: QTextDocument) -> None: super().__init__(document) @@ -71,6 +72,7 @@ class GuiDocHighlighter(QSyntaxHighlighter): self._hRules: list[tuple[str, dict]] = [] self._hStyles: dict[str, QTextCharFormat] = {} + self._rxRules: list[tuple[QRegularExpression, dict[str, QTextCharFormat]]] = [] self.initHighlighter() @@ -222,11 +224,11 @@ class GuiDocHighlighter(QSyntaxHighlighter): )) # Build a QRegExp for each highlight pattern - self.rxRules = [] + self._rxRules = [] for regEx, regRules in self._hRules: hReg = QRegularExpression(regEx) hReg.setPatternOptions(QRegularExpression.UseUnicodePropertiesOption) - self.rxRules.append((hReg, regRules)) + self._rxRules.append((hReg, regRules)) return @@ -362,7 +364,7 @@ class GuiDocHighlighter(QSyntaxHighlighter): # Regular Text self.setCurrentBlockState(BLOCK_TEXT) - for rX, xFmt in self.rxRules: + for rX, xFmt in self._rxRules: rxItt = rX.globalMatch(text, 0) while rxItt.hasNext(): rxMatch = rxItt.next() From 8cfeb2ce7d013a8bc5ab4626d8d7b4ce3b9cf533 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sun, 14 Apr 2024 23:47:46 +0200 Subject: [PATCH 09/13] Add test coverage of shortcode spell checking --- tests/reference/guiEditor_Main_Final_0000000000011.nwd | 6 +++--- tests/reference/guiEditor_Main_Final_nwProject.nwx | 4 ++-- tests/test_gui/test_gui_guimain.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/reference/guiEditor_Main_Final_0000000000011.nwd b/tests/reference/guiEditor_Main_Final_0000000000011.nwd index ed7002ab..bd73dfd8 100644 --- a/tests/reference/guiEditor_Main_Final_0000000000011.nwd +++ b/tests/reference/guiEditor_Main_Final_0000000000011.nwd @@ -1,10 +1,10 @@ %%~name: New Note %%~path: 0000000000009/0000000000011 %%~kind: PLOT/NOTE -%%~hash: 8ff26f8a18ad6390c2ce725c441ab0c792a125cf -%%~date: 2023-08-25 18:15:35/2023-08-25 18:15:35 +%%~hash: 3d3697638a70fc86cc023df6d42202a262d93905 +%%~date: 2024-04-14 23:46:49/2024-04-14 23:46:49 # Main Plot @tag: MainPlot -This is a file detailing the main plot. +This is a file [i]detailing[/i] the main plot. diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index c3ee941f..75a5d460 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -1,5 +1,5 @@ - + New Project Jane Doe @@ -54,7 +54,7 @@ Plot - + New Note diff --git a/tests/test_gui/test_gui_guimain.py b/tests/test_gui/test_gui_guimain.py index 4de04a95..dc6ffcfc 100644 --- a/tests/test_gui/test_gui_guimain.py +++ b/tests/test_gui/test_gui_guimain.py @@ -274,7 +274,7 @@ def testGuiMain_Editing(qtbot, monkeypatch, nwGUI, projPath, tstPaths, mockRnd): qtbot.keyClick(docEditor, c, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY) - for c in "This is a file detailing the main plot.": + for c in "This is a file [i]detailing[/i] the main plot.": qtbot.keyClick(docEditor, c, delay=KEY_DELAY) qtbot.keyClick(docEditor, Qt.Key_Return, delay=KEY_DELAY) From 466eb65a44a4e9be1c27a62ea79fe5deb80abbcc Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:15:39 +0200 Subject: [PATCH 10/13] Add setup.cfg back for old Ubuntu LTSes --- pkgutils.py | 26 ++++++++++++++------- setup/launchpad_setup.cfg | 48 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 8 deletions(-) create mode 100644 setup/launchpad_setup.cfg diff --git a/pkgutils.py b/pkgutils.py index 9d51551d..cd262f2c 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -675,8 +675,10 @@ def makeMinimalPackage(targetOS: int) -> None: # Make Debian Package (build-deb) ## -def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False, - distName: str = "unstable", buildName: str = "") -> str: +def makeDebianPackage( + signKey: str | None = None, sourceBuild: bool = False, + distName: str = "unstable", buildName: str = "", oldSetuptools: bool = False +) -> str: """Build a Debian package.""" print("") print("Build Debian Package") @@ -784,6 +786,13 @@ def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False, writeFile(f"{outDir}/pyproject.toml", setupCfg) print("Wrote: pyproject.toml") + if oldSetuptools: + setupCfg = readFile("setup/launchpad_setup.cfg").replace( + "file: setup/description_pypi.md", "file: data/description_short.txt" + ) + writeFile(f"{outDir}/setup.cfg", setupCfg) + print("Wrote: setup.cfg") + # Copy/Write Debian Files # ======================= @@ -860,10 +869,10 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None: bldNum = "0" distLoop = [ - ("20.04", "focal"), - ("22.04", "jammy"), - ("23.10", "mantic"), - ("24.04", "noble"), + ("20.04", "focal", True), + ("22.04", "jammy", True), + ("23.10", "mantic", False), + ("24.04", "noble", False), ] print("Building Ubuntu packages for:") @@ -881,13 +890,14 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None: print("") dputCmd = [] - for distNum, codeName in distLoop: + for distNum, codeName, oldSetup in distLoop: buildName = f"ubuntu{distNum}.{bldNum}" dCmd = makeDebianPackage( signKey=signKey, sourceBuild=True, distName=codeName, - buildName=buildName + buildName=buildName, + oldSetuptools=oldSetup, ) dputCmd.append(dCmd) diff --git a/setup/launchpad_setup.cfg b/setup/launchpad_setup.cfg new file mode 100644 index 00000000..df0af65a --- /dev/null +++ b/setup/launchpad_setup.cfg @@ -0,0 +1,48 @@ +[metadata] +name = novelWriter +version = attr: novelwriter.__version__ +author = Veronica Berglyd Olsen +author_email = code@vkbo.net +description = A markdown-like text editor for planning and writing novels +url = https://novelwriter.io +long_description = file: setup/description_pypi.md +long_description_content_type = text/markdown +license_files = LICENSE.md +license = GNU General Public License v3 +classifiers = + Programming Language :: Python :: 3 :: Only + Programming Language :: Python :: 3.8 + Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 + Programming Language :: Python :: 3.12 + Programming Language :: Python :: Implementation :: CPython + License :: OSI Approved :: GNU General Public License v3 (GPLv3) + Development Status :: 5 - Production/Stable + Operating System :: OS Independent + Intended Audience :: End Users/Desktop + Natural Language :: English + Topic :: Text Editors +project_urls = + Bug Tracker = https://github.com/vkbo/novelWriter/issues + Documentation = https://docs.novelwriter.io + Source Code = https://github.com/vkbo/novelWriter + +[options] +zip_safe = False +python_requires = >=3.8 +include_package_data = True +packages = find_namespace: +install_requires = + pyqt5>=5.10 + pyenchant>=3.0.0 + +[options.packages.find] +include = novelwriter* + +[options.entry_points] +gui_scripts = + novelwriter = novelwriter:main + +[bdist_wheel] +universal = 0 From 175b6747ea0c2c110a49c3e3f9fba4aaf892471d Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Tue, 16 Apr 2024 23:33:13 +0200 Subject: [PATCH 11/13] Fix build errors --- pkgutils.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/pkgutils.py b/pkgutils.py index cd262f2c..19152c41 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -780,19 +780,28 @@ def makeDebianPackage( )) print("Wrote: setup.py") - setupCfg = readFile("pyproject.toml").replace( - "setup/description_pypi.md", "data/description_short.txt" - ) - writeFile(f"{outDir}/pyproject.toml", setupCfg) - print("Wrote: pyproject.toml") - if oldSetuptools: + # This is needed for Ubuntu up to 22.04 setupCfg = readFile("setup/launchpad_setup.cfg").replace( "file: setup/description_pypi.md", "file: data/description_short.txt" ) writeFile(f"{outDir}/setup.cfg", setupCfg) print("Wrote: setup.cfg") + writeFile(f"{outDir}/pyproject.toml", ( + "[build-system]\n" + "requires = [\"setuptools\"]\n" + "build-backend = \"setuptools.build_meta\"\n" + )) + print("Wrote: pyproject.toml") + + else: + pyProject = readFile("pyproject.toml").replace( + "setup/description_pypi.md", "data/description_short.txt" + ) + writeFile(f"{outDir}/pyproject.toml", pyProject) + print("Wrote: pyproject.toml") + # Copy/Write Debian Files # ======================= @@ -877,7 +886,7 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None: print("Building Ubuntu packages for:") print("") - for distNum, codeName in distLoop: + for distNum, codeName, _ in distLoop: print(f" * Ubuntu {distNum} {codeName.title()}") print("") From 30acf11055cbbdfc8fb56c1a280a7f91b129abe1 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Apr 2024 14:58:42 +0200 Subject: [PATCH 12/13] Update German translation and refresh other files --- i18n/nw_de_DE.ts | 280 +++++++++++++++++++++++------------------------ i18n/nw_nl_NL.ts | 166 ++++++++++++++-------------- i18n/nw_pt_BR.ts | 166 ++++++++++++++-------------- i18n/nw_zh_CN.ts | 166 ++++++++++++++-------------- 4 files changed, 389 insertions(+), 389 deletions(-) diff --git a/i18n/nw_de_DE.ts b/i18n/nw_de_DE.ts index 8c30b7dd..2bbb70aa 100644 --- a/i18n/nw_de_DE.ts +++ b/i18n/nw_de_DE.ts @@ -31,32 +31,32 @@ Partition Format - + Teil Chapter Format - + Kapitel Unnumbered Format - + Kapitel (Unnummeriert) Scene Format - + Szene - Hard Scene Format - + Alt. Scene Format + Szene (Variante) Section Format - + Abschnitt @@ -86,7 +86,7 @@ Ignore These Keywords - + Diese Schlagwörter ignorieren @@ -206,17 +206,17 @@ First Line Indent - + Erste Zeile einrücken Markdown (.md) - + Markdown (.md) Preserve Hard Line Breaks - + Harte Zeilenumbrüche behalten @@ -231,7 +231,7 @@ Preserve Tab Characters - + Tabs behalten @@ -791,22 +791,22 @@ GuiDocEditFooter - + Line: {0} ({1}) Zeile: {0} ({1}) - + Words: {0} ({1}) Wörter: {0} ({1}) - + Words: {0} selected Wörter: {0} markiert - + Status Status @@ -814,27 +814,27 @@ GuiDocEditHeader - + Toggle Tool Bar Werkzeugleiste ein/aus - + Outline - + Gliederung - + Search Suche - + Toggle Focus Mode Ablenkungsfrei ein/aus - + Close Schließen @@ -842,62 +842,62 @@ GuiDocEditSearch - + Search for - + Suchen nach - + Replace with - + Ersetzen durch - + Search Suchen - + Case Sensitive Groß-/Kleinschreibung beachten - + Whole Words Only Nur ganze Wörter - + RegEx Mode RegEx-Modus - + Loop Search Suche am Anfang fortsetzen - + Search Next File Nächstes Dokument durchsuchen - + Preserve Case Groß-/Kleinschreibung beibehalten - + Close Search Suche schließen - + Find in current document Im geöffneten Dokument suchen - + Find and replace in current document Im geöffneten Dokument suchen und ersetzen @@ -920,107 +920,107 @@ Dokument konnte nicht gespeichert werden. - + Saved Document: {0} Dokument gespeichert: {0} - + Spell checking requires the package PyEnchant. It does not appear to be installed. Die Rechtschreibprüfung erfordert das Paket PyEnchant. Es scheint nicht installiert zu sein. - + Spell check complete Rechtschreibprüfung abgeschlossen - + Document Details Details - + Created: {0} Erstellt: {0} - + Updated: {0} Aktualisiert: {0} - + File Location: {0} Dateispeicherort: {0} - + Set as Document Name Als Dokumentname verwenden - + Follow Tag Schlagwort öffnen - + Create Note for Tag Notiz für Schlagwort erstellen - + Cut Ausschneiden - + Copy Kopieren - + Paste Einfügen - + Select All Alles markieren - + Select Word Wort markieren - + Select Paragraph Absatz markieren - + Spelling Suggestion(s) Korrekturvorschläge - + No Suggestions Keine Vorschläge - + Add Word to Dictionary Zum Wörterbuch hinzufügen - + Please select some text before calling replace quotes. Bitte markieren Sie den Text, in dem die Anführungszeichen ersetzt werden sollen. - + Do you want to create a new project note for the tag '{0}'? Möchten Sie für das Schlagwort „{0}“ eine neue Projektnotiz erstellen? @@ -1058,7 +1058,7 @@ Document Headings - + Überschriften im Dokument @@ -1068,22 +1068,22 @@ Split on Heading Level 1 (Partition) - + Teilen bei Ebene 1 (Teil) Split up to Heading Level 2 (Chapter) - + Teilen bei Ebene 2 (Kapitel) Split up to Heading Level 3 (Scene) - + Teilen bei Ebene 3 (Szene) Split up to Heading Level 4 (Section) - + Teilen bei Ebene 4 (Abschnitt) @@ -1104,52 +1104,52 @@ GuiDocToolBar - + Markdown Bold Fett mit Markdown - + Markdown Italic Kursiv mit Markdown - + Markdown Strikethrough Durchgestrichen mit Markdown - + Shortcode Bold Fett mit Shortcode - + Shortcode Italic Kursiv mit Shortcode - + Shortcode Strikethrough Durchgestrichen mit Shortcode - + Shortcode Underline Unterstrichen mit Shortcode - + Shortcode Highlight - + Hervorheben mit Shortcode - + Shortcode Superscript Hochgestellt mit Shortcode - + Shortcode Subscript Tiefgestellt mit Shortcode @@ -1187,7 +1187,7 @@ Outline - + Gliederung @@ -1854,7 +1854,7 @@ Highlight - + Hervorheben @@ -1869,22 +1869,22 @@ Heading 1 (Partition) - + Überschrift 1 (Teil) Heading 2 (Chapter) - + Überschrift 2 (Kapitel) Heading 3 (Scene) - + Überschrift 3 (Szene) Heading 4 (Section) - + Überschrift 4 (Abschnitt) @@ -1898,8 +1898,8 @@ - Hard Scene - + Alternative Scene + Szene (Variante) @@ -1944,12 +1944,12 @@ Replace Straight Single Quotes - + Einfache gerade Anführungszeichen ersetzen Replace Straight Double Quotes - + Doppelte gerade Anführungszeichen ersetzen @@ -1974,12 +1974,12 @@ Find Next - Nächste Fundstelle + Nächstes Suchergebnis Find Previous - Vorherige Fundstelle + Vorheriges Suchergebnis @@ -1989,7 +1989,7 @@ Find in Project - + Im Projekt suchen @@ -2161,12 +2161,12 @@ Details - + Details Outline - + Gliederung @@ -2997,27 +2997,27 @@ Project Search - + Projektsuche Case Sensitive - Groß-/Kleinschreibung beachten + Groß-/Kleinschreibung beachten Whole Words Only - Nur ganze Wörter + Nur ganze Wörter RegEx Mode - RegEx-Modus + RegEx-Modus Search for - + Suchen nach @@ -3231,7 +3231,7 @@ Project Search - + Projektsuche @@ -4041,34 +4041,34 @@ _DetailsWidget - + Setting Einstellung - + Value Wert - + Name Name - + Selection Auswahl - + Title Titel - + Hidden - Ausblenden + Ausgeblendet @@ -4209,21 +4209,21 @@ Additional Styling - + Zusätzliche Formatierung Centre - + Zentriert Page Break - Seitenumbruch + Seitenumbruch @@ -4329,17 +4329,17 @@ Speicherort wählen - + Fresh Project Neues Projekt - + Example Project Beispielprojekt - + Template: {0} Vorlage: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Zum Generieren den "Vorschau"-Button anklicken ... - + Processing ... In Bearbeitung ... - + Done Fertig - + Unknown Unbekannt - + Built Erstellt @@ -4522,13 +4522,13 @@ Autor(en) - + Only used when building the manuscript. Wird nur beim Manuskript-Build verwendet. - + Project language Projektsprache @@ -4557,61 +4557,61 @@ _StatsWidget - - + + Words - Wörter + Wörter - - + + Characters - Zeichen + Zeichen - + Words in Headings - + Wörter in Überschriften - + Words in Text - + Wörter im Text - + Headings - Überschriften + Überschriften - + Paragraphs - Absätze + Absätze - + Characters in Headings - + Zeichen in Überschriften - + Characters in Text - + Zeichen im Text - + Characters, No Spaces - + Zeichen ohne Leerzeichen - + Characters in Headings, No Spaces - + Zeichen in Überschriften ohne Leerzeichen - + Characters in Text, No Spaces - + Zeichen im Text ohne Leerzeichen @@ -4771,7 +4771,7 @@ Split Document by Headings - + Dokument nach Überschriften aufteilen @@ -4786,7 +4786,7 @@ Duplicate - + Duplizieren diff --git a/i18n/nw_nl_NL.ts b/i18n/nw_nl_NL.ts index 5b913a16..1e6ddef9 100644 --- a/i18n/nw_nl_NL.ts +++ b/i18n/nw_nl_NL.ts @@ -50,7 +50,7 @@ - Hard Scene Format + Alt. Scene Format @@ -791,22 +791,22 @@ GuiDocEditFooter - + Line: {0} ({1}) Regel: {0} ({1}) - + Words: {0} ({1}) Woorden: {0} ({1}) - + Words: {0} selected Woorden: {0} geselecteerd - + Status Status @@ -814,27 +814,27 @@ GuiDocEditHeader - + Toggle Tool Bar Toon/verberg werkbalk - + Outline - + Search Zoek - + Toggle Focus Mode Schakel focus modus in/uit - + Close Sluiten @@ -842,62 +842,62 @@ GuiDocEditSearch - + Search for - + Replace with - + Search Zoek - + Case Sensitive Hoofdlettergevoelig - + Whole Words Only Alleen hele woorden - + RegEx Mode RegEx modus - + Loop Search Zoekopdracht lus - + Search Next File Doorzoek volgend bestand - + Preserve Case Behoud hoofd/kleine letters - + Close Search Zoekopdracht afsluiten - + Find in current document Zoeken in huidige document - + Find and replace in current document Zoek en vervang in huidig document @@ -920,107 +920,107 @@ Kon document niet opslaan. - + Saved Document: {0} Document opgeslagen: {0} - + Spell checking requires the package PyEnchant. It does not appear to be installed. Spellingscontrole vereist het pakket PyEnchant. Het lijkt niet geïnstalleerd te zijn. - + Spell check complete Spellingscontrole compleet - + Document Details Document details - + Created: {0} Aangemaakt: {0} - + Updated: {0} Bijgewerkt: {0} - + File Location: {0} Bestandslocatie: {0} - + Set as Document Name Instellen als documentnaam - + Follow Tag Volg label - + Create Note for Tag Creëer notitie voor label - + Cut Knippen - + Copy Kopiëren - + Paste Plakken - + Select All Selecteer alles - + Select Word Selecteer woord - + Select Paragraph Selecteer paragraaf - + Spelling Suggestion(s) Spelling suggestie(s) - + No Suggestions Geen suggesties - + Add Word to Dictionary Woord toevoegen aan woordenboek - + Please select some text before calling replace quotes. Selecteer a.u.b. een tekst voordat u vervang aanhalingstekens aanroept. - + Do you want to create a new project note for the tag '{0}'? Wilt u een nieuwe project notitie maken voor het label '{0}'? @@ -1104,52 +1104,52 @@ GuiDocToolBar - + Markdown Bold Markdown vet - + Markdown Italic Markdown cursief - + Markdown Strikethrough Markdown doorstrepen - + Shortcode Bold Korte code vet - + Shortcode Italic Korte code cursief - + Shortcode Strikethrough Korte code doorstrepen - + Shortcode Underline Korte code onderstrepen - + Shortcode Highlight - + Shortcode Superscript Korte code superscript - + Shortcode Subscript Korte code subscript @@ -1898,7 +1898,7 @@ - Hard Scene + Alternative Scene @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Instelling - + Value Waarde - + Name Naam - + Selection Selectie - + Title Titel - + Hidden Verborgen @@ -4329,17 +4329,17 @@ Selecteer Projectmap - + Fresh Project Nieuw project - + Example Project Voorbeeld project - + Template: {0} Sjabloon: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Druk op de knop "Preview" om te genereren... - + Processing ... Wordt verwerkt... - + Done Gereed - + Unknown Onbekend - + Built Gebouwd @@ -4522,13 +4522,13 @@ Auteur(s) - + Only used when building the manuscript. Wordt alleen gebruikt bij het bouwen van het manuscript. - + Project language Project taal @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Woorden - - + + Characters Tekens - + Words in Headings - + Words in Text - + Headings Koppen - + Paragraphs Paragrafen - + Characters in Headings - + Characters in Text - + Characters, No Spaces - + Characters in Headings, No Spaces - + Characters in Text, No Spaces diff --git a/i18n/nw_pt_BR.ts b/i18n/nw_pt_BR.ts index 79da50a6..423916a7 100644 --- a/i18n/nw_pt_BR.ts +++ b/i18n/nw_pt_BR.ts @@ -50,7 +50,7 @@ - Hard Scene Format + Alt. Scene Format @@ -791,22 +791,22 @@ GuiDocEditFooter - + Line: {0} ({1}) Linha: {0} ({1}) - + Words: {0} ({1}) Palavras: {0} ({1}) - + Words: {0} selected Palavras: {0} selecionadas - + Status Estado @@ -814,27 +814,27 @@ GuiDocEditHeader - + Toggle Tool Bar - + Outline Esboço - + Search Pesquisa - + Toggle Focus Mode Alternar o "Modo Foco" - + Close Fechar @@ -842,62 +842,62 @@ GuiDocEditSearch - + Search for - + Replace with - + Search Pesquisa - + Case Sensitive Diferenciar Maiúsculas e Minúsculas - + Whole Words Only Apenas Palavras Inteiras - + RegEx Mode Expressão Regular - + Loop Search Pesquisa do Início - + Search Next File Busca no Próximo Arquivo - + Preserve Case Preserva Maiúsculas e Minúsculas - + Close Search Fechar a Busca - + Find in current document Encontrar no documento atual - + Find and replace in current document Encontrar e substituir no documento atual @@ -920,107 +920,107 @@ Não foi possível salvar o documento. - + Saved Document: {0} Documento Salvo: {0} - + Spell checking requires the package PyEnchant. It does not appear to be installed. A verificação ortográfica requer o pacote PyEnchant. Ele parece não estar instalado. - + Spell check complete Verificação ortográfica completa - + Document Details Detalhes do Documento - + Created: {0} Criado em: {0} - + Updated: {0} Atualizado em: {0} - + File Location: {0} Caminho do Arquivo: {0} - + Set as Document Name - + Follow Tag Seguir Etiqueta - + Create Note for Tag - + Cut Recortar - + Copy Copiar - + Paste Colar - + Select All Selecionar Tudo - + Select Word Selecionar Palavra - + Select Paragraph Selecionar Parágrafo - + Spelling Suggestion(s) Sugestão de Ortografia - + No Suggestions Sem Sugestões - + Add Word to Dictionary Adicionar Palavra ao Dicionário - + Please select some text before calling replace quotes. Por favor, selecione algum texto antes de invocar a substituição de aspas. - + Do you want to create a new project note for the tag '{0}'? @@ -1104,52 +1104,52 @@ GuiDocToolBar - + Markdown Bold - + Markdown Italic - + Markdown Strikethrough - + Shortcode Bold - + Shortcode Italic - + Shortcode Strikethrough - + Shortcode Underline - + Shortcode Highlight - + Shortcode Superscript - + Shortcode Subscript @@ -1898,7 +1898,7 @@ - Hard Scene + Alternative Scene @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting Configuração - + Value Valor - + Name Nome - + Selection Seleção - + Title Título - + Hidden Oculto @@ -4329,17 +4329,17 @@ Selecione o Diretório do Projeto - + Fresh Project - + Example Project - + Template: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... Clique no botão "Pré-Visualização" para gerar ... - + Processing ... Processando ... - + Done Pronto - + Unknown Desconhecido - + Built Criado @@ -4522,13 +4522,13 @@ Autor(es) - + Only used when building the manuscript. - + Project language @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words Palavras - - + + Characters Caracteres - + Words in Headings - + Words in Text - + Headings Cabeçalhos - + Paragraphs Parágrafos - + Characters in Headings - + Characters in Text - + Characters, No Spaces - + Characters in Headings, No Spaces - + Characters in Text, No Spaces diff --git a/i18n/nw_zh_CN.ts b/i18n/nw_zh_CN.ts index 3eb34177..dfc2d0d1 100644 --- a/i18n/nw_zh_CN.ts +++ b/i18n/nw_zh_CN.ts @@ -50,7 +50,7 @@ - Hard Scene Format + Alt. Scene Format @@ -791,22 +791,22 @@ GuiDocEditFooter - + Line: {0} ({1}) 行数: {0} ({1}) - + Words: {0} ({1}) 单词树: {0} ({1}) - + Words: {0} selected 单词:{0} 已选 - + Status 状态 @@ -814,27 +814,27 @@ GuiDocEditHeader - + Toggle Tool Bar 切换工具栏 - + Outline - + Search 搜索 - + Toggle Focus Mode 切换聚焦模式 - + Close 关闭 @@ -842,62 +842,62 @@ GuiDocEditSearch - + Search for - + Replace with - + Search 搜索 - + Case Sensitive 大小写敏感 - + Whole Words Only 匹配整个单词 - + RegEx Mode 正则表达式模式 - + Loop Search 循环搜索 - + Search Next File 搜索下一个文件 - + Preserve Case 保留大小写 - + Close Search 关闭搜索 - + Find in current document 在当前文档中查找 - + Find and replace in current document 在当前文档中查找和替换 @@ -920,107 +920,107 @@ 无法保存文档。 - + Saved Document: {0} 已保存文档: {0} - + Spell checking requires the package PyEnchant. It does not appear to be installed. 拼写检查需要软件包 PyEnchant。它似乎未安装。 - + Spell check complete 完成拼写检查 - + Document Details 文档详情 - + Created: {0} 已创建{0} - + Updated: {0} 已更新: {0} - + File Location: {0} 文件位置 - + Set as Document Name 设置为文档名称 - + Follow Tag 跟随标签 - + Create Note for Tag 为标签创建笔记 - + Cut 剪贴 - + Copy 复制 - + Paste 粘贴 - + Select All 全选 - + Select Word 选定单词 - + Select Paragraph 选定段落 - + Spelling Suggestion(s) 拼写建议 - + No Suggestions 无建议 - + Add Word to Dictionary 向字典中添加单词 - + Please select some text before calling replace quotes. 在替换引号之前请选择文本。 - + Do you want to create a new project note for the tag '{0}'? 您想要为标记为'{0}'创建一个新的项目说明吗? @@ -1104,52 +1104,52 @@ GuiDocToolBar - + Markdown Bold Markdown加粗 - + Markdown Italic Markdown斜体 - + Markdown Strikethrough Markdown 删除线 - + Shortcode Bold Shortcode 加粗 - + Shortcode Italic Shortcode斜体 - + Shortcode Strikethrough Shortcode删除线 - + Shortcode Underline Shortcode下划线 - + Shortcode Highlight - + Shortcode Superscript Shortcode上标 - + Shortcode Subscript Shortcode下标 @@ -1898,7 +1898,7 @@ - Hard Scene + Alternative Scene @@ -4041,32 +4041,32 @@ _DetailsWidget - + Setting 设置 - + Value - + Name 名称 - + Selection 选择 - + Title 标题 - + Hidden 隐藏 @@ -4329,17 +4329,17 @@ 选择项目文件夹 - + Fresh Project - + Example Project - + Template: {0} @@ -4438,27 +4438,27 @@ _PreviewWidget - + Press the "Preview" button to generate ... 按“预览”按钮生成... - + Processing ... 处理中... - + Done 完成 - + Unknown 未知 - + Built 创建: @@ -4522,13 +4522,13 @@ 作者 - + Only used when building the manuscript. - + Project language 项目语言 @@ -4557,59 +4557,59 @@ _StatsWidget - - + + Words 单词 - - + + Characters 人物 - + Words in Headings - + Words in Text - + Headings 标题 - + Paragraphs 段落 - + Characters in Headings - + Characters in Text - + Characters, No Spaces - + Characters in Headings, No Spaces - + Characters in Text, No Spaces From 795007f3f8831b0dfde9556316be3a65a555a177 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Apr 2024 15:25:59 +0200 Subject: [PATCH 13/13] Bump version to 2.4 and update changelog --- CHANGELOG.md | 53 +++++++++++++++++++++++++++++++++++++++++ novelwriter/__init__.py | 6 ++--- sample/nwProject.nwx | 4 ++-- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 32ca42a5..3ba5c1a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,58 @@ # novelWriter Changelog +## Version 2.4 [2024-04-20] + +### Release Notes + +This release adds a new global search feature. The tool is still relatively basic, and will likely +be extended in later releases. + +Among new text editing features is the ability to highlight text using `[m]text[/m]` shortcodes. +The code `[m]` is for "mark", which is the equivalent code in HTML. + +A second feature added for text editing is the ability to add an alternatively formatted scene +heading by adding a `!` to the markup, like for chapters and main titles. This allows to +distinguish between two scene formatting styles, `### Title` and `###! Title`, which can for +instance be used for soft and hard scene breaks. + +The **Manuscript Build** tool has also been extended with multiple new formatting options. + +See the website for complete [Release Notes](https://novelwriter.io/releases/release_2_4.html). + +### Detailed Changelog + +**Bugfixes** + +* Fixed background colour on some widgets on the new Project Search tool. PR #1800. +* Fixed a bug when using bold/italic/strike through toggle on an existing text selection in the + editor. Issue #1807. PR #1808. +* An index out of bounds error in the word counter has been fixed. It could only be triggered by a + single line only containing a ">" character. Issues #1816 and #1825. PR #1817. +* Fixed an issue where not all theme colours were completely reset before changing theme. PR #1820. +* Shortcodes are no longer passed to the spell checker. PR #1823. + +**Improvements** + +* Made placeholder text for search read as "Search for" and "Replace with". PR #1799. +* The initial count for adding chapter and scenes to new project in the Welcome dialog has been + changed to 0. The user must now select to add chapters and scenes. Issue #1811. PR #1815. + +**Documentation** + +* Updated the documentation for 2.4 features. PR #1818. + +**Internationalisation** + +* Norwegian and US English translations updated by Veronica Berglyd Olsen (@vkbo). + PRs #1799 and #1814. +* Latin American Spanish translation updated by Tommy Marplatt (@tmarplatt). PR #1814. +* Italian translation updated by Lou Cyper (loucyper1). PR #1814. +* Japanese translation updated by @hebekeg. PR #1814. +* French translation updated by Albert Aribaud (@aaribaud). PR #1821. +* German translation updated by Myian (@HeyMyian). PR #1821. + +---- + ## Version 2.4 RC 1 [2024-04-06] ### Release Notes diff --git a/novelwriter/__init__.py b/novelwriter/__init__.py index fa3ac8e2..1be878c9 100644 --- a/novelwriter/__init__.py +++ b/novelwriter/__init__.py @@ -47,9 +47,9 @@ __license__ = "GPLv3" __author__ = "Veronica Berglyd Olsen" __maintainer__ = "Veronica Berglyd Olsen" __email__ = "code@vkbo.net" -__version__ = "2.4rc1" -__hexversion__ = "0x020400c1" -__date__ = "2024-04-06" +__version__ = "2.4" +__hexversion__ = "0x020400f0" +__date__ = "2024-04-20" __status__ = "Stable" __domain__ = "novelwriter.io" diff --git a/sample/nwProject.nwx b/sample/nwProject.nwx index 24170a34..c0798672 100644 --- a/sample/nwProject.nwx +++ b/sample/nwProject.nwx @@ -1,6 +1,6 @@ - - + + Sample Project Jane Smith