eric6/Plugins/UiExtensionPlugins/Translator/TranslatorEngines/GoogleV1Engine.py

changeset 8234
fcb6b4b96274
parent 8218
7c09585bd960
equal deleted inserted replaced
8233:bad78a592cc2 8234:fcb6b4b96274
109 dictionary = responseDict["dict"] 109 dictionary = responseDict["dict"]
110 for value in dictionary: 110 for value in dictionary:
111 result += "<hr/><u><b>{0}</b> - {1}</u><br/>".format( 111 result += "<hr/><u><b>{0}</b> - {1}</u><br/>".format(
112 text, value["pos"]) 112 text, value["pos"])
113 for entry in value["entry"]: 113 for entry in value["entry"]:
114 if "previous_word" in entry: 114 previous = (entry["previous_word"] + " "
115 previous = entry["previous_word"] + " " 115 if "previous_word" in entry else "")
116 else:
117 previous = ""
118 word = entry["word"] 116 word = entry["word"]
119 reverse = entry["reverse_translation"] 117 reverse = entry["reverse_translation"]
120 result += "<br/>{0}<b>{1}</b> - {2}".format( 118 result += "<br/>{0}<b>{1}</b> - {2}".format(
121 previous, word, ", ".join(reverse)) 119 previous, word, ", ".join(reverse))
122 if value != dictionary[-1]: 120 if value != dictionary[-1]:

eric ide

mercurial