generaltranslation 1.1.27 → 1.1.29
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 +2 -2
- package/package.json +1 -1
- package/translate/site.js +5 -5
package/index.js
CHANGED
|
@@ -24,14 +24,14 @@ export default class GT {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// Prompt I18N
|
|
27
|
-
|
|
27
|
+
async translatePrompt(prompt, language) {
|
|
28
28
|
return await _translatePrompt({
|
|
29
29
|
content: prompt, language: language, config: this
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// Site I18N
|
|
34
|
-
|
|
34
|
+
async createI18N({ projectID, html, strings, defaultLanguage, userLanguage }) {
|
|
35
35
|
return await _createI18N({
|
|
36
36
|
projectID: projectID,
|
|
37
37
|
html: html,
|
package/package.json
CHANGED
package/translate/site.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const _createI18N = async ({
|
|
2
2
|
projectID,
|
|
3
|
+
html,
|
|
4
|
+
strings,
|
|
3
5
|
defaultLanguage,
|
|
4
6
|
userLanguage,
|
|
5
|
-
content,
|
|
6
|
-
metadata,
|
|
7
7
|
config
|
|
8
8
|
}) => {
|
|
9
9
|
|
|
@@ -25,10 +25,10 @@ const _createI18N = async ({
|
|
|
25
25
|
},
|
|
26
26
|
body: JSON.stringify({
|
|
27
27
|
projectID: projectID,
|
|
28
|
-
|
|
28
|
+
html: html,
|
|
29
|
+
strings: strings,
|
|
29
30
|
defaultLanguage: defaultLanguage,
|
|
30
|
-
userLanguage: userLanguage
|
|
31
|
-
metadata: metadata
|
|
31
|
+
userLanguage: userLanguage
|
|
32
32
|
})
|
|
33
33
|
})
|
|
34
34
|
if (!response.ok) {
|