Fix various bugs and minor issues (#1626)

This commit is contained in:
Veronica Berglyd Olsen
2023-11-27 16:17:01 +01:00
committed by GitHub
12 changed files with 236 additions and 186 deletions
+32 -32
View File
@@ -1183,7 +1183,7 @@
<name>GuiDocViewerPanel</name>
<message>
<location filename="../novelwriter/gui/docviewerpanel.py" line="60" />
<source>Backreferences</source>
<source>References</source>
<translation type="unfinished" />
</message>
</context>
@@ -1269,123 +1269,123 @@
<context>
<name>GuiMain</name>
<message>
<location filename="../novelwriter/guimain.py" line="355" />
<location filename="../novelwriter/guimain.py" line="345" />
<source>novelWriter is ready ...</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="390" />
<location filename="../novelwriter/guimain.py" line="380" />
<source>Cannot create a new project when another project is open.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="407" />
<location filename="../novelwriter/guimain.py" line="397" />
<source>A project already exists in that location. Please choose another folder.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="433" />
<location filename="../novelwriter/guimain.py" line="423" />
<source>Close the current project?</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1107" />
<location filename="../novelwriter/guimain.py" line="434" />
<location filename="../novelwriter/guimain.py" line="1097" />
<location filename="../novelwriter/guimain.py" line="424" />
<source>Changes are saved automatically.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="447" />
<location filename="../novelwriter/guimain.py" line="437" />
<source>Backup the current project?</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="494" />
<location filename="../novelwriter/guimain.py" line="484" />
<source>The project is already open by another instance of novelWriter, and is therefore locked. Override lock and continue anyway?</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="499" />
<location filename="../novelwriter/guimain.py" line="489" />
<source>Note: If the program or the computer previously crashed, the lock can safely be overridden. However, overriding it is not recommended if the project is open in another instance of novelWriter. Doing so may corrupt the project.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="507" />
<location filename="../novelwriter/guimain.py" line="497" />
<source>The project was locked by the computer '{0}' ({1} {2}), last active on {3}.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="554" />
<location filename="../novelwriter/guimain.py" line="544" />
<source>The project index is outdated or broken. Rebuilding index.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="726" />
<location filename="../novelwriter/guimain.py" line="716" />
<source>Text files ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="727" />
<location filename="../novelwriter/guimain.py" line="717" />
<source>Markdown files ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="728" />
<location filename="../novelwriter/guimain.py" line="718" />
<source>novelWriter files ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="729" />
<location filename="../novelwriter/guimain.py" line="719" />
<source>All files ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="732" />
<location filename="../novelwriter/guimain.py" line="722" />
<source>Import File</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="746" />
<location filename="../novelwriter/guimain.py" line="736" />
<source>Could not read file. The file must be an existing text file.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="752" />
<location filename="../novelwriter/guimain.py" line="742" />
<source>Please open a document to import the text file into.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="758" />
<location filename="../novelwriter/guimain.py" line="748" />
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="837" />
<location filename="../novelwriter/guimain.py" line="827" />
<source>Indexing completed in {0} ms</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="844" />
<location filename="../novelwriter/guimain.py" line="834" />
<source>The project index has been successfully rebuilt.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="890" />
<location filename="../novelwriter/guimain.py" line="880" />
<source>Some changes will not be applied until novelWriter has been restarted.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1084" />
<location filename="../novelwriter/guimain.py" line="1074" />
<source>Could not initialise the dialog.</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1106" />
<location filename="../novelwriter/guimain.py" line="1096" />
<source>Do you want to exit novelWriter?</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1558" />
<location filename="../novelwriter/guimain.py" line="1548" />
<source>Could not find the reference for tag '{0}'. It either doesn't exist, or the index is out of date. The index can be updated from the Tools menu, or by pressing {1}.</source>
<translation type="unfinished" />
</message>
@@ -3289,7 +3289,7 @@
<context>
<name>GuiProjectLoad</name>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="197" />
<location filename="../novelwriter/dialogs/projload.py" line="196" />
<location filename="../novelwriter/dialogs/projload.py" line="80" />
<source>Open Project</source>
<translation type="unfinished" />
@@ -3320,27 +3320,27 @@
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="136" />
<location filename="../novelwriter/dialogs/projload.py" line="135" />
<source>New</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="139" />
<location filename="../novelwriter/dialogs/projload.py" line="138" />
<source>Remove</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<location filename="../novelwriter/dialogs/projload.py" line="192" />
<source>novelWriter Project File ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="194" />
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<source>All files ({0})</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="231" />
<location filename="../novelwriter/dialogs/projload.py" line="230" />
<source>Remove '{0}' from the recent projects list? The project files will not be deleted.</source>
<translation type="unfinished" />
</message>
+33 -33
View File
@@ -1183,8 +1183,8 @@
<name>GuiDocViewerPanel</name>
<message>
<location filename="../novelwriter/gui/docviewerpanel.py" line="60" />
<source>Backreferences</source>
<translation>Backreferences</translation>
<source>References</source>
<translation>References</translation>
</message>
</context>
<context>
@@ -1269,123 +1269,123 @@
<context>
<name>GuiMain</name>
<message>
<location filename="../novelwriter/guimain.py" line="355" />
<location filename="../novelwriter/guimain.py" line="345" />
<source>novelWriter is ready ...</source>
<translation>novelWriter is ready ...</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="390" />
<location filename="../novelwriter/guimain.py" line="380" />
<source>Cannot create a new project when another project is open.</source>
<translation>Cannot create a new project when another project is open.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="407" />
<location filename="../novelwriter/guimain.py" line="397" />
<source>A project already exists in that location. Please choose another folder.</source>
<translation>A project already exists in that location. Please choose another folder.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="433" />
<location filename="../novelwriter/guimain.py" line="423" />
<source>Close the current project?</source>
<translation>Close the current project?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1107" />
<location filename="../novelwriter/guimain.py" line="434" />
<location filename="../novelwriter/guimain.py" line="1097" />
<location filename="../novelwriter/guimain.py" line="424" />
<source>Changes are saved automatically.</source>
<translation>Changes are saved automatically.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="447" />
<location filename="../novelwriter/guimain.py" line="437" />
<source>Backup the current project?</source>
<translation>Backup the current project?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="494" />
<location filename="../novelwriter/guimain.py" line="484" />
<source>The project is already open by another instance of novelWriter, and is therefore locked. Override lock and continue anyway?</source>
<translation>The project is already open by another instance of novelWriter, and is therefore locked. Override lock and continue anyway?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="499" />
<location filename="../novelwriter/guimain.py" line="489" />
<source>Note: If the program or the computer previously crashed, the lock can safely be overridden. However, overriding it is not recommended if the project is open in another instance of novelWriter. Doing so may corrupt the project.</source>
<translation>Note: If the program or the computer previously crashed, the lock can safely be overridden. However, overriding it is not recommended if the project is open in another instance of novelWriter. Doing so may corrupt the project.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="507" />
<location filename="../novelwriter/guimain.py" line="497" />
<source>The project was locked by the computer '{0}' ({1} {2}), last active on {3}.</source>
<translation>The project was locked by the computer '{0}' ({1} {2}), last active on {3}.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="554" />
<location filename="../novelwriter/guimain.py" line="544" />
<source>The project index is outdated or broken. Rebuilding index.</source>
<translation>The project index is outdated or broken. Rebuilding index.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="726" />
<location filename="../novelwriter/guimain.py" line="716" />
<source>Text files ({0})</source>
<translation>Text files ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="727" />
<location filename="../novelwriter/guimain.py" line="717" />
<source>Markdown files ({0})</source>
<translation>Markdown files ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="728" />
<location filename="../novelwriter/guimain.py" line="718" />
<source>novelWriter files ({0})</source>
<translation>novelWriter files ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="729" />
<location filename="../novelwriter/guimain.py" line="719" />
<source>All files ({0})</source>
<translation>All files ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="732" />
<location filename="../novelwriter/guimain.py" line="722" />
<source>Import File</source>
<translation>Import File</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="746" />
<location filename="../novelwriter/guimain.py" line="736" />
<source>Could not read file. The file must be an existing text file.</source>
<translation>Could not read file. The file must be an existing text file.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="752" />
<location filename="../novelwriter/guimain.py" line="742" />
<source>Please open a document to import the text file into.</source>
<translation>Please open a document to import the text file into.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="758" />
<location filename="../novelwriter/guimain.py" line="748" />
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>Importing the file will overwrite the current content of the document. Do you want to proceed?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="837" />
<location filename="../novelwriter/guimain.py" line="827" />
<source>Indexing completed in {0} ms</source>
<translation>Indexing completed in {0} ms</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="844" />
<location filename="../novelwriter/guimain.py" line="834" />
<source>The project index has been successfully rebuilt.</source>
<translation>The project index has been successfully rebuilt.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="890" />
<location filename="../novelwriter/guimain.py" line="880" />
<source>Some changes will not be applied until novelWriter has been restarted.</source>
<translation>Some changes will not be applied until novelWriter has been restarted.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1084" />
<location filename="../novelwriter/guimain.py" line="1074" />
<source>Could not initialise the dialog.</source>
<translation>Could not initialize the dialog.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1106" />
<location filename="../novelwriter/guimain.py" line="1096" />
<source>Do you want to exit novelWriter?</source>
<translation>Do you want to exit novelWriter?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1558" />
<location filename="../novelwriter/guimain.py" line="1548" />
<source>Could not find the reference for tag '{0}'. It either doesn't exist, or the index is out of date. The index can be updated from the Tools menu, or by pressing {1}.</source>
<translation>Could not find the reference for tag '{0}'. It either doesn't exist, or the index is out of date. The index can be updated from the Tools menu, or by pressing {1}.</translation>
</message>
@@ -3289,7 +3289,7 @@
<context>
<name>GuiProjectLoad</name>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="197" />
<location filename="../novelwriter/dialogs/projload.py" line="196" />
<location filename="../novelwriter/dialogs/projload.py" line="80" />
<source>Open Project</source>
<translation>Open Project</translation>
@@ -3320,27 +3320,27 @@
<translation>Path</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="136" />
<location filename="../novelwriter/dialogs/projload.py" line="135" />
<source>New</source>
<translation>New</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="139" />
<location filename="../novelwriter/dialogs/projload.py" line="138" />
<source>Remove</source>
<translation>Remove</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<location filename="../novelwriter/dialogs/projload.py" line="192" />
<source>novelWriter Project File ({0})</source>
<translation>novelWriter Project File ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="194" />
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<source>All files ({0})</source>
<translation>All files ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="231" />
<location filename="../novelwriter/dialogs/projload.py" line="230" />
<source>Remove '{0}' from the recent projects list? The project files will not be deleted.</source>
<translation>Remove '{0}' from the recent projects list? The project files will not be deleted.</translation>
</message>
+33 -33
View File
@@ -1183,8 +1183,8 @@
<name>GuiDocViewerPanel</name>
<message>
<location filename="../novelwriter/gui/docviewerpanel.py" line="60" />
<source>Backreferences</source>
<translation>バック参照</translation>
<source>References</source>
<translation>参照</translation>
</message>
</context>
<context>
@@ -1269,123 +1269,123 @@
<context>
<name>GuiMain</name>
<message>
<location filename="../novelwriter/guimain.py" line="355" />
<location filename="../novelwriter/guimain.py" line="345" />
<source>novelWriter is ready ...</source>
<translation>novelWriterの準備ができました...</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="390" />
<location filename="../novelwriter/guimain.py" line="380" />
<source>Cannot create a new project when another project is open.</source>
<translation>別のプロジェクトが開いている場合、新しいプロジェクトを作成できません。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="407" />
<location filename="../novelwriter/guimain.py" line="397" />
<source>A project already exists in that location. Please choose another folder.</source>
<translation>プロジェクトは既にその場所に存在します。別のフォルダーを選択してください。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="433" />
<location filename="../novelwriter/guimain.py" line="423" />
<source>Close the current project?</source>
<translation>現在のプロジェクトを閉じますか?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1107" />
<location filename="../novelwriter/guimain.py" line="434" />
<location filename="../novelwriter/guimain.py" line="1097" />
<location filename="../novelwriter/guimain.py" line="424" />
<source>Changes are saved automatically.</source>
<translation>変更は自動的に保存されます。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="447" />
<location filename="../novelwriter/guimain.py" line="437" />
<source>Backup the current project?</source>
<translation>現在のプロジェクトをバックアップしますか?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="494" />
<location filename="../novelwriter/guimain.py" line="484" />
<source>The project is already open by another instance of novelWriter, and is therefore locked. Override lock and continue anyway?</source>
<translation>プロジェクトは既に別のnovelWriterのインスタンスによって開かれているためロックされています。無視して続行しますか?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="499" />
<location filename="../novelwriter/guimain.py" line="489" />
<source>Note: If the program or the computer previously crashed, the lock can safely be overridden. However, overriding it is not recommended if the project is open in another instance of novelWriter. Doing so may corrupt the project.</source>
<translation>注意: プログラムまたはコンピュータが以前にクラッシュした場合、ロックを無視しても安全に続行することができます。 ただし、novelWriterの別のインスタンスでプロジェクトが開いている場合は、無視して続行することは推奨されません。プロジェクトが破損する可能性があります。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="507" />
<location filename="../novelwriter/guimain.py" line="497" />
<source>The project was locked by the computer '{0}' ({1} {2}), last active on {3}.</source>
<translation>このプロジェクトは、コンピューター '{0}' ({1} {2}) によってロックされました。最後に有効になったのは {3} です。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="554" />
<location filename="../novelwriter/guimain.py" line="544" />
<source>The project index is outdated or broken. Rebuilding index.</source>
<translation>プロジェクトインデックスが古くなっているか、破損しています。インデックスを再構築します。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="726" />
<location filename="../novelwriter/guimain.py" line="716" />
<source>Text files ({0})</source>
<translation>テキストファイル ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="727" />
<location filename="../novelwriter/guimain.py" line="717" />
<source>Markdown files ({0})</source>
<translation>マークダウンファイル ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="728" />
<location filename="../novelwriter/guimain.py" line="718" />
<source>novelWriter files ({0})</source>
<translation>novelWriterファイル ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="729" />
<location filename="../novelwriter/guimain.py" line="719" />
<source>All files ({0})</source>
<translation>すべてのファイル ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="732" />
<location filename="../novelwriter/guimain.py" line="722" />
<source>Import File</source>
<translation>ファイルをインポート</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="746" />
<location filename="../novelwriter/guimain.py" line="736" />
<source>Could not read file. The file must be an existing text file.</source>
<translation>ファイルを読み込めませんでした。ファイルは既存のテキストファイルである必要があります。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="752" />
<location filename="../novelwriter/guimain.py" line="742" />
<source>Please open a document to import the text file into.</source>
<translation>テキストファイルをインポートするには、ドキュメントを開いてください。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="758" />
<location filename="../novelwriter/guimain.py" line="748" />
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>ファイルをインポートするとドキュメントの現在の内容が上書きされます。続行しますか?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="837" />
<location filename="../novelwriter/guimain.py" line="827" />
<source>Indexing completed in {0} ms</source>
<translation>インデックス作成は {0} ミリ秒で完了しました</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="844" />
<location filename="../novelwriter/guimain.py" line="834" />
<source>The project index has been successfully rebuilt.</source>
<translation>プロジェクト インデックスが正常に再構築されました。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="890" />
<location filename="../novelwriter/guimain.py" line="880" />
<source>Some changes will not be applied until novelWriter has been restarted.</source>
<translation>いくつかの変更は、novelWriterが再起動されるまで適用されません。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1084" />
<location filename="../novelwriter/guimain.py" line="1074" />
<source>Could not initialise the dialog.</source>
<translation>ダイアログを初期化できませんでした。</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1106" />
<location filename="../novelwriter/guimain.py" line="1096" />
<source>Do you want to exit novelWriter?</source>
<translation>novelWriterを終了しますか?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1558" />
<location filename="../novelwriter/guimain.py" line="1548" />
<source>Could not find the reference for tag '{0}'. It either doesn't exist, or the index is out of date. The index can be updated from the Tools menu, or by pressing {1}.</source>
<translation> '{0}' {1} </translation>
</message>
@@ -3289,7 +3289,7 @@
<context>
<name>GuiProjectLoad</name>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="197" />
<location filename="../novelwriter/dialogs/projload.py" line="196" />
<location filename="../novelwriter/dialogs/projload.py" line="80" />
<source>Open Project</source>
<translation></translation>
@@ -3320,27 +3320,27 @@
<translation></translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="136" />
<location filename="../novelwriter/dialogs/projload.py" line="135" />
<source>New</source>
<translation></translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="139" />
<location filename="../novelwriter/dialogs/projload.py" line="138" />
<source>Remove</source>
<translation></translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<location filename="../novelwriter/dialogs/projload.py" line="192" />
<source>novelWriter Project File ({0})</source>
<translation>novelWriterプロジェクトファイル ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="194" />
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<source>All files ({0})</source>
<translation> ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="231" />
<location filename="../novelwriter/dialogs/projload.py" line="230" />
<source>Remove '{0}' from the recent projects list? The project files will not be deleted.</source>
<translation>'{0}'  </translation>
</message>
+33 -33
View File
@@ -1183,8 +1183,8 @@
<name>GuiDocViewerPanel</name>
<message>
<location filename="../novelwriter/gui/docviewerpanel.py" line="60" />
<source>Backreferences</source>
<translation>Referanser hit</translation>
<source>References</source>
<translation>Referanser</translation>
</message>
</context>
<context>
@@ -1269,123 +1269,123 @@
<context>
<name>GuiMain</name>
<message>
<location filename="../novelwriter/guimain.py" line="355" />
<location filename="../novelwriter/guimain.py" line="345" />
<source>novelWriter is ready ...</source>
<translation>novelWriter er klar ...</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="390" />
<location filename="../novelwriter/guimain.py" line="380" />
<source>Cannot create a new project when another project is open.</source>
<translation>Kan ikke lage et nytt prosjekt mens et annet prosjekt er åpent.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="407" />
<location filename="../novelwriter/guimain.py" line="397" />
<source>A project already exists in that location. Please choose another folder.</source>
<translation>Et prosjekt finnes allerede i den mappen. Vennligst velg et annet sted å lagre prosjektet.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="433" />
<location filename="../novelwriter/guimain.py" line="423" />
<source>Close the current project?</source>
<translation>Ønsker du å lukke dette prosjektet?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1107" />
<location filename="../novelwriter/guimain.py" line="434" />
<location filename="../novelwriter/guimain.py" line="1097" />
<location filename="../novelwriter/guimain.py" line="424" />
<source>Changes are saved automatically.</source>
<translation>Endringer lagres automatisk.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="447" />
<location filename="../novelwriter/guimain.py" line="437" />
<source>Backup the current project?</source>
<translation>Ønsker du å ta sikkerhetskopi av dette prosjektet?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="494" />
<location filename="../novelwriter/guimain.py" line="484" />
<source>The project is already open by another instance of novelWriter, and is therefore locked. Override lock and continue anyway?</source>
<translation>Prosjektet er allerede åpent av en annen instans av novelWriter, og er derfor låst. Vil du overstyre denne låsen og fortsette likevel?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="499" />
<location filename="../novelwriter/guimain.py" line="489" />
<source>Note: If the program or the computer previously crashed, the lock can safely be overridden. However, overriding it is not recommended if the project is open in another instance of novelWriter. Doing so may corrupt the project.</source>
<translation>Merk: Hvis programmet eller datamaskinen tidligere krasjet, kan fil-låsen trygt overstyres. Det anbefales imidlertid ikke å overstyre den hvis prosjektet er åpent i en annen instans av novelWriter. Å gjøre det kan skape konflikter i prosjektets filer.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="507" />
<location filename="../novelwriter/guimain.py" line="497" />
<source>The project was locked by the computer '{0}' ({1} {2}), last active on {3}.</source>
<translation>Prosjektet er låst av datamaskinen {0} ({1} {2}), siste registrerte aktivitet var {3}.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="554" />
<location filename="../novelwriter/guimain.py" line="544" />
<source>The project index is outdated or broken. Rebuilding index.</source>
<translation>Prosjektets indeks er utdatert eller skadet. Bygger indeksen på nytt.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="726" />
<location filename="../novelwriter/guimain.py" line="716" />
<source>Text files ({0})</source>
<translation>Tekstfiler ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="727" />
<location filename="../novelwriter/guimain.py" line="717" />
<source>Markdown files ({0})</source>
<translation>Markdown-filer ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="728" />
<location filename="../novelwriter/guimain.py" line="718" />
<source>novelWriter files ({0})</source>
<translation>novelWriter-filer ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="729" />
<location filename="../novelwriter/guimain.py" line="719" />
<source>All files ({0})</source>
<translation>Alle filer ({0})</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="732" />
<location filename="../novelwriter/guimain.py" line="722" />
<source>Import File</source>
<translation>Importer fil</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="746" />
<location filename="../novelwriter/guimain.py" line="736" />
<source>Could not read file. The file must be an existing text file.</source>
<translation>Kunne ikke lese filen. Filen må eksistere fra før av.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="752" />
<location filename="../novelwriter/guimain.py" line="742" />
<source>Please open a document to import the text file into.</source>
<translation>Vennligst åpne et dokument hvor teksten i filen kan importeres.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="758" />
<location filename="../novelwriter/guimain.py" line="748" />
<source>Importing the file will overwrite the current content of the document. Do you want to proceed?</source>
<translation>Å importere filen vil overskrive all eksisterende tekst i dokumentet. Ønsker du å fortsette?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="837" />
<location filename="../novelwriter/guimain.py" line="827" />
<source>Indexing completed in {0} ms</source>
<translation>Indekseringen tok {0} ms</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="844" />
<location filename="../novelwriter/guimain.py" line="834" />
<source>The project index has been successfully rebuilt.</source>
<translation>Prosjektets indeks har blitt bygget på nytt.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="890" />
<location filename="../novelwriter/guimain.py" line="880" />
<source>Some changes will not be applied until novelWriter has been restarted.</source>
<translation>Noen endringer vil ikke tas i bruk før neste gang novelWriter startes.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1084" />
<location filename="../novelwriter/guimain.py" line="1074" />
<source>Could not initialise the dialog.</source>
<translation>Kunne ikke initialisere dialogen.</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1106" />
<location filename="../novelwriter/guimain.py" line="1096" />
<source>Do you want to exit novelWriter?</source>
<translation>Ønsker du å avslutte novelWriter?</translation>
</message>
<message>
<location filename="../novelwriter/guimain.py" line="1558" />
<location filename="../novelwriter/guimain.py" line="1548" />
<source>Could not find the reference for tag '{0}'. It either doesn't exist, or the index is out of date. The index can be updated from the Tools menu, or by pressing {1}.</source>
<translation>Kunne ikke finne referansen til knagg {0}. Enten finnes den ikke, eller er prosjektets indeks ikke oppdatert. Indeksen kan oppdateres fra Verktøy-menyen eller ved å trykke {1}.</translation>
</message>
@@ -3289,7 +3289,7 @@
<context>
<name>GuiProjectLoad</name>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="197" />
<location filename="../novelwriter/dialogs/projload.py" line="196" />
<location filename="../novelwriter/dialogs/projload.py" line="80" />
<source>Open Project</source>
<translation>Åpne prosjekt</translation>
@@ -3320,27 +3320,27 @@
<translation>Filbane</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="136" />
<location filename="../novelwriter/dialogs/projload.py" line="135" />
<source>New</source>
<translation>Ny</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="139" />
<location filename="../novelwriter/dialogs/projload.py" line="138" />
<source>Remove</source>
<translation>Fjern</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<location filename="../novelwriter/dialogs/projload.py" line="192" />
<source>novelWriter Project File ({0})</source>
<translation>novelWriter-prosjektfil ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="194" />
<location filename="../novelwriter/dialogs/projload.py" line="193" />
<source>All files ({0})</source>
<translation>Alle filer ({0})</translation>
</message>
<message>
<location filename="../novelwriter/dialogs/projload.py" line="231" />
<location filename="../novelwriter/dialogs/projload.py" line="230" />
<source>Remove '{0}' from the recent projects list? The project files will not be deleted.</source>
<translation>Vil du fjerne {0} fra listen over tidligere åpnede prosjekter? Selve prosjektfilene blir ikke slettet.</translation>
</message>
+29 -33
View File
@@ -29,8 +29,8 @@ from typing import TYPE_CHECKING
from pathlib import Path
from datetime import datetime
from PyQt5.QtGui import QKeySequence
from PyQt5.QtCore import Qt, QSize
from PyQt5.QtGui import QCloseEvent, QKeySequence
from PyQt5.QtCore import Qt, QSize, pyqtSlot
from PyQt5.QtWidgets import (
QDialog, QHBoxLayout, QVBoxLayout, QGridLayout, QPushButton, QTreeWidget,
QAbstractItemView, QTreeWidgetItem, QDialogButtonBox, QLabel, QShortcut,
@@ -112,8 +112,7 @@ class GuiProjectLoad(QDialog):
self.selPath = QLineEdit("")
self.selPath.setReadOnly(True)
self.browseButton = QPushButton("...")
self.browseButton.setMaximumWidth(int(2.5*SHARED.theme.getTextWidth("...")))
self.browseButton = QPushButton(SHARED.theme.getIcon("browse"), "", self)
self.browseButton.clicked.connect(self._doBrowse)
self.projectForm.addWidget(self.lblRecent, 0, 0, 1, 3)
@@ -159,12 +158,12 @@ class GuiProjectLoad(QDialog):
return
##
# Buttons
# Private Slots
##
def _doOpenRecent(self):
"""Close the dialog window with a recent project selected.
"""
@pyqtSlot()
def _doOpenRecent(self) -> None:
"""Close the dialog window with a recent project selected."""
self._saveSettings()
self.openPath = None
@@ -178,17 +177,17 @@ class GuiProjectLoad(QDialog):
return
def _doSelectRecent(self):
"""A recent item has been selected.
"""
@pyqtSlot()
def _doSelectRecent(self) -> None:
"""Update path when a recent item has been selected."""
selList = self.listBox.selectedItems()
if selList:
self.selPath.setText(selList[0].data(self.C_NAME, self.D_PATH))
return
def _doBrowse(self):
"""Browse for a folder path.
"""
@pyqtSlot()
def _doBrowse(self) -> None:
"""Browse for a folder path."""
extFilter = [
self.tr("novelWriter Project File ({0})").format(nwFiles.PROJ_FILE),
self.tr("All files ({0})").format("*"),
@@ -205,26 +204,26 @@ class GuiProjectLoad(QDialog):
return
def _doCancel(self):
"""Close the dialog window without doing anything.
"""
@pyqtSlot()
def _doCancel(self) -> None:
"""Close the dialog window without doing anything."""
self.openPath = None
self.openState = self.NONE_STATE
self.close()
return
def _doNewProject(self):
"""Create a new project.
"""
@pyqtSlot()
def _doNewProject(self) -> None:
"""Create a new project."""
self._saveSettings()
self.openPath = None
self.openState = self.NEW_STATE
self.accept()
return
def _doDeleteRecent(self):
"""Remove an entry from the recent projects list.
"""
@pyqtSlot()
def _doDeleteRecent(self) -> None:
"""Remove an entry from the recent projects list."""
selList = self.listBox.selectedItems()
if selList:
projName = selList[0].text(self.C_NAME)
@@ -244,20 +243,18 @@ class GuiProjectLoad(QDialog):
# Events
##
def closeEvent(self, theEvent):
"""Capture the user closing the dialog so we can save settings.
"""
def closeEvent(self, event: QCloseEvent) -> None:
"""Capture the user closing the dialog and save settings."""
self._saveSettings()
theEvent.accept()
event.accept()
return
##
# Internal Functions
##
def _saveSettings(self):
"""Save the changes made to the dialog.
"""
def _saveSettings(self) -> None:
"""Save the changes made to the dialog."""
colWidths = [0, 0, 0]
colWidths[self.C_NAME] = self.listBox.columnWidth(self.C_NAME)
colWidths[self.C_COUNT] = self.listBox.columnWidth(self.C_COUNT)
@@ -265,9 +262,8 @@ class GuiProjectLoad(QDialog):
CONFIG.setProjLoadColWidths(colWidths)
return
def _populateList(self):
"""Populate the list box with recent project data.
"""
def _populateList(self) -> None:
"""Populate the list box with recent project data."""
self.listBox.clear()
dataList = CONFIG.recentProjects.listEntries()
sortList = sorted(dataList, key=lambda x: x[3], reverse=True)
+2 -2
View File
@@ -831,11 +831,11 @@ class GuiDocEditor(QPlainTextEdit):
elif insert == nwDocInsert.QUOTE_RD:
text = self._typDQuoteC
elif insert == nwDocInsert.SYNOPSIS:
text = "% Synopsis: "
text = "%Synopsis: "
newBlock = True
goAfter = True
elif insert == nwDocInsert.SHORT:
text = "% Short: "
text = "%Short: "
newBlock = True
goAfter = True
elif insert == nwDocInsert.NEW_PAGE:
+35 -5
View File
@@ -57,7 +57,7 @@ class GuiDocViewerPanel(QWidget):
self.tabBackRefs = _ViewPanelBackRefs(self)
self.mainTabs = QTabWidget(self)
self.mainTabs.addTab(self.tabBackRefs, self.tr("Backreferences"))
self.mainTabs.addTab(self.tabBackRefs, self.tr("References"))
self.kwTabs: dict[str, _ViewPanelKeyWords] = {}
self.idTabs: dict[str, int] = {}
@@ -73,7 +73,7 @@ class GuiDocViewerPanel(QWidget):
self.outerBox.setContentsMargins(0, 0, 0, 0)
self.setLayout(self.outerBox)
self.updateTheme()
self.updateTheme(updateTabs=False)
logger.debug("Ready: GuiDocViewerPanel")
@@ -83,7 +83,7 @@ class GuiDocViewerPanel(QWidget):
# Methods
##
def updateTheme(self) -> None:
def updateTheme(self, updateTabs: bool = True) -> None:
"""Update theme elements."""
vPx = CONFIG.pxInt(4)
lPx = CONFIG.pxInt(2)
@@ -102,6 +102,11 @@ class GuiDocViewerPanel(QWidget):
self.mainTabs.setStyleSheet(styleSheet)
self.updateHandle(self._lastHandle)
if updateTabs:
self.tabBackRefs.updateTheme()
for tab in self.kwTabs.values():
tab.updateTheme()
return
def openProjectTasks(self) -> None:
@@ -218,12 +223,14 @@ class _ViewPanelBackRefs(QTreeWidget):
# Set Header Sizes
treeHeader = self.header()
treeHeader.setStretchLastSection(True)
treeHeader.setMinimumSectionSize(iPx + cMg) # See Issue #1627
treeHeader.setSectionResizeMode(self.C_DOC, QHeaderView.ResizeMode.ResizeToContents)
treeHeader.setSectionResizeMode(self.C_EDIT, QHeaderView.ResizeMode.Fixed)
treeHeader.setSectionResizeMode(self.C_VIEW, QHeaderView.ResizeMode.Fixed)
treeHeader.setSectionResizeMode(self.C_TITLE, QHeaderView.ResizeMode.ResizeToContents)
treeHeader.resizeSection(self.C_EDIT, iPx + cMg)
treeHeader.resizeSection(self.C_VIEW, iPx + cMg)
treeHeader.setSectionsMovable(False)
# Cache Icons Locally
self._editIcon = SHARED.theme.getIcon("edit")
@@ -235,6 +242,16 @@ class _ViewPanelBackRefs(QTreeWidget):
return
def updateTheme(self) -> None:
"""Update theme elements."""
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
for i in range(self.topLevelItemCount()):
if item := self.topLevelItem(i):
item.setIcon(self.C_EDIT, self._editIcon)
item.setIcon(self.C_VIEW, self._viewIcon)
return
def clearContent(self) -> None:
"""Clear the widget."""
self.clear()
@@ -330,6 +347,7 @@ class _ViewPanelKeyWords(QTreeWidget):
super().__init__(parent=parent)
self._parent = parent
self._class = itemClass
self._treeMap: dict[str, QTreeWidgetItem] = {}
iPx = SHARED.theme.baseIconSize
@@ -351,6 +369,7 @@ class _ViewPanelKeyWords(QTreeWidget):
# Set Header Sizes
treeHeader = self.header()
treeHeader.setStretchLastSection(True)
treeHeader.setMinimumSectionSize(iPx + cMg) # See Issue #1627
treeHeader.setSectionResizeMode(self.C_NAME, QHeaderView.ResizeMode.ResizeToContents)
treeHeader.setSectionResizeMode(self.C_EDIT, QHeaderView.ResizeMode.Fixed)
treeHeader.setSectionResizeMode(self.C_VIEW, QHeaderView.ResizeMode.Fixed)
@@ -369,6 +388,17 @@ class _ViewPanelKeyWords(QTreeWidget):
return
def updateTheme(self) -> None:
"""Update theme elements."""
self._classIcon = SHARED.theme.getIcon(nwLabels.CLASS_ICON[self._class])
self._editIcon = SHARED.theme.getIcon("edit")
self._viewIcon = SHARED.theme.getIcon("view")
for i in range(self.topLevelItemCount()):
if item := self.topLevelItem(i):
item.setIcon(self.C_EDIT, self._editIcon)
item.setIcon(self.C_VIEW, self._viewIcon)
return
def countEntries(self) -> int:
"""Return the number of items in the list."""
return self.topLevelItemCount()
@@ -389,8 +419,8 @@ class _ViewPanelKeyWords(QTreeWidget):
iLevel = nwHeaders.H_LEVEL.get(hItem.level, 0) if nwItem.isDocumentLayout() else 5
hDec = SHARED.theme.getHeaderDecorationNarrow(iLevel)
# This can not use a get call to the dictionary as that creates
# some weird issue with Qt, so we need to do this with an if
# This can not use a get call to the dictionary as that would create an
# instance of the QTreeWidgetItem, which has some weird side effects
trItem = self._treeMap[tag] if tag in self._treeMap else QTreeWidgetItem()
trItem.setText(self.C_NAME, name)
+1 -1
View File
@@ -566,7 +566,7 @@ class GuiMainMenu(QMenuBar):
# Insert > Short Description Comment
self.aInsShort = self.mInsComments.addAction(self.tr("Short Description Comment"))
self.aInsShort.setShortcut("Ctrl+K, U")
self.aInsShort.setShortcut("Ctrl+K, H")
self.aInsShort.triggered.connect(
lambda: self.requestDocInsert.emit(nwDocInsert.SHORT)
)
-10
View File
@@ -338,19 +338,9 @@ class GuiMain(QMainWindow):
self.asProjTimer.start()
self.asDocTimer.start()
self.mainStatus.clearStatus()
# Handle Windows Mode
self.showNormal()
logger.debug("Ready: GUI")
if __hexversion__[-2] == "a" and not CONFIG.isDebug:
SHARED.warn(
"You are running an untested development version of novelWriter. "
"Please be careful when you are working on live projects "
"and make sure you take regular backups."
)
logger.info("novelWriter is ready ...")
self.mainStatus.setStatusMessage(self.tr("novelWriter is ready ..."))
+18
View File
@@ -24,6 +24,8 @@ import pytest
from tools import C, buildTestProject
from PyQt5.QtGui import QIcon
from novelwriter import CONFIG, SHARED
from novelwriter.constants import nwLists
from novelwriter.dialogs.editlabel import GuiEditLabel
@@ -91,6 +93,13 @@ def testGuiViewerPanel_BackRefs(qtbot, monkeypatch, nwGUI, projPath, mockRnd):
SHARED.project.index.rebuildIndex()
assert tabBackRefs.topLevelItemCount() == 1
# Test Update Theme
tabBackRefs._editIcon = None
tabBackRefs._viewIcon = None
tabBackRefs.updateTheme()
assert isinstance(tabBackRefs._editIcon, QIcon)
assert isinstance(tabBackRefs._viewIcon, QIcon)
# Click the Edit Button
nwGUI.openDocument(C.hChapterDoc)
assert nwGUI.docEditor.docHandle == C.hChapterDoc
@@ -182,6 +191,15 @@ def testGuiViewerPanel_Tags(qtbot, monkeypatch, caplog, nwGUI, projPath, mockRnd
SHARED.project.index.rebuildIndex()
assert charTab.topLevelItemCount() == 2
# Test Update Theme
charTab._classIcon = None
charTab._editIcon = None
charTab._viewIcon = None
charTab.updateTheme()
assert isinstance(charTab._classIcon, QIcon)
assert isinstance(charTab._editIcon, QIcon)
assert isinstance(charTab._viewIcon, QIcon)
# Remove Non-Existing Tag
caplog.clear()
viewPanel.updateChangedTags(["foo"], ["bar"])
+18 -2
View File
@@ -72,14 +72,30 @@ def testGuiMain_ProjectBlocker(nwGUI):
@pytest.mark.gui
def testGuiMain_Launch(qtbot, monkeypatch, nwGUI, prjLipsum):
def testGuiMain_Launch(qtbot, monkeypatch, nwGUI, projPath):
"""Test the handling of launch tasks."""
monkeypatch.setattr(GuiProjectLoad, "exec_", lambda *a: None)
monkeypatch.setattr(GuiProjectLoad, "result", lambda *a: QDialog.Accepted)
CONFIG.lastNotes = "0x0"
buildTestProject(nwGUI, projPath)
# Open Lipsum project
nwGUI.postLaunchTasks(prjLipsum)
nwGUI.postLaunchTasks(projPath)
nwGUI.closeProject()
# Project open fails
with monkeypatch.context() as mp:
mp.setattr(SHARED, "openProject", lambda *a: False)
assert nwGUI.openProject(projPath) is False
# Handle locked project
with monkeypatch.context() as mp:
mp.setattr(SHARED, "openProject", lambda *a, **k: False)
SHARED._lockedBy = ["a", "b", "c", "d"]
assert nwGUI.openProject(projPath) is False
SHARED._lockedBy = None
assert nwGUI.openProject(projPath) is True
nwGUI.closeProject()
# Check that release notes opened
+2 -2
View File
@@ -591,11 +591,11 @@ def testGuiMenu_Insert(qtbot, monkeypatch, nwGUI, fncPath, projPath, mockRnd):
nwGUI.docEditor.setPlainText("Stuff\n")
nwGUI.mainMenu.aInsSynopsis.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == "Stuff\n% Synopsis: \n"
assert nwGUI.docEditor.getText() == "Stuff\n%Synopsis: \n"
nwGUI.docEditor.setPlainText("Stuff\n")
nwGUI.mainMenu.aInsShort.activate(QAction.Trigger)
assert nwGUI.docEditor.getText() == "Stuff\n% Short: \n"
assert nwGUI.docEditor.getText() == "Stuff\n%Short: \n"
# Insert Break or Space
# =====================