Use default language if can't find translations for pages

This commit is contained in:
Huluti 2016-12-09 19:40:02 +01:00
parent 41d8020ba7
commit e50ab02714

View File

@ -131,7 +131,7 @@ class ManjaroHello():
def read_page(self, name):
filename = "pages/{}/{}".format(self.preferences["locale"], name)
if not os.path.isfile(filename):
filename = "pages/{}/{}".format("en_US", name)
filename = "pages/{}/{}".format(self.default_locale, name)
try:
with open(filename, "r") as f:
return f.read()