diff --git a/i18n/nw_nb_NO.ts b/i18n/nw_nb_NO.ts index 2022aec4..5b00cd6d 100644 --- a/i18n/nw_nb_NO.ts +++ b/i18n/nw_nb_NO.ts @@ -1,5 +1,6 @@ - + + Common @@ -477,305 +478,310 @@ 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 + novelWriters 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 + 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} diff --git a/i18n/nw_pt.ts b/i18n/nw_pt.ts index 6f6de948..c0c183be 100644 --- a/i18n/nw_pt.ts +++ b/i18n/nw_pt.ts @@ -422,47 +422,47 @@ 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 + novelWriters Markdown (.json) JSON + Markdown do novelWriter (.json) @@ -477,182 +477,182 @@ 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 @@ -697,12 +697,12 @@ 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'. @@ -712,70 +712,75 @@ 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 + + + Not Set + + 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} diff --git a/nw/core/project.py b/nw/core/project.py index f8bfbecd..ad43e817 100644 --- a/nw/core/project.py +++ b/nw/core/project.py @@ -80,7 +80,7 @@ class NWProject(): self.projContent = None # The full path to the project's content folder self.projDict = None # The spell check dictionary self.projSpell = None # The spell check language, if different than default - self.projLang = None # The project language, if different than default + self.projLang = None # The project language, used for builds self.projFile = None # The file name of the project main XML file # Project Meta @@ -197,7 +197,7 @@ class NWProject(): self.projContent = None self.projDict = None self.projSpell = None - self.projLang = self.mainConf.guiLang + self.projLang = None self.projFile = nwFiles.PROJ_FILE self.projName = "" self.bookTitle = "" @@ -1231,15 +1231,13 @@ class NWProject(): def _loadProjectLocalisation(self): """Load the language data for the current project language. """ - theLang = self.projLang - if theLang is None: - theLang = self.mainConf.spellLanguage - if theLang is None: - theLang = "en" + if self.projLang is None: + self.langData = {} + return False - lngShort = theLang.split("_")[0] + lngShort = self.projLang.split("_")[0] loadFile = os.path.join(self.mainConf.nwLangPath, "project_en.json") - chkFile1 = os.path.join(self.mainConf.nwLangPath, "project_%s.json" % theLang) + chkFile1 = os.path.join(self.mainConf.nwLangPath, "project_%s.json" % self.projLang) chkFile2 = os.path.join(self.mainConf.nwLangPath, "project_%s.json" % lngShort) if os.path.isfile(chkFile1): @@ -1253,7 +1251,7 @@ class NWProject(): logger.debug("Loaded project language file: %s" % os.path.basename(loadFile)) except Exception: - logger.error("Failed to load index file") + logger.error("Failed to project language file") nw.logException() return False diff --git a/nw/gui/build.py b/nw/gui/build.py index df66fbcb..a5234be5 100644 --- a/nw/gui/build.py +++ b/nw/gui/build.py @@ -166,6 +166,7 @@ class GuiBuildNovel(QDialog): self.buildLang = QComboBox() self.buildLang.setMinimumWidth(xFmt) theLangs = self.mainConf.listLanguages(self.mainConf.LANG_PROJ) + self.buildLang.addItem("[%s]" % self.tr("Not Set"), "None") for langID, langName in theLangs: self.buildLang.addItem(langName, langID) diff --git a/tests/lipsum/nwProject.nwx b/tests/lipsum/nwProject.nwx index 5dec55bb..59aee52f 100644 --- a/tests/lipsum/nwProject.nwx +++ b/tests/lipsum/nwProject.nwx @@ -10,6 +10,7 @@ False + en False None True diff --git a/tests/minimal/nwProject.nwx b/tests/minimal/nwProject.nwx index 0405ea25..2ce2a162 100644 --- a/tests/minimal/nwProject.nwx +++ b/tests/minimal/nwProject.nwx @@ -11,7 +11,7 @@ True - None + en False None True diff --git a/tests/reference/coreProject_NewCustomA_nwProject.nwx b/tests/reference/coreProject_NewCustomA_nwProject.nwx index 53695bd8..7673815d 100644 --- a/tests/reference/coreProject_NewCustomA_nwProject.nwx +++ b/tests/reference/coreProject_NewCustomA_nwProject.nwx @@ -11,7 +11,7 @@ True - en_GB + None False None True diff --git a/tests/reference/coreProject_NewCustomB_nwProject.nwx b/tests/reference/coreProject_NewCustomB_nwProject.nwx index 656001e4..baaf3298 100644 --- a/tests/reference/coreProject_NewCustomB_nwProject.nwx +++ b/tests/reference/coreProject_NewCustomB_nwProject.nwx @@ -11,7 +11,7 @@ True - en_GB + None False None True diff --git a/tests/reference/coreProject_NewFile_nwProject.nwx b/tests/reference/coreProject_NewFile_nwProject.nwx index 57f3b0ed..83d80233 100644 --- a/tests/reference/coreProject_NewFile_nwProject.nwx +++ b/tests/reference/coreProject_NewFile_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None False None True diff --git a/tests/reference/coreProject_NewMinimal_nwProject.nwx b/tests/reference/coreProject_NewMinimal_nwProject.nwx index 122efc00..ba867df1 100644 --- a/tests/reference/coreProject_NewMinimal_nwProject.nwx +++ b/tests/reference/coreProject_NewMinimal_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None False None True diff --git a/tests/reference/coreProject_NewRoot_nwProject.nwx b/tests/reference/coreProject_NewRoot_nwProject.nwx index 8a6ae326..d437d4e2 100644 --- a/tests/reference/coreProject_NewRoot_nwProject.nwx +++ b/tests/reference/coreProject_NewRoot_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None False None True diff --git a/tests/reference/guiEditor_Main_Final_nwProject.nwx b/tests/reference/guiEditor_Main_Final_nwProject.nwx index 1cd4a051..6e511bca 100644 --- a/tests/reference/guiEditor_Main_Final_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Final_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None True None True diff --git a/tests/reference/guiEditor_Main_Initial_nwProject.nwx b/tests/reference/guiEditor_Main_Initial_nwProject.nwx index 561fd147..96af56bb 100644 --- a/tests/reference/guiEditor_Main_Initial_nwProject.nwx +++ b/tests/reference/guiEditor_Main_Initial_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None False None True diff --git a/tests/reference/guiItemEditor_Dialog_nwProject.nwx b/tests/reference/guiItemEditor_Dialog_nwProject.nwx index 3f581fad..89beddc9 100644 --- a/tests/reference/guiItemEditor_Dialog_nwProject.nwx +++ b/tests/reference/guiItemEditor_Dialog_nwProject.nwx @@ -9,7 +9,7 @@ True - en_GB + None False None True diff --git a/tests/reference/guiProjSettings_Dialog_nwProject.nwx b/tests/reference/guiProjSettings_Dialog_nwProject.nwx index 4e8674fe..a935bee7 100644 --- a/tests/reference/guiProjSettings_Dialog_nwProject.nwx +++ b/tests/reference/guiProjSettings_Dialog_nwProject.nwx @@ -11,7 +11,7 @@ True - en_GB + None False en True diff --git a/tests/test_core/test_core_toodt.py b/tests/test_core/test_core_toodt.py index f076c85d..9cad2f7d 100644 --- a/tests/test_core/test_core_toodt.py +++ b/tests/test_core/test_core_toodt.py @@ -20,7 +20,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . """ -import nw import pytest from lxml import etree