@goenhance/strapi-plugins-translate 0.11.0 → 1.0.0
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/dist/server/index.js +0 -13
- package/dist/server/index.mjs +0 -13
- package/package.json +1 -1
package/dist/server/index.js
CHANGED
|
@@ -272,19 +272,6 @@ const controllers$1 = ({ strapi: strapi2 }) => ({
|
|
|
272
272
|
}
|
|
273
273
|
for (const targetLocale of targetLocales) {
|
|
274
274
|
try {
|
|
275
|
-
const existingTranslation = await strapi2.documents(contentType).findOne({
|
|
276
|
-
documentId: entryId,
|
|
277
|
-
locale: targetLocale
|
|
278
|
-
});
|
|
279
|
-
if (existingTranslation) {
|
|
280
|
-
results.push({
|
|
281
|
-
documentId: entryId,
|
|
282
|
-
locale: targetLocale,
|
|
283
|
-
success: false,
|
|
284
|
-
message: "Translation already exists"
|
|
285
|
-
});
|
|
286
|
-
continue;
|
|
287
|
-
}
|
|
288
275
|
const translationResult = await strapi2.plugin("strapi-plugins-translate").service("llm-service").generateWithLLM(contentTypeSchema, sourceEntry, components, {
|
|
289
276
|
targetLanguage: targetLocale
|
|
290
277
|
});
|
package/dist/server/index.mjs
CHANGED
|
@@ -271,19 +271,6 @@ const controllers$1 = ({ strapi: strapi2 }) => ({
|
|
|
271
271
|
}
|
|
272
272
|
for (const targetLocale of targetLocales) {
|
|
273
273
|
try {
|
|
274
|
-
const existingTranslation = await strapi2.documents(contentType).findOne({
|
|
275
|
-
documentId: entryId,
|
|
276
|
-
locale: targetLocale
|
|
277
|
-
});
|
|
278
|
-
if (existingTranslation) {
|
|
279
|
-
results.push({
|
|
280
|
-
documentId: entryId,
|
|
281
|
-
locale: targetLocale,
|
|
282
|
-
success: false,
|
|
283
|
-
message: "Translation already exists"
|
|
284
|
-
});
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
274
|
const translationResult = await strapi2.plugin("strapi-plugins-translate").service("llm-service").generateWithLLM(contentTypeSchema, sourceEntry, components, {
|
|
288
275
|
targetLanguage: targetLocale
|
|
289
276
|
});
|
package/package.json
CHANGED