@justanarthur/payload-plugin-translator 3.3.1 → 3.3.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/dist/index.js +3 -3
- package/dist/jobs.js +2 -2
- package/dist/rsc.js +2 -2
- package/dist/shared/{chunk-hg50cgsw.js → chunk-kxdj1t2m.js} +1 -1
- package/dist/shared/{chunk-3rz1t943.js → chunk-pmxe5c20.js} +6 -1
- package/dist/shared/{chunk-gd0rak8x.js → chunk-xgsxe28w.js} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,15 +8,15 @@ import {
|
|
|
8
8
|
isTranslateMode,
|
|
9
9
|
createTranslateTask2,
|
|
10
10
|
createTranslateWorkflow2
|
|
11
|
-
} from "./shared/chunk-
|
|
12
|
-
import"./shared/chunk-
|
|
11
|
+
} from "./shared/chunk-kxdj1t2m.js";
|
|
12
|
+
import"./shared/chunk-pmxe5c20.js";
|
|
13
13
|
import {
|
|
14
14
|
readLocales,
|
|
15
15
|
parseEntityKey,
|
|
16
16
|
hasTranslateWorkflow,
|
|
17
17
|
queueBulkTranslation,
|
|
18
18
|
runQueuedTranslations
|
|
19
|
-
} from "./shared/chunk-
|
|
19
|
+
} from "./shared/chunk-xgsxe28w.js";
|
|
20
20
|
import {
|
|
21
21
|
TRANSLATION_STATUS_SLUG2,
|
|
22
22
|
REVIEW_VIEW_PATH
|
package/dist/jobs.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
createAutoTranslateGlobalHook2,
|
|
4
4
|
createTranslateTask2,
|
|
5
5
|
createTranslateWorkflow2
|
|
6
|
-
} from "./shared/chunk-
|
|
6
|
+
} from "./shared/chunk-kxdj1t2m.js";
|
|
7
7
|
import {
|
|
8
8
|
TRANSLATE_TASK_SLUG2,
|
|
9
9
|
TRANSLATE_WORKFLOW_SLUG2
|
|
10
|
-
} from "./shared/chunk-
|
|
10
|
+
} from "./shared/chunk-pmxe5c20.js";
|
|
11
11
|
|
|
12
12
|
// src/exports/jobs.ts
|
|
13
13
|
var jobs = {
|
package/dist/rsc.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import"./shared/chunk-
|
|
1
|
+
import"./shared/chunk-pmxe5c20.js";
|
|
2
2
|
import {
|
|
3
3
|
readLocales,
|
|
4
4
|
loadCollectionReview,
|
|
5
5
|
loadGlobalsReview,
|
|
6
6
|
loadEntityLocaleReview,
|
|
7
7
|
loadJobsProgress
|
|
8
|
-
} from "./shared/chunk-
|
|
8
|
+
} from "./shared/chunk-xgsxe28w.js";
|
|
9
9
|
import {
|
|
10
10
|
REVIEW_VIEW_PATH
|
|
11
11
|
} from "./shared/chunk-31qgv1zk.js";
|
|
@@ -157,6 +157,7 @@ var buildLocalizedRows = (from, existing, isBlocks, emptyOnly) => {
|
|
|
157
157
|
return from.map((row, index) => {
|
|
158
158
|
const previous = existing[index] && (!isBlocks || existing[index].blockType === row.blockType) ? existing[index] : undefined;
|
|
159
159
|
return {
|
|
160
|
+
...structuredClone(row),
|
|
160
161
|
...previous ?? {},
|
|
161
162
|
id: previous?.id ?? ObjectID().toHexString(),
|
|
162
163
|
...isBlocks ? { blockType: row.blockType, blockName: row.blockName ?? previous?.blockName } : {}
|
|
@@ -377,8 +378,12 @@ var traverseFields = (args) => {
|
|
|
377
378
|
const current = siblingDataTranslated[field.name];
|
|
378
379
|
const richTextPath = joinPath(path, field.name);
|
|
379
380
|
onField?.({ path: richTextPath, type: "richText", source: richTextDataFrom, target: current });
|
|
380
|
-
if (!richTextDataFrom || !hasText(richTextDataFrom))
|
|
381
|
+
if (!richTextDataFrom || !hasText(richTextDataFrom)) {
|
|
382
|
+
if (richTextDataFrom && current === undefined) {
|
|
383
|
+
siblingDataTranslated[field.name] = structuredClone(richTextDataFrom);
|
|
384
|
+
}
|
|
381
385
|
break;
|
|
386
|
+
}
|
|
382
387
|
if (keepsTarget(richTextDataFrom, current))
|
|
383
388
|
break;
|
|
384
389
|
const isSlate = Array.isArray(richTextDataFrom);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justanarthur/payload-plugin-translator",
|
|
3
3
|
"description": "Translator plugin for Payload CMS — automatic localization via Google, OpenAI, LibreTranslate, or custom resolvers.",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.2",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
7
7
|
"files": [
|