From d315f37c88c2a08a914acc6abf283a8f1b044422 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 19 Feb 2021 16:38:56 +0100 Subject: [PATCH 1/7] Remove translations of standard buttons and switch to native file dialogs --- nw/error.py | 1 - nw/gui/about.py | 1 - nw/gui/build.py | 4 +--- nw/gui/custom.py | 2 -- nw/gui/docmerge.py | 2 -- nw/gui/docsplit.py | 2 -- nw/gui/itemeditor.py | 2 -- nw/gui/preferences.py | 9 ++------- nw/gui/projload.py | 7 +------ nw/gui/projsettings.py | 5 +---- nw/gui/projwizard.py | 5 +---- nw/gui/wordlist.py | 2 -- nw/gui/writingstats.py | 5 +---- nw/guimain.py | 23 +---------------------- 14 files changed, 8 insertions(+), 62 deletions(-) diff --git a/nw/error.py b/nw/error.py index c29e3eb6..998b7347 100644 --- a/nw/error.py +++ b/nw/error.py @@ -68,7 +68,6 @@ class NWErrorMessage(QDialog): self.msgBody.setReadOnly(True) self.btnBox = QDialogButtonBox(QDialogButtonBox.Close) - self.btnBox.button(QDialogButtonBox.Close).setText(self.tr("Close")) self.btnBox.rejected.connect(self._doClose) # Assemble diff --git a/nw/gui/about.py b/nw/gui/about.py index 685621d3..94c66955 100644 --- a/nw/gui/about.py +++ b/nw/gui/about.py @@ -97,7 +97,6 @@ class GuiAbout(QDialog): # OK Button self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) self.buttonBox.accepted.connect(self._doClose) self.outerBox.addLayout(self.innerBox) diff --git a/nw/gui/build.py b/nw/gui/build.py index a5234be5..b6ee34d2 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -858,10 +858,8 @@ class GuiBuildNovel(QDialog): if not os.path.isdir(saveDir): saveDir = self.mainConf.homePath - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.DontUseNativeDialog savePath, _ = QFileDialog.getSaveFileName( - self, self.tr("Save Document As"), savePath, options=dlgOpt + self, self.tr("Save Document As"), savePath ) if not savePath: return False diff --git a/nw/gui/custom.py b/nw/gui/custom.py index e1ae95e1..1ecd7b8b 100644 --- a/nw/gui/custom.py +++ b/nw/gui/custom.py @@ -500,8 +500,6 @@ class QuotesDialog(QDialog): # Buttons self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doAccept) self.buttonBox.rejected.connect(self._doReject) diff --git a/nw/gui/docmerge.py b/nw/gui/docmerge.py index dfe928d5..c804c794 100644 --- a/nw/gui/docmerge.py +++ b/nw/gui/docmerge.py @@ -66,8 +66,6 @@ class GuiDocMerge(QDialog): self.listBox.setMinimumHeight(self.mainConf.pxInt(180)) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doMerge) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/docsplit.py b/nw/gui/docsplit.py index 034a986c..2bffb28f 100644 --- a/nw/gui/docsplit.py +++ b/nw/gui/docsplit.py @@ -82,8 +82,6 @@ class GuiDocSplit(QDialog): self.splitLevel.currentIndexChanged.connect(self._populateList) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSplit) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/itemeditor.py b/nw/gui/itemeditor.py index 17393579..07926d33 100644 --- a/nw/gui/itemeditor.py +++ b/nw/gui/itemeditor.py @@ -117,8 +117,6 @@ class GuiItemEditor(QDialog): # Buttons self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/preferences.py b/nw/gui/preferences.py index 683eeea4..3dcff608 100644 --- a/nw/gui/preferences.py +++ b/nw/gui/preferences.py @@ -70,8 +70,6 @@ class GuiPreferences(PagedDialog): self.addTab(self.tabAuto, self.tr("Automation")) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) self.addControls(self.buttonBox) @@ -440,11 +438,8 @@ class GuiPreferencesProjects(QWidget): if not os.path.isdir(currDir): currDir = "" - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.ShowDirsOnly - dlgOpt |= QFileDialog.DontUseNativeDialog - newDir = QFileDialog.getExistingDirectory( - self, self.tr("Backup Directory"), currDir, options=dlgOpt + newDir = QFileDialog.getExistingDirectory( + self, self.tr("Backup Directory"), currDir, options=QFileDialog.ShowDirsOnly ) if newDir: self.backupPath = newDir diff --git a/nw/gui/projload.py b/nw/gui/projload.py index 24c40ca2..bb5bedfe 100644 --- a/nw/gui/projload.py +++ b/nw/gui/projload.py @@ -127,8 +127,6 @@ class GuiProjectLoad(QDialog): self.innerBox.addLayout(self.projectForm) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Open | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Open).setText(self.tr("Open")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doOpenRecent) self.buttonBox.rejected.connect(self._doCancel) @@ -190,11 +188,8 @@ class GuiProjectLoad(QDialog): self.tr("novelWriter Project File ({0})").format(nwFiles.PROJ_FILE), self.tr("All files ({0})").format("*.*"), ] - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.DontUseNativeDialog projFile, _ = QFileDialog.getOpenFileName( - self, self.tr("Open novelWriter Project"), "", - filter=";;".join(extFilter), options=dlgOpt + self, self.tr("Open novelWriter Project"), "", filter=";;".join(extFilter) ) if projFile: thePath = os.path.abspath(os.path.dirname(projFile)) diff --git a/nw/gui/projsettings.py b/nw/gui/projsettings.py index eeee08e4..fcbb2035 100644 --- a/nw/gui/projsettings.py +++ b/nw/gui/projsettings.py @@ -77,8 +77,6 @@ class GuiProjectSettings(PagedDialog): self.addTab(self.tabReplace, self.tr("Auto-Replace")) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel) - self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK")) - self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) self.addControls(self.buttonBox) @@ -330,8 +328,7 @@ class GuiProjectEditStatus(QWidget): """ if self.selColour is not None: newCol = QColorDialog.getColor( - self.selColour, self, self.tr("Select Colour"), - QColorDialog.DontUseNativeDialog + self.selColour, self, self.tr("Select Colour") ) if newCol.isValid(): self.selColour = newCol diff --git a/nw/gui/projwizard.py b/nw/gui/projwizard.py index 590a48ab..6689a31e 100644 --- a/nw/gui/projwizard.py +++ b/nw/gui/projwizard.py @@ -211,11 +211,8 @@ class ProjWizardFolderPage(QWizardPage): if not os.path.isdir(lastPath): lastPath = "" - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.ShowDirsOnly - dlgOpt |= QFileDialog.DontUseNativeDialog projDir = QFileDialog.getExistingDirectory( - self, self.tr("Select Project Folder"), lastPath, options=dlgOpt + self, self.tr("Select Project Folder"), lastPath, options=QFileDialog.ShowDirsOnly ) if projDir: projName = self.field("projName") diff --git a/nw/gui/wordlist.py b/nw/gui/wordlist.py index 0e7f3747..6f1cd490 100644 --- a/nw/gui/wordlist.py +++ b/nw/gui/wordlist.py @@ -90,8 +90,6 @@ class GuiWordList(QDialog): self.editBox.addWidget(self.delButton, 0) self.buttonBox = QDialogButtonBox(QDialogButtonBox.Save | QDialogButtonBox.Close) - self.buttonBox.button(QDialogButtonBox.Save).setText(self.tr("Save")) - self.buttonBox.button(QDialogButtonBox.Close).setText(self.tr("Close")) self.buttonBox.accepted.connect(self._doSave) self.buttonBox.rejected.connect(self._doClose) diff --git a/nw/gui/writingstats.py b/nw/gui/writingstats.py index 5cc23198..58c56516 100644 --- a/nw/gui/writingstats.py +++ b/nw/gui/writingstats.py @@ -259,7 +259,6 @@ class GuiWritingStats(QDialog): self.buttonBox.rejected.connect(self._doClose) self.btnClose = self.buttonBox.addButton(QDialogButtonBox.Close) - self.buttonBox.button(QDialogButtonBox.Close).setText(self.tr("Close")) self.btnClose.setAutoDefault(False) self.btnSave = self.buttonBox.addButton(self.tr("Save As"), QDialogButtonBox.ActionRole) @@ -369,10 +368,8 @@ class GuiWritingStats(QDialog): fileName = "sessionStats.%s" % fileExt savePath = os.path.join(saveDir, fileName) - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.DontUseNativeDialog savePath, _ = QFileDialog.getSaveFileName( - self, self.tr("Save Data As"), savePath, options=dlgOpt + self, self.tr("Save Data As"), savePath ) if not savePath: return False diff --git a/nw/guimain.py b/nw/guimain.py index 50a0f6fa..3ea15162 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -550,11 +550,6 @@ class GuiMain(QMainWindow): logger.error("No project open") return False - # If the project is new, it may not have a path, so we need one - if self.theProject.projPath is None: - projPath = self.selectProjectPath() - self.theProject.setProjectPath(projPath) - if self.theProject.projPath is None: return False @@ -707,11 +702,8 @@ class GuiMain(QMainWindow): self.tr("novelWriter files ({0})").format("*.nwd"), self.tr("All files ({0})").format("*.*"), ] - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.DontUseNativeDialog loadFile, _ = QFileDialog.getOpenFileName( - self, self.tr("Import File"), lastPath, - options=dlgOpt, filter=";;".join(extFilter) + self, self.tr("Import File"), lastPath, filter=";;".join(extFilter) ) if not loadFile: return False @@ -931,19 +923,6 @@ class GuiMain(QMainWindow): # Main Dialogs ## - def selectProjectPath(self): - """Select where to save project. - """ - dlgOpt = QFileDialog.Options() - dlgOpt |= QFileDialog.ShowDirsOnly - dlgOpt |= QFileDialog.DontUseNativeDialog - projPath = QFileDialog.getExistingDirectory( - self, self.tr("Save novelWriter Project"), "", options=dlgOpt - ) - if projPath: - return projPath - return None - def showProjectLoadDialog(self): """Opens the projects dialog for selecting either existing projects from a cache of recently opened projects, or provide a From 49c90a44554b6d3451030a8f03ecff05bad3154e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 19 Feb 2021 16:40:52 +0100 Subject: [PATCH 2/7] Add a dummy file for translating Qt widgets used in nW for languages with no qtbase localised file --- i18n/dummy_qtbase.py | 74 +++++ i18n/nw_nb_NO.ts | 758 +++++++++++++++++++++++------------------- i18n/nw_pt.ts | 760 ++++++++++++++++++++++++------------------- novelWriter.pro | 1 + nw/config.py | 1 - 5 files changed, 914 insertions(+), 680 deletions(-) create mode 100644 i18n/dummy_qtbase.py diff --git a/i18n/dummy_qtbase.py b/i18n/dummy_qtbase.py new file mode 100644 index 00000000..1c5c7122 --- /dev/null +++ b/i18n/dummy_qtbase.py @@ -0,0 +1,74 @@ +# -*- coding: utf-8 -*- +""" +Dummy Qt 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 +not yet have a qtbase_xx.qm file shipped with Qt. + +If a qtbase_xx.qm file already exists, do not add a translation for the +entries generated from this file. +""" + +from PyQt5.QtCore import QT_TRANSLATE_NOOP + +# QDialogButtonBox +# ================ + +QT_TRANSLATE_NOOP("QDialogButtonBox", "OK") + +# QGnomeTheme +# =========== + +QT_TRANSLATE_NOOP("QGnomeTheme", "&OK") +QT_TRANSLATE_NOOP("QGnomeTheme", "&Save") +QT_TRANSLATE_NOOP("QGnomeTheme", "&Cancel") +QT_TRANSLATE_NOOP("QGnomeTheme", "&Close") +QT_TRANSLATE_NOOP("QGnomeTheme", "Close without Saving") + +# QGuiApplication +# =============== + +QT_TRANSLATE_NOOP("QGuiApplication", ( + "Translate this string to the string 'LTR' in left-to-right languages or to " + "'RTL' in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout." +)) + +# QPlatformTheme +# ============== + +QT_TRANSLATE_NOOP("QPlatformTheme", "OK") +QT_TRANSLATE_NOOP("QPlatformTheme", "Save") +QT_TRANSLATE_NOOP("QPlatformTheme", "Save All") +QT_TRANSLATE_NOOP("QPlatformTheme", "Open") +QT_TRANSLATE_NOOP("QPlatformTheme", "&Yes") +QT_TRANSLATE_NOOP("QPlatformTheme", "Yes to &All") +QT_TRANSLATE_NOOP("QPlatformTheme", "&No") +QT_TRANSLATE_NOOP("QPlatformTheme", "N&o to All") +QT_TRANSLATE_NOOP("QPlatformTheme", "Abort") +QT_TRANSLATE_NOOP("QPlatformTheme", "Retry") +QT_TRANSLATE_NOOP("QPlatformTheme", "Ignore") +QT_TRANSLATE_NOOP("QPlatformTheme", "Close") +QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel") +QT_TRANSLATE_NOOP("QPlatformTheme", "Discard") +QT_TRANSLATE_NOOP("QPlatformTheme", "Help") +QT_TRANSLATE_NOOP("QPlatformTheme", "Apply") +QT_TRANSLATE_NOOP("QPlatformTheme", "Reset") +QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults") + +# QWizard +# ======= + +QT_TRANSLATE_NOOP("QWizard", "Go Back") +QT_TRANSLATE_NOOP("QWizard", "< &Back") +QT_TRANSLATE_NOOP("QWizard", "Continue") +QT_TRANSLATE_NOOP("QWizard", "&Next") +QT_TRANSLATE_NOOP("QWizard", "&Next >") +QT_TRANSLATE_NOOP("QWizard", "Commit") +QT_TRANSLATE_NOOP("QWizard", "Done") +QT_TRANSLATE_NOOP("QWizard", "&Finish") +QT_TRANSLATE_NOOP("QWizard", "Cancel") +QT_TRANSLATE_NOOP("QWizard", "Cancel") +QT_TRANSLATE_NOOP("QWizard", "Help") +QT_TRANSLATE_NOOP("QWizard", "&Help") diff --git a/i18n/nw_nb_NO.ts b/i18n/nw_nb_NO.ts index 5b00cd6d..bb7aa403 100644 --- a/i18n/nw_nb_NO.ts +++ b/i18n/nw_nb_NO.ts @@ -1,6 +1,5 @@ - - + Common @@ -335,7 +334,7 @@ GuiAbout - + About novelWriter Om novelWriter @@ -355,67 +354,62 @@ Lisens - - OK - OK - - - + Website: {0} Nettside: {0} - + Credits Krediteringer - + novelWriter is a markdown-like text editor designed for organising and writing novels. It is written in Python 3 with a Qt5 GUI, using PyQt5. novelWriter er en markdown-liknende teksteditor laget for å kunne organisere og skrive romaner og noveller. Programmet er skrevet i Python 3 med et brukergrensesnitt i Qt 5 via PyQt5. - + novelWriter is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. novelWriter er gratis programvare: du kan videredistribuere det og/eller modifisere det under vilkårene i GNU General Public License som utgitt av Free Software Foundation, enten versjon 3 av Lisensen, eller (etter eget valg) enhver senere versjon. - + novelWriter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. novelWriter er distribuert i håp om at det vil være nyttig, men UTEN NOEN GARANTI; uten selv en underforstått garanti vedrørende SALGBARHET eller EGNETHET TIL ET BESTEMT FORMÅL. Se GNU General Public License for flere detaljer. - + See the License tab for the full license text, or visit the GNU website at {0} for more details. Se lisens-fanen for fulltekst-versjonen av lisensen (på engelsk), eller besøk GNU sin nettside på {0} for mer informasjon. - + Theme: {0} Tema: {0} - + Author: {0} Ansvarlig: {0} - + Credit: {0} Kreditert: {0} - + License: {0} Lisens: {0} - + Icons: {0} Ikoner: {0} - + Syntax: {0} Syntaks: {0} @@ -733,22 +727,22 @@ - + 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} @@ -771,17 +765,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} @@ -1036,40 +1030,30 @@ Dra og slipp dokumenter for å endre rekkefølge. - - Cancel - Avbryt - - - + No source documents found. Nothing to do. Ingen kilde-dokument funnet. Det er ingenting å gjøre. - + No source document selected. Nothing to do. Ingen kilde-dokument er valgt. Det er ingenting å gjøre. - + Could not parse source document. Klarte ikke å lese kilde-dokumentet. - + Element selected in the project tree must be a folder. Elementet som er valgt i prosjekttreet må være en mappe. - - - OK - OK - GuiDocSplit - + Split Document Del opp dokument @@ -1104,50 +1088,40 @@ Del på overskrifter opp til nivå 4 (seksjoner) - - Cancel - Avbryt - - - + No source document selected. Nothing to do. Ingen kilde-dokument er valgt. Det er ingenting å gjøre. - + Could not parse source document. Klarte ikke å lese kilde-dokumentet. - + No headers found. Nothing to do. Ingen overskrifter ble funnet i dokumentet. Det er ikke noe å gjøre. - + Cannot add new folder for the document split. Maximum folder depth has been reached. Please move the file to another level in the project tree. Kan ikke legge til ny mappe for å dele opp dokumentet. Dokumentet har allerede maksimal dybde i prosjekttreet. Flytt dokumentet til et annet nivå først. - + The document will be split into {0} file(s) in a new folder. The original document will remain intact. Dokumentet vil nå bli delt opp i {0} nye filer i en ny mappe. Det originale dokumentet vil ikke bli endret eller fjernet. - + Continue with the splitting process? Fortsette med oppdelingen? - + Element selected in the project tree must be a file. Elementet som er valgt i prosjekttreet må være et dokument. - - - OK - OK - GuiDocViewFooter @@ -1307,30 +1281,20 @@ Ta med ved eksport - - Cancel - Avbryt - - - + Label Navn - + Status Status - + Layout Format - - - OK - OK - GuiMain @@ -1395,7 +1359,7 @@ Ønsker du å lukke dette prosjektet? - + Changes are saved automatically. Endringer lagres automatisk. @@ -1435,107 +1399,102 @@ Prosjektets indeks er utdatert eller skadet. Bygger indeksen på nytt. - + Text files ({0}) Tekstfiler ({0}) - + Markdown files ({0}) Markdown-filer ({0}) - + novelWriter files ({0}) novelWriter-filer ({0}) - + All files ({0}) Alle filer ({0}) - + Import File Importer fil - + Could not read file. The file must be an existing text file. Kunne ikke lese filen. Filen må eksistere fra før av. - + Please open a document to import the text file into. Vennligst åpne et dokument hvor teksten i filen kan importeres. - + Import Document Importer dokument - + Importing the file will overwrite the current content of the document. Do you want to proceed? Å importere filen vil overskrive all eksisterende tekst i dokumentet. Ønsker du å fortsette? - + Indexing: '{0}' Indekserer: '{0}' - + Unknown item Ukjent enhet - + Indexing completed in {0} ms Indekseringen tok {0} ms - + The project index has been successfully rebuilt. Prosjektets indeks har blitt bygget på nytt. - - Save novelWriter Project - Lagre novelWriter-prosjektet - - - + Information Informasjon - + Warning Advarsel - + Error Feil - + This is a bug! Dette er en systemfeil! - + Internal Error Intern feil - + Exit Avslutt - + Do you want to exit novelWriter? Ønsker du å avslutte novelWriter? @@ -2823,135 +2782,125 @@ Automasjon - - Cancel - Avbryt - - - + Some changes will not be applied until novelWriter has been restarted. Noen endringer vil ikke tas i bruk før neste gang novelWriter startes. - - - OK - OK - GuiPreferencesAutomation - + Automatic Features Automatiske funksjoner - + Auto-select word under cursor Auto-velg ord under markør - + Apply formatting to word under cursor if no selection is made. Hvis ingen tekst er valgt, formatter ordet hvor markøren står. - + Auto-replace text as you type Erstatt mens du skriver - + Allow the editor to replace symbols as you type. La editoren erstatte symboler mens du skriver. - + Replace as You Type Erstatt mens du skriver - + Auto-replace single quotes Erstatt enkle sitattegn - + Try to guess which is an opening or a closing single quote. Forsøker å gjette hva som er venstre og høyre tegn. - + Auto-replace double quotes Erstatt doble sitattegn - + Try to guess which is an opening or a closing double quote. Forsøker å gjette hva som er venstre og høyre tegn. - + Auto-replace dashes Erstatt bindestreker - + Double and triple hyphens become short and long dashes. To og tre bindestreker erstattes med kort og lang bindestrek. - + Auto-replace dots Erstatt tre punktum - + Three consecutive dots become ellipsis. Tre punktum på rad erstattes med ellipsis. - + Quotation Style Sitattegn - + Single quote open style Enkelt sitat, venstre side - + The symbol to use for a leading single quote. Symbol for enkelt sitattegn før et sitat. - + Single quote close style Enkelt sitat, høyre side - + The symbol to use for a trailing single quote. Symbol for enkelt sitattegn etter et sitat. - + Double quote open style Dobbelt sitat, venstre side - + The symbol to use for a leading double quote. Symbol for dobbelt sitattegn før et sitat. - + Double quote close style Dobbelt sitat, høyre side - + The symbol to use for a trailing double quote. Symbol for dobbelt sitattegn etter et sitat. @@ -2959,107 +2908,107 @@ GuiPreferencesDocuments - + Text Style Tekststil - + Font family Skriftfamilie - + Font for the document editor and viewer. Skrifttype til bruk for editor og visning. - + Font size Skriftstørrelse - + Font size for the document editor and viewer. Skriftstørrelse til bruk for editor og visning. - + pt - + Text Flow Tekstflyt - + Maximum text width in "Normal Mode" Maks tekstbredde i "Normal-modues" - + Horizontal margins are scaled automatically. Horisontale marger skalerer da automatisk. - + px - + Maximum text width in "Focus Mode" Maks tekstbredde i "Fokus-modues" - + Disable maximum text width in "Normal Mode" Slå av maks tekstbredde i "Normal-modus" - + Text width is defined by the margins only. Tekstbredden er kun definert av margene. - + Hide document footer in "Focus Mode" Gjem dokumentets bunnlinje i "Fokus-modus" - + Hide the information bar at the bottom of the document. Gjemmer informasjonslinja i bunnen av dokumentet. - + Justify the text margins in editor and viewer Bruk justerte marger i editor og visning - + Lay out text with straight edges in the editor and viewer. Justerte marger gir rette linjeender i avsnitt. - + Text margin Marger - + If maximum width is set, this becomes the minimum margin. Hvis tekstbredde er satt, så blir dette istedet minste marger. - + Tab width Tabulatorens bredde - + The width of a tab key press in the editor and viewer. Hvor langt tabulatoren hopper i editor og visning. @@ -3067,127 +3016,127 @@ GuiPreferencesEditor - + Spell Checking Stavekontroll - + Internal Intern - + Spell check provider Verktøy for stavekontroll - + Note that the internal spell check tool is quite slow. Merk at den interne stavekontrollen er ganske treg. - + Spell check language Språk for stavekontroll - + Available languages are determined by your system. Tilgjengelige språk hentes fra operativystemet ditt. - + Big document limit Grense for store dokumenter - + Full spell checking is disabled above this limit. Automatisk stavekontroll slås av over grensen. - + kB - + Word Count Telling av ord - + Word count interval Telle-intervall - + How often the word count is updated. Hvor ofte antall ord blir oppdatert. - + seconds sekunder - + Writing Guides Hjelpesymboler - + Show tabs and spaces Synlige tabulatorer og mellomrom - + Add symbols to indicate tabs and spaces in the editor. Viser symboler for å indikere disse i editoren. - + Show line endings Synlige linjeender - + Add a symbol to indicate line endings in the editor. Viser symbol for å indikere dette i editoren. - + Scroll Behaviour Rullefelt - + Scroll past end of the document Tillat å rulle forbi slutten av dokumentet - + Also improves trypewriter scrolling for short documents. Forbedrer funksjonen til skrivemaskin-rulling. - + Typewriter style scrolling when you type Skrivemaskin-liknende rulling mens du skriver - + Try to keep the cursor at a fixed vertical position. Prøver å holde markøren på samme sted vertikalt. - + Minimum position for Typewriter scrolling Minste avstand for skrivemaskin-rulling - + Percentage of the editor height from the top. I prosent fra toppen av editor-vinduet. @@ -3195,82 +3144,82 @@ GuiPreferencesGeneral - + Look and Feel Utseende - + Main GUI theme Fargetema - + Changing this requires restarting novelWriter. Endring av dette krever omstart av novelWriter. - + Main icon theme Ikon-tema - + Prefer icons for dark backgrounds Foretrekk ikoner for mørk bakgrunn - + May improve the look of icons on dark themes. Kan forbedre utseende på mørke temaer. - + Font family Skriftfamilie - + Font size Skriftstørrelse - + pt - + GUI Settings Brukergrensesnitt - + Show full path in document header Vis full prosjektbane i dokumenthoder - + Add the parent folder names to the header. Legger til mappene foran dokumentets navn. - + Hide vertical scroll bars in main windows Skjul vertikale rullefelt i hovedvinduer - + Scrolling available with mouse wheel and keys only. Rulling kan bare gjøres med mus og tastatur. - + Hide horizontal scroll bars in main windows Skjul horisontale rullefelt i hovedvinduer - + Main GUI language Programspråk @@ -3278,107 +3227,107 @@ GuiPreferencesProjects - + Automatic Save Automatisk lagring - + Save document interval Interval for lagring av dokument - + How often the open document is automatically saved. Hvor ofte det åpne dokumentet lagres automatisk. - + seconds sekunder - + Save project interval Interval for lagring av prosjekt - + How often the open project is automatically saved. Hvor ofte det åpne prosjektet lagres automatisk. - + Project Backup Sikkerhetskopi - + Browse Bla - + Backup storage location Filbane for sikkerhetskopi - + Path: {0} Filbane: {0} - + Run backup when the project is closed Lag sikkerhetskopi når prosjektet lukkes - + Can be overridden for individual projects in project settings. Kan overstyres fra individuelle prosjektinnstillinger. - + Ask before running backup Spør før sikkerhetskopi tas - + If off, backups will run in the background. Hvis avslått, tas sikkerhetskopi automatisk. - + Session Timer Sesjons-klokke - + Pause the session timer when not writing Sett klokka på pause når du er inaktiv - + Also pauses when the application window does not have focus. Pauses også når du ikke jobber i applikasjonens vindu. - + Editor inactive time before pausing timer Tid uten skriving før klokka settes på pause - + User activity includes typing and changing the content. Dette måler kun endringer i teksteditoren. - + minutes minutter - + Backup Directory Mappe for sikkerhetskopi @@ -3386,67 +3335,67 @@ GuiPreferencesSyntax - + Highlighting Theme Syntaksfremheving - + Highlighting theme Fremhevingstema - + Colour theme to apply to the editor and viewer. Fargetema for editor og visning. - + Quotes & Dialogue Sitattegn & dialog - + Highlight text wrapped in quotes Fremhev tekst mellom sitattegn - + Applies to single, double and straight quotes. Gjelder enkle, doble og rette sitattegn. - + Allow open-ended single quotes Tillat enkle sitattegn som ikke lukkes - + Highlight single-quoted line with no closing quote. Fremhev sitater som ikke er lukket i samme avsnitt. - + Allow open-ended double quotes Tillat doble sitattegn som ikke lukkes - + Highlight double-quoted line with no closing quote. Fremhev sitater som ikke er lukket i samme avsnitt. - + Text Emphasis Fremheving av tekst - + Add highlight colour to emphasised text Fremhev formattert tekst - + Applies to emphasis (italic) and strong (bold). Gjelder kursiv og fet tekst. @@ -3588,57 +3537,57 @@ GuiProjectEditMain - + Project Settings Prosjektinnstillinger - + Working title Arbeidstittel - + Should be set only once. Bør bare settes én gang. - + Novel title Bokens tittel - + Change whenever you want! Kan endres når som helst! - + Author(s) Forfatter(e) - + One name per line. Ett navn per linje. - + Default Ingen valg - + Spell check language Språk for stavekontroll - + Overrides main preferences. Overstyrer valg i innstillinger. - + No backup on close Slå av sikkerhetskopi @@ -3646,32 +3595,32 @@ GuiProjectEditReplace - + Keyword Kodeord - + Replace With Erstatt med - + Save entry Lagre tekst - + Add new entry Legg til ny - + Delete selected entry Slett valgte element - + Text Replace List for Preview and Export Erstatningsliste for forhåndsvisning og eksport @@ -3679,57 +3628,57 @@ GuiProjectEditStatus - + New Ny - + Delete Slett - + Save Lagre - + Colour Farge - + Name Navn - + Novel File Status Levels Statusnivåer i roman-filer - + Note File Importance Levels Viktighetsnivåer i notatfiler - + Select Colour Velg farge - + New Item Legg til - + Cannot delete status item that is in use. Kan ikke slette statusnivåer som er i bruk. - + {0} [{1}] @@ -3767,47 +3716,37 @@ Filbane - - Open - Åpne - - - - Cancel - Avbryt - - - + New Ny - + Remove Fjern - + novelWriter Project File ({0}) novelWriter-prosjektfil ({0}) - + All files ({0}) Alle filer ({0}) - + Open novelWriter Project Åpne novelWriter-prosjekt - + Remove Entry Fjern linje - + Remove '{0}' from the recent projects list? The project files will not be deleted. Vil du fjerne '{0}' fra listen over tidligere åpnede prosjekter? Selve prosjektfilene blir ikke slettet. @@ -3839,16 +3778,6 @@ Auto-Replace Autoerstatt - - - Cancel - Avbryt - - - - OK - OK - GuiProjectTree @@ -4072,22 +4001,12 @@ Slett valgte element - - Save - Lagre - - - - Close - Lukk - - - + Cannot add a blank word. Kan ikke legge til et tomt ord. - + The word '{0}' is already in the word list. Ordet '{0}' ligger allerede i ordlisten. @@ -4200,42 +4119,37 @@ Maks antall ord for histogram - - Close - Lukk - - - + 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 @@ -4268,14 +4182,6 @@ Kunne ikke slette dokumentets fil. - - NWErrorMessage - - - Close - Lukk - - NWProject @@ -4577,42 +4483,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 @@ -4620,27 +4526,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 @@ -4648,7 +4554,7 @@ ProjWizardFolderPage - + Select Project Folder Velg prosjektmappe @@ -4719,42 +4625,216 @@ 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 - QuotesDialog + QDialogButtonBox - + + OK + OK + + + + QGnomeTheme + + + &OK + &OK + + + + &Save + &Lagre + + + + &Cancel + &Avbryt + + + + &Close + &Lukk + + + + Close without Saving + Lukk uten å lagre + + + + QPlatformTheme + + + OK + OK + + + + Save + Lagre + + + + Save All + Lagre alle + + + + Open + Åpne + + + + &Yes + &Ja + + + + Yes to &All + Ja til &alle + + + + &No + &Nei + + + + N&o to All + N&ei til alle + + + + Abort + Avbryt + + + + Retry + Prøv igjen + + + + Ignore + Ignorer + + + + Close + Lukk + + + Cancel Avbryt - - OK - OK + + Discard + Forkast + + + + Help + Hjelp + + + + Apply + Anvend + + + + Reset + Nullstill + + + + Restore Defaults + Gjennopprett standard + + + + QWizard + + + &Next > + &Neste > + + + + Go Back + Gå tilbake + + + + < &Back + < &Tilbake + + + + Continue + Fortsett + + + + &Next + &Neste + + + + Commit + Gjennomfør + + + + Done + Ferdig + + + + &Finish + &Fullfør + + + + Cancel + Avbryt + + + + Help + Hjelp + + + + &Help + &Hjelp diff --git a/i18n/nw_pt.ts b/i18n/nw_pt.ts index a7ce6797..bb66cfc1 100644 --- a/i18n/nw_pt.ts +++ b/i18n/nw_pt.ts @@ -1,6 +1,5 @@ - - + Common @@ -335,47 +334,47 @@ GuiAbout - + About novelWriter Sobre o novelWriter - + novelWriter is a markdown-like text editor designed for organising and writing novels. It is written in Python 3 with a Qt5 GUI, using PyQt5. novelWriter é um editor de texto som sintaxe semelhante ao markdown, projetado para a escrita e organização de livros. É escrito em Python 3 com interface de usuário em Qr5, usando PyQt5. - + novelWriter is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. novelWriter é distribuído na especativa de que seja útil, mas SEM NENHUMA GARANTIA, nem mesmo a garantia implícita de COMERCIALIZAÇÃO ou ADEQUAÇÃO PARA UM PROPÓSITO ESPECÍFICO. - + Credits Créditos - + novelWriter is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. novelWriter é um software livre: você pode redistribuí-lo e/ou modificá-lo sob os termos da GNU Licença Pública Geral, assim como publicada pela Free Software Foundation, tanto na versão 3 da licença, ou (à sua escolha) qualquer versão subsequente. - + Theme: {0} Tema: {0} - + Icons: {0} Ícones: {0} - + Syntax: {0} Sintaxe: {0} - + Website: {0} Website: {0} @@ -390,32 +389,27 @@ Lançamento - + See the License tab for the full license text, or visit the GNU website at {0} for more details. Veja a aba de Licença para o texto completo de licença, ou visite o website da GNU em {0} para mais detalhes. - - - OK - OK - License Licença - + Author: {0} Autor: {0} - + Credit: {0} Créditos: {0} - + License: {0} Licença: {0} @@ -443,7 +437,7 @@ HTML Simples - + Unknown format Formato desconhecido @@ -583,17 +577,17 @@ 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} @@ -771,17 +765,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} @@ -1036,35 +1030,25 @@ Mescla de Documentos - + No source documents found. Nothing to do. Nenhum documento-fonte foi encontrado. Nada para fazer. - + No source document selected. Nothing to do. Nenhum documento de origem selecionado. Nada a ser feito. - + Could not parse source document. Não foi possível interpretar o documento. - + Element selected in the project tree must be a folder. O elemento selecionado na árvore do projeto deve ser um diretório. - - - Cancel - Cancelar - - - - OK - OK - GuiDocSplit @@ -1099,55 +1083,45 @@ Dividir até os cabeçalhos de nível 4 (Seção) - + Split Document Divisão de Documento - + No source document selected. Nothing to do. Nenhum documento de origem selecionado. Nada a ser feito. - + Could not parse source document. Não foi possível interpretar o documento. - + No headers found. Nothing to do. Nenhum cabeçalho foi encontrado. Nada para fazer. - + Cannot add new folder for the document split. Maximum folder depth has been reached. Please move the file to another level in the project tree. Não é possível adicionar um novo diretório para a divisão do documento. A profundidade máxima dos diretórios foi alcançada. Por favor mova o arquivo para outro nível na árvore do projeto. - + Continue with the splitting process? Continuar com o processo de divisão? - + Element selected in the project tree must be a file. O elemento selecionado na árvore do projeto deve ser um arquivo. - + The document will be split into {0} file(s) in a new folder. The original document will remain intact. O documento será dividio em {0} arquivo(s) em um novo diretório. O documento original será mantido intacto. - - - Cancel - Cancelar - - - - OK - OK - GuiDocViewFooter @@ -1307,30 +1281,20 @@ Incluir ao construir o projeto - + Label Rótulo - + Status Estado - + Layout Leiaute - - - Cancel - Cancelar - - - - OK - OK - GuiMain @@ -1350,32 +1314,32 @@ Nota: Se o programa ou o computador sofreu uma falha anteriormente, o bloqueio pode ser sobrescrito com segurança. Se, no entanto, outra instância do novelWriter esteja com o projeto aberto, sobrescrever o bloqueio pode corromper o projeto e não é recomendado. - + Unknown item Item desconhecido - + Information Informação - + Warning Alerta - + Error Erro - + This is a bug! Isto é um bug! - + Internal Error Erro Interno @@ -1410,7 +1374,7 @@ Fechar o projeto atual? - + Changes are saved automatically. As alterações serão salvas automaticamente. @@ -1430,52 +1394,47 @@ Projeto Bloqueado - + Import File Importar Arquivo - + Could not read file. The file must be an existing text file. Não foi possível ler o arquivo. O arquivo deve ser um arquivo de texto existente. - + Please open a document to import the text file into. Por favor, abra um documento para importar o text nele. - + Import Document Importar Documento - + Importing the file will overwrite the current content of the document. Do you want to proceed? Importar o arquivo vai sobrescrever o conteúdo atual do documento. Você deseja continuar? - + The project index has been successfully rebuilt. O índice do projeto foi reconstruído com sucesso. - - Save novelWriter Project - Salvar o Projeto do novelWriter - - - + Exit Sair - + Do you want to exit novelWriter? Você deseja realmente sair do novelWriter? - + Indexing completed in {0} ms Indexação completa em {0} ms @@ -1515,27 +1474,27 @@ O projeto foi bloqueado pelo computador '{0}' ({1} {2}), ativo pela última vez em {3}. - + Indexing: '{0}' Indexando: '{0}' - + Text files ({0}) Arquivos de texto ({0}) - + Markdown files ({0}) Arquivos Markdown ({0}) - + novelWriter files ({0}) Arquivos do novelWriter ({0}) - + All files ({0}) Todos os arquivos ({0}) @@ -2788,7 +2747,7 @@ GuiPreferences - + Some changes will not be applied until novelWriter has been restarted. Algumas alterações não serão aplicadas enquanto a aplicação não for reiniciada. @@ -2827,131 +2786,121 @@ Automation Automação - - - Cancel - Cancelar - - - - OK - OK - GuiPreferencesAutomation - + Automatic Features Funcionalidades Automáticas - + Auto-select word under cursor Selecionar automaticamente a palavra sob o cursor - + Apply formatting to word under cursor if no selection is made. Aplicar a formatação à palavra sob o cursor se nenhuma seleção for feita. - + Auto-replace text as you type Substituir automaticamente o texto enquanto digita - + Allow the editor to replace symbols as you type. Permite que o editor substituia símbolos emquanto você digita. - + Replace as You Type Substituição Durante a Digitação - + Auto-replace single quotes Substituir automaticamente aspas simples - + Try to guess which is an opening or a closing single quote. Tenta adivinhar se a aspa simples é de abertura ou de fechamento. - + Auto-replace double quotes Subsitituir automaticamente aspas duplas - + Try to guess which is an opening or a closing double quote. Tenta adivinhar se a aspa dupla é de abertura ou de fechamento. - + Auto-replace dashes Substituir automaticamente os travessões - + Double and triple hyphens become short and long dashes. Hífens duplos ou triplos se tornam travessões curtos ou longos. - + Auto-replace dots Substituir automaticamente os pontos - + Three consecutive dots become ellipsis. Três pontos consecutivos se tornam uma reticência. - + Quotation Style Estilo de Aspas - + Single quote open style Estilo da aspa de abertura simples - + The symbol to use for a leading single quote. O símbolo usado para a aspa simples à esquerda. - + Single quote close style Estilo da aspa de fechamento simples - + The symbol to use for a trailing single quote. O símbolo usado para a aspa simples à esquerda. - + Double quote open style Estilo da aspa de abertura dupla - + The symbol to use for a leading double quote. O símbolo usado para a aspa dupla à esquerda. - + Double quote close style Estilo da aspa de fechamento dupla - + The symbol to use for a trailing double quote. O símbolo usado para a aspa dupla à direita. @@ -2959,107 +2908,107 @@ GuiPreferencesDocuments - + Text Style Estilo do Texto - + Font family Família da fonte - + Font for the document editor and viewer. Fonte para o editor e visualizador de documentos. - + Font size Tamanho da fonte - + Font size for the document editor and viewer. Tamanho da fonte para o editor e visualizador de documentos. - + Text Flow Fluxo do Texto - + Maximum text width in "Normal Mode" Largura máxima do texto no "Modo Normal" - + Horizontal margins are scaled automatically. Margens horizontais são redimensionadas automaticamente. - + Maximum text width in "Focus Mode" Largura máxima do texto no "Modo Foco" - + Disable maximum text width in "Normal Mode" Desabilita a largura máxima do texto no "Modo Normal" - + Text width is defined by the margins only. A largura do texto é definida apenas pelas margens. - + Hide document footer in "Focus Mode" Oculta o rodapé do documento no "Modo Foco" - + Hide the information bar at the bottom of the document. Oculta a barra de informações na parte de baixo do documento. - + Justify the text margins in editor and viewer Justifica as margens do texto no editor e visualizador - + Lay out text with straight edges in the editor and viewer. Organiza o texto com cantos retos no editor e visualizador. - + Text margin Margem do texto - + If maximum width is set, this becomes the minimum margin. Se a largura máxima for definida, esta se torna a margem mínima. - + Tab width Largura da tabulação - + The width of a tab key press in the editor and viewer. A largura de uma tabulação no editor e visualizador. - + px px - + pt pt @@ -3067,127 +3016,127 @@ GuiPreferencesEditor - + Spell Checking Correção Ortográfica - + Internal Interno - + Spell check provider Provedor de correção ortográfica - + Note that the internal spell check tool is quite slow. Note que o corretor ortográfico interno é significativamente lento. - + Spell check language Idioma do corretor ortográfico - + Available languages are determined by your system. Os idiomas disponíveis são determinados pelo seu sistema. - + Big document limit Limite de documento grande - + Full spell checking is disabled above this limit. A verificação ortográfica é desabilitada acima desse limite. - + Writing Guides Guias de Escrita - + Show tabs and spaces Mostrar tabulações e espaços - + Add symbols to indicate tabs and spaces in the editor. Adiciona símbolos para indicar tabulações e espaços no editor. - + Show line endings Mostrar terminações de linha - + Add a symbol to indicate line endings in the editor. Adiciona um símbolo para indicar a terminação de linha no editor. - + Scroll Behaviour Comportamento da Rolagem - + Scroll past end of the document Rolar após o final do documento - + Also improves trypewriter scrolling for short documents. Também melhora a rolagem de máquina de escrever em documentos curtos. - + Typewriter style scrolling when you type Rolagem no estilo de máquina de escrever quando digita - + Try to keep the cursor at a fixed vertical position. Tenta manter o cursor em uma posição vertical fixa. - + Minimum position for Typewriter scrolling Posição máxima da rolagem de máquina de escrever - + Percentage of the editor height from the top. Porcentagem da altura do editor desde o topo. - + kB kB - + Word Count Contagem de Palavras - + Word count interval Intervalo de contagem de palavras - + How often the word count is updated. Com qual frequência a contagem de palavras é atualizada. - + seconds segundos @@ -3195,82 +3144,82 @@ GuiPreferencesGeneral - + Look and Feel Aparência - + Main GUI theme Tema da interface - + Changing this requires restarting novelWriter. Alterações nessa configuração exigem reinício da aplicação. - + Main icon theme Tema dos ícones - + Prefer icons for dark backgrounds Preferir ícones para fundos escuros - + May improve the look of icons on dark themes. Pode melhorar a aparência dos ícones em temas escuros. - + Font family Família da fonte - + Font size Tamanho da fonte - + GUI Settings Configurações da Interface - + Show full path in document header Mostrar o caminho completo do documento no cabeçalho - + Add the parent folder names to the header. Adiciona o nome dos diretórios-pai ao cabeçalho. - + Hide vertical scroll bars in main windows Ocultar a barra de rolagem vertical nas janelas principais - + Scrolling available with mouse wheel and keys only. A rolagem de tela estará diponível apenas com o mouse ou teclado. - + Hide horizontal scroll bars in main windows Ocultar a barra de rolagem horizontal nas janelas principais - + pt pt - + Main GUI language Idioma da Interface @@ -3278,107 +3227,107 @@ GuiPreferencesProjects - + Automatic Save Salvamento Automático - + Save document interval Intervalo de salvamento do documento - + How often the open document is automatically saved. Com qual frequência o documento aberto é salvo automaticamente. - + Save project interval Intervalo de salvamento do projeto - + How often the open project is automatically saved. Com qual frequencia o projeto aberto é salvo automaticamente. - + Project Backup Cópia de Segurança - + Browse Procurar - + Backup storage location Localização da cópia de segurança - + Run backup when the project is closed Executar a cópia de segurança quando o projeto é fechado - + Can be overridden for individual projects in project settings. Pode ser sobrescrito para projetos individuais nas configurações do projeto. - + Ask before running backup Perguntar antes de executar a cópia de segurança - + If off, backups will run in the background. Se desativado, cópias de segurança serão executadas em segundo plano. - + Backup Directory Diretório das Cópias de Segurança - + seconds segundos - + Session Timer Temporizador da Sessão - + Pause the session timer when not writing Pausa o temporizador da sessão quando não estiver escrevendo - + Also pauses when the application window does not have focus. Também pausa quando a janela da aplicação não estiver em foco. - + Editor inactive time before pausing timer Tempo inativo do editor antes de pausar o temporizador - + User activity includes typing and changing the content. Atividades de usuário incluem escrever e alterar o conteúdo. - + minutes minutos - + Path: {0} Caminho: {0} @@ -3386,67 +3335,67 @@ GuiPreferencesSyntax - + Highlighting Theme Tema do Destaque - + Highlighting theme Tema do destaque - + Colour theme to apply to the editor and viewer. Tema de cores para aplicar ao editor e visualizador. - + Quotes & Dialogue Citações e Diálogos - + Highlight text wrapped in quotes Destaca o texto em citações - + Applies to single, double and straight quotes. Aplica-se a citações com aspas simples, duplas e retas. - + Allow open-ended single quotes Permite citações com aspas simples sem fechamento - + Highlight single-quoted line with no closing quote. Destaca a linha com citação de aspas simples sem aspas de fechamento. - + Allow open-ended double quotes Permite citações com aspas duplas sem fechamento - + Highlight double-quoted line with no closing quote. Destaca a linha com citação de aspas duplas sem aspas de fechamento. - + Text Emphasis Ênfase de Texto - + Add highlight colour to emphasised text Adiciona destaque de cor ao texto enfatizado - + Applies to emphasis (italic) and strong (bold). Aplica-se à ênfase (itálico) e ênfase forte (negrito). @@ -3588,57 +3537,57 @@ GuiProjectEditMain - + Should be set only once. Deve ser definido apenas uma vez. - + Change whenever you want! Mude quando quiser! - + One name per line. Um nome por linha. - + Default Padrão - + Overrides main preferences. Sobrescreve as preferências globais. - + Project Settings Configurações do Projeto - + Working title Nome do projeto - + Novel title Título do tivro - + Author(s) Autor(es) - + Spell check language Idioma do corretor ortográfico - + No backup on close Não salvar cópia de segurança ao fechar @@ -3646,32 +3595,32 @@ GuiProjectEditReplace - + Keyword Palavra-chave - + Replace With Substituir Com - + Save entry Salvar entrada - + Add new entry Adiciona uma nova entrada - + Delete selected entry Remove a entrada selecionada - + Text Replace List for Preview and Export Lista de Substituição de Texto para o Preview ou Exportação @@ -3679,57 +3628,57 @@ GuiProjectEditStatus - + Name Nome - + Novel File Status Levels Níves de Estado do Arquivo do Livro - + Note File Importance Levels Níves de Importância do Arquivo do Livro - + New Item Novo Item - + New Novo - + Delete Remover - + Save Salvar - + Colour Cor - + Select Colour Selecione a Cor - + Cannot delete status item that is in use. Não é possível remover um item de status que estja em uso. - + {0} [{1}] @@ -3737,7 +3686,7 @@ GuiProjectLoad - + novelWriter Project File ({0}) Arquivo de Projeto do novelWriter ({0}) @@ -3772,42 +3721,32 @@ Caminho - + New Novo - + Open novelWriter Project Abrir um Projeto do novelWriter - + Remove Entry Remover Entrada - + Remove '{0}' from the recent projects list? The project files will not be deleted. Remover {0} da lista de projetos recentes? Os arquivos do projeto não serão removidos. - + Remove Remover - - Open - Abrir - - - - Cancel - Cancelar - - - + All files ({0}) Todos os arquivos ({0}) @@ -3839,16 +3778,6 @@ Auto-Replace Substituição Automática - - - Cancel - Cancelar - - - - OK - OK - GuiProjectTree @@ -4072,35 +4001,25 @@ Remove a entrada selecionada - + Cannot add a blank word. Não é possível adicionar uma palavra em branco. - + The word '{0}' is already in the word list. A palavra '{0}' já está na lista de palavras. - - - Save - Salvar - - - - Close - Fechar - GuiWritingStats - + JSON Data File (.json) Aruivo de Dados JSON (.json) - + CSV Data File (.csv) Arquivo de Dados CSV (.csv) @@ -4195,20 +4114,15 @@ 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. - - - Close - Fechar - Idle @@ -4225,17 +4139,17 @@ Mostrar tempo ocioso - + JSON Data File Aruivo de Dados JSON - + CSV Data File Arquivo de Dados CSV - + Save Data As Salvar Dados Como @@ -4268,14 +4182,6 @@ Não foi possível remover o arquivo do documento. - - NWErrorMessage - - - Close - Fechar - - NWProject @@ -4577,42 +4483,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} @@ -4620,27 +4526,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. @@ -4648,7 +4554,7 @@ ProjWizardFolderPage - + Select Project Folder Selecione o Diretório do Projeto @@ -4719,42 +4625,216 @@ 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 - QuotesDialog + QDialogButtonBox - - Cancel - Cancelar + + OK + OK + + + + QGnomeTheme + + + &OK + - + + &Save + + + + + &Cancel + + + + + &Close + + + + + Close without Saving + + + + + QPlatformTheme + + OK - OK + + + + + Save + Salvar + + + + Save All + + + + + Open + + + + + &Yes + + + + + Yes to &All + + + + + &No + + + + + N&o to All + + + + + Abort + + + + + Retry + + + + + Ignore + + + + + Close + Fechar + + + + Cancel + + + + + Discard + + + + + Help + + + + + Apply + + + + + Reset + + + + + Restore Defaults + + + + + QWizard + + + &Next > + + + + + Go Back + + + + + < &Back + + + + + Continue + + + + + &Next + + + + + Commit + + + + + Done + Pronto + + + + &Finish + + + + + Cancel + Cancelar + + + + Help + + + + + &Help + A&juda diff --git a/novelWriter.pro b/novelWriter.pro index 82f33934..33f73e45 100644 --- a/novelWriter.pro +++ b/novelWriter.pro @@ -1,4 +1,5 @@ SOURCES += \ + i18n/dummy_qtbase.py \ nw/constants/constants.py \ nw/core/document.py \ nw/core/project.py \ diff --git a/nw/config.py b/nw/config.py index 5e532e73..a24aef0a 100644 --- a/nw/config.py +++ b/nw/config.py @@ -377,7 +377,6 @@ class Config: self.qtTrans = {} langList = [ - (self.qtLangPath, "qt"), # Qt 4.x (self.qtLangPath, "qtbase"), # Qt 5.x (self.nwLangPath, "qtbase"), # Alternative Qt 5.x (self.nwLangPath, "nw"), # novelWriter From 837ad7e39cb60c1bdcb38695d5cef1a6c9106cce Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:19:10 +0100 Subject: [PATCH 3/7] Fix tests --- nw/gui/writingstats.py | 2 +- tests/test_gui/test_gui_dialogs.py | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/nw/gui/writingstats.py b/nw/gui/writingstats.py index 58c56516..d87d22df 100644 --- a/nw/gui/writingstats.py +++ b/nw/gui/writingstats.py @@ -369,7 +369,7 @@ class GuiWritingStats(QDialog): savePath = os.path.join(saveDir, fileName) savePath, _ = QFileDialog.getSaveFileName( - self, self.tr("Save Data As"), savePath + self, self.tr("Save Data As"), savePath, "%s (*.%s)" % (textFmt, fileExt) ) if not savePath: return False diff --git a/tests/test_gui/test_gui_dialogs.py b/tests/test_gui/test_gui_dialogs.py index f4f6f27d..239bd7b5 100644 --- a/tests/test_gui/test_gui_dialogs.py +++ b/tests/test_gui/test_gui_dialogs.py @@ -59,14 +59,3 @@ def testGuiDialogs_Quotes(qtbot, monkeypatch, nwGUI, nwMinimal): nwQuot.close() # END Test testDialogs_Quotes - -@pytest.mark.gui -def testGuiDialogs_Other(qtbot, monkeypatch, nwGUI, tmpDir): - """Various other dialog tests. - """ - monkeypatch.setattr(QFileDialog, "getExistingDirectory", lambda *args, **kwargs: tmpDir) - assert nwGUI.selectProjectPath() == tmpDir - - # qtbot.stopForInteraction() - -# END Test testGuiDialogs_Other From 71ad3fc51d9c5a3b5bc35b051e30b9f1a50389bd Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:21:49 +0100 Subject: [PATCH 4/7] Fix flake8 error --- tests/test_gui/test_gui_dialogs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_gui/test_gui_dialogs.py b/tests/test_gui/test_gui_dialogs.py index 239bd7b5..f432b155 100644 --- a/tests/test_gui/test_gui_dialogs.py +++ b/tests/test_gui/test_gui_dialogs.py @@ -23,7 +23,7 @@ along with this program. If not, see . import pytest from PyQt5.QtCore import QItemSelectionModel -from PyQt5.QtWidgets import QListWidgetItem, QDialog, QFileDialog, QMessageBox +from PyQt5.QtWidgets import QListWidgetItem, QDialog, QMessageBox from nw.gui.custom import QuotesDialog From b868477406d09edbcd844ed346f95fd5a5a9e215 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Feb 2021 13:39:48 +0100 Subject: [PATCH 5/7] Change minimum Qt version to 5.3 --- nw/__init__.py | 8 ++++---- nw/gui/doceditor.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nw/__init__.py b/nw/__init__.py index 54ccd759..6d53ead4 100644 --- a/nw/__init__.py +++ b/nw/__init__.py @@ -221,14 +221,14 @@ def main(sysArgs=None): "At least Python 3.6.0 is required, found %s." % CONFIG.verPyString ) errorCode |= 4 - if CONFIG.verQtValue < 50200: + if CONFIG.verQtValue < 50300: errorData.append( - "At least Qt5 version 5.2 is required, found %s." % CONFIG.verQtString + "At least Qt5 version 5.3 is required, found %s." % CONFIG.verQtString ) errorCode |= 8 - if CONFIG.verPyQtValue < 50200: + if CONFIG.verPyQtValue < 50300: errorData.append( - "At least PyQt5 version 5.2 is required, found %s." % CONFIG.verPyQtString + "At least PyQt5 version 5.3 is required, found %s." % CONFIG.verPyQtString ) errorCode |= 16 diff --git a/nw/gui/doceditor.py b/nw/gui/doceditor.py index 9f4949a4..f5269769 100644 --- a/nw/gui/doceditor.py +++ b/nw/gui/doceditor.py @@ -2050,7 +2050,7 @@ class GuiDocEditSearch(QFrame): self._alertSearchValid(theRegEx.isValid()) return theRegEx - elif self.mainConf.verQtValue >= 50300: + else: # >= 50300 to < 51300 if self.isCaseSense: rxOpt = Qt.CaseSensitive else: From c9cab47ce0f1656267ba4431fe3704e04b85600b Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Feb 2021 13:40:26 +0100 Subject: [PATCH 6/7] Minor code changes for consistency --- nw/core/project.py | 2 +- nw/core/tomd.py | 2 +- nw/gui/projload.py | 4 ++-- nw/gui/projwizard.py | 6 +++--- nw/guimain.py | 9 +++------ 5 files changed, 10 insertions(+), 13 deletions(-) diff --git a/nw/core/project.py b/nw/core/project.py index ad43e817..b5f1bafd 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -583,7 +583,7 @@ class NWProject(): if errList: self.makeAlert(errList, nwAlert.ERROR) - # Clean up old files + # Clean up no longer used files self._deprecatedFiles() # Update recent projects diff --git a/nw/core/tomd.py b/nw/core/tomd.py index b45d2e6c..3167b204 100644 --- a/nw/core/tomd.py +++ b/nw/core/tomd.py @@ -77,7 +77,7 @@ class ToMarkdown(Tokenizer): self.FMT_D_B : "", self.FMT_D_E : "", } else: - # GitHub and novelWriter + # GitHub mdTags = { self.FMT_B_B : "**", self.FMT_B_E : "**", self.FMT_I_B : "_", self.FMT_I_E : "_", diff --git a/nw/gui/projload.py b/nw/gui/projload.py index bb5bedfe..5a5e8de4 100644 --- a/nw/gui/projload.py +++ b/nw/gui/projload.py @@ -186,10 +186,10 @@ class GuiProjectLoad(QDialog): logger.verbose("GuiProjectLoad browse button clicked") extFilter = [ self.tr("novelWriter Project File ({0})").format(nwFiles.PROJ_FILE), - self.tr("All files ({0})").format("*.*"), + self.tr("All files ({0})").format("*"), ] projFile, _ = QFileDialog.getOpenFileName( - self, self.tr("Open novelWriter Project"), "", filter=";;".join(extFilter) + self, self.tr("Open Project"), "", filter=";;".join(extFilter) ) if projFile: thePath = os.path.abspath(os.path.dirname(projFile)) diff --git a/nw/gui/projwizard.py b/nw/gui/projwizard.py index 6689a31e..951b8211 100644 --- a/nw/gui/projwizard.py +++ b/nw/gui/projwizard.py @@ -409,9 +409,9 @@ class ProjWizardFinalPage(QWizardPage): self.setTitle(self.tr("Finished")) self.theText = QLabel( - "

