auto-translate-json-library 1.5.4 → 2.0.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 +1141 -148
- package/build/package.json +97 -21
- package/build/src/aws.d.ts +1 -1
- package/build/src/aws.js +27 -38
- package/build/src/azure.d.ts +1 -1
- package/build/src/azure.js +50 -63
- package/build/src/bin/cli.d.ts +1 -1
- package/build/src/bin/cli.js +196 -37
- package/build/src/config.d.ts +1 -0
- package/build/src/config.js +1 -2
- package/build/src/deepl.d.ts +1 -1
- package/build/src/deepl.js +18 -64
- package/build/src/files.d.ts +11 -2
- package/build/src/files.js +356 -69
- package/build/src/folderFiles.d.ts +6 -3
- package/build/src/folderFiles.js +33 -44
- package/build/src/format/arb-handler.d.ts +33 -0
- package/build/src/format/arb-handler.js +679 -0
- package/build/src/format/base-format-handler.d.ts +75 -0
- package/build/src/format/base-format-handler.js +166 -0
- package/build/src/format/csv-handler.d.ts +38 -0
- package/build/src/format/csv-handler.js +604 -0
- package/build/src/format/index.d.ts +17 -0
- package/build/src/format/index.js +48 -0
- package/build/src/format/json-handler.d.ts +17 -0
- package/build/src/format/json-handler.js +294 -0
- package/build/src/format/po-handler.d.ts +17 -0
- package/build/src/format/po-handler.js +338 -0
- package/build/src/format/po-utils.d.ts +86 -0
- package/build/src/format/po-utils.js +385 -0
- package/build/src/format/pot-handler.d.ts +22 -0
- package/build/src/format/pot-handler.js +331 -0
- package/build/src/format/properties-handler.d.ts +26 -0
- package/build/src/format/properties-handler.js +500 -0
- package/build/src/format/tsv-handler.d.ts +13 -0
- package/build/src/format/tsv-handler.js +67 -0
- package/build/src/format/xliff-handler.d.ts +24 -0
- package/build/src/format/xliff-handler.js +433 -0
- package/build/src/format/xmb-handler.d.ts +33 -0
- package/build/src/format/xmb-handler.js +484 -0
- package/build/src/format/xmb-xtb-utils.d.ts +43 -0
- package/build/src/format/xmb-xtb-utils.js +180 -0
- package/build/src/format/xml-handler.d.ts +28 -0
- package/build/src/format/xml-handler.js +561 -0
- package/build/src/format/xtb-handler.d.ts +33 -0
- package/build/src/format/xtb-handler.js +518 -0
- package/build/src/format/yaml-handler.d.ts +26 -0
- package/build/src/format/yaml-handler.js +522 -0
- package/build/src/format-detector.d.ts +7 -0
- package/build/src/format-detector.js +58 -0
- package/build/src/format-handler-factory.d.ts +9 -0
- package/build/src/format-handler-factory.js +18 -0
- package/build/src/format.interface.d.ts +56 -0
- package/build/src/format.interface.js +1 -0
- package/build/src/google.d.ts +1 -1
- package/build/src/google.js +32 -49
- package/build/src/index.d.ts +4 -3
- package/build/src/index.js +15 -17
- package/build/src/lib.d.ts +1 -1
- package/build/src/lib.js +188 -133
- package/build/src/openai.d.ts +2 -2
- package/build/src/openai.js +59 -50
- package/build/src/translate.interface.d.ts +1 -1
- package/build/src/translate.interface.js +1 -2
- package/build/src/util.js +4 -9
- package/build/src/validation/enhanced-validation-result.d.ts +96 -0
- package/build/src/validation/enhanced-validation-result.js +198 -0
- package/build/src/validation/error-messages.d.ts +88 -0
- package/build/src/validation/error-messages.js +436 -0
- package/build/src/validation/error-recovery.d.ts +78 -0
- package/build/src/validation/error-recovery.js +593 -0
- package/build/src/validation/example-usage.d.ts +31 -0
- package/build/src/validation/example-usage.js +148 -0
- package/build/src/validation/format-rules.d.ts +37 -0
- package/build/src/validation/format-rules.js +550 -0
- package/build/src/validation/format-validator.d.ts +70 -0
- package/build/src/validation/format-validator.js +279 -0
- package/build/src/validation/index.d.ts +13 -0
- package/build/src/validation/index.js +30 -0
- package/build/src/validation/validation-service.d.ts +56 -0
- package/build/src/validation/validation-service.js +262 -0
- package/build/tests/arb-handler.test.d.ts +1 -0
- package/build/tests/arb-handler.test.js +694 -0
- package/build/tests/cli-integration.test.d.ts +1 -0
- package/build/tests/cli-integration.test.js +352 -0
- package/build/tests/csv-handler.test.d.ts +1 -0
- package/build/tests/csv-handler.test.js +507 -0
- package/build/tests/error-handling.test.d.ts +1 -0
- package/build/tests/error-handling.test.js +456 -0
- package/build/tests/files-integration.test.d.ts +1 -0
- package/build/tests/files-integration.test.js +421 -0
- package/build/tests/json-handler.test.d.ts +1 -0
- package/build/tests/json-handler.test.js +526 -0
- package/build/tests/po-handler.test.d.ts +1 -0
- package/build/tests/po-handler.test.js +768 -0
- package/build/tests/properties-handler.test.d.ts +1 -0
- package/build/tests/properties-handler.test.js +316 -0
- package/build/tests/setup.d.ts +1 -0
- package/build/tests/setup.js +5 -0
- package/build/tests/xliff-handler.test.d.ts +1 -0
- package/build/tests/xliff-handler.test.js +459 -0
- package/build/tests/xmb-xtb-handler.test.d.ts +1 -0
- package/build/tests/xmb-xtb-handler.test.js +758 -0
- package/build/tests/xml-handler.test.d.ts +1 -0
- package/build/tests/xml-handler.test.js +570 -0
- package/build/tests/yaml-handler.test.d.ts +1 -0
- package/build/tests/yaml-handler.test.js +156 -0
- package/package.json +97 -21
package/build/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "auto-translate-json-library",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.2",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"description": "Automatically translates JSON language files to other languages using Google Translate,AWS,Azure,DeepL,OpenAI or local OpenAI compatible server",
|
|
5
6
|
"main": "./build/src/index.js",
|
|
6
7
|
"bin": {
|
|
7
|
-
"auto-translate-json-library": "
|
|
8
|
-
"atj": "
|
|
8
|
+
"auto-translate-json-library": "build/src/bin/cli.js",
|
|
9
|
+
"atj": "build/src/bin/cli.js"
|
|
9
10
|
},
|
|
10
11
|
"types": "./build/src/index.d.ts",
|
|
11
12
|
"files": [
|
|
@@ -15,9 +16,13 @@
|
|
|
15
16
|
"scripts": {
|
|
16
17
|
"prepare": "tsc",
|
|
17
18
|
"build": "tsc",
|
|
19
|
+
"build:go": "tsgo --skipLibCheck",
|
|
18
20
|
"build:run": "ts-node ./build/src/index.js --pivotTranslation=./tests/translations/en.json",
|
|
19
21
|
"debug": "ts-node src/index.ts --pivotTranslation=./tests/translations/en.json",
|
|
20
|
-
"
|
|
22
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
23
|
+
"test:watch": "jest --watch",
|
|
24
|
+
"test:coverage": "jest --coverage",
|
|
25
|
+
"lint": "biome check ./src --max-diagnostics 1000",
|
|
21
26
|
"lint-fix": "biome check ./src --write",
|
|
22
27
|
"lint-fix-all": "biome check --write --unsafe ./src",
|
|
23
28
|
"format": "biome format ./src",
|
|
@@ -26,22 +31,80 @@
|
|
|
26
31
|
},
|
|
27
32
|
"keywords": [
|
|
28
33
|
"translate",
|
|
34
|
+
"translation",
|
|
35
|
+
"i18n",
|
|
36
|
+
"internationalization",
|
|
37
|
+
"localization",
|
|
29
38
|
"language",
|
|
30
39
|
"json",
|
|
40
|
+
"xml",
|
|
41
|
+
"yaml",
|
|
42
|
+
"yml",
|
|
43
|
+
"properties",
|
|
44
|
+
"csv",
|
|
45
|
+
"tsv",
|
|
46
|
+
"arb",
|
|
47
|
+
"po",
|
|
48
|
+
"pot",
|
|
49
|
+
"xliff",
|
|
50
|
+
"xlf",
|
|
51
|
+
"xmb",
|
|
52
|
+
"xtb",
|
|
53
|
+
"android-xml",
|
|
54
|
+
"ios-xml",
|
|
31
55
|
"flutter",
|
|
32
56
|
"angular",
|
|
33
57
|
"ngx-translate",
|
|
34
58
|
"transloco",
|
|
35
59
|
"auto-translate-json",
|
|
36
|
-
"google",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
60
|
+
"google-translate",
|
|
61
|
+
"aws-translate",
|
|
62
|
+
"azure-translator",
|
|
63
|
+
"deepl",
|
|
64
|
+
"deepl-pro",
|
|
65
|
+
"deepl-free",
|
|
66
|
+
"openai",
|
|
67
|
+
"gpt-4",
|
|
68
|
+
"gpt-4.1-mini",
|
|
69
|
+
"deepseek",
|
|
70
|
+
"ollama",
|
|
71
|
+
"qwen2.5",
|
|
72
|
+
"gemma2",
|
|
73
|
+
"llama3.1",
|
|
74
|
+
"local-ai",
|
|
75
|
+
"openai-compatible",
|
|
76
|
+
"jan",
|
|
77
|
+
"jan-ai",
|
|
78
|
+
"lm-studio",
|
|
79
|
+
"lmstudio",
|
|
80
|
+
"text-generation-webui",
|
|
81
|
+
"oobabooga",
|
|
82
|
+
"vllm",
|
|
83
|
+
"llamacpp",
|
|
84
|
+
"llama-cpp",
|
|
85
|
+
"koboldai",
|
|
86
|
+
"kobold",
|
|
87
|
+
"localai",
|
|
88
|
+
"fastchat",
|
|
89
|
+
"xinference",
|
|
90
|
+
"mlx",
|
|
91
|
+
"mlx-lm",
|
|
92
|
+
"candle",
|
|
93
|
+
"ctransformers",
|
|
94
|
+
"exllama",
|
|
95
|
+
"exllamav2",
|
|
96
|
+
"gpt4all",
|
|
97
|
+
"cli",
|
|
98
|
+
"command-line",
|
|
99
|
+
"automation",
|
|
100
|
+
"batch-translation",
|
|
101
|
+
"multi-format",
|
|
102
|
+
"gettext"
|
|
40
103
|
],
|
|
41
104
|
"author": "codegrue",
|
|
42
105
|
"repository": {
|
|
43
106
|
"type": "git",
|
|
44
|
-
"url": "https://github.com/topce/auto-translate-json-library"
|
|
107
|
+
"url": "git+https://github.com/topce/auto-translate-json-library.git"
|
|
45
108
|
},
|
|
46
109
|
"contributors": [
|
|
47
110
|
"codegrue",
|
|
@@ -53,24 +116,37 @@
|
|
|
53
116
|
],
|
|
54
117
|
"license": "MIT",
|
|
55
118
|
"devDependencies": {
|
|
56
|
-
"@biomejs/biome": "2.
|
|
119
|
+
"@biomejs/biome": "2.3.11",
|
|
120
|
+
"@topce/native-preview": "7.0.0-dev.20250824",
|
|
121
|
+
"@types/gettext-parser": "8.0.0",
|
|
122
|
+
"@types/jest": "30.0.0",
|
|
57
123
|
"@types/minimist": "1.2.5",
|
|
58
|
-
"@types/node": "
|
|
59
|
-
"@types/
|
|
124
|
+
"@types/node": "25.0.3",
|
|
125
|
+
"@types/properties-parser": "0.3.3",
|
|
126
|
+
"@types/yargs": "17.0.35",
|
|
127
|
+
"jest": "30.2.0",
|
|
128
|
+
"ts-jest": "29.4.6",
|
|
60
129
|
"ts-node": "10.9.2",
|
|
61
|
-
"typescript": "5.
|
|
130
|
+
"typescript": "5.9.3"
|
|
62
131
|
},
|
|
63
132
|
"dependencies": {
|
|
64
|
-
"@aws-sdk/client-translate": "3.
|
|
65
|
-
"@google-cloud/translate": "9.
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
133
|
+
"@aws-sdk/client-translate": "3.962.0",
|
|
134
|
+
"@google-cloud/translate": "9.3.0",
|
|
135
|
+
"@types/js-yaml": "4.0.9",
|
|
136
|
+
"axios": "1.13.2",
|
|
137
|
+
"csv-parser": "3.2.0",
|
|
138
|
+
"csv-writer": "1.6.0",
|
|
139
|
+
"deepl-node": "1.24.0",
|
|
140
|
+
"dotenv": "17.2.3",
|
|
141
|
+
"fast-xml-parser": "5.3.3",
|
|
142
|
+
"form-data": "4.0.5",
|
|
143
|
+
"gettext-parser": "9.0.0",
|
|
144
|
+
"js-yaml": "4.1.1",
|
|
70
145
|
"minimist": "1.2.8",
|
|
71
|
-
"openai": "
|
|
146
|
+
"openai": "6.15.0",
|
|
72
147
|
"picocolors": "1.1.1",
|
|
73
|
-
"
|
|
148
|
+
"properties-parser": "0.6.0",
|
|
149
|
+
"uuid": "13.0.0",
|
|
74
150
|
"yargs": "18.0.0"
|
|
75
151
|
}
|
|
76
152
|
}
|
package/build/src/aws.d.ts
CHANGED
package/build/src/aws.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AWSTranslate = void 0;
|
|
13
|
-
const client_translate_1 = require("@aws-sdk/client-translate");
|
|
14
|
-
const util_1 = require("./util");
|
|
1
|
+
import { Translate, } from "@aws-sdk/client-translate";
|
|
2
|
+
import { Util } from "./util.js";
|
|
15
3
|
const supportedLanguages = [
|
|
16
4
|
"af",
|
|
17
5
|
"sq",
|
|
@@ -89,12 +77,16 @@ const supportedLanguages = [
|
|
|
89
77
|
"vi",
|
|
90
78
|
"cy",
|
|
91
79
|
];
|
|
92
|
-
class AWSTranslate {
|
|
80
|
+
export class AWSTranslate {
|
|
81
|
+
accessKeyId;
|
|
82
|
+
secretAccessKey;
|
|
83
|
+
regions;
|
|
84
|
+
client;
|
|
93
85
|
constructor(accessKeyId, secretAccessKey, regions) {
|
|
94
86
|
this.accessKeyId = accessKeyId;
|
|
95
87
|
this.secretAccessKey = secretAccessKey;
|
|
96
88
|
this.regions = regions;
|
|
97
|
-
this.client = new
|
|
89
|
+
this.client = new Translate({
|
|
98
90
|
credentials: {
|
|
99
91
|
accessKeyId: this.accessKeyId,
|
|
100
92
|
secretAccessKey: this.secretAccessKey,
|
|
@@ -105,27 +97,24 @@ class AWSTranslate {
|
|
|
105
97
|
isValidLocale(targetLocale) {
|
|
106
98
|
return supportedLanguages.includes(targetLocale);
|
|
107
99
|
}
|
|
108
|
-
translateText(text, sourceLocale, targetLocale) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return result;
|
|
128
|
-
});
|
|
100
|
+
async translateText(text, sourceLocale, targetLocale) {
|
|
101
|
+
let args;
|
|
102
|
+
({ args, text } = Util.replaceContextVariables(text));
|
|
103
|
+
let result = "";
|
|
104
|
+
const params = {
|
|
105
|
+
SourceLanguageCode: sourceLocale,
|
|
106
|
+
TargetLanguageCode: targetLocale,
|
|
107
|
+
Text: text,
|
|
108
|
+
};
|
|
109
|
+
try {
|
|
110
|
+
const translation = await this.client.translateText(params);
|
|
111
|
+
result = translation.TranslatedText;
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
console.error(error);
|
|
115
|
+
return "";
|
|
116
|
+
}
|
|
117
|
+
result = Util.replaceArgumentsWithNumbers(args, result);
|
|
118
|
+
return result;
|
|
129
119
|
}
|
|
130
120
|
}
|
|
131
|
-
exports.AWSTranslate = AWSTranslate;
|
package/build/src/azure.d.ts
CHANGED
package/build/src/azure.js
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.AzureTranslate = void 0;
|
|
13
|
-
const util_1 = require("./util");
|
|
14
|
-
const axios = require("axios").default;
|
|
15
|
-
const { v4: uuidv4 } = require("uuid");
|
|
1
|
+
import axios from "axios";
|
|
2
|
+
import { setTimeout as sleep } from "timers/promises";
|
|
3
|
+
import { v4 as uuidv4 } from "uuid";
|
|
4
|
+
import { Util } from "./util.js";
|
|
16
5
|
const supportedLanguages = [
|
|
17
6
|
"af",
|
|
18
7
|
"sq",
|
|
@@ -118,67 +107,65 @@ const supportedLanguages = [
|
|
|
118
107
|
"cy",
|
|
119
108
|
"yua",
|
|
120
109
|
];
|
|
121
|
-
class AzureTranslate {
|
|
110
|
+
export class AzureTranslate {
|
|
111
|
+
subscriptionKey;
|
|
112
|
+
subscriptionRegion;
|
|
113
|
+
endpoint = "https://api.cognitive.microsofttranslator.com";
|
|
122
114
|
constructor(subscriptionKey, subscriptionRegion) {
|
|
123
115
|
this.subscriptionKey = subscriptionKey;
|
|
124
116
|
this.subscriptionRegion = subscriptionRegion;
|
|
125
|
-
this.endpoint = "https://api.cognitive.microsofttranslator.com";
|
|
126
117
|
}
|
|
127
118
|
isValidLocale(targetLocale) {
|
|
128
119
|
return supportedLanguages.includes(targetLocale);
|
|
129
120
|
}
|
|
130
|
-
translateText(text, sourceLocale, targetLocale) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
121
|
+
async translateText(text, sourceLocale, targetLocale) {
|
|
122
|
+
let args;
|
|
123
|
+
({ args, text } = Util.replaceContextVariables(text));
|
|
124
|
+
let result = "";
|
|
125
|
+
const maxRetries = 5;
|
|
126
|
+
let retryCount = 0;
|
|
127
|
+
while (retryCount <= maxRetries) {
|
|
128
|
+
try {
|
|
129
|
+
const response = await axios({
|
|
130
|
+
baseURL: this.endpoint,
|
|
131
|
+
url: "/translate",
|
|
132
|
+
method: "post",
|
|
133
|
+
headers: {
|
|
134
|
+
"Ocp-Apim-Subscription-Key": this.subscriptionKey,
|
|
135
|
+
"Ocp-Apim-Subscription-Region": this.subscriptionRegion,
|
|
136
|
+
"Content-type": "application/json",
|
|
137
|
+
"X-ClientTraceId": uuidv4().toString(),
|
|
138
|
+
},
|
|
139
|
+
params: {
|
|
140
|
+
"api-version": "3.0",
|
|
141
|
+
from: sourceLocale,
|
|
142
|
+
to: [targetLocale],
|
|
143
|
+
},
|
|
144
|
+
data: [
|
|
145
|
+
{
|
|
146
|
+
text: text,
|
|
149
147
|
},
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
});
|
|
162
|
-
result = response.data[0].translations[0].text;
|
|
163
|
-
break; // Success, exit the retry loop
|
|
148
|
+
],
|
|
149
|
+
responseType: "json",
|
|
150
|
+
});
|
|
151
|
+
result = response.data[0].translations[0].text;
|
|
152
|
+
break; // Success, exit the retry loop
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
if (error.response?.status === 429 && retryCount < maxRetries) {
|
|
156
|
+
retryCount++;
|
|
157
|
+
console.log(`Rate limit exceeded. Retrying in 10 seconds... (Attempt ${retryCount}/${maxRetries})`);
|
|
158
|
+
await sleep(10000); // Wait 10 seconds using timers/promises
|
|
164
159
|
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
retryCount++;
|
|
168
|
-
console.log(`Rate limit exceeded. Retrying in 10 seconds... (Attempt ${retryCount}/${maxRetries})`);
|
|
169
|
-
yield new Promise(resolve => setTimeout(resolve, 10000)); // Wait 10 second
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
throw error; // Re-throw if it's not a 429 error or we've exceeded max retries
|
|
173
|
-
}
|
|
160
|
+
else {
|
|
161
|
+
throw error; // Re-throw if it's not a 429 error or we've exceeded max retries
|
|
174
162
|
}
|
|
175
163
|
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
164
|
+
}
|
|
165
|
+
result = Util.replaceArgumentsWithNumbers(args, result);
|
|
166
|
+
return result;
|
|
179
167
|
}
|
|
180
168
|
}
|
|
181
|
-
exports.AzureTranslate = AzureTranslate;
|
|
182
169
|
// https://docs.microsoft.com/en-us/azure/cognitive-services/translator/quickstart-translator?tabs=nodejs#translate-text
|
|
183
170
|
// Add your location, also known as region. The default is global.
|
|
184
171
|
// This is required if using a Cognitive Services resource.
|
package/build/src/bin/cli.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import "../format/index.js";
|