Use default language if can't find translations for pages
parent
41d8020ba7
commit
e50ab02714
|
@ -131,7 +131,7 @@ class ManjaroHello():
|
||||||
def read_page(self, name):
|
def read_page(self, name):
|
||||||
filename = "pages/{}/{}".format(self.preferences["locale"], name)
|
filename = "pages/{}/{}".format(self.preferences["locale"], name)
|
||||||
if not os.path.isfile(filename):
|
if not os.path.isfile(filename):
|
||||||
filename = "pages/{}/{}".format("en_US", name)
|
filename = "pages/{}/{}".format(self.default_locale, name)
|
||||||
try:
|
try:
|
||||||
with open(filename, "r") as f:
|
with open(filename, "r") as f:
|
||||||
return f.read()
|
return f.read()
|
||||||
|
|
Loading…
Reference in New Issue