Skip to content

Commit

Permalink
unit test fix #2 [test_localization_disable.py]
Browse files Browse the repository at this point in the history
  • Loading branch information
MothScientist committed Jan 10, 2025
1 parent 70cd781 commit f6343d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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();"
Expand Down
2 changes: 1 addition & 1 deletion budget_graph/dictionary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))


Expand Down

0 comments on commit f6343d1

Please sign in to comment.