The project language files should obviously also be in the i18n folder
This commit is contained in:
+1
-3
@@ -76,7 +76,6 @@ class Config:
|
|||||||
self.themeRoot = None # The full path to the nw/assets/themes folder
|
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.dictPath = None # The full path to the nw/assets/dict folder
|
||||||
self.iconPath = None # The full path to the nw/assets/icons 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
|
self.helpPath = None # The full path to the novelwriter .qhc help file
|
||||||
|
|
||||||
# Runtime Settings and Variables
|
# Runtime Settings and Variables
|
||||||
@@ -298,7 +297,6 @@ class Config:
|
|||||||
self.themeRoot = os.path.join(self.assetPath, "themes")
|
self.themeRoot = os.path.join(self.assetPath, "themes")
|
||||||
self.dictPath = os.path.join(self.assetPath, "dict")
|
self.dictPath = os.path.join(self.assetPath, "dict")
|
||||||
self.iconPath = os.path.join(self.assetPath, "icons")
|
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")
|
self.appIcon = os.path.join(self.iconPath, "novelwriter.svg")
|
||||||
|
|
||||||
# Internationalisation
|
# Internationalisation
|
||||||
@@ -384,7 +382,7 @@ class Config:
|
|||||||
for lngPath, lngBase in langList:
|
for lngPath, lngBase in langList:
|
||||||
for lngCode in self.qLocal.uiLanguages():
|
for lngCode in self.qLocal.uiLanguages():
|
||||||
qTrans = QTranslator()
|
qTrans = QTranslator()
|
||||||
lngFile = "%s_%s" % (lngBase, lngCode)
|
lngFile = "%s_%s" % (lngBase, lngCode.replace("-", "_"))
|
||||||
if lngFile not in self.qtTrans:
|
if lngFile not in self.qtTrans:
|
||||||
if qTrans.load(lngFile, lngPath):
|
if qTrans.load(lngFile, lngPath):
|
||||||
logger.debug("Loaded: %s" % qTrans.filePath())
|
logger.debug("Loaded: %s" % qTrans.filePath())
|
||||||
|
|||||||
+3
-3
@@ -1254,9 +1254,9 @@ class NWProject():
|
|||||||
theLang = "en"
|
theLang = "en"
|
||||||
|
|
||||||
lngShort = theLang.split("_")[0]
|
lngShort = theLang.split("_")[0]
|
||||||
loadFile = os.path.join(self.mainConf.langPath, "project_en.json")
|
loadFile = os.path.join(self.mainConf.nwLangPath, "project_en.json")
|
||||||
chkFile1 = os.path.join(self.mainConf.langPath, "project_%s.json" % theLang)
|
chkFile1 = os.path.join(self.mainConf.nwLangPath, "project_%s.json" % theLang)
|
||||||
chkFile2 = os.path.join(self.mainConf.langPath, "project_%s.json" % lngShort)
|
chkFile2 = os.path.join(self.mainConf.nwLangPath, "project_%s.json" % lngShort)
|
||||||
|
|
||||||
if os.path.isfile(chkFile1):
|
if os.path.isfile(chkFile1):
|
||||||
loadFile = chkFile1
|
loadFile = chkFile1
|
||||||
|
|||||||
+1
-1
@@ -563,7 +563,7 @@ class ToOdt(Tokenizer):
|
|||||||
##
|
##
|
||||||
|
|
||||||
if len(theText) != len(theFmt):
|
if len(theText) != len(theFmt):
|
||||||
# Genrate dummy format if there isn't any
|
# Generate dummy format if there isn't any or it doesn't match
|
||||||
theFmt = " "*len(theText)
|
theFmt = " "*len(theText)
|
||||||
|
|
||||||
# XML functions
|
# XML functions
|
||||||
|
|||||||
Reference in New Issue
Block a user