Skip to content

Commit f97a2af

Browse files
authored
Switch to loading translations from local storage instead of loading from GitHub
because it causes problems with loading some translation files
1 parent fe2676f commit f97a2af

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

timer.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,19 @@
3535
else:
3636
lang = 'en.json'
3737

38+
"""
3839
if os.path.exists("{}/.var/app/com.github.vikdevelop.timer/cache/{}".format(Path.home(), lang)):
3940
try:
4041
locale = open("{}/.var/app/com.github.vikdevelop.timer/cache/{}".format(Path.home(), lang))
4142
except KeyError:
4243
locale = open(f"/app/translations/{lang}")
4344
else:
4445
locale = open(f"/app/translations/{lang}")
46+
"""
4547

46-
# Load JSON local file
47-
jT = json.load(locale)
48+
with open(f"/app/translations/{lang}") as l:
49+
# Load JSON local file
50+
jT = json.load(l)
4851

4952
# import main file - source code
5053
import src.main

0 commit comments

Comments
 (0)