Codist
Codist copied to clipboard
Suggestion: Super Quick Info add translation
Can you try to add web translation to QuickInfo's summary?
Just add translation and keep the original summary.

I'd thought of that years ago. Unfortunately there's no way to obtain the translated XML documentation via the existing API of VS or roslyn.
Unfortunately there's no way to obtain the translated XML documentation via the existing API of VS or roslyn.
@wmjordan Get summary in xml → Translate summary → Add Translated summary to Super Quick Info
Is it okay?
Where's the translation?
Where's the translation?
@wmjordan The summary given Google Translation。 We don’t translate xml, just translate the summary part, don’t write xml, and don’t make any changes Can I speak Chinese?
How can you access the Google translation API in China?
Nowadays, you can select contents in the Quick Info, right click the selection to bring out a menu to Copy the selection and switch to online translation services.
How can you access the Google translation API in China?
This is not the point. There are many alternatives in China, such as Baidu and Youdao.
Nowadays, you can select contents in the Quick Info, right click the selection to bring out a menu to
Copythe selection and switch to online translation services.
too troublesome
@wmjordan Perhaps, I should create an extension for this. But I have not been able to find the API to get Comments. Maybe my direction is wrong, can you guide me? Thank you!
OK. I understood your request.
However, integrating the content into Quick Info is not so viable, since online service will usually not yet returns the translation to Codist when Quick Info is displayed. The result may be presented in another floating window asynchronously.
I have not been able to find the API to get Comments
It is not an easy job. A lot of things have to be done.
You can take a look at this file, which has covered most of the stuff, but not yet fully implemented (for instance, Deconstruct in C# 7 has not yet supported in Codist):
https://github.com/wmjordan/Codist/blob/master/Codist/QuickInfo/CSharpQuickInfo.cs
It's really not an easy job. I may need a long time to study. Thanks for your guidance.
You may take a look at #133 .
The author of that issue had given quite a few links about the QuickInfoService in Roslyn. It shall be much easier to get you started from that class.
nice. I will study it carefully, thank you.
Implementation of a translation service https://github.com/Kerwin1202/VsTranslator
@alekseyaz Thank you. This can ease part of my work.
I just added a primitive google translate option, as an example can be found in the feature-translate branch https://github.com/alekseyaz/Codist/tree/feature-translate

I just added a primitive google translate option, as an example can be found in the feature-translate branch
cool.
@alekseyaz Maybe it doesn't need me to do anything. Add xx seconds to display the translation or translation cache, add the translation to the asynchronous thread, even if the work is completed
Converted to async and HttpClient
@RC1844 Do you know about any high quality free Chinese translation service API?
@RC1844 Do you know about any high quality free Chinese translation service API?
Alibaba Cloud Machine Translation API Tencent Cloud Translation API Baidu Translate API Both have word limits.
libretranslate Self hosted, unlimited.