Don't try to load english translation files

This commit is contained in:
shortcutme 2018-09-13 03:12:02 +02:00
parent 238667d989
commit 8594fa8199
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -34,7 +34,11 @@ class Translate(dict):
return "<translate %s>" % self.lang return "<translate %s>" % self.lang
def load(self): def load(self):
if os.path.isfile(self.lang_file): if self.lang == "en":
data = {}
dict.__init__(self, data)
self.clear()
elif os.path.isfile(self.lang_file):
try: try:
data = json.load(open(self.lang_file)) data = json.load(open(self.lang_file))
logging.debug("Loaded translate file: %s (%s entries)" % (self.lang_file, len(data))) logging.debug("Loaded translate file: %s (%s entries)" % (self.lang_file, len(data)))