mirror of
https://codeberg.org/tom79/Fedilab.git
synced 2024-12-22 16:50:04 +02:00
fix Lingva encoding issue
This commit is contained in:
parent
958e4f6aa5
commit
870eeeb834
1 changed files with 2 additions and 3 deletions
|
@ -29,7 +29,6 @@ import org.json.JSONException;
|
|||
import org.json.JSONObject;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
|
||||
|
@ -149,8 +148,8 @@ public class TransAsync {
|
|||
str_response = new Client().post(MyTransL.getLibreTranslateUrl(), this.timeout, params);
|
||||
} else if (te == MyTransL.translatorEngine.LINGVA) {
|
||||
String key = MyTransL.getInstance(te).getLibreTranslateAPIKey();
|
||||
String contentToSendEncoded = URLEncoder.encode(contentToSend, "UTF-8");
|
||||
String lingvaURL = MyTransL.getLingvaUrl() + this.params.getSource_lang() + "/" + toLanguage + "/" + contentToSendEncoded;
|
||||
//String contentToSendEncoded = URLEncoder.encode(contentToSend, "UTF-8");
|
||||
String lingvaURL = MyTransL.getLingvaUrl() + this.params.getSource_lang() + "/" + toLanguage + "/" + contentToSend;
|
||||
str_response = new Client().get(lingvaURL, this.timeout);
|
||||
}
|
||||
} catch (IOException | NoSuchAlgorithmException | KeyManagementException err) {
|
||||
|
|
Loading…
Reference in a new issue