Skip to content

Commit

Permalink
fixed bug regarding targetting a specific section in log_translation_…
Browse files Browse the repository at this point in the history
…settings
  • Loading branch information
Bikatr7 committed May 16, 2024
1 parent b813b2d commit 398ec53
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions handlers/json_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,16 @@ def log_translation_settings(output_to_console:bool=False, specific_section:str

## if a specific section is provided, only print that section and base translation settings
if(specific_section is not None):
sections = [section for section in sections if section.lower() == specific_section.lower() or section == "base translation settings"]

specific_section = specific_section.lower()
sections = [section for section in sections if section.lower() == specific_section or section == "base translation settings"]

for section in sections:
print("-------------------")
print(f"{section.capitalize()}:")
print("-------------------")

for key, value in JsonHandler.current_translation_settings[section].items():
log_message = f"{key} : {str(value)}"
for key, value in JsonHandler.current_translation_settings.get(section, {}).items():
log_message = f"{key} : {value}"
logging.debug(log_message)
if(output_to_console):
print(log_message)
Expand Down

0 comments on commit 398ec53

Please sign in to comment.