Skip to content

Commit

Permalink
fix: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hymhub committed Apr 1, 2023
1 parent f23a06e commit 34aa2f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 14 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,10 @@ locales
也可以将翻译结果输出到另一个文件夹,只需要更改 `outPath` 即可,更多用法等你解锁哦,也可结合[FAQ](#faq)输出可选做出更多花样,项目 [example](https://github.com/hymhub/language-translate/tree/main/example) 目录中也提供了一些简单示例

## 配置API
<style>
table th {
white-space: nowrap;
}
</style>

### `translate.config.(js|ts)`

| 属性 | 描述 | 类型 | 默认值 | 是否必填 |
| 属性 | 描述 | 类型 | 默认值 | 必填 |
| :-: | :-- | :-: | :-: | :-: |
| `toolsLang` | 翻译工具在使用过程中终端输出的提示语言 | `en` \| `zh-CN` | `zh-CN` ||
| `proxy` | 使用 Google 翻译,需要网络代理,如果您所在的国家能直接使用 Google 就可以不填 proxy 配置项 | [Proxy](#proxy) | undefined ||
Expand All @@ -217,7 +213,7 @@ table th {

### `TargetConfig`

| 属性 | 描述 | 类型 | 是否必填 |
| 属性 | 描述 | 类型 | 必填 |
| :-: | :--: | :-: | :-: |
| `targetLang` | 翻译输出的目标语言 | [Lang](#lang) ||
| `outPath` | 翻译后文件输出路径,后缀名可以是js\|ts\|json,也可以是目录,输出时如果没有目标文件则自动生成,如果有则增量更新 | string ||
Expand Down
6 changes: 1 addition & 5 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,7 @@ locales
You can also output the translation results to another folder, just change the `outPath`, more usages are waiting for you to unlock, you can also combine [FAQ](#faq) output selection to make more tricks, the project [example](https://github.com/hymhub/language-translate/tree/main/example) directory also provides some simple examples

## Config API
<style>
table th {
white-space: nowrap;
}
</style>

### `translate.config.(js|ts)`

| Attribute | Description | Type | Default | Required |
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "language-translate",
"version": "2.1.1",
"version": "2.1.2",
"description": "A plug-in that can translate ts/js/json multilingual files online and generate or insert specified files in batches",
"scripts": {
"build": "rimraf ./dist && tsc"
Expand Down Expand Up @@ -66,5 +66,6 @@
"@types/tunnel": "^0.0.3",
"rimraf": "^3.0.2",
"typescript": "^4.7.4"
}
},
"keywords": ["translation", "translate", "google-translate", "language-translate", "i18n-json-translation"]
}

0 comments on commit 34aa2f9

Please sign in to comment.