{done}

{help}

".format( - done = self.tr("All done."), - help = self.tr("Press '{0}' to create the new project.").format( + "

%s

%s

" % ( + self.tr("All done."), + self.tr("Press '{0}' to create the new project.").format( self.tr("Done") if self.mainConf.osDarwin else self.tr("Finish") ) ) diff --git a/nw/guimain.py b/nw/guimain.py index 3ea15162..ded0579c 100644 --- a/nw/guimain.py +++ b/nw/guimain.py @@ -550,12 +550,9 @@ class GuiMain(QMainWindow): logger.error("No project open") return False - if self.theProject.projPath is None: - return False - self.treeView.saveTreeOrder() - self.theProject.saveProject(autoSave=autoSave) - self.theIndex.saveIndex() + if self.theProject.saveProject(autoSave=autoSave): + self.theIndex.saveIndex() return True @@ -700,7 +697,7 @@ class GuiMain(QMainWindow): self.tr("Text files ({0})").format("*.txt"), self.tr("Markdown files ({0})").format("*.md"), self.tr("novelWriter files ({0})").format("*.nwd"), - self.tr("All files ({0})").format("*.*"), + self.tr("All files ({0})").format("*"), ] loadFile, _ = QFileDialog.getOpenFileName( self, self.tr("Import File"), lastPath, filter=";;".join(extFilter) From dd444ccc8ab1239bbfe5c3507a335c17d4f7a516 Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" <1619840+vkbo@users.noreply.github.com> Date: Sat, 20 Feb 2021 13:44:37 +0100 Subject: [PATCH 7/7] Update TS files --- i18n/nw_nb_NO.ts | 52 +++++++++++++++++------------------- i18n/nw_pt.ts | 68 +++++++++++++++++++++++------------------------- 2 files changed, 56 insertions(+), 64 deletions(-) diff --git a/i18n/nw_nb_NO.ts b/i18n/nw_nb_NO.ts index bb7aa403..c29ad4b3 100644 --- a/i18n/nw_nb_NO.ts +++ b/i18n/nw_nb_NO.ts @@ -1,5 +1,6 @@ - + + Common @@ -1359,7 +1360,7 @@ Ønsker du å lukke dette prosjektet? - + Changes are saved automatically. Endringer lagres automatisk. @@ -1399,102 +1400,102 @@ Prosjektets indeks er utdatert eller skadet. Bygger indeksen på nytt.
- + Text files ({0}) Tekstfiler ({0}) - + Markdown files ({0}) Markdown-filer ({0}) - + novelWriter files ({0}) novelWriter-filer ({0}) - + All files ({0}) Alle filer ({0}) - + Import File Importer fil - + Could not read file. The file must be an existing text file. Kunne ikke lese filen. Filen må eksistere fra før av. - + Please open a document to import the text file into. Vennligst åpne et dokument hvor teksten i filen kan importeres. - + Import Document Importer dokument - + Importing the file will overwrite the current content of the document. Do you want to proceed? Å importere filen vil overskrive all eksisterende tekst i dokumentet. Ønsker du å fortsette? - + Indexing: '{0}' Indekserer: '{0}' - + Unknown item Ukjent enhet - + Indexing completed in {0} ms Indekseringen tok {0} ms - + The project index has been successfully rebuilt. Prosjektets indeks har blitt bygget på nytt. - + Information Informasjon - + Warning Advarsel - + Error Feil - + This is a bug! Dette er en systemfeil! - + Internal Error Intern feil - + Exit Avslutt - + Do you want to exit novelWriter? Ønsker du å avslutte novelWriter? @@ -3686,7 +3687,7 @@ GuiProjectLoad - + Open Project Åpne prosjekt @@ -3735,11 +3736,6 @@ All files ({0}) Alle filer ({0}) - - - Open novelWriter Project - Åpne novelWriter-prosjekt - Remove Entry diff --git a/i18n/nw_pt.ts b/i18n/nw_pt.ts index bb66cfc1..e63d76f5 100644 --- a/i18n/nw_pt.ts +++ b/i18n/nw_pt.ts @@ -1,5 +1,6 @@ - + + Common @@ -1314,32 +1315,32 @@ Nota: Se o programa ou o computador sofreu uma falha anteriormente, o bloqueio pode ser sobrescrito com segurança. Se, no entanto, outra instância do novelWriter esteja com o projeto aberto, sobrescrever o bloqueio pode corromper o projeto e não é recomendado. - + Unknown item Item desconhecido - + Information Informação - + Warning Alerta - + Error Erro - + This is a bug! Isto é um bug! - + Internal Error Erro Interno @@ -1374,7 +1375,7 @@ Fechar o projeto atual? - + Changes are saved automatically. As alterações serão salvas automaticamente. @@ -1394,47 +1395,47 @@ Projeto Bloqueado - + Import File Importar Arquivo - + Could not read file. The file must be an existing text file. Não foi possível ler o arquivo. O arquivo deve ser um arquivo de texto existente. - + Please open a document to import the text file into. Por favor, abra um documento para importar o text nele. - + Import Document Importar Documento - + Importing the file will overwrite the current content of the document. Do you want to proceed? Importar o arquivo vai sobrescrever o conteúdo atual do documento. Você deseja continuar? - + The project index has been successfully rebuilt. O índice do projeto foi reconstruído com sucesso. - + Exit Sair - + Do you want to exit novelWriter? Você deseja realmente sair do novelWriter? - + Indexing completed in {0} ms Indexação completa em {0} ms @@ -1474,27 +1475,27 @@ O projeto foi bloqueado pelo computador '{0}' ({1} {2}), ativo pela última vez em {3}. - + Indexing: '{0}' Indexando: '{0}' - + Text files ({0}) Arquivos de texto ({0}) - + Markdown files ({0}) Arquivos Markdown ({0}) - + novelWriter files ({0}) Arquivos do novelWriter ({0}) - + All files ({0}) Todos os arquivos ({0}) @@ -3691,7 +3692,7 @@ Arquivo de Projeto do novelWriter ({0}) - + Open Project Abrir Projeto @@ -3725,11 +3726,6 @@ New Novo - - - Open novelWriter Project - Abrir um Projeto do novelWriter - Remove Entry @@ -4655,7 +4651,7 @@ OK - OK + OK @@ -4691,12 +4687,12 @@ OK - + OK Save - Salvar + Salvar @@ -4746,12 +4742,12 @@ Close - Fechar + Fechar Cancel - + Cancelar @@ -4814,7 +4810,7 @@ Done - Pronto + Pronto @@ -4824,7 +4820,7 @@ Cancel - Cancelar + Cancelar @@ -4834,7 +4830,7 @@ &Help - A&juda + A&juda