From d827da5803108e8a764c674a1e1b23676c020402 Mon Sep 17 00:00:00 2001 From: meisnate12 Date: Wed, 19 Oct 2022 16:14:09 -0400 Subject: [PATCH] [138] fix translation key_names --- VERSION | 2 +- modules/meta.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 1b8c48d6..97f73ef8 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.17.3-develop137 +1.17.3-develop138 diff --git a/modules/meta.py b/modules/meta.py index 15a2bf9f..7702cbf2 100644 --- a/modules/meta.py +++ b/modules/meta.py @@ -262,12 +262,15 @@ class DataFile: language = variables["language"] if "language" in variables else "default" translation_variables = {k: v[language if language in v else "default"] for k, v in self.translations.items()} + key_name_variables = {} for var_key, var_value in self.key_names.items(): if var_key == "library_type" and language in var_value: variables[var_key] = var_value[language].lower() variables[f"{var_key}U"] = var_value[language] elif language in var_value: - translation_variables[var_key] = var_value[language] + key_name_variables[var_key] = var_value[language] + if "key_name" in variables and variables["key_name"] in key_name_variables: + variables["key_name"] = key_name_variables[variables["key_name"]] def replace_var(input_item, search_dicts): if not isinstance(search_dicts, list):