Vendicated / Vencord

The cutest Discord client mod
https://vencord.dev
GNU General Public License v3.0
8.51k stars 1.2k forks source link

[Feature Request] Use DeepL in translate plugin #1786

Closed Sanceilaks closed 1 month ago

Sanceilaks commented 11 months ago

Content

Discord Account

voidptr_t

What is it that you'd like to see?

It would be convenient to be able to translate messages via DeepL.

Request Agreement

FirstWiseman commented 9 months ago

I have added an Engine Selector my self, tried to implement DeepL and Bypass the apiKey thing and it worked for a sec but now i cant translate at all not even in the browser anymore xD. Maybe because of a daily limit or something, but if so, i´ve gotta try again tomorrow.

That would be the only problem with DeepL, you have to use an Api Key and to receive the free api key you have to give your payment informations :/

image

AshtonMemer commented 1 month ago

DeepL API has a CORS policy that blocks requests from the frontend. A way to deal with this would be to use a proxy server, but then you would be sending your API key and potentially private message content to an individual's proxy server before DeepL.

Sqaaakoi commented 1 month ago

DeepL API has a CORS policy that blocks requests from the frontend. A way to deal with this would be to use a proxy server, but then you would be sending your API key and potentially private message content to an individual's proxy server before DeepL.

we can just delete the CORS header in desktop clients (electron based) in the same way that CSP is modified https://github.com/Vendicated/Vencord/blob/main/src/main/index.ts#L90-L124|

it's also possible to make a "native" script that fetches that data for you

AshtonMemer commented 1 month ago

we can just delete the CORS header in desktop clients (electron based) in the same way that CSP is modified https://github.com/Vendicated/Vencord/blob/main/src/main/index.ts#L90-L124|

it's also possible to make a "native" script that fetches that data for you

has this been done by an existing plugin yet?

Sqaaakoi commented 1 month ago

we can just delete the CORS header in desktop clients (electron based) in the same way that CSP is modified https://github.com/Vendicated/Vencord/blob/main/src/main/index.ts#L90-L124| it's also possible to make a "native" script that fetches that data for you

has this been done by an existing plugin yet?

https://github.com/Vendicated/Vencord/blob/main/src/plugins/openInApp/native.ts

AshtonMemer commented 1 month ago

https://github.com/Vendicated/Vencord/blob/main/src/plugins/openInApp/native.ts

cool, I actually got everything working using a native script