The project language files should obviously also be in the i18n folder

This commit is contained in:
Veronica K. B. Olsen
2021-02-17 12:14:57 +01:00
parent 51564d1adc
commit 35b8e389a3
6 changed files with 5 additions and 7 deletions
+1 -3
View File
@@ -76,7 +76,6 @@ class Config:
self.themeRoot = None # The full path to the nw/assets/themes folder
self.dictPath = None # The full path to the nw/assets/dict folder
self.iconPath = None # The full path to the nw/assets/icons folder
self.langPath = None # The full path to the nw/assets/lang folder
self.helpPath = None # The full path to the novelwriter .qhc help file
# Runtime Settings and Variables
@@ -298,7 +297,6 @@ class Config:
self.themeRoot = os.path.join(self.assetPath, "themes")
self.dictPath = os.path.join(self.assetPath, "dict")
self.iconPath = os.path.join(self.assetPath, "icons")
self.langPath = os.path.join(self.assetPath, "lang")
self.appIcon = os.path.join(self.iconPath, "novelwriter.svg")
# Internationalisation
@@ -384,7 +382,7 @@ class Config:
for lngPath, lngBase in langList:
for lngCode in self.qLocal.uiLanguages():
qTrans = QTranslator()
lngFile = "%s_%s" % (lngBase, lngCode)
lngFile = "%s_%s" % (lngBase, lngCode.replace("-", "_"))
if lngFile not in self.qtTrans:
if qTrans.load(lngFile, lngPath):
logger.debug("Loaded: %s" % qTrans.filePath())