From 3b95b2838c91df29132e63c064a88e3816756b64 Mon Sep 17 00:00:00 2001
From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com>
Date: Fri, 23 Dec 2022 12:28:48 +0100
Subject: [PATCH] Update test and translation file
---
i18n/nw_base.ts | 71 +++++++++++++++-------------
tests/test_core/test_core_storage.py | 5 +-
2 files changed, 42 insertions(+), 34 deletions(-)
diff --git a/i18n/nw_base.ts b/i18n/nw_base.ts
index 4ea4ee03..40a0a839 100644
--- a/i18n/nw_base.ts
+++ b/i18n/nw_base.ts
@@ -3777,163 +3777,168 @@
-
+
+ Could not open project with path: {0}
+
+
+
+ Unknown
-
+ Project file does not appear to be a novelWriterXML file.
-
+ Unknown or unsupported novelWriter project file format. The project cannot be opened by this version of novelWriter. The file was saved with novelWriter version {0}.
-
+ Failed to parse project xml.
-
+ File Version
-
+ The file format of your project is about to be updated. If you proceed, older versions of novelWriter will no longer be able to open this project. Continue?
-
+ Version Conflict
-
+ This project was saved by a newer version of novelWriter, version {0}. This is version {1}. If you continue to open the project, some attributes and settings may not be preserved, but the overall project should be fine. Continue opening the project?
-
+ Opened Project: {0}
-
+ There is no project open.
-
+ Failed to save project.
-
+ Saved Project: {0}
-
+ Backing up project ...
-
+ Cannot backup project because no valid backup path is set. Please set a valid backup location in Preferences.
-
+ Cannot backup project because no project name is set. Please set a Project Name in Project Settings.
-
+ Could not create backup folder.
-
+ Backup from {0}
-
+ Backup archive file written to: {0}
-
+ Could not write backup archive.
-
+ Project backed up to '{0}'
-
-
+
+ New
-
+ Note
-
+ Draft
-
+ Finished
-
+ Minor
-
+ Major
-
+ Main
-
+ Found {0} orphaned file(s) in project folder.
-
+ Recovered
-
+ [{0}] {1}
-
+ Recovered File {0}
-
+ One or more orphaned files could not be added back into the project. Make sure at least a Novel root folder exists.
diff --git a/tests/test_core/test_core_storage.py b/tests/test_core/test_core_storage.py
index 7545a870..8986b65e 100644
--- a/tests/test_core/test_core_storage.py
+++ b/tests/test_core/test_core_storage.py
@@ -64,12 +64,15 @@ def testCoreStorage_OpenProjectInPlace(mockGUI, fncPath, mockRnd):
# Open project as a new project should fail
assert storage.openProjectInPlace(fncPath, newProject=True) is False
- # Opening as a no-new project is fine
+ # Opening as a non-new project is fine
assert storage.openProjectInPlace(fncPath, newProject=False) is True
# Opening the project file is also fine
assert storage.openProjectInPlace(fncPath / nwFiles.PROJ_FILE, newProject=False) is True
+ # Opening as a non-new project on a non-existing folder should fail
+ assert storage.openProjectInPlace(fncPath / "foobar", newProject=False) is False
+
# Check settings
assert storage.storagePath == fncPath
assert storage.runtimePath == fncPath