@strapi/i18n 5.0.0-rc.11 → 5.0.0-rc.12
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/_chunks/{SettingsPage-C0l7c5fn.js → SettingsPage-C-1h_H38.js} +2 -2
- package/dist/_chunks/{SettingsPage-C0l7c5fn.js.map → SettingsPage-C-1h_H38.js.map} +1 -1
- package/dist/_chunks/{SettingsPage-CbEn7zF5.mjs → SettingsPage-CPNFX0bZ.mjs} +2 -2
- package/dist/_chunks/{SettingsPage-CbEn7zF5.mjs.map → SettingsPage-CPNFX0bZ.mjs.map} +1 -1
- package/dist/_chunks/{en-CM6Pjfyv.mjs → en-CtekP_47.mjs} +2 -1
- package/dist/_chunks/en-CtekP_47.mjs.map +1 -0
- package/dist/_chunks/{en-BsOU9o5z.js → en-CwI88-PP.js} +2 -1
- package/dist/_chunks/en-CwI88-PP.js.map +1 -0
- package/dist/_chunks/{index-CkrCiZyq.mjs → index-CgjpU2bY.mjs} +134 -110
- package/dist/_chunks/index-CgjpU2bY.mjs.map +1 -0
- package/dist/_chunks/{index-C0i3v7QQ.js → index-jpk39Rxo.js} +129 -105
- package/dist/_chunks/index-jpk39Rxo.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 +2 -1
- package/package.json +9 -9
- package/dist/_chunks/en-BsOU9o5z.js.map +0 -1
- package/dist/_chunks/en-CM6Pjfyv.mjs.map +0 -1
- package/dist/_chunks/index-C0i3v7QQ.js.map +0 -1
- package/dist/_chunks/index-CkrCiZyq.mjs.map +0 -1
@@ -2,8 +2,8 @@ import get from "lodash/get";
|
|
2
2
|
import * as yup from "yup";
|
3
3
|
import { jsxs, jsx } from "react/jsx-runtime";
|
4
4
|
import * as React from "react";
|
5
|
-
import { Typography, Dialog, Field, Checkbox, Flex, Button
|
6
|
-
import { WarningCircle, Pencil, CrossCircle, CheckCircle, ArrowsCounterClockwise, Trash, ListPlus, Earth, EarthStriked, CaretDown } from "@strapi/icons";
|
5
|
+
import { Typography, Dialog, Field, Checkbox, Flex, Button, Modal, Box, Status, IconButton, Tooltip, SingleSelect, SingleSelectOption, VisuallyHidden, useCollator, Popover } from "@strapi/design-system";
|
6
|
+
import { WarningCircle, Pencil, CrossCircle, CheckCircle, ArrowsCounterClockwise, Trash, ListPlus, Cross, Earth, EarthStriked, CaretDown } from "@strapi/icons";
|
7
7
|
import { useIntl } from "react-intl";
|
8
8
|
import { styled } from "styled-components";
|
9
9
|
import { skipToken } from "@reduxjs/toolkit/query";
|
@@ -78,11 +78,11 @@ const CheckboxConfirmation = ({
|
|
78
78
|
}) }) })
|
79
79
|
] }) }),
|
80
80
|
/* @__PURE__ */ jsxs(Dialog.Footer, { children: [
|
81
|
-
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button
|
81
|
+
/* @__PURE__ */ jsx(Dialog.Cancel, { children: /* @__PURE__ */ jsx(Button, { variant: "tertiary", children: formatMessage({
|
82
82
|
id: "components.popUpWarning.button.cancel",
|
83
83
|
defaultMessage: "No, cancel"
|
84
84
|
}) }) }),
|
85
|
-
/* @__PURE__ */ jsx(Dialog.Action, { children: /* @__PURE__ */ jsx(Button
|
85
|
+
/* @__PURE__ */ jsx(Dialog.Action, { children: /* @__PURE__ */ jsx(Button, { variant: "danger-light", onClick: handleConfirm, children: formatMessage({
|
86
86
|
id: getTranslation("CheckboxConfirmation.Modal.button-confirm"),
|
87
87
|
defaultMessage: "Yes, disable"
|
88
88
|
}) }) })
|
@@ -220,7 +220,11 @@ const { useGetManyDraftRelationCountQuery } = relationsApi;
|
|
220
220
|
const isErrorMessageDescriptor = (object) => {
|
221
221
|
return typeof object === "object" && object !== null && "id" in object && "defaultMessage" in object;
|
222
222
|
};
|
223
|
-
const EntryValidationText = ({
|
223
|
+
const EntryValidationText = ({
|
224
|
+
status = "draft",
|
225
|
+
validationErrors,
|
226
|
+
action
|
227
|
+
}) => {
|
224
228
|
const { formatMessage } = useIntl();
|
225
229
|
const getErrorStr = (key, value) => {
|
226
230
|
if (typeof value === "string") {
|
@@ -254,30 +258,63 @@ const EntryValidationText = ({ status = "draft", validationErrors }) => {
|
|
254
258
|
) })
|
255
259
|
] });
|
256
260
|
}
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
261
|
+
const getStatusMessage = () => {
|
262
|
+
if (action === "bulk-publish") {
|
263
|
+
if (status === "published") {
|
264
|
+
return {
|
265
|
+
icon: /* @__PURE__ */ jsx(CheckCircle, { fill: "success600" }),
|
266
|
+
text: formatMessage({
|
267
|
+
id: "content-manager.bulk-publish.already-published",
|
268
|
+
defaultMessage: "Already Published"
|
269
|
+
}),
|
270
|
+
textColor: "success600",
|
271
|
+
fontWeight: "bold"
|
272
|
+
};
|
273
|
+
} else if (status === "modified") {
|
274
|
+
return {
|
275
|
+
icon: /* @__PURE__ */ jsx(ArrowsCounterClockwise, { fill: "alternative600" }),
|
276
|
+
text: formatMessage({
|
277
|
+
id: "app.utils.ready-to-publish-changes",
|
278
|
+
defaultMessage: "Ready to publish changes"
|
279
|
+
})
|
280
|
+
};
|
281
|
+
} else {
|
282
|
+
return {
|
283
|
+
icon: /* @__PURE__ */ jsx(CheckCircle, { fill: "success600" }),
|
284
|
+
text: formatMessage({
|
285
|
+
id: "app.utils.ready-to-publish",
|
286
|
+
defaultMessage: "Ready to publish"
|
287
|
+
})
|
288
|
+
};
|
289
|
+
}
|
290
|
+
} else {
|
291
|
+
if (status === "draft") {
|
292
|
+
return {
|
293
|
+
icon: /* @__PURE__ */ jsx(CheckCircle, { fill: "success600" }),
|
294
|
+
text: formatMessage({
|
295
|
+
id: "content-manager.bulk-unpublish.already-unpublished",
|
296
|
+
defaultMessage: "Already Unpublished"
|
297
|
+
}),
|
298
|
+
textColor: "success600",
|
299
|
+
fontWeight: "bold"
|
300
|
+
};
|
301
|
+
} else {
|
302
|
+
return {
|
303
|
+
icon: /* @__PURE__ */ jsx(CheckCircle, { fill: "success600" }),
|
304
|
+
text: formatMessage({
|
305
|
+
id: "app.utils.ready-to-unpublish-changes",
|
306
|
+
defaultMessage: "Ready to unpublish"
|
307
|
+
}),
|
308
|
+
textColor: "success600",
|
309
|
+
fontWeight: "bold"
|
310
|
+
};
|
311
|
+
}
|
312
|
+
}
|
313
|
+
};
|
314
|
+
const { icon, text, textColor = "success600", fontWeight = "normal" } = getStatusMessage();
|
275
315
|
return /* @__PURE__ */ jsxs(Flex, { gap: 2, children: [
|
276
|
-
|
277
|
-
/* @__PURE__ */ jsx(Typography, { children:
|
278
|
-
id: "app.utils.ready-to-publish",
|
279
|
-
defaultMessage: "Ready to publish"
|
280
|
-
}) })
|
316
|
+
icon,
|
317
|
+
/* @__PURE__ */ jsx(Typography, { textColor, fontWeight, children: text })
|
281
318
|
] });
|
282
319
|
};
|
283
320
|
const BoldChunk = (chunks) => /* @__PURE__ */ jsx(Typography, { fontWeight: "bold", children: chunks });
|
@@ -285,7 +322,8 @@ const BulkLocaleActionModal = ({
|
|
285
322
|
headers,
|
286
323
|
rows,
|
287
324
|
localesMetadata,
|
288
|
-
validationErrors = {}
|
325
|
+
validationErrors = {},
|
326
|
+
action
|
289
327
|
}) => {
|
290
328
|
const { formatMessage } = useIntl();
|
291
329
|
const selectedRows = useTable(
|
@@ -298,22 +336,24 @@ const BulkLocaleActionModal = ({
|
|
298
336
|
return acc;
|
299
337
|
}, {});
|
300
338
|
const localesWithErrors = Object.keys(validationErrors);
|
301
|
-
const
|
339
|
+
const publishedCount = selectedRows.filter(
|
302
340
|
({ locale }) => currentStatusByLocale[locale] === "published"
|
303
341
|
).length;
|
304
|
-
const
|
342
|
+
const draftCount = selectedRows.filter(
|
305
343
|
({ locale }) => (currentStatusByLocale[locale] === "draft" || currentStatusByLocale[locale] === "modified") && !localesWithErrors.includes(locale)
|
306
344
|
).length;
|
307
345
|
const withErrorsCount = localesWithErrors.length;
|
346
|
+
const messageId = action === "bulk-publish" ? "content-manager.containers.list.selectedEntriesModal.selectedCount.publish" : "content-manager.containers.list.selectedEntriesModal.selectedCount.unpublish";
|
347
|
+
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.";
|
308
348
|
return formatMessage(
|
309
349
|
{
|
310
|
-
id:
|
311
|
-
defaultMessage
|
350
|
+
id: messageId,
|
351
|
+
defaultMessage
|
312
352
|
},
|
313
353
|
{
|
314
354
|
withErrorsCount,
|
315
|
-
|
316
|
-
|
355
|
+
draftCount,
|
356
|
+
publishedCount,
|
317
357
|
b: BoldChunk
|
318
358
|
}
|
319
359
|
);
|
@@ -345,7 +385,7 @@ const BulkLocaleActionModal = ({
|
|
345
385
|
children: /* @__PURE__ */ jsx(Typography, { tag: "span", variant: "pi", fontWeight: "bold", children: capitalize(status) })
|
346
386
|
}
|
347
387
|
) }) }),
|
348
|
-
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(EntryValidationText, { validationErrors: error, status }) }),
|
388
|
+
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(EntryValidationText, { validationErrors: error, status, action }) }),
|
349
389
|
/* @__PURE__ */ jsx(Table.Cell, { children: /* @__PURE__ */ jsx(
|
350
390
|
IconButton,
|
351
391
|
{
|
@@ -525,23 +565,24 @@ const DeleteLocaleAction = ({
|
|
525
565
|
}
|
526
566
|
};
|
527
567
|
};
|
528
|
-
const
|
568
|
+
const BulkLocaleAction = ({
|
529
569
|
document: baseDocument,
|
530
570
|
documentId,
|
531
571
|
model,
|
532
|
-
collectionType
|
572
|
+
collectionType,
|
573
|
+
action
|
533
574
|
}) => {
|
534
575
|
const baseLocale = baseDocument?.locale ?? null;
|
535
576
|
const [{ query }] = useQueryParams();
|
536
577
|
const params = React.useMemo(() => buildValidParams(query), [query]);
|
537
|
-
const
|
578
|
+
const isOnPublishedTab = query.status === "published";
|
538
579
|
const { formatMessage } = useIntl();
|
539
580
|
const { hasI18n, canPublish } = useI18n();
|
540
581
|
const { toggleNotification } = useNotification();
|
541
582
|
const { _unstableFormatAPIError: formatAPIError } = useAPIErrorHandler();
|
542
583
|
const [selectedRows, setSelectedRows] = React.useState([]);
|
543
584
|
const [isDraftRelationConfirmationOpen, setIsDraftRelationConfirmationOpen] = React.useState(false);
|
544
|
-
const { publishMany: publishManyAction } = unstable_useDocumentActions();
|
585
|
+
const { publishMany: publishManyAction, unpublishMany: unpublishManyAction } = unstable_useDocumentActions();
|
545
586
|
const {
|
546
587
|
document,
|
547
588
|
meta: documentMeta,
|
@@ -609,12 +650,19 @@ const BulkLocalePublishAction = ({
|
|
609
650
|
}, {});
|
610
651
|
return [rowsFromMeta, errors];
|
611
652
|
}, [document, documentMeta?.availableLocales, validate]);
|
612
|
-
const
|
613
|
-
|
653
|
+
const isBulkPublish = action === "bulk-publish";
|
654
|
+
const localesForAction = selectedRows.reduce((acc, selectedRow) => {
|
655
|
+
const isValidLocale = (
|
656
|
+
// Validation errors are irrelevant if we are trying to unpublish
|
657
|
+
!isBulkPublish || !Object.keys(validationErrors).includes(selectedRow.locale)
|
658
|
+
);
|
659
|
+
const shouldAddLocale = isBulkPublish ? selectedRow.status !== "published" && isValidLocale : selectedRow.status !== "draft" && isValidLocale;
|
660
|
+
if (shouldAddLocale) {
|
614
661
|
acc.push(selectedRow.locale);
|
615
662
|
}
|
616
663
|
return acc;
|
617
664
|
}, []);
|
665
|
+
const enableDraftRelationsCount = false;
|
618
666
|
const {
|
619
667
|
data: draftRelationsCount = 0,
|
620
668
|
isLoading: isDraftRelationsLoading,
|
@@ -623,10 +671,10 @@ const BulkLocalePublishAction = ({
|
|
623
671
|
{
|
624
672
|
model,
|
625
673
|
documentIds: [documentId],
|
626
|
-
locale:
|
674
|
+
locale: localesForAction
|
627
675
|
},
|
628
676
|
{
|
629
|
-
skip: !
|
677
|
+
skip: !enableDraftRelationsCount
|
630
678
|
}
|
631
679
|
);
|
632
680
|
React.useEffect(() => {
|
@@ -652,7 +700,18 @@ const BulkLocalePublishAction = ({
|
|
652
700
|
documentIds: [documentId],
|
653
701
|
params: {
|
654
702
|
...params,
|
655
|
-
locale:
|
703
|
+
locale: localesForAction
|
704
|
+
}
|
705
|
+
});
|
706
|
+
setSelectedRows([]);
|
707
|
+
};
|
708
|
+
const unpublish = async () => {
|
709
|
+
await unpublishManyAction({
|
710
|
+
model,
|
711
|
+
documentIds: [documentId],
|
712
|
+
params: {
|
713
|
+
...params,
|
714
|
+
locale: localesForAction
|
656
715
|
}
|
657
716
|
});
|
658
717
|
setSelectedRows([]);
|
@@ -660,14 +719,12 @@ const BulkLocalePublishAction = ({
|
|
660
719
|
const handleAction = async () => {
|
661
720
|
if (draftRelationsCount > 0) {
|
662
721
|
setIsDraftRelationConfirmationOpen(true);
|
663
|
-
} else {
|
722
|
+
} else if (isBulkPublish) {
|
664
723
|
await publish();
|
724
|
+
} else {
|
725
|
+
await unpublish();
|
665
726
|
}
|
666
727
|
};
|
667
|
-
const isUnpublish = document?.status === "published";
|
668
|
-
if (isUnpublish) {
|
669
|
-
console.warn(["I18N"], "Bulk locale unpublish modal not implemented");
|
670
|
-
}
|
671
728
|
if (isDraftRelationConfirmationOpen) {
|
672
729
|
return {
|
673
730
|
label: formatMessage({
|
@@ -705,18 +762,18 @@ const BulkLocalePublishAction = ({
|
|
705
762
|
const hasPermission = selectedRows.map(({ locale }) => locale).every((locale) => canPublish.includes(locale));
|
706
763
|
return {
|
707
764
|
label: formatMessage({
|
708
|
-
id: getTranslation("
|
709
|
-
defaultMessage: "Publish Multiple Locales
|
765
|
+
id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? "publish" : "unpublish"}-title`),
|
766
|
+
defaultMessage: `${isBulkPublish ? "Publish" : "Unpublish"} Multiple Locales`
|
710
767
|
}),
|
711
|
-
|
712
|
-
|
768
|
+
variant: isBulkPublish ? "secondary" : "danger",
|
769
|
+
icon: isBulkPublish ? /* @__PURE__ */ jsx(ListPlus, {}) : /* @__PURE__ */ jsx(Cross, {}),
|
770
|
+
disabled: isOnPublishedTab || canPublish.length === 0,
|
713
771
|
position: ["panel"],
|
714
|
-
variant: "secondary",
|
715
772
|
dialog: {
|
716
773
|
type: "modal",
|
717
774
|
title: formatMessage({
|
718
|
-
id: getTranslation("
|
719
|
-
defaultMessage: "Publish Multiple Locales
|
775
|
+
id: getTranslation(`CMEditViewBulkLocale.${isBulkPublish ? "publish" : "unpublish"}-title`),
|
776
|
+
defaultMessage: `${isBulkPublish ? "Publish" : "Unpublish"} Multiple Locales`
|
720
777
|
}),
|
721
778
|
content: () => {
|
722
779
|
return /* @__PURE__ */ jsx(
|
@@ -735,28 +792,35 @@ const BulkLocalePublishAction = ({
|
|
735
792
|
validationErrors,
|
736
793
|
headers,
|
737
794
|
rows,
|
738
|
-
localesMetadata
|
795
|
+
localesMetadata,
|
796
|
+
action: action ?? "bulk-publish"
|
739
797
|
}
|
740
798
|
)
|
741
799
|
}
|
742
800
|
);
|
743
801
|
},
|
744
802
|
footer: () => /* @__PURE__ */ jsx(Modal.Footer, { justifyContent: "flex-end", children: /* @__PURE__ */ jsx(
|
745
|
-
Button
|
803
|
+
Button,
|
746
804
|
{
|
747
805
|
loading: isDraftRelationsLoading,
|
748
|
-
disabled: !hasPermission ||
|
806
|
+
disabled: !hasPermission || localesForAction.length === 0,
|
749
807
|
variant: "default",
|
750
808
|
onClick: handleAction,
|
751
809
|
children: formatMessage({
|
752
|
-
id: "app.utils.publish",
|
753
|
-
defaultMessage: "Publish"
|
810
|
+
id: isBulkPublish ? "app.utils.publish" : "app.utils.unpublish",
|
811
|
+
defaultMessage: isBulkPublish ? "Publish" : "Unpublish"
|
754
812
|
})
|
755
813
|
}
|
756
814
|
) })
|
757
815
|
}
|
758
816
|
};
|
759
817
|
};
|
818
|
+
const BulkLocalePublishAction = (props) => {
|
819
|
+
return BulkLocaleAction({ action: "bulk-publish", ...props });
|
820
|
+
};
|
821
|
+
const BulkLocaleUnpublishAction = (props) => {
|
822
|
+
return BulkLocaleAction({ action: "bulk-unpublish", ...props });
|
823
|
+
};
|
760
824
|
const StyledTrash = styled(Trash)`
|
761
825
|
path {
|
762
826
|
fill: currentColor;
|
@@ -976,54 +1040,13 @@ const LocaleListCell = ({
|
|
976
1040
|
return locale.name;
|
977
1041
|
}).toSorted((a, b) => formatter.compare(a, b));
|
978
1042
|
return /* @__PURE__ */ jsxs(Popover.Root, { children: [
|
979
|
-
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(Button, { type: "button", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs(
|
980
|
-
|
981
|
-
{
|
982
|
-
|
983
|
-
alignItems: "center",
|
984
|
-
justifyContent: "center",
|
985
|
-
height: "3.2rem",
|
986
|
-
width: "3.2rem",
|
987
|
-
children: [
|
988
|
-
/* @__PURE__ */ jsx(Typography, { textColor: "neutral800", ellipsis: true, children: localesForDocument.join(", ") }),
|
989
|
-
/* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(CaretDown, {}) })
|
990
|
-
]
|
991
|
-
}
|
992
|
-
) }) }),
|
1043
|
+
/* @__PURE__ */ jsx(Popover.Trigger, { children: /* @__PURE__ */ jsx(Button, { variant: "ghost", type: "button", onClick: (e) => e.stopPropagation(), children: /* @__PURE__ */ jsxs(Flex, { minWidth: "100%", alignItems: "center", justifyContent: "center", fontWeight: "regular", children: [
|
1044
|
+
/* @__PURE__ */ jsx(Typography, { textColor: "neutral800", ellipsis: true, marginRight: 2, children: localesForDocument.join(", ") }),
|
1045
|
+
/* @__PURE__ */ jsx(Flex, { children: /* @__PURE__ */ jsx(CaretDown, { width: "1.2rem", height: "1.2rem" }) })
|
1046
|
+
] }) }) }),
|
993
1047
|
/* @__PURE__ */ jsx(Popover.Content, { sideOffset: 16, children: /* @__PURE__ */ jsx("ul", { children: localesForDocument.map((name) => /* @__PURE__ */ jsx(Box, { padding: 3, tag: "li", children: /* @__PURE__ */ jsx(Typography, { children: name }) }, name)) }) })
|
994
1048
|
] });
|
995
1049
|
};
|
996
|
-
const Button = styled.button`
|
997
|
-
width: 100%;
|
998
|
-
|
999
|
-
svg {
|
1000
|
-
> g,
|
1001
|
-
path {
|
1002
|
-
fill: ${({ theme }) => theme.colors.neutral500};
|
1003
|
-
}
|
1004
|
-
}
|
1005
|
-
&:hover {
|
1006
|
-
svg {
|
1007
|
-
> g,
|
1008
|
-
path {
|
1009
|
-
fill: ${({ theme }) => theme.colors.neutral600};
|
1010
|
-
}
|
1011
|
-
}
|
1012
|
-
}
|
1013
|
-
&:active {
|
1014
|
-
svg {
|
1015
|
-
> g,
|
1016
|
-
path {
|
1017
|
-
fill: ${({ theme }) => theme.colors.neutral400};
|
1018
|
-
}
|
1019
|
-
}
|
1020
|
-
}
|
1021
|
-
`;
|
1022
|
-
const ActionWrapper = styled(Flex)`
|
1023
|
-
svg {
|
1024
|
-
height: 0.4rem;
|
1025
|
-
}
|
1026
|
-
`;
|
1027
1050
|
const addColumnToTableHook = ({ displayedHeaders, layout }) => {
|
1028
1051
|
const { options } = layout;
|
1029
1052
|
const isFieldLocalized = doesPluginOptionsHaveI18nLocalized(options) ? options.i18n.localized : false;
|
@@ -1221,7 +1244,7 @@ const index = {
|
|
1221
1244
|
},
|
1222
1245
|
id: "internationalization",
|
1223
1246
|
to: "internationalization",
|
1224
|
-
Component: () => import("./SettingsPage-
|
1247
|
+
Component: () => import("./SettingsPage-CPNFX0bZ.mjs").then((mod) => ({ default: mod.ProtectedSettingsPage })),
|
1225
1248
|
permissions: PERMISSIONS.accessMain
|
1226
1249
|
});
|
1227
1250
|
const contentManager = app.getPlugin("content-manager");
|
@@ -1233,6 +1256,7 @@ const index = {
|
|
1233
1256
|
});
|
1234
1257
|
contentManager.apis.addDocumentAction((actions) => {
|
1235
1258
|
actions.splice(2, 0, BulkLocalePublishAction);
|
1259
|
+
actions.splice(5, 0, BulkLocaleUnpublishAction);
|
1236
1260
|
return actions;
|
1237
1261
|
});
|
1238
1262
|
contentManager.injectComponent("listView", "actions", {
|
@@ -1338,7 +1362,7 @@ const index = {
|
|
1338
1362
|
async registerTrads({ locales }) {
|
1339
1363
|
const importedTrads = await Promise.all(
|
1340
1364
|
locales.map((locale) => {
|
1341
|
-
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-9eCAqqrB.mjs"), "./translations/dk.json": () => import("./dk-2qBjxt-P.mjs"), "./translations/en.json": () => import("./en-
|
1365
|
+
return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/de.json": () => import("./de-9eCAqqrB.mjs"), "./translations/dk.json": () => import("./dk-2qBjxt-P.mjs"), "./translations/en.json": () => import("./en-CtekP_47.mjs"), "./translations/es.json": () => import("./es-DlmMVaBG.mjs"), "./translations/fr.json": () => import("./fr-3S6ke71d.mjs"), "./translations/ko.json": () => import("./ko-qTjQ8IMw.mjs"), "./translations/pl.json": () => import("./pl-B67TSHqT.mjs"), "./translations/ru.json": () => import("./ru-hagMa57T.mjs"), "./translations/tr.json": () => import("./tr-Dw_jmkG-.mjs"), "./translations/zh-Hans.json": () => import("./zh-Hans-Dyc-aR-h.mjs"), "./translations/zh.json": () => import("./zh-57YM4amO.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
|
1342
1366
|
return {
|
1343
1367
|
data: prefixPluginTranslations(data, pluginId),
|
1344
1368
|
locale
|
@@ -1364,4 +1388,4 @@ export {
|
|
1364
1388
|
index as i,
|
1365
1389
|
useCreateLocaleMutation as u
|
1366
1390
|
};
|
1367
|
-
//# sourceMappingURL=index-
|
1391
|
+
//# sourceMappingURL=index-CgjpU2bY.mjs.map
|