Fix tests

This commit is contained in:
Veronica K. B. Olsen
2021-02-16 23:58:25 +01:00
parent 62cc64d912
commit 4033f7a47d
4 changed files with 14 additions and 8 deletions
+3 -5
View File
@@ -1250,16 +1250,14 @@ class NWProject():
"""
if theLang is None:
theLang = self.mainConf.spellLanguage
if theLang is None:
theLang = "en"
lngShort = theLang.split("_")[0]
loadFile = os.path.join(self.mainConf.langPath, "project_en.json")
chkFile1 = os.path.join(self.mainConf.langPath, "project_%s.json" % theLang)
chkFile2 = os.path.join(self.mainConf.langPath, "project_%s.json" % lngShort)
print(theLang)
print(lngShort)
print(loadFile)
print(chkFile1)
print(chkFile2)
if os.path.isfile(chkFile1):
loadFile = chkFile1
elif os.path.isfile(chkFile2):
+3 -1
View File
@@ -28,8 +28,9 @@ import logging
import re
from operator import itemgetter
from functools import partial
from PyQt5.QtCore import QRegularExpression
from PyQt5.QtCore import QCoreApplication, QRegularExpression
from nw.core.document import NWDoc
from nw.core.tools import numberToRoman
@@ -144,6 +145,7 @@ class Tokenizer():
# Function Mapping
self._localLookup = self.theProject.localLookup
self.tr = partial(QCoreApplication.translate, "Tokenizer")
return