Merge pull request #401 from anmol098/fix/fnf_translation_error

FileNotFound translation error fixed
This commit is contained in:
Aravind Nair
2023-03-01 01:29:35 +05:30
committed by GitHub

View File

@@ -1,5 +1,5 @@
from json import load from json import load
from os.path import join from os.path import join, dirname
from typing import Dict from typing import Dict
from manager_environment import EnvironmentManager as EM from manager_environment import EnvironmentManager as EM
@@ -28,7 +28,7 @@ class FileManager:
:param file: Localization file path, related to current file (in sources root). :param file: Localization file path, related to current file (in sources root).
""" """
with open(join("sources", file), encoding="utf-8") as config_file: with open(join(dirname(__file__), file), encoding="utf-8") as config_file:
data = load(config_file) data = load(config_file)
FileManager._LOCALIZATION = data[EM.LOCALE] FileManager._LOCALIZATION = data[EM.LOCALE]