From e3ff2456ef313ce51cd3eb9d1c1a6f5e6f7bfc51 Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Mon, 6 Nov 2023 19:46:34 +0100 Subject: [PATCH] chore: remove unused method --- frappe/translate.py | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/frappe/translate.py b/frappe/translate.py index 764e642abe..cc0771583e 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -164,30 +164,6 @@ def get_messages_for_boot(): return get_all_translations(frappe.local.lang) -def make_dict_from_messages(messages, full_dict=None, load_user_translation=True): - """Returns translated messages as a dict in Language specified in `frappe.local.lang` - - :param messages: List of untranslated messages - """ - out = {} - if full_dict is None: - if load_user_translation: - full_dict = get_all_translations(frappe.local.lang) - else: - full_dict = get_translations_from_apps(frappe.local.lang) - - for m in messages: - if m[1] in full_dict: - out[m[1]] = full_dict[m[1]] - # check if msg with context as key exist eg. msg:context - if len(m) > 2 and m[2]: - key = m[1] + ":" + m[2] - if full_dict.get(key): - out[key] = full_dict[key] - - return out - - def get_all_translations(lang: str) -> dict[str, str]: """Load and return the entire translations dictionary for a language from apps + user translations.