Skip to content

The open alternative to Salesforce, designed for AI.

Update wording to indicate how to restore records (#10686)

Marie23a371fcdb29
diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/multiple-records/hooks/useDeleteMultipleRecordsAction.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/multiple-records/hooks/useDeleteMultipleRecordsAction.tsx
index 9795021e5ac..ca311a5bf1d 100644
--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/multiple-records/hooks/useDeleteMultipleRecordsAction.tsx
+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/multiple-records/hooks/useDeleteMultipleRecordsAction.tsx
@@ -16,8 +16,10 @@ import { getRecordIndexIdFromObjectNamePluralAndViewId } from '@/object-record/u
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
import { useRecoilComponentValueV2 } from '@/ui/utilities/state/component-state/hooks/useRecoilComponentValueV2';
+import { t } from '@lingui/core/macro';
import { useCallback, useState } from 'react';
import { isDefined } from 'twenty-shared';
+import { getOsControlSymbol } from 'twenty-ui';
export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
({ objectMetadataItem }) => {
@@ -108,12 +110,14 @@ export const useDeleteMultipleRecordsAction: ActionHookWithObjectMetadataItem =
setIsDeleteRecordsModalOpen(true);
};
+ const osControlSymbol = getOsControlSymbol();
+
const confirmationModal = (
<ConfirmationModal
isOpen={isDeleteRecordsModalOpen}
setIsOpen={setIsDeleteRecordsModalOpen}
title={'Delete Records'}
- subtitle={`Are you sure you want to delete these records? They can be recovered from the Options menu.`}
+ subtitle={t`Are you sure you want to delete these records? They can be recovered from the Command menu (${osControlSymbol} + K).`}
onConfirmClick={handleDeleteClick}
confirmButtonText={'Delete Records'}
/>
diff --git a/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/hooks/useDeleteSingleRecordAction.tsx b/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/hooks/useDeleteSingleRecordAction.tsx
index e37be1e1e98..acc44cc2892 100644
--- a/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/hooks/useDeleteSingleRecordAction.tsx
+++ b/packages/twenty-front/src/modules/action-menu/actions/record-actions/single-record/hooks/useDeleteSingleRecordAction.tsx
@@ -9,10 +9,12 @@ import { useRecordTable } from '@/object-record/record-table/hooks/useRecordTabl
import { useHasObjectReadOnlyPermission } from '@/settings/roles/hooks/useHasObjectReadOnlyPermission';
import { ConfirmationModal } from '@/ui/layout/modal/components/ConfirmationModal';
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer';
+import { t } from '@lingui/core/macro';
import { isNull } from '@sniptt/guards';
import { useCallback, useContext, useState } from 'react';
import { useRecoilValue } from 'recoil';
import { isDefined } from 'twenty-shared';
+import { getOsControlSymbol } from 'twenty-ui';
export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
objectMetadataItem,
@@ -76,6 +78,8 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
setIsDeleteRecordsModalOpen(true);
};
+ const osControlSymbol = getOsControlSymbol();
+
return {
shouldBeRegistered,
onClick,
@@ -84,9 +88,7 @@ export const useDeleteSingleRecordAction: ActionHookWithObjectMetadataItem = ({
isOpen={isDeleteRecordsModalOpen}
setIsOpen={setIsDeleteRecordsModalOpen}
title={'Delete Record'}
- subtitle={
- 'Are you sure you want to delete this record? It can be recovered from the Options menu.'
- }
+ subtitle={t`Are you sure you want to delete this record? It can be recovered from the Command menu (${osControlSymbol} + K).`}
onConfirmClick={() => {
handleDeleteClick();
if (isInRightDrawer) {