Fix translations and refactor makeAlert calls

This commit is contained in:
Veronica Berglyd Olsen
2021-06-10 21:42:40 +02:00
parent 904ba9b1ca
commit 6e1e40f13e
15 changed files with 252 additions and 297 deletions
+9 -9
View File
@@ -397,9 +397,9 @@ class GuiTheme:
with open(themeConf, mode="r", encoding="utf8") as inFile:
confParser.read_file(inFile)
except Exception as e:
self.makeAlert(
[self.tr("Could not load theme config file."), str(e)], nwAlert.ERROR
)
self.makeAlert([
self.tr("Could not load theme config file."), str(e)
], nwAlert.ERROR)
continue
themeName = ""
if confParser.has_section("Main"):
@@ -430,9 +430,9 @@ class GuiTheme:
with open(syntaxPath, mode="r", encoding="utf8") as inFile:
confParser.read_file(inFile)
except Exception as e:
self.makeAlert(
[self.tr("Could not load syntax file."), str(e)], nwAlert.ERROR
)
self.makeAlert([
self.tr("Could not load syntax file."), str(e)
], nwAlert.ERROR)
return []
syntaxName = ""
if confParser.has_section("Main"):
@@ -745,9 +745,9 @@ class GuiIcons:
with open(themeConf, mode="r", encoding="utf8") as inFile:
confParser.read_file(inFile)
except Exception as e:
self.makeAlert(
[self.tr("Could not load theme config file."), str(e)], nwAlert.ERROR
)
self.makeAlert([
self.tr("Could not load theme config file."), str(e)
], nwAlert.ERROR)
continue
themeName = ""
if confParser.has_section("Main"):