gptrans 1.6.0 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/index.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,6 @@ When creating a new instance of GPTrans, you can customize:
|
|
|
68
68
|
| `from` | Source language locale (BCP 47) | `en-US` |
|
|
69
69
|
| `target` | Target language locale (BCP 47) | `es` |
|
|
70
70
|
| `model` | Translation model key or array of models for fallback | `claude-3-7-sonnet` |
|
|
71
|
-
| `model` | Translation model key | `claude-3-7-sonnet` |
|
|
72
71
|
| `batchThreshold` | Maximum number of characters to accumulate before triggering batch processing | `1500` |
|
|
73
72
|
| `debounceTimeout` | Time in milliseconds to wait before processing translations | `500` |
|
|
74
73
|
| `freeze` | Freeze mode to prevent translations from being queued | `false` |
|
package/index.js
CHANGED
|
@@ -40,8 +40,9 @@ class GPTrans {
|
|
|
40
40
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
this.
|
|
43
|
+
const path = new URL('../../db', import.meta.url).pathname;
|
|
44
|
+
this.dbTarget = new DeepBase({ name: 'gptrans_' + target, path });
|
|
45
|
+
this.dbFrom = new DeepBase({ name: 'gptrans_from_' + from, path });
|
|
45
46
|
|
|
46
47
|
try {
|
|
47
48
|
this.replaceTarget = isoAssoc(target, 'TARGET_');
|