Fix tests
This commit is contained in:
+3
-5
@@ -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):
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user