File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010 "appcast" : " " ,
1111 "minBobVersion" : " 0.5.0" ,
1212 "options" : [{
13- "identifier" : " api_key " ,
13+ "identifier" : " api_keys " ,
1414 "type" : " text" ,
15- "title" : " API KEY (可以用英文逗号分割多个 key 以实现额度加倍及负载均衡)"
15+ "title" : " API KEY" ,
16+ "desc" : " 可以用英文逗号分割多个 API KEY 以实现额度加倍及负载均衡"
1617 }]
1718}
Original file line number Diff line number Diff line change 1- /**
2- * 由于各大服务商的语言代码都不大一样,
3- * 所以我定义了一份 Bob 专用的语言代码,以便 Bob 主程序和插件之间互传语种。
4- * Bob 语言代码列表 https://ripperhe.gitee.io/bob/#/plugin/addtion/language
5- *
6- * 转换的代码建议以下面的方式实现,
7- * `xxx` 代表服务商特有的语言代码,请替换为真实的,
8- * 具体支持的语种数量请根据实际情况而定。
9- *
10- * Bob 语言代码转服务商语言代码(以为 'zh-Hans' 为例): var lang = langMap.get('zh-Hans');
11- * 服务商语言代码转 Bob 语言代码: var standardLang = langMapReverse.get('xxx');
12- */
13-
141var items = [
152 [ "auto" , "auto" ] ,
163 [ "zh-Hans" , "zh" ] ,
@@ -28,7 +15,7 @@ function supportLanguages() {
2815}
2916
3017function translate ( query , completion ) {
31- const api_keys = $option . api_key . split ( "," ) . map ( ( key ) => key . trim ( ) ) ;
18+ const api_keys = $option . api_keys . split ( "," ) . map ( ( key ) => key . trim ( ) ) ;
3219 const api_key = api_keys [ Math . floor ( Math . random ( ) * api_keys . length ) ] ;
3320 const header = {
3421 "Content-Type" : "application/json" ,
You can’t perform that action at this time.
0 commit comments