Skip to content

Commit f0251cb

Browse files
authored
Merge pull request #25 from Satanarious/feature/translations
V1.0.0 First Beta
2 parents e3de043 + 59e2e84 commit f0251cb

30 files changed

Lines changed: 2129 additions & 411 deletions

Assets/db/app_settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"Language": 0
3+
}

Assets/icons/settings_icon.png

7.19 KB
Loading

Data/app_settings.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Library Imports
2+
import json
3+
4+
# Relative Imports
5+
from Data.paths import Path
6+
7+
8+
rawDefaults: dict = dict(json.load(open(Path.DBPaths.AppSettings, "r")))
9+
10+
11+
class AppSettings:
12+
class Key:
13+
language: str = "Language"
14+
15+
language: int = rawDefaults[Key.language]
16+
17+
@staticmethod
18+
def updateDict():
19+
rawDefaults[AppSettings.Key.language] = AppSettings.language
20+
21+
@staticmethod
22+
def updateJSON():
23+
with open(Path.DBPaths.AppSettings, "w") as json_file:
24+
json.dump(rawDefaults, json_file)

0 commit comments

Comments
 (0)