@strapi/i18n 0.0.0-experimental.a53a4b1c8f7981a689823cdd719105671e1c6392 → 0.0.0-experimental.a6728ad43ac70ae19dabb624dbfca1f2d9610a86
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/LICENSE +18 -3
- package/dist/_chunks/{SettingsPage-B5sTcP82.mjs → SettingsPage-BIZrSFGY.mjs} +6 -6
- package/dist/_chunks/SettingsPage-BIZrSFGY.mjs.map +1 -0
- package/dist/_chunks/{SettingsPage-DT1sxWa2.js → SettingsPage-kMDCxWLw.js} +6 -6
- package/dist/_chunks/SettingsPage-kMDCxWLw.js.map +1 -0
- package/dist/_chunks/{en-BsOU9o5z.js → en-B6327hMz.js} +8 -2
- package/dist/_chunks/en-B6327hMz.js.map +1 -0
- package/dist/_chunks/{en-CM6Pjfyv.mjs → en-DZXpOMHo.mjs} +8 -2
- package/dist/_chunks/en-DZXpOMHo.mjs.map +1 -0
- package/dist/_chunks/{index-DsNqyQKx.mjs → index-DXrgAtCA.mjs} +348 -146
- package/dist/_chunks/index-DXrgAtCA.mjs.map +1 -0
- package/dist/_chunks/{index-jMrzaEb9.js → index-Dncj9Inq.js} +352 -150
- package/dist/_chunks/index-Dncj9Inq.js.map +1 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/BulkLocaleActionModal.d.ts +2 -1
- package/dist/admin/src/components/CMHeaderActions.d.ts +27 -3
- package/dist/admin/src/utils/clean.d.ts +4 -0
- package/dist/admin/src/utils/schemas.d.ts +1 -0
- package/dist/server/index.js +61 -98
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +62 -99
- package/dist/server/index.mjs.map +1 -1
- package/dist/server/src/bootstrap.d.ts +1 -4
- package/dist/server/src/bootstrap.d.ts.map +1 -1
- package/dist/server/src/index.d.ts +15 -13
- package/dist/server/src/index.d.ts.map +1 -1
- package/dist/server/src/services/index.d.ts +14 -10
- package/dist/server/src/services/index.d.ts.map +1 -1
- package/dist/server/src/services/permissions/actions.d.ts +14 -2
- package/dist/server/src/services/permissions/actions.d.ts.map +1 -1
- package/dist/server/src/services/permissions.d.ts +14 -2
- package/dist/server/src/services/permissions.d.ts.map +1 -1
- package/dist/server/src/utils/index.d.ts +0 -2
- package/dist/server/src/utils/index.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/_chunks/SettingsPage-B5sTcP82.mjs.map +0 -1
- package/dist/_chunks/SettingsPage-DT1sxWa2.js.map +0 -1
- package/dist/_chunks/en-BsOU9o5z.js.map +0 -1
- package/dist/_chunks/en-CM6Pjfyv.mjs.map +0 -1
- package/dist/_chunks/index-DsNqyQKx.mjs.map +0 -1
- package/dist/_chunks/index-jMrzaEb9.js.map +0 -1
- package/dist/admin/src/components/Initializer.d.ts +0 -5
- package/dist/server/src/services/entity-service-decorator.d.ts +0 -29
- package/dist/server/src/services/entity-service-decorator.d.ts.map +0 -1
- package/strapi-server.js +0 -3
@@ -7,6 +7,7 @@ const designSystem = require("@strapi/design-system");
|
|
7
7
|
const icons = require("@strapi/icons");
|
8
8
|
const reactIntl = require("react-intl");
|
9
9
|
const styledComponents = require("styled-components");
|
10
|
+
const query = require("@reduxjs/toolkit/query");
|
10
11
|
const strapiAdmin = require("@strapi/admin/strapi-admin");
|
11
12
|
const strapiAdmin$1 = require("@strapi/content-manager/strapi-admin");
|
12
13
|
const reactRouterDom = require("react-router-dom");
|
@@ -160,7 +161,7 @@ const useI18n = () => {
|
|
160
161
|
model: params.slug
|
161
162
|
},
|
162
163
|
{
|
163
|
-
skip:
|
164
|
+
skip: true
|
164
165
|
}
|
165
166
|
);
|
166
167
|
if (doesPluginOptionsHaveI18nLocalized(schema?.pluginOptions)) {
|
@@ -240,10 +241,93 @@ const relationsApi = i18nApi.injectEndpoints({
|
|
240
241
|
})
|
241
242
|
});
|
242
243
|
const { useGetManyDraftRelationCountQuery } = relationsApi;
|
244
|
+
const cleanData = (data, schema, components) => {
|
245
|
+
const cleanedData = removeFields(data, [
|
246
|
+
"createdAt",
|
247
|
+
"createdBy",
|
248
|
+
"updatedAt",
|
249
|
+
"updatedBy",
|
250
|
+
"id",
|
251
|
+
"documentId",
|
252
|
+
"publishedAt",
|
253
|
+
"strapi_stage",
|
254
|
+
"strapi_assignee",
|
255
|
+
"locale"
|
256
|
+
]);
|
257
|
+
const cleanedDataWithoutPasswordAndRelation = recursiveRemoveFieldTypes(
|
258
|
+
cleanedData,
|
259
|
+
schema,
|
260
|
+
components,
|
261
|
+
["relation", "password"]
|
262
|
+
);
|
263
|
+
return cleanedDataWithoutPasswordAndRelation;
|
264
|
+
};
|
265
|
+
const removeFields = (data, fields) => {
|
266
|
+
return Object.keys(data).reduce((acc, current) => {
|
267
|
+
if (fields.includes(current)) {
|
268
|
+
return acc;
|
269
|
+
}
|
270
|
+
acc[current] = data[current];
|
271
|
+
return acc;
|
272
|
+
}, {});
|
273
|
+
};
|
274
|
+
const recursiveRemoveFieldTypes = (data, schema, components, fields) => {
|
275
|
+
return Object.keys(data).reduce((acc, current) => {
|
276
|
+
const attribute = schema.attributes[current] ?? { type: void 0 };
|
277
|
+
if (fields.includes(attribute.type)) {
|
278
|
+
return acc;
|
279
|
+
}
|
280
|
+
if (attribute.type === "dynamiczone") {
|
281
|
+
acc[current] = data[current].map((componentValue, index2) => {
|
282
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(
|
283
|
+
componentValue,
|
284
|
+
components[componentValue.__component],
|
285
|
+
components,
|
286
|
+
fields
|
287
|
+
);
|
288
|
+
return {
|
289
|
+
...rest,
|
290
|
+
__temp_key__: index2 + 1
|
291
|
+
};
|
292
|
+
});
|
293
|
+
} else if (attribute.type === "component") {
|
294
|
+
const { repeatable, component } = attribute;
|
295
|
+
if (repeatable) {
|
296
|
+
acc[current] = (data[current] ?? []).map((compoData, index2) => {
|
297
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(
|
298
|
+
compoData,
|
299
|
+
components[component],
|
300
|
+
components,
|
301
|
+
fields
|
302
|
+
);
|
303
|
+
return {
|
304
|
+
...rest,
|
305
|
+
__temp_key__: index2 + 1
|
306
|
+
};
|
307
|
+
});
|
308
|
+
} else {
|
309
|
+
const { id: _, ...rest } = recursiveRemoveFieldTypes(
|
310
|
+
data[current] ?? {},
|
311
|
+
components[component],
|
312
|
+
components,
|
313
|
+
fields
|
314
|
+
);
|
315
|
+
acc[current] = rest;
|
316
|
+
}
|
317
|
+
} else {
|
318
|
+
acc[current] = data[current];
|
319
|
+
}
|
320
|
+
return acc;
|
321
|
+
}, {});
|
322
|
+
};
|
243
323
|
const isErrorMessageDescriptor = (object) => {
|
244
324
|
return typeof object === "object" && object !== null && "id" in object && "defaultMessage" in object;
|
245
325
|
};
|
246
|
-
const EntryValidationText = ({
|
326
|
+
const EntryValidationText = ({
|
327
|
+
status = "draft",
|
328
|
+
validationErrors,
|
329
|
+
action
|
330
|
+
}) => {
|
247
331
|
const { formatMessage } = reactIntl.useIntl();
|
248
332
|
const getErrorStr = (key, value) => {
|
249
333
|
if (typeof value === "string") {
|
@@ -277,30 +361,63 @@ const EntryValidationText = ({ status = "draft", validationErrors }) => {
|
|
277
361
|
) })
|
278
362
|
] });
|
279
363
|
}
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
364
|
+
const getStatusMessage = () => {
|
365
|
+
if (action === "bulk-publish") {
|
366
|
+
if (status === "published") {
|
367
|
+
return {
|
368
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
369
|
+
text: formatMessage({
|
370
|
+
id: "content-manager.bulk-publish.already-published",
|
371
|
+
defaultMessage: "Already Published"
|
372
|
+
}),
|
373
|
+
textColor: "success600",
|
374
|
+
fontWeight: "bold"
|
375
|
+
};
|
376
|
+
} else if (status === "modified") {
|
377
|
+
return {
|
378
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.ArrowsCounterClockwise, { fill: "alternative600" }),
|
379
|
+
text: formatMessage({
|
380
|
+
id: "app.utils.ready-to-publish-changes",
|
381
|
+
defaultMessage: "Ready to publish changes"
|
382
|
+
})
|
383
|
+
};
|
384
|
+
} else {
|
385
|
+
return {
|
386
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
387
|
+
text: formatMessage({
|
388
|
+
id: "app.utils.ready-to-publish",
|
389
|
+
defaultMessage: "Ready to publish"
|
390
|
+
})
|
391
|
+
};
|
392
|
+
}
|
393
|
+
} else {
|
394
|
+
if (status === "draft") {
|
395
|
+
return {
|
396
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
397
|
+
text: formatMessage({
|
398
|
+
id: "content-manager.bulk-unpublish.already-unpublished",
|
399
|
+
defaultMessage: "Already Unpublished"
|
400
|
+
}),
|
401
|
+
textColor: "success600",
|
402
|
+
fontWeight: "bold"
|
403
|
+
};
|
404
|
+
} else {
|
405
|
+
return {
|
406
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.CheckCircle, { fill: "success600" }),
|
407
|
+
text: formatMessage({
|
408
|
+
id: "app.utils.ready-to-unpublish-changes",
|
409
|
+
defaultMessage: "Ready to unpublish"
|
410
|
+
}),
|
411
|
+
textColor: "success600",
|
412
|
+
fontWeight: "bold"
|
413
|
+
};
|
414
|
+
}
|
415
|
+
}
|
416
|
+
};
|
417
|
+
const { icon, text, textColor = "success600", fontWeight = "normal" } = getStatusMessage();
|
298
418
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, children: [
|
299
|
-
|
300
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children:
|
301
|
-
id: "app.utils.ready-to-publish",
|
302
|
-
defaultMessage: "Ready to publish"
|
303
|
-
}) })
|
419
|
+
icon,
|
420
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor, fontWeight, children: text })
|
304
421
|
] });
|
305
422
|
};
|
306
423
|
const BoldChunk = (chunks) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { fontWeight: "bold", children: chunks });
|
@@ -308,7 +425,8 @@ const BulkLocaleActionModal = ({
|
|
308
425
|
headers,
|
309
426
|
rows,
|
310
427
|
localesMetadata,
|
311
|
-
validationErrors = {}
|
428
|
+
validationErrors = {},
|
429
|
+
action
|
312
430
|
}) => {
|
313
431
|
const { formatMessage } = reactIntl.useIntl();
|
314
432
|
const selectedRows = strapiAdmin.useTable(
|
@@ -321,27 +439,29 @@ const BulkLocaleActionModal = ({
|
|
321
439
|
return acc;
|
322
440
|
}, {});
|
323
441
|
const localesWithErrors = Object.keys(validationErrors);
|
324
|
-
const
|
442
|
+
const publishedCount = selectedRows.filter(
|
325
443
|
({ locale }) => currentStatusByLocale[locale] === "published"
|
326
444
|
).length;
|
327
|
-
const
|
445
|
+
const draftCount = selectedRows.filter(
|
328
446
|
({ locale }) => (currentStatusByLocale[locale] === "draft" || currentStatusByLocale[locale] === "modified") && !localesWithErrors.includes(locale)
|
329
447
|
).length;
|
330
448
|
const withErrorsCount = localesWithErrors.length;
|
449
|
+
const messageId = action === "bulk-publish" ? "content-manager.containers.list.selectedEntriesModal.selectedCount.publish" : "content-manager.containers.list.selectedEntriesModal.selectedCount.unpublish";
|
450
|
+
const defaultMessage = action === "bulk-publish" ? "<b>{publishedCount}</b> {publishedCount, plural, =0 {entries} one {entry} other {entries}} already published. <b>{draftCount}</b> {draftCount, plural, =0 {entries} one {entry} other {entries}} ready to publish. <b>{withErrorsCount}</b> {withErrorsCount, plural, =0 {entries} one {entry} other {entries}} waiting for action." : "<b>{draftCount}</b> {draftCount, plural, =0 {entries} one {entry} other {entries}} already unpublished. <b>{publishedCount}</b> {publishedCount, plural, =0 {entries} one {entry} other {entries}} ready to unpublish.";
|
331
451
|
return formatMessage(
|
332
452
|
{
|
333
|
-
id:
|
334
|
-
defaultMessage
|
453
|
+
id: messageId,
|
454
|
+
defaultMessage
|
335
455
|
},
|
336
456
|
{
|
337
457
|
withErrorsCount,
|
338
|
-
|
339
|
-
|
458
|
+
draftCount,
|
459
|
+
publishedCount,
|
340
460
|
b: BoldChunk
|
341
461
|
}
|
342
462
|
);
|
343
463
|
};
|
344
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
464
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Modal.Body, { children: [
|
345
465
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: getFormattedCountMessage() }),
|
346
466
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { marginTop: 5, children: /* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Content, { children: [
|
347
467
|
/* @__PURE__ */ jsxRuntime.jsxs(strapiAdmin.Table.Head, { children: [
|
@@ -368,7 +488,7 @@ const BulkLocaleActionModal = ({
|
|
368
488
|
children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { tag: "span", variant: "pi", fontWeight: "bold", children: capitalize(status) })
|
369
489
|
}
|
370
490
|
) }) }),
|
371
|
-
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(EntryValidationText, { validationErrors: error, status }) }),
|
491
|
+
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(EntryValidationText, { validationErrors: error, status, action }) }),
|
372
492
|
/* @__PURE__ */ jsxRuntime.jsx(strapiAdmin.Table.Cell, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
373
493
|
designSystem.IconButton,
|
374
494
|
{
|
@@ -385,7 +505,7 @@ const BulkLocaleActionModal = ({
|
|
385
505
|
name: locale
|
386
506
|
}
|
387
507
|
),
|
388
|
-
|
508
|
+
variant: "ghost",
|
389
509
|
children: /* @__PURE__ */ jsxRuntime.jsx(icons.Pencil, {})
|
390
510
|
}
|
391
511
|
) })
|
@@ -402,42 +522,47 @@ const LocalePickerAction = ({
|
|
402
522
|
documentId
|
403
523
|
}) => {
|
404
524
|
const { formatMessage } = reactIntl.useIntl();
|
405
|
-
const [{ query }, setQuery] = strapiAdmin.useQueryParams();
|
525
|
+
const [{ query: query2 }, setQuery] = strapiAdmin.useQueryParams();
|
406
526
|
const { hasI18n, canCreate, canRead } = useI18n();
|
407
527
|
const { data: locales = [] } = useGetLocalesQuery();
|
408
|
-
const
|
528
|
+
const currentDesiredLocale = query2.plugins?.i18n?.locale;
|
529
|
+
const { schema } = strapiAdmin$1.unstable_useDocument({
|
530
|
+
model,
|
531
|
+
collectionType,
|
532
|
+
documentId,
|
533
|
+
params: { locale: currentDesiredLocale }
|
534
|
+
});
|
409
535
|
const handleSelect = React__namespace.useCallback(
|
410
536
|
(value) => {
|
411
537
|
setQuery({
|
412
538
|
plugins: {
|
413
|
-
...
|
539
|
+
...query2.plugins,
|
414
540
|
i18n: {
|
415
541
|
locale: value
|
416
542
|
}
|
417
543
|
}
|
418
544
|
});
|
419
545
|
},
|
420
|
-
[
|
546
|
+
[query2.plugins, setQuery]
|
421
547
|
);
|
422
548
|
React__namespace.useEffect(() => {
|
423
549
|
if (!Array.isArray(locales) || !hasI18n) {
|
424
550
|
return;
|
425
551
|
}
|
426
|
-
const currentDesiredLocale = query.plugins?.i18n?.locale;
|
427
552
|
const doesLocaleExist = locales.find((loc) => loc.code === currentDesiredLocale);
|
428
553
|
const defaultLocale = locales.find((locale) => locale.isDefault);
|
429
554
|
if (!doesLocaleExist && defaultLocale?.code) {
|
430
555
|
handleSelect(defaultLocale.code);
|
431
556
|
}
|
432
|
-
}, [handleSelect, hasI18n, locales,
|
433
|
-
|
434
|
-
return null;
|
435
|
-
}
|
436
|
-
const currentLocale = query.plugins?.i18n?.locale || locales.find((loc) => loc.isDefault)?.code;
|
557
|
+
}, [handleSelect, hasI18n, locales, currentDesiredLocale]);
|
558
|
+
const currentLocale = Array.isArray(locales) ? locales.find((locale) => locale.code === currentDesiredLocale)?.code : void 0;
|
437
559
|
const allCurrentLocales = [
|
438
560
|
{ status: getDocumentStatus(document, meta), locale: currentLocale },
|
439
561
|
...meta?.availableLocales ?? []
|
440
562
|
];
|
563
|
+
if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {
|
564
|
+
return null;
|
565
|
+
}
|
441
566
|
return {
|
442
567
|
label: formatMessage({
|
443
568
|
id: getTranslation("Settings.locales.modal.locales.label"),
|
@@ -449,7 +574,7 @@ const LocalePickerAction = ({
|
|
449
574
|
);
|
450
575
|
const status = currentLocaleDoc?.status ?? "draft";
|
451
576
|
const permissionsToCheck = currentLocaleDoc ? canCreate : canRead;
|
452
|
-
const statusVariant = status === "draft" ? "
|
577
|
+
const statusVariant = status === "draft" ? "secondary" : status === "published" ? "success" : "alternative";
|
453
578
|
return {
|
454
579
|
disabled: !permissionsToCheck.includes(locale.code),
|
455
580
|
value: locale.code,
|
@@ -485,6 +610,95 @@ const getDocumentStatus = (document, meta) => {
|
|
485
610
|
}
|
486
611
|
return docStatus;
|
487
612
|
};
|
613
|
+
const FillFromAnotherLocaleAction = ({
|
614
|
+
documentId,
|
615
|
+
meta,
|
616
|
+
model,
|
617
|
+
collectionType
|
618
|
+
}) => {
|
619
|
+
const { formatMessage } = reactIntl.useIntl();
|
620
|
+
const [{ query: query2 }] = strapiAdmin.useQueryParams();
|
621
|
+
const currentDesiredLocale = query2.plugins?.i18n?.locale;
|
622
|
+
const [localeSelected, setLocaleSelected] = React__namespace.useState(null);
|
623
|
+
const setValues = strapiAdmin.useForm("FillFromAnotherLocale", (state) => state.setValues);
|
624
|
+
const { getDocument } = strapiAdmin$1.unstable_useDocumentActions();
|
625
|
+
const { schema, components } = strapiAdmin$1.unstable_useDocument({
|
626
|
+
model,
|
627
|
+
documentId,
|
628
|
+
collectionType,
|
629
|
+
params: { locale: currentDesiredLocale }
|
630
|
+
});
|
631
|
+
const { data: locales = [] } = useGetLocalesQuery();
|
632
|
+
const availableLocales = Array.isArray(locales) ? locales.filter((locale) => meta?.availableLocales.some((l) => l.locale === locale.code)) : [];
|
633
|
+
const fillFromLocale = (onClose) => async () => {
|
634
|
+
const response = await getDocument({
|
635
|
+
collectionType,
|
636
|
+
model,
|
637
|
+
documentId,
|
638
|
+
params: { locale: localeSelected }
|
639
|
+
});
|
640
|
+
if (!response || !schema) {
|
641
|
+
return;
|
642
|
+
}
|
643
|
+
const { data } = response;
|
644
|
+
const cleanedData = cleanData(data, schema, components);
|
645
|
+
setValues(cleanedData);
|
646
|
+
onClose();
|
647
|
+
};
|
648
|
+
return {
|
649
|
+
type: "icon",
|
650
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(icons.Download, {}),
|
651
|
+
disabled: availableLocales.length === 0,
|
652
|
+
label: formatMessage({
|
653
|
+
id: getTranslation("CMEditViewCopyLocale.copy-text"),
|
654
|
+
defaultMessage: "Fill in from another locale"
|
655
|
+
}),
|
656
|
+
dialog: {
|
657
|
+
type: "dialog",
|
658
|
+
title: formatMessage({
|
659
|
+
id: getTranslation("CMEditViewCopyLocale.dialog.title"),
|
660
|
+
defaultMessage: "Confirmation"
|
661
|
+
}),
|
662
|
+
content: ({ onClose }) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
663
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Body, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", gap: 3, children: [
|
664
|
+
/* @__PURE__ */ jsxRuntime.jsx(icons.WarningCircle, { width: "24px", height: "24px", fill: "danger600" }),
|
665
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textAlign: "center", children: formatMessage({
|
666
|
+
id: getTranslation("CMEditViewCopyLocale.dialog.body"),
|
667
|
+
defaultMessage: "Your current content will be erased and filled by the content of the selected locale:"
|
668
|
+
}) }),
|
669
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { width: "100%", children: [
|
670
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: formatMessage({
|
671
|
+
id: getTranslation("CMEditViewCopyLocale.dialog.field.label"),
|
672
|
+
defaultMessage: "Locale"
|
673
|
+
}) }),
|
674
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
675
|
+
designSystem.SingleSelect,
|
676
|
+
{
|
677
|
+
value: localeSelected,
|
678
|
+
placeholder: formatMessage({
|
679
|
+
id: getTranslation("CMEditViewCopyLocale.dialog.field.placeholder"),
|
680
|
+
defaultMessage: "Select one locale..."
|
681
|
+
}),
|
682
|
+
onChange: (value) => setLocaleSelected(value),
|
683
|
+
children: availableLocales.map((locale) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: locale.code, children: locale.name }, locale.code))
|
684
|
+
}
|
685
|
+
)
|
686
|
+
] })
|
687
|
+
] }) }),
|
688
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Dialog.Footer, { children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { gap: 2, width: "100%", children: [
|
689
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { flex: "auto", variant: "tertiary", onClick: onClose, children: formatMessage({
|
690
|
+
id: getTranslation("CMEditViewCopyLocale.cancel-text"),
|
691
|
+
defaultMessage: "No, cancel"
|
692
|
+
}) }),
|
693
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { flex: "auto", variant: "success", onClick: fillFromLocale(onClose), children: formatMessage({
|
694
|
+
id: getTranslation("CMEditViewCopyLocale.submit-text"),
|
695
|
+
defaultMessage: "Yes, fill in"
|
696
|
+
}) })
|
697
|
+
] }) })
|
698
|
+
] })
|
699
|
+
}
|
700
|
+
};
|
701
|
+
};
|
488
702
|
const DeleteLocaleAction = ({
|
489
703
|
document,
|
490
704
|
documentId,
|
@@ -496,16 +710,23 @@ const DeleteLocaleAction = ({
|
|
496
710
|
const { toggleNotification } = strapiAdmin.useNotification();
|
497
711
|
const { delete: deleteAction } = strapiAdmin$1.unstable_useDocumentActions();
|
498
712
|
const { hasI18n, canDelete } = useI18n();
|
713
|
+
const [{ query: query2 }] = strapiAdmin.useQueryParams();
|
714
|
+
const { data: locales = [] } = useGetLocalesQuery();
|
715
|
+
const currentDesiredLocale = query2.plugins?.i18n?.locale;
|
716
|
+
const locale = !("error" in locales) && locales.find((loc) => loc.code === currentDesiredLocale);
|
499
717
|
if (!hasI18n) {
|
500
718
|
return null;
|
501
719
|
}
|
502
720
|
return {
|
503
721
|
disabled: document?.locale && !canDelete.includes(document.locale) || !document || !document.id,
|
504
722
|
position: ["header", "table-row"],
|
505
|
-
label: formatMessage(
|
506
|
-
|
507
|
-
|
508
|
-
|
723
|
+
label: formatMessage(
|
724
|
+
{
|
725
|
+
id: getTranslation("actions.delete.label"),
|
726
|
+
defaultMessage: "Delete entry ({locale})"
|
727
|
+
},
|
728
|
+
{ locale: locale && locale.name }
|
729
|
+
),
|
509
730
|
icon: /* @__PURE__ */ jsxRuntime.jsx(StyledTrash, {}),
|
510
731
|
variant: "danger",
|
511
732
|
dialog: {
|
@@ -548,37 +769,43 @@ const DeleteLocaleAction = ({
|
|
548
769
|
}
|
549
770
|
};
|
550
771
|
};
|
551
|
-
const
|
772
|
+
const BulkLocaleAction = ({
|
552
773
|
document: baseDocument,
|
553
774
|
documentId,
|
554
775
|
model,
|
555
|
-
collectionType
|
776
|
+
collectionType,
|
777
|
+
action
|
556
778
|
}) => {
|
557
779
|
const baseLocale = baseDocument?.locale ?? null;
|
558
|
-
const [{ query }] = strapiAdmin.useQueryParams();
|
559
|
-
const params = React__namespace.useMemo(() => strapiAdmin$1.buildValidParams(query), [query]);
|
560
|
-
const
|
780
|
+
const [{ query: query$1 }] = strapiAdmin.useQueryParams();
|
781
|
+
const params = React__namespace.useMemo(() => strapiAdmin$1.buildValidParams(query$1), [query$1]);
|
782
|
+
const isOnPublishedTab = query$1.status === "published";
|
561
783
|
const { formatMessage } = reactIntl.useIntl();
|
562
784
|
const { hasI18n, canPublish } = useI18n();
|
563
785
|
const { toggleNotification } = strapiAdmin.useNotification();
|
564
786
|
const { _unstableFormatAPIError: formatAPIError } = strapiAdmin.useAPIErrorHandler();
|
565
787
|
const [selectedRows, setSelectedRows] = React__namespace.useState([]);
|
566
788
|
const [isDraftRelationConfirmationOpen, setIsDraftRelationConfirmationOpen] = React__namespace.useState(false);
|
567
|
-
const { publishMany: publishManyAction } = strapiAdmin$1.unstable_useDocumentActions();
|
789
|
+
const { publishMany: publishManyAction, unpublishMany: unpublishManyAction } = strapiAdmin$1.unstable_useDocumentActions();
|
568
790
|
const {
|
569
791
|
document,
|
570
792
|
meta: documentMeta,
|
571
793
|
schema,
|
572
794
|
validate
|
573
|
-
} = strapiAdmin$1.unstable_useDocument(
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
795
|
+
} = strapiAdmin$1.unstable_useDocument(
|
796
|
+
{
|
797
|
+
model,
|
798
|
+
collectionType,
|
799
|
+
documentId,
|
800
|
+
params: {
|
801
|
+
locale: baseLocale
|
802
|
+
}
|
803
|
+
},
|
804
|
+
{
|
805
|
+
skip: !hasI18n || !baseLocale
|
579
806
|
}
|
580
|
-
|
581
|
-
const { data: localesMetadata = [] } = useGetLocalesQuery();
|
807
|
+
);
|
808
|
+
const { data: localesMetadata = [] } = useGetLocalesQuery(hasI18n ? void 0 : query.skipToken);
|
582
809
|
const headers = [
|
583
810
|
{
|
584
811
|
label: formatMessage({
|
@@ -627,12 +854,19 @@ const BulkLocalePublishAction = ({
|
|
627
854
|
}, {});
|
628
855
|
return [rowsFromMeta, errors];
|
629
856
|
}, [document, documentMeta?.availableLocales, validate]);
|
630
|
-
const
|
631
|
-
|
857
|
+
const isBulkPublish = action === "bulk-publish";
|
858
|
+
const localesForAction = selectedRows.reduce((acc, selectedRow) => {
|
859
|
+
const isValidLocale = (
|
860
|
+
// Validation errors are irrelevant if we are trying to unpublish
|
861
|
+
!isBulkPublish || !Object.keys(validationErrors).includes(selectedRow.locale)
|
862
|
+
);
|
863
|
+
const shouldAddLocale = isBulkPublish ? selectedRow.status !== "published" && isValidLocale : selectedRow.status !== "draft" && isValidLocale;
|
864
|
+
if (shouldAddLocale) {
|
632
865
|
acc.push(selectedRow.locale);
|
633
866
|
}
|
634
867
|
return acc;
|
635
868
|
}, []);
|
869
|
+
const enableDraftRelationsCount = false;
|
636
870
|
const {
|
637
871
|
data: draftRelationsCount = 0,
|
638
872
|
isLoading: isDraftRelationsLoading,
|
@@ -641,10 +875,10 @@ const BulkLocalePublishAction = ({
|
|
641
875
|
{
|
642
876
|
model,
|
643
877
|
documentIds: [documentId],
|
644
|
-
locale:
|
878
|
+
locale: localesForAction
|
645
879
|
},
|
646
880
|
{
|
647
|
-
skip: !
|
881
|
+
skip: !enableDraftRelationsCount
|
648
882
|
}
|
649
883
|
);
|
650
884
|
React__namespace.useEffect(() => {
|
@@ -670,7 +904,18 @@ const BulkLocalePublishAction = ({
|
|
670
904
|
documentIds: [documentId],
|
671
905
|
params: {
|
672
906
|
...params,
|
673
|
-
locale:
|
907
|
+
locale: localesForAction
|
908
|
+
}
|
909
|
+
});
|
910
|
+
setSelectedRows([]);
|
911
|
+
};
|
912
|
+
const unpublish = async () => {
|
913
|
+
await unpublishManyAction({
|
914
|
+
model,
|
915
|
+
documentIds: [documentId],
|
916
|
+
params: {
|
917
|
+
...params,
|
918
|
+
locale: localesForAction
|
674
919
|
}
|
675
920
|
});
|
676
921
|
setSelectedRows([]);
|
@@ -678,14 +923,12 @@ const BulkLocalePublishAction = ({
|
|
678
923
|
const handleAction = async () => {
|
679
924
|
if (draftRelationsCount > 0) {
|
680
925
|
setIsDraftRelationConfirmationOpen(true);
|
681
|
-
} else {
|
926
|
+
} else if (isBulkPublish) {
|
682
927
|
await publish();
|
928
|
+
} else {
|
929
|
+
await unpublish();
|
683
930
|
}
|
684
931
|
};
|
685
|
-
const isUnpublish = document?.status === "published";
|
686
|
-
if (isUnpublish) {
|
687
|
-
console.warn(["I18N"], "Bulk locale unpublish modal not implemented");
|
688
|
-
}
|
689
932
|
if (isDraftRelationConfirmationOpen) {
|
690
933
|
return {
|
691
934
|
label: formatMessage({
|
@@ -720,20 +963,21 @@ const BulkLocalePublishAction = ({
|
|
720
963
|
}
|
721
964
|
};
|
722
965
|
}
|
966
|
+
const hasPermission = selectedRows.map(({ locale }) => locale).every((locale) => canPublish.includes(locale));
|
723
967
|
return {
|
724
968
|
label: formatMessage({
|
725
|
-
id: getTranslation("
|
726
|
-
defaultMessage: "Publish Multiple Locales
|
969
|
+
id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? "publish" : "unpublish"}-title`),
|
970
|
+
defaultMessage: `${isBulkPublish ? "Publish" : "Unpublish"} Multiple Locales`
|
727
971
|
}),
|
728
|
-
|
729
|
-
|
972
|
+
variant: isBulkPublish ? "secondary" : "danger",
|
973
|
+
icon: isBulkPublish ? /* @__PURE__ */ jsxRuntime.jsx(icons.ListPlus, {}) : /* @__PURE__ */ jsxRuntime.jsx(icons.Cross, {}),
|
974
|
+
disabled: isOnPublishedTab || canPublish.length === 0,
|
730
975
|
position: ["panel"],
|
731
|
-
variant: "secondary",
|
732
976
|
dialog: {
|
733
977
|
type: "modal",
|
734
978
|
title: formatMessage({
|
735
|
-
id: getTranslation("
|
736
|
-
defaultMessage: "Publish Multiple Locales
|
979
|
+
id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? "publish" : "unpublish"}-title`),
|
980
|
+
defaultMessage: `${isBulkPublish ? "Publish" : "Unpublish"} Multiple Locales`
|
737
981
|
}),
|
738
982
|
content: () => {
|
739
983
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
@@ -752,28 +996,35 @@ const BulkLocalePublishAction = ({
|
|
752
996
|
validationErrors,
|
753
997
|
headers,
|
754
998
|
rows,
|
755
|
-
localesMetadata
|
999
|
+
localesMetadata,
|
1000
|
+
action: action ?? "bulk-publish"
|
756
1001
|
}
|
757
1002
|
)
|
758
1003
|
}
|
759
1004
|
);
|
760
1005
|
},
|
761
|
-
footer: () => /* @__PURE__ */ jsxRuntime.jsx(designSystem.
|
1006
|
+
footer: () => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Modal.Footer, { justifyContent: "flex-end", children: /* @__PURE__ */ jsxRuntime.jsx(
|
762
1007
|
designSystem.Button,
|
763
1008
|
{
|
764
1009
|
loading: isDraftRelationsLoading,
|
765
|
-
disabled:
|
1010
|
+
disabled: !hasPermission || localesForAction.length === 0,
|
766
1011
|
variant: "default",
|
767
1012
|
onClick: handleAction,
|
768
1013
|
children: formatMessage({
|
769
|
-
id: "app.utils.publish",
|
770
|
-
defaultMessage: "Publish"
|
1014
|
+
id: isBulkPublish ? "app.utils.publish" : "app.utils.unpublish",
|
1015
|
+
defaultMessage: isBulkPublish ? "Publish" : "Unpublish"
|
771
1016
|
})
|
772
1017
|
}
|
773
1018
|
) })
|
774
1019
|
}
|
775
1020
|
};
|
776
1021
|
};
|
1022
|
+
const BulkLocalePublishAction = (props) => {
|
1023
|
+
return BulkLocaleAction({ action: "bulk-publish", ...props });
|
1024
|
+
};
|
1025
|
+
const BulkLocaleUnpublishAction = (props) => {
|
1026
|
+
return BulkLocaleAction({ action: "bulk-unpublish", ...props });
|
1027
|
+
};
|
777
1028
|
const StyledTrash = styledComponents.styled(icons.Trash)`
|
778
1029
|
path {
|
779
1030
|
fill: currentColor;
|
@@ -830,16 +1081,9 @@ const UnpublishModalAdditionalInfo = () => {
|
|
830
1081
|
}
|
831
1082
|
) });
|
832
1083
|
};
|
833
|
-
const Initializer = ({ setPlugin }) => {
|
834
|
-
const setPluginRef = React__namespace.useRef(setPlugin);
|
835
|
-
React__namespace.useEffect(() => {
|
836
|
-
setPluginRef.current(pluginId);
|
837
|
-
}, []);
|
838
|
-
return null;
|
839
|
-
};
|
840
1084
|
const LocalePicker = () => {
|
841
1085
|
const { formatMessage } = reactIntl.useIntl();
|
842
|
-
const [{ query }, setQuery] = strapiAdmin.useQueryParams();
|
1086
|
+
const [{ query: query2 }, setQuery] = strapiAdmin.useQueryParams();
|
843
1087
|
const { hasI18n, canRead, canCreate } = useI18n();
|
844
1088
|
const { data: locales = [] } = useGetLocalesQuery(void 0, {
|
845
1089
|
skip: !hasI18n
|
@@ -849,25 +1093,25 @@ const LocalePicker = () => {
|
|
849
1093
|
setQuery(
|
850
1094
|
{
|
851
1095
|
page: 1,
|
852
|
-
plugins: { ...
|
1096
|
+
plugins: { ...query2.plugins, i18n: { locale: code } }
|
853
1097
|
},
|
854
1098
|
"push",
|
855
1099
|
replace
|
856
1100
|
);
|
857
1101
|
},
|
858
|
-
[
|
1102
|
+
[query2.plugins, setQuery]
|
859
1103
|
);
|
860
1104
|
React__namespace.useEffect(() => {
|
861
1105
|
if (!Array.isArray(locales) || !hasI18n) {
|
862
1106
|
return;
|
863
1107
|
}
|
864
|
-
const currentDesiredLocale =
|
1108
|
+
const currentDesiredLocale = query2.plugins?.i18n?.locale;
|
865
1109
|
const doesLocaleExist = locales.find((loc) => loc.code === currentDesiredLocale);
|
866
1110
|
const defaultLocale = locales.find((locale) => locale.isDefault);
|
867
1111
|
if (!doesLocaleExist && defaultLocale?.code) {
|
868
1112
|
handleChange(defaultLocale.code, true);
|
869
1113
|
}
|
870
|
-
}, [hasI18n, handleChange, locales,
|
1114
|
+
}, [hasI18n, handleChange, locales, query2.plugins?.i18n?.locale]);
|
871
1115
|
if (!hasI18n || !Array.isArray(locales) || locales.length === 0) {
|
872
1116
|
return null;
|
873
1117
|
}
|
@@ -882,7 +1126,7 @@ const LocalePicker = () => {
|
|
882
1126
|
id: getTranslation("actions.select-locale"),
|
883
1127
|
defaultMessage: "Select locale"
|
884
1128
|
}),
|
885
|
-
value:
|
1129
|
+
value: query2.plugins?.i18n?.locale || locales.find((locale) => locale.isDefault)?.code,
|
886
1130
|
onChange: handleChange,
|
887
1131
|
children: displayedLocales.map((locale) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.SingleSelectOption, { value: locale.code, children: locale.name }, locale.id))
|
888
1132
|
}
|
@@ -1000,54 +1244,13 @@ const LocaleListCell = ({
|
|
1000
1244
|
return locale.name;
|
1001
1245
|
}).toSorted((a, b) => formatter.compare(a, b));
|
1002
1246
|
return /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Popover.Root, { children: [
|
1003
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(Button, { type: "button", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
1004
|
-
|
1005
|
-
{
|
1006
|
-
|
1007
|
-
alignItems: "center",
|
1008
|
-
justifyContent: "center",
|
1009
|
-
height: "3.2rem",
|
1010
|
-
width: "3.2rem",
|
1011
|
-
children: [
|
1012
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", ellipsis: true, children: localesForDocument.join(", ") }),
|
1013
|
-
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, {}) })
|
1014
|
-
]
|
1015
|
-
}
|
1016
|
-
) }) }),
|
1247
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Trigger, { children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "ghost", type: "button", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { minWidth: "100%", alignItems: "center", justifyContent: "center", fontWeight: "regular", children: [
|
1248
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "neutral800", ellipsis: true, marginRight: 2, children: localesForDocument.join(", ") }),
|
1249
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Flex, { children: /* @__PURE__ */ jsxRuntime.jsx(icons.CaretDown, { width: "1.2rem", height: "1.2rem" }) })
|
1250
|
+
] }) }) }),
|
1017
1251
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Popover.Content, { sideOffset: 16, children: /* @__PURE__ */ jsxRuntime.jsx("ul", { children: localesForDocument.map((name) => /* @__PURE__ */ jsxRuntime.jsx(designSystem.Box, { padding: 3, tag: "li", children: /* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: name }) }, name)) }) })
|
1018
1252
|
] });
|
1019
1253
|
};
|
1020
|
-
const Button = styledComponents.styled.button`
|
1021
|
-
width: 100%;
|
1022
|
-
|
1023
|
-
svg {
|
1024
|
-
> g,
|
1025
|
-
path {
|
1026
|
-
fill: ${({ theme }) => theme.colors.neutral500};
|
1027
|
-
}
|
1028
|
-
}
|
1029
|
-
&:hover {
|
1030
|
-
svg {
|
1031
|
-
> g,
|
1032
|
-
path {
|
1033
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
1034
|
-
}
|
1035
|
-
}
|
1036
|
-
}
|
1037
|
-
&:active {
|
1038
|
-
svg {
|
1039
|
-
> g,
|
1040
|
-
path {
|
1041
|
-
fill: ${({ theme }) => theme.colors.neutral400};
|
1042
|
-
}
|
1043
|
-
}
|
1044
|
-
}
|
1045
|
-
`;
|
1046
|
-
const ActionWrapper = styledComponents.styled(designSystem.Flex)`
|
1047
|
-
svg {
|
1048
|
-
height: 0.4rem;
|
1049
|
-
}
|
1050
|
-
`;
|
1051
1254
|
const addColumnToTableHook = ({ displayedHeaders, layout }) => {
|
1052
1255
|
const { options } = layout;
|
1053
1256
|
const isFieldLocalized = doesPluginOptionsHaveI18nLocalized(options) ? options.i18n.localized : false;
|
@@ -1228,8 +1431,6 @@ const index = {
|
|
1228
1431
|
app.addRBACMiddleware([localeMiddleware]);
|
1229
1432
|
app.registerPlugin({
|
1230
1433
|
id: pluginId,
|
1231
|
-
initializer: Initializer,
|
1232
|
-
isReady: false,
|
1233
1434
|
name: pluginId
|
1234
1435
|
});
|
1235
1436
|
},
|
@@ -1247,11 +1448,11 @@ const index = {
|
|
1247
1448
|
},
|
1248
1449
|
id: "internationalization",
|
1249
1450
|
to: "internationalization",
|
1250
|
-
Component: () => Promise.resolve().then(() => require("./SettingsPage-
|
1451
|
+
Component: () => Promise.resolve().then(() => require("./SettingsPage-kMDCxWLw.js")).then((mod) => ({ default: mod.ProtectedSettingsPage })),
|
1251
1452
|
permissions: PERMISSIONS.accessMain
|
1252
1453
|
});
|
1253
1454
|
const contentManager = app.getPlugin("content-manager");
|
1254
|
-
contentManager.apis.addDocumentHeaderAction([LocalePickerAction]);
|
1455
|
+
contentManager.apis.addDocumentHeaderAction([LocalePickerAction, FillFromAnotherLocaleAction]);
|
1255
1456
|
contentManager.apis.addDocumentAction((actions) => {
|
1256
1457
|
const indexOfDeleteAction = actions.findIndex((action) => action.type === "delete");
|
1257
1458
|
actions.splice(indexOfDeleteAction, 0, DeleteLocaleAction);
|
@@ -1259,6 +1460,7 @@ const index = {
|
|
1259
1460
|
});
|
1260
1461
|
contentManager.apis.addDocumentAction((actions) => {
|
1261
1462
|
actions.splice(2, 0, BulkLocalePublishAction);
|
1463
|
+
actions.splice(5, 0, BulkLocaleUnpublishAction);
|
1262
1464
|
return actions;
|
1263
1465
|
});
|
1264
1466
|
contentManager.injectComponent("listView", "actions", {
|
@@ -1364,7 +1566,7 @@ const index = {
|
|
1364
1566
|
async registerTrads({ locales }) {
|
1365
1567
|
const importedTrads = await Promise.all(
|
1366
1568
|
locales.map((locale) => {
|
1367
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-DtWiGdHl.js")), "./translations/dk.json": () => Promise.resolve().then(() => require("./dk-D8C-casx.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-
|
1569
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => Promise.resolve().then(() => require("./de-DtWiGdHl.js")), "./translations/dk.json": () => Promise.resolve().then(() => require("./dk-D8C-casx.js")), "./translations/en.json": () => Promise.resolve().then(() => require("./en-B6327hMz.js")), "./translations/es.json": () => Promise.resolve().then(() => require("./es-DS-XFGSw.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("./fr-BTjekDpq.js")), "./translations/ko.json": () => Promise.resolve().then(() => require("./ko-DmcGUBQ3.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("./pl-Cn5RYonZ.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("./ru-BMBgVL3s.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("./tr-CarUU76c.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("./zh-Hans-DSHIXAa3.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("./zh-CukOviB0.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
|
1368
1570
|
return {
|
1369
1571
|
data: prefixPluginTranslations(data, pluginId),
|
1370
1572
|
locale
|
@@ -1388,4 +1590,4 @@ exports.useDeleteLocaleMutation = useDeleteLocaleMutation;
|
|
1388
1590
|
exports.useGetDefaultLocalesQuery = useGetDefaultLocalesQuery;
|
1389
1591
|
exports.useGetLocalesQuery = useGetLocalesQuery;
|
1390
1592
|
exports.useUpdateLocaleMutation = useUpdateLocaleMutation;
|
1391
|
-
//# sourceMappingURL=index-
|
1593
|
+
//# sourceMappingURL=index-Dncj9Inq.js.map
|