Open Trygve-Husky opened 7 months ago
403 mean "forbiden", maybe you enter a wrong API key.
Please go to "Translate > Translate Engine Settings" :
And enter the API key for "Deepl" or, for other engine, enter required infos.
Similar issue, (I filled my own email tho) Language: From Simplified Chinese to Traditional Chinese When attempt to "Translate selected", it says, [ value cannot be null. Parameter name: text]
Unfortunately, it's working on my computer with same settings than yours...
You can check on logs that are located on "C:\Users[User]\AppData\Roaming\Notepad++\plugins\logs\Translate\xxx.log" to find the cause.
It has the same issue no matter I fill my email or not. Editing XML file in UTF-8.
Will check later on another machine
The problem seems to be encoding conversion. On original NPPTranslate plugin, it convert ISO-1252 to UTF-8 on function getSelectedText() :
Main.cs:225
Util.writeInfoLog("Selected text range: " + selected);
logEncodingInfo();
Encoding w1252 = Encoding.GetEncoding(1252);
string converted = Encoding.UTF8.GetString(w1252.GetBytes(selected));
Util.writeInfoLog("Final selected text after conversion: " + converted);
And in your case it's already UTF-8, so conversion failed, and passed string to translate engine is "??????????" and that cause the error.
Tested again on another document in UTF-8 encoding, Chinese(Simplified)->Chinese(Traditinal). No error pops up but only ??????. I suspect it encounter issues as Chinese Characters isn't a part of w1252?