From f6343d1534e94664e57b553d72b38a235ef788d8 Mon Sep 17 00:00:00 2001 From: Moth Date: Sat, 11 Jan 2025 00:01:49 +0300 Subject: [PATCH] unit test fix #2 [test_localization_disable.py] --- .github/workflows/unit_tests.yml | 2 +- budget_graph/dictionary.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests.yml b/.github/workflows/unit_tests.yml index f4172bb..4d58684 100644 --- a/.github/workflows/unit_tests.yml +++ b/.github/workflows/unit_tests.yml @@ -219,10 +219,10 @@ jobs: run: | ls -l # log/debug mv tests/configs/test_localization_disable.toml conf.toml # change the standard config to a test one - cat conf.toml # log/debug - name: Load conf.toml run: | + cat conf.toml # log/debug cd budget_graph || exit 1 python -c "import build_project; build_project.load_global_config(); build_project.create_directories();" diff --git a/budget_graph/dictionary.py b/budget_graph/dictionary.py index ac0b83f..ab19859 100644 --- a/budget_graph/dictionary.py +++ b/budget_graph/dictionary.py @@ -53,7 +53,7 @@ def receive_translation(language: str, phrase: str) -> str: :return: value in the json-dictionary in the selected language. """ # if localization is disabled - the default language is English - dict_language_obj: dict = get_translate_from_json(language if localization_enable else language) + dict_language_obj: dict = get_translate_from_json(language if localization_enable else 'en') return str(dict_language_obj.get(phrase, 'Error'))