Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
acodervic committed Apr 4, 2022
1 parent 2077bf1 commit c681ce2
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions src/main/java/github/acodervic/mod/shell/SystemUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,30 +366,7 @@ public static str youdaoTran(String str_opt) {
return chinses;
}

static TransApi baiduTran = new TransApi("20200610000491698", "qJw_J81bkOPrenmzMKBN");

/**
* 百度翻译
*
* @param data
* @param hClient_opt
* @return
*/
public static str baiduAPITran(String data, HttpClient hClient_opt) {
if (data == null) {
return new str("");
}
// 已经翻译过
if (translatedMap.containsKey(data)) {
return new str(translatedMap.get(data));
}
String transResult = baiduTran.getTransResult(data);
if (transResult != null && transResult.length() > 0) {
translatedMap.put(data, transResult);
return new str(transResult);
}
return new str(data);
}

/**
* 词霸翻译,翻译失败则返回null
* @param data
Expand Down

0 comments on commit c681ce2

Please sign in to comment.