Skip to content

Commit

Permalink
modulate: tune translator API settings
Browse files Browse the repository at this point in the history
  • Loading branch information
tinyAdapter committed May 25, 2020
1 parent 60d0c0c commit eb3d9a3
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 26 deletions.
52 changes: 32 additions & 20 deletions config/config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"dictionaries": {
"lingoes": {
"enable": true,
"path": "C:\\YUKI\\libraries\\dict\\lingoes\\njcd.db"
}
},
"language": "zh",
"librariesRepoUrl": "https://github.com/project-yuki/libraries/raw/master/_pack/",
"localeChangers": {
"alphaROMdiE": {
"enable": false,
Expand All @@ -29,17 +21,7 @@
"name": "Ntleas"
}
},
"mecab": {
"enable": true,
"path": "C:\\YUKI\\libraries\\pos\\mecab-ipadic"
},
"onlineApis": [
{
"enable": true,
"external": true,
"jsFile": "config\\baiduApi.js",
"name": "百度"
},
{
"enable": true,
"external": true,
Expand All @@ -50,7 +32,7 @@
"enable": false,
"external": true,
"jsFile": "config\\tencentApi.js",
"name": "TMT"
"name": "腾讯云"
},
{
"enable": true,
Expand All @@ -74,6 +56,24 @@
"requestHeaders": "{\"X-Authorization\": \"token 3975l6lr5pcbvidl6jl2\"}",
"responseBodyPattern": "J%RESPONSE%.target",
"url": "https://api.interpreter.caiyunai.com/v1/translator"
},
{
"enable": false,
"external": true,
"jsFile": "config\\azureApi.js",
"name": "Azure"
},
{
"enable": false,
"external": true,
"jsFile": "config\\baiduApi.js",
"name": "百度"
},
{
"enable": false,
"external": true,
"jsFile": "config\\newBaiduApi.js",
"name": "百度开放平台"
}
],
"translators": {
Expand All @@ -82,5 +82,17 @@
"enable": true,
"path": "C:\\JBeijing7"
}
}
},
"dictionaries": {
"lingoes": {
"enable": true,
"path": "C:\\YUKI\\libraries\\dict\\lingoes\\njcd.db"
}
},
"mecab": {
"enable": true,
"path": "C:\\YUKI\\libraries\\pos\\mecab-ipadic"
},
"librariesRepoUrl": "https://github.com/project-yuki/libraries/raw/master/_pack/",
"language": "zh"
}
30 changes: 24 additions & 6 deletions src/main/config/DefaultConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ export default class DefaultConfig extends Config {
noChanger: { name: 'No Changer', enable: true, exec: '%GAME_PATH%' }
},
onlineApis: [
{
enable: false,
external: true,
jsFile: 'config\\baiduApi.js',
name: '百度'
},
{
enable: true,
external: true,
Expand Down Expand Up @@ -48,6 +42,30 @@ export default class DefaultConfig extends Config {
external: true,
jsFile: 'config\\qqApi.js',
name: '腾讯'
},
{
enable: false,
external: true,
jsFile: 'config\\tencentApi.js',
name: '腾讯云'
},
{
enable: false,
external: true,
jsFile: 'config\\azureApi.js',
name: 'Azure'
},
{
enable: false,
external: true,
jsFile: 'config\\baiduApi.js',
name: '百度'
},
{
enable: false,
external: true,
jsFile: 'config\\newBaiduApi.js',
name: '百度开放平台'
}
],
translators: { jBeijing: { enable: false, path: '', dictPath: '' } },
Expand Down

0 comments on commit eb3d9a3

Please sign in to comment.