generaltranslation 1.1.29 → 1.1.31
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/index.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
import _getUserLanguage from "./client/getUserLanguage.js";
|
|
7
7
|
import { _getLanguageCode, _getLanguageName } from "./codes/codes.js"
|
|
8
8
|
import { _getModelInfo, _getModelList, _getModelLanguages, _isLanguageSupported, _getModelsByDeveloper, _getModelsByLanguage } from "./models/models.js"
|
|
9
|
-
import _translatePrompt from "./translate/
|
|
10
|
-
import _createI18N from "./translate/
|
|
9
|
+
import _translatePrompt from "./translate/prompts.js"
|
|
10
|
+
import _createI18N from "./translate/html.js";
|
|
11
11
|
|
|
12
12
|
// ----- CORE CLASS ----- //
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ const _createI18N = async ({
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
try {
|
|
20
|
-
const response = await fetch(`${config?.baseURL}/
|
|
20
|
+
const response = await fetch(`${config?.baseURL}/html`, {
|
|
21
21
|
method: 'POST',
|
|
22
22
|
headers: {
|
|
23
23
|
'Content-Type': 'application/json',
|
|
@@ -40,7 +40,7 @@ const _createI18N = async ({
|
|
|
40
40
|
}
|
|
41
41
|
} catch (error) {
|
|
42
42
|
console.error(error)
|
|
43
|
-
return
|
|
43
|
+
return Object.fromEntries(strings.map(s => [s, s]));
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
}
|
|
@@ -81,7 +81,7 @@ const _translatePrompt = async ({
|
|
|
81
81
|
const { processed, untranslated } = _processPrompt({ content });
|
|
82
82
|
|
|
83
83
|
try {
|
|
84
|
-
const response = await fetch(`${config?.baseURL}/
|
|
84
|
+
const response = await fetch(`${config?.baseURL}/prompts`, {
|
|
85
85
|
method: 'POST',
|
|
86
86
|
headers: {
|
|
87
87
|
'Content-Type': 'application/json',
|