From 03a80beebeebbd136b21fcb61baa0cf6a3361a0b Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 23 Apr 2021 21:34:45 +0200 Subject: [PATCH] Move tools source files to their own folder --- i18n/nw_en_US.ts | 262 +++++++++--------- i18n/nw_fr.ts | 262 +++++++++--------- i18n/nw_nb_NO.ts | 262 +++++++++--------- i18n/nw_pt.ts | 262 +++++++++--------- novelWriter.pro | 6 +- nw/gui/__init__.py | 6 - nw/guimain.py | 8 +- nw/tools/__init__.py | 11 + nw/{gui => tools}/build.py | 0 nw/{gui => tools}/projwizard.py | 0 nw/{gui => tools}/writingstats.py | 0 .../test_tools_build.py} | 6 +- .../test_tools_projwizard.py} | 11 +- .../test_tools_writingstats.py} | 6 +- 14 files changed, 553 insertions(+), 549 deletions(-) create mode 100644 nw/tools/__init__.py rename nw/{gui => tools}/build.py (100%) rename nw/{gui => tools}/projwizard.py (100%) rename nw/{gui => tools}/writingstats.py (100%) rename tests/{test_gui/test_gui_build.py => test_tools/test_tools_build.py} (98%) rename tests/{test_gui/test_gui_projwizard.py => test_tools/test_tools_projwizard.py} (96%) rename tests/{test_gui/test_gui_writingstats.py => test_tools/test_tools_writingstats.py} (99%) diff --git a/i18n/nw_en_US.ts b/i18n/nw_en_US.ts index 76b206ec..f3318731 100644 --- a/i18n/nw_en_US.ts +++ b/i18n/nw_en_US.ts @@ -432,347 +432,347 @@ GuiBuildNovel - + Build Novel Project - + Title Formats for Novel Files - + Formatting Codes: - + {0} for the title as set in the document - + {0} for chapter number (1, 2, 3) - + {0} for chapter number as a word (one, two) - + {0} for chapter number in upper case Roman - + {0} for chapter number in lower case Roman - + {0} for scene number within chapter - + {0} for scene number within novel - + Leave blank to skip this heading, or set to a static text, like for instance '{0}', to make a separator. The separator will be centred automatically and only appear between sections of the same type. Leave blank to skip this heading, or set to a static text, like for instance '{0}', to make a separator. The separator will be centered automatically and only appear between sections of the same type. - + Not Set - + Title - + Chapter - + Unnumbered - + Scene - + Section - + Language - + Font Options - + Font family - + Font size - + Line height - + Justify text - + Disable styling - + Styling Options - + Include Options - + Include synopsis - + Include comments - + Include keywords - + Include body text - + File Filter Options - + Include files with layouts other than 'Note'. - + Include files with layout 'Note'. - + Ignore the 'Include when building project' setting and include all files in the output. - + Include novel files - + Include note files - + Ignore export flag - + Export Options - + Replace tabs with spaces - + Replace Unicode in HTML - + Build Preview - + Print - + Print Preview - + Print to PDF - + Save As - + Open Document (.odt) - + Flat Open Document (.fodt) - + novelWriter HTML (.htm) - + novelWriter Markdown (.nwd) - + Standard Markdown (.md) - + GitHub Markdown (.md) - + JSON + novelWriter HTML (.json) - + JSON + novelWriter Markdown (.json) - + Close - + Failed to generate preview. The result is too big. - + There were problems when building the project - + Open Document - + Flat Open Document - + Plain HTML - + novelWriter Markdown - + Standard Markdown - + GitHub Markdown - + JSON + novelWriter HTML - + JSON + novelWriter Markdown - + PDF - + Save Document As - + Unknown format - + {0} file successfully written to: - + Failed to write {0} file. {1} @@ -780,17 +780,17 @@ GuiBuildNovelDocView - + This area will show the content of the document to be exported or printed. Press the "Build Preview" button to generate content. - + Unknown - + <b>Build Time:</b> {0} @@ -4092,142 +4092,142 @@ GuiWritingStats - + Writing Statistics - + Session Start - + Length - + Idle - + Words - + Histogram - + Sum Totals - + Total Time: - + Idle Time: - + Filtered Time: - + Novel Word Count: - + Notes Word Count: - + Total Word Count: - + Filters - + Count novel files - + Count note files - + Hide zero word count - + Hide negative word count - + Group entries by day - + Show idle time - + Word count cap for the histogram - + Save As - + JSON Data File (.json) - + CSV Data File (.csv) - + JSON Data File - + CSV Data File - + Save Data As - + Failed to read session log file. @@ -4561,42 +4561,42 @@ ProjWizardCustomPage - + Custom Project Options - + Select which additional root folders to make, and how to populate the Novel folder. If you don't want to add chapters or scenes, set the values to 0. You can add scenes without chapters. - + Additional Root Folders - + {0} folder - + Populate Novel Folder - + Add chapters - + Scenes (per chapter) - + Add chapter folders @@ -4604,27 +4604,27 @@ ProjWizardFinalPage - + Finished - + All done. - + Press '{0}' to create the new project. - + Done - + Finish @@ -4632,22 +4632,22 @@ ProjWizardFolderPage - + Select Project Folder - + Select a location to store the project. A new project folder will be created in the selected location. - + Required - + Project Path @@ -4655,47 +4655,47 @@ ProjWizardIntroPage - + Create New Project - + Provide at least a working title. The working title should not be change beyond this point as it is used by the application for generating file names for for instance backups. The other fields are optional and can be changed at any time in Project Settings. - + Side image by {0}, {1} - + Required - + Optional - + Optional. One name per line. - + Working Title - + Novel Title - + Author(s) @@ -4703,27 +4703,27 @@ ProjWizardPopulatePage - + Populate Project - + Choose how to pre-fill the project. Either with a minimal set of starter items, an example project explaining and showing many of the features, or show further custom options on the next page. - + Fill the project with a minimal set of items - + Fill the project with example files - + Show detailed options for filling the project diff --git a/i18n/nw_fr.ts b/i18n/nw_fr.ts index 592f93ba..2dfc6310 100644 --- a/i18n/nw_fr.ts +++ b/i18n/nw_fr.ts @@ -432,347 +432,347 @@ GuiBuildNovel - + Build Novel Project Construction du roman - + Title Formats for Novel Files Formats des titres pour les fichiers de roman - + Formatting Codes: Codes de mise en forme : - + {0} for the title as set in the document {0} titre tel que défini dans le document - + {0} for chapter number (1, 2, 3) {0} chapitres numérotés en chiffres arabes (1, 2, 3) - + {0} for chapter number as a word (one, two) {0} chapitres numérotés en texte (un, deux) - + {0} for chapter number in upper case Roman {0} chapitres numérotés en chiffres romains majuscules - + {0} for chapter number in lower case Roman {0} chapitres numérotés en chiffres romains minuscules - + {0} for scene number within chapter {0} scènes numérotées au niveau du chapitre - + {0} for scene number within novel {0} scènes numérotées au niveau du roman - + Leave blank to skip this heading, or set to a static text, like for instance '{0}', to make a separator. The separator will be centred automatically and only appear between sections of the same type. Laisser vide pour ignorer cet en-tête, ou mettre un texte statique, par exemple '{0}' pour créer un séparateur. Le séparateur sera centré automatiquement et n'apparaîtra qu'entre sections du même type. - + Not Set Vide - + Title Titre - + Chapter Chapitre - + Unnumbered Sans numéro - + Scene Scène - + Section Section - + Language Langue - + Font Options Option de police - + Font family Police de caractères - + Font size Taille de police - + Line height Hauteur de ligne - + Justify text Justifier le texte - + Disable styling Pas de mise en forme - + Styling Options Options de mise en forme - + Include Options Options d'inclusion - + Include synopsis Inclure le synopsis - + Include comments Inclure les commentaires - + Include keywords Inclure les mots-clés - + Include body text Inclure le corps du texte - + File Filter Options Options de filtrage - + Include files with layouts other than 'Note'. Inclure les fichiers de format autre que 'Note'. - + Include files with layout 'Note'. Inclure les fichiers de format 'Note'. - + Ignore the 'Include when building project' setting and include all files in the output. Ignorer les indications "À inclure lors de la construction du roman" et inclure tous les fichiers dans le résultat. - + Include novel files Inclure les fichiers de roman - + Include note files Inclure les fichiers de notes - + Ignore export flag Ignorer le marqueur export - + Export Options Options d'exportation - + Replace tabs with spaces Remplacer les tabulations par des espaces - + Replace Unicode in HTML Remplacer l'Unicode par du HTML - + Build Preview Construire un aperçu - + Print Imprimer - + Print Preview Imprimer l'aperçu - + Print to PDF Imprimer en PDF - + Save As Enregistrer sous - + Open Document (.odt) Open Document (.odt) - + Flat Open Document (.fodt) Flat Open Document (.fodt) - + novelWriter HTML (.htm) HTML novelWriter (.htm) - + novelWriter Markdown (.nwd) Markdown novelWriter (.nwd) - + Standard Markdown (.md) Markdown standard (.md) - + GitHub Markdown (.md) Markdown GitHub (.md) - + JSON + novelWriter HTML (.json) JSON + HTML novelWriter (.json) - + JSON + novelWriter Markdown (.json) JSON + Markdown novelWriter (.json) - + Close Fermer - + Failed to generate preview. The result is too big. L'aperçu n'a pas été créé, le résultat est trop volumineux. - + There were problems when building the project Des problèmes ont été rencontrés en construisant le projet - + Open Document Open Document - + Flat Open Document Flat Open Document - + Plain HTML HTML classique - + novelWriter Markdown Markdown novelWriter - + Standard Markdown Markdown standard - + GitHub Markdown Markdown GitHub - + JSON + novelWriter HTML JSON + HTML novelWriter - + JSON + novelWriter Markdown JSON + Markdown novelWriter - + PDF PDF - + Save Document As Enregistrer le document sous - + Unknown format Format inconnu - + {0} file successfully written to: Fichier {0} écrit dans : - + Failed to write {0} file. {1} Erreur lors de l'écriture du fichier {0}. {1} @@ -780,17 +780,17 @@ GuiBuildNovelDocView - + This area will show the content of the document to be exported or printed. Press the "Build Preview" button to generate content. Dans cette zone s'affichera le contenu du document à exporter ou à imprimer. Utilisez le bouton "Construire l'aperçu" pour générer le contenu. - + Unknown Inconnu - + <b>Build Time:</b> {0} <b>Durée de construction :</b> {0} @@ -4092,142 +4092,142 @@ GuiWritingStats - + Writing Statistics Statistiques d'écriture - + Session Start Début de session - + Length Durée - + Idle Inactif - + Words Mots - + Histogram Histogramme - + Sum Totals Totaux - + Total Time: Temps total : - + Idle Time: Temps d'inactivité : - + Filtered Time: Temps après filtrage : - + Novel Word Count: Compte de mots du texte : - + Notes Word Count: Compte de mot des notes : - + Total Word Count: Compte de mots total : - + Filters Filtres - + Count novel files Compter les fichiers du roman - + Count note files Compter les fichiers de notes - + Hide zero word count Masquer les comptes de mots à zéro - + Hide negative word count Masquer les comptes de mots négatifs - + Group entries by day Regrouper par jour - + Show idle time Montrer le temps d'inactivité - + Word count cap for the histogram Compte de mots maximum dans l'histogramme - + Save As Enregistrer sous - + JSON Data File (.json) Fichier données JSON (.json) - + CSV Data File (.csv) Fichier données CSV (.csv) - + JSON Data File Fichier données JSON - + CSV Data File Fichier données CSV - + Save Data As Enregistrer ces données sous - + Failed to read session log file. Impossible de lire le fichier log de la session. @@ -4561,42 +4561,42 @@ ProjWizardCustomPage - + Custom Project Options Options personnalisées du projet - + Select which additional root folders to make, and how to populate the Novel folder. If you don't want to add chapters or scenes, set the values to 0. You can add scenes without chapters. Choisissez quels fichiers de base créer, et comment remplir iitialement le dossier Roman. Si vous ne voulez pas ajouter de chapitres ou de scènes, mettez les nombres à 0. Vous pouvez aussi ajouter des scènes sans mettre de chapitres. - + Additional Root Folders Dossiers de base supplémentaires - + {0} folder dossier {0} - + Populate Novel Folder Remplissage initial du dossier Roman - + Add chapters Ajouter des chapitres - + Scenes (per chapter) Scènes (par chapitre) - + Add chapter folders Ajouter des dossiers Chapitre @@ -4604,27 +4604,27 @@ ProjWizardFinalPage - + Finished Terminé - + All done. Tout est prêt. - + Press '{0}' to create the new project. Appuyez sur '{0}' pour créer le nouveau projet. - + Done Terminé - + Finish Terminer @@ -4632,22 +4632,22 @@ ProjWizardFolderPage - + Select Project Folder Définir le répertoire du projet - + Select a location to store the project. A new project folder will be created in the selected location. Choisir l'endroit où sera enregistré le projet. Un nouveau répertoire sera créé pour le projet à l'endroit spécifié. - + Required Obligatoire - + Project Path Chemin d'accès @@ -4655,47 +4655,47 @@ ProjWizardIntroPage - + Create New Project Créer un nouveau projet - + Provide at least a working title. The working title should not be change beyond this point as it is used by the application for generating file names for for instance backups. The other fields are optional and can be changed at any time in Project Settings. Donnez au moins un titre de travail. Ce titre de travail ne devrait plus être modifié ensuite car il sert de référence à l'application pour la création des noms de fichier, par exemple lors des sauvegardes. Les autres champs sont optionnels et peuvent être changés ultérieurement dans les paramètres du projet. - + Side image by {0}, {1} Image latérale de {0}, {1} - + Required Obligatoire - + Optional Optionnel - + Optional. One name per line. Optionnel. Un nom par ligne. - + Working Title Titre de travail - + Novel Title Titre du roman - + Author(s) Auteur(s) @@ -4703,27 +4703,27 @@ ProjWizardPopulatePage - + Populate Project Remplissage initial - + Choose how to pre-fill the project. Either with a minimal set of starter items, an example project explaining and showing many of the features, or show further custom options on the next page. Définissez comment pré-remplir le projet: avec un jeu minimal d'éléments de base, ou bien un exemple de projet expliquant et démontrant la plupart des possibilités, ou encore des options personnalisées à définir sur la page suivante. - + Fill the project with a minimal set of items Pré-remplir le projet avec un jeu minimal d'éléments - + Fill the project with example files Pré-remplir le projet avec des fichiers d'exemple - + Show detailed options for filling the project Définir des options personnalisées pour le pré-remplissage initial diff --git a/i18n/nw_nb_NO.ts b/i18n/nw_nb_NO.ts index 931a3671..6fee09e9 100644 --- a/i18n/nw_nb_NO.ts +++ b/i18n/nw_nb_NO.ts @@ -432,347 +432,347 @@ GuiBuildNovel - + Build Novel Project Bygg prosjektet - + Title Formats for Novel Files Tittelformater - + Formatting Codes: Formatteringskoder: - + {0} for the title as set in the document {0} for tittelen slik den er definert i dokumentet - + {0} for chapter number (1, 2, 3) {0} for kapittelnummer (1, 2, 3) - + {0} for chapter number as a word (one, two) {0} for kapittelnummer (én, to, tre) - + {0} for chapter number in upper case Roman {0} for kapittelnummer i store romertall - + {0} for chapter number in lower case Roman {0} for kapittelnummer i små romertall - + {0} for scene number within chapter {0} for scenenummer innad i kapitler - + {0} for scene number within novel {0} for scenenummer innad i boken - + Leave blank to skip this heading, or set to a static text, like for instance '{0}', to make a separator. The separator will be centred automatically and only appear between sections of the same type. La feltet stå tomt for å hoppe over overskriften, eller sett til en statisk tekst, slik som for eksempel '{0}', for å lage en separator. Separatoren vil bli sentrert automatisk, og bare satt inn mellom scener av samme type. - + Title Tittel - + Chapter Kapittel - + Unnumbered Unumrert - + Scene Scene - + Section Seksjon - + Font Options Skriftvalg - + Font family Skriftfamilie - + Font size Skriftstørrelse - + Line height Linjehøyde - + Justify text Rette marger - + Disable styling Slå av styling - + Include Options Inkluderinger - + Include synopsis Inkluder sammendrag - + Include comments Inkluder kommentarer - + Include keywords Inkluder kodeord - + Include body text Inkluder tekst - + File Filter Options Fil-filtre - + Include files with layouts other than 'Note'. Inkluder filer som ikke er notater. - + Include files with layout 'Note'. Inkluder filer som er notater. - + Ignore the 'Include when building project' setting and include all files in the output. Ignorer 'ta med ved eksport'-instilling og ta med alle filer i resultatet. - + Include novel files Inkluder romanfiler - + Include note files Inkluder notatfiler - + Ignore export flag Ignorer 'ta med'-flagg - + Export Options Eksportvalg - + Replace tabs with spaces Erstatt tab med mellomrom - + Replace Unicode in HTML Erstatt Unicode med HTML - + Build Preview Lag forhåndsvisning - + Print Skriv ut - + Print Preview Forhåndsvisning av utskrift - + Print to PDF Skriv ut til PDF - + Save As Lagre som - + Open Document (.odt) - + Flat Open Document (.fodt) - + novelWriter HTML (.htm) - + novelWriter Markdown (.nwd) - + Standard Markdown (.md) - + GitHub Markdown (.md) - + JSON + novelWriter HTML (.json) - + JSON + novelWriter Markdown (.json) - + Close Lukk - + Failed to generate preview. The result is too big. Kunne ikke generere forhåndsvisning. Resultatet er for stort til å vise. - + There were problems when building the project Det har oppstått en feil under byggingen av prosjektet - + Open Document - + Flat Open Document - + Plain HTML Enkel HTML - + novelWriter Markdown - + Standard Markdown - + GitHub Markdown - + JSON + novelWriter HTML - + JSON + novelWriter Markdown - + PDF - + Save Document As Lagre dokumentet som - + Unknown format Ukjent format - + {0} file successfully written to: Lagring av {0} var vellykket, og filen ble skrevet til: - + Failed to write {0} file. {1} Misslykkes i å skrive {0} til. {1} - + Styling Options Styling - + Language Språk - + Not Set Ikke satt @@ -780,17 +780,17 @@ GuiBuildNovelDocView - + This area will show the content of the document to be exported or printed. Press the "Build Preview" button to generate content. Dette området vil vise innholdet av dokumentet som skal eksporteres. Trykk på knappen merket med "Lag forhåndsvisning" for å oppdatere innholdet. - + Unknown Ukjent - + <b>Build Time:</b> {0} <b>Generert den:</b> {0} @@ -4092,142 +4092,142 @@ GuiWritingStats - + Writing Statistics Statistikk - + Session Start Starttid - + Length Lengde - + Idle Inaktiv - + Words Ord - + Histogram - + Sum Totals Totalsummer - + Total Time: Totaltid: - + Idle Time: Inaktiv tid: - + Filtered Time: Filtrert tid: - + Novel Word Count: Ord i roman: - + Notes Word Count: Ord i notater: - + Total Word Count: Ord totalt: - + Filters Filtre - + Count novel files Tell i romanfiler - + Count note files Tell i notatfiler - + Hide zero word count Skjul null-verdier - + Hide negative word count Skjul negative verdier - + Group entries by day Samle rader per dag - + Show idle time Vis inaktiv som tid - + Word count cap for the histogram Maks antall ord for histogram - + Save As Lagre som - + JSON Data File (.json) JSON-format (.json) - + CSV Data File (.csv) CSV-format (.csv) - + JSON Data File JSON-format - + CSV Data File CSV-format - + Failed to read session log file. Kunne ikke lese loggfil med skrive-statistikk. - + Save Data As Lagre data som @@ -4561,42 +4561,42 @@ ProjWizardCustomPage - + Custom Project Options Flere alternativer - + Select which additional root folders to make, and how to populate the Novel folder. If you don't want to add chapters or scenes, set the values to 0. You can add scenes without chapters. Velg hvilke mapper du ønsker i prosjektet, og hvordan du ønsker å fylle hovedmappen for boken. Hvis du ikke ønsker å legge til kapitler og scener, sett verdiene til 0. Du kan også legge til scener uten å legge til kapitler. - + Additional Root Folders Hovedmapper - + {0} folder {0} - + Populate Novel Folder Fyll roman-mappen - + Add chapters Legg til kapitler - + Scenes (per chapter) Scener (per kapittel) - + Add chapter folders Lag kapittel-mapper @@ -4604,27 +4604,27 @@ ProjWizardFinalPage - + Finished Ferdig - + All done. Alt er klart. - + Press '{0}' to create the new project. Trykk '{0}' for å opprette det nye prosjektet. - + Done - + Finish @@ -4632,22 +4632,22 @@ ProjWizardFolderPage - + Select Project Folder Velg prosjektmappe - + Select a location to store the project. A new project folder will be created in the selected location. Velg et sted hvor prosjektet skal lagres. En mappe for hele prosjektet vil bli opprettet her. - + Required Påkrevd - + Project Path Filbane @@ -4655,47 +4655,47 @@ ProjWizardIntroPage - + Create New Project Opprett nytt prosjekt - + Provide at least a working title. The working title should not be change beyond this point as it is used by the application for generating file names for for instance backups. The other fields are optional and can be changed at any time in Project Settings. Du må fylle inn minst en arbeidstittel. Du bør ikke endre arbeidstittelen etter at prosjektet er opprettet da denne brukes til blant annet filnavn for sikkerhetskopi. De andre feltene er valgfrie, og kan endres når som helst i Prosjektinstillinger. - + Side image by {0}, {1} Illustrasjon av {0}, {1} - + Required Påkrevd - + Optional Valgfritt - + Optional. One name per line. Valgfritt. Ett navn per linje. - + Working Title Arbeidstittel - + Novel Title Bokens tittel - + Author(s) Forfatter(e) @@ -4703,27 +4703,27 @@ ProjWizardPopulatePage - + Populate Project Fyll prosjektet - + Choose how to pre-fill the project. Either with a minimal set of starter items, an example project explaining and showing many of the features, or show further custom options on the next page. Velg hvordan du vil forhåndsfylle prosjektet. Du kan velge mellom et minimalt sett med mapper og filer, et eksempel-prosjekt som forklarer og viser hvordan du bruker programmet, eller se flere valg på neste side. - + Fill the project with a minimal set of items Fyll prosjektet med et minimalt innhold - + Fill the project with example files Fyll prosjektet med eksempelfiler - + Show detailed options for filling the project Vis detaljerte valg for å fylle prosjektet diff --git a/i18n/nw_pt.ts b/i18n/nw_pt.ts index b4f5cebd..2d199449 100644 --- a/i18n/nw_pt.ts +++ b/i18n/nw_pt.ts @@ -432,347 +432,347 @@ GuiBuildNovel - + Failed to generate preview. The result is too big. A geração do rascunho falhou. O resultado é muito grande. - + Open Document (.odt) Open Document (.odt) - + PDF PDF - + Plain HTML HTML Simples - + Unknown format Formato desconhecido - + novelWriter HTML (.htm) HTML do novelWriter (.htm) - + novelWriter Markdown (.nwd) Markdown do novelWriter (.nwd) - + JSON + novelWriter HTML JSON + HTML do novelWriter - + JSON + novelWriter Markdown (.json) JSON + Markdown do novelWriter (.json) - + Build Novel Project Construção do Projeto do Livro - + Title Formats for Novel Files Formatos de Título para Arquivos do Livro - + Title Título - + Chapter Capítulo - + Unnumbered Sem Numeração - + Section Seção - + Font family Família da fonte - + Font size Tamanho da fonte - + Justify text Texto justificado - + Disable styling Desabilita a estilização - + Include synopsis Inclui a sinopse - + Include comments Inclui comentários - + Include keywords Inclui palavras-chave - + Include body text Inclui o corpo do texto - + File Filter Options Opções de Filtro de Arquivos - + Ignore the 'Include when building project' setting and include all files in the output. Ignora a configuração 'Inclui quando estiver construindo o projeto' e inclui todos os arquivos no resultado. - + Include novel files Inclui arquivos do livro - + Include note files Inclui arquivos de notas - + Ignore export flag Ignora opção de exportação - + Export Options Opções de Exportação - + Replace tabs with spaces Substitui tabulações com espaços - + Print Imprimir - + Close Fechar - + Save Document As Salvar Documento Como - + {0} file successfully written to: Arquivo {0} escrito com sucesso para: - + Failed to write {0} file. {1} Falhou para escrever o arquivo {0}. {1} - + Build Preview Construir Prévia - + Print Preview Imprimir Prévia - + Print to PDF Imprimir para PDF - + Flat Open Document (.fodt) - + Standard Markdown (.md) Markdown Padrão (.md) - + GitHub Markdown (.md) Markdown do GitHub (.md) - + There were problems when building the project Houveram problemas ao construir o projeto - + Scene Cena - + Font Options Opções de Fonte - + Line height Altura da linha - + Include Options Opções de Inclusão - + Replace Unicode in HTML Substituir Unicode no HTML - + {0} for the title as set in the document {0} para o titulo como definido no documento - + {0} for chapter number (1, 2, 3) {0} para o numero do capítulo (1, 2, 3) - + {0} for chapter number as a word (one, two) {0} para o numero do capítulo por extenso (um, dois) - + {0} for chapter number in upper case Roman {0} para o número do capítulo em numerais romanos maiúsculos - + {0} for chapter number in lower case Roman {0} para o número do capítulo em numerais romanos minúsculos - + {0} for scene number within chapter {0} para o número da cena no capítulo - + {0} for scene number within novel {0} para o número da cena no livro - + Leave blank to skip this heading, or set to a static text, like for instance '{0}', to make a separator. The separator will be centred automatically and only appear between sections of the same type. Deixe em branco para ignorar este cabeçalho ou defina um texto estático como {0}, por exemplo, para fazer um separador. O separador será centralizado automaticamente a aparecerá apenas entre seções do mesmo tipo. - + Include files with layouts other than 'Note'. Inclui arquivos com leiautes diferentes de 'Nota'. - + Include files with layout 'Note'. Inclui arquivos com leiaute 'Nota'. - + Formatting Codes: Códigos de Formatação: - + Save As Salvar Como - + Open Document - + Flat Open Document - + novelWriter Markdown Markdown do novelWriter - + Standard Markdown Markdown Padrão - + GitHub Markdown Markdown do GitHub - + JSON + novelWriter HTML (.json) JSON + HTML do novelWriter (.json) - + JSON + novelWriter Markdown JSON + Markdown do novelWriter - + Styling Options Opções de Estilo - + Language Idioma - + Not Set Não definido @@ -780,17 +780,17 @@ GuiBuildNovelDocView - + Unknown Desconhecido - + This area will show the content of the document to be exported or printed. Press the "Build Preview" button to generate content. Esta área vai mostrar o conteúdo do documento a ser exportado ou impresso. Clique no botão "Construir Prévia" para gerar o conteúdo. - + <b>Build Time:</b> {0} <b>Tempo de Construção:</b> {0} @@ -4092,142 +4092,142 @@ GuiWritingStats - + JSON Data File (.json) Aruivo de Dados JSON (.json) - + CSV Data File (.csv) Arquivo de Dados CSV (.csv) - + Writing Statistics Estatísticas de Escrita - + Session Start Início da Sessão - + Length Tamanho - + Words Palavras - + Histogram Histograma - + Sum Totals Soma dos Totais - + Total Time: Tempo Total: - + Filtered Time: Tempo Filtrado: - + Novel Word Count: Contagem de Palavras do Livro: - + Notes Word Count: Contagem de Palavras das Notas: - + Total Word Count: Contagem Total de Palavras: - + Filters Filtros - + Count novel files Contagem dos arquivos do livro - + Count note files Contagem dos arquvos de notas - + Hide zero word count Ocultar contagem zerada de palavras - + Hide negative word count Ocultar contagem negativa de palavras - + Group entries by day Agrupar entradas por dia - + Word count cap for the histogram Limite de quantidade de palavras no histograma - + Save As Salvar Como - + Failed to read session log file. Houve uma falha ao ler o arquivo de log da sessão. - + Idle Ocioso - + Idle Time: Tempo Ocioso: - + Show idle time Mostrar tempo ocioso - + JSON Data File Aruivo de Dados JSON - + CSV Data File Arquivo de Dados CSV - + Save Data As Salvar Dados Como @@ -4561,42 +4561,42 @@ ProjWizardCustomPage - + Custom Project Options Opções Personalizadas do Projeto - + Select which additional root folders to make, and how to populate the Novel folder. If you don't want to add chapters or scenes, set the values to 0. You can add scenes without chapters. Selecione quais diretórios-raiz adicionais criar e como popular o diretório do livro. Se você não quiser adicionar capítulos ou cenas, deixe os valores em 0. Você pode adicionar cenas sem capítulos. - + Additional Root Folders Diretórios-raiz adicionais - + Populate Novel Folder Popular Diretório do Livro - + Add chapters Adicionar capítulos - + Scenes (per chapter) Cenas (por capítulo) - + Add chapter folders Adicionar diretórios de capítulo - + {0} folder Diretório {0} @@ -4604,27 +4604,27 @@ ProjWizardFinalPage - + Finished Finalizado - + All done. Tudo pronto. - + Done Pronto - + Finish Terminar - + Press '{0}' to create the new project. Pressione '{0}' para criar um novo projeto. @@ -4632,22 +4632,22 @@ ProjWizardFolderPage - + Select Project Folder Selecione o Diretório do Projeto - + Select a location to store the project. A new project folder will be created in the selected location. Selecione o local para armazenar o projeto. Um novo diretório será criado para o projeto no local selecionado. - + Required Obrigatório - + Project Path Caminho do projeto @@ -4655,47 +4655,47 @@ ProjWizardIntroPage - + Provide at least a working title. The working title should not be change beyond this point as it is used by the application for generating file names for for instance backups. The other fields are optional and can be changed at any time in Project Settings. Forneça pelo menos um nome de projeto. O nome do projeto não poderá ser modificado após esse ponto pois é utilizado pela aplicação para a geração de nomes de arquivos e para cópias de segurança. Os outros campos são opcionais e podem ser modificados a qualquer momento nas Configurações do Projeto. - + Side image by {0}, {1} Imagem ao lado por {0}, {1} - + Create New Project Criar um Projeto Novo - + Required Obrigatório - + Optional Opcional - + Optional. One name per line. Opcional. Um nome por linha. - + Working Title Nome do projeto - + Novel Title Nome do Livro - + Author(s) Autor(es) @@ -4703,27 +4703,27 @@ ProjWizardPopulatePage - + Populate Project Popular o Projeto - + Choose how to pre-fill the project. Either with a minimal set of starter items, an example project explaining and showing many of the features, or show further custom options on the next page. Escolha como pré-popular o projeto. escolha entre um conjunto mínimo de items iniciais, um projeto de exemplo explicando e mostrando várias das funcionalidades ou escolha opções personalizadas na próxima página. - + Fill the project with a minimal set of items Popular o projeto com um conjunto mínimo de items - + Fill the project with example files Popular o projeto com arquivos de exemplo - + Show detailed options for filling the project Mostrar opções detalhadas para popular o projeto diff --git a/novelWriter.pro b/novelWriter.pro index e0c1fe1f..de214cd1 100644 --- a/novelWriter.pro +++ b/novelWriter.pro @@ -11,7 +11,6 @@ SOURCES += \ nw/dialogs/projload.py \ nw/dialogs/projsettings.py \ nw/dialogs/wordlist.py \ - nw/gui/build.py \ nw/gui/custom.py \ nw/gui/doceditor.py \ nw/gui/docviewer.py \ @@ -22,10 +21,11 @@ SOURCES += \ nw/gui/outlinedetails.py \ nw/gui/projdetails.py \ nw/gui/projtree.py \ - nw/gui/projwizard.py \ nw/gui/statusbar.py \ nw/gui/theme.py \ - nw/gui/writingstats.py \ + nw/tools/build.py \ + nw/tools/projwizard.py \ + nw/tools/writingstats.py \ nw/common.py \ nw/constants.py \ nw/error.py \ diff --git a/nw/gui/__init__.py b/nw/gui/__init__.py index 26b1b1e0..eb87a87f 100644 --- a/nw/gui/__init__.py +++ b/nw/gui/__init__.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- -from nw.gui.build import GuiBuildNovel from nw.gui.doceditor import GuiDocEditor from nw.gui.docviewer import GuiDocViewer, GuiDocViewDetails from nw.gui.itemdetails import GuiItemDetails @@ -10,13 +9,10 @@ from nw.gui.outline import GuiOutline from nw.gui.outlinedetails import GuiOutlineDetails from nw.gui.projdetails import GuiProjectDetails from nw.gui.projtree import GuiProjectTree -from nw.gui.projwizard import GuiProjectWizard from nw.gui.statusbar import GuiMainStatus from nw.gui.theme import GuiTheme -from nw.gui.writingstats import GuiWritingStats __all__ = [ - "GuiBuildNovel", "GuiDocEditor", "GuiDocViewDetails", "GuiDocViewer", @@ -28,7 +24,5 @@ __all__ = [ "GuiOutlineDetails", "GuiProjectDetails", "GuiProjectTree", - "GuiProjectWizard", "GuiTheme", - "GuiWritingStats", ] diff --git a/nw/guimain.py b/nw/guimain.py index ae93ef88..300c00a7 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -39,15 +39,15 @@ from PyQt5.QtWidgets import ( ) from nw.gui import ( - GuiBuildNovel, GuiDocEditor, GuiDocViewDetails, GuiDocViewer, - GuiItemDetails, GuiMainMenu, GuiMainStatus, GuiNovelTree, GuiOutline, - GuiOutlineDetails, GuiProjectDetails, GuiProjectTree, GuiProjectWizard, - GuiTheme, GuiWritingStats + GuiDocEditor, GuiDocViewDetails, GuiDocViewer, GuiItemDetails, GuiMainMenu, + GuiMainStatus, GuiNovelTree, GuiOutline, GuiOutlineDetails, + GuiProjectDetails, GuiProjectTree, GuiTheme ) from nw.dialogs import ( GuiAbout, GuiDocMerge, GuiDocSplit, GuiItemEditor, GuiPreferences, GuiProjectLoad, GuiProjectSettings, GuiWordList ) +from nw.tools import GuiBuildNovel, GuiProjectWizard, GuiWritingStats from nw.core import NWProject, NWDoc, NWIndex from nw.enum import nwItemType, nwItemClass, nwAlert, nwWidget from nw.common import getGuiItem, hexToInt diff --git a/nw/tools/__init__.py b/nw/tools/__init__.py new file mode 100644 index 00000000..18d825d2 --- /dev/null +++ b/nw/tools/__init__.py @@ -0,0 +1,11 @@ +# -*- coding: utf-8 -*- + +from nw.tools.build import GuiBuildNovel +from nw.tools.projwizard import GuiProjectWizard +from nw.tools.writingstats import GuiWritingStats + +__all__ = [ + "GuiBuildNovel", + "GuiProjectWizard", + "GuiWritingStats", +] diff --git a/nw/gui/build.py b/nw/tools/build.py similarity index 100% rename from nw/gui/build.py rename to nw/tools/build.py diff --git a/nw/gui/projwizard.py b/nw/tools/projwizard.py similarity index 100% rename from nw/gui/projwizard.py rename to nw/tools/projwizard.py diff --git a/nw/gui/writingstats.py b/nw/tools/writingstats.py similarity index 100% rename from nw/gui/writingstats.py rename to nw/tools/writingstats.py diff --git a/tests/test_gui/test_gui_build.py b/tests/test_tools/test_tools_build.py similarity index 98% rename from tests/test_gui/test_gui_build.py rename to tests/test_tools/test_tools_build.py index 863cf823..5cf6a8ef 100644 --- a/tests/test_gui/test_gui_build.py +++ b/tests/test_tools/test_tools_build.py @@ -29,14 +29,14 @@ from tools import cmpFiles, getGuiItem from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QAction, QMessageBox, QFileDialog -from nw.gui import GuiBuildNovel +from nw.tools import GuiBuildNovel keyDelay = 2 typeDelay = 1 stepDelay = 20 @pytest.mark.gui -def testGuiBuild_Tool(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir): +def testToolBuild_Main(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir): """Test the build tool. """ # Block message box @@ -251,4 +251,4 @@ def testGuiBuild_Tool(qtbot, monkeypatch, nwGUI, nwLipsum, refDir, outDir): # qtbot.stopForInteraction() -# END Test testGuiBuild_Tool +# END Test testToolBuild_Main diff --git a/tests/test_gui/test_gui_projwizard.py b/tests/test_tools/test_tools_projwizard.py similarity index 96% rename from tests/test_gui/test_gui_projwizard.py rename to tests/test_tools/test_tools_projwizard.py index 02f7b00a..52ab91ff 100644 --- a/tests/test_gui/test_gui_projwizard.py +++ b/tests/test_tools/test_tools_projwizard.py @@ -29,11 +29,10 @@ from tools import getGuiItem from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QFileDialog, QWizard, QMessageBox -from nw.gui import GuiProjectWizard from nw.enum import nwItemClass -from nw.gui.projwizard import ( - ProjWizardIntroPage, ProjWizardFolderPage, ProjWizardPopulatePage, - ProjWizardCustomPage, ProjWizardFinalPage +from nw.tools.projwizard import ( + GuiProjectWizard, ProjWizardIntroPage, ProjWizardFolderPage, + ProjWizardPopulatePage, ProjWizardCustomPage, ProjWizardFinalPage ) keyDelay = 2 @@ -41,7 +40,7 @@ typeDelay = 1 stepDelay = 20 @pytest.mark.gui -def testGuiProjectWizard_Main(qtbot, monkeypatch, nwGUI, nwMinimal): +def testToolProjectWizard_Main(qtbot, monkeypatch, nwGUI, nwMinimal): """Test the new project wizard. """ # Block message box @@ -227,4 +226,4 @@ def testGuiProjectWizard_Main(qtbot, monkeypatch, nwGUI, nwMinimal): # qtbot.stopForInteraction() -# END Test testGuiProjectWizard_Main +# END Test testToolProjectWizard_Main diff --git a/tests/test_gui/test_gui_writingstats.py b/tests/test_tools/test_tools_writingstats.py similarity index 99% rename from tests/test_gui/test_gui_writingstats.py rename to tests/test_tools/test_tools_writingstats.py index bf5a9691..c72de22c 100644 --- a/tests/test_gui/test_gui_writingstats.py +++ b/tests/test_tools/test_tools_writingstats.py @@ -30,7 +30,7 @@ from dummy import causeOSError from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QAction, QFileDialog, QMessageBox -from nw.gui import GuiWritingStats +from nw.tools import GuiWritingStats from nw.constants import nwFiles keyDelay = 2 @@ -38,7 +38,7 @@ typeDelay = 1 stepDelay = 20 @pytest.mark.gui -def testGuiWritingStats_Dialog(qtbot, monkeypatch, nwGUI, fncDir, fncProj): +def testToolWritingStats_Main(qtbot, monkeypatch, nwGUI, fncDir, fncProj): """Test the full writing stats tool. """ # Block message box @@ -428,4 +428,4 @@ def testGuiWritingStats_Dialog(qtbot, monkeypatch, nwGUI, fncDir, fncProj): assert nwGUI.closeProject() qtbot.wait(stepDelay) -# END Test testGuiWritingStats_Dialog +# END Test testToolWritingStats_Main