MCPcopy Create free account
hub / github.com/TaskingAI/TaskingAI / get_i18n

Function get_i18n

plugin/app/cache/i18n.py:41–54  ·  view source on GitHub ↗

Get the i18n for the given plugin id, language and key. :param provider_id: provider id. :param lang: language. :param key: key. :return: the i18n.

(provider_id: str, lang: str, key: str)

Source from the content-addressed store, hash-verified

39
40
41def get_i18n(provider_id: str, lang: str, key: str):
42 """
43 Get the i18n for the given plugin id, language and key.
44 :param provider_id: provider id.
45 :param lang: language.
46 :param key: key.
47 :return: the i18n.
48 """
49
50 i18n_key = f"{provider_id}:{lang}:{key}"
51 return (
52 __i18n.get(i18n_key, "") or
53 __i18n.get(f"{provider_id}:{CONFIG.DEFAULT_LANG}:{key}", "")
54 )
55
56
57def get_i18n_cache() -> Dict[str, str]:

Callers 1

i18n_textFunction · 0.90

Calls 1

getMethod · 0.45

Tested by

no test coverage detected