Add language option to the Build tool

This commit is contained in:
Veronica K. B. Olsen
2021-02-18 20:45:18 +01:00
parent e4d03f9581
commit e9763f4ec6
4 changed files with 58 additions and 24 deletions
+2 -6
View File
@@ -91,7 +91,6 @@ class GuiPreferences(PagedDialog):
logger.debug("Saving new preferences")
needsRestart = self.tabGeneral.saveValues()
prevSpell = self.mainConf.spellLanguage
self.tabProjects.saveValues()
self.tabDocs.saveValues()
@@ -99,9 +98,6 @@ class GuiPreferences(PagedDialog):
self.tabSyntax.saveValues()
self.tabAuto.saveValues()
if prevSpell != self.mainConf.spellLanguage:
self.theProject.loadProjectLocalisation(self.mainConf.spellLanguage)
if needsRestart:
self.theParent.makeAlert(
self.tr("Some changes will not be applied until novelWriter has been restarted."),
@@ -142,8 +138,8 @@ class GuiPreferencesGeneral(QWidget):
## Select Locale
self.guiLang = QComboBox()
self.guiLang.setMinimumWidth(minWidth)
self.theLangs = self.mainConf.listLanguages()
for lang, langName in self.theLangs:
theLangs = self.mainConf.listLanguages(self.mainConf.LANG_NW)
for lang, langName in theLangs:
self.guiLang.addItem(langName, lang)
langIdx = self.guiLang.findData(self.mainConf.guiLang)
if langIdx != -1: