@translationstudio/translationstudio-strapi-extension 1.0.9 → 1.0.11
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.
|
@@ -19,7 +19,7 @@ const SettingsPage = () => {
|
|
|
19
19
|
const getLicense = async () => {
|
|
20
20
|
setIsLoading(true);
|
|
21
21
|
try {
|
|
22
|
-
const response = await get("/translationstudio
|
|
22
|
+
const response = await get("/translationstudio/getLicense");
|
|
23
23
|
if (response.data.license) {
|
|
24
24
|
setLicenseValue(response.data.license);
|
|
25
25
|
} else {
|
|
@@ -37,7 +37,7 @@ const SettingsPage = () => {
|
|
|
37
37
|
const fetchToken = async () => {
|
|
38
38
|
setIsLoadingToken(true);
|
|
39
39
|
try {
|
|
40
|
-
const response = await get("/translationstudio
|
|
40
|
+
const response = await get("/translationstudio/getToken");
|
|
41
41
|
if (response.data.token) {
|
|
42
42
|
setTokenValue(response.data.token);
|
|
43
43
|
} else {
|
|
@@ -56,7 +56,7 @@ const SettingsPage = () => {
|
|
|
56
56
|
};
|
|
57
57
|
const handleSaveLicense = async () => {
|
|
58
58
|
try {
|
|
59
|
-
const response = await post("/translationstudio
|
|
59
|
+
const response = await post("/translationstudio/setLicense", { license: licenseValue });
|
|
60
60
|
if (response) {
|
|
61
61
|
displayAlert("success");
|
|
62
62
|
return;
|
|
@@ -78,7 +78,7 @@ const SettingsPage = () => {
|
|
|
78
78
|
const handleGenerateToken = async () => {
|
|
79
79
|
setIsLoadingToken(true);
|
|
80
80
|
try {
|
|
81
|
-
const response = await post("/translationstudio
|
|
81
|
+
const response = await post("/translationstudio/generateToken");
|
|
82
82
|
if (response.data?.token) {
|
|
83
83
|
setTokenValue(response.data.token);
|
|
84
84
|
}
|
|
@@ -17,7 +17,7 @@ const SettingsPage = () => {
|
|
|
17
17
|
const getLicense = async () => {
|
|
18
18
|
setIsLoading(true);
|
|
19
19
|
try {
|
|
20
|
-
const response = await get("/translationstudio
|
|
20
|
+
const response = await get("/translationstudio/getLicense");
|
|
21
21
|
if (response.data.license) {
|
|
22
22
|
setLicenseValue(response.data.license);
|
|
23
23
|
} else {
|
|
@@ -35,7 +35,7 @@ const SettingsPage = () => {
|
|
|
35
35
|
const fetchToken = async () => {
|
|
36
36
|
setIsLoadingToken(true);
|
|
37
37
|
try {
|
|
38
|
-
const response = await get("/translationstudio
|
|
38
|
+
const response = await get("/translationstudio/getToken");
|
|
39
39
|
if (response.data.token) {
|
|
40
40
|
setTokenValue(response.data.token);
|
|
41
41
|
} else {
|
|
@@ -54,7 +54,7 @@ const SettingsPage = () => {
|
|
|
54
54
|
};
|
|
55
55
|
const handleSaveLicense = async () => {
|
|
56
56
|
try {
|
|
57
|
-
const response = await post("/translationstudio
|
|
57
|
+
const response = await post("/translationstudio/setLicense", { license: licenseValue });
|
|
58
58
|
if (response) {
|
|
59
59
|
displayAlert("success");
|
|
60
60
|
return;
|
|
@@ -76,7 +76,7 @@ const SettingsPage = () => {
|
|
|
76
76
|
const handleGenerateToken = async () => {
|
|
77
77
|
setIsLoadingToken(true);
|
|
78
78
|
try {
|
|
79
|
-
const response = await post("/translationstudio
|
|
79
|
+
const response = await post("/translationstudio/generateToken");
|
|
80
80
|
if (response.data?.token) {
|
|
81
81
|
setTokenValue(response.data.token);
|
|
82
82
|
}
|
package/dist/admin/index.js
CHANGED
|
@@ -50,7 +50,7 @@ const TranslationMenu = () => {
|
|
|
50
50
|
const isMachineTranslation = selectedLang?.machine ?? false;
|
|
51
51
|
async function fetchEmail() {
|
|
52
52
|
try {
|
|
53
|
-
const response = await get("/translationstudio
|
|
53
|
+
const response = await get("/translationstudio/email");
|
|
54
54
|
setEmail(response.data.email ?? "");
|
|
55
55
|
} catch (error) {
|
|
56
56
|
console.error(error);
|
|
@@ -63,7 +63,7 @@ const TranslationMenu = () => {
|
|
|
63
63
|
if (!model || !id && isCollectionType) return;
|
|
64
64
|
const fetchLanguages = async () => {
|
|
65
65
|
try {
|
|
66
|
-
const response = await get("/translationstudio
|
|
66
|
+
const response = await get("/translationstudio/mappings");
|
|
67
67
|
setLanguages(response.data);
|
|
68
68
|
} catch (error) {
|
|
69
69
|
console.error("Error fetching languages:", error);
|
|
@@ -145,7 +145,7 @@ const TranslationMenu = () => {
|
|
|
145
145
|
const handleTranslationRequest = async () => {
|
|
146
146
|
const entryUid = isCollectionType ? `${model}#${id}` : model;
|
|
147
147
|
try {
|
|
148
|
-
const entryResponse = await post("/translationstudio
|
|
148
|
+
const entryResponse = await post("/translationstudio/entrydata", {
|
|
149
149
|
uid: entryUid,
|
|
150
150
|
locale: source
|
|
151
151
|
});
|
|
@@ -171,7 +171,7 @@ const TranslationMenu = () => {
|
|
|
171
171
|
name: determineEntryName(fetchedEntryData)
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
|
-
const response = await post("/translationstudio
|
|
174
|
+
const response = await post("/translationstudio/translate", payload);
|
|
175
175
|
displayAlert(
|
|
176
176
|
response.data === true ? "success" : "danger",
|
|
177
177
|
response.data === true ? "Translation request sent successfully" : "Error requesting translation"
|
|
@@ -285,7 +285,7 @@ const index = {
|
|
|
285
285
|
defaultMessage: PLUGIN_ID
|
|
286
286
|
},
|
|
287
287
|
Component: async () => {
|
|
288
|
-
const { App } = await Promise.resolve().then(() => require("../_chunks/App-
|
|
288
|
+
const { App } = await Promise.resolve().then(() => require("../_chunks/App-BgCduyZ_.js"));
|
|
289
289
|
return App;
|
|
290
290
|
}
|
|
291
291
|
});
|
package/dist/admin/index.mjs
CHANGED
|
@@ -49,7 +49,7 @@ const TranslationMenu = () => {
|
|
|
49
49
|
const isMachineTranslation = selectedLang?.machine ?? false;
|
|
50
50
|
async function fetchEmail() {
|
|
51
51
|
try {
|
|
52
|
-
const response = await get("/translationstudio
|
|
52
|
+
const response = await get("/translationstudio/email");
|
|
53
53
|
setEmail(response.data.email ?? "");
|
|
54
54
|
} catch (error) {
|
|
55
55
|
console.error(error);
|
|
@@ -62,7 +62,7 @@ const TranslationMenu = () => {
|
|
|
62
62
|
if (!model || !id && isCollectionType) return;
|
|
63
63
|
const fetchLanguages = async () => {
|
|
64
64
|
try {
|
|
65
|
-
const response = await get("/translationstudio
|
|
65
|
+
const response = await get("/translationstudio/mappings");
|
|
66
66
|
setLanguages(response.data);
|
|
67
67
|
} catch (error) {
|
|
68
68
|
console.error("Error fetching languages:", error);
|
|
@@ -144,7 +144,7 @@ const TranslationMenu = () => {
|
|
|
144
144
|
const handleTranslationRequest = async () => {
|
|
145
145
|
const entryUid = isCollectionType ? `${model}#${id}` : model;
|
|
146
146
|
try {
|
|
147
|
-
const entryResponse = await post("/translationstudio
|
|
147
|
+
const entryResponse = await post("/translationstudio/entrydata", {
|
|
148
148
|
uid: entryUid,
|
|
149
149
|
locale: source
|
|
150
150
|
});
|
|
@@ -170,7 +170,7 @@ const TranslationMenu = () => {
|
|
|
170
170
|
name: determineEntryName(fetchedEntryData)
|
|
171
171
|
}
|
|
172
172
|
};
|
|
173
|
-
const response = await post("/translationstudio
|
|
173
|
+
const response = await post("/translationstudio/translate", payload);
|
|
174
174
|
displayAlert(
|
|
175
175
|
response.data === true ? "success" : "danger",
|
|
176
176
|
response.data === true ? "Translation request sent successfully" : "Error requesting translation"
|
|
@@ -284,7 +284,7 @@ const index = {
|
|
|
284
284
|
defaultMessage: PLUGIN_ID
|
|
285
285
|
},
|
|
286
286
|
Component: async () => {
|
|
287
|
-
const { App } = await import("../_chunks/App-
|
|
287
|
+
const { App } = await import("../_chunks/App-Di2efoW1.mjs");
|
|
288
288
|
return App;
|
|
289
289
|
}
|
|
290
290
|
});
|