MCPcopy Create free account
hub / github.com/ChinaGodMan/UserScripts / get_translation

Method get_translation

utils/google_translate.py:77–81  ·  view source on GitHub ↗
(self, lang, key)

Source from the content-addressed store, hash-verified

75 return False
76
77 def get_translation(self, lang, key):
78 for lang_obj in self.cache:
79 if lang_obj["language"] == lang:
80 return lang_obj["entry"].get(key, key)
81 return key
82
83
84# 将编码后的中文字符替换成可阅读的中文字符

Callers 1

translate_textFunction · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected