gpt-po 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # PO File Translation Tool for ChatGPT
2
2
 
3
+ [![NPM version](https://img.shields.io/npm/v/gpt-po.svg)](https://npmjs.org/package/gpt-po)
4
+ [![Downloads](https://img.shields.io/npm/dm/gpt-po.svg)](https://npmjs.org/package/gpt-po)
5
+
3
6
  Translation tool for gettext (po) files that supports custom system prompts and user dictionaries. It also supports translating specified po files to a designated target language and updating po files based on pot files.
4
7
 
5
8
  Read in other languages: English | [简体中文](./README_zh-CN.md)
@@ -49,6 +52,7 @@ Options:
49
52
  --model <model> openai model (choices: "gpt-4", "gpt-4-0314", "gpt-4-32k", "gpt-4-32k-0314", "gpt-3.5-turbo", "gpt-3.5-turbo-0301",
50
53
  default: "gpt-3.5-turbo")
51
54
  --po <file> po file path
55
+ -src, --source <lang> source language (default: "english")
52
56
  -l, --lang <lang> target language (default: "simplified chinese")
53
57
  -o, --output <file> output file path, overwirte po file by default
54
58
  -h, --help display help for command
package/README_zh-CN.md CHANGED
@@ -1,8 +1,11 @@
1
1
  # PO文件CHATGPT翻译工具
2
2
 
3
+ [![NPM version](https://img.shields.io/npm/v/gpt-po.svg)](https://npmjs.org/package/gpt-po)
4
+ [![Downloads](https://img.shields.io/npm/dm/gpt-po.svg)](https://npmjs.org/package/gpt-po)
5
+
3
6
  gettext(po)文件翻译工具,支持自定义系统提示词和用户字典,支持翻译指定的po文件到指定的目标语言,支持根据pot文件更新po文件。
4
7
 
5
- 使用其他语言阅读:[English](./Readme.md) | 简体中文
8
+ 使用其他语言阅读:[English](./README.md) | 简体中文
6
9
 
7
10
  ## 安装
8
11
 
@@ -49,6 +52,7 @@ Options:
49
52
  --model <model> openai model (choices: "gpt-4", "gpt-4-0314", "gpt-4-32k", "gpt-4-32k-0314", "gpt-3.5-turbo", "gpt-3.5-turbo-0301",
50
53
  default: "gpt-3.5-turbo")
51
54
  --po <file> po file path
55
+ -src, --source <lang> source language (default: "english")
52
56
  -l, --lang <lang> target language (default: "simplified chinese")
53
57
  -o, --output <file> output file path, overwirte po file by default
54
58
  -h, --help display help for command
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpt-po",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "command tool for translate po files by gpt",
5
5
  "main": "lib/src/index.js",
6
6
  "bin": {
package/lib/src/utils.js CHANGED
@@ -36,7 +36,7 @@ function parsePo(poFile, defaultCharset) {
36
36
  }
37
37
  exports.parsePo = parsePo;
38
38
  function compilePo(data, poFile) {
39
- const buffer = gettext_parser_1.po.compile(data);
39
+ const buffer = gettext_parser_1.po.compile(data, { foldLength: 120 });
40
40
  return new Promise((resolve, reject) => {
41
41
  fs.writeFile(poFile, buffer, (err) => {
42
42
  if (err)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpt-po",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "command tool for translate po files by gpt",
5
5
  "main": "lib/src/index.js",
6
6
  "bin": {