Update all translation files and add test (#1251)

This commit is contained in:
Veronica Berglyd Olsen
2022-11-17 17:25:50 +01:00
committed by GitHub
11 changed files with 10881 additions and 11492 deletions
+13 -13
View File
@@ -358,9 +358,9 @@
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="224" />
<location filename="../novelwriter/dialogs/about.py" line="213" />
<location filename="../novelwriter/dialogs/about.py" line="202" />
<location filename="../novelwriter/dialogs/about.py" line="225" />
<location filename="../novelwriter/dialogs/about.py" line="214" />
<location filename="../novelwriter/dialogs/about.py" line="203" />
<location filename="../novelwriter/dialogs/about.py" line="96" />
<source>Licence</source>
<translation type="unfinished" />
@@ -416,31 +416,31 @@
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="198" />
<location filename="../novelwriter/dialogs/about.py" line="199" />
<source>Theme: {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="222" />
<location filename="../novelwriter/dialogs/about.py" line="211" />
<location filename="../novelwriter/dialogs/about.py" line="200" />
<source>Author</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="223" />
<location filename="../novelwriter/dialogs/about.py" line="212" />
<location filename="../novelwriter/dialogs/about.py" line="201" />
<source>Author</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="224" />
<location filename="../novelwriter/dialogs/about.py" line="213" />
<location filename="../novelwriter/dialogs/about.py" line="202" />
<source>Credit</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="209" />
<location filename="../novelwriter/dialogs/about.py" line="210" />
<source>Icons: {0}</source>
<translation type="unfinished" />
</message>
<message>
<location filename="../novelwriter/dialogs/about.py" line="220" />
<location filename="../novelwriter/dialogs/about.py" line="221" />
<source>Syntax: {0}</source>
<translation type="unfinished" />
</message>
+1519 -1517
View File
File diff suppressed because it is too large Load Diff
+938 -938
View File
File diff suppressed because it is too large Load Diff
+1442 -1440
View File
File diff suppressed because it is too large Load Diff
+1438 -1436
View File
File diff suppressed because it is too large Load Diff
+940 -940
View File
File diff suppressed because it is too large Load Diff
+1490 -1488
View File
File diff suppressed because it is too large Load Diff
+1430 -1428
View File
File diff suppressed because it is too large Load Diff
+1610 -2290
View File
File diff suppressed because it is too large Load Diff
+2 -2
View File
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-10 17:56:30">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="1450" autoCount="237" editTime="69742">
<novelWriterXML appVersion="2.0-rc2" hexVersion="0x020000c2" fileVersion="1.5" timeStamp="2022-11-17 16:28:09">
<project id="e2be99af-f9bf-4403-857a-c3d1ac25abea" saveCount="1453" autoCount="237" editTime="69933">
<name>Sample Project</name>
<title>Sample Project</title>
<author>Jane Smith</author>
+59
View File
@@ -0,0 +1,59 @@
"""
novelWriter Main GUI i18n Tests
=================================
This file is a part of novelWriter
Copyright 20182022, Veronica Berglyd Olsen
This program 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.
This program 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. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import sys
import novelwriter
import pytest
from PyQt5.QtWidgets import qApp, QMessageBox
LANG_DATA = novelwriter.CONFIG.listLanguages(novelwriter.CONFIG.LANG_NW)
@pytest.mark.gui
@pytest.mark.skipif(not sys.platform.startswith("linux"), reason="Linux Only")
@pytest.mark.skipif(not LANG_DATA, reason="No i18n Data")
@pytest.mark.parametrize("language", [a for a, b in LANG_DATA])
def testI18n_Localisation(qtbot, monkeypatch, language, fncPath, fncConf):
"""test loading the gui with a specific language.
"""
monkeypatch.setattr(QMessageBox, "warning", lambda *a: QMessageBox.Ok)
monkeypatch.setattr(QMessageBox, "critical", lambda *a: QMessageBox.Ok)
monkeypatch.setattr(QMessageBox, "information", lambda *a: QMessageBox.Ok)
monkeypatch.setattr(QMessageBox, "question", lambda *a: QMessageBox.Yes)
# Set the test langauge
monkeypatch.setattr("novelwriter.CONFIG", fncConf)
fncConf.guiLocale = language
fncConf.initLocalisation(qApp)
nwGUI = novelwriter.main(["--testmode", f"--config={fncPath}", f"--data={fncPath}"])
qtbot.addWidget(nwGUI)
nwGUI.show()
qtbot.wait(20)
nwGUI.closeMain()
# Reset the app language
fncConf.guiLocale = "en_GB"
fncConf.initLocalisation(qApp)
# END Test testI18n_Localisation