Resolve "Readme and other PAGES do not load."
Readme, release information, and other PAGES do not load and display. Fixed a bug that the file name was not assigned when default_locale was used.
This commit is contained in:
@@ -374,7 +374,7 @@ class Hello(Gtk.Window):
|
|||||||
"""
|
"""
|
||||||
filename = f"{self.preferences["data_path"]}/pages/{self.usr_prefs["locale"]}/{name}"
|
filename = f"{self.preferences["data_path"]}/pages/{self.usr_prefs["locale"]}/{name}"
|
||||||
if not os.path.isfile(filename):
|
if not os.path.isfile(filename):
|
||||||
f"{self.preferences["data_path"]}/pages/{self.preferences["default_locale"]}/{name}"
|
filename = f"{self.preferences["data_path"]}/pages/{self.preferences["default_locale"]}/{name}"
|
||||||
try:
|
try:
|
||||||
with open(filename, "r") as fil:
|
with open(filename, "r") as fil:
|
||||||
return fil.read()
|
return fil.read()
|
||||||
|
|||||||
Reference in New Issue
Block a user